Remove find_inferior_in_random
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * inferiors.c (find_inferior_in_random): Remove.
4 * inferiors.h (find_inferior_in_random): Remove.
5 * linux-low.c (status_pending_p_callback): Return bool, accept
6 parameter ptid directly.
7 (linux_wait_for_event_filtered): Use find_thread_in_random.
8 (linux_wait_1): Likewise.
9
10 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
11
12 * inferiors.c (find_inferior_id): Remove.
13 (find_thread_ptid): Move implemention from find_inferior_id to
14 here.
15 * inferiors.h (find_inferior_id): Remove.
16 * server.c (handle_status): Use find_thread_ptid.
17 (process_serial_event): Likewise.
18 * thread-db.c (find_one_thread): Likewise.
19 (thread_db_thread_handle): Likewise.
20 * win32-low.c (thread_rec): Likewise.
21 (child_delete_thread): Likewise.
22 (win32_thread_alive): Likewise.
23 (get_child_debug_event): Likewise.
24
25 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
26
27 * linux-mips-low.c (update_watch_registers_callback): Return
28 void, remove pid_p parameter, don't check for pid.
29 (mips_insert_point, mips_remove_point): Use for_each_thread.
30
31 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
32
33 * lynx.low (lynx_delete_thread_callback): Remove.
34 (lynx_mourn): Use for_each_thread.
35
36 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
37
38 * regcache.c (regcache_invalidate_one): Remove.
39 (regcache_invalidate_pid): use for_each_thread.
40
41 2017-11-26 Tom Tromey <tom@tromey.com>
42
43 * linux-low.c (linux_create_inferior): Update.
44
45 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
46
47 * spu-low.c (spu_create_inferior): Fix typo in argument name.
48
49 2017-11-24 Alan Hayward <alan.hayward@arm.com>
50
51 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
52 * linux-aarch64-low.c (initialize_low_arch): Call init func.
53 * linux-aarch64-tdesc-selftest.c: New file.
54 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
55
56 2017-11-24 Alan Hayward <alan.hayward@arm.com>
57
58 * configure.srv: Add new file.
59 * linux-aarch64-low.c (initialize_low_arch): Call init func.
60 * linux-aarch64-tdesc-selftest.c: New file.
61 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
62
63 2017-11-24 Alan Hayward <alan.hayward@arm.com>
64
65 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
66 * linux-aarch64-low.c (initialize_low_arch): Remove init.
67 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
68
69 2017-11-24 Alan Hayward <alan.hayward@arm.com>
70
71 * configure.srv: Add new files.
72 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
73 aarch64_linux_read_description.
74 * linux-aarch64-low.c (aarch64_linux_read_description):
75 Merge with aarch64_arch_setup.
76 (aarch64_arch_setup): Call aarch64_linux_read_description.
77 * linux-aarch64-tdesc.c: New file.
78 * linux-aarch64-tdesc.h: New file.
79
80 2017-11-24 Yao Qi <yao.qi@linaro.org>
81
82 * configure.srv: Set $srv_regobj for tic6x-linux.
83 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
84 (tic6x_read_description): Move some code to tic6x_arch_setup.
85 (tic6x_tdesc_test): New function.
86 (initialize_low_arch): Call selftests::register_test.
87
88 2017-11-22 Yao Qi <yao.qi@linaro.org>
89
90 * remote-utils.c (prepare_resume_reply): Use memcpy.
91
92 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
93
94 * linux-low.c (kill_one_lwp_callback): Return void, take
95 argument directly, don't filter on pid.
96 (linux_kill): Use for_each_thread.
97
98 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
99
100 * linux-low.c (need_step_over_p): Return bool, remove dummy
101 argument.
102 (linux_resume, proceed_all_lwps): Use find_thread.
103
104 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
105
106 * linux-low.c (resume_status_pending_p): Return bool, remove
107 flag_p argument.
108 (linux_resume): Use find_thread.
109
110 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
111
112 * linux-low.c (struct thread_resume_array): Remove.
113 (linux_set_resume_request): Return void, take arguments
114 directly.
115 (linux_resume): Use for_each_thread.
116
117 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
118
119 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
120 return bool, remove data argument.
121 (linux_stabilize_threads): Use find_thread.
122
123 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
124
125 * linux-low.c (unsuspend_one_lwp): Remove.
126 (unsuspend_all_lwps): Use for_each_thread, inline code from
127 unsuspend_one_lwp.
128
129 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
130
131 * gdbthread.h (find_thread): Add overload with ptid_t filter.
132 * linux-low.c (struct iterate_over_lwps_args): Remove.
133 (iterate_over_lwps_filter): Remove.
134 (iterate_over_lwps): Use find_thread.
135
136 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
137
138 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
139 (linux_handle_new_gdb_connection): Use for_each_thread, inline
140 code from reset_lwp_ptrace_options_callback.
141
142 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
143
144 * linux-arm-low.c (struct update_registers_data): Remove.
145 (update_registers_callback): Return void, take arguments
146 directly, don't check thread's pid.
147 (arm_insert_point, arm_remove_point): Use for_each_thread.
148
149 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
150
151 * win32-low.c (continue_one_thread): Return void, take argument
152 directly.
153 (child_continue): Use for_each_thread.
154
155 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
156
157 * win32-i386-low.c (update_debug_registers_callback): Rename
158 to ...
159 (update_debug_registers): ... this, return void, remove pid_p arg.
160 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
161
162 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
163
164 * inferiors.h (struct process_info): Add constructor, initialize
165 fields..
166 <syscalls_to_catch>: Change type to std::vector<int>.
167 * inferiors.c (add_process): Allocate process_info with new.
168 (remove_process): Free process_info with delete.
169 * linux-low.c (handle_extended_wait): Adjust.
170 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
171 * server.c (handle_general_set): Adjust.
172
173 2017-11-16 Pedro Alves <palves@redhat.com>
174
175 * remote-utils.c (remote_close): Block SIGIO signals instead of
176 uninstalling the SIGIO handler.
177
178 2017-11-16 Alan Hayward <alan.hayward@arm.com>
179
180 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
181
182 2017-11-16 Yao Qi <yao.qi@linaro.org>
183
184 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
185 (tic6x_store_gregset): Likewise.
186 (tic6x_usrregs_info): Move it up.
187
188 2017-11-15 Alan Hayward <alan.hayward@arm.com>
189
190 * Makefile.in: Update arch rules.
191 * configure.srv: Explicitly mark arch/ files.
192
193 2017-11-13 Andreas Schwab <schwab@suse.de>
194
195 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
196 function.
197 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
198
199 2017-11-06 Pedro Alves <palves@redhat.com>
200
201 * config.in, configure: Regenerate.
202
203 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
204
205 * target.c (struct thread_search): Remove.
206 (thread_search_callback): Remove.
207 (prepare_to_access_memory): Use for_each_thread instead of
208 find_inferior. Inline code from thread_search_callback.
209
210 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
211
212 * server.c (struct visit_actioned_threads_data): Remove.
213 (visit_actioned_threads): Change prototype to take arguments
214 directly.
215 (resume): Use find_thread instead of find_inferior.
216
217 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
218
219 * server.c (queue_stop_reply_callback): Change prototype, return
220 void.
221 (find_status_pending_thread_callback): Remove.
222 (handle_status): Replace find_inferior with find_thread and
223 for_each_thread.
224
225 2017-10-25 Alan Hayward <alan.hayward@arm.com>
226
227 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
228 with REGNO.
229 (aarch64_store_gregset): Likewise.
230 (aarch64_fill_fpregset): Likewise.
231 (aarch64_store_fpregset): Likewise.
232
233 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
234
235 * gdbthread.h (find_thread, for_each_thread): New functions.
236 * inferiors.c (thread_of_pid): Remove.
237 (find_any_thread_of_pid): Use find_thread.
238 * linux-low.c (num_lwps): Use for_each_thread.
239
240 2017-10-17 Yao Qi <yao.qi@linaro.org>
241
242 * Makefile.in: Remove one rule.
243 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
244
245 2017-10-17 Yao Qi <yao.qi@linaro.org>
246
247 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
248 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
249
250 2017-10-17 Yao Qi <yao.qi@linaro.org>
251
252 * configure.srv: Rename arm.o with arch/arm.o.
253
254 2017-10-17 Yao Qi <yao.qi@linaro.org>
255
256 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
257 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
258 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
259 (arch-i386.o, arch-amd64.o): Remove rules.
260 (arch/%.o): New rule.
261 Update POSTCOMPILE and COMPILE.pre.
262 * configure.ac: Invoke AC_CONFIG_COMMANDS.
263 * configure: Re-generated.
264 * configure.srv: Replace arch-i386.o with arch/i386.o.
265 Replace arch-amd64.o with arch/amd64.o.
266
267 2017-10-16 Yao Qi <yao.qi@linaro.org>
268
269 * configure: Regenerated.
270
271 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
272
273 * inferiors.h: (struct inferior_list): Remove.
274 (struct inferior_list_entry); Remove.
275 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
276 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
277 get_first_inferior): Remove.
278 (for_each_inferior, for_each_inferior_with_data, find_inferior,
279 find_inferior_id, find_inferior_in_random): Change signature.
280 * inferiors.c (all_threads): Change type to
281 std::list<thread_info *>.
282 (get_thread): Remove macro.
283 (find_inferior, find_inferior_id): Change signature, implement
284 using find_thread.
285 (find_inferior_in_random): Change signature, implement using
286 find_thread_in_random.
287 (for_each_inferior, for_each_inferior_with_data): Change
288 signature, implement using for_each_thread.
289 (add_inferior_to_list, remove_inferior): Remove.
290 (add_thread, get_first_thread, thread_of_pid,
291 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
292 (get_first_inferior, one_inferior_p, clear_inferior_list):
293 Remove.
294 (clear_inferiors, get_thread_process): Update.
295 * gdbthread.h: Include <list>.
296 (struct thread_info) <entry>: Remove field.
297 <id>: New field.
298 (all_threads): Change type to std::list<thread_info *>.
299 (get_first_inferior): Add doc.
300 (find_thread, for_each_thread, find_thread_in_random): New
301 functions.
302 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
303 * linux-arm-low.c (update_registers_callback): Update.
304 * linux-low.c (second_thread_of_pid_p): Update.
305 (kill_one_lwp_callback, linux_detach_lwp_callback,
306 delete_lwp_callback, status_pending_p_callback, same_lwp,
307 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
308 iterate_over_lwps, not_stopped_callback,
309 resume_stopped_resumed_lwps, count_events_callback,
310 select_singlestep_lwp_callback, select_event_lwp_callback,
311 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
312 suspend_and_send_sigstop_callback, wait_for_sigstop,
313 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
314 lwp_running, linux_set_resume_request, resume_status_pending_p,
315 need_step_over_p, start_step_over, linux_resume_one_thread,
316 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
317 reset_lwp_ptrace_options_callback): Update.
318 * linux-mips-low.c (update_watch_registers_callback): Update.
319 * regcache.c (regcache_invalidate_one, regcache_invalidate):
320 Update.
321 (free_register_cache_thread_one): Remove.
322 (regcache_release): Update.
323 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
324 handle_qxfer_threads_worker): Update.
325 (handle_query): Update, use list iterator.
326 (visit_actioned_threads, handle_pending_status,
327 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
328 clear_pending_status_callback, set_pending_status_callback,
329 find_status_pending_thread_callback, handle_status,
330 process_serial_event): Update.
331 * target.c (thread_search_callback): Update.
332 * thread-db.c (thread_db_get_tls_address): Update.
333 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
334 Update.
335 * win32-i386-low.c (update_debug_registers_callback): Update.
336 * win32-low.c (delete_thread_info, child_delete_thread,
337 continue_one_thread, suspend_one_thread,
338 get_child_debug_event): Adjust.
339
340 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
341
342 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
343 * inferiors.h: Include <list>.
344 (struct process_info) <entry>: Remove field.
345 <pid>: New field.
346 (pid_of): Change macro to function.
347 (ptid_of, lwpid_of): Remove macro.
348 (all_processes): Change type to std::list<process_info *>.
349 (ALL_PROCESSES): Remove macro.
350 (for_each_process, find_process): New function.
351 * inferiors.c (all_processes): Change type to
352 std::list<process_info *>.
353 (find_thread_process): Adjust.
354 (add_process): Likewise.
355 (remove_process): Likewise.
356 (find_process_pid): Likewise.
357 (get_first_process): Likewise.
358 (started_inferior_callback): Remove.
359 (have_started_inferiors_p): Adjust.
360 (attached_inferior_callback): Remove.
361 (have_attached_inferiors_p): Adjust.
362 * linux-low.c (check_zombie_leaders): Likewise.
363 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
364 (x86_linux_update_xmltarget): Adjust.
365 * server.c (handle_query): Likewise.
366 (gdb_reattached_process): Remove.
367 (handle_status): Adjust.
368 (kill_inferior_callback): Likewise.
369 (detach_or_kill_inferior): Remove.
370 (print_started_pid): Likewise.
371 (print_attached_pid): Likewise.
372 (detach_or_kill_for_exit): Update.
373 (process_serial_event): Likewise.
374 * linux-arm-low.c (arm_new_fork): Likewise.
375
376 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
377
378 * dll.h: Include <list>.
379 (struct dll_info): Add constructor.
380 <entry>: Remove field.
381 (all_dlls): Change type to std::list<dll_info>.
382 * dll.c: Include <algorithm>.
383 (get_dll): Remove macro.
384 (all_dlls): Change type to std::list<dll_info *>.
385 (free_one_dll): Remove.
386 (match_dll): Likewise.
387 (loaded_dll): Adjust.
388 (unloaded_dll): Adjust to all_dlls type change, use
389 std::find_if. Inline code from match_dll.
390 (clear_dlls): Adjust to all_dlls type change.
391 * server.c (emit_dll_description): Remove.
392 (handle_qxfer_libraries): Adjust to all_dlls type change,
393 integrate emit_dll_description's functionality.
394
395 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
396
397 * linux-low.h (struct linux_target_ops) <delete_process>: New
398 field.
399 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
400 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
401 (struct linux_target_ops): Add delete_process callback.
402 * linux-arm-low.c (arm_delete_process): New.
403 (struct linux_target_ops): Add delete_process callback.
404 * linux-bfin-low.c (struct linux_target_ops): Likewise.
405 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
406 * linux-m32r-low.c (struct linux_target_ops): Likewise.
407 * linux-mips-low.c (mips_linux_delete_process): New.
408 (struct linux_target_ops): Add delete_process callback.
409 * linux-ppc-low.c (struct linux_target_ops): Likewise.
410 * linux-s390-low.c (struct linux_target_ops): Likewise.
411 * linux-sh-low.c (struct linux_target_ops): Likewise.
412 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
413 * linux-tile-low.c (struct linux_target_ops): Likewise.
414 * linux-x86-low.c (x86_linux_delete_process): New.
415 (struct linux_target_ops): Add delete_process callback.
416 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
417
418 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
419
420 * linux-aarch64-low.c (the_low_target): Add thread delete
421 callback.
422 * linux-arm-low.c (arm_delete_thread): New function.
423 (the_low_target): Add thread delete callback.
424 * linux-bfin-low.c (the_low_target): Likewise.
425 * linux-crisv32-low.c (the_low_target): Likewise.
426 * linux-low.c (delete_lwp): Invoke delete_thread callback if
427 set.
428 * linux-low.h (struct linux_target_ops) <delete_thread>: New
429 field.
430 * linux-m32r-low.c (the_low_target): Add thread delete callback.
431 * linux-mips-low.c (mips_linux_delete_thread): New function.
432 (the_low_target): Add thread delete callback.
433 * linux-ppc-low.c (the_low_target): Likewise.
434 * linux-s390-low.c (the_low_target): Likewise.
435 * linux-sh-low.c (the_low_target): Likewise.
436 * linux-tic6x-low.c (the_low_target): Likewise.
437 * linux-tile-low.c (the_low_target): Likewise.
438 * linux-x86-low.c (the_low_target): Likewise.
439 * linux-xtensa-low.c (the_low_target): Likewise.
440
441 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
442
443 * win32-low.c: Include "common-inferior.h".
444
445 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
446
447 * inferiors.c (set_inferior_cwd): New function.
448 * server.c (handle_general_set): Handle QSetWorkingDir packet.
449 (handle_query): Inform that QSetWorkingDir is supported.
450 * win32-low.c (create_process): Pass the inferior's cwd to
451 CreateProcess.
452
453 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
454
455 * inferiors.c (current_inferior_cwd): New global variable.
456 (get_inferior_cwd): New function.
457 * inferiors.h (struct process_info) <cwd>: New field.
458
459 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
460
461 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
462 (OBS): Add gdb_tilde_expand.o.
463
464 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
465
466 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
467 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
468
469 2017-09-29 Pedro Alves <palves@redhat.com>
470
471 * ax.c (gdb_parse_agent_expr): Constify.
472 * ax.h (gdb_parse_agent_expr): Constify.
473 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
474 Constify.
475 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
476 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
477 * remote-utils.h (read_ptid): Constify.
478 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
479 (process_point_options, process_serial_event): Constify.
480 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
481 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
482 (cmd_qtbuffer): Constify.
483
484 2017-09-29 Pedro Alves <palves@redhat.com>
485
486 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
487 fails.
488
489 2017-09-29 Pedro Alves <palves@redhat.com>
490
491 * linux-low.c (handle_extended_wait): Pass parent thread instead
492 of process to thread_db_notice_clone.
493 * linux-low.h (thread_db_notice_clone): Replace parent process
494 parameter with parent thread parameter.
495 * thread-db.c (find_one_thread): Add comment.
496 (thread_db_notice_clone): Replace parent process parameter with
497 parent thread parameter. Temporarily switch to the parent thread.
498
499 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
500
501 * gdbthread.h: Include "common-gdbthread.h".
502 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
503 "if" when validating the ptid.
504 * remote-utils.c: Include "gdbthread.h".
505 (prepare_resume_reply): Use "switch_to_thread".
506 * target.c (done_accessing_memory): Likewise.
507
508 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
509
510 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
511 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
512 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
513 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
514 s390x-gs-linux64-ipa.o to ipa_obj.
515 * linux-s390-low.c (HWCAP_S390_GS): New define.
516 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
517 New functions.
518 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
519 (s390_arch_setup): Check for guarded-storage support and choose
520 appropriate tdesc.
521 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
522 init_registers_s390x_gs_linux64.
523 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
524 enum value.
525 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
526 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
527
528 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
529
530 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
531
532 2017-09-21 Kevin Buettner <kevinb@redhat.com>
533
534 * linux-low.h (struct lwp_info): Add new field, thread_handle.
535 (thread_db_thread_handle): Declare.
536 * linux-low.c (linux_target_ops): Initialize thread_handle.
537 * server.c (handle_qxfer_threads_worker): Add support for
538 "handle" attribute.
539 * target.h (struct target_ops): Add new function pointer,
540 thread_handle.
541 (target_thread_handle): Define.
542 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
543 field in lwp.
544 (thread_db_thread_handle): New function.
545
546 2017-09-21 Kevin Buettner <kevinb@redhat.com>
547
548 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
549 * linux-low.h (thread_db_notice_clone): Declare.
550 * thread-db.c (thread_db_notice_clone): New function.
551
552 2017-09-21 Pedro Alves <palves@redhat.com>
553
554 * server.c (gdb_read_memory, handle_status, process_serial_event)
555 (handle_serial_event, handle_target_event): Adjust to
556 set_desired_thread prototype change.
557 * target.c (set_desired_thread): Remove 'use_general' parameter
558 and adjust.
559 * target.h (set_desired_thread): Remove 'use_general' parameter.
560
561 2017-09-20 Tom Tromey <tom@tromey.com>
562
563 * target.c (target_terminal::terminal_state): Define.
564 (target_terminal::init): Rename from target_terminal_init.
565 (target_terminal::inferior): Rename from
566 target_terminal_inferior.
567 (target_terminal::ours): Rename from target_terminal_ours.
568 (target_terminal::ours_for_output, target_terminal::info): New.
569
570 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
571
572 * server.c (accumulate_file_name_length): Remove.
573 (emit_dll_description): Adjust to std::string change.
574 (handle_qxfer_libraries): Use std::string to hold document.
575
576 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
577
578 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
579 return type of xml_escape_text.
580 * server.c (emit_dll_description): Likewise.
581
582 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
583
584 * server.c (captured_main): Accept argument for --selftest.
585 Update run_tests call.
586 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
587 when registering selftests.
588
589 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
590
591 * regcache.c (get_thread_regcache): Update code to use "std::vector"
592 instead of "VEC" for "target_desc.reg_defs".
593 (regcache_cpy): Likewise.
594 (registers_to_string): Likewise.
595 (registers_from_string): Likewise.
596 (find_regno): Likewise.
597 (supply_regblock): Likewise.
598 (regcache_raw_read_unsigned): Likewise.
599 * tdesc.c (init_target_desc): Likewise.
600 (tdesc_create_reg): Likewise.
601 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
602 (struct target_desc) <reg_defs>: Convert to "std::vector".
603 (target_desc): Do not initialize "reg_defs".
604 (~target_desc): Update code to use "std::vector" instead of "VEC"
605 for "target_desc.reg_defs".
606 (operator==): Likewise.
607
608 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
609
610 * inferiors.h (thread_to_gdb_id): Remove.
611 * inferiors.c (thread_to_gdb_id): Remove.
612 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
613 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
614 lynx_store_registers, lynx_read_memory, lynx_write_memory):
615 Likewise.
616 * nto-low.c (nto_fetch_registers, nto_store_registers,
617 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
618
619 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
620
621 * inferiors.h (gdb_id_to_thread_id): Remove.
622 * inferiors.c (gdb_id_to_thread_id): Remove.
623 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
624 removal. Move pid declaration closer to where it's used.
625
626 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
627
628 * server.c (handle_detach): New function.
629 (process_serial_event): Move code out, call handle_detach.
630
631 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
632
633 * server.c (require_running): Rename to ...
634 (require_running_or_return): ... this ...
635 (require_running_or_break): ... and this.
636 (handle_query, process_serial_event): Adjust.
637
638 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
639
640 * linux-low.c (linux_set_resume_request): Remove unused
641 variables.
642
643 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
644
645 * server.c (first_thread_of): Remove.
646 (process_serial_event): Replace usage of first_thread_of with
647 find_any_thread_of_pid.
648 * tracepoint.c (same_process_p): Remove.
649 (gdb_agent_about_to_close): Replace usage of same_process_p with
650 find_any_thread_of_pid.
651 * linux-x86-low.c (same_process_callback): Remove.
652 (x86_arch_setup_process_callback): Replace usage of
653 same_process_callback with find_any_thread_of_pid.
654 * thread-db.c (any_thread_of): Remove.
655 (switch_to_process): Replace usage of any_thread_of with
656 find_any_thread_of_pid.
657 * inferiors.c (thread_pid_matches_callback): Remove.
658 (find_thread_process): Adjust to use find_any_thread_of_pid.
659
660 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
661
662 * regcache.c (get_thread_regcache): Guard calls to "memset"
663 with "!VEC_empty".
664
665 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
666
667 * linux-low.c (handle_extended_wait): Use
668 "allocate_target_description" instead of "XNEW".
669 * linux-x86-low.c (initialize_low_arch): Likewise.
670
671 2017-09-05 Yao Qi <yao.qi@linaro.org>
672
673 * configure.srv (srv_i386_regobj): Remove.
674 (srv_amd64_regobj): Remove.
675 (srv_regobj): Set it to "" for x86 non-linux targets.
676 * linux-x86-tdesc.c (i386_linux_read_description):
677 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
678 (init_registers_i386): Remove the declaration.
679 (tdesc_i386): Remove the declaration.
680 (lynx_i386_arch_setup): Call i386_create_target_description.
681 * nto-x86-low.c: Likewise.
682 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
683 [!__x86_64__]: include arch/i386.h.
684 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
685
686 2017-09-05 Yao Qi <yao.qi@linaro.org>
687
688 * configure.srv (srv_amd64_linux_xmlfiles): Remove
689 i386/amd64-XXX-linux from it.
690
691 2017-09-05 Yao Qi <yao.qi@linaro.org>
692
693 * configure.srv: Empty srv_amd64_linux_regobj if $development is
694 false.
695 (ipa_amd64_linux_regobj): Remove.
696 (ipa_x32_linux_regobj): Remove.
697
698 2017-09-05 Yao Qi <yao.qi@linaro.org>
699
700 * Makefile.in (arch-amd64.o): New rule.
701 * configure.srv: Append arch-amd64.o.
702 * linux-amd64-ipa.c: Include common/x86-xstate.h.
703 (get_ipa_tdesc): Call amd64_linux_read_description.
704 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
705 and init_registers_amd64_XXX.
706 * linux-x86-low.c (x86_linux_read_description): Call
707 amd64_linux_read_description.
708 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
709 (initialize_low_arch): Don't call init_registers_x32_XXX and
710 init_registers_amd64_XXX.
711 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
712 and tdesc_amd64_XXX.
713 [__x86_64__] (amd64_tdesc_test): New function.
714 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
715 and init_registers_amd64_XXX.
716 * linux-x86-tdesc.c: Include arch/amd64.h.
717 (xcr0_to_tdesc_idx): New function.
718 (i386_linux_read_description): New function.
719 (amd64_get_ipa_tdesc_idx): New function.
720 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
721 (amd64_get_ipa_tdesc): Declare.
722
723 2017-09-05 Yao Qi <yao.qi@linaro.org>
724
725 * configure.srv (srv_i386_linux_xmlfiles): Remove
726 i386/i386-XXX-linux.xml from it.
727
728 2017-09-05 Yao Qi <yao.qi@linaro.org>
729
730 * configure.srv: Set srv_i386_linux_regobj empty if $development
731 is false.
732 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
733 initialize_low_tdesc.
734 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
735 with #if initialize_low_tdesc.
736 * linux-x86-tdesc-selftest.c: New file.
737 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
738
739 2017-09-05 Yao Qi <yao.qi@linaro.org>
740
741 * Makefile.in (arch-i386.o): New rule.
742 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
743 (x86_64-*-linux*): Likewise.
744 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
745 include arch/i386.h.
746 (i386_linux_read_description): Remove code and call
747 i386_create_target_description.
748 * tdesc.c (allocate_target_description): New function.
749 * tdesc.h (set_tdesc_architecture): Remove declaration.
750 (set_tdesc_osabi): Likewise.
751
752 2017-09-05 Yao Qi <yao.qi@linaro.org>
753
754 * linux-x86-tdesc.c: Don't include <inttypes.h>.
755 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
756 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
757 .xmltarget.
758 * server.c (get_features_xml): Call tdesc_get_features_xml.
759 * tdesc.c (set_tdesc_architecture): New function.
760 (set_tdesc_osabi): New function.
761 (tdesc_get_features_xml): New function.
762 (tdesc_create_feature): Add an argument.
763 * tdesc.h (struct target_desc) <features>: New field.
764 <arch, osabi>: New field.
765 (~target_desc): xfree features, arch, and osabi.
766 (target_desc::oerator==): Don't compare .xmltarget.
767 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
768 (set_tdesc_osabi): Likewise.
769 (tdesc_get_features_xml): Likewise.
770
771 2017-09-05 Yao Qi <yao.qi@linaro.org>
772
773 * linux-x86-tdesc.c: Include selftest.h.
774 (i386_tdesc_test): New function.
775 (initialize_low_tdesc): Call selftests::register_test.
776 * tdesc.h: Include regdef.h.
777 (target_desc): Override operator == and !=.
778
779 2017-09-05 Yao Qi <yao.qi@linaro.org>
780
781 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
782 (ipa_obj): Likewise.
783 * linux-i386-ipa.c: Include common/x86-xstate.h
784 (get_ipa_tdesc): Call i386_linux_read_description.
785 (initialize_low_tracepoint): Don't call init_registers_XXX
786 functions, call initialize_low_tdesc instead.
787 * linux-x86-low.c (x86_linux_read_description): Call
788 i386_linux_read_description.
789 (initialize_low_arch): Don't call init_registers_i386_XXX
790 functions, call initialize_low_tdesc.
791 * linux-x86-tdesc.c: New file.
792 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
793 (i386_get_ipa_tdesc_idx): Declare.
794 (i386_get_ipa_tdesc): Declare.
795 (initialize_low_tdesc): Declare.
796
797 2017-09-05 Yao Qi <yao.qi@linaro.org>
798
799 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
800 instead of 0.
801
802 2017-09-05 Yao Qi <yao.qi@linaro.org>
803
804 * Makefile.in (IPA_OBJS): Add vec-ipa.o
805 * regcache.c (get_thread_regcache): Use VEC_length.
806 (init_register_cache): Likewise.
807 (regcache_cpy): Likewise.
808 (registers_to_string): Iterate reg_defs via VEC_iterate.
809 (find_regno): Likewise.
810 (find_register_by_number): Use VEC_index.
811 (register_size): Call find_register_by_number.
812 (register_data): Call find_register_by_number.
813 (supply_regblock): Use VEC_length.
814 (regcache_raw_read_unsigned): Likewise.
815 * tdesc.c (init_target_desc): Iterate reg_defs via
816 VEC_iterate.
817 (default_description): Update initializer.
818 (copy_target_description): Don't update field num_registers.
819 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
820 <num_registers>: Remove.
821
822 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
823
824 * Makefile.in (.SECONDARY): Define target.
825
826 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
827
828 * linux-low.c (linux_wait_1): Adjust.
829 * server.c (queue_stop_reply_callback): Adjust.
830
831 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
832
833 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
834 QEnvironmentUnset and QEnvironmentReset packets.
835 (handle_query): Inform remote that QEnvironmentHexEncoded,
836 QEnvironmentUnset and QEnvironmentReset are supported.
837
838 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
839
840 * inferiors.h (inferior_target_data): Rename to ...
841 (thread_target_data): ... this.
842 (inferior_regcache_data): Rename to ...
843 (thread_regcache_data): ... this.
844 (set_inferior_regcache_data): Rename to ...
845 (set_thread_regcache_data): ... this.
846 * inferiors.c (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 (free_one_thread): Update.
853 * linux-low.h (get_thread_lwp): Update.
854 * regcache.c (get_thread_regcache): Update.
855 (regcache_invalidate_thread): Update.
856 (free_register_cache_thread): Update.
857 * win32-i386-low.c (update_debug_registers_callback): Update.
858 (win32_get_current_dr): Update.
859 * win32-low.c (thread_rec): Update.
860 (delete_thread_info): Update.
861 (continue_one_thread): Update.
862 (suspend_one_thread): Update.
863
864 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
865
866 * inferiors.c (set_inferior_target_data): Remove.
867 * inferiors.h (set_inferior_target_data): Remove.
868
869 2017-08-18 Yao Qi <yao.qi@linaro.org>
870
871 * Makefile.in (OBS): Add selftest.o.
872 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
873 * configure, config.in: Re-generated.
874 * server.c: Include common/sefltest.h.
875 (captured_main): Handle option --selftest.
876
877 2017-08-09 Yao Qi <yao.qi@linaro.org>
878
879 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
880 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
881 i386-avx-mpx.o and i386-mmx.o.
882 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
883 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
884 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
885 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
886 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
887 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
888 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
889 i386/amd64-avx-mpx.xml.
890
891 2017-08-09 Yao Qi <yao.qi@linaro.org>
892
893 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
894 and x32-avx-avx512.o.
895 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
896 i386/x32-avx-avx512.xml.
897
898 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
899
900 * tracepoint.h (enum class fast_tpoint_collect_result): New
901 enumeration.
902 (fast_tracepoint_collecting): Change return type to
903 fast_tpoint_collect_result.
904 * tracepoint.c (fast_tracepoint_collecting): Likewise.
905 * linux-low.h: Include tracepoint.h.
906 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
907 fast_tpoint_collect_result.
908 * linux-low.c (handle_tracepoints): Adjust.
909 (linux_fast_tracepoint_collecting): Change return type to
910 fast_tpoint_collect_result.
911 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
912 linux_wait_1, stuck_in_jump_pad_callback,
913 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
914 proceed_one_lwp): Adjust to type change.
915
916 2017-07-10 Yao Qi <yao.qi@linaro.org>
917
918 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
919
920 2017-06-29 Yao Qi <yao.qi@linaro.org>
921
922 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
923 Remove.
924 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
925
926 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
927
928 * Makefile.in (IPA_OBJS): Sort and format one item per line.
929
930 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
931
932 * linux-low.c (linux_create_inferior): Adjust code to access the
933 environment information via 'gdb_environ' class.
934 * lynx-low.c (lynx_create_inferior): Likewise.
935 * server.c (our_environ): Make it an instance of 'gdb_environ'.
936 (get_environ): Return a pointer to 'our_environ'.
937 (captured_main): Initialize 'our_environ'.
938 * server.h (get_environ): Adjust prototype.
939 * spu-low.c (spu_create_inferior): Adjust code to access the
940 environment information via 'gdb_environ' class.
941
942 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
943
944 * linux-low.c (linux_read_memory, linux_write_memory): Remove
945 usage of "register" keyword.
946
947 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
948
949 * configure: Re-generate.
950
951 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
952
953 * configure: Re-generate.
954
955 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
956
957 * Makefile.in (COMPILE.pre): Add "-x c++".
958
959 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
960
961 * fork-child.c: Conditionally include <signal.h>.
962
963 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
964
965 * server.c (handle_general_set): Handle new packet
966 "QStartupWithShell".
967 (handle_query): Add "QStartupWithShell" to the list of supported
968 packets.
969 (gdbserver_usage): Add help text explaining the
970 new "--startup-with-shell" and "--no-startup-with-shell" CLI
971 options.
972 (captured_main): Recognize and act upon the presence of the new
973 CLI options.
974
975 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
976 Pedro Alves <palves@redhat.com>
977
978 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
979 * configure: Regenerate.
980 * configure.srv (srv_linux_obj): Add "fork-child.o" and
981 "fork-inferior.o".
982 (i[34567]86-*-lynxos*): Likewise.
983 (spu*-*-*): Likewise.
984 * fork-child.c: New file.
985 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
986 and "environ.h".
987 (linux_ptrace_fun): New function.
988 (linux_create_inferior): Adjust function prototype to reflect
989 change on "target.h". Adjust function code to use
990 "fork_inferior".
991 (linux_request_interrupt): Delete "signal_pid".
992 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
993 (lynx_ptrace_fun): New function.
994 (lynx_create_inferior): Adjust function prototype to reflect
995 change on "target.h". Adjust function code to use
996 "fork_inferior".
997 * nto-low.c (nto_create_inferior): Adjust function prototype and
998 code to reflect change on "target.h". Update comments.
999 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1000 "common-terminal.h" and "environ.h".
1001 (terminal_fd): Moved to fork-child.c.
1002 (old_foreground_pgrp): Likewise.
1003 (restore_old_foreground_pgrp): Likewise.
1004 (last_status): Make it global.
1005 (last_ptid): Likewise.
1006 (our_environ): New variable.
1007 (startup_with_shell): Likewise.
1008 (program_name): Likewise.
1009 (program_argv): Rename to...
1010 (program_args): ...this.
1011 (wrapper_argv): New variable.
1012 (start_inferior): Delete function.
1013 (get_exec_wrapper): New function.
1014 (get_exec_file): Likewise.
1015 (get_environ): Likewise.
1016 (prefork_hook): Likewise.
1017 (post_fork_inferior): Likewise.
1018 (postfork_hook): Likewise.
1019 (postfork_child_hook): Likewise.
1020 (handle_v_run): Update code to deal with arguments coming from the
1021 remote host. Update calls from "start_inferior" to
1022 "create_inferior".
1023 (captured_main): Likewise. Initialize environment variable. Call
1024 "have_job_control".
1025 * server.h (post_fork_inferior): New prototype.
1026 (get_environ): Likewise.
1027 (last_status): Declare.
1028 (last_ptid): Likewise.
1029 (signal_pid): Likewise.
1030 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1031 (spu_ptrace_fun): New function.
1032 (spu_create_inferior): Adjust function prototype to reflect change
1033 on "target.h". Adjust function code to use "fork_inferior".
1034 * target.c (target_terminal_init): New function.
1035 (target_terminal_inferior): Likewise.
1036 (target_terminal_ours): Likewise.
1037 * target.h: Include <vector>.
1038 (struct target_ops) <create_inferior>: Update prototype.
1039 (create_inferior): Update macro.
1040 * utils.c (gdb_flush_out_err): New function.
1041 * win32-low.c (win32_create_inferior): Adjust function prototype
1042 and code to reflect change on "target.h".
1043
1044 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1045
1046 * inferiors.c (switch_to_thread): New function.
1047
1048 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1049
1050 * Makefile.in (SFILE): Add "common/job-control.c".
1051 (OBS): Add "job-control.o".
1052
1053 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1054
1055 * Makefile: Remove "@host_makefile_frag@".
1056
1057 2017-05-05 Pedro Alves <palves@redhat.com>
1058
1059 * configure: Regenerate.
1060
1061 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1062
1063 * configure: Regenerate.
1064
1065 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1066
1067 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1068 software_single_step change of return type to
1069 std::vector<CORE_ADDR>.
1070 * linux-low.c (install_software_single_step_breakpoints):
1071 Likewise.
1072 * linux-low.h (install_software_single_step_breakpoints):
1073 Likewise.
1074
1075 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1076
1077 * remote-utils.c: Include "gdb_termios.h" instead of
1078 "terminal.h".
1079 * terminal.h: Delete file.
1080
1081 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1082
1083 * server.c: Include <vector>.
1084 <program_argv, wrapper_argv>: Convert to std::vector.
1085 (start_inferior): Rewrite function to use C++.
1086 (handle_v_run): Likewise. Update code that calculates the argv
1087 based on the vRun packet; use C++.
1088 (captured_main): Likewise.
1089
1090 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1091
1092 * server.c (handle_v_cont): Initialize thread_resume::thread
1093 with null_ptid.
1094
1095 2017-04-05 Pedro Alves <palves@redhat.com>
1096
1097 * configure: Regenerate.
1098
1099 2017-04-05 Pedro Alves <palves@redhat.com>
1100
1101 * gdbreplay.c (sync_error): Constify.
1102 * linux-x86-low.c (push_opcode): Constify.
1103
1104 2017-04-05 Pedro Alves <palves@redhat.com>
1105
1106 * win32-low.c (get_child_debug_event)
1107 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1108 Report TARGET_WAITKIND_SPURIOUS instead.
1109
1110 2017-04-05 Pedro Alves <palves@redhat.com>
1111
1112 * remote-utils.c (remote_prepare, remote_open): Constify.
1113 * remote-utils.h (remote_prepare, remote_open): Constify.
1114 * server.c (captured_main): Constify 'port' handling.
1115
1116 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1117
1118 * Makefile.in (clean): Clear .deps.
1119
1120 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1121
1122 * .gitignore: Remove generated files, replace with wildcard.
1123 * (clean): Replace removal of generated files with wildcard.
1124 (version.c): Replace with...
1125 (version-generated.c): ...this.
1126 (xml-builtin.c): Replace with...
1127 (xml-builtin-generated.c): ...this.
1128 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1129 (%.c: *regformats*): Replace with...
1130 (%-generated.c: *regformats*): ...this.
1131
1132 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1133
1134 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1135 (xtensa_fill_gregset): Call collect_register_by_name for
1136 threadptr register.
1137 (xtensa_store_gregset): Call supply_register_by_name for
1138 threadptr register.
1139
1140 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1141
1142 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1143 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1144 (xtensa_store_gregset): Call supply_register for all registers in
1145 a0_regnum..a0_regnum + C0_NREGS range.
1146
1147 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1148
1149 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1150 (ax-ipa.o: ax.c): Remove.
1151 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1152 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1153 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1154 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1155 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1156
1157 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1158
1159 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1160 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1161 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1162 (errors-ipa.o: ../common/errors.c): Remove.
1163 (format-ipa.o: ../common/format.c): Remove.
1164 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1165
1166 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1167
1168 * Makefile.in (%-ipa.o: %.c): New rule.
1169 (tracepoint-ipa.o: tracepoint.c): Remove.
1170 (utils-ipa.o: utils.c): Remove.
1171 (remote-utils-ipa.o: remote-utils.c): Remove.
1172 (regcache-ipa.o: regcache.c): Remove.
1173 (i386-linux-ipa.o: i386-linux.c): Remove.
1174 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1175 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1176 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1177 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1178 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1179 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1180 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1181 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1182 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1183 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1184 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1185 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1186 (aarch64-ipa.o: aarch64.c): Remove.
1187 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1188 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1189 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1190 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1191 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1192 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1193 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1194 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1195 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1196 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1197 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1198 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1199 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1200 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1201 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1202 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1203 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1204 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1205 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1206 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1207 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1208 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1209 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1210 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1211 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1212 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1213 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1214 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1215 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1216 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1217 (tdesc-ipa.o: tdesc.c): Remove.
1218 (x32-linux-ipa.o: x32-linux.c): Remove.
1219 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1220 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1221
1222 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1223
1224 * Makefile.in (%.o: ../arch/%.c): New rule.
1225 (arm.o: ../arch/arm.c): Remove.
1226 (arm-linux.o: ../arch/arm-linux.c): Remove.
1227 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1228 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1229
1230 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1231
1232 * Makefile.in (%.o: ../nat/%.c): New rule.
1233 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1234 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1235 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1236 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1237 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1238 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1239 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1240 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1241 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1242 (linux-personality.o: ../nat/linux-personality.c): Remove.
1243 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1244 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1245 (x86-linux.o: ../nat/x86-linux.c): Remove.
1246 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1247 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1248
1249 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1250
1251 * Makefile.in (%.o: ../common/%.c): New rule.
1252 (signals.o: ../common/signals.c): Remove.
1253 (print-utils.o: ../common/print-utils.c): Remove.
1254 (rsp-low.o: ../common/rsp-low.c): Remove.
1255 (common-utils.o: ../common/common-utils.c): Remove.
1256 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1257 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1258 (vec.o: ../common/vec.c): Remove.
1259 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1260 (xml-utils.o: ../common/xml-utils.c): Remove.
1261 (ptid.o: ../common/ptid.c): Remove.
1262 (buffer.o: ../common/buffer.c): Remove.
1263 (format.o: ../common/format.c): Remove.
1264 (filestuff.o: ../common/filestuff.c): Remove.
1265 (agent.o: ../common/agent.c): Remove.
1266 (errors.o: ../common/errors.c): Remove.
1267 (environ.o: ../common/environ.c): Remove.
1268 (common-debug.o: ../common/common-debug.c): Remove.
1269 (cleanups.o: ../common/cleanups.c): Remove.
1270 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1271 (fileio.o: ../common/fileio.c): Remove.
1272 (common-regcache.o: ../common/common-regcache.c): Remove.
1273 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1274 (new-op.o: ../common/new-op.c): Remove.
1275 (btrace-common.o: ../common/btrace-common.c): Remove.
1276
1277 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1278
1279 * Makefile.in (%.o: ../target/%.c): New rule.
1280 (waitstatus.o: ../target/waitstatus.c): Remove.
1281
1282 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1283
1284 * Makefile.in
1285 (%.c: ../regformats/%.dat,
1286 (%.c: ../regformats/arm/%.dat,
1287 (%.c: ../regformats/i386/%.dat,
1288 (%.c: ../regformats/rs6000/%.dat): New rules.
1289 (aarch64.c): Remove.
1290 (reg-arm.c): Remove.
1291 (arm-with-iwmmxt.c): Remove.
1292 (arm-with-vfpv2.c): Remove.
1293 (arm-with-vfpv3.c): Remove.
1294 (arm-with-neon.c): Remove.
1295 (reg-bfin.c): Remove.
1296 (reg-cris.c): Remove.
1297 (reg-crisv32.c): Remove.
1298 (i386.c): Remove.
1299 (i386-linux.c): Remove.
1300 (i386-avx.c): Remove.
1301 (i386-avx-linux.c): Remove.
1302 (i386-avx-avx512.c): Remove.
1303 (i386-avx-avx512-linux.c): Remove.
1304 (i386-mpx.c): Remove.
1305 (i386-mpx-linux.c): Remove.
1306 (i386-avx-mpx-avx512-pku.c): Remove.
1307 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1308 (i386-avx-mpx.c): Remove.
1309 (i386-avx-mpx-linux.c): Remove.
1310 (i386-mmx.c): Remove.
1311 (i386-mmx-linux.c): Remove.
1312 (reg-ia64.c): Remove.
1313 (reg-m32r.c): Remove.
1314 (reg-m68k.c): Remove.
1315 (reg-cf.c): Remove.
1316 (mips-linux.c): Remove.
1317 (mips-dsp-linux.c): Remove.
1318 (mips64-linux.c): Remove.
1319 (mips64-dsp-linux.c): Remove.
1320 (nios2-linux.c): Remove.
1321 (powerpc-32.c): Remove.
1322 (powerpc-32l.c): Remove.
1323 (powerpc-altivec32l.c): Remove.
1324 (powerpc-cell32l.c): Remove.
1325 (powerpc-vsx32l.c): Remove.
1326 (powerpc-isa205-32l.c): Remove.
1327 (powerpc-isa205-altivec32l.c): Remove.
1328 (powerpc-isa205-vsx32l.c): Remove.
1329 (powerpc-e500l.c): Remove.
1330 (powerpc-64l.c): Remove.
1331 (powerpc-altivec64l.c): Remove.
1332 (powerpc-cell64l.c): Remove.
1333 (powerpc-vsx64l.c): Remove.
1334 (powerpc-isa205-64l.c): Remove.
1335 (powerpc-isa205-altivec64l.c): Remove.
1336 (powerpc-isa205-vsx64l.c): Remove.
1337 (s390-linux32.c): Remove.
1338 (s390-linux32v1.c): Remove.
1339 (s390-linux32v2.c): Remove.
1340 (s390-linux64.c): Remove.
1341 (s390-linux64v1.c): Remove.
1342 (s390-linux64v2.c): Remove.
1343 (s390-te-linux64.c): Remove.
1344 (s390-vx-linux64.c): Remove.
1345 (s390-tevx-linux64.c): Remove.
1346 (s390x-linux64.c): Remove.
1347 (s390x-linux64v1.c): Remove.
1348 (s390x-linux64v2.c): Remove.
1349 (s390x-te-linux64.c): Remove.
1350 (s390x-vx-linux64.c): Remove.
1351 (s390x-tevx-linux64.c): Remove.
1352 (tic6x-c64xp-linux.c): Remove.
1353 (tic6x-c64x-linux.c): Remove.
1354 (tic6x-c62x-linux.c): Remove.
1355 (reg-sh.c): Remove.
1356 (reg-sparc64.c): Remove.
1357 (reg-spu.c): Remove.
1358 (amd64.c): Remove.
1359 (amd64-linux.c): Remove.
1360 (amd64-avx.c): Remove.
1361 (amd64-avx-linux.c): Remove.
1362 (amd64-avx-avx512.c): Remove.
1363 (amd64-avx-avx512-linux.c): Remove.
1364 (amd64-mpx.c): Remove.
1365 (amd64-mpx-linux.c): Remove.
1366 (amd64-avx-mpx-avx512-pku.c): Remove.
1367 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1368 (amd64-avx-mpx.c): Remove.
1369 (amd64-avx-mpx-linux.c): Remove.
1370 (x32.c): Remove.
1371 (x32-linux.c): Remove.
1372 (x32-avx.c): Remove.
1373 (x32-avx-linux.c): Remove.
1374 (x32-avx-avx512.c): Remove.
1375 (x32-avx-avx512-linux.c): Remove.
1376 (reg-xtensa.c): Remove.
1377 (reg-tilegx.c): Remove.
1378 (reg-tilegx32.c): Remove.
1379
1380 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1381
1382 * Makefile.in (SFILES): Add "common/environ.c".
1383 (OBJS): Add "common/environ.h".
1384
1385 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1386
1387 * configure.ac: Check if the fs_base and gs_base members of
1388 `struct user_regs_struct' exist.
1389 * config.in: Regenerated.
1390 * configure: Likewise.
1391
1392 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1393
1394 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1395 target_read_memory.
1396 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1397 (get_next_pcs_syscall_next_pc): Likewise.
1398
1399 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1400
1401 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1402 * nto-x86-low.c: Likewise.
1403
1404 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1405
1406 * Makefile.in: Include disable-implicit-rules.mk.
1407
1408 2016-11-23 Pedro Alves <palves@redhat.com>
1409
1410 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1411 (debug_vprintf): Use std::chrono::steady_clock instead of
1412 gettimeofday. Use '.' instead of ':'.
1413 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1414 (get_timestamp): Use std::chrono::steady_clock instead of
1415 gettimeofday.
1416
1417 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1418
1419 * Makefile.in: Fix whitespace formatting.
1420
1421 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1422
1423 * Makefile.in (SFILES, OBS): Flatten list and order
1424 alphabetically.
1425
1426 2016-11-23 Pedro Alves <palves@redhat.com>
1427
1428 * event-loop.c (handle_file_event): Use warning.
1429 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1430 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1431 Use warning.
1432
1433 2016-11-23 Pedro Alves <palves@redhat.com>
1434
1435 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1436 output.
1437 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1438 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1439 debug_printf and debug_flush for debug output.
1440 * server.c (handle_general_set): Likewise.
1441 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1442 output.
1443
1444 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1445
1446 * Makefile.in (.c.o): Replace rule with ...
1447 (%.o: %.c): ... this one.
1448
1449 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1450
1451 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1452 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1453 make.
1454 * configure.ac: Remove checks for the make program.
1455 * configure: Re-generate.
1456
1457 2016-10-28 Pedro Alves <palves@redhat.com>
1458
1459 * Makefile.in (CXX_DIALECT): Get from configure.
1460 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1461 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1462 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1463 * config.in: Regenerate.
1464 * configure: Regenerate.
1465
1466 2016-10-27 Yao Qi <yao.qi@linaro.org>
1467
1468 * linux-low.c (linux_supports_range_stepping): Return true if
1469 can_software_single_step return true.
1470
1471 2016-10-27 Yao Qi <yao.qi@linaro.org>
1472
1473 * inferiors.c (find_inferior_in_random): New function.
1474 * inferiors.h (find_inferior_in_random): Declare.
1475 * linux-low.c (linux_wait_for_event_filtered): Call
1476 find_inferior_in_random instead of find_inferior.
1477
1478 2016-10-27 Yao Qi <yao.qi@linaro.org>
1479
1480 * linux-low.c (linux_wait_1): If single-step breakpoints are
1481 inserted, remove them.
1482
1483 2016-10-26 Pedro Alves <palves@redhat.com>
1484
1485 * linux-low.c (handle_extended_wait): Link parent/child fork
1486 threads.
1487 (linux_wait_1): Unlink them.
1488 (linux_set_resume_request): Ignore resume requests for
1489 already-resumed and unhandled fork child threads.
1490 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1491 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1492 New functions.
1493 (handle_v_requests) <vCont>: Don't call require_running.
1494 * server.h (in_queued_stop_replies): New declaration.
1495
1496 2016-10-24 Yao Qi <yao.qi@linaro.org>
1497
1498 PR server/20733
1499 * linux-aarch64-low.c (append_insns): Cast the return value to
1500 'uint32_t *'.
1501
1502 2016-10-10 Yao Qi <yao.qi@linaro.org>
1503
1504 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1505
1506 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1507
1508 * target.c (target_supports_multi_process): New function, moved
1509 from...
1510 * target.h (target_supports_multi_process): ... here. Remove
1511 macro.
1512
1513 2016-10-05 Tom Tromey <tom@tromey.com>
1514
1515 PR remote/20655:
1516 * tracepoint.c (handle_tracepoint_bkpts): Check
1517 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1518
1519 2016-10-05 Yao Qi <yao.qi@linaro.org>
1520
1521 * configure.srv: Update the path of arm-*.xml files.
1522
1523 2016-10-05 Terry Guo <terry.guo@arm.com>
1524 Yao Qi <yao.qi@linaro.org>
1525
1526 * Makefile.in: Adjust the path of rules.
1527 * configure.srv: Update the path of xml files.
1528 * regformats/arm-with-iwmmxt.dat: Regenerated.
1529 * regformats/arm-with-neon.dat: Likewise.
1530 * regformats/arm-with-vfpv2.dat: Likewise.
1531 * regformats/arm-with-vfpv3.dat Likewise.
1532
1533 2016-09-30 Yao Qi <yao.qi@linaro.org>
1534
1535 PR gdbserver/20627
1536 * target.c (target_stop_and_wait): Don't call
1537 target_continue_no_signal, use resume_stop instead.
1538
1539 2016-09-26 Yao Qi <yao.qi@linaro.org>
1540
1541 * linux-low.c (linux_wait_1): Call debug_exit.
1542
1543 2016-09-23 Pedro Alves <palves@redhat.com>
1544
1545 * Makefile.in (SFILES): Add common/new-op.c.
1546 (OBS): Add common/new-op.o.
1547 (new-op.o): New rule.
1548
1549 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1550
1551 * .gitinore: Ignore more files.
1552
1553 2016-09-21 Yao Qi <yao.qi@linaro.org>
1554
1555 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1556 23.
1557
1558 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1559
1560 * server.c (start_inferior): Call target_mourn_inferior instead of
1561 mourn_inferior; pass ptid_t argument to it.
1562 (resume): Likewise.
1563 (handle_target_event): Likewise.
1564 * target.c (target_mourn_inferior): New function.
1565 * target.h (mourn_inferior): Delete macro.
1566
1567 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1568
1569 * linux-low.c (lwp_is_stepping): New function.
1570
1571 2016-09-06 Carl Love <cel@us.ibm.com>
1572
1573 * server.c (start_inferior): Fixed comment, requested comment change
1574 didn't get updated correctly. Removed reference to ptrace () call as
1575 it is only true on Linux systems.
1576
1577 2016-09-06 Carl Love <cel@us.ibm.com>
1578
1579 * server.c (start_inferior): Do not call
1580 function target_post_create_inferior () if the
1581 inferior process has already exited.
1582
1583 2016-09-05 Pedro Alves <palves@redhat.com>
1584
1585 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1586 (COMPILE.pre, CC_LD): Use CXX directly.
1587 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1588 * acinclude.m4: Don't include build-with-cxx.m4.
1589 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1590 * configure: Regenerate.
1591
1592 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1593
1594 PR gdb/19495
1595 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1596 call writing data to own_buf.
1597
1598 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1599
1600 * target.c (mywait): Call target_wait instead of
1601 the_target->wait.
1602 (target_wait): New function.
1603
1604 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1605
1606 * server.c (start_inferior): New variable 'ptid'. Replace calls
1607 to the_target->resume by target_continue{,_no_signal}, depending
1608 on the case.
1609 * target.c (target_stop_and_wait): Call target_continue_no_signal
1610 instead of the_target->resume.
1611 (target_continue): New function.
1612
1613 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1614
1615 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1616
1617 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1618
1619 PR server/20491
1620 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1621 ps_prochandle.
1622 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1623 * linux-arm-low.c (ps_get_thread_area): Likewise.
1624 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1625 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1626 * linux-mips-low.c (ps_get_thread_area): Likewise.
1627 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1628 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1629 * linux-x86-low.c (ps_get_thread_area): Likewise.
1630 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1631
1632 2016-08-19 Pedro Alves <palves@redhat.com>
1633
1634 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1635
1636 2016-08-19 Pedro Alves <palves@redhat.com>
1637
1638 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1639 comment. Use memcpy instead of casting through unsigned long.
1640
1641 2016-08-19 Pedro Alves <palves@redhat.com>
1642
1643 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1644 allocating around 0x80000000.
1645
1646 2016-08-19 Pedro Alves <palves@redhat.com>
1647
1648 PR gdb/20415
1649 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1650 (x32-avx512-linux-ipa.o): New rules.
1651 * configure.ac (x86_64-*-linux*): New x32 check.
1652 * configure.srv (ipa_x32_linux_regobj): New.
1653 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1654 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1655 descriptions.
1656 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1657 descriptions.
1658 * configure: Regenerate.
1659
1660 2016-08-09 Pedro Alves <palves@redhat.com>
1661
1662 PR gdb/18653
1663 * Makefile.in (OBS): Add signals-state-save-restore.o.
1664 (signals-state-save-restore.o): New rule.
1665 * config.in: Regenerate.
1666 * configure: Regenerate.
1667 * linux-low.c: Include "signals-state-save-restore.h".
1668 (linux_create_inferior): Call
1669 restore_original_signals_state.
1670 * server.c: Include "dispositions-save-restore.h".
1671 (captured_main): Call save_original_signals_state.
1672
1673 2016-08-05 Pedro Alves <palves@redhat.com>
1674
1675 * configure: Regenerate.
1676
1677 2016-08-04 Yao Qi <yao.qi@linaro.org>
1678
1679 * linux-low.c (regsets_fetch_inferior_registers): Check
1680 errno is ESRCH or not.
1681
1682 2016-08-02 Yao Qi <yao.qi@linaro.org>
1683
1684 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1685 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1686 (thread_db_load_search): Update.
1687 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1688 td_ta_set_event and td_ta_event_getmsg.
1689
1690 2016-07-26 Pedro Alves <palves@redhat.com>
1691
1692 PR server/20414
1693 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1694 of unsigned long for 64-bit registers and use uint32_t instead of
1695 unsigned int for 32-bit registers.
1696
1697 2016-07-26 Pedro Alves <palves@redhat.com>
1698
1699 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1700 to 'ptrace'.
1701
1702 2016-07-21 Tom Tromey <tom@tromey.com>
1703
1704 * configure: Rebuild.
1705
1706 2016-07-21 Yao Qi <yao.qi@linaro.org>
1707
1708 * mem-break.c (find_gdb_breakpoint): Cast bp to
1709 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1710
1711 2016-07-21 Yao Qi <yao.qi@linaro.org>
1712
1713 * server.c (handle_v_requests): Support s and S actions
1714 if target_supports_software_single_step return true.
1715
1716 2016-07-21 Yao Qi <yao.qi@linaro.org>
1717
1718 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1719 is resume_step, call maybe_hw_step.
1720 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1721 and unstop them.
1722 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1723 breakpoints or not.
1724 (proceed_one_lwp): If resume request is resume_step, install
1725 reinsert breakpoints and call maybe_hw_step.
1726
1727 2016-07-21 Yao Qi <yao.qi@linaro.org>
1728
1729 * linux-low.c (proceed_one_lwp): Declare.
1730 (linux_resume_one_thread): Remove local variable 'step'.
1731 Lift code enqueue signal. Call proceed_one_lwp instead of
1732 linux_resume_one_lwp.
1733
1734 2016-07-21 Yao Qi <yao.qi@linaro.org>
1735
1736 * linux-low.c (linux_resume_one_thread): Call
1737 enqueue_pending_signal.
1738
1739 2016-07-21 Yao Qi <yao.qi@linaro.org>
1740
1741 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1742 * inferiors.c (do_restore_current_thread_cleanup): New function.
1743 (make_cleanup_restore_current_thread): Likewise.
1744 * linux-low.c (install_software_single_step_breakpoints): Call
1745 make_cleanup_restore_current_thread. Switch current_thread to
1746 thread.
1747
1748 2016-07-21 Yao Qi <yao.qi@linaro.org>
1749
1750 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1751 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1752 (clone_one_breakpoint): Likewise.
1753 (delete_reinsert_breakpoints): Change parameter to thread.
1754 Callers updated.
1755 (has_reinsert_breakpoints): Likewise.
1756 (uninsert_reinsert_breakpoints): Likewise.
1757 (reinsert_reinsert_breakpoints): Likewise.
1758 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1759 (delete_reinsert_breakpoints): Likewise.
1760 (reinsert_reinsert_breakpoints): Likewise.
1761 (uninsert_reinsert_breakpoints): Likewise.
1762 (has_reinsert_breakpoints): Likewise.
1763
1764 2016-07-21 Yao Qi <yao.qi@linaro.org>
1765
1766 * inferiors.c (get_thread_process): Make parameter const.
1767 * inferiors.h (get_thread_process): Update declaration.
1768 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1769 Add new parameters child_thread and parent_thread. Callers
1770 updated.
1771 * mem-break.h (clone_all_breakpoints): Update declaration.
1772
1773 2016-07-21 Yao Qi <yao.qi@linaro.org>
1774
1775 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1776 <command_list, handler>: Remove.
1777 (struct gdb_breakpoint): New.
1778 (struct other_breakpoint): New.
1779 (struct reinsert_breakpoint): New.
1780 (is_gdb_breakpoint): New function.
1781 (any_persistent_commands): Update command_list if
1782 is_gdb_breakpoint returns true.
1783 (set_breakpoint): Create breakpoints according to their types.
1784 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1785 (set_gdb_breakpoint_1): Likewise.
1786 (set_gdb_breakpoint): Likewise.
1787 (clear_breakpoint_conditions): Change parameter type to
1788 'struct gdb_breakpoint *'.
1789 (clear_breakpoint_commands): Likewise.
1790 (clear_breakpoint_conditions_and_commands): Likewise.
1791 (add_condition_to_breakpoint): Likewise.
1792 (add_breakpoint_condition): Likewise.
1793 (add_commands_to_breakpoint): Likewise.
1794 (check_breakpoints): Check other_breakpoint.
1795 (clone_one_breakpoint): Clone breakpopint according to its type.
1796 * mem-break.h (struct gdb_breakpoint): Declare.
1797 (set_gdb_breakpoint): Update declaration.
1798 (clear_breakpoint_conditions_and_commands): Likewise.
1799 (add_breakpoint_condition): Likewise.
1800 (add_breakpoint_commands): Likewise.
1801 * server.c (process_point_options): Change parameter type to
1802 'struct gdb_breakpoint *'.
1803
1804 2016-07-21 Yao Qi <yao.qi@linaro.org>
1805
1806 * mem-break.c (set_breakpoint_at): Rename it to ...
1807 (set_breakpoint_type_at): ... it.
1808 (set_breakpoint_at): Call set_breakpoint_type_at.
1809 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1810 * mem-break.h (set_breakpoint_at): Update comments.
1811
1812 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1813
1814 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1815 to buf parameter.
1816 (nios2_store_gregset): Likewise.
1817
1818 2016-07-01 Pedro Alves <palves@redhat.com>
1819 Antoine Tremblay <antoine.tremblay@ericsson.com>
1820
1821 * linux-low.c: Change interface to take the target lwp_info
1822 pointer directly and return void. Handle detaching from a zombie
1823 thread.
1824 (linux_detach_lwp_callback): New function.
1825 (linux_detach): Detach from the leader thread after detaching from
1826 the clone threads.
1827
1828 2016-06-28 Yao Qi <yao.qi@linaro.org>
1829
1830 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1831 for variable new_offset.
1832 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1833 (aarch64_ftrace_insn_reloc_cb): Likewise.
1834 (aarch64_ftrace_insn_reloc_tb): Likewise.
1835 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1836 PRIx64 instead of PRIx32.
1837
1838 2016-06-28 Yao Qi <yao.qi@linaro.org>
1839
1840 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1841 (the_low_target): Install arm_get_syscall_trapinfo.
1842
1843 2016-06-28 Yao Qi <yao.qi@linaro.org>
1844
1845 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1846 function.
1847 (the_low_target): Install aarch64_get_syscall_trapinfo.
1848
1849 2016-06-28 Yao Qi <yao.qi@linaro.org>
1850
1851 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1852 Callers updated.
1853 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1854 Remove parameter sysno.
1855 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1856 sysret.
1857
1858 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1859
1860 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1861 (s390_emit_ne_goto): Likewise.
1862 (s390_emit_lt_goto): Likewise.
1863 (s390_emit_le_goto): Likewise.
1864 (s390_emit_gt_goto): Likewise.
1865 (s390_emit_ge_goto): Likewise.
1866 (s390x_emit_eq_goto): Likewise.
1867 (s390x_emit_ne_goto): Likewise.
1868 (s390x_emit_lt_goto): Likewise.
1869 (s390x_emit_le_goto): Likewise.
1870 (s390x_emit_gt_goto): Likewise.
1871 (s390x_emit_ge_goto): Likewise.
1872 (s390_emit_ops_impl): Mark variable static.
1873 (s390x_emit_ops): Likewise.
1874
1875 2016-06-17 Yao Qi <yao.qi@linaro.org>
1876
1877 * linux-low.c (handle_extended_wait): Call
1878 uninsert_reinsert_breakpoints for the parent process. Remove
1879 reinsert breakpoints from the child process. Reinsert them to
1880 the parent process when vfork is done.
1881 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1882 (reinsert_reinsert_breakpoints): New function.
1883 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1884 (reinsert_reinsert_breakpoints): Declare.
1885
1886 2016-06-17 Yao Qi <yao.qi@linaro.org>
1887
1888 * linux-low.c (handle_extended_wait): If the parent is doing
1889 step-over, remove the reinsert breakpoints from the forked child.
1890
1891 2016-06-17 Yao Qi <yao.qi@linaro.org>
1892
1893 * linux-low.c (unsuspend_all_lwps): Declare.
1894 (linux_low_filter_event): If thread exited, call finish_step_over.
1895 If step-over is finished, unsuspend other threads.
1896
1897 2016-06-17 Yao Qi <yao.qi@linaro.org>
1898
1899 * linux-low.c (linux_resume_one_lwp_throw): Assert
1900 has_reinsert_breakpoints returns false.
1901 * mem-break.c (delete_disabled_breakpoints): Assert
1902 bp type isn't reinsert_breakpoint.
1903
1904 2016-06-17 Yao Qi <yao.qi@linaro.org>
1905
1906 * linux-low.c (maybe_hw_step): New function.
1907 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1908 (finish_step_over): Switch current_thread to lwp temporarily,
1909 and assert has_reinsert_breakpoints returns true.
1910 (proceed_one_lwp): Call maybe_hw_step.
1911 * mem-break.c (has_reinsert_breakpoints): New function.
1912 * mem-break.h (has_reinsert_breakpoints): Declare.
1913
1914 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1915
1916 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1917
1918 2016-05-17 Yao Qi <yao.qi@linaro.org>
1919
1920 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1921 instead of find_inferior.
1922
1923 2016-05-05 Yao Qi <yao.qi@linaro.org>
1924
1925 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1926 Initialize res to zero.
1927
1928 2016-05-05 Yao Qi <yao.qi@linaro.org>
1929
1930 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1931 to uint32_t.
1932
1933 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1934
1935 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1936 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1937 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1938
1939 2016-04-28 Par Olsson <par.olsson@windriver.com>
1940 Simon Marchi <simon.marchi@ericsson.com>
1941
1942 * tracepoint.c (write_inferior_int8): New function.
1943 (cmd_qtenable_disable): Write enable flag using
1944 write_inferior_int8.
1945
1946 2016-04-25 Yao Qi <yao.qi@linaro.org>
1947
1948 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1949 (need_step_over_p): Return zero if the LWP has pending signals
1950 can be delivered on software single step target.
1951
1952 2016-04-25 Yao Qi <yao.qi@linaro.org>
1953
1954 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1955 return instead of error.
1956
1957 2016-04-22 Yao Qi <yao.qi@linaro.org>
1958
1959 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1960 to 23.
1961
1962 2016-04-22 Yao Qi <yao.qi@linaro.org>
1963
1964 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1965 signal when stepping over breakpoint with software single
1966 step.
1967
1968 2016-04-21 Pedro Alves <palves@redhat.com>
1969
1970 * linux-s390-low.c (s390_collect_ptrace_register)
1971 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1972 add casts.
1973 (s390_check_regset): Use void * instead of gdb_byte *.
1974
1975 2016-04-20 Pedro Alves <palves@redhat.com>
1976
1977 * configure: Renegerate.
1978
1979 2016-04-20 Yao Qi <yao.qi@linaro.org>
1980
1981 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1982 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1983 number 16.
1984 (arm_store_gregset): Likewise.
1985
1986 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1987
1988 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1989 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1990 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1991 (amd64-avx-mpx-linux.c): New rules.
1992 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1993 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1994 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1995 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1996 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1997 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1998 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1999 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2000 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2001 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2002 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2003 * linux-x86-low.c (x86_linux_read_description): Add case for
2004 X86_XSTATE_AVX_MPX_MASK.
2005 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2006 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2007 init_registers_i386_avx_mpx_linux.
2008 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2009 (initialize_low_tracepoint): Call
2010 init_registers_i386_avx_mpx_linux.
2011 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2012 (initialize_low_tracepoint): Call
2013 init_registers_amd64_avx_mpx_linux.
2014 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2015 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2016 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2017 declarations.
2018
2019 2016-04-18 Pedro Alves <palves@redhat.com>
2020
2021 * configure: Regenerate.
2022
2023 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2024
2025 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2026 (aarch64_emit_sub): Likewise.
2027
2028 2016-04-12 Pedro Alves <palves@redhat.com>
2029
2030 * utils.c (prepare_to_throw_exception): Delete.
2031
2032 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2033
2034 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2035
2036 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2037
2038 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2039
2040 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2041
2042 * linux-aarch64-ipa.c: Add <elf.h> include.
2043 * linux-ppc-ipa.c: Add <elf.h> include.
2044 * linux-s390-ipa.c: Add <elf.h> include.
2045
2046 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2047
2048 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2049 (get_raw_reg_ptr): Likewise.
2050 (get_trace_state_variable_value_ptr): Likewise.
2051 (set_trace_state_variable_value_ptr): Likewise.
2052 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2053 char *.
2054
2055 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2056 Marcin Kościelnicki <koriakin@0x04.net>
2057
2058 PR/17221
2059 * linux-ppc-low.c (emit_insns): New function.
2060 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2061 (ppc_emit_prologue): New function.
2062 (ppc_emit_epilogue): New function.
2063 (ppc_emit_add): New function.
2064 (ppc_emit_sub): New function.
2065 (ppc_emit_mul): New function.
2066 (ppc_emit_lsh): New function.
2067 (ppc_emit_rsh_signed): New function.
2068 (ppc_emit_rsh_unsigned): New function.
2069 (ppc_emit_ext): New function.
2070 (ppc_emit_zero_ext): New function.
2071 (ppc_emit_log_not): New function.
2072 (ppc_emit_bit_and): New function.
2073 (ppc_emit_bit_or): New function.
2074 (ppc_emit_bit_xor): New function.
2075 (ppc_emit_bit_not): New function.
2076 (ppc_emit_equal): New function.
2077 (ppc_emit_less_signed): New function.
2078 (ppc_emit_less_unsigned): New function.
2079 (ppc_emit_ref): New function.
2080 (ppc_emit_const): New function.
2081 (ppc_emit_reg): New function.
2082 (ppc_emit_pop): New function.
2083 (ppc_emit_stack_flush): New function.
2084 (ppc_emit_swap): New function.
2085 (ppc_emit_stack_adjust): New function.
2086 (ppc_emit_call): New function.
2087 (ppc_emit_int_call_1): New function.
2088 (ppc_emit_void_call_2): New function.
2089 (ppc_emit_if_goto): New function.
2090 (ppc_emit_goto): New function.
2091 (ppc_emit_eq_goto): New function.
2092 (ppc_emit_ne_goto): New function.
2093 (ppc_emit_lt_goto): New function.
2094 (ppc_emit_le_goto): New function.
2095 (ppc_emit_gt_goto): New function.
2096 (ppc_emit_ge_goto): New function.
2097 (ppc_write_goto_address): New function.
2098 (ppc_emit_ops_impl): New static variable.
2099 (ppc64v1_emit_prologue): New function.
2100 (ppc64v2_emit_prologue): New function.
2101 (ppc64_emit_epilogue): New function.
2102 (ppc64_emit_add): New function.
2103 (ppc64_emit_sub): New function.
2104 (ppc64_emit_mul): New function.
2105 (ppc64_emit_lsh): New function.
2106 (ppc64_emit_rsh_signed): New function.
2107 (ppc64_emit_rsh_unsigned): New function.
2108 (ppc64_emit_ext): New function.
2109 (ppc64_emit_zero_ext): New function.
2110 (ppc64_emit_log_not): New function.
2111 (ppc64_emit_bit_and): New function.
2112 (ppc64_emit_bit_or): New function.
2113 (ppc64_emit_bit_xor): New function.
2114 (ppc64_emit_bit_not): New function.
2115 (ppc64_emit_equal): New function.
2116 (ppc64_emit_less_signed): New function.
2117 (ppc64_emit_less_unsigned): New function.
2118 (ppc64_emit_ref): New function.
2119 (ppc64_emit_const): New function.
2120 (ppc64v1_emit_reg): New function.
2121 (ppc64v2_emit_reg): New function.
2122 (ppc64_emit_pop): New function.
2123 (ppc64_emit_stack_flush): New function.
2124 (ppc64_emit_swap): New function.
2125 (ppc64v1_emit_call): New function.
2126 (ppc64v2_emit_call): New function.
2127 (ppc64v1_emit_int_call_1): New function.
2128 (ppc64v2_emit_int_call_1): New function.
2129 (ppc64v1_emit_void_call_2): New function.
2130 (ppc64v2_emit_void_call_2): New function.
2131 (ppc64_emit_if_goto): New function.
2132 (ppc64_emit_eq_goto): New function.
2133 (ppc64_emit_ne_goto): New function.
2134 (ppc64_emit_lt_goto): New function.
2135 (ppc64_emit_le_goto): New function.
2136 (ppc64_emit_gt_goto): New function.
2137 (ppc64_emit_ge_goto): New function.
2138 (ppc64v1_emit_ops_impl): New static variable.
2139 (ppc64v2_emit_ops_impl): New static variable.
2140 (ppc_emit_ops): New function.
2141 (linux_low_target): Wire in ppc_emit_ops.
2142
2143 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2144 Marcin Kościelnicki <koriakin@0x04.net>
2145
2146 PR/17221
2147 * Makefile.in: Add powerpc-*-ipa.o
2148 * configure.srv: Add ipa_obj for powerpc*-linux.
2149 * linux-ppc-ipa.c: New file.
2150 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2151 includes.
2152 (PPC_FIELD): New macro.
2153 (PPC_SEXT): New macro.
2154 (PPC_OP6): New macro.
2155 (PPC_BO): New macro.
2156 (PPC_LI): New macro.
2157 (PPC_BD): New macro.
2158 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2159 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2160 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2161 (ppc_get_thread_area): New function.
2162 (is_elfv2_inferior): New function.
2163 (gen_ds_form): New function.
2164 (GEN_STD): New macro.
2165 (GEN_STDU): New macro.
2166 (GEN_LD): New macro.
2167 (GEN_LDU): New macro.
2168 (gen_d_form): New function.
2169 (GEN_ADDI): New macro.
2170 (GEN_ADDIS): New macro.
2171 (GEN_LI): New macro.
2172 (GEN_LIS): New macro.
2173 (GEN_ORI): New macro.
2174 (GEN_ORIS): New macro.
2175 (GEN_LWZ): New macro.
2176 (GEN_STW): New macro.
2177 (GEN_STWU): New macro.
2178 (gen_xfx_form): New function.
2179 (GEN_MFSPR): New macro.
2180 (GEN_MTSPR): New macro.
2181 (GEN_MFCR): New macro.
2182 (GEN_MTCR): New macro.
2183 (GEN_SYNC): New macro.
2184 (GEN_LWSYNC): New macro.
2185 (gen_x_form): New function.
2186 (GEN_OR): New macro.
2187 (GEN_MR): New macro.
2188 (GEN_LWARX): New macro.
2189 (GEN_STWCX): New macro.
2190 (GEN_CMPW): New macro.
2191 (gen_md_form): New function.
2192 (GEN_RLDICL): New macro.
2193 (GEN_RLDICR): New macro.
2194 (gen_i_form): New function.
2195 (GEN_B): New macro.
2196 (GEN_BL): New macro.
2197 (gen_b_form): New function.
2198 (GEN_BNE): New macro.
2199 (GEN_LOAD): New macro.
2200 (GEN_STORE): New macro.
2201 (gen_limm): New function.
2202 (gen_atomic_xchg): New function.
2203 (gen_call): New function.
2204 (ppc_relocate_instruction): New function.
2205 (ppc_install_fast_tracepoint_jump_pad): New function.
2206 (ppc_get_min_fast_tracepoint_insn_len): New function.
2207 (ppc_get_ipa_tdesc_idx): New function.
2208 (the_low_target): Wire in the new functions.
2209 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2210 tdescs.
2211 * linux-ppc-tdesc.h: New file.
2212
2213 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2214
2215 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2216 (alloc_jump_pad_buffer): New function.
2217 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2218 (alloc_jump_pad_buffer): New function.
2219 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2220 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2221 (alloc_jump_pad_buffer): New function.
2222 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2223 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2224 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2225 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2226
2227 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2228
2229 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2230 * linux-amd64-ipa.c: Likewise.
2231 * linux-i386-ipa.c: Likewise.
2232 * linux-s390-ipa.c: Likewise.
2233 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2234 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2235 set_trace_state_variable_value_ptr.
2236 (struct ipa_sym_addresses): Likewise.
2237 (symbol_list): Likewise.
2238 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2239 accessing gdb_collect directly.
2240 (gdb_collect_ptr_type): New typedef.
2241 (get_raw_reg_ptr_type): New typedef.
2242 (get_trace_state_variable_value_ptr_type): New typedef.
2243 (set_trace_state_variable_value_ptr_type): New typedef.
2244 (gdb_collect_ptr): New global.
2245 (get_raw_reg_ptr): New global.
2246 (get_trace_state_variable_value_ptr): New global.
2247 (set_trace_state_variable_value_ptr): New global.
2248 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2249 accessing get_raw_reg directly.
2250 (get_get_tsv_func_addr): Likewise for
2251 get_trace_state_variable_value_ptr.
2252 (get_set_tsv_func_addr): Likewise for
2253 set_trace_state_variable_value_ptr.
2254 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2255
2256 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2257
2258 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2259
2260 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2261
2262 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2263 packets.
2264 (relocate_instruction): Remove own_buf.
2265 * server.c (own_buf): Make global.
2266 (handle_v_requests): Make global.
2267 * server.h (own_buf): New declaration.
2268 (handle_v_requests): New prototype.
2269
2270 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2271
2272 PR 18377
2273 * linux-s390-low.c (add_insns): New function.
2274 (s390_emit_prologue): New function.
2275 (s390_emit_epilogue): New function.
2276 (s390_emit_add): New function.
2277 (s390_emit_sub): New function.
2278 (s390_emit_mul): New function.
2279 (s390_emit_lsh): New function.
2280 (s390_emit_rsh_signed): New function.
2281 (s390_emit_rsh_unsigned): New function.
2282 (s390_emit_ext): New function.
2283 (s390_emit_log_not): New function.
2284 (s390_emit_bit_and): New function.
2285 (s390_emit_bit_or): New function.
2286 (s390_emit_bit_xor): New function.
2287 (s390_emit_bit_not): New function.
2288 (s390_emit_equal): New function.
2289 (s390_emit_less_signed): New function.
2290 (s390_emit_less_unsigned): New function.
2291 (s390_emit_ref): New function.
2292 (s390_emit_if_goto): New function.
2293 (s390_emit_goto): New function.
2294 (s390_write_goto_address): New function.
2295 (s390_emit_litpool): New function.
2296 (s390_emit_const): New function.
2297 (s390_emit_call): New function.
2298 (s390_emit_reg): New function.
2299 (s390_emit_pop): New function.
2300 (s390_emit_stack_flush): New function.
2301 (s390_emit_zero_ext): New function.
2302 (s390_emit_swap): New function.
2303 (s390_emit_stack_adjust): New function.
2304 (s390_emit_set_r2): New function.
2305 (s390_emit_int_call_1): New function.
2306 (s390_emit_void_call_2): New function.
2307 (s390_emit_eq_goto): New function.
2308 (s390_emit_ne_goto): New function.
2309 (s390_emit_lt_goto): New function.
2310 (s390_emit_le_goto): New function.
2311 (s390_emit_gt_goto): New function.
2312 (s390_emit_ge_goto): New function.
2313 (s390x_emit_prologue): New function.
2314 (s390x_emit_epilogue): New function.
2315 (s390x_emit_add): New function.
2316 (s390x_emit_sub): New function.
2317 (s390x_emit_mul): New function.
2318 (s390x_emit_lsh): New function.
2319 (s390x_emit_rsh_signed): New function.
2320 (s390x_emit_rsh_unsigned): New function.
2321 (s390x_emit_ext): New function.
2322 (s390x_emit_log_not): New function.
2323 (s390x_emit_bit_and): New function.
2324 (s390x_emit_bit_or): New function.
2325 (s390x_emit_bit_xor): New function.
2326 (s390x_emit_bit_not): New function.
2327 (s390x_emit_equal): New function.
2328 (s390x_emit_less_signed): New function.
2329 (s390x_emit_less_unsigned): New function.
2330 (s390x_emit_ref): New function.
2331 (s390x_emit_if_goto): New function.
2332 (s390x_emit_const): New function.
2333 (s390x_emit_call): New function.
2334 (s390x_emit_reg): New function.
2335 (s390x_emit_pop): New function.
2336 (s390x_emit_stack_flush): New function.
2337 (s390x_emit_zero_ext): New function.
2338 (s390x_emit_swap): New function.
2339 (s390x_emit_stack_adjust): New function.
2340 (s390x_emit_int_call_1): New function.
2341 (s390x_emit_void_call_2): New function.
2342 (s390x_emit_eq_goto): New function.
2343 (s390x_emit_ne_goto): New function.
2344 (s390x_emit_lt_goto): New function.
2345 (s390x_emit_le_goto): New function.
2346 (s390x_emit_gt_goto): New function.
2347 (s390x_emit_ge_goto): New function.
2348 (s390_emit_ops): New function.
2349 (struct linux_target_ops): Fill in emit_ops hook.
2350
2351 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2352
2353 PR 18377
2354 * Makefile.in: Add s390 IPA files.
2355 * configure.srv: Build IPA for s390.
2356 * linux-s390-ipa.c: New file.
2357 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2358 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2359 (tdesc_s390_linux32): Likewise.
2360 (init_registers_s390_linux32v1): Likewise.
2361 (tdesc_s390_linux32v1): Likewise.
2362 (init_registers_s390_linux32v2): Likewise.
2363 (tdesc_s390_linux32v2): Likewise.
2364 (init_registers_s390_linux64): Likewise.
2365 (tdesc_s390_linux64): Likewise.
2366 (init_registers_s390_linux64v1): Likewise.
2367 (tdesc_s390_linux64v1): Likewise.
2368 (init_registers_s390_linux64v2): Likewise.
2369 (tdesc_s390_linux64v2): Likewise.
2370 (init_registers_s390_te_linux64): Likewise.
2371 (tdesc_s390_te_linux64): Likewise.
2372 (init_registers_s390_vx_linux64): Likewise.
2373 (tdesc_s390_vx_linux64): Likewise.
2374 (init_registers_s390_tevx_linux64): Likewise.
2375 (tdesc_s390_tevx_linux64): Likewise.
2376 (init_registers_s390x_linux64): Likewise.
2377 (tdesc_s390x_linux64): Likewise.
2378 (init_registers_s390x_linux64v1): Likewise.
2379 (tdesc_s390x_linux64v1): Likewise.
2380 (init_registers_s390x_linux64v2): Likewise.
2381 (tdesc_s390x_linux64v2): Likewise.
2382 (init_registers_s390x_te_linux64): Likewise.
2383 (tdesc_s390x_te_linux64): Likewise.
2384 (init_registers_s390x_vx_linux64): Likewise.
2385 (tdesc_s390x_vx_linux64): Likewise.
2386 (init_registers_s390x_tevx_linux64): Likewise.
2387 (tdesc_s390x_tevx_linux64): Likewise.
2388 (have_hwcap_s390_vx): New static variable.
2389 (s390_arch_setup): Fill have_hwcap_s390_vx.
2390 (s390_get_thread_area): New function.
2391 (s390_ft_entry_gpr_esa): New const.
2392 (s390_ft_entry_gpr_zarch): New const.
2393 (s390_ft_entry_misc): New const.
2394 (s390_ft_entry_fr): New const.
2395 (s390_ft_entry_vr): New const.
2396 (s390_ft_main_31): New const.
2397 (s390_ft_main_64): New const.
2398 (s390_ft_exit_fr): New const.
2399 (s390_ft_exit_vr): New const.
2400 (s390_ft_exit_misc): New const.
2401 (s390_ft_exit_gpr_esa): New const.
2402 (s390_ft_exit_gpr_zarch): New const.
2403 (append_insns): New function.
2404 (s390_relocate_instruction): New function.
2405 (s390_install_fast_tracepoint_jump_pad): New function.
2406 (s390_get_min_fast_tracepoint_insn_len): New function.
2407 (s390_get_ipa_tdesc_idx): New function.
2408 (struct linux_target_ops): Wire in the above functions.
2409 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2410 * linux-s390-tdesc.h: New file.
2411
2412 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2413
2414 * linux-s390-low.c (s390_supports_tracepoints): New function.
2415 (struct linux_target_ops): Fill supports_tracepoints hook.
2416
2417 2016-03-18 Yao Qi <yao.qi@linaro.org>
2418
2419 * linux-low.c (lwp_signal_can_be_delivered): New function.
2420 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2421
2422 2016-03-18 Yao Qi <yao.qi@linaro.org>
2423
2424 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2425 0 if signal is enqueued. Remove 'signal' from one debugging
2426 message. Move one debugging message to some lines below.
2427 Remove code setting 'signal' to 0.
2428
2429 2016-03-18 Yao Qi <yao.qi@linaro.org>
2430
2431 * linux-low.c (linux_low_filter_event): Remove redundant
2432 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2433
2434 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2435
2436 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2437 (struct linux_target_ops): Wire in the above.
2438
2439 2016-03-03 Yao Qi <yao.qi@linaro.org>
2440
2441 * linux-low.c: Update comments to start_step_over.
2442
2443 2016-03-03 Yao Qi <yao.qi@linaro.org>
2444
2445 PR server/19736
2446 * linux-low.c (handle_extended_wait): Set child suspended
2447 if event_lwp->bp_reinsert isn't zero.
2448
2449 2016-03-02 Yao Qi <yao.qi@linaro.org>
2450
2451 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2452 enqueue_pending_signal.
2453
2454 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2455
2456 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2457 is actually loaded.
2458
2459 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2460
2461 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2462 (s390_regmap_3264) [!__s390x__]: New global.
2463 (s390_collect_ptrace_register): Skip map entries containing -1.
2464 (s390_supply_ptrace_register): Ditto.
2465 (s390_fill_gprs_high): New function.
2466 (s390_store_gprs_high): New function.
2467 (s390_regsets): Add NT_S390_HIGH_GPRS.
2468 (s390_get_hwcap): Enable on 31-bit.
2469 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2470 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2471 Detect NT_S390_HIGH_GPRS.
2472 (s390_usrregs_info_3264): Enable on 31-bit.
2473 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2474 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2475
2476 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2477
2478 PR gdb/13808
2479 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2480 * configure.srv: Ditto.
2481 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2482 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2483 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2484 (init_registers_amd64_linux): Remove prototype.
2485 (tdesc_amd64_linux): Remove declaration.
2486 (get_ipa_tdesc): New function.
2487 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2488 initialize remaining tdescs.
2489 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2490 (init_registers_i386_linux): Remove prototype.
2491 (tdesc_i386_linux): Remove declaration.
2492 (get_ipa_tdesc): New function.
2493 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2494 initialize remaining tdescs.
2495 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2496 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2497 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2498 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2499 (x86_get_ipa_tdesc_idx): New function.
2500 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2501 * linux-x86-tdesc.h: New file.
2502 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2503 (target_get_ipa_tdesc_idx): New macro.
2504 * tracepoint.c (ipa_tdesc_idx): New macro.
2505 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2506 (symbol_list): Add ipa_tdesc_idx.
2507 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2508 (ipa_tdesc): Remove.
2509 (ipa_tdesc_idx): New variable.
2510 (get_context_regcache): Use get_ipa_tdesc.
2511 (gdb_collect): Ditto.
2512 (gdb_probe): Ditto.
2513 * tracepoint.h (get_ipa_tdesc): New prototype.
2514 (ipa_tdesc): Remove.
2515
2516 2016-02-24 Pedro Alves <palves@redhat.com>
2517
2518 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2519 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2520 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2521 Factor out common code between the USE_SIGTRAP_SIGINFO and
2522 !USE_SIGTRAP_SIGINFO blocks.
2523 (linux_low_filter_event): Call save_stop_reason instead of
2524 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2525 Update comments.
2526 (linux_wait_1): Update comments.
2527
2528 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2529
2530 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2531 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2532 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2533 ppc_insert_point, ppc_remove_point.
2534
2535 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2536
2537 * linux-s390-low.c (s390_supports_z_point_type): New function.
2538 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2539
2540 2016-02-16 Yao Qi <yao.qi@linaro.org>
2541
2542 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2543 PC. Get pc from regcache_read_pc.
2544
2545 2016-02-12 Yao Qi <yao.qi@linaro.org>
2546
2547 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2548 or linux_get_pc_32bit.
2549 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2550
2551 2016-02-12 Yao Qi <yao.qi@linaro.org>
2552
2553 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2554 arm_linux_get_next_pcs_fixup.
2555
2556 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2557
2558 * tracepoint.c (x_tracepoint_action_download): Change
2559 write_inferior_data_ptr to write_inferior_data_pointer.
2560 (cmd_qtstart): Likewise.
2561 (write_inferior_data_ptr): Remove.
2562 (download_agent_expr): Change write_inferior_data_ptr to
2563 write_inferior_data_pointer.
2564 (download_tracepoint_1): Likewise.
2565 (download_tracepoint): Likewise.
2566 (download_trace_state_variables): Likewise.
2567
2568 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2569 Marcin Kościelnicki <koriakin@0x04.net>
2570
2571 * tracepoint.c (struct tracepoint_action_ops): Remove.
2572 (struct tracepoint_action): Remove ops.
2573 (m_tracepoint_action_download, r_tracepoint_action_download)
2574 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2575 size and offset accordingly.
2576 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2577 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2578 (tracepoint_action_send, tracepoint_action_download): New functions.
2579 Helpers for trace action handlers.
2580 (add_tracepoint_action): Remove setup actions ops.
2581 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2582
2583 2016-02-10 Yao Qi <yao.qi@linaro.org>
2584
2585 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2586
2587 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2588
2589 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2590 to AC_OUTPUT.
2591 * configure: Regenerate.
2592
2593 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2594
2595 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2596 void * to gdb_byte *.
2597 * linux-low.c (siginfo_fixup): Likewise.
2598 (linux_xfer_siginfo): Likewise.
2599 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2600 Likewise.
2601 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2602
2603 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2604
2605 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2606 to srv_tgtobj.
2607 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2608 to srv_tgtobj.
2609 * linux-x86-low.c [__x86_64__]: Include
2610 "nat/amd64-linux-siginfo.h".
2611 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2612 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2613 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2614 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2615 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2616 (cpt_si_fd, si_timerid, si_overrun): Move from
2617 nat/amd64-linux-siginfo.c.
2618 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2619
2620 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2621
2622 * server.c (skip_to_semicolon): Remove.
2623 (process_point_options): Use strchrnul instead of
2624 skip_to_semicolon.
2625
2626 2016-01-26 Yao Qi <yao.qi@linaro.org>
2627
2628 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2629 * linux-low.c (install_software_single_step_breakpoints): Don't
2630 call regcache_read_pc.
2631 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2632 argument pc.
2633
2634 2016-01-26 Yao Qi <yao.qi@linaro.org>
2635
2636 * linux-low.c (install_software_single_step_breakpoints): Call
2637 regcache_read_pc instead of get_pc.
2638
2639 2016-01-26 Yao Qi <yao.qi@linaro.org>
2640
2641 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2642 (unblock_async_io): Rename to ...
2643 (block_unblock_async_io): ... it. New function.
2644 (enable_async_io): Don't install SIGIO handler. Unblock it
2645 instead.
2646 (disable_async_io): Don't ignore SIGIO. Block it instead.
2647 (initialize_async_io): Install SIGIO handler. Don't call
2648 unblock_async_io.
2649
2650 2016-01-26 Yao Qi <yao.qi@linaro.org>
2651
2652 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2653 first character is '\003', call *the_target->request_interrupt.
2654
2655 2016-01-25 Yao Qi <yao.qi@linaro.org>
2656
2657 * remote-utils.c (new_thread_notify): Remove.
2658 (dead_thread_notify): Likewise.
2659 * remote-utils.h (new_thread_notify): Remove declaration.
2660 (dead_thread_notify): Likewise.
2661
2662 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2663
2664 * gdb.trace/pending.exp: Fix expected message on continue.
2665
2666 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2667
2668 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2669 it works properly on big-endian machines where sizeof (CORE_ADDR)
2670 != sizeof (void *).
2671
2672 2016-01-21 Pedro Alves <palves@redhat.com>
2673
2674 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2675 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2676 * configure: Regenerate.
2677
2678 2016-01-21 Yao Qi <yao.qi@linaro.org>
2679
2680 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2681 is_thumb and set it according to CPSR saved on the stack.
2682 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2683 arm_sigreturn_next_pc.
2684
2685 2016-01-18 Yao Qi <yao.qi@linaro.org>
2686
2687 * linux-low.c (linux_set_pc_64bit): New function.
2688 (linux_get_pc_64bit): New function.
2689 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2690 Declare.
2691 * linux-sparc-low.c (debug_threads): Remove declaration.
2692 (sparc_get_pc): Remove.
2693 (the_low_target): Use linux_get_pc_64bit instead of
2694 sparc_get_pc.
2695 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2696 (the_low_target): Use linux_get_pc_64bit and
2697 linux_set_pc_64bit.
2698
2699 2016-01-18 Yao Qi <yao.qi@linaro.org>
2700
2701 * linux-arm-low.c (debug_threads): Remove declaration.
2702 (arm_get_pc, arm_set_pc): Remove.
2703 (the_low_target): Use linux_get_pc_32bit and
2704 linux_set_pc_32bit.
2705 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2706 (the_low_target): Use linux_get_pc_32bit and
2707 linux_set_pc_32bit.
2708 * linux-cris-low.c (debug_threads): Remove declaration.
2709 (cris_get_pc, cris_set_pc,): Remove.
2710 (the_low_target): Use linux_get_pc_32bit and
2711 linux_set_pc_32bit.
2712 * linux-crisv32-low.c (debug_threads): Remove declaration.
2713 (cris_get_pc, cris_set_pc): Remove.
2714 (the_low_target): Use linux_get_pc_32bit and
2715 linux_set_pc_32bit.
2716 * linux-low.c: Include inttypes.h.
2717 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2718 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2719 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2720 (the_low_target): Use linux_get_pc_32bit and
2721 linux_set_pc_32bit.
2722 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2723 (the_low_target): Use linux_get_pc_32bit and
2724 linux_set_pc_32bit.
2725 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2726 (the_low_target): Use linux_get_pc_32bit and
2727 linux_set_pc_32bit.
2728 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2729 (the_low_target): Use linux_get_pc_32bit and
2730 linux_set_pc_32bit.
2731 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2732 (the_low_target): Use linux_get_pc_32bit and
2733 linux_set_pc_32bit.
2734
2735 2016-01-18 Gary Benson <gbenson@redhat.com>
2736
2737 * configure.ac (AC_FUNC_FORK): New check.
2738 * config.in: Regenerate.
2739 * configure: Likewise.
2740
2741 2016-01-14 Yao Qi <yao.qi@linaro.org>
2742
2743 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2744 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2745 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2746 arm_get_next_pcs_ctor.
2747
2748 2016-01-12 Josh Stone <jistone@redhat.com>
2749 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2750
2751 * inferiors.h: Include "gdb_vecs.h".
2752 (struct process_info): Add syscalls_to_catch.
2753 * inferiors.c (remove_process): Free syscalls_to_catch.
2754 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2755 syscall_return stops.
2756 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2757 * server.c (handle_general_set): Handle QCatchSyscalls.
2758 (handle_query): Report support for QCatchSyscalls.
2759 * target.h (struct target_ops): Add supports_catch_syscall.
2760 (target_supports_catch_syscall): New macro.
2761 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2762 (struct lwp_info): Add syscall_state.
2763 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2764 Maintain syscall_state and syscalls_to_catch across exec.
2765 (get_syscall_trapinfo): New function, proxy to the_low_target.
2766 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2767 (linux_low_filter_event): Toggle syscall_state entry/return for
2768 syscall traps, and set it ignored for all others.
2769 (gdb_catching_syscalls_p): New function.
2770 (gdb_catch_this_syscall_p): New function.
2771 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2772 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2773 (linux_supports_catch_syscall): New function.
2774 (linux_target_ops): Install it.
2775 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2776 (the_low_target): Install it.
2777
2778 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2779
2780 * acinclude.m4: Include new ../warning.m4 file.
2781 * configure: Regenerated.
2782 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2783
2784 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2785
2786 * ax.c (is_goto_target): Mark static.
2787 * linux-low.c (register_addr): Likewise.
2788 (linux_fetch_registers, linux_store_registers): Likewise.
2789 * mem-break.c (any_persistent_commands): Fix old prototype.
2790 (add_commands_to_breakpoint): Mark static.
2791 * regcache.c (find_register_by_name): Delete unused func.
2792 * remote-utils.c (hex_or_minus_one): Mark static.
2793 * server.c (monitor_show_help): Mark static.
2794 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2795 handle_v_requests): Likewise.
2796
2797 2016-01-12 Pedro Alves <palves@redhat.com>
2798
2799 Remove use of the registered trademark symbol throughout.
2800
2801 2016-01-08 Yao Qi <yao.qi@linaro.org>
2802
2803 * remote-utils.c (getpkt): If c is '\003', call target hook
2804 request_interrupt.
2805
2806 2016-01-06 Yao Qi <yao.qi@linaro.org>
2807
2808 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2809 linux-aarch32-low.c.
2810 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2811 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2812 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2813 (thumb2_breakpoint): Declare.
2814 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2815 linux-aarch32-low.h.
2816 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2817 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2818 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2819
2820 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2821
2822 * gdbreplay.c (gdbreplay_version): Change copyright year in
2823 version message.
2824 * server.c (gdbserver_version): Likewise.
2825
2826 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2827
2828 * server.c (crc32_table): Delete.
2829 (crc32): Use libiberty's xcrc32 function.
2830
2831 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2832
2833 * lynx-low.c (lynx_delete_thread_callback): New function.
2834 (lynx_mourn): Properly delete our process and all of its
2835 threads. Remove call to clear_inferiors.
2836
2837 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2838
2839 * target.c (thread_search_callback): Add check that
2840 the thread_stopped target callback is not NULL before
2841 calling it.
2842
2843 2015-12-21 Yao Qi <yao.qi@linaro.org>
2844
2845 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2846 arm breakpoint.
2847
2848 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2849
2850 * server.c (handle_query): Call target_supports_software_single_step.
2851
2852 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2853
2854 * linux-low.c (single_step): New function.
2855 (linux_resume_one_lwp_throw): Call single_step.
2856 (start_step_over): Likewise.
2857
2858 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2859
2860 * Makefile.in (SFILES): Append arch/arm-linux.c,
2861 arch/arm-get-next-pcs.c.
2862 (arm-linux.o): New rule.
2863 (arm-get-next-pcs.o): New rule.
2864 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2865 arm-linux.o.
2866 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2867 to linux-aarch32-low.c.
2868 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2869 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2870 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2871 (thumb2_breakpoint_len): Likewise.
2872 (arm_is_thumb_mode): Make non-static.
2873 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2874 from linux-aarch32-low.c.
2875 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2876 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2877 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2878 (thumb2_breakpoint_len): Likewise.
2879 (arm_is_thumb_mode): New declaration.
2880 * linux-arm-low.c: Include arch/arm-linux.h
2881 aarch/arm-get-next-pcs.h, sys/syscall.h.
2882 (get_next_pcs_ops): New struct.
2883 (get_next_pcs_addr_bits_remove): New function.
2884 (get_next_pcs_is_thumb): New function.
2885 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2886 (arm_sigreturn_next_pc): Likewise.
2887 (get_next_pcs_syscall_next_pc): Likewise.
2888 (arm_gdbserver_get_next_pcs): Likewise.
2889 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2890 Initialize.
2891 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2892 * server.h: Include gdb_vecs.h.
2893
2894 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2895
2896 * Makefile.in (SFILES): Append common/common-regcache.c.
2897 (OBS): Append common-regcache.o.
2898 (common-regcache.o): New rule.
2899 * regcache.c (init_register_cache): Initialize cache to
2900 REG_UNAVAILABLE.
2901 (regcache_raw_read_unsigned): New function.
2902 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2903 register_status enum.
2904
2905 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2906
2907 * linux-aarch64-low.c (the_low_targets): Rename
2908 breakpoint_reinsert_addr to get_next_pcs.
2909 * linux-arm-low.c (the_low_targets): Likewise.
2910 * linux-bfin-low.c (the_low_targets): Likewise.
2911 * linux-cris-low.c (the_low_targets): Likewise.
2912 * linux-crisv32-low.c (the_low_targets): Likewise.
2913 * linux-low.c (can_software_single_step): Likewise.
2914 (install_software_single_step_breakpoints): New function.
2915 (start_step_over): Use install_software_single_step_breakpoints.
2916 * linux-low.h: New CORE_ADDR vector.
2917 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2918 get_next_pcs.
2919 * linux-mips-low.c (the_low_targets): Likewise.
2920 * linux-nios2-low.c (the_low_targets): Likewise.
2921 * linux-sparc-low.c (the_low_targets): Likewise.
2922
2923 2015-12-17 Pedro Alves <palves@redhat.com>
2924
2925 * linux-low.c (linux_kill_one_lwp): Remove references to
2926 LinuxThreads.
2927 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2928 to 'kill'.
2929 (linux_init_signals): Delete.
2930 (initialize_low): Adjust.
2931 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2932
2933 2015-12-16 Pedro Alves <palves@redhat.com>
2934
2935 * configure.ac (compiler warning flags): When testing a
2936 -Wno-foo option, check whether -Wfoo works instead.
2937 * configure: Regenerate.
2938
2939 2015-12-11 Don Breazeal <donb@codesourcery.com>
2940
2941 * server.c (process_serial_event): Don't exit from gdbserver
2942 in remote mode if there are still active inferiors.
2943
2944 2015-12-11 Yao Qi <yao.qi@linaro.org>
2945
2946 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2947 arm_breakpoint_at if the process is 32-bit.
2948
2949 2015-12-11 Yao Qi <yao.qi@linaro.org>
2950
2951 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2952 arm breakpoint.
2953
2954 2015-12-07 Yao Qi <yao.qi@linaro.org>
2955
2956 * configure.srv: Append arm.o to srv_tgtobj for
2957 aarch64*-*-linux* target.
2958 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2959 from linux-arm-low.c.
2960 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2961 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2962 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2963 (thumb2_breakpoint_len): Likewise.
2964 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2965 (arm_breakpoint_kinds): Likewise.
2966 (arm_breakpoint_kind_from_pc): Likewise.
2967 (arm_sw_breakpoint_from_kind): Likewise.
2968 (arm_breakpoint_kind_from_current_state): Likewise.
2969 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2970 (arm_sw_breakpoint_from_kind): Declare.
2971 (arm_breakpoint_kind_from_current_state): Declare.
2972 (arm_breakpoint_at): Declare.
2973 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2974 arm_sw_breakpoint_from_kind if process is 32-bit.
2975 (aarch64_breakpoint_kind_from_pc): New function.
2976 (aarch64_breakpoint_kind_from_current_state): New function.
2977 (the_low_target): Initialize fields breakpoint_kind_from_pc
2978 and breakpoint_kind_from_current_state.
2979 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2980 linux-aarch32-low.c.
2981 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2982 (arm_breakpoint, arm_breakpoint_len): Likewise.
2983 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2984 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2985 (arm_is_thumb_mode): Likewise.
2986 (arm_breakpoint_at): Likewise.
2987 (arm_breakpoint_kind_from_pc): Likewise.
2988 (arm_sw_breakpoint_from_kind): Likewise.
2989 (arm_breakpoint_kind_from_current_state): Likewise.
2990
2991 Revert:
2992 2015-08-04 Yao Qi <yao.qi@linaro.org>
2993
2994 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2995 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2996 * server.c (extended_protocol): Remove "static".
2997 * server.h (extended_protocol): Declare it.
2998
2999 2015-12-04 Josh Stone <jistone@redhat.com>
3000
3001 * target.h (struct target_ops) <arch_setup>: Rename to ...
3002 (struct target_ops) <post_create_inferior>: ... this.
3003 (target_arch_setup): Rename to ...
3004 (target_post_create_inferior): ... this, calling post_create_inferior.
3005 * server.c (start_inferior): Update target_arch_setup calls to
3006 target_post_create_inferior.
3007 * linux-low.c (linux_low_ptrace_options): Forward declare.
3008 (linux_arch_setup): Update its comment for general use.
3009 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3010 (struct linux_target_ops): Use linux_post_create_inferior.
3011 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3012 to post_create_inferior.
3013 * nto-low.c (struct nto_target_ops): Likewise.
3014 * spu-low.c (struct spu_target_ops): Likewise.
3015 * win32-low.c (struct win32_target_ops): Likewise.
3016
3017 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3018
3019 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3020
3021 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3022
3023 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3024 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3025 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3026 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3027 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3028 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3029 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3030 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3031 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3032 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3033 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3034 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3035
3036 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3037
3038 * linux-low.c (linux_look_up_symbols): Don't call
3039 linux_supports_traceclone.
3040 * linux-low.h (thread_db_init): Remove use_events argument.
3041 * thread-db.c (thread_db_use_event): Remove global variable.
3042 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3043 (struct thread_db) <td_create_bp>: Remove field.
3044 (thread_db_create_event): Remove function.
3045 (thread_db_enable_reporting): Likewise.
3046 (find_one_thread): Don't check for thread_db_use_events.
3047 (attach_thread): Likewise.
3048 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3049 (try_thread_db_load_1): Don't check for thread_db_use_events.
3050 (thread_db_init): Remove use_events argument and thread events
3051 handling.
3052 (remove_thread_event_breakpoints): Remove function.
3053 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3054
3055 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3056
3057 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3058 New function.
3059 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3060 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3061 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3062 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3063 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3064 Initialize.
3065 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3066 New function.
3067 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3068 * linux-low.c (can_hardware_single_step): Use
3069 supports_hardware_single_step.
3070 (can_software_single_step): New function.
3071 (start_step_over): Call can_software_single_step.
3072 (linux_supports_hardware_single_step): New function.
3073 (struct target_ops) <supports_software_single_step>: Initialize.
3074 * linux-low.h (struct linux_target_ops)
3075 <supports_hardware_single_step>: Initialize.
3076 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3077 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3078 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3079 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3080 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3081 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3082 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3083 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3084 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3085 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3086 Initialize.
3087 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3088 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3089 Initialize.
3090 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3091 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3092 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3093 New function.
3094 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3095 * target.h (struct target_ops): <supports_software_single_step>:
3096 New field.
3097 (target_supports_software_single_step): New macro.
3098
3099 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3100
3101 * linux-low.c (linux_wait_1): Fix pc advance condition.
3102 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3103 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3104
3105 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3106
3107 * linux-arm-low.c (arm_is_thumb_mode): New function.
3108 (arm_breakpoint_at): Use arm_is_thumb_mode.
3109 (arm_breakpoint_kind_from_current_state): New function.
3110 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3111 Initialize.
3112 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3113 (linux_breakpoint_kind_from_current_state): New function.
3114 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3115 * linux-low.h (struct linux_target_ops)
3116 <breakpoint_kind_from_current_state>: New field.
3117 * target.h (struct target_ops): Likewise.
3118 (target_breakpoint_kind_from_current_state): New macro.
3119
3120 2015-11-30 Pedro Alves <palves@redhat.com>
3121
3122 * linux-low.c (linux_resume): Wake up the event loop before
3123 returning.
3124
3125 2015-11-30 Pedro Alves <palves@redhat.com>
3126
3127 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3128 check.
3129 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3130 to -1.
3131 * target.c (struct thread_search): New structure.
3132 (thread_search_callback): New function.
3133 (prev_general_thread): New global.
3134 (prepare_to_access_memory, done_accessing_memory): New functions.
3135 * target.h (prepare_to_access_memory, done_accessing_memory):
3136 Replace macros with function declarations.
3137
3138 2015-11-30 Pedro Alves <palves@redhat.com>
3139
3140 PR 14618
3141 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3142 report TARGET_WAITKIND_NO_RESUMED.
3143 * remote-utils.c (prepare_resume_reply): Handle
3144 TARGET_WAITKIND_NO_RESUMED.
3145 * server.c (report_no_resumed): New global.
3146 (handle_query) <qSupported>: Handle "no-resumed+". Report
3147 "no-resumed+" support.
3148 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3149 return error if the client doesn't support no-resumed events.
3150 (push_stop_notification): New function.
3151 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3152 events if the client supports them.
3153
3154 2015-11-30 Pedro Alves <palves@redhat.com>
3155
3156 * linux-low.c (thread_still_has_status_pending_p): Don't check
3157 vCont;t here.
3158 (lwp_resumed): New function.
3159 (status_pending_p_callback): Return early if the LWP is not
3160 supposed to be resumed.
3161
3162 2015-11-30 Pedro Alves <palves@redhat.com>
3163
3164 * linux-low.c (handle_extended_wait): Assert that the LWP's
3165 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3166 thread create events, leave the new child's status pending.
3167 (linux_low_filter_event): If GDB wants to hear about thread exit
3168 events, leave the LWP marked dead and don't delete it.
3169 (linux_wait_for_event_filtered): Don't check for thread exit.
3170 (filter_exit_event): New function.
3171 (linux_wait_1): Use it, when returning an exit event.
3172 (linux_resume_one_lwp_throw): Assert that the LWP's
3173 waitstatus is TARGET_WAITKIND_IGNORE.
3174 * remote-utils.c (prepare_resume_reply): Handle
3175 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3176 * server.c (report_thread_events): New global.
3177 (handle_general_set): Handle QThreadEvents.
3178 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3179 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3180 TARGET_WAITKIND_THREAD_EXITED.
3181 * server.h (report_thread_events): Declare.
3182
3183 2015-11-30 Pedro Alves <palves@redhat.com>
3184
3185 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3186 the thread's last_resume_kind was resume_stop.
3187
3188 2015-11-30 Pedro Alves <palves@redhat.com>
3189
3190 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3191 before returning.
3192
3193 2015-11-30 Pedro Alves <palves@redhat.com>
3194
3195 * server.c (handle_v_requests): Handle vCtrlC.
3196
3197 2015-11-30 Pedro Alves <palves@redhat.com>
3198
3199 * gdbthread.h (find_any_thread_of_pid): Declare.
3200 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3201 functions.
3202 * server.c (handle_query): If current_thread is NULL, look for
3203 another thread of the selected process.
3204
3205 2015-11-26 Daniel Colascione <dancol@dancol.org>
3206 Simon Marchi <simon.marchi@ericsson.com>
3207
3208 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3209 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3210 name in reply.
3211 * target.h (struct target_ops) <thread_name>: New field.
3212 (target_thread_name): New macro.
3213
3214 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3215
3216 * regcache.h (regcache_invalidate_pid): Add declaration.
3217 * regcache.c (regcache_invalidate_pid): New function, extracted
3218 from regcache_invalidate.
3219 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3220 Add trivial documentation comment.
3221 * lynx-low.c: Use regcache_invalidate_pid instead of
3222 regcache_invalidate.
3223
3224 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3225
3226 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3227 and Elf64_auxv_t if the target is Android.
3228
3229 2015-11-22 Doug Evans <xdje42@gmail.com>
3230
3231 * target.h: #include <sys/types.h>.
3232
3233 2015-11-19 Pedro Alves <palves@redhat.com>
3234
3235 * linux-low.c (linux_process_qsupported): Change prototype.
3236 Adjust.
3237 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3238 Change prototype.
3239 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3240 and adjust to loop over all features.
3241 * server.c (handle_query) <qSupported>: Adjust to call
3242 target_process_qsupported once, passing it a vector of unprocessed
3243 features.
3244 * target.h (struct target_ops) <process_qsupported>: Change
3245 prototype.
3246 (target_process_qsupported): Adjust.
3247
3248 2015-11-19 Pedro Alves <palves@redhat.com>
3249
3250 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3251 mode.
3252 * configure: Regenerate.
3253
3254 2015-11-19 Pedro Alves <palves@redhat.com>
3255
3256 * configure: Regenerate.
3257
3258 2015-11-19 Yao Qi <yao.qi@linaro.org>
3259
3260 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3261 type to uint32_t.
3262
3263 2015-11-19 Yao Qi <yao.qi@linaro.org>
3264
3265 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3266 (struct aarch64_operand): Move enum out.
3267
3268 2015-11-19 Yao Qi <yao.qi@linaro.org>
3269
3270 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3271 struct user_fpsimd_state *.
3272 (aarch64_store_fpregset): Likewise.
3273
3274 2015-11-19 Yao Qi <yao.qi@linaro.org>
3275
3276 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3277 struct user_pt_regs *.
3278 (aarch64_store_gregset): Likewise.
3279
3280 2015-11-18 Pedro Alves <palves@redhat.com>
3281
3282 * Makefile.in (all_object_files): Add $IPA_OBJS.
3283
3284 2015-11-17 Pedro Alves <palves@redhat.com>
3285
3286 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3287 GDB_SIGNAL_0 and gdb_signal_to_string.
3288
3289 2015-11-17 Pedro Alves <palves@redhat.com>
3290
3291 * win32-low.c (handle_output_debug_string): Remove parameter.
3292 (win32_kill): Remove our_status local and adjust call to
3293 handle_output_debug_string.
3294 (get_child_debug_event): Adjust call to
3295 handle_output_debug_string.
3296
3297 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3298
3299 * linux-mips-low.c (mips_fill_gregset): Add cast.
3300 (mips_store_gregset): Likewise.
3301 (mips_fill_fpregset): Likewise.
3302 (mips_store_fpregset): Likewise.
3303
3304 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3305
3306 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3307 priv.
3308
3309 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3310
3311 * linux-mips-low.c (mips_linux_new_thread): Change type of
3312 watch_type to enum target_hw_bp_type.
3313
3314 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3315
3316 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3317 Change return type to arm_hwbp_type.
3318
3319 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3320
3321 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3322 (arm_store_gregset): Likewise.
3323 * linux-arm-low.c (arm_get_hwcap): Likewise.
3324 (arm_read_description): Likewise.
3325
3326 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3327
3328 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3329
3330 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3331
3332 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3333 (ppc_fill_vsxregset): Likewise.
3334 (ppc_store_vsxregset): Likewise.
3335 (ppc_fill_vrregset): Likewise.
3336 (ppc_store_vrregset): Likewise.
3337 (ppc_fill_evrregset): Likewise.
3338 (ppc_store_evrregset): Likewise.
3339
3340 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3341
3342 * linux-ppc-low.c (ppc_usrregs_info): Remove
3343 forward-declaration.
3344 (ppc_arch_setup): Move lower in file.
3345
3346 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3347
3348 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3349 (ps_pdwrite): Likewise.
3350
3351 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3352
3353 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3354 to after assert checks.
3355
3356 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3357
3358 * proc-service.c (ps_pdread): Add/adjust casts.
3359 (ps_pdwrite): Add/adjust casts.
3360
3361 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3362
3363 * server.c (handle_search_memory_1): Cast return value of
3364 memmem.
3365
3366 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3367
3368 * server.c (write_qxfer_response): Change type of data to
3369 gdb_byte *.
3370
3371 2015-10-29 Pedro Alves <palves@redhat.com>
3372
3373 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3374
3375 2015-10-29 Pedro Alves <palves@redhat.com>
3376
3377 * tracepoint.c (clear_installed_tracepoints): Add casts.
3378
3379 2015-10-29 Pedro Alves <palves@redhat.com>
3380
3381 * server.c (handle_v_cont, process_serial_event): Add enum
3382 gdb_signal casts to signal parsing code.
3383
3384 2015-10-29 Pedro Alves <palves@redhat.com>
3385
3386 * linux-low.h (NULL_REGSET): Define.
3387 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3388 * linux-arm-low.c (arm_regsets): Likewise.
3389 * linux-crisv32-low.c (cris_regsets): Likewise.
3390 * linux-m68k-low.c (m68k_regsets): Likewise.
3391 * linux-mips-low.c (mips_regsets): Likewise.
3392 * linux-nios2-low.c (nios2_regsets): Likewise.
3393 * linux-ppc-low.c (ppc_regsets): Likewise.
3394 * linux-s390-low.c (s390_regsets): Likewise.
3395 * linux-sh-low.c (sh_regsets): Likewise.
3396 * linux-sparc-low.c (sparc_regsets): Likewise.
3397 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3398 * linux-tile-low.c (tile_regsets): Likewise.
3399 * linux-x86-low.c (x86_regsets): Likewise.
3400 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3401
3402 2015-10-29 Pedro Alves <palves@redhat.com>
3403
3404 * linux-low.h (NULL_REGSET): Define.
3405 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3406 * linux-arm-low.c (arm_regsets): Likewise.
3407 * linux-crisv32-low.c (cris_regsets): Likewise.
3408 * linux-m68k-low.c (m68k_regsets): Likewise.
3409 * linux-mips-low.c (mips_regsets): Likewise.
3410 * linux-nios2-low.c (nios2_regsets): Likewise.
3411 * linux-ppc-low.c (ppc_regsets): Likewise.
3412 * linux-s390-low.c (s390_regsets): Likewise.
3413 * linux-sh-low.c (sh_regsets): Likewise.
3414 * linux-sparc-low.c (sparc_regsets): Likewise.
3415 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3416 * linux-tile-low.c (tile_regsets): Likewise.
3417 * linux-x86-low.c (x86_regsets): Likewise.
3418 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3419
3420 2015-10-26 Doug Evans <dje@google.com>
3421
3422 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3423
3424 2015-10-26 Doug Evans <dje@google.com>
3425
3426 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3427
3428 2015-10-26 Doug Evans <dje@google.com>
3429
3430 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3431 for debug_printf.
3432 (attach_thread, find_new_threads_callback): Ditto.
3433
3434 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3435
3436 * mem-break.h (set_breakpoint_data): Remove.
3437
3438 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3439
3440 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3441 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3442 (initialize_low): Remove set_breakpoint_data call.
3443 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3444 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3445 (initialize_low): Remove set_breakpoint_data call.
3446 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3447 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3448 (initialize_low): Remove set_breakpoint_data call.
3449
3450 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3451
3452 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3453 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3454 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3455 * target.h (target_breakpoint_kind_from_pc): New macro.
3456
3457 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3458
3459 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3460 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3461 the default breakpoint kind.
3462
3463 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3464
3465 * linux-arm-low.c (arm_supports_z_point_type): Add software
3466 breakpoint support.
3467
3468 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3469
3470 * linux-arm-low.c: Refactor breakpoint definitions.
3471 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3472 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3473
3474 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3475
3476 * Makefile.in: Add arm.c/o.
3477 * configure.srv: Likewise.
3478 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3479 (arm_breakpoint_kind_from_pc): New function.
3480 (arm_sw_breakpoint_from_kind): Return proper kind.
3481 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3482
3483 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3484
3485 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3486 removal.
3487 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3488 (struct raw_breakpoint) <size>: Remove.
3489 (struct raw_breakpoint) <kind>: Add.
3490 (bp_size): New function.
3491 (bp_opcode): Likewise.
3492 (find_raw_breakpoint_at): Adjust for kind.
3493 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3494 (remove_memory_breakpoint): Adjust for kind call bp_size.
3495 (set_raw_breakpoint_at): Adjust for kind.
3496 (set_breakpoint): Likewise.
3497 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3498 (delete_raw_breakpoint): Adjust for kind.
3499 (delete_breakpoint): Likewise.
3500 (find_gdb_breakpoint): Likewise.
3501 (set_gdb_breakpoint_1): Likewise.
3502 (set_gdb_breakpoint): Likewise.
3503 (delete_gdb_breakpoint_1): Likewise.
3504 (delete_gdb_breakpoint): Likewise.
3505 (uninsert_raw_breakpoint): Likewise.
3506 (reinsert_raw_breakpoint): Likewise.
3507 (set_breakpoint_data): Remove.
3508 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3509 (check_mem_read): Adjust for kind call bp_size.
3510 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3511 (clone_one_breakpoint): Adjust for kind.
3512 * mem-break.h (set_gdb_breakpoint): Likewise.
3513 (delete_gdb_breakpoint): Likewise.
3514 * server.c (process_serial_event): Likewise.
3515
3516 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3517
3518 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3519 (struct linux_target_ops) <breakpoint>: Remove.
3520 (struct linux_target_ops) <breakpoint_len>: Remove.
3521 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3522 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3523 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3524 (arm_sw_breakpoint_from_kind): New function.
3525 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3526 (struct linux_target_ops) <breakpoint>: Remove.
3527 (struct linux_target_ops) <breakpoint_len>: Remove.
3528 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3529 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3530 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3531 (struct linux_target_ops) <breakpoint>: Remove.
3532 (struct linux_target_ops) <breakpoint_len>: Remove.
3533 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3534 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3535 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3536 (struct linux_target_ops) <breakpoint>: Remove.
3537 (struct linux_target_ops) <breakpoint_len>: Remove.
3538 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3539 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3540 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3541 and sw_breakpoint_from_kind to increment the pc.
3542 (linux_breakpoint_kind_from_pc): New function.
3543 (linux_sw_breakpoint_from_kind): New function.
3544 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3545 (initialize_low): Call breakpoint_kind_from_pc and
3546 sw_breakpoint_from_kind to replace breakpoint_data/len.
3547 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3548 New field.
3549 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3550 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3551 (struct linux_target_ops) <breakpoint>: Remove.
3552 (struct linux_target_ops) <breakpoint_len>: Remove.
3553 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3554 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3555 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3556 (struct linux_target_ops) <breakpoint>: Remove.
3557 (struct linux_target_ops) <breakpoint_len>: Remove.
3558 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3559 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3560 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3561 (struct linux_target_ops) <breakpoint>: Remove.
3562 (struct linux_target_ops) <breakpoint_len>: Remove.
3563 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3564 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3565 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3566 (struct linux_target_ops) <breakpoint>: Remove.
3567 (struct linux_target_ops) <breakpoint_len>: Remove.
3568 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3569 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3570 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3571 (struct linux_target_ops) <breakpoint>: Remove.
3572 (struct linux_target_ops) <breakpoint_len>: Remove.
3573 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3574 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3575 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3576 (struct linux_target_ops) <breakpoint>: Remove.
3577 (struct linux_target_ops) <breakpoint_len>: Remove.
3578 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3579 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3580 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3581 (struct linux_target_ops) <breakpoint>: Remove.
3582 (struct linux_target_ops) <breakpoint_len>: Remove.
3583 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3584 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3585 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3586 (struct linux_target_ops) <breakpoint>: Remove.
3587 (struct linux_target_ops) <breakpoint_len>: Remove.
3588 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3589 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3590 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3591 (struct linux_target_ops) <breakpoint>: Remove.
3592 (struct linux_target_ops) <breakpoint_len>: Remove.
3593 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3594 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3595 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3596 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3602 (struct linux_target_ops) <breakpoint>: Remove.
3603 (struct linux_target_ops) <breakpoint_len>: Remove.
3604 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3605 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3606
3607 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3608
3609 * linux-cris-low.c (cris_get_pc): Remove void arg.
3610
3611 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3612
3613 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3614 variable name.
3615
3616 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3617
3618 * inferiors.c (thread_pid_matches_callback): New function.
3619 (find_thread_process): New function.
3620 (remove_thread): Reset current_thread.
3621 (remove_process): Assert threads have been removed first.
3622
3623 2015-10-15 Yao Qi <yao.qi@linaro.org>
3624
3625 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3626 if it is 3.
3627 (aarch64_remove_point): Likewise.
3628 * regcache.c (regcache_register_size): New function.
3629
3630 2015-10-12 Yao Qi <yao.qi@linaro.org>
3631
3632 * linux-aarch64-low.c: Update all callers as emit_load_store
3633 is renamed to aarch64_emit_load_store.
3634
3635 2015-10-12 Yao Qi <yao.qi@linaro.org>
3636
3637 * linux-aarch64-low.c: Update all callers of function renaming
3638 from emit_insn to aarch64_emit_insn.
3639
3640 2015-10-12 Yao Qi <yao.qi@linaro.org>
3641
3642 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3643 arch/aarch64-insn.h.
3644 (struct aarch64_memory_operand): Likewise.
3645 (ENCODE): Likewise.
3646 (emit_insn): Move to arch/aarch64-insn.c.
3647 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3648 (emit_load_store): Move to arch/aarch64-insn.c.
3649 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3650 (can_encode_int32): Remove.
3651
3652 2015-10-12 Yao Qi <yao.qi@linaro.org>
3653
3654 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3655 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3656 (aarch64_relocate_instruction): Likewise.
3657 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3658 (struct aarch64_insn_visitor): Likewise.
3659
3660 2015-10-12 Yao Qi <yao.qi@linaro.org>
3661
3662 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3663 (struct aarch64_insn_visitor): New.
3664 (struct aarch64_insn_relocation_data): New.
3665 (aarch64_ftrace_insn_reloc_b): New function.
3666 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3667 (aarch64_ftrace_insn_reloc_cb): Likewise.
3668 (aarch64_ftrace_insn_reloc_tb): Likewise.
3669 (aarch64_ftrace_insn_reloc_adr): Likewise.
3670 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3671 (aarch64_ftrace_insn_reloc_others): Likewise.
3672 (visitor): New.
3673 (aarch64_relocate_instruction): Use visitor.
3674
3675 2015-10-12 Yao Qi <yao.qi@linaro.org>
3676
3677 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3678 int. Add argument buf.
3679 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3680 aarch64_relocate_instruction.
3681
3682 2015-10-12 Yao Qi <yao.qi@linaro.org>
3683
3684 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3685 argument insn. Remove local variable insn. Don't call
3686 target_read_uint32.
3687 (aarch64_install_fast_tracepoint_jump_pad): Call
3688 target_read_uint32.
3689
3690 2015-09-30 Yao Qi <yao.qi@linaro.org>
3691
3692 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3693 (emit_load_store_pair): Likewise.
3694
3695 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3696
3697 * dll.c (match_dll): Add cast(s).
3698 (unloaded_dll): Likewise.
3699 * linux-low.c (second_thread_of_pid_p): Likewise.
3700 (delete_lwp_callback): Likewise.
3701 (count_events_callback): Likewise.
3702 (select_event_lwp_callback): Likewise.
3703 (linux_set_resume_request): Likewise.
3704 * server.c (accumulate_file_name_length): Likewise.
3705 (emit_dll_description): Likewise.
3706 (handle_qxfer_threads_worker): Likewise.
3707 (visit_actioned_threads): Likewise.
3708 * thread-db.c (any_thread_of): Likewise.
3709 * tracepoint.c (same_process_p): Likewise.
3710 (match_blocktype): Likewise.
3711 (build_traceframe_info_xml): Likewise.
3712
3713 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3714
3715 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3716 assignment.
3717 (gdb_unparse_agent_expr): Likewise.
3718 * hostio.c (require_data): Likewise.
3719 (handle_pread): Likewise.
3720 * linux-low.c (disable_regset): Likewise.
3721 (fetch_register): Likewise.
3722 (store_register): Likewise.
3723 (get_dynamic): Likewise.
3724 (linux_qxfer_libraries_svr4): Likewise.
3725 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3726 (set_fast_tracepoint_jump): Likewise.
3727 (uninsert_fast_tracepoint_jumps_at): Likewise.
3728 (reinsert_fast_tracepoint_jumps_at): Likewise.
3729 (validate_inserted_breakpoint): Likewise.
3730 (clone_agent_expr): Likewise.
3731 * regcache.c (init_register_cache): Likewise.
3732 * remote-utils.c (putpkt_binary_1): Likewise.
3733 (decode_M_packet): Likewise.
3734 (decode_X_packet): Likewise.
3735 (look_up_one_symbol): Likewise.
3736 (relocate_instruction): Likewise.
3737 (monitor_output): Likewise.
3738 * server.c (handle_search_memory): Likewise.
3739 (handle_qxfer_exec_file): Likewise.
3740 (handle_qxfer_libraries): Likewise.
3741 (handle_qxfer): Likewise.
3742 (handle_query): Likewise.
3743 (handle_v_cont): Likewise.
3744 (handle_v_run): Likewise.
3745 (captured_main): Likewise.
3746 * target.c (write_inferior_memory): Likewise.
3747 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3748 * tracepoint.c (init_trace_buffer): Likewise.
3749 (add_tracepoint_action): Likewise.
3750 (add_traceframe): Likewise.
3751 (add_traceframe_block): Likewise.
3752 (cmd_qtdpsrc): Likewise.
3753 (cmd_qtdv): Likewise.
3754 (cmd_qtstatus): Likewise.
3755 (response_source): Likewise.
3756 (response_tsv): Likewise.
3757 (cmd_qtnotes): Likewise.
3758 (gdb_collect): Likewise.
3759 (initialize_tracepoint): Likewise.
3760
3761 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3762
3763 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3764 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3765 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3766 <NOP>: New.
3767 (enum aarch64_condition_codes): New enum.
3768 (w0): New static global.
3769 (fp): Likewise.
3770 (lr): Likewise.
3771 (struct aarch64_memory_operand) <type>: New
3772 MEMORY_OPERAND_POSTINDEX type.
3773 (postindex_memory_operand): New helper function.
3774 (emit_ret): New function.
3775 (emit_load_store_pair): New function, factored out of emit_stp
3776 with support for MEMORY_OPERAND_POSTINDEX.
3777 (emit_stp): Rewrite using emit_load_store_pair.
3778 (emit_ldp): New function.
3779 (emit_load_store): Likewise.
3780 (emit_ldr): Mention post-index instruction in comment.
3781 (emit_ldrh): New function.
3782 (emit_ldrb): New function.
3783 (emit_ldrsw): Mention post-index instruction in comment.
3784 (emit_str): Likewise.
3785 (emit_subs): New function.
3786 (emit_cmp): Likewise.
3787 (emit_and): Likewise.
3788 (emit_orr): Likewise.
3789 (emit_orn): Likewise.
3790 (emit_eor): Likewise.
3791 (emit_mvn): Likewise.
3792 (emit_lslv): Likewise.
3793 (emit_lsrv): Likewise.
3794 (emit_asrv): Likewise.
3795 (emit_mul): Likewise.
3796 (emit_sbfm): Likewise.
3797 (emit_sbfx): Likewise.
3798 (emit_ubfm): Likewise.
3799 (emit_ubfx): Likewise.
3800 (emit_csinc): Likewise.
3801 (emit_cset): Likewise.
3802 (emit_nop): Likewise.
3803 (emit_ops_insns): New helper function.
3804 (emit_pop): Likewise.
3805 (emit_push): Likewise.
3806 (aarch64_emit_prologue): New function.
3807 (aarch64_emit_epilogue): Likewise.
3808 (aarch64_emit_add): Likewise.
3809 (aarch64_emit_sub): Likewise.
3810 (aarch64_emit_mul): Likewise.
3811 (aarch64_emit_lsh): Likewise.
3812 (aarch64_emit_rsh_signed): Likewise.
3813 (aarch64_emit_rsh_unsigned): Likewise.
3814 (aarch64_emit_ext): Likewise.
3815 (aarch64_emit_log_not): Likewise.
3816 (aarch64_emit_bit_and): Likewise.
3817 (aarch64_emit_bit_or): Likewise.
3818 (aarch64_emit_bit_xor): Likewise.
3819 (aarch64_emit_bit_not): Likewise.
3820 (aarch64_emit_equal): Likewise.
3821 (aarch64_emit_less_signed): Likewise.
3822 (aarch64_emit_less_unsigned): Likewise.
3823 (aarch64_emit_ref): Likewise.
3824 (aarch64_emit_if_goto): Likewise.
3825 (aarch64_emit_goto): Likewise.
3826 (aarch64_write_goto_address): Likewise.
3827 (aarch64_emit_const): Likewise.
3828 (aarch64_emit_call): Likewise.
3829 (aarch64_emit_reg): Likewise.
3830 (aarch64_emit_pop): Likewise.
3831 (aarch64_emit_stack_flush): Likewise.
3832 (aarch64_emit_zero_ext): Likewise.
3833 (aarch64_emit_swap): Likewise.
3834 (aarch64_emit_stack_adjust): Likewise.
3835 (aarch64_emit_int_call_1): Likewise.
3836 (aarch64_emit_void_call_2): Likewise.
3837 (aarch64_emit_eq_goto): Likewise.
3838 (aarch64_emit_ne_goto): Likewise.
3839 (aarch64_emit_lt_goto): Likewise.
3840 (aarch64_emit_le_goto): Likewise.
3841 (aarch64_emit_gt_goto): Likewise.
3842 (aarch64_emit_ge_got): Likewise.
3843 (aarch64_emit_ops_impl): New static global variable.
3844 (aarch64_emit_ops): New target function, return
3845 &aarch64_emit_ops_impl.
3846 (struct linux_target_ops): Install it.
3847
3848 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3849
3850 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3851 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3852 aarch64-ipa.o.
3853 * linux-aarch64-ipa.c: New file.
3854 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3855 and endian.h.
3856 (aarch64_get_thread_area): New target method.
3857 (extract_signed_bitfield): New helper function.
3858 (aarch64_decode_ldr_literal): New function.
3859 (enum aarch64_opcodes): New enum.
3860 (struct aarch64_register): New struct.
3861 (struct aarch64_operand): New struct.
3862 (x0): New static global.
3863 (x1): Likewise.
3864 (x2): Likewise.
3865 (x3): Likewise.
3866 (x4): Likewise.
3867 (w2): Likewise.
3868 (ip0): Likewise.
3869 (sp): Likewise.
3870 (xzr): Likewise.
3871 (aarch64_register): New helper function.
3872 (register_operand): Likewise.
3873 (immediate_operand): Likewise.
3874 (struct aarch64_memory_operand): New struct.
3875 (offset_memory_operand): New helper function.
3876 (preindex_memory_operand): Likewise.
3877 (enum aarch64_system_control_registers): New enum.
3878 (ENCODE): New macro.
3879 (emit_insn): New helper function.
3880 (emit_b): New function.
3881 (emit_bcond): Likewise.
3882 (emit_cb): Likewise.
3883 (emit_tb): Likewise.
3884 (emit_blr): Likewise.
3885 (emit_stp): Likewise.
3886 (emit_ldp_q_offset): Likewise.
3887 (emit_stp_q_offset): Likewise.
3888 (emit_load_store): Likewise.
3889 (emit_ldr): Likewise.
3890 (emit_ldrsw): Likewise.
3891 (emit_str): Likewise.
3892 (emit_ldaxr): Likewise.
3893 (emit_stxr): Likewise.
3894 (emit_stlr): Likewise.
3895 (emit_data_processing_reg): Likewise.
3896 (emit_data_processing): Likewise.
3897 (emit_add): Likewise.
3898 (emit_sub): Likewise.
3899 (emit_mov): Likewise.
3900 (emit_movk): Likewise.
3901 (emit_mov_addr): Likewise.
3902 (emit_mrs): Likewise.
3903 (emit_msr): Likewise.
3904 (emit_sevl): Likewise.
3905 (emit_wfe): Likewise.
3906 (append_insns): Likewise.
3907 (can_encode_int32_in): New helper function.
3908 (aarch64_relocate_instruction): New function.
3909 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3910 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3911 (struct linux_target_ops): Install aarch64_get_thread_area,
3912 aarch64_install_fast_tracepoint_jump_pad and
3913 aarch64_get_min_fast_tracepoint_insn_len.
3914
3915 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3916
3917 * Makefile.in (aarch64-insn.o): New rule.
3918 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3919
3920 2015-09-21 Yao Qi <yao.qi@linaro.org>
3921
3922 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3923
3924 2015-09-21 Yao Qi <yao.qi@linaro.org>
3925
3926 * tracepoint.c (max_jump_pad_size): Remove.
3927
3928 2015-09-18 Yao Qi <yao.qi@linaro.org>
3929
3930 * linux-aarch64-low.c: Don't include sys/uio.h.
3931 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3932
3933 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3934
3935 * tracepoint.c (eval_result_type): Change prototype.
3936 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3937
3938 2015-09-15 Pedro Alves <palves@redhat.com>
3939
3940 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3941 Check whether to report exec events instead of checking whether
3942 multiprocess is enabled.
3943
3944 2015-09-15 Pedro Alves <palves@redhat.com>
3945
3946 PR remote/18965
3947 * remote-utils.c (prepare_resume_reply): Merge
3948 TARGET_WAITKIND_VFORK_DONE switch case with the
3949 TARGET_WAITKIND_FORKED case.
3950
3951 2015-09-15 Yao Qi <yao.qi@linaro.org>
3952
3953 * server.c (handle_query): Check string comparison using
3954 "else if" instead of "if".
3955
3956 2015-09-15 Yao Qi <yao.qi@linaro.org>
3957
3958 * server.c (vCont_supported): New global variable.
3959 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3960 matches. Append ";vContSupported+" to own_buf.
3961 (handle_v_requests): Append ";s;S" to own_buf if target supports
3962 hardware single step or vCont_supported is false.
3963 (capture_main): Set vCont_supported to zero.
3964
3965 2015-09-15 Yao Qi <yao.qi@linaro.org>
3966
3967 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3968 it to ...
3969 (linux_supports_hardware_single_step): ... New function.
3970 (linux_target_ops): Update.
3971 * lynx-low.c (lynx_target_ops): Set field
3972 supports_hardware_single_step to target_can_do_hardware_single_step.
3973 * nto-low.c (nto_target_ops): Likewise.
3974 * spu-low.c (spu_target_ops): Likewise.
3975 * win32-low.c (win32_target_ops): Likewise.
3976 * target.c (target_can_do_hardware_single_step): New function.
3977 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3978 Remove. <supports_hardware_single_step>: New field.
3979 (target_supports_conditional_breakpoints): Remove.
3980 (target_supports_hardware_single_step): New macro.
3981 (target_can_do_hardware_single_step): Declare.
3982 * server.c (handle_query): Use target_supports_hardware_single_step
3983 instead of target_supports_conditional_breakpoints.
3984
3985 2015-09-15 Yao Qi <yao.qi@linaro.org>
3986
3987 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3988 function.
3989 (struct linux_target_ops the_low_target): Install
3990 aarch64_linux_siginfo_fixup.
3991
3992 2015-09-11 Don Breazeal <donb@codesourcery.com>
3993 Luis Machado <lgustavo@codesourcery.com>
3994
3995 * linux-low.c (linux_mourn): Static declaration.
3996 (linux_arch_setup): Move in front of
3997 handle_extended_wait.
3998 (linux_arch_setup_thread): New function.
3999 (handle_extended_wait): Handle exec events. Call
4000 linux_arch_setup_thread. Make event_lwp argument a
4001 pointer-to-a-pointer.
4002 (check_zombie_leaders): Do not check stopped threads.
4003 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4004 (linux_low_filter_event): Add lwp and thread for exec'ing
4005 non-leader thread if leader thread has been deleted.
4006 Refactor code into linux_arch_setup_thread and call it.
4007 Pass child lwp pointer by reference to handle_extended_wait.
4008 (linux_wait_for_event_filtered): Update comment.
4009 (linux_wait_1): Prevent clobbering exec event status.
4010 (linux_supports_exec_events): New function.
4011 (linux_target_ops) <supports_exec_events>: Initialize new member.
4012 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4013 new member.
4014 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4015 * server.c (report_exec_events): New global variable.
4016 (handle_query): Handle qSupported query for exec-events feature.
4017 (captured_main): Initialize report_exec_events.
4018 * server.h (report_exec_events): Declare new global variable.
4019 * target.h (struct target_ops) <supports_exec_events>: New
4020 member.
4021 (target_supports_exec_events): New macro.
4022 * win32-low.c (win32_target_ops) <supports_exec_events>:
4023 Initialize new member.
4024
4025 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4026
4027 * linux-low.c (linux_low_enable_btrace): Remove.
4028 (linux_target_ops): Replace linux_low_enable_btrace with
4029 linux_enable_btrace.
4030
4031 2015-09-03 Yao Qi <yao.qi@linaro.org>
4032
4033 * linux-aarch64-low.c (aarch64_insert_point): Call
4034 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4035 returns true.
4036
4037 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4038
4039 * linux-low.c (check_stopped_by_breakpoint): Use
4040 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4041
4042 2015-08-27 Pedro Alves <palves@redhat.com>
4043
4044 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4045
4046 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4047
4048 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4049 the XNEW-family equivalent.
4050 (compile_bytecodes): Likewise.
4051 * dll.c (loaded_dll): Likewise.
4052 * event-loop.c (append_callback_event): Likewise.
4053 (create_file_handler): Likewise.
4054 (create_file_event): Likewise.
4055 * hostio.c (handle_open): Likewise.
4056 * inferiors.c (add_thread): Likewise.
4057 (add_process): Likewise.
4058 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4059 * linux-arm-low.c (arm_new_process): Likewise.
4060 (arm_new_thread): Likewise.
4061 * linux-low.c (add_to_pid_list): Likewise.
4062 (linux_add_process): Likewise.
4063 (handle_extended_wait): Likewise.
4064 (add_lwp): Likewise.
4065 (enqueue_one_deferred_signal): Likewise.
4066 (enqueue_pending_signal): Likewise.
4067 (linux_resume_one_lwp_throw): Likewise.
4068 (linux_resume_one_thread): Likewise.
4069 (linux_read_memory): Likewise.
4070 (linux_write_memory): Likewise.
4071 * linux-mips-low.c (mips_linux_new_process): Likewise.
4072 (mips_linux_new_thread): Likewise.
4073 (mips_add_watchpoint): Likewise.
4074 * linux-x86-low.c (initialize_low_arch): Likewise.
4075 * lynx-low.c (lynx_add_process): Likewise.
4076 * mem-break.c (set_raw_breakpoint_at): Likewise.
4077 (set_breakpoint): Likewise.
4078 (add_condition_to_breakpoint): Likewise.
4079 (add_commands_to_breakpoint): Likewise.
4080 (clone_agent_expr): Likewise.
4081 (clone_one_breakpoint): Likewise.
4082 * regcache.c (new_register_cache): Likewise.
4083 * remote-utils.c (look_up_one_symbol): Likewise.
4084 * server.c (queue_stop_reply): Likewise.
4085 (start_inferior): Likewise.
4086 (queue_stop_reply_callback): Likewise.
4087 (handle_target_event): Likewise.
4088 * spu-low.c (fetch_ppc_memory): Likewise.
4089 (store_ppc_memory): Likewise.
4090 * target.c (set_target_ops): Likewise.
4091 * thread-db.c (thread_db_load_search): Likewise.
4092 (try_thread_db_load_1): Likewise.
4093 * tracepoint.c (add_tracepoint): Likewise.
4094 (add_tracepoint_action): Likewise.
4095 (create_trace_state_variable): Likewise.
4096 (cmd_qtdpsrc): Likewise.
4097 (cmd_qtro): Likewise.
4098 (add_while_stepping_state): Likewise.
4099 * win32-low.c (child_add_thread): Likewise.
4100 (get_image_name): Likewise.
4101
4102 2015-08-25 Yao Qi <yao.qi@linaro.org>
4103
4104 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4105
4106 2015-08-25 Yao Qi <yao.qi@linaro.org>
4107
4108 * Makefile.in (aarch64-linux.o): New rule.
4109 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4110 srv_tgtobj.
4111 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4112 (aarch64_init_debug_reg_state): Make it extern.
4113 (aarch64_linux_prepare_to_resume): Remove.
4114
4115 2015-08-25 Yao Qi <yao.qi@linaro.org>
4116
4117 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4118 lwp_arch_private_info and ptid_of_lwp.
4119
4120 2015-08-25 Yao Qi <yao.qi@linaro.org>
4121
4122 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4123 Find proc_info by find_process_pid. All callers updated.
4124
4125 2015-08-25 Yao Qi <yao.qi@linaro.org>
4126
4127 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4128 Remove.
4129 (debug_reg_change_callback): Remove.
4130 (aarch64_notify_debug_reg_change): Remove.
4131
4132 2015-08-25 Yao Qi <yao.qi@linaro.org>
4133
4134 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4135 Call current_lwp_ptid.
4136
4137 2015-08-25 Yao Qi <yao.qi@linaro.org>
4138
4139 * linux-aarch64-low.c (debug_reg_change_callback): Use
4140 debug_printf.
4141
4142 2015-08-25 Yao Qi <yao.qi@linaro.org>
4143
4144 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4145
4146 2015-08-25 Yao Qi <yao.qi@linaro.org>
4147
4148 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4149
4150 2015-08-25 Yao Qi <yao.qi@linaro.org>
4151
4152 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4153 the code.
4154
4155 2015-08-25 Yao Qi <yao.qi@linaro.org>
4156
4157 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4158 Remove.
4159 (debug_reg_change_callback): Remove argument entry and add argument
4160 lwp. Remove local variable thread. Don't print thread id in the
4161 debugging output. Don't check whether pid of thread equals to pid.
4162 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4163 iterate_over_lwps instead find_inferior.
4164
4165 2015-08-24 Pedro Alves <palves@redhat.com>
4166
4167 * inferiors.c (get_first_process): New function.
4168 * inferiors.h (get_first_process): New declaration.
4169 * remote-utils.c (read_ptid): Default to the first process in the
4170 list, instead of to the current thread's process.
4171
4172 2015-08-24 Pedro Alves <palves@redhat.com>
4173
4174 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4175 * event-loop.c: Likewise.
4176 * remote-utils.c: Likewise.
4177 * tracepoint.c: Likewise.
4178
4179 2015-08-24 Pedro Alves <palves@redhat.com>
4180
4181 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4182 ptid_get_lwp.
4183
4184 2015-08-21 Pedro Alves <palves@redhat.com>
4185
4186 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4187 instead of literal 1.
4188
4189 2015-08-21 Pedro Alves <palves@redhat.com>
4190
4191 * tdesc.c (default_description): Explicitly zero-initialize.
4192
4193 2015-08-21 Pedro Alves <palves@redhat.com>
4194
4195 PR gdb/18749
4196 * inferiors.c (remove_thread): Discard any pending stop reply for
4197 this thread.
4198 * server.c (remove_all_on_match_pid): Rename to ...
4199 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4200 instead of a pid.
4201 (discard_queued_stop_replies): Change parameter to a ptid. Now
4202 extern.
4203 (handle_v_kill, kill_inferior_callback, captured_main)
4204 (process_serial_event): Adjust.
4205 * server.h (discard_queued_stop_replies): Declare.
4206
4207 2015-08-21 Pedro Alves <palves@redhat.com>
4208
4209 * linux-low.c (wait_for_sigstop): Always switch to no thread
4210 selected if the previously current thread dies.
4211 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4212 process instead of the current thread's.
4213 * remote-utils.c (input_interrupt): Don't check if there's no
4214 current thread.
4215 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4216 current thread to the general thread fails, error out.
4217 (handle_qxfer_auxv, handle_qxfer_libraries)
4218 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4219 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4220 (handle_query): Check if there's a thread selected instead of
4221 checking whether there's any thread in the thread list.
4222 (handle_qxfer_threads, handle_qxfer_btrace)
4223 (handle_qxfer_btrace_conf): Don't error out early if there's no
4224 thread in the thread list.
4225 (handle_v_cont, myresume): Don't set the current thread to the
4226 continue thread.
4227 (process_serial_event) <Hg handling>: Also set thread_id if the
4228 previous general thread is still alive.
4229 (process_serial_event) <g/G handling>: If setting the current
4230 thread to the general thread fails, error out.
4231 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4232 thread's lwp instead of the current thread's.
4233 * target.c (set_desired_thread): If the desired thread was not
4234 found, leave the current thread pointing to NULL. Return an int
4235 (boolean) indicating success.
4236 * target.h (set_desired_thread): Change return type to int.
4237
4238 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4239
4240 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4241 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4242 #includes.
4243 (ps_get_thread_area): New function.
4244
4245 2015-08-19 Gary Benson <gbenson@redhat.com>
4246
4247 * hostio.c (handle_pread): Do not attempt to read more data
4248 than hostio_reply_with_data can fit in a packet.
4249
4250 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4251
4252 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4253
4254 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4255
4256 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4257
4258 2015-08-06 Pedro Alves <palves@redhat.com>
4259
4260 * tracepoint.c (expr_eval_result): Now an int.
4261
4262 2015-08-06 Pedro Alves <palves@redhat.com>
4263
4264 * gdbthread.h (struct regcache): Forward declare.
4265 (struct thread_info) <regcache_data>: Now a struct regcache
4266 pointer.
4267 * inferiors.c (inferior_regcache_data)
4268 (set_inferior_regcache_data): Now work with struct regcache
4269 pointers.
4270 * inferiors.h (struct regcache): Forward declare.
4271 (inferior_regcache_data, set_inferior_regcache_data): Now work
4272 with struct regcache pointers.
4273 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4274 (free_register_cache_thread): Remove struct regcache pointer
4275 casts.
4276
4277 2015-08-06 Pedro Alves <palves@redhat.com>
4278
4279 * server.c (captured_main): On error, print the exception message
4280 to stderr, and if run_once is set, throw a quit.
4281
4282 2015-08-06 Pedro Alves <palves@redhat.com>
4283
4284 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4285 the current thread.
4286
4287 2015-08-06 Pedro Alves <palves@redhat.com>
4288
4289 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4290 reading beyond the passed in buffer length.
4291
4292 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4293
4294 * tracepoint.c (symbol_list) <required>: Remove.
4295
4296 2015-08-06 Pedro Alves <palves@redhat.com>
4297
4298 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4299 count if stopping and suspending threads.
4300 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4301 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4302 (linux_detach): Complete an ongoing step-over.
4303 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4304 throughout.
4305 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4306 (linux_wait_1): If passing a signal to the inferior after
4307 finishing a step-over, unsuspend and re-resume all lwps. If we
4308 see a single-step event but the thread should be continuing, don't
4309 pass the trap to gdb.
4310 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4311 internal_error instead of gdb_assert.
4312 (enqueue_pending_signal): New function.
4313 (check_ptrace_stopped_lwp_gone): Add debug output.
4314 (start_step_over): Use internal_error instead of gdb_assert.
4315 (complete_ongoing_step_over): New function.
4316 (linux_resume_one_thread): Don't resume a suspended thread.
4317 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4318 it stepping.
4319
4320 2015-08-06 Pedro Alves <palves@redhat.com>
4321
4322 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4323 (linux_thread_alive): Use lwp_is_marked_dead.
4324 (extended_event_reported): Delete.
4325 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4326 instead of extended_event_reported.
4327 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4328 as well.
4329 (lwp_is_marked_dead): New function.
4330 (lwp_running): Use lwp_is_marked_dead.
4331 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4332 comment.
4333
4334 2015-08-06 Pedro Alves <palves@redhat.com>
4335
4336 * linux-low.c (linux_wait_1): Move fork event output out of the
4337 !report_to_gdb check. Pass event_child->waitstatus to
4338 target_waitstatus_to_string instead of ourstatus.
4339
4340 2015-08-04 Yao Qi <yao.qi@linaro.org>
4341
4342 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4343 if current_thread is 32 bit.
4344
4345 2015-08-04 Yao Qi <yao.qi@linaro.org>
4346
4347 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4348 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4349 * server.c (extended_protocol): Remove "static".
4350 * server.h (extended_protocol): Declare it.
4351
4352 2015-08-04 Yao Qi <yao.qi@linaro.org>
4353
4354 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4355 both aarch64 and aarch32.
4356 (aarch64_set_pc): Likewise.
4357
4358 2015-08-04 Yao Qi <yao.qi@linaro.org>
4359
4360 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4361 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4362 arm-with-neon.xml to srv_xmlfiles.
4363 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4364 (is_64bit_tdesc): New function.
4365 (aarch64_linux_read_description): New function.
4366 (aarch64_arch_setup): Call aarch64_linux_read_description.
4367 (regs_info): Rename to regs_info_aarch64.
4368 (aarch64_regs_info): Return right regs_info.
4369 (initialize_low_arch): Call initialize_low_arch_aarch32.
4370
4371 2015-08-04 Yao Qi <yao.qi@linaro.org>
4372
4373 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4374 * linux-aarch32-low.c: New file.
4375 * linux-aarch32-low.h: New file.
4376 * linux-arm-low.c (arm_fill_gregset): Move it to
4377 linux-aarch32-low.c.
4378 (arm_store_gregset): Likewise.
4379 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4380 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4381 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4382 (regs_info): Rename to regs_info_arm.
4383 (arm_regs_info): Return regs_info_aarch32 if
4384 have_ptrace_getregset is 1 and target description is
4385 arm_with_neon or arm_with_vfpv3.
4386 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4387 Call initialize_low_arch_aarch32 instead.
4388
4389 2015-08-04 Yao Qi <yao.qi@linaro.org>
4390
4391 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4392 * linux-low.c: ... here.
4393 * linux-low.h (have_ptrace_getregset): Declare it.
4394
4395 2015-08-04 Pedro Alves <palves@redhat.com>
4396
4397 * thread-db.c (struct thread_db): Use new typedefs.
4398 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4399 CHK calls.
4400 (disable_thread_event_reporting): Cast result of dlsym to
4401 destination function pointer type.
4402 (thread_db_mourn): Use td_ta_delete_ftype.
4403
4404 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4405
4406 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4407 arch variant.
4408 (CDX_BREAKPOINT): Define for R2.
4409 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4410 (the_low_target): Add comments.
4411
4412 2015-07-30 Yao Qi <yao.qi@linaro.org>
4413
4414 * linux-arm-low.c (arm_hwcap): Remove it.
4415 (arm_read_description): New local variable arm_hwcap. Don't
4416 set arm_hwcap to zero.
4417
4418 2015-07-30 Yao Qi <yao.qi@linaro.org>
4419
4420 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4421 Use regcache->tdesc instead.
4422 (arm_store_wmmxregset): Likewise.
4423 (arm_fill_vfpregset): Likewise.
4424 (arm_store_vfpregset): Likewise.
4425
4426 2015-07-30 Yao Qi <yao.qi@linaro.org>
4427
4428 * linux-arm-low.c: Include arch/arm.h.
4429 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4430 (arm_store_gregset): Likewise.
4431
4432 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4433
4434 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4435 ptrace's 4th parameter.
4436
4437 2015-07-27 Yao Qi <yao.qi@linaro.org>
4438
4439 * configure.srv (case aarch64*-*-linux*): Don't set
4440 srv_linux_usrregs.
4441
4442 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4443
4444 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4445 sys/ptrace.h.
4446 * linux-arm-low.c: Likewise.
4447 * linux-cris-low.c: Likewise.
4448 * linux-crisv32-low.c: Likewise.
4449 * linux-low.c: Likewise.
4450 * linux-m68k-low.c: Likewise.
4451 * linux-mips-low.c: Likewise.
4452 * linux-nios2-low.c: Likewise.
4453 * linux-s390-low.c: Likewise.
4454 * linux-sparc-low.c: Likewise.
4455 * linux-tic6x-low.c: Likewise.
4456 * linux-tile-low.c: Likewise.
4457 * linux-x86-low.c: Likewise.
4458
4459 2015-07-24 Pedro Alves <palves@redhat.com>
4460
4461 * config.in: Regenerate.
4462 * configure: Regenerate.
4463
4464 2015-07-24 Pedro Alves <palves@redhat.com>
4465
4466 * acinclude.m4: Include ../ptrace.m4.
4467 * configure.ac: Call GDB_AC_PTRACE.
4468 * config.in, configure: Regenerate.
4469
4470 2015-07-24 Yao Qi <yao.qi@linaro.org>
4471
4472 * linux-low.c (linux_create_inferior): Remove setting to
4473 proc->priv->new_inferior.
4474 (linux_attach): Likewise.
4475 (linux_low_filter_event): Likewise.
4476 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4477
4478 2015-07-24 Yao Qi <yao.qi@linaro.org>
4479
4480 * linux-low.c (linux_arch_setup): New function.
4481 (linux_low_filter_event): If proc->tdesc is NULL and
4482 proc->attached is true, call the_low_target.arch_setup.
4483 Otherwise, keep status pending, and return.
4484 (linux_resume_one_lwp_throw): Don't call get_pc if
4485 thread->while_stepping isn't NULL. Don't call
4486 get_thread_regcache if proc->tdesc is NULL.
4487 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4488 (linux_target_ops): Install arch_setup.
4489 * server.c (start_inferior): Call the_target->arch_setup.
4490 * target.h (struct target_ops) <arch_setup>: New field.
4491 (target_arch_setup): New marco.
4492 * lynx-low.c (lynx_target_ops): Update.
4493 * nto-low.c (nto_target_ops): Update.
4494 * spu-low.c (spu_target_ops): Update.
4495 * win32-low.c (win32_target_ops): Update.
4496
4497 2015-07-24 Yao Qi <yao.qi@linaro.org>
4498
4499 * linux-low.c (linux_add_process): Don't set
4500 proc->priv->new_inferior.
4501 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4502 (linux_attach): Likewise.
4503
4504 2015-07-24 Yao Qi <yao.qi@linaro.org>
4505
4506 * server.c (start_inferior): Code refactor.
4507
4508 2015-07-24 Yao Qi <yao.qi@linaro.org>
4509
4510 * server.c (process_serial_event): Set general_thread.
4511
4512 2015-07-21 Yao Qi <yao.qi@linaro.org>
4513
4514 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4515 aarch64_linux_get_debug_reg_capacity.
4516
4517 2015-07-17 Yao Qi <yao.qi@linaro.org>
4518
4519 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4520 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4521 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4522 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4523 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4524 (AARCH64_HWP_ALIGNMENT): Likewise.
4525 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4526 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4527 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4528 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4529 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4530 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4531 (struct aarch64_debug_reg_state): Likewise.
4532 (struct arch_lwp_info): Likewise.
4533 (aarch64_align_watchpoint): Likewise.
4534 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4535 (aarch64_watchpoint_length): Likewise.
4536 (aarch64_point_encode_ctrl_reg): Likewise
4537 (aarch64_point_is_aligned): Likewise.
4538 (aarch64_align_watchpoint): Likewise.
4539 (aarch64_linux_set_debug_regs):
4540 (aarch64_dr_state_insert_one_point): Likewise.
4541 (aarch64_dr_state_remove_one_point): Likewise.
4542 (aarch64_handle_breakpoint): Likewise.
4543 (aarch64_handle_aligned_watchpoint): Likewise.
4544 (aarch64_handle_unaligned_watchpoint): Likewise.
4545 (aarch64_handle_watchpoint): Likewise.
4546
4547 2015-07-17 Yao Qi <yao.qi@linaro.org>
4548
4549 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4550 and don't aarch64_get_debug_reg_state. All callers update.
4551 (aarch64_handle_aligned_watchpoint): Likewise.
4552 (aarch64_handle_unaligned_watchpoint): Likewise.
4553 (aarch64_handle_watchpoint): Likewise.
4554 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4555 (aarch64_remove_point): Likewise.
4556
4557 2015-07-17 Yao Qi <yao.qi@linaro.org>
4558
4559 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4560 debug_printf.
4561 (aarch64_handle_unaligned_watchpoint): Likewise.
4562
4563 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4564
4565 Revert the previous 3 commits:
4566 Move gdb_regex* to common/
4567 Move linux_find_memory_regions_full & co.
4568 gdbserver build-id attribute generator
4569
4570 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4571 Jan Kratochvil <jan.kratochvil@redhat.com>
4572
4573 gdbserver build-id attribute generator.
4574 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4575 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4576 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4577 (find_phdr): New.
4578 (get_dynamic): Use find_pdhr to traverse program headers.
4579 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4580 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4581 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4582 (get_hex_build_id): New.
4583 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4584 to reply XML document.
4585
4586 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4587 Jan Kratochvil <jan.kratochvil@redhat.com>
4588
4589 * target.c: Include target/target-utils.h and fcntl.h.
4590 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4591 (target_fileio_read_stralloc): New functions.
4592
4593 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4594
4595 * Makefile.in (OBS): Add gdb_regex.o.
4596 (gdb_regex.o): New.
4597 * config.in: Rebuilt.
4598 * configure: Rebuilt.
4599
4600 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4601 Jan Kratochvil <jan.kratochvil@redhat.com>
4602
4603 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4604 * Makefile.in (OBS): Add target-utils.o.
4605 (linux-maps.o, target-utils.o): New.
4606 * configure.srv (srv_linux_obj): Add linux-maps.o.
4607
4608 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4609
4610 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4611 function, return 1.
4612 (the_low_target): Install it.
4613
4614 2015-07-14 Pedro Alves <palves@redhat.com>
4615
4616 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4617 Instead, ignore ECHILD, and throw an error for other errnos.
4618
4619 2015-07-10 Pedro Alves <palves@redhat.com>
4620
4621 * event-loop.c (struct callback_event) <data>: Change type to
4622 gdb_client_data instance instead of gdb_client_data pointer.
4623 (append_callback_event): Adjust.
4624
4625 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4626
4627 * linux-aarch64-low.c: Add comments for each linux_target_ops
4628 method. Remove comments already covered in target_ops and
4629 linux_target_ops definitions.
4630 (the_low_target): Add comments for each unimplemented method.
4631
4632 2015-07-09 Yao Qi <yao.qi@linaro.org>
4633
4634 * linux-aarch64-low.c (aarch64_regmap): Remove.
4635 (aarch64_usrregs_info): Remove.
4636 (regs_info): Set field usrregs to NULL.
4637
4638 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4639
4640 * linux-low.c: Include "rsp-low.h"
4641 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4642 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4643 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4644 (handle_btrace_enable_pt): New.
4645 (handle_btrace_general_set): Support "pt".
4646 (handle_btrace_conf_general_set): Support "pt:size".
4647
4648 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4649
4650 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4651 Z_PACKET_SW_BP.
4652
4653 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4654
4655 * linux-aarch64-low.c: Remove comment about endianness.
4656 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4657 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4658 memcmp.
4659
4660 2015-06-24 Gary Benson <gbenson@redhat.com>
4661
4662 * linux-i386-ipa.c (stdint.h): Do not include.
4663 * lynx-i386-low.c (stdint.h): Likewise.
4664 * lynx-ppc-low.c (stdint.h): Likewise.
4665 * mem-break.c (stdint.h): Likewise.
4666 * thread-db.c (stdint.h): Likewise.
4667 * tracepoint.c (stdint.h): Likewise.
4668 * win32-low.c (stdint.h): Likewise.
4669
4670 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4671
4672 * server.c (write_qxfer_response): Update call to
4673 remote_escape_output.
4674
4675 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4676 Jan Kratochvil <jan.kratochvil@redhat.com>
4677
4678 Merge multiple hex conversions.
4679 * gdbreplay.c (tohex): Rename to 'fromhex'.
4680 (logchar): Use fromhex.
4681
4682 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4683
4684 * server.c (handle_qxfer_libraries): Set `version' attribute for
4685 <library-list>.
4686
4687 2015-06-10 Gary Benson <gbenson@redhat.com>
4688
4689 * target.h (struct target_ops) <multifs_open>: New field.
4690 <multifs_unlink>: Likewise.
4691 <multifs_readlink>: Likewise.
4692 * linux-low.c (nat/linux-namespaces.h): New include.
4693 (linux_target_ops): Initialize the_target->multifs_open,
4694 the_target->multifs_unlink and the_target->multifs_readlink.
4695 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4696 * hostio.c (hostio_fs_pid): New static variable.
4697 (hostio_handle_new_gdb_connection): New function.
4698 (handle_setfs): Likewise.
4699 (handle_open): Use the_target->multifs_open as appropriate.
4700 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4701 (handle_readlink): Use the_target->multifs_readlink as
4702 appropriate.
4703 (handle_vFile): Handle vFile:setfs packets.
4704 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4705 after target_handle_new_gdb_connection.
4706
4707 2015-06-10 Gary Benson <gbenson@redhat.com>
4708
4709 * configure.ac (AC_CHECK_FUNCS): Add setns.
4710 * config.in: Regenerate.
4711 * configure: Likewise.
4712 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4713 (linux-namespaces.o): New rule.
4714 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4715
4716 2015-06-09 Gary Benson <gbenson@redhat.com>
4717
4718 * hostio.c (handle_open): Process mode argument with
4719 fileio_to_host_mode.
4720
4721 2015-06-01 Yao Qi <yao.qi@linaro.org>
4722
4723 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4724 * linux-x86-low.c: Likewise.
4725
4726 2015-05-28 Don Breazeal <donb@codesourcery.com>
4727
4728 * linux-low.c (handle_extended_wait): Initialize
4729 thread_info.last_resume_kind for new fork children.
4730
4731 2015-05-15 Pedro Alves <palves@redhat.com>
4732
4733 * target.h (target_handle_new_gdb_connection): Rewrite using if
4734 wrapped in do/while.
4735
4736 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4737
4738 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4739 * configure, config.in: Regenerate.
4740 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4741 Declare typedef.
4742
4743 2015-05-12 Don Breazeal <donb@codesourcery.com>
4744
4745 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4746 PTRACE_EVENT_VFORK_DONE.
4747 (linux_low_ptrace_options, extended_event_reported): Add vfork
4748 events.
4749 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4750 and "vforkdone" for RSP 'T' Stop Reply Packet.
4751 * server.h (report_vfork_events): Declare
4752 global variable.
4753
4754 2015-05-12 Don Breazeal <donb@codesourcery.com>
4755
4756 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4757 (the_low_target) <new_fork>: Initialize new member.
4758 * linux-arm-low.c (arm_new_fork): New function.
4759 (the_low_target) <new_fork>: Initialize new member.
4760 * linux-low.c (handle_extended_wait): Call new target function
4761 new_fork.
4762 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4763 * linux-mips-low.c (mips_add_watchpoint): New function
4764 extracted from mips_insert_point.
4765 (the_low_target) <new_fork>: Initialize new member.
4766 (mips_linux_new_fork): New function.
4767 (mips_insert_point): Call mips_add_watchpoint.
4768 * linux-x86-low.c (x86_linux_new_fork): New function.
4769 (the_low_target) <new_fork>: Initialize new member.
4770
4771 2015-05-12 Don Breazeal <donb@codesourcery.com>
4772
4773 * linux-low.c (handle_extended_wait): Implement return value,
4774 rename argument 'event_child' to 'event_lwp', handle
4775 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4776 (linux_low_ptrace_options): New function.
4777 (linux_low_filter_event): Call linux_low_ptrace_options,
4778 use different argument fo linux_enable_event_reporting,
4779 use return value from handle_extended_wait.
4780 (extended_event_reported): New function.
4781 (linux_wait_1): Call extended_event_reported and set
4782 status to report fork events.
4783 (linux_write_memory): Add pid to debug message.
4784 (reset_lwp_ptrace_options_callback): New function.
4785 (linux_handle_new_gdb_connection): New function.
4786 (linux_target_ops): Initialize new structure member.
4787 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4788 * lynx-low.c: Initialize new structure member.
4789 * remote-utils.c (prepare_resume_reply): Implement stop reason
4790 "fork" for "T" stop message.
4791 * server.c (handle_query): Call handle_new_gdb_connection.
4792 * server.h (report_fork_events): Declare global flag.
4793 * target.h (struct target_ops) <handle_new_gdb_connection>:
4794 New member.
4795 (target_handle_new_gdb_connection): New macro.
4796 * win32-low.c: Initialize new structure member.
4797
4798 2015-05-12 Don Breazeal <donb@codesourcery.com>
4799
4800 * mem-break.c (APPEND_TO_LIST): Define macro.
4801 (clone_agent_expr): New function.
4802 (clone_one_breakpoint): New function.
4803 (clone_all_breakpoints): New function.
4804 * mem-break.h: Declare new functions.
4805
4806 2015-05-12 Don Breazeal <donb@codesourcery.com>
4807
4808 * linux-low.c (linux_supports_fork_events): New function.
4809 (linux_supports_vfork_events): New function.
4810 (linux_target_ops): Initialize new structure members.
4811 (initialize_low): Call linux_check_ptrace_features.
4812 * lynx-low.c (lynx_target_ops): Initialize new structure
4813 members.
4814 * server.c (report_fork_events, report_vfork_events):
4815 New global flags.
4816 (handle_query): Add new features to qSupported packet and
4817 response.
4818 (captured_main): Initialize new global variables.
4819 * target.h (struct target_ops) <supports_fork_events>:
4820 New member.
4821 <supports_vfork_events>: New member.
4822 (target_supports_fork_events): New macro.
4823 (target_supports_vfork_events): New macro.
4824 * win32-low.c (win32_target_ops): Initialize new structure
4825 members.
4826
4827 2015-05-12 Gary Benson <gbenson@redhat.com>
4828
4829 * server.c (handle_qxfer_exec_file): Use current process
4830 if annex is empty.
4831
4832 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4833
4834 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4835 Remove HAVE_PTRACE_GETREGS conditionals.
4836 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4837 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4838
4839 2015-05-08 Yao Qi <yao.qi@linaro.org>
4840
4841 * linux-low.c (linux_supports_conditional_breakpoints): New
4842 function.
4843 (linux_target_ops): Install new target method.
4844 * lynx-low.c (lynx_target_ops): Install NULL hook for
4845 supports_conditional_breakpoints.
4846 * nto-low.c (nto_target_ops): Likewise.
4847 * spu-low.c (spu_target_ops): Likewise.
4848 * win32-low.c (win32_target_ops): Likewise.
4849 * server.c (handle_query): Check
4850 target_supports_conditional_breakpoints.
4851 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4852 New field.
4853 (target_supports_conditional_breakpoints): New macro.
4854
4855 2015-05-06 Pedro Alves <palves@redhat.com>
4856
4857 PR server/18081
4858 * server.c (start_inferior): If the process exits, mourn it.
4859
4860 2015-04-21 Gary Benson <gbenson@redhat.com>
4861
4862 * hostio.c (fileio_open_flags_to_host): Factored out to
4863 fileio_to_host_openflags in common/fileio.c. Single use
4864 updated.
4865
4866 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4867
4868 * linux-xtensa-low.c (xtensa_fill_gregset)
4869 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4870 XCHAL_HAVE_LOOP.
4871
4872 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4873
4874 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4875 (regs_info): Replace usrregs pointer with NULL.
4876
4877 2015-04-17 Gary Benson <gbenson@redhat.com>
4878
4879 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4880 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4881 * server.c (handle_qxfer_exec_file): New function.
4882 (qxfer_packets): Add exec-file entry.
4883 (handle_query): Report qXfer:exec-file:read as supported packet.
4884
4885 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4886
4887 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4888
4889 2015-04-09 Gary Benson <gbenson@redhat.com>
4890
4891 * hostio-errno.c (errno_to_fileio_error): Remove function.
4892 Update caller to use remote_fileio_to_fio_error.
4893
4894 2015-04-09 Yao Qi <yao.qi@linaro.org>
4895
4896 * linux-low.c (linux_insert_point): Call
4897 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4898 (linux_remove_point): Call remove_memory_breakpoint if type is
4899 raw_bkpt_type_sw.
4900 * linux-x86-low.c (x86_insert_point): Don't call
4901 insert_memory_breakpoint.
4902 (x86_remove_point): Don't call remove_memory_breakpoint.
4903
4904 2015-04-01 Pedro Alves <palves@redhat.com>
4905 Cleber Rosa <crosa@redhat.com>
4906
4907 * server.c (gdbserver_usage): Reorganize and extend the usage
4908 message.
4909
4910 2015-03-24 Pedro Alves <palves@redhat.com>
4911
4912 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4913 output. Also dump TRAP_TRACE.
4914 (linux_low_filter_event): In debug output, distinguish a
4915 resume_stop SIGSTOP from a delayed SIGSTOP.
4916
4917 2015-03-24 Gary Benson <gbenson@redhat.com>
4918
4919 * linux-x86-low.c (x86_linux_new_thread): Moved to
4920 nat/x86-linux.c.
4921 (x86_linux_prepare_to_resume): Likewise.
4922
4923 2015-03-24 Gary Benson <gbenson@redhat.com>
4924
4925 * Makefile.in (x86-linux-dregs.o): New rule.
4926 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4927 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4928 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4929 (x86_linux_dr_get): Likewise.
4930 (x86_linux_dr_set): Likewise.
4931 (update_debug_registers_callback): Likewise.
4932 (x86_linux_dr_set_addr): Likewise.
4933 (x86_linux_dr_get_addr): Likewise.
4934 (x86_linux_dr_set_control): Likewise.
4935 (x86_linux_dr_get_control): Likewise.
4936 (x86_linux_dr_get_status): Likewise.
4937 (x86_linux_update_debug_registers): Likewise.
4938
4939 2015-03-24 Gary Benson <gbenson@redhat.com>
4940
4941 * linux-x86-low.c (x86_linux_update_debug_registers):
4942 New function, factored out from...
4943 (x86_linux_prepare_to_resume): ...this.
4944
4945 2015-03-24 Gary Benson <gbenson@redhat.com>
4946
4947 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4948 (x86_linux_dr_set): Likewise.
4949 (update_debug_registers_callback): Likewise.
4950 (x86_linux_dr_set_addr): Likewise.
4951 (x86_linux_dr_get_addr): Likewise.
4952 (x86_linux_dr_set_control): Likewise.
4953 (x86_linux_dr_get_control): Likewise.
4954 (x86_linux_dr_get_status): Likewise.
4955 (x86_linux_prepare_to_resume): Likewise.
4956
4957 2015-03-24 Gary Benson <gbenson@redhat.com>
4958
4959 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4960 Use perror_with_name. Pass string through gettext.
4961 (x86_linux_dr_set): Likewise.
4962
4963 2015-03-24 Gary Benson <gbenson@redhat.com>
4964
4965 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4966 (x86_linux_dr_set_addr): ...this.
4967 (x86_dr_low_get_addr): Rename to...
4968 (x86_linux_dr_get_addr): ...this.
4969 (x86_dr_low_set_control): Rename to...
4970 (x86_linux_dr_set_control): ...this.
4971 (x86_dr_low_get_control): Rename to...
4972 (x86_linux_dr_get_control): ...this.
4973 (x86_dr_low_get_status): Rename to...
4974 (x86_linux_dr_get_status): ...this.
4975 (x86_dr_low): Update with new function names.
4976
4977 2015-03-24 Gary Benson <gbenson@redhat.com>
4978
4979 * Makefile.in (x86-linux.o): New rule.
4980 * configure.srv: Add x86-linux.o to relevant targets.
4981 * linux-low.c (lwp_set_arch_private_info): New function.
4982 (lwp_arch_private_info): Likewise.
4983 * linux-x86-low.c: Include nat/x86-linux.h.
4984 (arch_lwp_info): Removed structure.
4985 (update_debug_registers_callback):
4986 Use lwp_set_debug_registers_changed.
4987 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4988 and lwp_set_debug_registers_changed.
4989 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4990
4991 2015-03-24 Gary Benson <gbenson@redhat.com>
4992
4993 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4994 * linux-arm-low.c (arm_new_thread): Likewise.
4995 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4996 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4997 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4998 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4999
5000 2015-03-24 Gary Benson <gbenson@redhat.com>
5001
5002 * linux-low.c (ptid_of_lwp): New function.
5003 (lwp_is_stopped): Likewise.
5004 (lwp_stop_reason): Likewise.
5005 * linux-x86-low.c (update_debug_registers_callback):
5006 Use lwp_is_stopped.
5007 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5008 lwp_stop_reason.
5009
5010 2015-03-24 Gary Benson <gbenson@redhat.com>
5011
5012 * linux-low.h (linux_stop_lwp): Remove declaration.
5013
5014 2015-03-24 Gary Benson <gbenson@redhat.com>
5015
5016 * linux-low.h: Include nat/linux-nat.h.
5017 * linux-low.c (iterate_over_lwps_args): New structure.
5018 (iterate_over_lwps_filter): New function.
5019 (iterate_over_lwps): Likewise.
5020 * linux-x86-low.c (update_debug_registers_callback):
5021 Update signature to what iterate_over_lwps expects.
5022 Remove PID check that iterate_over_lwps now performs.
5023 (x86_dr_low_set_addr): Use iterate_over_lwps.
5024 (x86_dr_low_set_control): Likewise.
5025
5026 2015-03-24 Gary Benson <gbenson@redhat.com>
5027
5028 * linux-x86-low.c (x86_debug_reg_state): New function.
5029 (x86_linux_prepare_to_resume): Use the above.
5030
5031 2015-03-24 Gary Benson <gbenson@redhat.com>
5032
5033 * linux-low.c (current_lwp_ptid): New function.
5034 * linux-x86-low.c: Include nat/linux-nat.h.
5035 (x86_dr_low_get_addr): Use current_lwp_ptid.
5036 (x86_dr_low_get_control): Likewise.
5037 (x86_dr_low_get_status): Likewise.
5038
5039 2015-03-20 Pedro Alves <palves@redhat.com>
5040
5041 * tracepoint.c (cmd_qtstatus): Make "str" const.
5042
5043 2015-03-20 Pedro Alves <palves@redhat.com>
5044
5045 * server.c (handle_general_set): Make "req_str" const.
5046
5047 2015-03-19 Pedro Alves <palves@redhat.com>
5048
5049 * linux-low.c (linux_resume_one_lwp): Rename to ...
5050 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5051 instead call perror_with_name.
5052 (check_ptrace_stopped_lwp_gone): New function.
5053 (linux_resume_one_lwp): Reimplement as wrapper around
5054 linux_resume_one_lwp_throw that swallows errors if the LWP is
5055 gone.
5056
5057 2015-03-19 Pedro Alves <palves@redhat.com>
5058
5059 * linux-low.c (count_events_callback, select_event_lwp_callback):
5060 No longer check whether the thread has resume_stop as last resume
5061 kind.
5062
5063 2015-03-19 Pedro Alves <palves@redhat.com>
5064
5065 * linux-low.c (count_events_callback, select_event_lwp_callback):
5066 Use the lwp's status_pending_p field, not the thread's.
5067
5068 2015-03-19 Pedro Alves <palves@redhat.com>
5069
5070 * linux-low.c (select_event_lwp_callback): Update comments to
5071 no longer mention SIGTRAP.
5072
5073 2015-03-18 Gary Benson <gbenson@redhat.com>
5074
5075 * server.c (handle_query): Do not report vFile:fstat as supported.
5076
5077 2015-03-11 Gary Benson <gbenson@redhat.com>
5078
5079 * hostio.c (sys/types.h): New include.
5080 (sys/stat.h): Likewise.
5081 (common-remote-fileio.h): Likewise.
5082 (handle_fstat): New function.
5083 (handle_vFile): Handle vFile:fstat packets.
5084
5085 2015-03-11 Gary Benson <gbenson@redhat.com>
5086
5087 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5088 struct stat.st_blocks and struct stat.st_blksize.
5089 * configure: Regenerate.
5090 * config.in: Likewise.
5091 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5092 (OBS): Add common-remote-fileio.o.
5093 (common-remote-fileio.o): New rule.
5094
5095 2015-03-09 Pedro Alves <palves@redhat.com>
5096
5097 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5098 'struct sockaddr' pointer in 'accept' call.
5099
5100 2015-03-09 Pedro Alves <palves@redhat.com>
5101
5102 Revert:
5103 2015-03-07 Pedro Alves <palves@redhat.com>
5104 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5105 or <winsock2.h> here. Instead include "gdb_socket.h".
5106 (remote_open): Use union gdb_sockaddr_u.
5107 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5108 or <winsock2.h> here. Instead include "gdb_socket.h".
5109 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5110 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5111 or <sys/un.h>.
5112 (init_named_socket, gdb_agent_helper_thread): Use union
5113 gdb_sockaddr_u.
5114
5115 2015-03-07 Pedro Alves <palves@redhat.com>
5116
5117 * configure.ac (build_warnings): Move
5118 -Wdeclaration-after-statement to the C-specific set.
5119 * configure: Regenerate.
5120
5121 2015-03-07 Pedro Alves <palves@redhat.com>
5122
5123 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5124 or <winsock2.h> here. Instead include "gdb_socket.h".
5125 (remote_open): Use union gdb_sockaddr_u.
5126 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5127 or <winsock2.h> here. Instead include "gdb_socket.h".
5128 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5129 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5130 or <sys/un.h>.
5131 (init_named_socket, gdb_agent_helper_thread): Use union
5132 gdb_sockaddr_u.
5133
5134 2015-03-07 Pedro Alves <palves@redhat.com>
5135
5136 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5137 instead.
5138
5139 2015-03-06 Yao Qi <yao.qi@linaro.org>
5140
5141 * linux-aarch64-low.c (aarch64_insert_point): Use
5142 show_debug_regs as a boolean.
5143 (aarch64_remove_point): Likewise.
5144
5145 2015-03-05 Pedro Alves <palves@redhat.com>
5146
5147 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5148 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5149 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5150 * nto-low.c (nto_target_ops): Likewise.
5151 * spu-low.c (spu_target_ops): Likewise.
5152 * win32-low.c (win32_target_ops): Likewise.
5153
5154 2015-03-04 Pedro Alves <palves@redhat.com>
5155
5156 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5157 Decide whether a breakpoint triggered based on the SIGTRAP's
5158 siginfo.si_code.
5159 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5160 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5161 (linux_low_filter_event): Check for breakpoints before checking
5162 watchpoints.
5163 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5164 siginfo.si_code.
5165 (linux_stopped_by_sw_breakpoint)
5166 (linux_supports_stopped_by_sw_breakpoint)
5167 (linux_stopped_by_hw_breakpoint)
5168 (linux_supports_stopped_by_hw_breakpoint): New functions.
5169 (linux_target_ops): Install new target methods.
5170
5171 2015-03-04 Pedro Alves <palves@redhat.com>
5172
5173 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5174 * server.c (swbreak_feature, hwbreak_feature): New globals.
5175 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5176 (captured_main): Clear swbreak_feature and hwbreak_feature.
5177 * server.h (swbreak_feature, hwbreak_feature): Declare.
5178 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5179 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5180 supports_stopped_by_hw_breakpoint>: New fields.
5181 (target_supports_stopped_by_sw_breakpoint)
5182 (target_stopped_by_sw_breakpoint)
5183 (target_supports_stopped_by_hw_breakpoint)
5184 (target_stopped_by_hw_breakpoint): Declare.
5185
5186 2015-03-04 Pedro Alves <palves@redhat.com>
5187
5188 enum lwp_stop_reason -> enum target_stop_reason
5189 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5190 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5191 (linux_wait_1, stuck_in_jump_pad_callback)
5192 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5193 (linux_stopped_by_watchpoint):
5194 * linux-low.h (enum lwp_stop_reason): Delete.
5195 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5196 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5197
5198 2015-03-04 Yao Qi <yao.qi@linaro.org>
5199
5200 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5201
5202 2015-03-03 Gary Benson <gbenson@redhat.com>
5203
5204 * hostio.c (handle_vFile): Fix prefix lengths.
5205
5206 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5207
5208 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5209 ptr_bits.
5210
5211 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5212
5213 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5214 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5215 (clean): Add "rm -f" for above C files.
5216 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5217 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5218 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5219 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5220 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5221 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5222 (init_registers_s390x_vx_linux64)
5223 (init_registers_s390x_tevx_linux64)
5224 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5225 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5226 declarations.
5227 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5228 (s390_store_vxrs_high): New functions.
5229 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5230 NT_S390_VXRS_HIGH.
5231 (s390_arch_setup): Add logic for selecting one of the new target
5232 descriptions. Activate the new vector regsets if applicable.
5233 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5234 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5235 and init_registers_s390x_tevx_linux64.
5236
5237 2015-03-01 Pedro Alves <palves@redhat.com>
5238
5239 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5240 parameter.
5241
5242 2015-02-27 Pedro Alves <palves@redhat.com>
5243
5244 * linux-x86-low.c (u_debugreg_offset): New function.
5245 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5246
5247 2015-02-27 Pedro Alves <palves@redhat.com>
5248
5249 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5250 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5251 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5252 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5253 (ps_lsetfpregs, ps_getpid)
5254 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5255 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5256 (ps_lsetxregs, ps_plog): Declare.
5257
5258 2015-02-27 Pedro Alves <palves@redhat.com>
5259
5260 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5261 IP_AGENT_EXPORT_FUNC.
5262 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5263 IP_AGENT_EXPORT_FUNC.
5264 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5265 (IP_AGENT_EXPORT): Delete.
5266 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5267 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5268 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5269 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5270 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5271 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5272 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5273 (traceframe_read_count, traceframe_write_count)
5274 (traceframes_created, trace_state_variables, get_raw_reg)
5275 (get_trace_state_variable_value, set_trace_state_variable_value)
5276 (ust_loaded, helper_thread_id, cmd_buf): Use
5277 IPA_SYM_EXPORTED_NAME.
5278 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5279 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5280 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5281 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5282 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5283 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5284 EXTERN_C_PUSH/EXTERN_C_POP.
5285 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5286 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5287 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5288 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5289 (traceframe_write_count, traceframe_read_count)
5290 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5291 (about_to_request_buffer_space, get_trace_state_variable_value)
5292 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5293 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5294 EXTERN_C_PUSH/EXTERN_C_POP.
5295 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5296 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5297 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5298 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5299 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5300 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5301 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5302 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5303 Define.
5304 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5305 (IP_AGENT_EXPORT_VAR_DECL): Define.
5306 (tracing): Declare.
5307 (gdb_agent_get_raw_reg): Declare.
5308
5309 2015-02-27 Tom Tromey <tromey@redhat.com>
5310 Pedro Alves <palves@redhat.com>
5311
5312 Rename symbols whose names are reserved C++ keywords throughout.
5313
5314 2015-02-27 Pedro Alves <palves@redhat.com>
5315
5316 * Makefile.in (COMPILER): New, get it from autoconf.
5317 (CXX): Get from autoconf instead.
5318 (COMPILE.pre): Use COMPILER.
5319 (CC-LD): Rename to ...
5320 (CC_LD): ... this. Use COMPILER.
5321 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5322 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5323 * acinclude.m4: Include build-with-cxx.m4.
5324 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5325 Disable -Werror by default if building in C++ mode.
5326 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5327 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5328 the C++ compiler. Save/restore CXXFLAGS too.
5329 * configure: Regenerate.
5330
5331 2015-02-27 Pedro Alves <palves@redhat.com>
5332
5333 * acinclude.m4: Include libiberty.m4.
5334 * configure.ac: Call libiberty_INIT.
5335 * config.in, configure: Regenerate.
5336
5337 2015-02-26 Pedro Alves <palves@redhat.com>
5338
5339 * linux-low.c (linux_wait_1): When incrementing the PC past a
5340 program breakpoint always use the_low_target.breakpoint_len as
5341 increment, rather than the maximum between that and
5342 the_low_target.decr_pc_after_break.
5343
5344 2015-02-23 Pedro Alves <palves@redhat.com>
5345
5346 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5347 thread was doing a step-over; always adjust the PC if
5348 we stepped over a permanent breakpoint.
5349 (linux_wait_1): If we stepped over breakpoint that was on top of a
5350 permanent breakpoint, manually advance the PC past it.
5351
5352 2015-02-23 Pedro Alves <palves@redhat.com>
5353
5354 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5355 modes.
5356 (x86_fill_gregset, x86_store_gregset): Use it when handling
5357 $orig_eax.
5358
5359 2015-02-20 Pedro Alves <palves@redhat.com>
5360
5361 * thread-db.c: Include "nat/linux-procfs.h".
5362 (thread_db_init): Skip listing new threads if the kernel supports
5363 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5364
5365 2015-02-20 Pedro Alves <palves@redhat.com>
5366
5367 * linux-low.c (status_pending_p_callback): Use ptid_match.
5368
5369 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5370
5371 PR breakpoints/16812
5372 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5373 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5374 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5375
5376 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5377
5378 PR breakpoints/15956
5379 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5380
5381 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5382
5383 * linux-low.c (linux_low_btrace_conf): Print size.
5384 * server.c (handle_btrace_conf_general_set): New.
5385 (hanle_general_set): Call handle_btrace_conf_general_set.
5386 (handle_query): Report Qbtrace-conf:bts:size as supported.
5387
5388 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5389
5390 * linux-low.c (linux_low_enable_btrace): Update parameters.
5391 (linux_low_btrace_conf): New.
5392 (linux_target_ops)<to_btrace_conf>: Initialize.
5393 * server.c (current_btrace_conf): New.
5394 (handle_btrace_enable): Rename to ...
5395 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5396 to target_enable_btrace. Update comment. Update users.
5397 (handle_qxfer_btrace_conf): New.
5398 (qxfer_packets): Add btrace-conf entry.
5399 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5400 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5401 (target_ops)<read_btrace_conf>: New.
5402 (target_enable_btrace): Update parameters.
5403 (target_read_btrace_conf): New.
5404
5405 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5406
5407 * server.c (handle_btrace_general_set): Remove call to
5408 target_supports_btrace.
5409 (supported_btrace_packets): New.
5410 (handle_query): Call supported_btrace_packets.
5411 * target.h: include btrace-common.h.
5412 (btrace_target_info): Removed.
5413 (supports_btrace, target_supports_btrace): Update parameters.
5414
5415 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5416
5417 * Makefile.in (SFILES): Add common/btrace-common.c.
5418 (OBS): Add common/btrace-common.o.
5419 (btrace-common.o): Add build rules.
5420 * linux-low: Include btrace-common.h.
5421 (linux_low_read_btrace): Use struct btrace_data. Call
5422 btrace_data_init and btrace_data_fini.
5423
5424 2015-02-06 Pedro Alves <palves@redhat.com>
5425
5426 * thread-db.c (find_new_threads_callback): Add debug output.
5427
5428 2015-02-04 Pedro Alves <palves@redhat.com>
5429
5430 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5431 (resume_stopped_resumed_lwps): New function.
5432 (linux_wait_for_event_filtered): Use it.
5433
5434 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5435
5436 * Makefile.in (SFILES): Add linux-personality.c.
5437 (linux-personality.o): New rule.
5438 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5439 list of objects to be built.
5440 * linux-low.c: Include nat/linux-personality.h.
5441 (linux_create_inferior): Remove code to disable address space
5442 randomization (moved to ../nat/linux-personality.c). Create
5443 cleanup to disable address space randomization.
5444
5445 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5446
5447 * Makefile.in (posix-strerror.o): New rule.
5448 (mingw-strerror.o): Likewise.
5449 * configure: Regenerated.
5450 * configure.ac: Source file ../common/common.host. Initialize new
5451 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5452
5453 2015-01-14 Yao Qi <yao@codesourcery.com>
5454
5455 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5456 (ppc-linux.o): New rule.
5457 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5458 * configure.ac: AC_CHECK_FUNCS(getauxval).
5459 * config.in: Re-generated.
5460 * configure: Re-generated.
5461 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5462 ppc64_64bit_inferior_p
5463
5464 2015-01-14 Yao Qi <yao@codesourcery.com>
5465
5466 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5467 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5468 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5469 (PT_ORIG_R3, PT_TRAP): Likewise.
5470 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5471 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5472 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5473
5474 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5475
5476 * i387-fp.c (i387_cache_to_xsave): In look over
5477 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5478 zmmh_low_space field by use of zmmh_high_space.
5479
5480 2015-01-09 Pedro Alves <palves@redhat.com>
5481
5482 * linux-low.c (step_over_bkpt): Move higher up in the file.
5483 (handle_extended_wait): Don't store the stop_pc here.
5484 (get_stop_pc): Adjust comments and rename to ...
5485 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5486 stopped for a software breakpoint or hardware breakpoint.
5487 (thread_still_has_status_pending_p): New function.
5488 (status_pending_p_callback): Use
5489 thread_still_has_status_pending_p. If the event is no longer
5490 interesting, resume the LWP.
5491 (handle_tracepoints): Add assert.
5492 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5493 (wstatus_maybe_breakpoint): New function.
5494 (cancel_breakpoint): Delete function.
5495 (check_stopped_by_watchpoint): New function, factored out from
5496 linux_low_filter_event.
5497 (lp_status_maybe_breakpoint): Delete function.
5498 (linux_low_filter_event): Remove filter_ptid argument.
5499 Leave thread group exits pending here. Store the LWP's stop PC.
5500 Always leave events pending.
5501 (linux_wait_for_event_filtered): Pull all events out of the
5502 kernel, and leave them all pending.
5503 (count_events_callback, select_event_lwp_callback): Consider all
5504 events.
5505 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5506 (select_event_lwp): Only give preference to the stepping LWP in
5507 all-stop mode. Adjust comments.
5508 (ignore_event): New function.
5509 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5510 references to cancel_breakpoints. Adjust to renames. Also give
5511 equal priority to all LWPs that have had events in non-stop mode.
5512 If reporting a software breakpoint event, unadjust the LWP's PC.
5513 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5514 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5515 Adjust.
5516 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5517 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5518 (linux_stopped_by_watchpoint): Adjust.
5519 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5520 * linux-low.h (enum lwp_stop_reason): New.
5521 (struct lwp_info) <stop_pc>: Adjust comment.
5522 <stopped_by_watchpoint>: Delete field.
5523 <stop_reason>: New field.
5524 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5525 * mem-break.c (software_breakpoint_inserted_here)
5526 (hardware_breakpoint_inserted_here): New function.
5527 * mem-break.h (software_breakpoint_inserted_here)
5528 (hardware_breakpoint_inserted_here): Declare.
5529 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5530 (cancel_breakpoints): Delete.
5531 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5532 (upload_fast_traceframes): Remove references to
5533 cancel_breakpoints.
5534
5535 2015-01-09 Pedro Alves <palves@redhat.com>
5536
5537 * thread-db.c (find_new_threads_callback): Ignore thread if the
5538 kernel thread ID is -1.
5539
5540 2015-01-09 Pedro Alves <palves@redhat.com>
5541
5542 * linux-low.c (linux_attach_fail_reason_string): Move to
5543 nat/linux-ptrace.c, and rename.
5544 (linux_attach_lwp): Update comment.
5545 (attach_proc_task_lwp_callback): New function.
5546 (linux_attach): Adjust to rename and use
5547 linux_proc_attach_tgid_threads.
5548 (linux_attach_fail_reason_string): Delete declaration.
5549
5550 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5551
5552 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5553 * server.c (gdbserver_version): Likewise.
5554
5555 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5556
5557 * remote-utils.c: Include ctype.h.
5558 (input_interrupt): Explicitly handle the case when the char
5559 received is the NUL byte. Improve the printing of non-ASCII
5560 characters.
5561
5562 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5563
5564 * linux-low.c (linux_low_filter_event): Update call to
5565 linux_enable_event_reporting following the addition of
5566 a new parameter to that function.
5567
5568 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5569
5570 PR server/17457
5571 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5572 (AARCH64_FPCR_REGNO): Likewise.
5573 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5574 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5575 (aarch64_store_fpregset): Likewise.
5576
5577 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5578
5579 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5580 Remove FIXME comment about assumption about N.
5581
5582 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5583
5584 * configure.ac: If large-file support is disabled in GDBserver,
5585 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5586 * configure: Regenerate.
5587
5588 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5589
5590 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5591 warning upon ENODATA from ptrace.
5592 * linux-s390-low.c (s390_store_tdb): New.
5593 (s390_regsets): Add regset for NT_S390_TDB.
5594
5595 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5596
5597 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5598 without a fill_function.
5599 * linux-s390-low.c (s390_fill_last_break): Remove.
5600 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5601 (s390_arch_setup): Use regset's size instead of fill_function for
5602 loop end condition.
5603
5604 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5605
5606 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5607 the regset's store function when ptrace returned an error.
5608 * regcache.c (get_thread_regcache): Invalidate register cache
5609 before fetching inferior's registers.
5610
5611 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5612
5613 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5614 while-loop as for-loop.
5615 (regsets_store_inferior_registers): Likewise.
5616
5617 2014-11-28 Yao Qi <yao@codesourcery.com>
5618
5619 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5620 * config.in, configure: Re-generate.
5621 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5622 is defined.
5623
5624 2014-11-21 Yao Qi <yao@codesourcery.com>
5625
5626 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5627 (AC_CHECK_HEADERS): Remove malloc.h.
5628 * configure: Re-generated.
5629 * config.in: Re-generated.
5630 * server.h: Don't include alloca.h and malloc.h.
5631 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5632 Don't include malloc.h.
5633
5634 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5635
5636 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5637 corresponding ERRNO check in same block.
5638
5639 2014-11-12 Pedro Alves <palves@redhat.com>
5640
5641 * server.c (cont_thread): Update comment.
5642 (start_inferior, attach_inferior): No longer clear cont_thread.
5643 (handle_v_cont): No longer set cont_thread.
5644 (captured_main): Clear cont_thread each time a GDB connects.
5645
5646 2014-11-12 Pedro Alves <palves@redhat.com>
5647
5648 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5649 thread, and don't resume all threads if the Hc thread has exited.
5650
5651 2014-11-12 Pedro Alves <palves@redhat.com>
5652
5653 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5654 the process group instead of to a specific LWP.
5655
5656 2014-10-15 Pedro Alves <palves@redhat.com>
5657
5658 PR server/17487
5659 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5660 parameter.
5661 (arm_set_thread_context): Delete.
5662 (the_low_target): Adjust.
5663 * win32-i386-low.c (debug_registers_changed)
5664 (debug_registers_used): Delete.
5665 (update_debug_registers_callback): New function.
5666 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5667 needing to update their debug registers.
5668 (win32_get_current_dr): New function.
5669 (x86_dr_low_get_addr, x86_dr_low_get_control)
5670 (x86_dr_low_get_status): Fetch the debug register from the thread
5671 record's context.
5672 (i386_initial_stuff): Adjust.
5673 (i386_get_thread_context): Remove current_event parameter. Don't
5674 clear debug_registers_changed nor copy DR values to
5675 debug_reg_state.
5676 (i386_set_thread_context): Delete.
5677 (i386_prepare_to_resume): New function.
5678 (i386_thread_added): Mark the thread as needing to update irs
5679 debug registers.
5680 (the_low_target): Remove i386_set_thread_context and install
5681 i386_prepare_to_resume.
5682 * win32-low.c (win32_get_thread_context): Adjust.
5683 (win32_set_thread_context): Use SetThreadContext
5684 directly.
5685 (win32_prepare_to_resume): New function.
5686 (win32_require_context): New function, factored out from ...
5687 (thread_rec): ... this.
5688 (continue_one_thread): Call win32_prepare_to_resume on each thread
5689 we're about to continue.
5690 (win32_resume): Call win32_prepare_to_resume on the event thread.
5691 * win32-low.h (struct win32_thread_info)
5692 <debug_registers_changed>: New field.
5693 (struct win32_target_ops): Change prototype of set_thread_context,
5694 delete set_thread_context and add prepare_to_resume.
5695 (win32_require_context): New declaration.
5696
5697 2014-10-08 Gary Benson <gbenson@redhat.com>
5698
5699 * server.h: Do not include common-exceptions.h.
5700
5701 2014-10-08 Gary Benson <gbenson@redhat.com>
5702
5703 * server.h: Do not include cleanups.h.
5704
5705 2014-09-30 James Hogan <james.hogan@imgtec.com>
5706
5707 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5708 mips64-dsp-linux.c.
5709
5710 2014-09-23 Yao Qi <yao@codesourcery.com>
5711
5712 * linux-low.c (lp_status_maybe_breakpoint): New function.
5713 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5714 (count_events_callback): Likewise.
5715 (select_event_lwp_callback): Likewise.
5716 (cancel_breakpoints_callback): Likewise.
5717
5718 2014-09-19 Don Breazeal <donb@codesourcery.com>
5719
5720 * linux-low.c (handle_extended_wait): Call
5721 linux_ptrace_get_extended_event.
5722 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5723 linux_is_extended_waitstatus.
5724
5725 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5726
5727 * Makefile.in (CPPFLAGS): Define.
5728 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5729 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5730
5731 2014-09-16 Gary Benson <gbenson@redhat.com>
5732
5733 * inferiors.h (current_inferior): Renamed as...
5734 (current_thread): New variable. All uses updated.
5735 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5736 (maybe_move_out_of_jump_pad): Likewise.
5737 (cancel_breakpoint): Likewise.
5738 (linux_low_filter_event): Likewise.
5739 (wait_for_sigstop): Likewise.
5740 (linux_resume_one_lwp): Likewise.
5741 (need_step_over_p): Likewise.
5742 (start_step_over): Likewise.
5743 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5744 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5745 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5746 and save_inferior as saved_thread.
5747 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5748 saved_thread.
5749 (regcache_invalidate_thread): Likewise.
5750 * remote-utils.c (prepare_resume_reply): Likewise.
5751 * thread-db.c (thread_db_get_tls_address): Likewise.
5752 (disable_thread_event_reporting): Likewise.
5753 (remove_thread_event_breakpoints): Likewise.
5754 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5755 as saved_thread.
5756 * target.h (set_desired_inferior): Renamed as...
5757 (set_desired_thread): New declaration. All uses updated.
5758 * server.c (myresume): Updated comment to reference thread instead
5759 of inferior.
5760 (handle_serial_event): Likewise.
5761 (handle_target_event): Likewise.
5762
5763 2014-09-12 Tom Tromey <tromey@redhat.com>
5764 Gary Benson <gbenson@redhat.com>
5765
5766 * regcache.h: Include common-regcache.h.
5767 (regcache_read_pc): Don't declare.
5768 * regcache.c (get_thread_regcache_for_ptid): New function.
5769
5770 2014-09-11 Tom Tromey <tromey@redhat.com>
5771 Gary Benson <gbenson@redhat.com>
5772
5773 * symbol.c: New file.
5774 * Makefile.in (SFILES): Add symbol.c.
5775 (OBS): Add symbol.o.
5776
5777 2014-09-11 Gary Benson <gbenson@redhat.com>
5778
5779 * target.c (target_stop_ptid, target_continue_ptid): New
5780 functions.
5781
5782 2014-09-11 Tom Tromey <tromey@redhat.com>
5783 Gary Benson <gbenson@redhat.com>
5784
5785 * target.h: Include target/target.h.
5786 * target.c (target_read_memory, target_read_uint32)
5787 (target_write_memory): New functions.
5788
5789 2014-09-11 Gary Benson <gbenson@redhat.com>
5790
5791 * server.h (debug_hw_points): Don't declare.
5792 * server.c (debug_hw_points): Don't define. Replace all uses
5793 with show_debug_regs.
5794 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5795 all uses with show_debug_regs.
5796
5797 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5798
5799 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5800 endianness into account.
5801 (ppc_supply_ptrace_register): Likewise.
5802
5803 2014-09-03 James Hogan <james.hogan@imgtec.com>
5804
5805 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5806 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5807
5808 2014-09-03 Gary Benson <gbenson@redhat.com>
5809
5810 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5811 ALL_DEBUG_ADDRESS_REGISTERS.
5812
5813 2014-09-02 Gary Benson <gbenson@redhat.com>
5814
5815 * i386-low.h: Renamed as...
5816 * x86-low.h: New file. All type, function and variable name
5817 prefixes changed from "i386_" to "x86_". All references updated.
5818 * i386-low.c: Renamed as...
5819 * x86-low.c: New file. All type, function and variable name
5820 prefixes changed from "i386_" to "x86_". All references updated.
5821
5822 2014-09-02 Gary Benson <gbenson@redhat.com>
5823
5824 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5825 (x86_linux_new_thread): Likewise.
5826
5827 2014-08-29 Gary Benson <gbenson@redhat.com>
5828
5829 * server.h (setjmp.h): Do not include.
5830 (toplevel): Do not declare.
5831 (common-exceptions.h): Include.
5832 (cleanups.h): Likewise.
5833 * server.c (toplevel): Do not define.
5834 (exit_code): New static global.
5835 (detach_or_kill_for_exit_cleanup): New function.
5836 (main): New function. Original main renamed to...
5837 (captured_main): New function.
5838 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5839
5840 2014-08-29 Gary Benson <gbenson@redhat.com>
5841
5842 * Makefile.in (SFILES): Add common/common-exceptions.c.
5843 (OBS): Add common-exceptions.o.
5844 (common-exceptions.o): New rule.
5845 * utils.c (prepare_to_throw_exception): New function.
5846
5847 2014-08-29 Gary Benson <gbenson@redhat.com>
5848
5849 * config.in: Regenerate.
5850 * configure: Likewise.
5851
5852 2014-08-29 Gary Benson <gbenson@redhat.com>
5853
5854 * Makefile.in (SFILES): Add common/cleanups.c.
5855 (OBS): cleanups.o.
5856 (cleanups.o): New rule.
5857
5858 2014-08-29 Gary Benson <gbenson@redhat.com>
5859
5860 * utils.c (internal_vwarning): New function.
5861
5862 2014-08-28 Gary Benson <gbenson@redhat.com>
5863
5864 * utils.h (fatal): Remove declaration.
5865 * utils.c (fatal): Remove function.
5866
5867 2014-08-28 Gary Benson <gbenson@redhat.com>
5868
5869 * tracepoint.c (gdb_agent_init): Replace fatal with
5870 perror_with_name.
5871 (initialize_tracepoint): Likewise.
5872
5873 2014-08-28 Gary Benson <gbenson@redhat.com>
5874
5875 * remote-utils.c (remote_prepare): Replace fatal with error.
5876
5877 2014-08-28 Gary Benson <gbenson@redhat.com>
5878
5879 * linux-low.c (linux_async): Replace fatal with warning.
5880 Tidy up and return.
5881 (linux_start_non_stop): Return -1 if linux_async failed.
5882
5883 2014-08-28 Gary Benson <gbenson@redhat.com>
5884
5885 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5886 gdb_assert.
5887 (i386_dr_low_get_addr): Remove vague comment.
5888 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5889 gdb_assert.
5890
5891 2014-08-28 Gary Benson <gbenson@redhat.com>
5892
5893 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5894 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5895 internal_error.
5896 (linux_resume_one_lwp): Likewise.
5897 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5898 gdb_assert.
5899 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5900 with internal_error.
5901 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5902 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5903 (find_register_by_name): Replace fatal with internal_error.
5904 (find_regno): Likewise.
5905 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5906 * thread-db.c (thread_db_create_event): Likewise.
5907 (thread_db_load_search): Likewise.
5908 (try_thread_db_load_1): Likewise.
5909 * tracepoint.c (get_jump_space_head): Replace fatal with
5910 internal_error.
5911 (claim_trampoline_space): Likewise.
5912 (have_fast_tracepoint_trampoline_buffer): Likewise.
5913 (cmd_qtstart): Likewise.
5914 (stop_tracing): Likewise.
5915 (fast_tracepoint_collecting): Likewise.
5916 (target_malloc): Likewise.
5917 (download_tracepoint): Likewise.
5918 (download_trace_state_variables): Replace check with gdb_assert.
5919 (upload_fast_traceframes): Replace fatal with internal_error.
5920
5921 2014-08-19 Tom Tromey <tromey@redhat.com>
5922 Gary Benson <gbenson@redhat.com>
5923
5924 * Makefile.in (SFILES): Add common/common-debug.c.
5925 (OBS): Add common-debug.o.
5926 (common-debug.o): New rule.
5927 * debug.h (debug_printf): Don't declare.
5928 * debug.c (debug_printf): Renamed and rewritten as...
5929 (debug_vprintf): New function.
5930
5931 2014-08-19 Gary Benson <gbenson@redhat.com>
5932
5933 * utils.h: Do not include print-utils.h.
5934
5935 2014-08-19 Tom Tromey <tromey@redhat.com>
5936 Gary Benson <gbenson@redhat.com>
5937
5938 * server.h: Add static assertion.
5939 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5940
5941 2014-08-19 Tom Tromey <tromey@redhat.com>
5942 Gary Benson <gbenson@redhat.com>
5943
5944 * Makefile.in (SFILES): Add common/errors.c.
5945 (OBS): Add errors.o.
5946 (IPA_OBS): Add errors-ipa.o.
5947 (errors.o): New rule.
5948 (errors-ipa.o): Likewise.
5949 * utils.h (perror_with_name, error, warning): Don't declare.
5950 * utils.c (warning): Renamed and rewritten as...
5951 (vwarning): New function.
5952 (error): Renamed and rewritten as...
5953 (verror): New function.
5954 (internal_error): Renamed and rewritten as...
5955 (internal_verror): New function.
5956
5957 2014-08-07 Gary Benson <gbenson@redhat.com>
5958
5959 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5960 * configure: Regenerate.
5961 * config.in: Likewise.
5962 * server.h: Do not include errno.h.
5963 * event-loop.c: Likewise.
5964 * hostio-errno.c: Likewise.
5965 * linux-low.c: Likewise.
5966 * remote-utils.c: Likewise.
5967 * spu-low.c: Likewise.
5968 * utils.c: Likewise.
5969 * gdbreplay.c: Unconditionally include errno.h.
5970
5971 2014-08-07 Gary Benson <gbenson@redhat.com>
5972
5973 * server.h: Do not include string.h.
5974 * event-loop.c: Likewise.
5975 * linux-low.c: Likewise.
5976 * regcache.c: Likewise.
5977 * remote-utils.c: Likewise.
5978 * spu-low.c: Likewise.
5979 * utils.c: Likewise.
5980
5981 2014-08-07 Gary Benson <gbenson@redhat.com>
5982
5983 * server.h: Do not include gdb_assert.h.
5984
5985 2014-08-07 Gary Benson <gbenson@redhat.com>
5986
5987 * server.h: Do not include common-utils.h.
5988
5989 2014-08-07 Gary Benson <gbenson@redhat.com>
5990
5991 * server.h: Do not include ptid.h.
5992 * notif.h: Likewise.
5993
5994 2014-08-07 Gary Benson <gbenson@redhat.com>
5995
5996 * server.h: Do not include gdb_locale.h.
5997
5998 2014-08-07 Gary Benson <gbenson@redhat.com>
5999
6000 * server.h: Do not include gdb/signals.h.
6001 * win32-low.c: Likewise.
6002
6003 2014-08-07 Gary Benson <gbenson@redhat.com>
6004
6005 * server.h: Do not include pathmax.h.
6006
6007 2014-08-07 Gary Benson <gbenson@redhat.com>
6008
6009 * server.h: Do not include libiberty.h.
6010 * linux-bfin-low.c: Likewise.
6011
6012 2014-08-07 Gary Benson <gbenson@redhat.com>
6013
6014 * server.h: Do not include ansidecl.h.
6015
6016 2014-08-07 Gary Benson <gbenson@redhat.com>
6017
6018 * linux-x86-low.c: Do not include stddef.h.
6019 * lynx-ppc-low.c: Likewise.
6020 * tracepoint.c: Likewise.
6021
6022 2014-08-07 Gary Benson <gbenson@redhat.com>
6023
6024 * server.h: Do not include stdarg.h.
6025 * nto-low.c: Likewise.
6026
6027 2014-08-07 Gary Benson <gbenson@redhat.com>
6028
6029 * server.h: Do not include stdlib.h.
6030 * inferiors.c: Likewise.
6031 * linux-low.c: Likewise.
6032 * regcache.c: Likewise.
6033 * spu-low.c: Likewise.
6034 * tracepoint.c: Likewise.
6035 * utils.c: Likewise.
6036
6037 2014-08-07 Gary Benson <gbenson@redhat.com>
6038
6039 * server.h: Do not include stdio.h.
6040 * linux-low.c: Likewise.
6041 * remote-utils.c: Likewise.
6042 * spu-low.c: Likewise.
6043 * utils.c: Likewise.
6044 * wincecompat.c: Likewise.
6045
6046 2014-08-06 Gary Benson <gbenson@redhat.com>
6047
6048 * regcache.c (init_register_cache): Move conditionals inside if.
6049
6050 2014-08-06 Gary Benson <gbenson@redhat.com>
6051
6052 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6053
6054 2014-07-31 Gary Benson <gbenson@redhat.com>
6055
6056 * ax.h: Do not include server.h.
6057 * gdbthread.h: Likewise.
6058 * lynx-low.h: Likewise.
6059 * notif.h: Likewise.
6060
6061 2014-07-30 Gary Benson <gbenson@redhat.com>
6062
6063 * server.h: Include common-defs.h.
6064 Do not include config.h or build-gnulib-gdbserver/config.h.
6065
6066 2014-07-30 Gary Benson <gbenson@redhat.com>
6067
6068 * hostio-errno.c: Move server.h to top of includes list.
6069 * inferiors.c: Likewise.
6070 * linux-x86-low.c: Likewise.
6071 * notif.c: Include server.h.
6072
6073 2014-07-24 Tom Tromey <tromey@redhat.com>
6074 Gary Benson <gbenson@redhat.com>
6075
6076 * server.h (CORE_ADDR): Now unsigned.
6077
6078 2014-07-16 Pedro Alves <palves@redhat.com>
6079
6080 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6081
6082 2014-07-15 Pedro Alves <palves@redhat.com>
6083
6084 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6085 copy.
6086
6087 2014-07-11 Pedro Alves <palves@redhat.com>
6088
6089 * linux-low.c (kill_wait_lwp): New function, based on
6090 kill_one_lwp_callback, but use my_waitpid directly.
6091 (kill_one_lwp_callback, linux_kill): Use it.
6092
6093 2014-06-23 Pedro Alves <palves@redhat.com>
6094
6095 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6096 before setting DR0..DR3.
6097
6098 2014-06-20 Gary Benson <gbenson@redhat.com>
6099
6100 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6101 * configure: Regenerated.
6102 * config.in: Likewise.
6103
6104 2014-06-20 Gary Benson <gbenson@redhat.com>
6105
6106 * Makefile.in (SFILES): Update locations for files moved
6107 from common to nat.
6108 (object file files): Reordered.
6109
6110 2014-06-20 Gary Benson <gbenson@redhat.com>
6111
6112 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6113 (i386_dr_low_set_addr): Likewise.
6114 (i386_dr_low_get_addr): Likewise.
6115 (i386_dr_low_can_set_control): Likewise.
6116 (i386_dr_low_set_control): Likewise.
6117 (i386_dr_low_get_control): Likewise.
6118 (i386_dr_low_get_status): Likewise.
6119 (i386_get_debug_register_length): Likewise.
6120 * linux-x86-low.c (i386_dr_low_set_addr):
6121 Changed signature. Made static.
6122 (i386_dr_low_get_addr): Likewise.
6123 (i386_dr_low_set_control): Likewise.
6124 (i386_dr_low_get_control): Likewise.
6125 (i386_dr_low_get_status): Likewise.
6126 (i386_dr_low): New global variable.
6127 * win32-i386-low.c (i386_dr_low_set_addr):
6128 Changed signature. Made static.
6129 (i386_dr_low_get_addr): Likewise.
6130 (i386_dr_low_set_control): Likewise.
6131 (i386_dr_low_get_control): Likewise.
6132 (i386_dr_low_get_status): Likewise.
6133 (i386_dr_low): New global variable.
6134
6135 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6136
6137 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6138 * Makefile.in (AR, AR_FLAGS): Define.
6139 * configure: Regenerate.
6140
6141 2014-06-19 Gary Benson <gbenson@redhat.com>
6142
6143 * Makefile.in (i386-dregs.o): New rule.
6144 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6145 * i386-low.c (target.h): Remove include.
6146 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6147 (DR_CONTROL_SHIFT): Likewise.
6148 (DR_CONTROL_SIZE): Likewise.
6149 (DR_RW_EXECUTE): Likewise.
6150 (DR_RW_WRITE): Likewise.
6151 (DR_RW_READ): Likewise.
6152 (DR_RW_IORW): Likewise.
6153 (DR_LEN_1): Likewise.
6154 (DR_LEN_2): Likewise.
6155 (DR_LEN_4): Likewise.
6156 (DR_LEN_8): Likewise.
6157 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6158 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6159 (DR_ENABLE_SIZE): Likewise.
6160 (DR_LOCAL_SLOWDOWN): Likewise.
6161 (DR_GLOBAL_SLOWDOWN): Likewise.
6162 (DR_CONTROL_RESERVED): Likewise.
6163 (I386_DR_CONTROL_MASK): Likewise.
6164 (I386_DR_VACANT): Likewise.
6165 (I386_DR_LOCAL_ENABLE): Likewise.
6166 (I386_DR_GLOBAL_ENABLE): Likewise.
6167 (I386_DR_DISABLE): Likewise.
6168 (I386_DR_SET_RW_LEN): Likewise.
6169 (I386_DR_GET_RW_LEN): Likewise.
6170 (I386_DR_WATCH_HIT): Likewise.
6171 (i386_wp_op_t): Likewise.
6172 (i386_show_dr): Likewise.
6173 (i386_length_and_rw_bits): Likewise.
6174 (i386_insert_aligned_watchpoint): Likewise.
6175 (i386_remove_aligned_watchpoint): Likewise.
6176 (i386_handle_nonaligned_watchpoint): Likewise.
6177 i386_update_inferior_debug_regs(): Likewise.
6178 (i386_dr_insert_watchpoint): Likewise.
6179 (i386_dr_remove_watchpoint): Likewise.
6180 (i386_dr_region_ok_for_watchpoint): Likewise.
6181 (i386_dr_stopped_data_address): Likewise.
6182 (i386_dr_stopped_by_watchpoint): Likewise.
6183
6184 2014-06-19 Gary Benson <gbenson@redhat.com>
6185
6186 * i386-low.c (i386_dr_show): Renamed to
6187 i386_show_dr and made static. All uses updated.
6188 (i386_dr_length_and_rw_bits): Renamed to
6189 i386_length_and_rw_bits and made static.
6190 All uses updated.
6191 (i386_dr_insert_aligned_watchpoint): Renamed to
6192 i386_insert_aligned_watchpoint and made static.
6193 All uses updated.
6194 (i386_dr_remove_aligned_watchpoint): Renamed to
6195 i386_remove_aligned_watchpoint and made static.
6196 All uses updated.
6197 (i386_dr_update_inferior_debug_regs): Renamed to
6198 i386_update_inferior_debug_regs and made static.
6199 All uses updated.
6200
6201 2014-06-18 Gary Benson <gbenson@redhat.com>
6202
6203 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6204 (i386_dr_low_can_set_control): Likewise.
6205 (i386_get_debug_register_length): Likewise.
6206 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6207 (i386_dr_low_can_set_control): Likewise.
6208 (i386_get_debug_register_length): Likewise.
6209
6210 2014-06-17 Gary Benson <gbenson@redhat.com>
6211
6212 * i386-low.h (i386-dregs.h): New include.
6213 (DR_FIRSTADDR): Now in i386-dregs.h.
6214 (DR_LASTADDR): Likewise.
6215 (DR_NADDR): Likewise.
6216 (DR_STATUS): Likewise.
6217 (DR_CONTROL): Likewise.
6218 (i386_debug_reg_state): Likewise.
6219 (i386_dr_insert_watchpoint): Likewise.
6220 (i386_dr_remove_watchpoint): Likewise.
6221 (i386_dr_region_ok_for_watchpoint): Likewise.
6222 (i386_dr_stopped_data_address): Likewise.
6223 (i386_dr_stopped_by_watchpoint): Likewise.
6224 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6225
6226 2014-06-18 Gary Benson <gbenson@redhat.com>
6227
6228 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6229 i386_dr_insert_watchpoint.
6230 (i386_low_remove_watchpoint): Renamed to
6231 i386_dr_remove_watchpoint.
6232 (i386_low_region_ok_for_watchpoint): Renamed to
6233 i386_dr_region_ok_for_watchpoint.
6234 (i386_low_stopped_data_address): Renamed to
6235 i386_dr_stopped_data_address.
6236 (i386_low_stopped_by_watchpoint): Renamed to
6237 i386_dr_stopped_by_watchpoint.
6238 * i386-low.c (i386_show_dr): Renamed to
6239 i386_dr_show and made nonstatic. All uses updated.
6240 (i386_length_and_rw_bits): Renamed to
6241 i386_dr_length_and_rw_bits and made nonstatic.
6242 All uses updated.
6243 (i386_insert_aligned_watchpoint): Renamed to
6244 i386_dr_insert_aligned_watchpoint and made nonstatic.
6245 All uses updated.
6246 (i386_remove_aligned_watchpoint): Renamed to
6247 i386_dr_remove_aligned_watchpoint and made nonstatic.
6248 All uses updated.
6249 (i386_update_inferior_debug_regs): Renamed to
6250 i386_dr_update_inferior_debug_regs and made nonstatic.
6251 All uses updated.
6252 (i386_low_insert_watchpoint): Renamed to
6253 i386_dr_insert_watchpoint. All uses updated.
6254 (i386_low_remove_watchpoint): Renamed to
6255 i386_dr_remove_watchpoint. All uses updated.
6256 (i386_low_region_ok_for_watchpoint): Renamed to
6257 i386_dr_region_ok_for_watchpoint. All uses updated.
6258 (i386_low_stopped_data_address): Renamed to
6259 i386_dr_stopped_data_address. All uses updated.
6260 (i386_low_stopped_by_watchpoint): Renamed to
6261 i386_dr_stopped_by_watchpoint. All uses updated.
6262
6263 2014-06-18 Gary Benson <gbenson@redhat.com>
6264
6265 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6266 (i386_dr_low_can_set_control): Likewise.
6267 (i386_insert_aligned_watchpoint): New check.
6268
6269 2014-06-18 Gary Benson <gbenson@redhat.com>
6270
6271 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6272 Renamed to state.
6273
6274 2014-06-18 Gary Benson <gbenson@redhat.com>
6275
6276 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6277 instead of fatal and error.
6278 (i386_handle_nonaligned_watchpoint): Likewise.
6279
6280 2014-06-18 Gary Benson <gbenson@redhat.com>
6281
6282 * i386-low.c (i386_get_debug_register_length): New macro.
6283 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6284 (i386_show_dr): Use debug_printf instead of fprintf. Use
6285 phex to format values.
6286
6287 2014-06-18 Gary Benson <gbenson@redhat.com>
6288
6289 * i386-low.h: Comment changes.
6290 * i386-low.c: Likewise.
6291
6292 2014-06-18 Gary Benson <gbenson@redhat.com>
6293
6294 * i386-low.c: Whitespace changes.
6295
6296 2014-06-12 Tom Tromey <tromey@redhat.com>
6297
6298 * utils.c (freeargv): Remove.
6299
6300 2014-06-12 Tom Tromey <tromey@redhat.com>
6301
6302 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6303 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6304 (parse_debug_format_options): Likewise.
6305 (gdbserver_usage): Likewise.
6306 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6307 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6308 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6309 against libiberty.
6310 ($(LIBGNU)): Depend on libiberty.
6311 (all-lib): Recurse into all subdirs.
6312 (install-only): Invoke "install" target in subdirs.
6313 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6314 targets.
6315 * configure: Rebuild.
6316 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6317 for vasprintf, vsnprintf, or gettimeofday.
6318 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6319 srv_tgtobj.
6320
6321 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6322
6323 * development.sh: Delete.
6324 * Makefile.in (config.status): Adjust dependency on development.sh.
6325 * configure.ac: Adjust development.sh source call.
6326 * configure: Regenerate.
6327
6328 2014-06-02 Pedro Alves <palves@redhat.com>
6329
6330 * ax.c (gdb_free_agent_expr): New function.
6331 * ax.h (gdb_free_agent_expr): New declaration.
6332 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6333 list.
6334 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6335 static.
6336 (clear_breakpoint_conditions_and_commands): New function.
6337 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6338 (clear_breakpoint_conditions_and_commands): New declaration.
6339
6340 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6341
6342 * linux-aarch64-low.c (asm/ptrace.h): Include.
6343
6344 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6345
6346 Fix TLS access for -static -pthread.
6347 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6348 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6349 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6350
6351 2014-05-20 Pedro Alves <palves@redhat.com>
6352
6353 * linux-aarch64-low.c (aarch64_insert_point)
6354 (aarch64_remove_point): No longer check whether the type is
6355 supported here. Adjust to new interface.
6356 (the_low_target): Install aarch64_supports_z_point_type as
6357 supports_z_point_type method.
6358 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6359 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6360 instead of a Z packet char. Adjust.
6361 (arm_supports_z_point_type): New function.
6362 (arm_insert_point, arm_remove_point): Adjust to new interface.
6363 (the_low_target): Install arm_supports_z_point_type.
6364 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6365 (cris_insert_point, cris_remove_point): Adjust to new interface.
6366 Don't check whether the type is supported here.
6367 (the_low_target): Install cris_supports_z_point_type.
6368 * linux-low.c (linux_supports_z_point_type): New function.
6369 (linux_insert_point, linux_remove_point): Adjust to new interface.
6370 * linux-low.h (struct linux_target_ops) <insert_point,
6371 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6372 raw_breakpoint pointer parameter.
6373 <supports_z_point_type>: New method.
6374 * linux-mips-low.c (mips_supports_z_point_type): New function.
6375 (mips_insert_point, mips_remove_point): Adjust to new interface.
6376 Use mips_supports_z_point_type.
6377 (the_low_target): Install mips_supports_z_point_type.
6378 * linux-ppc-low.c (the_low_target): Install NULL as
6379 supports_z_point_type method.
6380 * linux-s390-low.c (the_low_target): Install NULL as
6381 supports_z_point_type method.
6382 * linux-sparc-low.c (the_low_target): Install NULL as
6383 supports_z_point_type method.
6384 * linux-x86-low.c (x86_supports_z_point_type): New function.
6385 (x86_insert_point): Adjust to new insert_point interface. Use
6386 insert_memory_breakpoint. Adjust to new
6387 i386_low_insert_watchpoint interface.
6388 (x86_remove_point): Adjust to remove_point interface. Use
6389 remove_memory_breakpoint. Adjust to new
6390 i386_low_remove_watchpoint interface.
6391 (the_low_target): Install x86_supports_z_point_type.
6392 * lynx-low.c (lynx_target_ops): Install NULL as
6393 supports_z_point_type callback.
6394 * nto-low.c (nto_supports_z_point_type): New.
6395 (nto_insert_point, nto_remove_point): Adjust to new interface.
6396 (nto_target_ops): Install nto_supports_z_point_type.
6397 * mem-break.c: Adjust intro comment.
6398 (struct raw_breakpoint) <raw_type, size>: New fields.
6399 <inserted>: Update comment.
6400 <shlib_disabled>: Delete field.
6401 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6402 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6403 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6404 (raw_bkpt_type_to_target_hw_bp_type): New function.
6405 (find_enabled_raw_code_breakpoint_at): New function.
6406 (find_raw_breakpoint_at): New type and size parameters. Use them.
6407 (insert_memory_breakpoint): New function, based off
6408 set_raw_breakpoint_at.
6409 (remove_memory_breakpoint): New function.
6410 (set_raw_breakpoint_at): Reimplement.
6411 (set_breakpoint): New, based on set_breakpoint_at.
6412 (set_breakpoint_at): Reimplement.
6413 (delete_raw_breakpoint): Go through the_target->remove_point
6414 instead of assuming memory breakpoints.
6415 (find_gdb_breakpoint_at): Delete.
6416 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6417 (find_gdb_breakpoint): New function.
6418 (set_gdb_breakpoint_at): Delete.
6419 (z_type_supported): New function.
6420 (set_gdb_breakpoint_1): New function, loosely based off
6421 set_gdb_breakpoint_at.
6422 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6423 (delete_gdb_breakpoint_at): Delete.
6424 (delete_gdb_breakpoint_1): New function, loosely based off
6425 delete_gdb_breakpoint_at.
6426 (delete_gdb_breakpoint): New function.
6427 (clear_gdb_breakpoint_conditions): Rename to ...
6428 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6429 breakpoint.
6430 (add_condition_to_breakpoint): Make static.
6431 (add_breakpoint_condition): Take a struct breakpoint pointer
6432 instead of an address. Adjust.
6433 (gdb_condition_true_at_breakpoint): Rename to ...
6434 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6435 z_type parameter.
6436 (gdb_condition_true_at_breakpoint): Reimplement.
6437 (add_breakpoint_commands): Take a struct breakpoint pointer
6438 instead of an address. Adjust.
6439 (gdb_no_commands_at_breakpoint): Rename to ...
6440 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6441 parameter. Return true if no breakpoint was found. Change debug
6442 output.
6443 (gdb_no_commands_at_breakpoint): Reimplement.
6444 (run_breakpoint_commands): Rename to ...
6445 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6446 and change return type to boolean.
6447 (run_breakpoint_commands): New function.
6448 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6449 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6450 breakpoint. Go through the_target->remove_point instead of
6451 assuming memory breakpoint.
6452 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6453 software and hardware breakpoints.
6454 (reinsert_raw_breakpoint): Go through the_target->insert_point
6455 instead of assuming memory breakpoint.
6456 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6457 software and hardware breakpoints.
6458 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6459 Check both software and hardware breakpoints.
6460 (validate_inserted_breakpoint): Assert the breakpoint is a
6461 software breakpoint. Set the inserted flag to -1 instead of
6462 setting shlib_disabled.
6463 (delete_disabled_breakpoints): Adjust.
6464 (validate_breakpoints): Only validate software breakpoints.
6465 Adjust to inserted flag change.
6466 (check_mem_read, check_mem_write): Skip breakpoint types other
6467 than software breakpoints. Adjust to inserted flag change.
6468 * mem-break.h (enum raw_bkpt_type): New enum.
6469 (raw_breakpoint, struct process_info): Forward declare.
6470 (Z_packet_to_target_hw_bp_type): Delete declaration.
6471 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6472 (set_gdb_breakpoint, delete_gdb_breakpoint)
6473 (clear_breakpoint_conditions): New declarations.
6474 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6475 (breakpoint_inserted_here): Update comment.
6476 (add_breakpoint_condition, add_breakpoint_commands): Replace
6477 address parameter with a breakpoint pointer parameter.
6478 (gdb_breakpoint_here): Update comment.
6479 (delete_gdb_breakpoint_at): Delete.
6480 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6481 * server.c (process_point_options): Take a struct breakpoint
6482 pointer instead of an address. Adjust.
6483 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6484 delete_gdb_breakpoint.
6485 * spu-low.c (spu_target_ops): Install NULL as
6486 supports_z_point_type method.
6487 * target.h: Include mem-break.h.
6488 (struct target_ops) <prepare_to_access_memory>: Update comment.
6489 <supports_z_point_type>: New field.
6490 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6491 instead of a char. Also take a raw breakpoint pointer.
6492 * win32-arm-low.c (the_low_target): Install NULL as
6493 supports_z_point_type.
6494 * win32-i386-low.c (i386_supports_z_point_type): New function.
6495 (i386_insert_point, i386_remove_point): Adjust to new interface.
6496 (the_low_target): Install i386_supports_z_point_type.
6497 * win32-low.c (win32_supports_z_point_type): New function.
6498 (win32_insert_point, win32_remove_point): Adjust to new interface.
6499 (win32_target_ops): Install win32_supports_z_point_type.
6500 * win32-low.h (struct win32_target_ops):
6501 <supports_z_point_type>: New method.
6502 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6503 instead of a char. Also take a raw breakpoint pointer.
6504
6505 2014-05-20 Pedro Alves <palves@redhat.com>
6506
6507 * mem-break.h: Include break-common.h.
6508 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6509 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6510 (Z_packet_to_target_hw_bp_type): New declaration.
6511 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6512 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6513 (Z_PACKET_ACCESS_WP): Delete macros.
6514 (Z_packet_to_hw_type): Delete function.
6515 * i386-low.h: Don't include break-common.h here.
6516 (Z_packet_to_hw_type): Delete declaration.
6517 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6518 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6519 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6520 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6521 * linux-aarch64-low.c: Don't include break-common.h here.
6522 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6523 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6524 (Z_packet_to_target_hw_bp_type): Delete function.
6525 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6526 function.
6527 (mips_insert_point, mips_remove_point): Use
6528 Z_packet_to_target_hw_bp_type.
6529
6530 2014-05-20 Pedro Alves <palves@redhat.com>
6531
6532 * linux-aarch64-low.c: Include break-common.h.
6533 (enum target_point_type): Delete.
6534 (Z_packet_to_point_type): Rename to ...
6535 (Z_packet_to_target_hw_bp_type): ... this, and return a
6536 target_hw_bp_type instead.
6537 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6538 instead of an enum target_point_type.
6539 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6540 breakpoint type.
6541 (aarch64_dr_state_insert_one_point)
6542 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6543 (aarch64_handle_aligned_watchpoint)
6544 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6545 Take an enum target_hw_bp_type instead of an enum
6546 target_point_type.
6547 (aarch64_supports_z_point_type): New function.
6548 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6549 use Z_packet_to_target_hw_bp_type.
6550
6551 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6552
6553 * configure.ac: Only use -Werror by default when DEVELOPMENT
6554 is true.
6555 * configure: Regenerate.
6556
6557 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6558
6559 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6560 * linux-x86-low.c (X86_64_USER_REGS): New.
6561 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6562
6563 2014-04-28 Yao Qi <yao@codesourcery.com>
6564
6565 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6566 name.
6567
6568 2014-04-25 Pedro Alves <palves@redhat.com>
6569
6570 PR server/16255
6571 * linux-low.c (linux_attach_fail_reason_string): New function.
6572 (linux_attach_lwp): Delete.
6573 (linux_attach_lwp_1): Rename to ...
6574 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6575 argument. Remove "initial" parameter. Return int instead of
6576 void. Don't error or warn here.
6577 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6578 failure to attach to the tgid. Call warning when failing to
6579 attach to an lwp.
6580 * linux-low.h (linux_attach_lwp): 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_fail_reason_string): New declaration.
6584 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6585 interface change. Use linux_attach_fail_reason_string.
6586
6587 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6588 Walfred Tedeschi <walfred.tedeschi@intel.com>
6589
6590 * Makefile.in: Added rules to handle new files
6591 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6592 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6593 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6594 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6595 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6596 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6597 x32-avx512-linux.o.
6598 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6599 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6600 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6601 i386/x32-avx512.xml.
6602 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6603 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6604 i386/x32-avx512-linux.xml.
6605 * i387-fp.c (num_avx512_k_registers): New constant for number
6606 of K registers.
6607 (num_avx512_zmmh_low_registers): New constant for number of
6608 lower ZMM registers (0-15).
6609 (num_avx512_zmmh_high_registers): New constant for number of
6610 higher ZMM registers (16-31).
6611 (num_avx512_ymmh_registers): New contant for number of higher
6612 YMM registers (ymm16-31 added by avx521 on x86_64).
6613 (num_avx512_xmm_registers): New constant for number of higher
6614 XMM registers (xmm16-31 added by AVX512 on x86_64).
6615 (struct i387_xsave): Add space for AVX512 registers.
6616 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6617 Add code to handle AVX512 registers.
6618 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6619 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6620 prototypei from generated file.
6621 (tdesc_amd64_avx512_linux): Likewise.
6622 (init_registers_x32_avx512_linux): Likewise.
6623 (tdesc_x32_avx512_linux): Likewise.
6624 (init_registers_i386_avx512_linux): Likewise.
6625 (tdesc_i386_avx512_linux): Likewise.
6626 (x86_64_regmap): Add AVX512 registers.
6627 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6628 mask.
6629 (initialize_low_arch): Add code to initialize AVX512 registers.
6630
6631 2014-04-23 Pedro Alves <palves@redhat.com>
6632
6633 * mem-break.c (find_gdb_breakpoint_at): Make static.
6634 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6635
6636 2014-04-23 Pedro Alves <palves@redhat.com>
6637
6638 * i386-low.c: Don't include break-common.h here.
6639 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6640 prototype to take target_hw_bp_type as argument instead of a Z
6641 packet char.
6642 * i386-low.h: Include break-common.h here.
6643 (Z_packet_to_hw_type): Declare.
6644 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6645 prototypes.
6646 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6647 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6648 (x86_remove_point): Convert the packet number to a
6649 target_hw_bp_type before calling i386_low_remove_watchpoint.
6650 * win32-i386-low.c (i386_insert_point): Convert the packet number
6651 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6652 (i386_remove_point): Convert the packet number to a
6653 target_hw_bp_type before calling i386_low_remove_watchpoint.
6654
6655 2014-04-23 Pedro Alves <palves@redhat.com>
6656
6657 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6658
6659 2014-04-10 Pedro Alves <palves@redhat.com>
6660
6661 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6662 Check if the condition or command is NULL before checking if the
6663 breakpoint is known. On success, return true.
6664 * mem-break.h (add_breakpoint_condition): Document return.
6665 (add_breakpoint_commands): Add describing comment.
6666 * server.c (skip_to_semicolon): New function.
6667 (process_point_options): Use it.
6668
6669 2014-04-09 Pedro Alves <palves@redhat.com>
6670
6671 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6672 to lwpid_of.
6673
6674 2014-02-27 Pedro Alves <palves@redhat.com>
6675
6676 PR 12702
6677 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6678 macros.
6679 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6680 output.
6681 (last_thread_of_process_p): Take a PID argument instead of a
6682 thread pointer.
6683 (linux_wait_for_lwp): Delete.
6684 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6685 functions.
6686 (linux_low_filter_event): New function, party factored out from
6687 linux_wait_for_event.
6688 (linux_wait_for_event): Rename to ...
6689 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6690 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6691 sigsuspend. Check for zombie leaders.
6692 (linux_wait_for_event): Reimplement as wrapper around
6693 linux_wait_for_event_filtered.
6694 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6695 a normal or signal exit is seen, it's the whole process exiting.
6696 (wait_for_sigstop): No longer a for_each_inferior callback.
6697 Rewrite on top of linux_wait_for_event_filtered.
6698 (stop_all_lwps): Call wait_for_sigstop directly.
6699 * server.c (resume, handle_target_event): Handle
6700 TARGET_WAITKIND_NO_RESUMED.
6701
6702 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6703
6704 * win32-low.c (psapi_get_dll_name,
6705 * win32_CreateToolhelp32Snapshot): Delete.
6706 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6707 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6708 Delete.
6709 (handle_load_dll): Add function description.
6710 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6711
6712 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6713
6714 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6715 Add comment.
6716 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6717 base address when calling win32_add_one_solib.
6718 (handle_load_dll): Delete local variable load_addr.
6719 Remove 0x1000 offset applied to DLL base address when calling
6720 win32_add_one_solib.
6721 (handle_unload_dll): Add comment.
6722
6723 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6724
6725 * win32-low.c (win32_add_all_dlls): Renames
6726 win32_ensure_ntdll_loaded. Rewrite function documentation.
6727 Adjust implementation to always load all DLLs.
6728 Add 0x1000 offset to DLL base address when calling
6729 win32_add_one_solib.
6730 (child_initialization_done): New static global.
6731 (do_initial_child_stuff): Set child_initialization_done to
6732 zero during child initialization, and 1 after. Replace call
6733 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6734 Add comment.
6735 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6736 (handle_unload_dll): Add function documentation.
6737 (get_child_debug_event): Ignore load and unload DLL events
6738 during child initialization.
6739
6740 2014-02-20 Doug Evans <dje@google.com>
6741
6742 Remove global all_lwps.
6743 * inferiors.h (ptid_of): Move here from linux-low.h.
6744 (pid_of, lwpid_of): Ditto.
6745 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6746 parameter is a struct thread_info * now.
6747 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6748 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6749 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6750 directly.
6751 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6752 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6753 * linux-arm-low.c (update_registers_callback): Update, "entry"
6754 parameter is a struct thread_info * now.
6755 Fetch lwpid from current_inferior directly.
6756 (arm_insert_point): Pass &all_threads to find_inferior instead of
6757 &all_lwps.
6758 (arm_remove_point): Ditto.
6759 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6760 (arm_prepare_to_resume): Fetch pid from thread.
6761 (arm_read_description): Fetch lwpid from current_inferior directly.
6762 * linux-low.c (all_lwps): Delete.
6763 (delete_lwp): Delete call to remove_inferior.
6764 (handle_extended_wait): Fetch lwpid from thread.
6765 (add_lwp): Don't set lwp->entry.id. Remove call to
6766 add_inferior_to_list.
6767 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6768 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6769 (kill_one_lwp_callback): Ditto.
6770 (linux_kill): Don't dereference NULL pointer.
6771 Fetch ptid,lwpid from thread.
6772 (get_detach_signal): Fetch ptid from thread.
6773 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6774 Simplify call to regcache_invalidate_thread.
6775 (delete_lwp_callback): Update, "entry" parameter is a
6776 struct thread_info * now. Fetch pid from thread.
6777 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6778 (status_pending_p_callback): Update, "entry" parameter is a
6779 struct thread_info * now. Fetch ptid from thread.
6780 (find_lwp_pid): Update, "entry" parameter is a
6781 struct thread_info * now.
6782 (linux_wait_for_lwp): Fetch pid from thread.
6783 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6784 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6785 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6786 (dequeue_one_deferred_signal): Ditto.
6787 (cancel_breakpoint): Fetch ptid from current_inferior.
6788 (linux_wait_for_event): Pass &all_threads to find_inferior,
6789 not &all_lwps. Fetch ptid, lwpid from thread.
6790 (count_events_callback): Update, "entry" parameter is a
6791 struct thread_info * now.
6792 (select_singlestep_lwp_callback): Ditto.
6793 (select_event_lwp_callback): Ditto.
6794 (cancel_breakpoints_callback): Ditto.
6795 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6796 not &all_lwps.
6797 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6798 (unsuspend_one_lwp): Update, "entry" parameter is a
6799 struct thread_info * now.
6800 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6801 not &all_lwps.
6802 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6803 Fetch lwpid from thread, not lwp.
6804 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6805 Pass &all_threads to find_inferior, not &all_lwps.
6806 (send_sigstop): Fetch lwpid from thread, not lwp.
6807 (send_sigstop_callback): Update, "entry" parameter is a
6808 struct thread_info * now.
6809 (suspend_and_send_sigstop_callback): Ditto.
6810 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6811 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6812 struct thread_info * now.
6813 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6814 from thread, lwp.
6815 (lwp_running): Update, "entry" parameter is a
6816 struct thread_info * now.
6817 (stop_all_lwps): Fetch ptid from thread.
6818 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6819 (linux_resume_one_lwp): Fetch lwpid from thread.
6820 (linux_set_resume_request): Update, "entry" parameter is a
6821 struct thread_info * now. Fetch pid, lwpid from thread.
6822 (resume_status_pending_p): Update, "entry" parameter is a
6823 struct thread_info * now.
6824 (need_step_over_p): Ditto. Fetch lwpid from thread.
6825 (start_step_over): Fetch lwpid from thread.
6826 (linux_resume_one_thread): Update, "entry" parameter is a
6827 struct thread_info * now. Fetch lwpid from thread.
6828 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6829 (proceed_one_lwp): Update, "entry" parameter is a
6830 struct thread_info * now. Fetch lwpid from thread.
6831 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6832 struct thread_info * now.
6833 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6834 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6835 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6836 directly.
6837 (regsets_store_inferior_registers): Ditto.
6838 (fetch_register, store_register): Ditto.
6839 (linux_read_memory, linux_write_memory): Ditto.
6840 (linux_request_interrupt): Ditto.
6841 (linux_read_auxv): Ditto.
6842 (linux_xfer_siginfo): Ditto.
6843 (linux_qxfer_spu): Ditto.
6844 (linux_qxfer_libraries_svr4): Ditto.
6845 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6846 moved to inferiors.h.
6847 (get_lwp): Delete.
6848 (get_thread_lwp): Update.
6849 (struct lwp_info): Delete member "entry". Simplify comment for
6850 member "thread".
6851 (all_lwps): Delete.
6852 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6853 current_inferior directly.
6854 (update_watch_registers_callback): Update, "entry" parameter is a
6855 struct thread_info * now. Fetch pid from thread.
6856 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6857 (mips_insert_point): Fetch lwpid from current_inferior.
6858 Pass &all_threads to find_inferior, not &all_lwps.
6859 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6860 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6861 directly.
6862 (mips_stopped_data_address): Ditto.
6863 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6864 directly.
6865 * linux-tile-low.c (tile_arch_setup): Ditto.
6866 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6867 (update_debug_registers_callback): Update, "entry" parameter is a
6868 struct thread_info * now. Fetch pid from thread.
6869 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6870 Pass &all_threads to find_inferior, not &all_lwps.
6871 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6872 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6873 Pass &all_threads to find_inferior, not &all_lwps.
6874 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6875 (i386_dr_low_get_status): Ditto.
6876 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6877 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6878 (x86_linux_read_description): Ditto.
6879 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6880
6881 2014-02-20 Doug Evans <dje@google.com>
6882
6883 * inferiors.c (get_first_inferior): Fix buglet.
6884
6885 2014-02-19 Doug Evans <dje@google.com>
6886
6887 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6888 * inferiors.c (add_thread): Change result type to struct thread_info *.
6889 All callers updated.
6890 (add_lwp): Call add_thread here instead of in callers.
6891 All callers updated.
6892 * linux-low.h (get_lwp_thread): Rewrite.
6893 (struct lwp_info): New member "thread".
6894
6895 2014-02-19 Doug Evans <dje@google.com>
6896
6897 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6898 All callers updated.
6899
6900 2014-02-19 Doug Evans <dje@google.com>
6901
6902 * inferiors.c (add_thread): Fix whitespace.
6903
6904 2014-02-19 Doug Evans <dje@google.com>
6905
6906 * dll.c (clear_dlls): Replace accessing list implemention details
6907 with API function.
6908 * gdbthread.h (get_first_thread): Declare.
6909 * inferiors.c (for_each_inferior_with_data): New function.
6910 (get_first_thread): New function.
6911 (find_thread_ptid): Simplify.
6912 (get_first_inferior): New function.
6913 (clear_list): Delete.
6914 (one_inferior_p): New function.
6915 (clear_inferior_list): New function.
6916 (clear_inferiors): Update.
6917 * inferiors.h (for_each_inferior_with_data): Declare.
6918 (clear_inferior_list): Declare.
6919 (one_inferior_p): Declare.
6920 (get_first_inferior): Declare.
6921 * linux-low.c (linux_wait_for_event): Replace accessing list
6922 implemention details with API function.
6923 * server.c (target_running): Ditto.
6924 (accumulate_file_name_length): New function.
6925 (emit_dll_description): New function.
6926 (handle_qxfer_libraries): Replace accessing list implemention
6927 details with API function.
6928 (handle_qxfer_threads_worker): New function.
6929 (handle_qxfer_threads_proper): Replace accessing list implemention
6930 details with API function.
6931 (handle_query): Ditto.
6932 (visit_actioned_threads_callback_ftype): New typedef.
6933 (visit_actioned_threads_data): New struct.
6934 (visit_actioned_threads): Rewrite to be find_inferior callback.
6935 (resume): Call find_inferior.
6936 (handle_status): Replace accessing list implemention
6937 details with API function.
6938 (process_serial_event): Replace accessing list implemention details
6939 with API function.
6940 * target.c (set_desired_inferior): Replace accessing list implemention
6941 details with API function.
6942 * tracepoint.c (same_process_p): New function.
6943 (gdb_agent_about_to_close): Replace accessing list implemention
6944 details with API function.
6945 * win32-low.c (child_delete_thread): Replace accessing list
6946 implemention details with API function.
6947 (match_dll_by_basename): New function.
6948 (dll_is_loaded_by_basename): New function.
6949 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6950 details call to dll_is_loaded_by_basename.
6951
6952 2014-02-19 Doug Evans <dje@google.com>
6953
6954 * dll.h (struct dll_info): Add comment.
6955 * gdbthread.h (struct thread_info): Add comment.
6956 (current_ptid): Simplify.
6957 * inferiors.c (add_process): Update.
6958 (remove_process): Update.
6959 * inferiors.h (struct process_info): Rename member "head" to "entry".
6960 * linux-low.c (delete_lwp): Update.
6961 (add_lwp): Update.
6962 (last_thread_of_process_p): Update.
6963 (kill_one_lwp_callback, linux_kill): Update.
6964 (status_pending_p_callback): Update.
6965 (wait_for_sigstop): Update. Simplify read of ptid.
6966 (start_step_over): Update.
6967 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6968 (get_lwp_thread): Update.
6969 (struct lwp_info): Rename member "head" to "entry".
6970 * regcache.h (inferior_list_entry): Delete.
6971 * server.c (kill_inferior_callback): Update.
6972 (detach_or_kill_inferior_callback): Update.
6973 (print_started_pid): Update.
6974 (print_attached_pid): Update.
6975 (process_serial_event): Simplify read of ptid.
6976 * thread-db.c (thread_db_create_event): Update.
6977 (thread_db_get_tls_address): Update.
6978 * win32-low.c (current_inferior_ptid): Simplify.
6979
6980 2014-02-19 Tom Tromey <tromey@redhat.com>
6981
6982 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6983 argument.
6984 (target_supports_btrace): Update.
6985
6986 2014-02-14 Yao Qi <yao@codesourcery.com>
6987
6988 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6989 (rsp-low-ipa.o): New target.
6990
6991 2014-02-12 Tom Tromey <tromey@redhat.com>
6992
6993 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6994 convert_ascii_to_int.
6995 * regcache.c (registers_to_string): Likewise.
6996 * remote-utils.c (decode_M_packet): Likewise.
6997 * server.c (process_serial_event): Likewise.
6998
6999 2014-02-12 Tom Tromey <tromey@redhat.com>
7000
7001 * server.c (handle_query, handle_v_run): Use hex2bin, not
7002 unhexify.
7003 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7004
7005 2014-02-12 Tom Tromey <tromey@redhat.com>
7006
7007 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7008 convert_int_to_ascii.
7009 * regcache.c (registers_to_string, collect_register_as_string):
7010 Likewise.
7011 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7012 Likewise.
7013 * server.c (process_serial_event): Likewise.
7014 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7015 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7016
7017 2014-02-12 Tom Tromey <tromey@redhat.com>
7018
7019 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7020 bin2hex, not hexify.
7021 * tracepoint.c (cmd_qtstatus): Likewise.
7022
7023 2014-02-12 Tom Tromey <tromey@redhat.com>
7024
7025 * remote-utils.c (monitor_output): Pass explicit length to
7026 hexify.
7027
7028 2014-02-12 Tom Tromey <tromey@redhat.com>
7029
7030 * tracepoint.c: Include rsp-low.h.
7031 * server.c: Include rsp-low.h.
7032 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7033 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7034 declare.
7035 * remote-utils.c: Include rsp-low.h.
7036 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7037 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7038 (convert_int_to_ascii, convert_ascii_to_int): Move to
7039 common/rsp-low.c.
7040 * regcache.c: Include rsp-low.h.
7041 * ax.c: Include rsp-low.h.
7042 * Makefile.in (SFILES): Add common/rsp-low.c.
7043 (OBS): Add rsp-low.o.
7044 (rsp-low.o): New target.
7045
7046 2014-02-12 Tom Tromey <tromey@redhat.com>
7047
7048 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7049 Include print-utils.h.
7050 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7051 (plongest, thirty_two, phex_nz): Remove.
7052 * Makefile.in (SFILES): Add common/print-utils.c.
7053 (OBS): Add print-utils.o.
7054 (print-utils-ipa.o): New target.
7055 (print-utils.o): New target.
7056 (IPA_OBJS): Add print-utils-ipa.o.
7057
7058 2014-02-06 Tom Tromey <tromey@redhat.com>
7059
7060 * Makefile.in (SFILES): Fix indentation.
7061
7062 2014-02-05 Doug Evans <dje@google.com>
7063
7064 * linux-low.c (linux_wait_for_event): Improve comment.
7065 (linux_wait_1): Keep current_inferior in sync with event_child.
7066
7067 2014-01-22 Doug Evans <dje@google.com>
7068
7069 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7070
7071 2014-01-22 Doug Evans <dje@google.com>
7072
7073 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7074 * configure: Regenerate.
7075 * config.in: Regenerate.
7076 * Makefile.in (SFILES): Add debug.c.
7077 (OBS): Add debug.o.
7078 * debug.c: New file.
7079 * debug.h: New file.
7080 * linux-aarch64-low.c (*): Update all debugging printfs to use
7081 debug_printf instead of fprintf.
7082 * linux-arm-low.c (*): Ditto.
7083 * linux-cris-low.c (*): Ditto.
7084 * linux-crisv32-low.c (*): Ditto.
7085 * linux-m32r-low.c (*): Ditto.
7086 * linux-sparc-low.c (*): Ditto.
7087 * linux-x86.c (*): Ditto.
7088 * linux-low.c (*): Ditto.
7089 (linux_wait_1): Add calls to debug_enter, debug_exit.
7090 (linux_wait): Remove redundant debugging printf.
7091 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7092 (linux_resume, unstop_all_lwps): Ditto.
7093 * mem-break.c (*): Update all debugging printfs to use
7094 debug_printf instead of fprintf.
7095 * remote-utils.c (*): Ditto.
7096 * thread-db.c (*): Ditto.
7097 * server.c #include <ctype.h>, "gdb_vecs.h".
7098 (debug_threads): Moved to debug.c.
7099 (*): Update all debugging printfs to use debug_printf instead of
7100 fprintf.
7101 (start_inferior): Replace call to fflush with call to debug_flush.
7102 (monitor_show_help): Mention set debug-format.
7103 (parse_debug_format_options): New function.
7104 (handle_monitor_command): Handle "monitor set debug-format".
7105 (gdbserver_usage): Mention --debug-format.
7106 (main): Parse --debug-format.
7107 * server.h (debug_threads): Declaration moved to debug.h.
7108 #include "debug.h".
7109 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7110 trace_debug_1 that uses debug_printf.
7111 (tracepoint_look_up_symbols): Update all debugging printfs to use
7112 debug_printf instead of fprintf.
7113
7114 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7115
7116 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7117 sys/ptrace.h.
7118
7119 2014-01-17 Pedro Alves <palves@redhat.com>
7120
7121 PR build/16445
7122 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7123 defined after including gdb_proc_service.h.
7124
7125 2014-01-16 Doug Evans <dje@google.com>
7126
7127 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7128 (match_dll): Use it.
7129
7130 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7131
7132 * target.h (target_ops) <read_btrace>: Change parameters and
7133 return type to allow error reporting.
7134 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7135 trace reading errors on.
7136 * linux-low.c (linux_low_read_btrace): Pass trace reading
7137 errors on.
7138 (linux_low_disable_btrace): New.
7139
7140 2014-01-15 Doug Evans <dje@google.com>
7141
7142 * inferiors.c (thread_id_to_gdb_id): Delete.
7143 * inferiors.h (thread_id_to_gdb_id): Delete.
7144
7145 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7146
7147 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7148 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7149 versions.
7150
7151 2014-01-08 Pedro Alves <palves@redhat.com>
7152
7153 * server.c (handle_status): Don't discard previous queued stop
7154 replies or thread's pending status here.
7155 (main) <disconnection>: Do it here instead.
7156
7157 2014-01-08 Pedro Alves <palves@redhat.com>
7158
7159 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7160 * server.c (visit_actioned_threads, handle_pending_status): New
7161 function.
7162 (handle_v_cont): Factor out parts to ...
7163 (resume): ... this new function. If in all-stop, and a thread
7164 being resumed has a pending status, report it without actually
7165 resuming.
7166 (myresume): Adjust to use the new 'resume' function.
7167 (clear_pending_status_callback, set_pending_status_callback)
7168 (find_status_pending_thread_callback): New functions.
7169 (handle_status): Handle the case of multiple threads having
7170 interesting statuses to report. Report threads' real last signal
7171 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7172 with an interesting thread to report the status for, instead of
7173 always reporting the status of the first thread.
7174
7175 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7176
7177 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7178 * gdbreplay.c (gdbreplay_version): Likewise.
7179
7180 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7181
7182 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7183 iov.iov_len with the real length in use.
7184
7185 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7186
7187 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7188 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7189 for all targets that use win32-low.c.
7190 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7191 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7192
7193 2013-12-13 Pedro Alves <palves@redhat.com>
7194
7195 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7196 if equal to TARGET_WAITKIND_LOADED.
7197 * win32-low.c (cached_status): New static global.
7198 (win32_wait): Add declaration.
7199 (do_initial_child_stuff): Flush all initial pending debug events
7200 up to the initial breakpoint.
7201 (win32_wait): If CACHED_STATUS was set, return that instead
7202 of doing a real wait. Remove the code resuming the execution
7203 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7204 during the initial phase. Also remove the code changing
7205 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7206 TARGET_WAITKIND_STOPPED.
7207
7208 2013-12-11 Yao Qi <yao@codesourcery.com>
7209
7210 * notif.c (handle_notif_ack): Return 0 if no notification
7211 matches.
7212
7213 2013-11-20 Doug Evans <dje@google.com>
7214
7215 * linux-low.c (linux_set_resume_request): Fix comment.
7216
7217 2013-11-20 Doug Evans <dje@google.com>
7218
7219 * linux-low.c (resume_status_pending_p): Tweak comment.
7220
7221 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7222
7223 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7224 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7225 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7226 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7227 (srv_amd64_regobj): Add amd64-mpx.o.
7228 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7229 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7230 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7231 * i387-fp.c (num_pl_bnd_register) Added constant.
7232 (num_pl_bnd_cfg_registers) Added constant.
7233 (struct i387_xsave) Added reserved area and MPX fields.
7234 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7235 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7236 function.
7237 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7238 (init_registers_amd64_mpx_linux): Declare new function.
7239 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7240 (x86_64_regmap): Add MPX registers.
7241 (x86_linux_read_description): Add MPX case.
7242 (initialize_low_arch): Initialize MPX targets.
7243
7244 2013-11-18 Tom Tromey <tromey@redhat.com>
7245
7246 * configure: Rebuild.
7247 * configure.ac: Don't check for stdlib.h.
7248 * gdbreplay.c: Unconditionally include stdlib.h.
7249
7250 2013-11-18 Tom Tromey <tromey@redhat.com>
7251
7252 * config.in: Rebuild.
7253 * configure: Rebuild.
7254 * configure.ac: Don't use AC_HEADER_DIRENT.
7255
7256 2013-11-18 Tom Tromey <tromey@redhat.com>
7257
7258 * server.h: Don't check HAVE_STRING_H.
7259 * gdbreplay.c: Don't check HAVE_STRING_H.
7260 * configure: Rebuild.
7261
7262 2013-11-18 Tom Tromey <tromey@redhat.com>
7263
7264 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7265 LIBGNU.
7266
7267 2013-11-08 Tom Tromey <tromey@redhat.com>
7268
7269 * configure, config.in: Rebuild.
7270 * configure.ac: Remove unused configury.
7271
7272 2013-11-08 Tom Tromey <tromey@redhat.com>
7273
7274 * acinclude.m4: Include common.m4, codeset.m4.
7275 * configure, config.in: Rebuild.
7276 * configure.ac: Use GDB_AC_COMMON.
7277
7278 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7279
7280 * linux-s390-low.c (HWCAP_S390_TE): New define.
7281 (s390_arch_setup): Consider the TE field in the HWCAP for
7282 determining 'have_regset_tdb'.
7283
7284 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7285
7286 PR gdb/16014
7287 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7288 call to sizeof.
7289
7290 2013-10-02 Pedro Alves <palves@redhat.com>
7291
7292 * server.c (process_serial_event): Don't output "GDBserver
7293 exiting" if GDB is connected through stdio.
7294 * target.c (mywait): Likewise, be silent if GDB is connected
7295 through stdio.
7296
7297 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7298
7299 * lynx-low.c (lynx_add_threads_after_attach): New function.
7300 (lynx_attach): Remove call to add_thread. Add call to
7301 lynx_add_threads_after_attach instead.
7302
7303 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7304
7305 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7306 * config.in, configure: Regenerated.
7307
7308 2013-09-18 Yao Qi <yao@codesourcery.com>
7309
7310 PR server/15959
7311 * server.c (start_inferior): Clear 'resume_info'.
7312
7313 2013-09-16 Jiong Wang <jiwang@tilera.com>
7314
7315 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7316 for each register.
7317
7318 2013-09-16 Jiong Wang <jiwang@tilera.com>
7319
7320 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7321 linux-tile-low.o to srv_tgtobj.
7322
7323 2013-09-16 Will Newton <will.newton@linaro.org>
7324
7325 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7326 out regs.
7327
7328 2013-09-06 Pedro Alves <palves@redhat.com>
7329
7330 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7331 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7332 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7333 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7334 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7335 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7336
7337 2013-09-06 Pedro Alves <palves@redhat.com>
7338
7339 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7340 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7341
7342 2013-09-06 Pedro Alves <palves@redhat.com>
7343
7344 * linux-amd64-ipa.c: Include tracepoint.h.
7345 * linux-i386-ipa.c: Include tracepoint.h.
7346
7347 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7348
7349 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7350 (ps_get_thread_area): New function.
7351
7352 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7353
7354 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7355 (initialize_low_arch): Call init_registers_crisv32 rather than
7356 init_register_crisv32.
7357
7358 2013-09-05 Pedro Alves <palves@redhat.com>
7359
7360 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7361 to ...
7362 * hostio.h: ... this new file.
7363 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7364 win32-low.c: Include hostio.h.
7365
7366 2013-09-05 Pedro Alves <palves@redhat.com>
7367
7368 * server.h (gdb_client_data, handler_func, callback_handler_func)
7369 (delete_file_handler, add_file_handler, append_callback_event)
7370 (delete_callback_event, start_event_loop, initialize_event_loop):
7371 Move to event-loop.h and include it.
7372 * event-loop.h: New file.
7373
7374 2013-09-05 Pedro Alves <palves@redhat.com>
7375
7376 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7377 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7378 (loaded_dll, unloaded_dll): Move to ...
7379 * dll.h: ... this new file.
7380 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7381
7382 2013-09-05 Pedro Alves <palves@redhat.com>
7383
7384 * server.h (current_process, get_thread_process, all_processes)
7385 (add_inferior_to_list, for_each_inferior, current_inferior)
7386 (remove_inferior, add_process, remove_process, find_process_pid)
7387 (have_started_inferiors_p, have_attached_inferiors_p)
7388 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7389 (clear_inferiors, find_inferior, find_inferior_id)
7390 (inferior_target_data, set_inferior_target_data)
7391 (inferior_regcache_data, set_inferior_regcache_data): Move to
7392 inferiors.h, and include it.
7393 * inferiors.h: New file.
7394
7395 2013-09-05 Pedro Alves <palves@redhat.com>
7396
7397 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7398 Move ...
7399 * ax.h: ... here.
7400
7401 2013-09-05 Pedro Alves <palves@redhat.com>
7402
7403 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7404 tracepoint.h.
7405 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7406 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7407 (handle_tracepoint_general_set, handle_tracepoint_query)
7408 (tracepoint_finished_step, tracepoint_was_hit)
7409 (release_while_stepping_state_list, current_traceframe)
7410 (in_readonly_region, traceframe_read_mem)
7411 (fetch_traceframe_registers, traceframe_read_sdata)
7412 (traceframe_read_info, struct fast_tpoint_collect_status)
7413 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7414 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7415 (supply_fast_tracepoint_registers)
7416 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7417 (ipa_tdesc, claim_trampoline_space)
7418 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7419 (agent_mem_read, agent_get_trace_state_variable_value)
7420 (agent_set_trace_state_variable_value, agent_tsv_read)
7421 (agent_mem_read_string, get_raw_reg_func_addr)
7422 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7423 * tracepoint.h: ... this new file.
7424
7425 2013-09-05 Pedro Alves <palves@redhat.com>
7426
7427 * server.h (perror_with_name, error, fatal, warning, paddress)
7428 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7429 include it.
7430 * utils.h: New file.
7431
7432 2013-09-05 Pedro Alves <palves@redhat.com>
7433
7434 * server.h (remote_debug, noack_mode, transport_is_reliable)
7435 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7436 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7437 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7438 (write_enn, initialize_async_io, enable_async_io)
7439 (disable_async_io, check_remote_input_interrupt_request)
7440 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7441 (dead_thread_notify, prepare_resume_reply)
7442 (decode_address_to_semicolon, decode_address, decode_m_packet)
7443 (decode_M_packet, decode_X_packet, decode_xfer_write)
7444 (decode_search_memory_packet, unhexify, hexify)
7445 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7446 (look_up_one_symbol, relocate_instruction)
7447 (monitor_output): Move to remote-utils.h, and include it.
7448 * remote-utils.h: New file.
7449
7450 2013-09-05 Pedro Alves <palves@redhat.com>
7451
7452 * server.h (_): Delete.
7453
7454 2013-09-02 Pedro Alves <palves@redhat.com>
7455
7456 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7457 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7458 allocated.
7459 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7460
7461 2013-09-02 Pierre Muller <muller@sourceware.org>
7462
7463 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7464 or WriteProcessMemory complete successfully and handle
7465 ERROR_PARTIAL_COPY error.
7466
7467 2013-09-02 Pedro Alves <palves@redhat.com>
7468
7469 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7470 error instead of EIO.
7471
7472 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7473
7474 PR server/15604
7475 * linux-low.c: Include filestuff.h.
7476 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7477 * lynx-low.c: Include filestuff.h.
7478 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7479 * server.c: Include filestuff.h.
7480 (main): Call notice_open_fds.
7481 * spu-low.c: Include filestuff.h.
7482 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7483
7484 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7485
7486 * Makefile.in: Explain why ../target and ../nat are not
7487 listed as include file search paths.
7488 (linux-waitpid.o): New object file rule.
7489 * configure.srv (srv_native_linux_obj): New variable.
7490 Replace all occurrences of linux native object files with
7491 $srv_native_linux_obj.
7492 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7493 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7494 (linux_enable_event_reporting): Remove declaration.
7495 (my_waitpid): Moved to common/linux-waitpid.c.
7496 (linux_wait_for_event): Pass ptid when calling
7497 linux_enable_event_reporting.
7498 (linux_supports_tracefork_flag): Remove.
7499 (linux_enable_event_reporting): Likewise.
7500 (linux_tracefork_grandchild): Remove.
7501 (STACK_SIZE): Moved to common/linux-ptrace.c.
7502 (linux_tracefork_child): Remove.
7503 (linux_test_for_tracefork): Remove.
7504 (linux_look_up_symbols): Call linux_supports_traceclone.
7505 (initialize_low): Remove call to linux_test_for_tracefork.
7506 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7507 common/linux-ptrace.h.
7508 (PTRACE_TYPE_ARG4): Likewise.
7509 Include linux-ptrace.h.
7510
7511 2013-08-21 Pedro Alves <palves@redhat.com>
7512
7513 * config.in: Renegerate.
7514
7515 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7516
7517 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7518 (SFILES): Remove $(srcdir)/common/target-common.c and
7519 add $(srcdir)/target/waitstatus.c.
7520 (OBS): Remove target-common.o and add waitstatus.o.
7521 (server_h): Remove $(srcdir)/../common/target-common.h and
7522 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7523 and $(srcdir)/../target/waitstatus.h.
7524 (target-common.o): Remove.
7525 (waitstatus.o): New target object file.
7526 * target.h: Do not include target-common.h and
7527 include target/resume.h, target/wait.h and
7528 target/waitstatus.h.
7529
7530 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7531
7532 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7533 to PTRACE_TYPE_ARG3.
7534 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7535 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7536 PTRACE_TYPE_ARG4.
7537 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7538 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7539
7540 2013-07-27 Jie Zhang <jie@codesourcery.com>
7541 Daniel Jacobowitz <dan@codesourcery.com>
7542 Yao Qi <yao@codesourcery.com>
7543
7544 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7545 (mips-linux-watch.o): New rule.
7546 (mips_linux_watch_h): New variable.
7547 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7548 srv_tgtobj.
7549 * linux-mips-low.c: Include mips-linux-watch.h.
7550 (struct arch_process_info, struct arch_lwp_info): New.
7551 (update_watch_registers_callback): New function.
7552 (mips_linux_new_process, mips_linux_new_thread) New functions.
7553 (mips_linux_prepare_to_resume, mips_insert_point): New
7554 functions.
7555 (mips_remove_point, mips_stopped_by_watchpoint): New
7556 functions.
7557 (rsp_bp_type_to_target_hw_bp_type): New function.
7558 (mips_stopped_data_address): New function.
7559 (the_low_target): Add watchpoint support functions.
7560
7561 2013-07-27 Yao Qi <yao@codesourcery.com>
7562
7563 * i386-low.c: Include break-common.h.
7564 (enum target_hw_bp_type): Remove.
7565
7566 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7567
7568 * Makefile.in (SFILES): /common/target-common.c.
7569 (OBS): Add target-common.o.
7570 (server_h): Add $(srcdir)/../common/target-common.h.
7571 (target-common.o): New target.
7572 * server.c (queue_stop_reply_callback): Free
7573 status string after use.
7574 * target.c (target_waitstatus_to_string): Remove.
7575 * target.h: Include target-common.h.
7576 (resume_kind): Likewise.
7577 (target_waitkind): Likewise.
7578 (target_waitstatus): Likewise.
7579 (TARGET_WNOHANG): Likewise.
7580
7581 2013-07-04 Yao Qi <yao@codesourcery.com>
7582
7583 * Makefile.in (host_alias): Use @host_noncanonical@.
7584 (target_alias): Use @target_noncanonical@.
7585 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7586 ACX_NONCANONICAL_HOST.
7587 * configure: Regenerated.
7588
7589 Revert:
7590 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7591
7592 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7593 * configure: Rebuild.
7594 * Makefile.in (version_host, version_target): Get from configure.
7595 (version.c): Use $(version_host) and $(version_target).
7596
7597 2013-07-03 Pedro Alves <palves@redhat.com>
7598
7599 * Makefile.in (config.status): Depend on development.sh.
7600 * acinclude.m4: Include libmcheck.m4.
7601 * configure: Regenerate.
7602
7603 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7604
7605 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7606 attribute inside the parentheses.
7607 (winapi_DebugSetProcessKillOnExit): Ditto.
7608 (winapi_DebugBreakProcess): Ditto.
7609 (winapi_GenerateConsoleCtrlEvent): Ditto.
7610
7611 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7612
7613 * notif.h (notif_event): Add a dummy member to avoid compiler
7614 errors.
7615
7616 2013-07-01 Pedro Alves <palves@redhat.com>
7617
7618 * hostio.c (HOSTIO_PATH_MAX): Define.
7619 (require_filename, handle_open, handle_unlink, handle_readlink):
7620 Use it.
7621
7622 2013-07-01 Pedro Alves <palves@redhat.com>
7623
7624 * server.h: Include "pathmax.h".
7625 * linux-low.c: Don't include sys/param.h.
7626 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7627 MAXPATHLEN.
7628 * win32-low.c: Don't include sys/param.h.
7629 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7630
7631 2013-07-01 Pedro Alves <palves@redhat.com>
7632
7633 * event-loop.c: Don't check HAVE_UNISTD_H before including
7634 <unistd.h>.
7635 * gdbreplay.c: Likewise.
7636 * remote-utils.c: Likewise.
7637 * server.c: Likewise.
7638 * configure.ac: Don't check for unistd.h.
7639 * configure: Regenerate.
7640
7641 2013-06-28 Tom Tromey <tromey@redhat.com>
7642
7643 * Makefile.in (version.c): Use version.in, not
7644 common/version.in.
7645
7646 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7647
7648 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7649 * configure: Rebuild.
7650 * Makefile.in (version_host, version_target): Get from configure.
7651 (version.c): Use $(version_host) and $(version_target).
7652
7653 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7654
7655 Fix trace-status to output user name without trailing colon.
7656 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7657
7658 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7659
7660 Fix trace-status to output proper start-time and stop-time.
7661 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7662 output start time and stop time in hex as gdb expects.
7663
7664 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7665
7666 * tracepoint.c (build_traceframe_info_xml): Output trace state
7667 variables present in the trace buffer.
7668
7669 2013-06-24 Tom Tromey <tromey@redhat.com>
7670
7671 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7672 create-version.sh.
7673 (version.o): Remove.
7674 * gdbreplay.c: Include version.h.
7675 (version, host_name): Don't declare.
7676 * server.h: Include version.h.
7677 (version, host_name): Don't declare.
7678
7679 2013-06-12 Pedro Alves <palves@redhat.com>
7680
7681 * linux-x86-low.c (linux_is_elf64): Delete global.
7682 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7683 with local linux_pid_exe_is_elf_64_file use.
7684
7685 2013-06-11 Pedro Alves <palves@redhat.com>
7686
7687 * linux-low.c (regset_disabled, disable_regset): New functions.
7688 (regsets_fetch_inferior_registers)
7689 (regsets_store_inferior_registers): Use them.
7690 (initialize_regsets_info); Don't allocate the disabled_regsets
7691 array here.
7692 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7693 comment.
7694
7695 2013-06-11 Pedro Alves <palves@redhat.com>
7696
7697 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7698 xmalloc.
7699
7700 2013-06-11 Pedro Alves <palves@redhat.com>
7701
7702 * linux-x86-low.c (initialize_low_arch): Call
7703 init_registers_x32_avx_linux.
7704
7705 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7706
7707 Fix compatibility with Android Bionic.
7708 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7709 it is not empty.
7710
7711 2013-06-07 Pedro Alves <palves@redhat.com>
7712
7713 PR server/14823
7714 * Makefile.in (OBS): Add tdesc.o.
7715 (IPA_OBJS): Add tdesc-ipa.o.
7716 (tdesc-ipa.o): New rule.
7717 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7718 interface.
7719 * linux-low.c (new_inferior): Delete.
7720 (disabled_regsets, num_regsets): Delete.
7721 (linux_add_process): Adjust to set the new per-process
7722 new_inferior flag.
7723 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7724 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7725 was a stop. When calling arch_setup, switch the current inferior
7726 to the thread that got an event.
7727 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7728 (regsets_fetch_inferior_registers)
7729 (regsets_store_inferior_registers): New regsets_info parameter.
7730 Adjust to use it.
7731 (linux_register_in_regsets): New regs_info parameter. Adjust to
7732 use it.
7733 (register_addr, fetch_register, store_register): New usrregs_info
7734 parameter. Adjust to use it.
7735 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7736 parameter regs_info. Adjust to use it.
7737 (linux_fetch_registers): Get the current inferior's regs_info, and
7738 adjust to use it.
7739 (linux_store_registers): Ditto.
7740 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7741 (initialize_low): Don't initialize the target_regsets here. Call
7742 initialize_low_arch.
7743 * linux-low.h (target_regsets): Delete declaration.
7744 (struct regsets_info): New.
7745 (struct usrregs_info): New.
7746 (struct regs_info): New.
7747 (struct process_info_private) <new_inferior>: New field.
7748 (struct linux_target_ops): Delete the num_regs, regmap, and
7749 regset_bitmap fields. New field regs_info.
7750 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7751 * i387-fp.c (num_xmm_registers): Delete.
7752 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7753 calls to new interface.
7754 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7755 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7756 Infer the number of xmm registers from the regcache's target
7757 description.
7758 * i387-fp.h (num_xmm_registers): Delete.
7759 * inferiors.c (add_thread): Don't install the thread's regcache
7760 here.
7761 * proc-service.c (gregset_info): Fetch the current inferior's
7762 regs_info. Adjust to use it.
7763 * regcache.c: Include tdesc.h.
7764 (register_bytes, reg_defs, num_registers)
7765 (gdbserver_expedite_regs): Delete.
7766 (get_thread_regcache): If the thread doesn't have a regcache yet,
7767 create one, instead of aborting gdbserver.
7768 (regcache_invalidate_one): Rename to ...
7769 (regcache_invalidate_thread): ... this.
7770 (regcache_invalidate_one): New.
7771 (regcache_invalidate): Only invalidate registers of the current
7772 process.
7773 (init_register_cache): Add target_desc parameter, and use it.
7774 (new_register_cache): Ditto. Assert the target description has a
7775 non zero registers_size.
7776 (regcache_cpy): Add assertions. Adjust.
7777 (realloc_register_cache, set_register_cache): Delete.
7778 (registers_to_string, registers_from_string): Adjust.
7779 (find_register_by_name, find_regno, find_register_by_number)
7780 (register_cache_size): Add target_desc parameter, and use it.
7781 (free_register_cache_thread, free_register_cache_thread_one)
7782 (regcache_release, register_cache_size): New.
7783 (register_size): Add target_desc parameter, and use it.
7784 (register_data, supply_register, supply_register_zeroed)
7785 (supply_regblock, supply_register_by_name, collect_register)
7786 (collect_register_as_string, collect_register_by_name): Adjust.
7787 * regcache.h (struct target_desc): Forward declare.
7788 (struct regcache) <tdesc>: New field.
7789 (init_register_cache, new_register_cache): Add target_desc
7790 parameter.
7791 (regcache_invalidate_thread): Declare.
7792 (regcache_invalidate_one): Delete declaration.
7793 (regcache_release): Declare.
7794 (find_register_by_number, register_cache_size, register_size)
7795 (find_regno): Add target_desc parameter.
7796 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7797 declarations.
7798 * remote-utils.c: Include tdesc.h.
7799 (outreg, prepare_resume_reply): Adjust.
7800 * server.c: Include tdesc.h.
7801 (gdbserver_xmltarget): Delete declaration.
7802 (get_features_xml, process_serial_event): Adjust.
7803 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7804 declare.
7805 (struct process_info) <tdesc>: New field.
7806 (ipa_tdesc): Declare.
7807 * tdesc.c: New file.
7808 * tdesc.h: New file.
7809 * tracepoint.c: Include tdesc.h.
7810 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7811 (get_context_regcache): Adjust to pass ipa_tdesc down.
7812 (do_action_at_tracepoint): Adjust to get the register cache size
7813 from the context regcache's description.
7814 (traceframe_walk_blocks): Adjust to get the register cache size
7815 from the current trace frame's description.
7816 (traceframe_get_pc): Adjust to get current trace frame's
7817 description and pass it down.
7818 (gdb_collect): Adjust to get the register cache size from the
7819 IPA's description.
7820 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7821 (gdbserver_xmltarget): Delete.
7822 (initialize_low_tracepoint): Set the ipa's target description.
7823 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7824 (initialize_low_tracepoint): Set the ipa's target description.
7825 * linux-x86-low.c: Include tdesc.h.
7826 [__x86_64__] (is_64bit_tdesc): New.
7827 (ps_get_thread_area, x86_get_thread_area): Use it.
7828 (i386_cannot_store_register): Rename to ...
7829 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7830 (i386_cannot_fetch_register): Rename to ...
7831 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7832 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7833 to new interface.
7834 (target_regsets): Rename to ...
7835 (x86_regsets): ... this.
7836 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7837 interface.
7838 (x86_siginfo_fixup): Use is_64bit_tdesc.
7839 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7840 (tdesc_x32_avx_linux, tdesc_x32_linux)
7841 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7842 Declare.
7843 (x86_linux_update_xmltarget): Delete.
7844 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7845 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7846 (AMD64_LINUX_USER64_CS): New.
7847 (x86_linux_read_description): New, based on
7848 x86_linux_update_xmltarget.
7849 (same_process_callback): New.
7850 (x86_arch_setup_process_callback): New.
7851 (x86_linux_update_xmltarget): New.
7852 (x86_regsets_info): New.
7853 (amd64_linux_regs_info): New.
7854 (i386_linux_usrregs_info): New.
7855 (i386_linux_regs_info): New.
7856 (x86_linux_regs_info): New.
7857 (x86_arch_setup): Reimplement.
7858 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7859 (x86_emit_ops): Ditto.
7860 (the_low_target): Adjust. Install x86_linux_regs_info,
7861 x86_cannot_fetch_register, and x86_cannot_store_register.
7862 (initialize_low_arch): New.
7863 * linux-ia64-low.c (tdesc_ia64): Declare.
7864 (ia64_fetch_register): Adjust.
7865 (ia64_usrregs_info, regs_info): New globals.
7866 (ia64_regs_info): New function.
7867 (the_low_target): Adjust.
7868 (initialize_low_arch): New function.
7869 * linux-sparc-low.c (tdesc_sparc64): Declare.
7870 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7871 Adjust.
7872 (sparc_arch_setup): New function.
7873 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7874 (the_low_target): Adjust.
7875 (initialize_low_arch): New function.
7876 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7877 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7878 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7879 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7880 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7881 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7882 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7883 (tdesc_powerpc_isa205_vsx64l): Declare.
7884 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7885 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7886 (ppc_set_pc, ppc_get_hwcap): Adjust.
7887 (ppc_usrregs_info): Forward declare.
7888 (!__powerpc64__) ppc_regmap_adjusted: New global.
7889 (ppc_arch_setup): Adjust to the current process'es target
7890 description.
7891 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7892 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7893 (ppc_store_evrregset): Adjust.
7894 (target_regsets): Rename to ...
7895 (ppc_regsets): ... this, and make static.
7896 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7897 (ppc_regs_info): New function.
7898 (the_low_target): Adjust.
7899 (initialize_low_arch): New function.
7900 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7901 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7902 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7903 (tdesc_s390x_linux64v2): Declare.
7904 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7905 (s390_fill_gregset, s390_store_last_break): Adjust.
7906 (target_regsets): Rename to ...
7907 (s390_regsets): ... this, and make static.
7908 (s390_get_pc, s390_set_pc): Adjust.
7909 (s390_get_hwcap): New target_desc parameter, and use it.
7910 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7911 (s390_arch_setup): Adjust to set the current process'es target
7912 description. Don't adjust the regmap.
7913 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7914 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7915 (regs_info_3264): New globals.
7916 (s390_regs_info): New function.
7917 (the_low_target): Adjust.
7918 (initialize_low_arch): New function.
7919 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7920 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7921 [__mips64] (init_registers_mips_linux)
7922 (init_registers_mips_dsp_linux): Delete defines.
7923 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7924 (have_dsp): New global.
7925 (mips_read_description): New, based on mips_arch_setup.
7926 (mips_arch_setup): Reimplement.
7927 (get_usrregs_info): New function.
7928 (mips_cannot_fetch_register, mips_cannot_store_register)
7929 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7930 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7931 (target_regsets): Rename to ...
7932 (mips_regsets): ... this, and make static.
7933 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7934 (dsp_regs_info, regs_info): New globals.
7935 (mips_regs_info): New function.
7936 (the_low_target): Adjust.
7937 (initialize_low_arch): New function.
7938 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7939 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7940 Declare.
7941 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7942 (arm_read_description): New, with bits factored from
7943 arm_arch_setup.
7944 (arm_arch_setup): Reimplement.
7945 (target_regsets): Rename to ...
7946 (arm_regsets): ... this, and make static.
7947 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7948 (arm_regs_info): New function.
7949 (the_low_target): Adjust.
7950 (initialize_low_arch): New function.
7951 * linux-m68k-low.c (tdesc_m68k): Declare.
7952 (target_regsets): Rename to ...
7953 (m68k_regsets): ... this, and make static.
7954 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7955 (m68k_regs_info): New function.
7956 (m68k_arch_setup): New function.
7957 (the_low_target): Adjust.
7958 (initialize_low_arch): New function.
7959 * linux-sh-low.c (tdesc_sharch): Declare.
7960 (target_regsets): Rename to ...
7961 (sh_regsets): ... this, and make static.
7962 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7963 (sh_regs_info, sh_arch_setup): New functions.
7964 (the_low_target): Adjust.
7965 (initialize_low_arch): New function.
7966 * linux-bfin-low.c (tdesc_bfin): Declare.
7967 (bfin_arch_setup): New function.
7968 (bfin_usrregs_info, regs_info): New globals.
7969 (bfin_regs_info): New function.
7970 (the_low_target): Adjust.
7971 (initialize_low_arch): New function.
7972 * linux-cris-low.c (tdesc_cris): Declare.
7973 (cris_arch_setup): New function.
7974 (cris_usrregs_info, regs_info): New globals.
7975 (cris_regs_info): New function.
7976 (the_low_target): Adjust.
7977 (initialize_low_arch): New function.
7978 * linux-cris-low.c (tdesc_crisv32): Declare.
7979 (cris_arch_setup): New function.
7980 (cris_regsets_info, 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-m32r-low.c (tdesc_m32r): Declare.
7985 (m32r_arch_setup): New function.
7986 (m32r_usrregs_info, regs_info): New globals.
7987 (m32r_regs_info): Adjust.
7988 (initialize_low_arch): New function.
7989 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7990 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7991 (tic6x_usrregs_info): Forward declare.
7992 (tic6x_read_description): New function, based on ...
7993 (tic6x_arch_setup): ... this. Reimplement.
7994 (target_regsets): Rename to ...
7995 (tic6x_regsets): ... this, and make static.
7996 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7997 (tic6x_regs_info): New function.
7998 (the_low_target): Adjust.
7999 (initialize_low_arch): New function.
8000 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8001 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8002 (target_regsets): Rename to ...
8003 (xtensa_regsets): ... this, and make static.
8004 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8005 globals.
8006 (xtensa_arch_setup, xtensa_regs_info): New functions.
8007 (the_low_target): Adjust.
8008 (initialize_low_arch): New function.
8009 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8010 (nios2_arch_setup): Set the current process'es tdesc.
8011 (target_regsets): Rename to ...
8012 (nios2_regsets): ... this.
8013 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8014 (nios2_regs_info): New function.
8015 (the_low_target): Adjust.
8016 (initialize_low_arch): New function.
8017 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8018 (aarch64_arch_setup): Set the current process'es tdesc.
8019 (target_regsets): Rename to ...
8020 (aarch64_regsets): ... this.
8021 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8022 (aarch64_regs_info): New function.
8023 (the_low_target): Adjust.
8024 (initialize_low_arch): New function.
8025 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8026 globals.
8027 (target_regsets): Rename to ...
8028 (tile_regsets): ... this.
8029 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8030 (tile_regs_info): New function.
8031 (tile_arch_setup): Set the current process'es tdesc.
8032 (the_low_target): Adjust.
8033 (initialize_low_arch): New function.
8034 * spu-low.c (tdesc_spu): Declare.
8035 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8036 * win32-arm-low.c (tdesc_arm): Declare.
8037 (arm_arch_setup): New function.
8038 (the_low_target): Install arm_arch_setup instead of
8039 init_registers_arm.
8040 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8041 (init_windows_x86): Rename to ...
8042 (i386_arch_setup): ... this. Set `win32_tdesc'.
8043 (the_low_target): Adjust.
8044 * win32-low.c (win32_tdesc): New global.
8045 (child_add_thread): Don't create the thread cache here.
8046 (do_initial_child_stuff): Set the new process'es tdesc.
8047 * win32-low.h (struct target_desc): Forward declare.
8048 (win32_tdesc): Declare.
8049 * lynx-i386-low.c (tdesc_i386): Declare global.
8050 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8051 * lynx-low.c (lynx_tdesc): New global.
8052 (lynx_add_process): Set the new process'es tdesc.
8053 * lynx-low.h (struct target_desc): Forward declare.
8054 (lynx_tdesc): Declare global.
8055 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8056 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8057 * nto-low.c (nto_tdesc): New global.
8058 (do_attach): Set the new process'es tdesc.
8059 * nto-low.h (struct target_desc): Forward declare.
8060 (nto_tdesc): Declare.
8061 * nto-x86-low.c (tdesc_i386): Declare.
8062 (nto_x86_arch_setup): Set `nto_tdesc'.
8063
8064 2013-06-04 Gary Benson <gbenson@redhat.com>
8065
8066 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8067 to qSupported response when appropriate.
8068 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8069 with nonzero-length annex.
8070 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8071 arguments supplied in annex.
8072
8073 2013-05-31 Doug Evans <dje@google.com>
8074
8075 PR server/15594
8076 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8077 64 bits in 64-cross-32 environment.
8078
8079 2013-05-28 Pedro Alves <palves@redhat.com>
8080
8081 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8082 (aarch64-without-fpu.c): Delete rule.
8083 * configure.srv (aarch64*-*-linux*): Remove references to
8084 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8085 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8086 declaration.
8087
8088 2013-05-24 Pedro Alves <palves@redhat.com>
8089
8090 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8091 instead of strchr/decode_address. Error if the range isn't split
8092 with a ','. Don't assume there's be a ':' in the action.
8093
8094 2013-05-23 Yao Qi <yao@codesourcery.com>
8095 Pedro Alves <palves@redhat.com>
8096
8097 * linux-low.c (lwp_in_step_range): New function.
8098 (linux_wait_1): If the thread was range stepping and stopped
8099 outside the stepping range, report the stop to GDB. Otherwise,
8100 continue stepping. Add range stepping debug output.
8101 (linux_set_resume_request): Copy the step range from the resume
8102 request to the lwp.
8103 (linux_supports_range_stepping): New.
8104 (linux_target_ops) <supports_range_stepping>: Set to
8105 linux_supports_range_stepping.
8106 * linux-low.h (struct linux_target_ops)
8107 <supports_range_stepping>: New field.
8108 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8109 * linux-x86-low.c (x86_supports_range_stepping): New.
8110 (the_low_target) <supports_range_stepping>: Set to
8111 x86_supports_range_stepping.
8112 * server.c (handle_v_cont): Handle 'r' action.
8113 (handle_v_requests): Append ";r" if the target supports range
8114 stepping.
8115 * target.h (struct thread_resume) <step_range_start,
8116 step_range_end>: New fields.
8117 (struct target_ops) <supports_range_stepping>:
8118 New field.
8119 (target_supports_range_stepping): New macro.
8120
8121 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8122
8123 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8124 confusion in comment.
8125
8126 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8127
8128 * lynx-low.c (struct process_info_private): New type.
8129 (lynx_add_process): New function.
8130 (lynx_create_inferior, lynx_attach): Replace calls to
8131 add_process by calls to lynx_add_process.
8132 (lynx_resume): If PTID is null, then try using
8133 current_process()->private->last_wait_event_ptid.
8134 Add comments.
8135 (lynx_clear_inferiors): Delete. The contents of that function
8136 has been inlined in lynx_mourn;
8137 (lynx_wait_1): Save the ptid in the process's private data.
8138 (lynx_mourn): Free the process' private data. Replace call
8139 to lynx_clear_inferiors by call to clear_inferiors.
8140
8141 2013-05-17 Yao Qi <yao@codesourcery.com>
8142
8143 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8144 the right place.
8145
8146 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8147
8148 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8149 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8150 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8151 PT_TEXT_END_ADDR guards. Update comments.
8152 (linux_target_op) <read_offsets>: Conditionally define to
8153 linux_read_offsets if the target is UCLIBC and if it defines
8154 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8155
8156 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8157 Andrew Jenner <andrew@codesourcery.com>
8158
8159 * Makefile.in (SFILES): Add linux-nios2-low.c.
8160 (clean): Add action to delete nios2-linux.c.
8161 (nios2-linux.c): New rule.
8162 * configure.srv: Add nios2*-*-linux*.
8163 * linux-nios2-low.c: New.
8164
8165 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8166
8167 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8168
8169 2013-04-25 Hui Zhu <hui@codesourcery.com>
8170
8171 PR gdb/15186
8172 * ax.c (ax_printf): Add fflush.
8173
8174 2013-04-22 Tom Tromey <tromey@redhat.com>
8175
8176 * Makefile.in (SFILES): Add filestuff.c.
8177 (OBS): Add filestuff.o.
8178 (filestuff.o): New target.
8179 * config.in, configure: Rebuild.
8180 * configure.ac: Check for fdwalk, pipe2.
8181
8182 2013-04-17 Pedro Alves <palves@redhat.com>
8183
8184 * configure.ac (USE_THREAD_DB): Delete variable.
8185 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8186 Don't AC_SUBST USE_THREAD_DB.
8187 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8188 * config.in, configure: Regenerate.
8189
8190 2013-04-16 Pedro Alves <palves@redhat.com>
8191
8192 * linux-low.h (struct lwp_info) <thread_known>: Move under
8193 the USE_THREAD_DB #ifdef.
8194
8195 2013-04-16 Pedro Alves <palves@redhat.com>
8196
8197 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8198 (linux-low.o): Delete rule.
8199 * linux-low.h: Always include "gdb_thread_db.h" instead of
8200 conditionally including thread_db.h.
8201 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8202 HAVE_THREAD_DB_H.
8203
8204 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8205
8206 * Makefile.in (install-only): Fix make install regression.
8207
8208 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8209
8210 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8211 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8212 installation.
8213 * gdbserver.1: Remove.
8214
8215 2013-03-22 Pedro Alves <palves@redhat.com>
8216
8217 * linux-low.c (handle_extended_wait): Don't call
8218 linux_enable_event_reporting.
8219
8220 2013-03-15 Tony Theodore <tonyt@logyst.com>
8221
8222 PR build/9098:
8223 * Makefile.in (SHELL): Use @SHELL@.
8224
8225 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8226
8227 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8228 compiler warning.
8229
8230 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8231
8232 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8233 Remove extraneous NULL element.
8234
8235 2013-03-13 Yao Qi <yao@codesourcery.com>
8236
8237 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8238 'V' block in trace frame.
8239
8240 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8241
8242 * target.h (struct target_ops): Add btrace ops.
8243 (target_supports_btrace): New macro.
8244 (target_enable_btrace): New macro.
8245 (target_disable_btrace): New macro.
8246 (target_read_btrace): New macro.
8247 * gdbthread.h (struct thread_info): Add btrace field.
8248 * server.c: Include btrace-common.h.
8249 (handle_btrace_general_set): New function.
8250 (handle_btrace_enable): New function.
8251 (handle_btrace_disable): New function.
8252 (handle_general_set): Call handle_btrace_general_set.
8253 (handle_qxfer_btrace): New function.
8254 (struct qxfer qxfer_packets[]): Add btrace entry.
8255 * inferiors.c (remove_thread): Disable btrace.
8256 * linux-low: Include linux-btrace.h.
8257 (linux_low_enable_btrace): New function.
8258 (linux_low_read_btrace): New function.
8259 (linux_target_ops): Add btrace ops.
8260 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8261 Add srv_linux_btrace=yes.
8262 (x86_64-*-linux*): Add linux-btrace.o.
8263 Add srv_linux_btrace=yes.
8264 * configure.ac: Define HAVE_LINUX_BTRACE.
8265 * config.in: Regenerated.
8266 * configure: Regenerated.
8267
8268 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8269
8270 * server.c (handle_qxfer): Preserve error message if -3 is
8271 returned.
8272 (qxfer): Document the -3 return value.
8273
8274 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8275
8276 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8277 (linux_btrace_h): New variable.
8278 (linux-btrace.o): New rule.
8279
8280 2013-03-08 Stan Shebs <stan@codesourcery.com>
8281 Hafiz Abid Qadeer <abidh@codesourcery.com>
8282
8283 * tracepoint.c (trace_buffer_size): New global.
8284 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8285 (init_trace_buffer): Change to one-argument function. Allocate
8286 trace buffer memory.
8287 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8288 handle QTBuffer:size packet.
8289 (cmd_bigqtbuffer_size): New function.
8290 (initialize_tracepoint): Call init_trace_buffer with
8291 DEFAULT_TRACE_BUFFER_SIZE.
8292 * server.c (handle_query): Add QTBuffer:size in the
8293 supported packets.
8294
8295 2013-03-07 Yao Qi <yao@codesourcery.com>
8296
8297 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8298 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8299 of -1.
8300 (cmd_qtsp): Adjust condition. Do post increment.
8301 Set cur_action and cur_step_action back to 0.
8302
8303 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8304
8305 PR server/15236
8306 * linux-low.c (linux_write_memory): Return early success if LEN is
8307 zero.
8308
8309 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8310
8311 * configure.srv: Add x86_64-*-cygwin* as target.
8312
8313 2013-02-28 Tom Tromey <tromey@redhat.com>
8314
8315 * configure.ac: Invoke AC_SYS_LARGEFILE.
8316 * configure, config.in: Rebuild.
8317
8318 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8319
8320 * win32-low.c: Throughout, fix format strings and casts of
8321 printf-like functions to avoid type related warnings on all
8322 platforms.
8323 (get_child_debug_event): Print dwDebugEventCode as hex since
8324 that's how it's usually documented.
8325
8326 2013-02-28 Yao Qi <yao@codesourcery.com>
8327
8328 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8329 pulongest.
8330
8331 2013-02-27 Jiong Wang <jiwang@tilera.com>
8332
8333 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8334 (reg-tilegx32.c): New rule.
8335 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8336 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8337 different register info initializer according to elf class.
8338 (init_registers_tilgx32): New function. The tilegx32 register info
8339 initializer.
8340 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8341 (tile_store_gregset): Likewise.
8342
8343 2013-02-27 Yao Qi <yao@codesourcery.com>
8344
8345 * server.c (process_point_options): Print debug message when
8346 debug_threads is true.
8347
8348 2013-02-26 Yao Qi <yao@codesourcery.com>
8349
8350 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8351
8352 2013-02-19 Pedro Alves <palves@redhat.com>
8353 Kai Tietz <ktietz@redhat.com>
8354
8355 PR gdb/15161
8356
8357 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8358 instead of strtoul to extract address from packet.
8359 (process_serial_event) <'z'>: Likewise.
8360
8361 2013-02-18 Yao Qi <yao@codesourcery.com>
8362
8363 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8364
8365 2013-02-14 Pedro Alves <palves@redhat.com>
8366
8367 Plug memory leak.
8368
8369 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8370 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8371
8372 2013-02-14 Pedro Alves <palves@redhat.com>
8373
8374 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8375
8376 2013-02-14 Pedro Alves <palves@redhat.com>
8377
8378 * tracepoint.c (save_string): Delete.
8379 (add_tracepoint_action): Use savestring instead of save_string.
8380
8381 2013-02-12 Pedro Alves <palves@redhat.com>
8382
8383 * linux-xtensa-low.c: Ditto.
8384 * xtensa-xtregs.c: Ditto.
8385
8386 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8387
8388 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8389 thread_db.
8390
8391 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8392
8393 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8394 aarch64_num_wp_regs and aarch64_num_bp_regs to
8395 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8396
8397 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8398
8399 * linux-aarch64-low.c (ps_get_thread_area): Replace
8400 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8401
8402 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8403 Marcus Shawcroft <marcus.shawcroft@arm.com>
8404 Nigel Stephens <nigel.stephens@arm.com>
8405 Yufeng Zhang <yufeng.zhang@arm.com>
8406
8407 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8408 (aarch64.c, aarch64-without-fpu.c): New targets.
8409 * configure.srv (aarch64*-*-linux*): New.
8410 * linux-aarch64-low.c: New file.
8411
8412 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8413
8414 * linux-low.c (handle_extended_wait, linux_create_inferior)
8415 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8416 (dequeue_one_deferred_signal, linux_resume_one_thread)
8417 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8418 (linux_tracefork_grandchild, linux_test_for_tracefork)
8419 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8420 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8421 where the argument is 0.
8422
8423 2013-01-25 Yao Qi <yao@codesourcery.com>
8424
8425 * event-loop.c: Include "queue.h".
8426 (gdb_event_p): New typedef.
8427 (struct gdb_event) <next_event>: Remove.
8428 (event_queue): Change to QUEUE(gdb_event_p).
8429 (async_queue_event): Remove.
8430 (gdb_event_xfree): New.
8431 (initialize_event_loop): New.
8432 (process_event): Use API from QUEUE.
8433 (wait_for_event): Likewise.
8434 * server.c (main): Call initialize_event_loop.
8435 * server.h (initialize_event_loop): Declare.
8436
8437 2013-01-18 Yao Qi <yao@codesourcery.com>
8438
8439 * ax.h (struct eval_agent_expr_context): New.
8440 (gdb_eval_agent_expr): Update declaration.
8441 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8442 TFRAME. Add new argument CTX.
8443 * server.h (struct eval_agent_expr_context): Declare.
8444 (agent_mem_read, agent_tsv_read): Update declaration.
8445 (agent_mem_read_string): Likewise.
8446 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8447 (add_traceframe_block): Add new argument TPOINT.
8448 Increase TPOINT->traceframe_usage.
8449 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8450 eval_tracepoint_agent_expr.
8451 (condition_true_at_tracepoint): Likewise.
8452 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8453 (agent_mem_read_string, agent_tsv_read): Likewise.
8454
8455 2013-01-16 Yao Qi <yao@codesourcery.com>
8456
8457 * linux-low.c (linux_resume_one_lwp): Don't check
8458 'lwp->bp_reinsert != 0'.
8459
8460 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8461 Pedro Alves <palves@redhat.com>
8462
8463 * lynx-low.c (ptrace_request_to_str): Define a temporary
8464 macro and use it to simplify this function's implementation.
8465
8466 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8467
8468 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8469 sets errno.
8470
8471 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8472
8473 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8474
8475 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8476
8477 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8478
8479 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8480
8481 * lynx-low.c (lynx_resume): Use the resume_info parameter
8482 to determine the ptid for the lynx_ptrace call, unless
8483 it is equal to minus_one_ptid, in which case we use the
8484 ptid of the current_inferior.
8485 (lynx_wait_1): After having received a thread create/exit
8486 event, resume the inferior's execution using the signaling
8487 thread's ptid, rather than the old ptid.
8488
8489 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8490
8491 * lynx-low.c (lynx_resume): Delete variable ret.
8492
8493 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8494
8495 * gdbreplay.c (gdbreplay_version): Update copyright year.
8496 * server.c (gdbserver_version): Likewise.
8497
8498 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8499
8500 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8501 new thread.
8502
8503 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8504
8505 * lynx-low.c (ptrace_request_to_str): Add handling for
8506 PTRACE_GETTRACESIG.
8507
8508 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8509
8510 * lynx-low.c (lynx_attach): Delete variable new_process.
8511
8512 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8513
8514 * lynx-low.c (lynx_create_inferior): Delete variable
8515 new_process.
8516
8517 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8518
8519 * lynx-low.c (ptrace_request_to_str): Do not handle
8520 PTRACE_GETTHREADLIST if this macro does not exist.
8521
8522 2012-12-15 Yao Qi <yao@codesourcery.com>
8523
8524 * Makefile.in (OBS): Add notif.o.
8525 * notif.c, notif.h: New.
8526 * server.c: Include "notif.h".
8527 (struct vstop_notif) <next>: Remove.
8528 <base>: New field.
8529 (queue_stop_reply): Update.
8530 (push_event, send_next_stop_reply): Remove.
8531 (discard_queued_stop_replies): Update.
8532 (notif_stop): New variable.
8533 (handle_v_stopped): Remove.
8534 (handle_v_requests): Don't call handle_v_stopped. Call
8535 handle_ack_notif instead.
8536 (queue_stop_reply_callback): Call notif_event_enque instead
8537 of queue_stop_reply.
8538 (handle_status): Don't call send_next_stop_reply, call
8539 notif_write_event instead.
8540 (kill_inferior_callback): Likewise.
8541 (detach_or_kill_inferior_callback): Likewise.
8542 (main): Call initialize_notif.
8543 (process_serial_event): Call QUEUE_is_empty.
8544 (handle_target_event): Call notif_push instead of push event.
8545 * server.h (push_event): Remove declaration.
8546
8547 2012-12-10 Tom Tromey <tromey@redhat.com>
8548
8549 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8550 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8551 macros.
8552 (.c.o): Rewrite.
8553 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8554 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8555 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8556 (amd64-linux-ipa.o, ax.o): Rewrite.
8557 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8558 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8559 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8560 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8561 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8562 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8563 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8564 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8565 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8566 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8567 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8568 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8569 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8570 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8571 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8572 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8573 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8574 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8575 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8576 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8577 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8578 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8579 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8580 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8581 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8582 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8583 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8584 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8585 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8586 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8587 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8588 (reg-tilegx.o): Remove.
8589 (all_object_files): New macro.
8590 Include .deps files.
8591 * aclocal.m4, configure: Rebuild.
8592 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8593 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8594 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8595
8596 2012-12-05 Tom Tromey <tromey@redhat.com>
8597
8598 PR gdb/14917:
8599 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8600
8601 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8602
8603 * configure.ac: Check for linux/perf_event.h.
8604 * config.in: Regenerated.
8605 * configure: Regenerated.
8606
8607 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8608
8609 * hostio.c (handle_readlink): Decrease buffer size
8610 parameter passed to readlink by one byte.
8611
8612 2012-11-26 Yao Qi <yao@codesourcery.com>
8613
8614 * configure.ac (build_warnings): Append '-Wempty-body'.
8615 * configure: Regenerated.
8616 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8617 body.
8618
8619 2012-11-15 Pierre Muller <muller@sourceware.org>
8620
8621 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8622 * config.in: Regenerate.
8623 * configure: Regenerate.
8624 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8625 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8626 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8627 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8628 header.
8629 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8630 instead of <sys/wait.h> header.
8631 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8632
8633 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8634
8635 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8636 (various make rules): Remove -DGDBSERVER
8637
8638 2012-11-09 Yao Qi <yao@codesourcery.com>
8639
8640 * spu-low.c (current_ptid): Move it to ..
8641 * gdbthread.h: ... here. New.
8642 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8643 * server.c (myresume, process_serial_event): Likewise.
8644 * thread-db.c (thread_db_find_new_threads): Likewise.
8645 * tracepoint.c (run_inferior_command): Likewise.
8646
8647 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8648
8649 * server.c (handle_search_memory_1): Include access length in
8650 warning message.
8651
8652 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8653
8654 * linux-crisv32-low.c: Fix compile errors.
8655
8656 2012-09-04 Yao Qi <yao@codesourcery.com>
8657
8658 * tracepoint.c (cmd_qtsv): Adjust debug message.
8659 Don't check CUR_TPOINT.
8660
8661 2012-08-28 Yao Qi <yao@codesourcery.com>
8662
8663 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8664 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8665 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8666 Remove declarations of xmalloc, xreallloc, xstrdup and
8667 freeargv.
8668 * Makefile.in (libiberty_h): New.
8669 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8670 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8671
8672 2012-08-23 Yao Qi <yao@codesourcery.com>
8673
8674 * server.h: Remove declaration of 'xsnprintf'.
8675
8676 2012-08-22 Keith Seitz <keiths@redhat.com>
8677
8678 * server.h: Include build-gnulib-gbserver/config.h.
8679 * gdbreplay.c: Likewise.
8680
8681 2012-08-08 Doug Evans <dje@google.com>
8682
8683 * Makefile.in (SFILES): Add gdb_vecs.c.
8684 (OBS): Add gdb_vecs.o.
8685 (gdb_vecs_h, host_defs_h): New variables.
8686 (thread-db.o): Add $(gdb_vecs_h) dependency.
8687 (gdb_vecs.o): New rule.
8688 * thread-db.c: #include "gdb_vecs.h".
8689 (thread_db_load_search): Use a vector to iterate over path elements.
8690 Handle text appearing after "$pdir".
8691
8692 * configure.ac: Add check for strstr.
8693 * config.in: Regenerate.
8694 * configure: Regenerate.
8695
8696 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8697
8698 * hostio.c (handle_pread): If pread fails, fall back to attempting
8699 lseek/read.
8700 (handle_pwrite): Likewise for pwrite.
8701
8702 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8703
8704 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8705 between unsupported TYPE and unimplementable ADDR/LEN combination.
8706 (arm_insert_point): Act on new return value.
8707
8708 2012-07-31 Pedro Alves <palves@redhat.com>
8709
8710 * server.c (process_point_options): Only skip tokens if we find
8711 one that is unrecognized. Don't treat 'X' specially while
8712 skipping unrecognized tokens.
8713
8714 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8715
8716 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8717 to 4-byte-align HW breakpoint addresses for Thumb.
8718
8719 2012-07-27 Yao Qi <yao@codesourcery.com>
8720
8721 PR remote/14161.
8722
8723 * server.h: Declare gdb_agent_about_to_close.
8724 * target.c (kill_inferior): Include "agent.h".
8725 New. Send command 'kill'.
8726 * target.h (kill_inferior): Removed macro.
8727 * tracepoint.c (gdb_agent_about_to_close): New.
8728 (gdb_agent_helper_thread): Handle command 'close'.
8729 Wait endlessly until the inferior stops.
8730 Install gdb_agent_remove_socket to atexit hook.
8731 (agent_socket_name): New static variable.
8732 (gdb_agent_socket_init): Replace local variable 'name' with
8733 'agent_socket_name'.
8734 (gdb_agent_remove_socket): New.
8735
8736 2012-07-27 Yao Qi <yao@codesourcery.com>
8737
8738 * server.c (process_point_options): Stop at 'X' when parsing.
8739
8740 2012-07-19 Michael Eager <eager@eagercon.com>
8741
8742 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8743 to hw_execute.
8744 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8745 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8746 hardware breakpoint.
8747
8748 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8749
8750 * gdbserver/linux-low.c (initialize_low): Call
8751 linux_ptrace_init_warnings.
8752
8753 2012-07-02 Doug Evans <dje@google.com>
8754
8755 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8756 pointer to int.
8757
8758 2012-07-02 Stan Shebs <stan@codesourcery.com>
8759
8760 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8761 (ax.o): Add it to build rule.
8762 (ax-ipa.o): Ditto.
8763 (OBS): Add format.o.
8764 (IPA_OBS): Add format.o.
8765 * server.c (handle_query): Claim support for breakpoint commands.
8766 (process_point_options): Add command case.
8767 (process_serial_event): Leave running if there are printfs in
8768 effect.
8769 * mem-break.h (any_persistent_commands): Declare.
8770 (add_breakpoint_commands): Declare.
8771 (gdb_no_commands_at_breakpoint): Declare.
8772 (run_breakpoint_commands): Declare.
8773 * mem-break.c (struct point_command_list): New struct.
8774 (struct breakpoint): New field command_list.
8775 (any_persistent_commands): New function.
8776 (add_commands_to_breakpoint): New function.
8777 (add_breakpoint_commands): New function.
8778 (gdb_no_commands_at_breakpoint): New function.
8779 (run_breakpoint_commands): New function.
8780 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8781 locally.
8782 * ax.c: Include format.h.
8783 (ax_printf): New function.
8784 (gdb_eval_agent_expr): Add printf opcode.
8785
8786 2012-06-13 Yao Qi <yao@codesourcery.com>
8787
8788 * server.c (start_inferior): Remove duplicated writes to fields
8789 'last_resume_kind' and 'last_status' of 'current_inferior'.
8790
8791 2012-06-12 Yao Qi <yao@codesourcery.com>
8792 Pedro Alves <palves@redhat.com>
8793
8794 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8795 comment.
8796 * server.c (handle_v_cont): Extend comment.
8797
8798 2012-06-11 Yao Qi <yao@codesourcery.com>
8799
8800 * linux-low.c (linux_attach): Add 'static'.
8801
8802 2012-06-06 Yao Qi <yao@codesourcery.com>
8803
8804 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8805
8806 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8807
8808 Fix gcc -flto compilation warning.
8809 * server.c (main): Make variable multi_mode and attach volatile.
8810
8811 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8812
8813 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8814 if the platform doesn't know about it.
8815
8816 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8817
8818 * Makefile.in (SFILES): Add linux-tile-low.c.
8819 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8820 * configure.srv: Handle tilegx-*-linux*.
8821 * linux-tile-low.c: New file.
8822
8823 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8824
8825 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8826
8827 2012-05-24 Pedro Alves <palves@redhat.com>
8828
8829 PR gdb/7205
8830
8831 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8832
8833 2012-05-24 Pedro Alves <palves@redhat.com>
8834
8835 PR gdb/7205
8836
8837 Replace target_signal with gdb_signal throughout.
8838
8839 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8840
8841 * linux-low.c (linux_store_registers): Avoid the copying sequence
8842 when no data has been retrieved by ptrace.
8843
8844 2012-05-22 Will Deacon <will.deacon@arm.com>
8845
8846 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8847 Include asm/ptrace.h.
8848 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8849 already defined.
8850
8851 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8852
8853 * linux-low.c (linux_store_registers): Don't re-retrieve data
8854 with ptrace that has already been obtained from /proc. Always
8855 copy any data retrieved with ptrace to the buffer supplied.
8856
8857 2012-05-11 Yao Qi <yao@codesourcery.com>
8858 Pedro Alves <palves@redhat.com>
8859
8860 * linux-low.c (enum stopping_threads_kind): New.
8861 (stopping_threads): Change type to `enum stopping_threads_kind'.
8862 (handle_extended_wait): If stopping and suspending threads, leave
8863 the new_lwp suspended too.
8864 (linux_wait_for_event): Adjust.
8865 (stop_all_lwps): Set `stopping_threads' to
8866 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8867 whether we're suspending threads or just stopping them. Assert no
8868 recursion happens.
8869
8870 2012-04-29 Yao Qi <yao@codesourcery.com>
8871
8872 * server.h: Move some code to ...
8873 * gdbthread.h: ... here. New.
8874 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8875 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8876 (nto-low.o, win32-low.o): Likewise.
8877 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8878 * regcache.c, remote-utils.c, server.c: Likewise.
8879 * target.c, tracepoint.c, win32-low.c: Likewise.
8880
8881 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8882
8883 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8884 (PTRACE_ARG4_TYPE): Likewise.
8885 (PTRACE_XFER_TYPE): Likewise.
8886 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8887 ptrace to PTRACE_ARG3_TYPE.
8888 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8889 (PTRACE_ARG4_TYPE): Likewise.
8890 (PTRACE_XFER_TYPE): Likewise.
8891 (linux_detach_one_lwp): Cast fourth argument of
8892 ptrace to long then PTRACE_ARG4_TYPE.
8893 (regsets_fetch_inferior_registers): Cast third argument of
8894 ptrace to long then PTRACE_ARG3_TYPE.
8895 (regsets_store_inferior_registers): Likewise.
8896
8897 2012-04-20 Pedro Alves <palves@redhat.com>
8898
8899 * configure: Regenerate.
8900
8901 2012-04-19 Pedro Alves <palves@redhat.com>
8902
8903 * Makefile.in (GNULIB_BUILDDIR): New.
8904 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8905 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8906 (all, install-only, uninstall, clean-info, all-lib, clean): No
8907 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8908 (maintainer-clean realclean distclean): Use subdir_do.
8909 (subdir_do): New.
8910 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8911 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8912 * acinclude.m4: Include acx_configure_dir.m4.
8913 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8914 calls. Call AC_PROG_RANLIB. Configure gnulib using
8915 ACX_CONFIGURE_DIR.
8916 (GNULIB): New.
8917 (GNULIB_STDINT_H): Adjust.
8918 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8919 * gdbreplay.c: Include build-gnulib/config.h.
8920 * server.h: Likewise.
8921 * aclocal.m4: Regenerate.
8922 * config.in: Regenerate.
8923 * configure: Regenerate.
8924
8925 2012-04-19 Pedro Alves <palves@redhat.com>
8926
8927 * Makefile.in (LIBGNU, INCGNU): Adjust.
8928 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8929 (all, install-only, uninstall, clean-info, all-lib, clean)
8930 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8931 * configure.ac: Adjust AC_OUTPUT output.
8932 * aclocal.m4: Regenerate.
8933 * configure: Regenerate.
8934
8935 2012-04-19 Pedro Alves <palves@redhat.com>
8936
8937 * Makefile.in (generated_files): New.
8938 (server_h): Remove the explicit dependency on config.h, and depend
8939 on $generated_files.
8940
8941 2012-04-19 Pedro Alves <palves@redhat.com>
8942
8943 * Makefile.in (INCGNU): Add -Ignulib.
8944
8945 2012-04-19 Pedro Alves <palves@redhat.com>
8946
8947 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8948 (INCGNU): ... this, and spell out -I here.
8949 (GNULIB_LIB): Rename to ...
8950 (LIBGNU): ... this.
8951 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8952
8953 2012-04-19 Pedro Alves <palves@redhat.com>
8954
8955 * config.in: Regenerate.
8956
8957 2012-04-19 Pedro Alves <palves@redhat.com>
8958
8959 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8960 * server.h (memmem): Remove declaration.
8961 * config.in: Regenerate.
8962 * configure: Regenerate.
8963
8964 2012-04-19 Yao Qi <yao@codesourcery.com>
8965
8966 * Makefile.in (SFILES): Add common/vec.c.
8967 (OBS): Add vec.o.
8968 (vec.o): New rule.
8969
8970 2012-04-19 Yao Qi <yao@codesourcery.com>
8971
8972 * remote-utils.c (prepare_resume_reply): Replace with macro
8973 target_core_of_thread.
8974 * server.c (handle_qxfer_threads_proper): Likewise.
8975 * target.h (traget_core_of_thread): New macro.
8976
8977 2012-04-18 Pedro Alves <palves@redhat.com>
8978
8979 * aclocal.m4: Regenerate.
8980 * configure: Regenerate.
8981
8982 2012-04-16 Yao Qi <yao@codesourcery.com>
8983
8984 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8985 duplicated on address.
8986
8987 2012-04-16 Yao Qi <yao@codesourcery.com>
8988
8989 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8990 (struct tracepoint_action_ops) <send>: New field.
8991 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8992 (agent_expr_send, x_tracepoint_action_send): New.
8993 (l_tracepoint_action_send): New.
8994 (cmd_qtdp): Download and install tracepoint
8995 according to `use_agent'.
8996 (run_inferior_command): Add one more parameter `len'.
8997 Update callers.
8998 (tracepoint_send_agent): New.
8999 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9000
9001 2012-04-16 Yao Qi <yao@codesourcery.com>
9002
9003 * tracepoint.c (download_tracepoints): Moved to ...
9004 (cmd_qtstart): ... here.
9005
9006 2012-04-14 Yao Qi <yao@codesourcery.com>
9007
9008 * tracepoint.c: Include inttypes.h.
9009 (struct collect_memory_action): Use sized types.
9010 (struct tracepoint): Likewise.
9011 (cmd_qtdp, stop_tracing): Update print specifiers.
9012 (cmd_qtp, response_tracepoint): Likewise.
9013 (collect_data_at_tracepoint): Likewise.
9014 (collect_data_at_step): Likewise.
9015
9016 2012-04-14 Yao Qi <yao@codesourcery.com>
9017
9018 Import gnulib module inttypes.
9019 * aclocal.m4, config.in, configure: Regenerated.
9020
9021 2012-04-14 Yao Qi <yao@codesourcery.com>
9022
9023 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9024 Makefile and config.status at last.
9025
9026 2012-04-13 Yao Qi <yao@codesourcery.com>
9027
9028 * tracepoint.c: Include stdint.h unconditionally.
9029
9030 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9031
9032 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9033 on BFD_HAVE_SYS_PROCFS_TYPE.
9034 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9035 * configure: Regenerate.
9036 * config.in: Likewise.
9037
9038 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9039
9040 * Makefile.in (clean): Also remove x32.c x32-linux.c
9041 x32-avx.c x32-avx-linux.c.
9042 (x32.o): New target.
9043 (x32.c): Likewise.
9044 (x32-linux.o): Likewise.
9045 (x32-linux.c): Likewise.
9046 (x32-avx.o): Likewise.
9047 (x32-avx.c): Likewise.
9048 (x32-avx-linux.o): Likewise.
9049 (x32-avx-linux.c): Likewise.
9050
9051 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9052 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9053 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9054 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9055 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9056 i386/x32-avx-linux.xml.
9057
9058 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9059 (init_registers_x32_avx_linux): Likwise.
9060 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9061 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9062
9063 2012-04-13 Pedro Alves <palves@redhat.com>
9064
9065 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9066 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9067 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9068 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9069 the sub-make.
9070
9071 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9072
9073 * linux-x86-low.c (compat_x32_clock_t): New.
9074 (compat_x32_siginfo_t): Likewise.
9075 (compat_x32_siginfo_from_siginfo): Likewise.
9076 (siginfo_from_compat_x32_siginfo): Likewise.
9077 (linux_is_elf64): Likewise.
9078 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9079 and siginfo_from_compat_x32_siginfo for x32.
9080 (x86_arch_setup): Set linux_is_elf64.
9081
9082 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9083
9084 PR gdb/13969
9085 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9086 e_machine field.
9087 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9088 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9089 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9090 compatible with process.
9091
9092 2012-04-12 Yao Qi <yao@codesourcery.com>
9093
9094 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9095 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9096 (install-only, install-info, clean): Handle sub dir gnulib.
9097 (all-lib, am--refresh): New targets.
9098 (memmem.o): Remove target.
9099 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9100 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9101 (AC_REPLACE_FUNCS): Remove memmem.
9102 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9103 (AC_OUTPUT): Generate Makefile in gnulib/.
9104 * aclocal.m4, config.in, configure: Regenerated.
9105
9106 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9107
9108 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9109
9110 2012-04-05 Pedro Alves <palves@redhat.com>
9111
9112 -Werror=strict-aliasing
9113
9114 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9115 pointer.
9116
9117 2012-04-04 Pedro Alves <palves@redhat.com>
9118
9119 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9120 (sparc_store_gregset_from_stack, sparc_store_gregset)
9121 (sparc_breakpoint_at): Fix formatting.
9122
9123 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9124
9125 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9126 are available.
9127 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9128 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9129 * config.in: Regenerate.
9130 * configure: Likewise.
9131
9132 2012-03-29 Pedro Alves <palves@redhat.com>
9133
9134 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9135 Correct ptrace arguments.
9136
9137 2012-03-28 Pedro Alves <palves@redhat.com>
9138
9139 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9140 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9141 (IA64_FR1_REGNUM): New defines.
9142 (ia64_fetch_register): New.
9143 (the_low_target): Install it.
9144 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9145 field.
9146 * linux-low.c (linux_fetch_registers): Try the
9147 the_low_target.fetch_register hook first.
9148
9149 * linux-arm-low.c (the_low_target): Adjust.
9150 * linux-bfin-low.c (the_low_target): Adjust.
9151 * linux-cris-low.c (the_low_target): Adjust.
9152 * linux-crisv32-low.c (the_low_target): Adjust.
9153 * linux-m32r-low.c (the_low_target): Adjust.
9154 * linux-m68k-low.c (the_low_target): Adjust.
9155 * linux-mips-low.c (the_low_target): Adjust.
9156 * linux-ppc-low.c (the_low_target): Adjust.
9157 * linux-s390-low.c (the_low_target): Adjust.
9158 * linux-sh-low.c (the_low_target): Adjust.
9159 * linux-sparc-low.c (the_low_target): Adjust.
9160 * linux-tic6x-low.c (the_low_target): Adjust.
9161 * linux-x86-low.c (the_low_target): Adjust.
9162 * linux-xtensa-low.c (the_low_target): Adjust.
9163
9164 2012-03-26 Pedro Alves <palves@redhat.com>
9165
9166 * server.c (handle_qxfer_libraries): Don't bail early if
9167 the_target->qxfer_libraries_svr4 is not NULL.
9168
9169 2012-03-26 Pedro Alves <palves@redhat.com>
9170
9171 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9172
9173 2012-03-23 Pedro Alves <palves@redhat.com>
9174
9175 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9176 "library-list-svr4" element's start tag when the the DSO list is
9177 empty.
9178
9179 2012-03-23 Pedro Alves <palves@redhat.com>
9180
9181 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9182 a variable whose type size is the same as the inferior's pointer
9183 size.
9184
9185 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9186
9187 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9188 struct siginfo.
9189 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9190 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9191 * linux-low.h: Include <signal.h>.
9192 (struct siginfo): Remove forward declaration.
9193 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9194 struct siginfo.
9195
9196 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9197
9198 * .gitignore: Ignore more files.
9199
9200 2012-03-19 Pedro Alves <palves@redhat.com>
9201 Jan Kratochvil <jan.kratochvil@redhat.com>
9202
9203 * server.c (cont_thread, general_thread): Add describing comments.
9204 (start_inferior): Clear `cont_thread'.
9205 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9206 of a process.
9207
9208 2012-03-15 Yao Qi <yao@codesourcery.com>
9209
9210 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9211 handling to ...
9212 (cmd_qtdp): ... here.
9213
9214 2012-03-15 Yao Qi <yao@codesourcery.com>
9215
9216 * tracepoint.c (struct tracepoint_action_ops): New.
9217 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9218 (m_tracepoint_action_download): New.
9219 (r_tracepoint_action_download): New.
9220 (x_tracepoint_action_download): New.
9221 (l_tracepoint_action_download): New.
9222 (add_tracepoint_action): Install `action->ops' according type.
9223 (download_tracepoint_1): Move code `download' function pointer
9224 of various tracepoint_action_ops.
9225
9226 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9227
9228 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9229 linux_ptrace_attach_warnings.
9230
9231 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9232
9233 * Makefile.in (linux-ptrace.o): New.
9234 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9235 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9236 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9237 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9238 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9239 of these targets.
9240 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9241
9242 2012-03-08 Yao Qi <yao@codesourcery.com>
9243 Pedro Alves <palves@redhat.com>
9244
9245 Fix PR server/13392.
9246 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9247 offset of JMP insn.
9248 * tracepoint.c (remove_tracepoint): New.
9249 (cmd_qtdp): Call remove_tracepoint when failed to install.
9250
9251 2012-03-07 Pedro Alves <palves@redhat.com>
9252
9253 * linux-low.c (get_detach_signal): New.
9254 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9255 Pass on pending signals to PTRACE_DETACH. Check the result of the
9256 ptrace call.
9257 * server.c (program_signals, program_signals_p): New.
9258 (handle_general_set): Handle QProgramSignals.
9259 * server.h (program_signals, program_signals_p): Declare.
9260
9261 2012-03-05 Pedro Alves <palves@redhat.com>
9262 Jan Kratochvil <jan.kratochvil@redhat.com>
9263
9264 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9265 New comment why.
9266
9267 2012-03-03 Yao Qi <yao@codesourcery.com>
9268
9269 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9270 agent_look_up_symbols.
9271
9272 2012-03-03 Yao Qi <yao@codesourcery.com>
9273
9274 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9275 (linux-x86-low.o): Likewise.
9276 * server.h: Remove in_process_agent_loaded.
9277 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9278 common/agent.c.
9279 Update callers.
9280
9281 2012-03-03 Yao Qi <yao@codesourcery.com>
9282
9283 * tracepoint.c (gdb_agent_capability): New global.
9284 (in_process_agent_loaded_ust): Renamed to
9285 `in_process_agent_supports_ust'.
9286 Update callers.
9287 (in_process_agent_supports_ust): Call agent_capability_check.
9288 (clear_installed_tracepoints): Assert that agent supports
9289 agent.
9290
9291 2012-03-03 Yao Qi <yao@codesourcery.com>
9292
9293 * linux-low.c (linux_supports_agent): New.
9294 (linux_target_ops): Initialize field `supports_agent' with
9295 linux_supports_agent.
9296 * target.h (struct target_ops) <supports_agent>: New.
9297 (target_supports_agent): New macro.
9298 * server.c (handle_general_set): Handle packet 'QAgent'.
9299 (handle_query): Send `QAgent+'.
9300 * Makefile.in (server.o): Depends on agent.h.
9301
9302 2012-03-03 Yao Qi <yao@codesourcery.com>
9303
9304 * Makefile.in (OBS): Add agent.o.
9305 Add new rule for agent.o.
9306 Track dependence of tracepoint.c on agent.h.
9307 * tracepoint.c (run_inferior_command_1):
9308 (run_inferior_command): Call agent_run_command.
9309 (gdb_ust_connect_sync_socket): Deleted. Move it to
9310 common/agent.c.
9311 (resume_thread, stop_thread): Likewise.
9312 (gdb_ust_socket_init): Renamed to ...
9313 (gdb_agent_socket_init): ... New.
9314 (gdb_ust_thread): Renamed to ...
9315 (gdb_agent_helper_thread): ... New.
9316 (gdb_ust_init): Move some code to ...
9317 (gdb_agent_init): ... here. New.
9318 [HAVE_UST]: Call gdb_ust_init.
9319 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9320 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9321 * config.in, configure: Regenerated.
9322
9323 2012-03-02 Pedro Alves <palves@redhat.com>
9324
9325 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9326 * linux-low.c (struct simple_pid_list): New.
9327 (stopped_pids): New a struct simple_pid_list pointer.
9328 (add_to_pid_list, pull_pid_from_list): New.
9329 (handle_extended_wait): Don't assume the first signal new children
9330 report is SIGSTOP. Adjust call to pull_pid_from_list.
9331 (linux_wait_for_lwp): Adjust.
9332
9333 2012-03-02 Yao Qi <yao@codesourcery.com>
9334
9335 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9336 debug log.
9337
9338 2012-03-02 Yao Qi <yao@codesourcery.com>
9339
9340 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9341 `stop_pc' and `tpoint'. Update caller.
9342
9343 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9344
9345 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9346 * linux-low.c (use_linux_regsets): New macro.
9347 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9348 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9349 (linux_register_in_regsets): New function.
9350 (usr_fetch_inferior_registers): Skip registers covered by
9351 regsets.
9352 (usr_store_inferior_registers): Likewise.
9353 (usr_fetch_inferior_registers): New macro.
9354 (usr_store_inferior_registers): Likewise.
9355 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9356 (linux_store_registers): Likewise.
9357 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9358 prototype.
9359 (init_registers_mips64_dsp_linux): Likewise.
9360 (init_registers_mips_linux): New macro.
9361 (init_registers_mips_dsp_linux): Likewise.
9362 (mips_dsp_num_regs): Likewise.
9363 (DSP_BASE, DSP_CONTROL): New fallback macros.
9364 (mips_base_regs): New macro.
9365 (mips_regmap): Use it. Fix the size.
9366 (mips_dsp_regmap): New variable.
9367 (mips_dsp_regset_bitmap): Likewise.
9368 (mips_arch_setup): New function.
9369 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9370 than mips_regmap.
9371 (mips_cannot_store_register): Likewise.
9372 (the_low_target): Update .arch_setup, .num_regs and .regmap
9373 initializers. Add .regset_bitmap initializer.
9374 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9375 initializer.
9376 * linux-bfin-low.c (the_low_target): Likewise.
9377 * linux-cris-low.c (the_low_target): Likewise.
9378 * linux-crisv32-low.c (the_low_target): Likewise.
9379 * linux-ia64-low.c (the_low_target): Likewise.
9380 * linux-m32r-low.c (the_low_target): Likewise.
9381 * linux-m68k-low.c (the_low_target): Likewise.
9382 * linux-ppc-low.c (the_low_target): Likewise.
9383 * linux-s390-low.c (the_low_target): Likewise.
9384 * linux-sh-low.c (the_low_target): Likewise.
9385 * linux-sparc-low.c (the_low_target): Likewise.
9386 * linux-tic6x-low.c (the_low_target): Likewise.
9387 * linux-x86-low.c (the_low_target): Likewise.
9388 * linux-xtensa-low.c (the_low_target): Likewise.
9389 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9390 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9391 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9392 srv_xmlfiles.
9393 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9394 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9395
9396 2012-02-29 Yao Qi <yao@codesourcery.com>
9397 Pedro Alves <palves@redhat.com>
9398
9399 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9400 `step_over_finished' is true.
9401
9402 2012-02-27 Pedro Alves <palves@redhat.com>
9403
9404 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9405 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9406
9407 2012-02-27 Pedro Alves <palves@redhat.com>
9408
9409 PR server/9684
9410 * linux-low.c (pid_is_stopped): New.
9411 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9412
9413 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9414
9415 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9416 of conditions.
9417
9418 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9419
9420 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9421
9422 2012-02-24 Luis Machado <lgustavo@codesourcery>
9423
9424 * server.c (handle_query): Advertise support for target-side
9425 breakpoint condition evaluation.
9426 (process_point_options): New function.
9427 (process_serial_event): When inserting a breakpoint, check for
9428 a target-side condition that should be evaluated.
9429
9430 * mem-break.c: Include regcache.h and ax.h.
9431 (point_cond_list_t): New data structure.
9432 (breakpoint) <cond_list>: New field.
9433 (find_gdb_breakpoint_at): Make non-static.
9434 (delete_gdb_breakpoint_at): Clear any target-side
9435 conditions.
9436 (clear_gdb_breakpoint_conditions): New function.
9437 (add_condition_to_breakpoint): Likewise.
9438 (add_breakpoint_condition): Likewise.
9439 (gdb_condition_true_at_breakpoint): Likewise.
9440 (gdb_breakpoint_here): Return result directly instead
9441 of going through a local variable.
9442
9443 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9444 (clear_gdb_breakpoint_conditions): Likewise.
9445 (add_breakpoint_condition): Likewise.
9446 (gdb_condition_true_at_breakpoint): Likewise.
9447
9448 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9449 (need_step_over_p): Take target-side breakpoint condition into
9450 consideration.
9451
9452 2012-02-24 Luis Machado <lgustavo@codesourcery>
9453
9454 * server.h: Include tracepoint.h.
9455 (agent_mem_read, agent_get_trace_state_variable_value,
9456 agent_set_trace_state_variable_value,
9457 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9458 get_set_tsv_func_addr): New prototypes.
9459
9460 * ax.h: New include file.
9461 * ax.c: New source file.
9462
9463 * tracepoint.c: Include ax.h.
9464 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9465 agent_expr, eval_result_type): Move to ax.h.
9466 (parse_agent_expr): Rename to ...
9467 (gdb_parse_agent_expr): ... this, make it non-static and move
9468 to ax.h.
9469 (unparse_agent_expr) Rename to ...
9470 (gdb_unparse_agent_expr): ... this, make it non-static and move
9471 to ax.h.
9472 (eval_agent_expr): Rename to ...
9473 (eval_tracepoint_agent_expr): ... this.
9474 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9475 forward declarations.
9476 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9477 (agent_get_trace_state_variable_value): New function.
9478 (agent_set_trace_state_variable_value): New function.
9479 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9480 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9481 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9482 (condition_true_at_tracepoint): Likewise.
9483 (parse_agent_expr): Rename to ...
9484 (gdb_parse_agent_expr): ... this and move to ax.c.
9485 (unparse_agent_expr): Rename to ...
9486 (gdb_unparse_agent_expr): ... this and move to ax.c.
9487 (gdb_agent_op_name): Move to ax.c.
9488 (eval_agent_expr): Rename to ...
9489 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9490 and move to ax.c.
9491 (eval_tracepoint_agent_expr): New function.
9492 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9493 non-static.
9494 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9495 ax.c.
9496 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9497 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9498 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9499 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9500 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9501 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9502 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9503 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9504 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9505 (compile_bytecodes): Remove forward declaration.
9506 (is_goto_target): Move to ax.c.
9507 (compile_bytecodes): Move to ax.c and call
9508 agent_get_trace_state_variable_value (...) and
9509 agent_set_trace_state_variable_value (...).
9510
9511 * Makefile.in: Update ax.c and IPA dependencies.
9512
9513 2012-02-24 Pedro Alves <palves@redhat.com>
9514
9515 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9516 (cmd_bigqtbuffer_circular): ... this. Only handle
9517 'QTBuffer:circular:'.
9518 (handle_tracepoint_general_set): Adjust.
9519
9520 2012-02-16 Yao Qi <yao@codesourcery.com>
9521
9522 * inferiors.c: Move code to ...
9523 * dll.c: .... here. New.
9524 * server.h: Declare clear_dlls.
9525 * Makefile.in (SFILES): Add dll.c.
9526 (OBS): Add dll.o
9527 (dll.o): New rule.
9528
9529 2012-02-11 Yao Qi <yao@codesourcery.com>
9530
9531 * server.c: (handle_monitor_command): Add a new parameter
9532 `own_buf'.
9533 (handle_query): Update caller.
9534
9535 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9536
9537 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9538 * configure, config.in: Regenerate.
9539 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9540 is not defined.
9541
9542 2012-02-02 Pedro Alves <palves@redhat.com>
9543
9544 Try SIGKILL first, then PTRACE_KILL.
9545 * linux-low.c (linux_kill_one_lwp): New.
9546 (linux_kill_one_lwp): Rename to ...
9547 (kill_one_lwp_callback): ... this. Use the new
9548 linux_kill_one_lwp.
9549
9550 2012-02-02 Pedro Alves <palves@redhat.com>
9551
9552 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9553 inferior.
9554
9555 2012-01-27 Pedro Alves <palves@redhat.com>
9556
9557 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9558 (elf_64_file_p): Make static.
9559 (linux_pid_exe_is_elf_64_file): New.
9560 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9561 Delete declarations.
9562 (linux_pid_exe_is_elf_64_file): Declare.
9563 * linux-x86-low.c (x86_arch_setup): Use
9564 linux_pid_exe_is_elf_64_file.
9565
9566 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9567
9568 * linux-low.c (linux_wait_for_event_1): Rename to ...
9569 (linux_wait_for_event): ... here and merge it with former
9570 linux_wait_for_event - new variable wait_ptid, use it.
9571 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9572
9573 2012-01-23 Pedro Alves <palves@redhat.com>
9574
9575 * server.c (main): Avoid yet another case of infinite loop while
9576 detaching/killing after a longjmp.
9577
9578 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9579
9580 Code cleanup.
9581 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9582
9583 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9584
9585 * hostio.c (handle_readlink): New function.
9586 (handle_vFile): Call it to handle "vFile:readlink" packets.
9587
9588 2012-01-20 Pedro Alves <palves@redhat.com>
9589 Ulrich Weigand <ulrich.weigand@linaro.org>
9590
9591 * server.c (handle_v_requests): Only support vAttach and vRun to
9592 start multiple processes when in extended protocol mode.
9593
9594 2012-01-17 Pedro Alves <palves@redhat.com>
9595
9596 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9597 memalign plus mprotect to allocate the scratch buffer.
9598
9599 2012-01-13 Pedro Alves <palves@redhat.com>
9600
9601 * server.c (attach_inferior): Clear `cont_thread'.
9602
9603 2012-01-13 Pedro Alves <palves@redhat.com>
9604
9605 * server.c (main): Avoid infinite loop while detaching/killing
9606 after a longjmp.
9607
9608 2012-01-09 Doug Evans <dje@google.com>
9609
9610 * server.c (start_inferior): Set last_ptid in --wrapper case.
9611
9612 2012-01-06 Yao Qi <yao@codesourcery.com>
9613
9614 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9615 defined.
9616 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9617
9618 2012-01-04 Yao Qi <yao@codesourcery.com>
9619
9620 * tracepoint.c (cmd_qtdp): Print debug message
9621 for static tracepoint.
9622
9623 2012-01-04 Yao Qi <yao@codesourcery.com>
9624
9625 * tracepoint.c (trace_vdebug): Differentiate debug message
9626 between gdbserver and IPA.
9627
9628 2012-01-03 Yao Qi <yao@codesourcery.com>
9629
9630 * tracepoint.c (tracepoint_was_hit): Don't collect for
9631 static tracepoint.
9632
9633 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9634
9635 * terminal.h: Reformat copyright header.
9636
9637 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9638
9639 * server.c (gdbserver_version): Update copyright year.
9640 * gdbreplay.c (gdbreplay_version): Likewise.
9641
9642 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9643
9644 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9645
9646 Revert:
9647 2011-12-18 Hui Zhu <teawater@gmail.com>
9648 * linux-low.c (linux_create_inferior): Save return value to ret.
9649
9650 2011-12-18 Hui Zhu <teawater@gmail.com>
9651
9652 * linux-low.c (linux_create_inferior): Save return value to ret.
9653
9654 2011-12-16 Doug Evans <dje@google.com>
9655
9656 * linux-low.c (linux_create_inferior): If stdio connection,
9657 redirect stdin from /dev/null, stdout to stderr.
9658 * remote-utils.c (remote_is_stdio): New static global.
9659 (remote_connection_is_stdio): New function.
9660 (remote_prepare): Handle stdio connection.
9661 (remote_open): Ditto.
9662 (remote_close): Don't close stdin for stdio connections.
9663 (read_prim,write_prim): New functions. Replace all calls to
9664 read/write to these.
9665 * server.c (main): Watch for "-" argument. Move call to
9666 remote_prepare before start_inferior.
9667 * server.h (STDIO_CONNECTION_NAME): New macro.
9668 (remote_connection_is_stdio): Declare.
9669
9670 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9671 in debugging output.
9672
9673 2011-12-15 Yao Qi <yao@codesourcery.com>
9674
9675 * tracepoint.c: Include sys/syscall.h.
9676 (gdb_ust_thread): Remove preprocessor conditional.
9677
9678 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9679
9680 * linux-low.c (linux_detach_one_lwp): Call
9681 the_low_target.prepare_to_resume before detaching.
9682
9683 2011-12-14 Yao Qi <yao@codesourcery.com>
9684
9685 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9686 of write.
9687
9688 2011-12-14 Yao Qi <yao@codesourcery.com>
9689
9690 * i386-low.c (i386_low_stopped_data_address): Initialize local
9691 variable `control'.
9692
9693 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9694
9695 PR remote/13492
9696
9697 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9698 DR_CONTROL unless necessary. Extend comments.
9699 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9700 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9701
9702 2011-12-13 Yao Qi <yao@codesourcery.com>
9703
9704 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9705 macros.
9706 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9707
9708 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9709
9710 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9711 Print new debug message for such case.
9712
9713 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9714
9715 Fix overlapping memcpy.
9716 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9717 the read_inferior_memory transfer.
9718 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9719 write_inferior_memory transfer.
9720 (set_fast_tracepoint_jump): New variable buf. Use it for the
9721 read_inferior_memory and write_inferior_memory transfers.
9722 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9723 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9724 Use it for the write_inferior_memory transfer.
9725 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9726 buffers.
9727
9728 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9729
9730 * linux-low.c (fetch_register, store_register): Make code
9731 consistent, fix formatting.
9732
9733 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9734
9735 * linux-low.c (usr_store_inferior_registers): Factor out code
9736 to handle individual registers into...
9737 (store_register): ... this new function.
9738
9739 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9740
9741 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9742 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9743 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9744 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9745 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9746 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9747 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9748 (srv_xmlfiles): Add new XML files.
9749
9750 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9751 and <sys/uio.h>.
9752 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9753 (init_registers_s390_linux32v1): Add prototype.
9754 (init_registers_s390_linux32v2): Likewise.
9755 (init_registers_s390_linux64v1): Likewise.
9756 (init_registers_s390_linux64v2): Likewise.
9757 (init_registers_s390x_linux64v1): Likewise.
9758 (init_registers_s390x_linux64v2): Likewise.
9759 (s390_num_regs): Increment to 52.
9760 (s390_regmap): Add orig_r2 register.
9761 (s390_num_regs_3264): Increment to 68.
9762 (s390_regmap_3264): Add orig_r2 register.
9763 (s390_collect_ptrace_register): Handle orig_r2 register.
9764 (s390_supply_ptrace_register): Likewise.
9765 (s390_fill_last_break): New function.
9766 (s390_store_last_break): Likewise.
9767 (s390_fill_system_call): New function.
9768 (s390_store_system_call): Likewise.
9769 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9770 register sets.
9771 (s390_check_regset): New function.
9772 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9773 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9774 Update target_regsets for available register sets.
9775
9776 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9777 Jan Kratochvil <jan.kratochvil@redhat.com>
9778
9779 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9780 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9781 New.
9782 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9783 * linux-low.h (struct process_info_private): New member r_debug.
9784 * server.c (handle_qxfer_libraries): Call
9785 the_target->qxfer_libraries_svr4.
9786 (handle_qxfer_libraries_svr4): New function.
9787 (qxfer_packets): New entry "libraries-svr4".
9788 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9789 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9790 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9791 PACKET_qXfer_libraries_svr4.
9792
9793 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9794
9795 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9796 PSW address/mask between 8-byte and 16-byte formats.
9797 (s390_supply_ptrace_register): Likewise.
9798 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9799 basic addressing mode bit.
9800
9801 2011-11-24 Stan Shebs <stan@codesourcery.com>
9802
9803 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9804
9805 2011-11-17 Stan Shebs <stan@codesourcery.com>
9806
9807 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9808 (tracing_start_time): New global.
9809 (tracing_stop_time): New global.
9810 (tracing_user_name): New global.
9811 (tracing_notes): New global.
9812 (tracing_stop_note): New global.
9813 (cmd_qtstart): Set traceframe_usage, start_time.
9814 (stop_tracing): Set stop_time.
9815 (cmd_qtstatus): Report additional status.
9816 (cmd_qtp): New function.
9817 (handle_tracepoint_query): Call it.
9818 (cmd_qtnotes): New function.
9819 (handle_tracepoint_general_set): Call it.
9820 (get_timestamp): Rename from tsv_get_timestamp.
9821
9822 2011-11-14 Stan Shebs <stan@codesourcery.com>
9823 Kwok Cheung Yeung <kcy@codesourcery.com>
9824
9825 * linux-x86-low.c (small_jump_insn): New.
9826 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9827 trampoline and error message, build a trampoline and issue a small
9828 jump instruction to it.
9829 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9830 trampoline and error message.
9831 (x86_get_min_fast_tracepoint_insn_len): New.
9832 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9833 * linux-low.h (struct linux_target_ops): Add arguments to
9834 install_fast_tracepoint_jump_pad operation, add new operation.
9835 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9836 arguments.
9837 (linux_get_min_fast_tracepoint_insn_len): New function.
9838 (linux_target_op): Add new operation.
9839 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9840 (gdb_trampoline_buffer_end): Ditto.
9841 (gdb_trampoline_buffer_error): Ditto.
9842 (struct ipa_sym_addresses): Add fields for new IPA variables.
9843 (symbol_list): Add entries for new IPA variables.
9844 (struct tracepoint): Add fields to hold the address range of the
9845 trampoline used by the tracepoint.
9846 (trampoline_buffer_head): New static variable.
9847 (trampoline_buffer_tail): Ditto.
9848 (claim_trampoline_space): New function.
9849 (have_fast_tracepoint_trampoline_buffer): New function.
9850 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9851 structure.
9852 (install_fast_tracepoint): Ditto, also add error buffer argument.
9853 (cmd_qtminftpilen): New function.
9854 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9855 (fast_tracepoint_from_trampoline_address): New function.
9856 (fast_tracepoint_collecting): Handle trampoline as part of jump
9857 pad space.
9858 (set_trampoline_buffer_space): New function.
9859 (initialize_tracepoint): Initialize new IPA variables.
9860 * target.h (struct target_ops): Add arguments to
9861 install_fast_tracepoint_jump_pad operation, add new
9862 get_min_fast_tracepoint_insn_len operation.
9863 (target_get_min_fast_tracepoint_insn_len): New.
9864 (install_fast_tracepoint_jump_pad): Add arguments.
9865 * server.h (IPA_BUFSIZ): Define.
9866 * linux-i386-ipa.c: Include extra header files.
9867 (initialize_fast_tracepoint_trampoline_buffer): New function.
9868 (initialize_low_tracepoint): Call it.
9869 * server.h (set_trampoline_buffer_space): Declare.
9870 (claim_trampoline_space): Ditto.
9871 (have_fast_tracepoint_trampoline_buffer): Ditto.
9872
9873 2011-11-14 Yao Qi <yao@codesourcery.com>
9874
9875 * server.c (handle_query): Handle InstallInTrace for qSupported.
9876 * tracepoint.c (add_tracepoint): Sort list.
9877 (install_tracepoint, download_tracepoint): New.
9878 (cmd_qtdp): Call them to install and download tracepoints.
9879 (sort_tracepoints): Removed.
9880 (cmd_qtstart): Update.
9881
9882 2011-11-14 Yao Qi <yao@codesourcery.com>
9883
9884 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9885 * mem-break.h: Declare.
9886 * tracepoint.c (cmd_qtstart): Move some code to ...
9887 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9888 New.
9889 (download_tracepoints): Move some code to ...
9890 (download_tracepoint_1): ... here. New.
9891
9892 2011-11-08 Yao Qi <yao@codesourcery.com>
9893
9894 * remote-utils.c (relocate_instruction): A comment fix.
9895
9896 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9897
9898 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9899 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9900 dr_status_mirror and dr_control_mirror from debug_reg_state.
9901 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9902 (i386_initial_stuff): Remove use of deleted globals.
9903 (i386_get_thread_context, i386_set_thread_context,
9904 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9905 from debug_reg_state.
9906
9907 2011-11-05 Yao Qi <yao@codesourcery.com>
9908
9909 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9910 address as TPOINT's.
9911
9912 2011-11-02 Stan Shebs <stan@codesourcery.com>
9913
9914 * tracepoint.c (agent_mem_read_string): New function.
9915 (eval_agent_expr): Call it for tracenz.
9916 * server.c (handle_query): Report support for tracenz.
9917
9918 2011-11-02 Yao Qi <yao@codesourcery.com>
9919
9920 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9921
9922 2011-11-02 Yao Qi <yao@codesourcery.com>
9923
9924 * target.h: Fix a typo in comment.
9925
9926 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9927
9928 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9929 clobber the breakpoints' shadows with fast tracepoint jumps.
9930 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9931 * target.c (write_inferior_memory): Also pass MYADDR down to
9932 check_mem_write.
9933
9934 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9935
9936 * configure.ac: Check support for personality routine.
9937 * configure: Regenerate.
9938 * config.in: Likewise.
9939 * linux-low.c: Include <sys/personality.h>.
9940 Define ADDR_NO_RANDOMIZE if necessary.
9941 (linux_create_inferior): Disable address space randomization when
9942 forking inferior, if requested.
9943 (linux_supports_disable_randomization): New function.
9944 (linux_target_ops): Install it.
9945 * server.h (disable_randomization): Declare.
9946 * server.c (disable_randomization): New global variable.
9947 (handle_general_set): Handle QDisableRandomization.
9948 (handle_query): Likewise for qSupported.
9949 (main): Support --disable-randomization and --no-disable-randomization
9950 command line arguments.
9951 * target.h (struct target_ops): Add supports_disable_randomization.
9952 (target_supports_disable_randomization): New macro.
9953
9954 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9955
9956 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9957 ifdef check.
9958 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9959 [!PT_GETDSBT] (target_loadmap): New definition.
9960 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9961 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9962 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9963 and PT_GETDSBT to LINUX_LOADMAP.
9964 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9965 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9966
9967 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9968
9969 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9970 (arm_linux_hwbp_cap): New static variable.
9971 (arm_linux_get_hwbp_cap): Replace by ...
9972 (arm_linux_init_hwbp_cap): ... this new function.
9973 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9974 (arm_linux_get_hw_watchpoint_count): Likewise.
9975 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9976 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9977 (arm_prepare_to_resume): Use perror_with_name instead of error.
9978
9979 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9980
9981 * linux-arm-low.c: Include <signal.h>.
9982 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9983 (struct arm_linux_hwbp_cap): New data type.
9984 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9985 (struct arm_linux_hw_breakpoint): New data type.
9986 (MAX_BPTS, MAX_WPTS): Define.
9987 (struct arch_process_info, struct arch_lwp_info): New data types.
9988 (arm_linux_get_hwbp_cap): New function.
9989 (arm_linux_get_hw_breakpoint_count): Likewise.
9990 (arm_linux_get_hw_watchpoint_count): Likewise.
9991 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9992 (arm_hwbp_control_initialize): Likewise.
9993 (arm_hwbp_control_is_enabled): Likewise.
9994 (arm_hwbp_control_is_initialized): Likewise.
9995 (arm_hwbp_control_disable): Likewise.
9996 (arm_linux_hw_breakpoint_equal): Likewise.
9997 (arm_linux_hw_point_initialize): Likewise.
9998 (struct update_registers_data): New data structure.
9999 (update_registers_callback: New function.
10000 (arm_insert_point): Likewise.
10001 (arm_remove_point): Likewise.
10002 (arm_stopped_by_watchpoint): Likewise.
10003 (arm_stopped_data_address): Likewise.
10004 (arm_new_process): Likewise.
10005 (arm_new_thread): Likewise.
10006 (arm_prepare_to_resume): Likewise.
10007 (the_low_target): Register arm_insert_point, arm_remove_point,
10008 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10009 arm_new_thread, and arm_prepare_to_resume.
10010
10011 2011-09-15 Stan Shebs <stan@codesourcery.com>
10012
10013 * server.h (struct emit_ops): Add compare-goto fields.
10014 * tracepoint.c (gdb_agent_op_sizes): New table.
10015 (emit_eq_goto): New function.
10016 (emit_ne_goto): New function.
10017 (emit_lt_goto): New function.
10018 (emit_le_goto): New function.
10019 (emit_gt_goto): New function.
10020 (emit_ge_goto): New function.
10021 (is_goto_target): New function.
10022 (compile_bytecodes): Recognize special cases of compare-goto
10023 combinations and call specialized emitters for them.
10024 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10025 (amd64_emit_ne_goto): New function.
10026 (amd64_emit_lt_goto): New function.
10027 (amd64_emit_le_goto): New function.
10028 (amd64_emit_gt_goto): New function.
10029 (amd64_emit_ge_goto): New function.
10030 (amd64_emit_ops): Add the new functions.
10031 (i386_emit_eq_goto): New function.
10032 (i386_emit_ne_goto): New function.
10033 (i386_emit_lt_goto): New function.
10034 (i386_emit_le_goto): New function.
10035 (i386_emit_gt_goto): New function.
10036 (i386_emit_ge_goto): New function.
10037 (i386_emit_ops): Add the new functions.
10038
10039 2011-09-08 Stan Shebs <stan@codesourcery.com>
10040
10041 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10042 (i386_emit_epilogue): Restore %ebx.
10043
10044 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10045
10046 * server.c (step_thread): Remove definition.
10047 (process_serial_event): Don't handle Hs.
10048 * server.h (step_thread): Remove declaration.
10049 * target.c (set_desired_inferior): Remove use of step_thread.
10050
10051 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10052
10053 * linux-low.c: Include linux-procfs.h.
10054 (linux_attach_lwp_1): Update comments.
10055 (linux_attach): Scan for existing threads when attaching to a
10056 process that is the tgid.
10057 * Makefile.in: Update dependencies.
10058
10059 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10060
10061 * configure.srv: Add linux-procfs.o dependencies.
10062
10063 2011-08-14 Yao Qi <yao@codesourcery.com>
10064
10065 * target.h (struct target_ops): Fix indent.
10066 * win32-low.c (win32_target_ops): Fix comment.
10067
10068 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10069 Yao Qi <yao@codesourcery.com>
10070
10071 * Makefile.in (clean): Remove tic6x-*.c files.
10072 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10073 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10074 (tic6x-c64xp-linux.c): Likewise.
10075 * configure.srv: Add support for tic6x-*-uclinux.
10076 * linux-tic6x-low.c: New.
10077 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10078
10079 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10080 Yao Qi <yao@codesourcery.com>
10081
10082 * target.h (struct target_ops): Add read_loadmap.
10083 * linux-low.c (struct target_loadseg): New type.
10084 (struct target_loadmap): New type.
10085 (linux_read_loadmap): New function.
10086 (linux_target_ops): Add linux_read_loadmap.
10087 * server.c (handle_query): Support qXfer:fdpic:read packet.
10088 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10089 to NULL.
10090
10091 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10092
10093 * win32-low.c: Include <stdint.h>.
10094
10095 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10096
10097 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10098 to the inferior here.
10099 (i386_remove_aligned_watchpoint): Ditto.
10100 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10101 fit part of the watchpoint in the debug registers.
10102 (i386_update_inferior_debug_regs): New.
10103 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10104 registers, and only update the inferior on success.
10105 (i386_low_remove_watchpoint): Ditto.
10106
10107 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10108
10109 * linux-low.c (compare_ints, unique, list_threads, show_process,
10110 linux_core_of_thread): Delete.
10111 (linux_target_ops): Change linux_core_of_thread to
10112 linux_common_core_of_thread.
10113 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10114 * utils.c (malloc_failure): Change type of argument.
10115 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10116 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10117 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10118 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10119 (IPA_OBJS): Add common-utils-ipa.o.
10120 (ptid_h, linux_osdata_h): New macros.
10121 (server_h): Add common/common-utils.h, common/xml-utils.h,
10122 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10123 common/ptid.h.
10124 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10125 ptid.o, buffer.o): New rules.
10126 (linux-low.o): Add common/linux-osdata.h as a dependency.
10127 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10128 * configure.ac: Add AC_HEADER_DIRENT check.
10129 * config.in: Regenerate.
10130 * configure: Regenerate.
10131 * remote-utils.c (xml_escape_text): Delete.
10132 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10133 buffer_xml_printf): Move to common/buffer.c.
10134 * server.c (main): Remove call to initialize_inferiors.
10135 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10136 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10137 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10138 internal_error, gdb_assert, gdb_assert_fail): Delete.
10139 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10140 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10141 common/buffer.h.
10142 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10143 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10144 initialize_inferiors): Delete.
10145
10146 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10147
10148 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10149 symbol error.
10150
10151 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10152
10153 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10154 assertion.
10155 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10156
10157 2011-05-26 Yao Qi <yao@codesourcery.com>
10158
10159 * Makefile.in (thread-db.o): Track dependence to
10160 common/gdb_thread_db.h.
10161 * thread-db.c: include gdb_thread_db.h from right place.
10162
10163 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10164
10165 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10166 __FILE__ and __LINE__ to internal_error.
10167
10168 2011-05-13 Doug Evans <dje@google.com>
10169
10170 * thread-db.c (try_thread_db_load_from_sdir): New function.
10171 (try_thread_db_load_from_dir): New function.
10172 (thread_db_load_search): Handle $sdir, ignore $pdir.
10173 Remove trying of system directories if search of
10174 libthread-db-search-path fails, that is now done via $sdir.
10175
10176 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10177
10178 * server.c (handle_query): Add EnableDisableTracepoints to the list
10179 of supported features.
10180 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10181 tracepoints.
10182 (cmd_qtenable_disable): New.
10183 (cmd_qtstart): Install tracepoints even if disabled.
10184 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10185 receiving a QTEnable or QTDisable packet.
10186 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10187 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10188 tracepoints.
10189 (gdb_probe): Skip data collection if static tracepoint is disabled.
10190
10191 2011-05-10 Doug Evans <dje@google.com>
10192
10193 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10194
10195 2011-05-04 Doug Evans <dje@google.com>
10196
10197 * linux-low.c (linux_join): Skip process lookup.
10198 * spu-low.c (spu_join): Ditto.
10199 * server.c (join_inferiors_callback): Delete.
10200 (process_serial_event): For 'D' packet (detach) call join_inferior
10201 directly.
10202
10203 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10204
10205 * README: Don't mention xscale*-*-linux*.
10206 * configure.srv (xscale*-*-linux*): Don't handle target.
10207
10208 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10209
10210 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10211 casting pointers.
10212 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10213 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10214 (i386_emit_void_call_2): Likewise.
10215
10216 2011-04-26 Yao Qi <yao@codesourcery.com>
10217
10218 * linux-low.c: Move common macros to linux-ptrace.h.
10219 Include linux-ptrace.h.
10220 * Makefile.in (linux_ptrace_h): New.
10221 (linux-low.o): Depends on linux-ptrace.h.
10222
10223 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10224
10225 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10226 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10227 (remote_prepare): New function with most of the TCP code from ...
10228 (remote_open): ... here. Detect PORT here unconditionally. Move also
10229 setting transport_is_reliable.
10230 * server.c (run_once): New variable.
10231 (gdbserver_usage): Document it.
10232 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10233 the first run if RUN_ONCE.
10234 * server.h (run_once, remote_prepare): New declarations.
10235
10236 2011-04-19 Tom Tromey <tromey@redhat.com>
10237
10238 * win32-low.c (handle_load_dll): Remove duplicate "the".
10239
10240 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10241
10242 Remove support for old Cygwin 1.5 versions.
10243 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10244 function to avoid warning.
10245 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10246 warning.
10247
10248 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10249
10250 * gdbserver/server.h (Macro _): Define it if not available.
10251
10252 2011-03-14 Michael Snyder <msnyder@vmware.com>
10253
10254 * hostio.c (handle_close): Remove unnecessary null test.
10255
10256 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10257
10258 * Makefile.in (maintainer-clean realclean distclean): Remove
10259 "make ... subdir_do" command.
10260
10261 2011-03-10 Michael Snyder <msnyder@vmware.com>
10262
10263 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10264
10265 * server.c (handle_v_run): Free alloced buffer on early return.
10266
10267 2011-03-09 Yao Qi <yao@codesourcery.com>
10268
10269 Revert:
10270 2011-03-04 Yao Qi <yao@codesourcery.com>
10271
10272 * Makefile.in: Remove GNU make feature --directory.
10273
10274 2011-03-05 Yao Qi <yao@codesourcery.com>
10275
10276 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10277 (subdir_do): New make target. Copied from gdb/Makefile.
10278 (maintainer-clean, realclean, distclean, clean): Call corresponding
10279 make targets in common/Makefile.
10280
10281 2011-02-11 Yao Qi <yao@codesourcery.com>
10282
10283 * configure.ac: Call AC_PROG_RANLIB.
10284 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10285 * configure: Regenerate.
10286
10287 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10288
10289 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10290
10291 2011-03-06 Yao Qi <yao@codesourcery.com>
10292
10293 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10294
10295 2011-03-05 Yao Qi <yao@codesourcery.com>
10296
10297 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10298 (subdir_do): New make target. Copied from gdb/Makefile.
10299 (maintainer-clean, realclean, distclean, clean): Call corresponding
10300 make targets in common/Makefile.
10301
10302 2011-03-04 Yao Qi <yao@codesourcery.com>
10303
10304 * Makefile.in: Remove GNU make feature --directory.
10305
10306 2011-03-04 Michael Snyder <msnyder@vmware.com>
10307
10308 * server.c (queue_stop_reply): Call xmalloc not malloc.
10309
10310 2011-03-02 Michael Snyder <msnyder@vmware.com>
10311
10312 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10313
10314 2011-02-28 Michael Snyder <msnyder@vmware.com>
10315
10316 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10317 (cmd_qtframe): Ditto.
10318 (cmd_qtbuffer): Ditto.
10319 (cmd_bigqtbuffer): Ditto.
10320
10321 * utils.c (decimal2str): Initialize 'width' to nine, then
10322 don't mess with it.
10323
10324 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10325
10326 * hostio.c (require_data): Free *data, not data.
10327
10328 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10329
10330 * hostio.c (require_data): Use free, not xfree.
10331
10332 2011-02-27 Michael Snyder <msnyder@vmware.com>
10333
10334 * server.c (handle_query): Discard unused value.
10335
10336 * hostio.c (require_data): Free malloc memory before returning
10337 error.
10338
10339 2011-02-26 Michael Snyder <msnyder@vmware.com>
10340
10341 * linux-low.c (list_threads): Call closedir for dirent.
10342
10343 2011-02-27 Michael Snyder <msnyder@vmware.com>
10344
10345 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10346 a case statement falls through.
10347
10348 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10349
10350 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10351 in comparison.
10352
10353 2011-02-26 Michael Snyder <msnyder@vmware.com>
10354
10355 * utils.c (decimal2str): Eliminate dead code and dead param.
10356 (pulongest): Drop dead param from call to decimal2str.
10357 (plongest): Ditto.
10358
10359 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10360
10361 Revert the following patch (not approved yet):
10362 2011-02-21 Hui Zhu <teawater@gmail.com>
10363 * tracepoint.c (tp_printf): New function.
10364 (eval_agent_expr): Handle gdb_agent_op_printf.
10365
10366 2011-02-21 Hui Zhu <teawater@gmail.com>
10367
10368 * tracepoint.c (tp_printf): New function.
10369 (eval_agent_expr): Handle gdb_agent_op_printf.
10370
10371 2011-02-18 Tom Tromey <tromey@redhat.com>
10372
10373 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10374 (tracepoint.o): Likewise.
10375 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10376 (gdb_agent_op_names): Likewise.
10377
10378 2011-02-18 Tom Tromey <tromey@redhat.com>
10379
10380 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10381 gdb_agent_op_rot>: New constants.
10382 (gdb_agent_op_names): Add pick and roll.
10383 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10384 cases.
10385
10386 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10387
10388 * aclocal.m4: Regenerated with aclocal-1.11.1.
10389
10390 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10391
10392 * server.c (handle_qxfer_traceframe_info): New.
10393 (qxfer_packets): Register "traceframe-info".
10394 (handle_query): Report support for qXfer:traceframe-info:read+.
10395 * tracepoint.c (match_blocktype): New.
10396 (traceframe_find_block_type): Rename to ...
10397 (traceframe_walk_blocks): ... this. Add callback filter argument,
10398 and use it.
10399 (traceframe_find_block_type): New, reimplemented on top of
10400 traceframe_walk_blocks.
10401 (build_traceframe_info_xml): New.
10402 (traceframe_read_info): New.
10403 * server.h (traceframe_read_info): Declare.
10404
10405 2011-02-11 Yao Qi <yao@codesourcery.com>
10406
10407 * configure.ac: Call AC_PROG_RANLIB.
10408 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10409 * configure: Regenerate.
10410
10411 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10412
10413 * server.c (gdb_read_memory): Change return semantics to allow
10414 partial transfers.
10415 (handle_search_memory_1): Adjust.
10416 (process_serial_event) <'m' packet>: Handle partial transfers.
10417 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10418
10419 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10420
10421 * regcache.c (init_register_cache): Initialize
10422 regcache->register_status.
10423 (free_register_cache): Release regcache->register_status.
10424 (regcache_cpy): Copy register_status.
10425 (registers_to_string): Print 'x's for unavailable registers.
10426 (supply_register): Mark the register's status valid or
10427 unavailable, depending on whether a buffer was passed in or not.
10428 (supply_register_zeroed): New.
10429 (supply_regblock): Mark the registers' status valid or
10430 unavailable, depending on whether a buffer was passed in or not.
10431 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10432 (struct regcache): New `register_status' field.
10433 (supply_register_zeroed): Declare.
10434 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10435 supply_register_zeroed, rather than passing a NULL buffer to
10436 supply_register.
10437 * tracepoint.c (fetch_traceframe_registers): Update comment.
10438
10439 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10440
10441 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10442 buffer explicit.
10443
10444 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10445
10446 * server.h (decode_xfer_write): Change prototype.
10447 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10448 and don't extract the annex here.
10449 * server.c (decode_xfer_read): Remove `annex' parameter,
10450 and don't extract the annex here.
10451 (decode_xfer): New.
10452 (struct qxfer): New.
10453 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10454 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10455 (handle_qxfer_statictrace): New functions, abstracted out from
10456 handle_query, and made to use the struct qxfer interface.
10457 (handle_threads_qxfer_proper): Rename to ...
10458 (handle_qxfer_threads_proper): ... this.
10459 (handle_threads_qxfer): Rename to ...
10460 (handle_qxfer_threads): ... this. Adjust.
10461 (qxfer_packets): New array.
10462 (handle_qxfer): New function.
10463 (handle_query): Use handle_qxfer.
10464
10465 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10466
10467 * gdbreplay.c: Shorten lines of >= 80 columns.
10468 * linux-low.c: Ditto.
10469 * linux-ppc-low.c: Ditto.
10470 * linux-s390-low.c: Ditto.
10471 * linux-sparc-low.c: Ditto.
10472 * linux-x86-low.c: Ditto.
10473 * linux-xtensa-low.c: Ditto.
10474 * mem-break.c: Ditto.
10475 * nto-low.c: Ditto.
10476 * regcache.h: Ditto.
10477 * remote-utils.c: Ditto.
10478 * server.c: Ditto.
10479 * server.h: Ditto.
10480 * thread-db.c: Ditto.
10481 * tracepoint.c: Ditto.
10482 * utils.c: Ditto.
10483 * win32-low.h: Ditto.
10484
10485 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10486
10487 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10488 update.
10489
10490 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10491
10492 * server.c (gdbserver_version): Update copyright year in version
10493 output.
10494 * gdbreplay.c (gdbreplay_version): Ditto.
10495
10496 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10497
10498 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10499 * linux-bfin-low.c: New file.
10500 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10501 PT_DATA_ADDR for BFIN targets.
10502 * Makefile.in (SFILES): Add linux-bfin-low.c.
10503 (clean): Remove reg-bfin.c.
10504 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10505 * README: Mention supported Blackfin targets.
10506
10507 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10508
10509 * .gitignore: New file.
10510
10511 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10512
10513 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10514
10515 2010-10-22 Jie Zhang <jie@codesourcery.com>
10516
10517 * Makefile.in: Add FLAGS_TO_PASS variable.
10518 (install): Remove dependency of install-only and recursively
10519 invoke make for install-only.
10520
10521 2010-10-04 Doug Evans <dje@google.com>
10522
10523 * Makefile.in (uninstall): Use $(DESTDIR).
10524
10525 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10526
10527 PR gdb/11842
10528
10529 * linux-x86-low.c (compat_siginfo_from_siginfo)
10530 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10531 si_code is < 0. Check for si_code == SI_TIMER before checking for
10532 si_code < 0.
10533
10534 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10535
10536 * lynx-i386-low.c: New file.
10537 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10538
10539 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10540
10541 * lynx-low.c (ptrace_request_to_str): Remove handling for
10542 request values that have been removed in LynxOS 5.x.
10543
10544 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10545
10546 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10547 <ptrace.h>
10548
10549 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10550
10551 * configure.ac: Add --enable-inprocess-agent option.
10552 * configure: Rebuilt.
10553
10554 2010-09-06 Yao Qi <yao@codesourcery.com>
10555
10556 * linux-low.c (linux_kill): Remove unused variable.
10557 (linux_stabilize_threads): Likewise.
10558 * server.c (start_inferior): Likewise.
10559 (queue_stop_reply_callback): Likewise.
10560 * tracepoint.c (do_action_at_tracepoint): Likewise.
10561
10562 2010-09-06 Yao Qi <yao@codesourcery.com>
10563
10564 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10565 on return.
10566
10567 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10568
10569 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10570
10571 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10572
10573 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10574 "$(IPA_DEPFILES)".
10575
10576 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10577
10578 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10579 gdbserver/lynx-ppc-low.c: New files.
10580 * Makefile.in (lynx_low_h): New variable.
10581 (lynx-low.o, lynx-ppc-low.o): New rules.
10582 * configure.ac: On LynxOS, link with -lnetinet.
10583 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10584 * configure: regenerate.
10585
10586 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10587
10588 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10589 * configure.ac: Add check for vasprintf and vsnprintf.
10590 * configure, config.in: Regenerate.
10591 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10592
10593 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10594
10595 * gdbreplay.c: Move include of alloca.h up, next to include of
10596 malloc.h.
10597 * server.h: Add include of malloc.h.
10598 * mem-break.c: Remove include of malloc.h.
10599 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10600
10601 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10602
10603 * Makefile.in (memmem.o): Build with -Wno-error.
10604
10605 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10606
10607 * utils.c (xsnprintf): Make non-static.
10608 * server.h: Add xsnprintf declaration.
10609 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10610 replace calls to snprintf by calls to xsnprintf throughout.
10611
10612 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10613
10614 * configure.ac: Add configure check for alloca.
10615 * configure, config.in: Regenerate.
10616 * server.h: Include alloca.h if it exists.
10617 * gdbreplay.c: Include alloca.h if it exists.
10618
10619 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10620
10621 * linux-low.c (__SIGRTMIN): Define if not already defined.
10622 (linux_create_inferior): Check for __ANDROID__ rather than
10623 __SIGRTMIN.
10624 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10625 are already deferred.
10626 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10627 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10628 stopped and already has a pending signal to report.
10629 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10630 a pending signal to report or is moving out of a jump pad.
10631 (linux_init_signals): Check for __ANDROID__ rather than
10632 __SIGRTMIN.
10633
10634 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10635
10636 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10637 debug_threads check. Avoid a linear search when not doing debug
10638 output.
10639
10640 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10641
10642 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10643 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10644 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10645 (process_event): Change local fd's type to gdb_fildes_t.
10646 (create_file_handler): Adjust prototype.
10647 (delete_file_handler): Adjust prototype.
10648 (handle_file_event): Adjust prototype. Use pfildes.
10649 (create_file_event): Adjsut prototype.
10650 * remote-utils.c (remote_desc, listen_desc): Change type to
10651 gdb_fildes_t.
10652 * server.h: New gdb_fildes_t typedef.
10653 [USE_WIN32API]: Include winsock2.h.
10654 (delete_file_handler, add_file_handler): Adjust prototypes.
10655 (pfildes): Declare.
10656 * utils.c (pfildes): New.
10657
10658 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10659
10660 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10661 * configure: Regenerate.
10662
10663 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10664
10665 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10666 (linux_done_accessing_memory): ... this.
10667 (linux_target_ops): Adjust.
10668 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10669 * nto-low.c (nto_target_ops): Adjust comment.
10670 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10671 * spu-low.c (spu_target_ops): Adjust comment.
10672 * target.h (target_ops): Rename unprepare_to_access_memory field
10673 to done_accessing_memory.
10674 (unprepare_to_access_memory): Rename to ...
10675 (done_accessing_memory): ... this.
10676
10677 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10678
10679 * linux-low.c (linux_prepare_to_access_memory): New.
10680 (linux_unprepare_to_access_memory): New.
10681 (linux_target_ops): Install them.
10682 * server.c (read_memory): Rename to ...
10683 (gdb_read_memory): ... this. Use
10684 prepare_to_access_memory/prepare_to_access_memory.
10685 (write_memory): Rename to ...
10686 (gdb_write_memory): ... this. Use
10687 prepare_to_access_memory/prepare_to_access_memory.
10688 (handle_search_memory_1): Adjust.
10689 (process_serial_event): Adjust.
10690 * target.h (struct target_ops): New fields
10691 prepare_to_access_memory and unprepare_to_access_memory.
10692 (prepare_to_access_memory, unprepare_to_access_memory): New.
10693 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10694 prepare_to_access_memory/prepare_to_access_memory.
10695 * nto-low.c (nto_target_ops): Adjust.
10696 * spu-low.c (spu_target_ops): Adjust.
10697 * win32-low.c (win32_target_ops): Adjust.
10698
10699 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10700
10701 * Makefile.in (WARN_CFLAGS): Get it from configure.
10702 (WERROR_CFLAGS): New.
10703 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10704 * configure.ac: Introduce --enable-werror, which adds -Werror to
10705 the compiler command line. Enabled by default. Disable with
10706 --disable-werror. Add -Wdeclaration-after-statement
10707 Wpointer-arith and -Wformat-nonliteral to warning flags.
10708 * configure: Regenerate.
10709
10710 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10711
10712 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10713
10714 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10715
10716 * gdbreplay.c (remote_error): New.
10717 (gdbchar): New.
10718 (expect): Use gdbchar. Check for error reading from GDB.
10719 Clarify sync error output.
10720 (play): Check for errors writing to GDB.
10721 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10722 * remote-utils.c (getpkt): Check for errors writing to the remote
10723 descriptor.
10724
10725 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10726
10727 * linux-low.c (linux_wait_1): Move non-debugging code out of
10728 `debug_threads' control.
10729
10730 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10731
10732 * linux-low.c (linux_wait_1): Don't set last_status here.
10733 * server.c (push_event, queue_stop_reply_callback): Assert we're
10734 not pushing a TARGET_WAITKIND_IGNORE event.
10735 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10736 (myresume, handle_target_event): Set the thread's last_resume_kind
10737 and last_status from the target returned status.
10738
10739 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10740
10741 PR threads/10729
10742
10743 * linux-x86-low.c (update_debug_registers_callback): New.
10744 (i386_dr_low_set_addr): Use it.
10745 (i386_dr_low_get_addr): New.
10746 (i386_dr_low_set_control): Use update_debug_registers_callback.
10747 (i386_dr_low_get_control): New.
10748 (i386_dr_low_get_status): Adjust.
10749 * linux-low.c (linux_stop_lwp): New.
10750 * linux-low.h (linux_stop_lwp): Declare.
10751
10752 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10753 argument instead of a i386_debug_reg_state.
10754 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10755 a i386_debug_reg_state.
10756 (i386_insert_aligned_watchpoint): Adjust.
10757 (i386_remove_aligned_watchpoint): Adjust.
10758 (i386_low_stopped_data_address): Read the debug registers from the
10759 inferior instead of from the mirrors.
10760 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10761 (i386_dr_low_get_addr): Declare.
10762 (i386_dr_low_get_control): Declare.
10763 (i386_dr_low_get_status): Change prototype.
10764
10765 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10766 (i386_dr_low_get_addr): New.
10767 (i386_dr_low_get_control): New.
10768 (i386_dr_low_get_status): Adjust prototype. Return
10769 dr_status_mirror.
10770 (i386_initial_stuff): Clear dr_status_mirror and
10771 dr_control_mirror.
10772 (i386_get_thread_context): Adjust.
10773 (i386_set_thread_context): Adjust.
10774 (i386_thread_added): Adjust.
10775
10776 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10777
10778 * linux-low.h (linux_thread_area): Delete declaration.
10779
10780 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10781
10782 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10783 after its termination.
10784
10785 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10786
10787 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10788 (gdb_wants_all_stopped): Delete.
10789 (linux_wait_1): Don't call them.
10790 * server.c (handle_v_cont): Tag all threads as want-stopped.
10791 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10792 stopped as "client-wants-stopped".
10793
10794 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10795
10796 * Makefile.in (signals_h): New.
10797 (server_h): Depend on it.
10798 (server.o): Don't depend on $(signals_def).
10799 (signals.o): Depend on $(signals_def).
10800
10801 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10802
10803 * Makefile.in (signals_def): New.
10804 (server_h): Append include/gdb/signals.h and signals_def.
10805 (server.o): Append signals_def.
10806
10807 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10808
10809 * server.c (handle_target_event): Use target_signal_to_host for
10810 resume_info.sig initialization.
10811 * target.h (struct thread_resume) <sig>: New comment.
10812
10813 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10814
10815 * server.c (handle_query): strcpy() the returned string from paddress()
10816 instead of sprintf().
10817 * utils.c (paddress): Return phex_nz().
10818
10819 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10820
10821 * server.c (handle_v_cont): Call mourn_inferior if process
10822 just exited.
10823 (myresume): Likewise.
10824
10825 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10826
10827 Static tracepoints, and integration with UST.
10828
10829 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10830 * mem-break.c (uninsert_all_breakpoints)
10831 (reinsert_all_breakpoints): New.
10832 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10833 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10834 (gdb_agent_ust_loaded, helper_thread_id)
10835 (gdb_agent_helper_thread_id): New macros.
10836 (struct ipa_sym_addresses): Add addr_ust_loaded,
10837 addr_helper_thread_id, addr_cmd_buf.
10838 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10839 (in_process_agent_loaded_ust): New.
10840 (write_e_ust_not_loaded): New.
10841 (maybe_write_ipa_ust_not_loaded): New.
10842 (struct collect_static_trace_data_action): New.
10843 (enum tracepoint_type) <static_tracepoint>: New.
10844 (struct tracepoint) <handle>: Mention static tracepoints.
10845 (struct static_tracepoint_ctx): New.
10846 (CMD_BUF_SIZE): New.
10847 (add_tracepoint_action): Handle static tracepoint actions.
10848 (unprobe_marker_at): New.
10849 (clear_installed_tracepoints): Handle static tracepoints.
10850 (cmd_qtdp): Handle static tracepoints.
10851 (probe_marker_at): New.
10852 (cmd_qtstart): Handle static tracepoints.
10853 (response_tracepoint): Handle static tracepoints.
10854 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10855 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10856 (get_context_regcache): Handle static tracepoints.
10857 (do_action_at_tracepoint): Handle static tracepoint actions.
10858 (traceframe_find_block_type): Handle static trace data blocks.
10859 (traceframe_read_sdata): New.
10860 (download_tracepoints): Download static tracepoint actions.
10861 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10862 (GDB_PROBE_NAME): New.
10863 (ust_ops): New.
10864 (GET_UST_SYM): New.
10865 (USTF): New.
10866 (dlsym_ust): New.
10867 (ust_marker_to_static_tracepoint): New.
10868 (gdb_probe): New.
10869 (collect_ust_data_at_tracepoint): New.
10870 (gdb_ust_probe): New.
10871 (UNIX_PATH_MAX, SOCK_DIR): New.
10872 (gdb_ust_connect_sync_socket): New.
10873 (resume_thread, stop_thread): New.
10874 (run_inferior_command): New.
10875 (init_named_socket): New.
10876 (gdb_ust_socket_init): New.
10877 (cstr_to_hexstr): New.
10878 (next_st): New.
10879 (first_marker, next_marker): New.
10880 (response_ust_marker): New.
10881 (cmd_qtfstm, cmd_qtsstm): New.
10882 (unprobe_marker_at, probe_marker_at): New.
10883 (cmd_qtstmat, gdb_ust_thread): New.
10884 (gdb_ust_init): New.
10885 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10886 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10887 (ST_REGENTRY): New.
10888 (x86_64_st_collect_regmap): New.
10889 (X86_64_NUM_ST_COLLECT_GREGS): New.
10890 (AMD64_RIP_REGNUM): New.
10891 (supply_static_tracepoint_registers): New.
10892 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10893 (ST_REGENTRY): New.
10894 (i386_st_collect_regmap): New.
10895 (i386_NUM_ST_COLLECT_GREGS): New.
10896 (supply_static_tracepoint_registers): New.
10897 * server.c (handle_query): Handle qXfer:statictrace:read.
10898 <qSupported>: Report support for StaticTracepoints, and
10899 qXfer:statictrace:read features.
10900 * server.h (traceframe_read_sdata)
10901 (supply_static_tracepoint_registers): Declare.
10902 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10903 (unpack_varlen_hex): Include in IPA build.
10904 * Makefile.in (ustlibs, ustinc): New.
10905 (IPA_OBJS): Add remote-utils-ipa.o.
10906 ($(IPA_LIB)): Link -ldl and -lpthread.
10907 (UST_CFLAGS): New.
10908 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10909 * config.in, configure: Regenerate.
10910
10911 2010-06-20 Ian Lance Taylor <iant@google.com>
10912 Pedro Alves <pedro@codesourcery.com>
10913
10914 * linux-x86-low.c (always_true): Delete.
10915 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10916 trying to fool the compiler with always_true.
10917
10918 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10919
10920 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10921 conditions in gdbserver.
10922
10923 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10924
10925 * spu-low.c (spu_read_memory): Wrap around local store limit.
10926 (spu_write_memory): Likewise.
10927
10928 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10929
10930 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10931 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10932 LONGEST uses.
10933 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10934 uses.
10935 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10936 uses with LONGEST uses.
10937
10938 2010-06-14 Stan Shebs <stan@codesourcery.com>
10939 Pedro Alves <pedro@codesourcery.com>
10940
10941 Bytecode compiler.
10942
10943 * linux-x86-low.c: Include limits.h.
10944 (add_insns): New.
10945 (always_true): New.
10946 (EMIT_ASM): New.
10947 (EMIT_ASM32): New.
10948 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10949 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10950 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10951 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10952 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10953 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10954 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10955 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10956 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10957 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10958 (amd64_emit_void_call_2): New.
10959 (amd64_emit_ops): New.
10960 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10961 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10962 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10963 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10964 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10965 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10966 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10967 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10968 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10969 (i386_emit_stack_adjust, i386_emit_int_call_1)
10970 (i386_emit_void_call_2): New.
10971 (i386_emit_ops): New.
10972 (x86_emit_ops): New.
10973 (the_low_target): Install x86_emit_ops.
10974 * server.h (struct emit_ops): New.
10975 (get_raw_reg_func_addr): Declare.
10976 (current_insn_ptr, emit_error): Declare.
10977 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10978 (set_trace_state_variable_value): New defines.
10979 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10980 addr_get_trace_state_variable_value and
10981 addr_set_trace_state_variable_value.
10982 (symbol_list): New fields for get_raw_reg,
10983 get_trace_state_variable_value and set_trace_state_variable_value.
10984 (condfn): New typedef.
10985 (struct tracepoint): New field `compiled_cond'.
10986 (do_action_at_tracepoint): Clear compiled_cond.
10987 (get_trace_state_variable_value, set_trace_state_variable_value):
10988 Export in the IPA.
10989 (condition_true_at_tracepoint): If there's a compiled condition,
10990 run that.
10991 (current_insn_ptr, emit_error): New globals.
10992 (struct bytecode_address): New.
10993 (get_raw_reg_func_addr): New.
10994 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10995 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10996 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10997 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10998 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10999 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11000 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11001 (compile_tracepoint_condition, compile_bytecodes): New.
11002 * target.h (emit_ops): Forward declare.
11003 (struct target_ops): New field emit_ops.
11004 (target_emit_ops): New.
11005 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11006 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11007 * linux-low.c (linux_emit_ops): New.
11008 (linux_target_ops): Install it.
11009 * linux-low.h (struct linux_target_ops): New field emit_ops.
11010
11011 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11012
11013 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11014 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11015
11016 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11017 Stan Shebs <stan@codesourcery.com>
11018
11019 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11020 (all): Depend on $(extra_libraries).
11021 (install-only): Install the IPA.
11022 (IPA_OBJS, IPA_LIB): New.
11023 (clean): Remove the IPA lib.
11024 (IPAGENT_CFLAGS): New.
11025 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11026 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11027 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11028 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11029 * configure.ac: Check for atomic builtins support in the compiler.
11030 (IPA_DEPFILES, extra_libraries): Define.
11031 * configure.srv (ipa_obj): Add description.
11032 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11033 (i[34567]86-*-linux*): Set ipa_obj.
11034 (x86_64-*-linux*): Set ipa_obj.
11035 * linux-low.c (stabilizing_threads): New.
11036 (supports_fast_tracepoints): New.
11037 (linux_detach): Stabilize threads before detaching.
11038 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11039 the lwp is either not stabilizing, or is moving out of a jump pad.
11040 (linux_fast_tracepoint_collecting): New.
11041 (maybe_move_out_of_jump_pad): New.
11042 (enqueue_one_deferred_signal): New.
11043 (dequeue_one_deferred_signal): New.
11044 (linux_wait_for_event_1): If moving out of a jump pad, defer
11045 pending signals to later.
11046 (linux_stabilize_threads): New.
11047 (linux_wait_1): Check if threads need moving out of jump pads, and
11048 do it if so.
11049 (stuck_in_jump_pad_callback): New.
11050 (move_out_of_jump_pad_callback): New.
11051 (lwp_running): New.
11052 (linux_resume_one_lwp): Handle moving out of jump pads.
11053 (linux_set_resume_request): Dequeue deferred signals.
11054 (need_step_over_p): Also step over fast tracepoint jumps.
11055 (start_step_over): Also uninsert fast tracepoint jumps.
11056 (finish_step_over): Also reinsert fast tracepoint jumps.
11057 (linux_install_fast_tracepoint_jump): New.
11058 (linux_target_ops): Install linux_stabilize_threads and
11059 linux_install_fast_tracepoint_jump_pad.
11060 * linux-low.h (linux_target_ops) <get_thread_area,
11061 install_fast_tracepoint_jump_pad>: New fields.
11062 (struct lwp_info) <collecting_fast_tracepoint,
11063 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11064 (linux_get_thread_area): Declare.
11065 * linux-x86-low.c (jump_insn): New.
11066 (x86_get_thread_area): New.
11067 (append_insns): New.
11068 (push_opcode): New.
11069 (amd64_install_fast_tracepoint_jump_pad): New.
11070 (i386_install_fast_tracepoint_jump_pad): New.
11071 (x86_install_fast_tracepoint_jump_pad): New.
11072 (the_low_target): Install x86_get_thread_area and
11073 x86_install_fast_tracepoint_jump_pad.
11074 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11075 (struct fast_tracepoint_jump): New.
11076 (fast_tracepoint_jump_insn): New.
11077 (fast_tracepoint_jump_shadow): New.
11078 (find_fast_tracepoint_jump_at): New.
11079 (fast_tracepoint_jump_here): New.
11080 (delete_fast_tracepoint_jump): New.
11081 (set_fast_tracepoint_jump): New.
11082 (uninsert_fast_tracepoint_jumps_at): New.
11083 (reinsert_fast_tracepoint_jumps_at): New.
11084 (set_breakpoint_at): Use write_inferior_memory.
11085 (uninsert_raw_breakpoint): Use write_inferior_memory.
11086 (check_mem_read): Mask out fast tracepoint jumps.
11087 (check_mem_write): Mask out fast tracepoint jumps.
11088 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11089 (set_fast_tracepoint_jump): Declare.
11090 (delete_fast_tracepoint_jump)
11091 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11092 (reinsert_fast_tracepoint_jumps_at): Declare.
11093 * regcache.c: Don't compile many functions when building the
11094 in-process agent library.
11095 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11096 the register buffer in the heap.
11097 (free_register_cache): If the register buffer isn't owned by the
11098 regcache, don't free it.
11099 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11100 pre-existing register caches.
11101 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11102 type.
11103 (convert_ascii_to_int): : Constify `from' parameter type.
11104 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11105 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11106 the needed buffer in-place.
11107 (relocate_instruction): New.
11108 * server.c (handle_query) <qSymbols>: If the target supports
11109 tracepoints, give it a chance of looking up symbols. Report
11110 support for fast tracepoints.
11111 (handle_status): Stabilize threads.
11112 (process_serial_event): Adjust.
11113 * server.h (struct fast_tracepoint_jump): Forward declare.
11114 (struct process_info) <fast_tracepoint_jumps>: New field.
11115 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11116 (decode_X_packet, decode_M_packet): Adjust.
11117 (relocate_instruction): Declare.
11118 (in_process_agent_loaded): Declare.
11119 (tracepoint_look_up_symbols): Declare.
11120 (struct fast_tpoint_collect_status): Declare.
11121 (fast_tracepoint_collecting): Declare.
11122 (force_unlock_trace_buffer): Declare.
11123 (handle_tracepoint_bkpts): Declare.
11124 (initialize_low_tracepoint)
11125 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11126 * target.h (struct target_ops) <stabilize_threads,
11127 install_fast_tracepoint_jump_pad>: New fields.
11128 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11129 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11130 [HAVE_STDINT_H]: Include stdint.h.
11131 (trace_debug_1): Rename to ...
11132 (trace_vdebug): ... this.
11133 (trace_debug): Rename to ...
11134 (trace_debug_1): ... this. Add `level' parameter.
11135 (trace_debug): New.
11136 (ATTR_USED, ATTR_NOINLINE): New.
11137 (IP_AGENT_EXPORT): New.
11138 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11139 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11140 (about_to_request_buffer_space, trace_buffer_is_full)
11141 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11142 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11143 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11144 (traceframe_write_count, traceframes_created)
11145 (trace_state_variables)
11146 New renaming defines.
11147 (struct ipa_sym_addresses): New.
11148 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11149 (symbol_list): New.
11150 (ipa_sym_addrs): New.
11151 (all_tracepoint_symbols_looked_up): New.
11152 (in_process_agent_loaded): New.
11153 (write_e_ipa_not_loaded): New.
11154 (maybe_write_ipa_not_loaded): New.
11155 (tracepoint_look_up_symbols): New.
11156 (debug_threads) [IN_PROCESS_AGENT]: New.
11157 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11158 (UNKNOWN_SIDE_EFFECTS): New.
11159 (stop_tracing): New.
11160 (flush_trace_buffer): New.
11161 (stop_tracing_bkpt): New.
11162 (flush_trace_buffer_bkpt): New.
11163 (read_inferior_integer): New.
11164 (read_inferior_uinteger): New.
11165 (read_inferior_data_pointer): New.
11166 (write_inferior_data_pointer): New.
11167 (write_inferior_integer): New.
11168 (write_inferior_uinteger): New.
11169 (struct collect_static_trace_data_action): Delete.
11170 (enum tracepoint_type): New.
11171 (struct tracepoint) <type>: New field `type'.
11172 <actions_str, step_actions, step_actions_str>: Only include in
11173 GDBserver.
11174 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11175 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11176 (tracepoints): Use IP_AGENT_EXPORT.
11177 (last_tracepoint): Don't include in the IPA.
11178 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11179 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11180 (alloced_trace_state_variables): New.
11181 (trace_state_variables): Use IP_AGENT_EXPORT.
11182 (traceframe_t): Delete unused variable.
11183 (circular_trace_buffer): Don't include in the IPA.
11184 (trace_buffer_start): Delete.
11185 (struct trace_buffer_control): New.
11186 (trace_buffer_free): Delete.
11187 (struct ipa_trace_buffer_control): New.
11188 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11189 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11190 New.
11191 (trace_buffer_ctrl): New.
11192 (TRACE_BUFFER_CTRL_CURR): New.
11193 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11194 Reimplement as macros.
11195 (trace_buffer_wrap): Delete.
11196 (traceframe_write_count, traceframe_read_count)
11197 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11198 (struct tracepoint_hit_ctx) <type>: New field.
11199 (struct fast_tracepoint_ctx): New.
11200 (memory_barrier): New.
11201 (cmpxchg): New.
11202 (record_tracepoint_error): Update atomically in the IPA.
11203 (clear_inferior_trace_buffer): New.
11204 (about_to_request_buffer_space): New.
11205 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11206 updating the same buffer.
11207 (add_tracepoint): Default the tracepoint's type to trap
11208 tracepoint, and orig_size to -1.
11209 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11210 internal variables.
11211 (create_trace_state_variable): New parameter `gdb'. Handle it.
11212 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11213 (cmd_qtdp): Handle fast tracepoints.
11214 (cmd_qtdv): Adjust.
11215 (max_jump_pad_size): New.
11216 (gdb_jump_pad_head): New.
11217 (get_jump_space_head): New.
11218 (claim_jump_space): New.
11219 (sort_tracepoints): New.
11220 (MAX_JUMP_SIZE): New.
11221 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11222 IPA.
11223 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11224 support. Upload fast traceframes, and delete internal IPA
11225 breakpoints.
11226 (stop_tracing_handler): New.
11227 (flush_trace_buffer_handler): New.
11228 (cmd_qtstop): Upload fast tracepoints.
11229 (response_tracepoint): Handle fast tracepoints.
11230 (tracepoint_finished_step): Upload fast traceframes. Set the
11231 tracepoint hit context's tracepoint type.
11232 (handle_tracepoint_bkpts): New.
11233 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11234 type. Add comment about fast tracepoints.
11235 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11236 non-existing action_str field.
11237 (get_context_regcache): Handle fast tracepoints.
11238 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11239 to the regcache.
11240 (fast_tracepoint_from_jump_pad_address): New.
11241 (fast_tracepoint_from_ipa_tpoint_address): New.
11242 (collecting_t): New.
11243 (force_unlock_trace_buffer): New.
11244 (fast_tracepoint_collecting): New.
11245 (collecting): New.
11246 (gdb_collect): New.
11247 (write_inferior_data_ptr): New.
11248 (target_tp_heap): New.
11249 (target_malloc): New.
11250 (download_agent_expr): New.
11251 (UALIGN): New.
11252 (download_tracepoints): New.
11253 (download_trace_state_variables): New.
11254 (upload_fast_traceframes): New.
11255 (IPA_FIRST_TRACEFRAME): New.
11256 (IPA_NEXT_TRACEFRAME_1): New.
11257 (IPA_NEXT_TRACEFRAME): New.
11258 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11259 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11260 (gdb_jump_pad_buffer_end): New.
11261 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11262 (initialize_tracepoint): Adjust.
11263 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11264 buffer. Initialize the low module.
11265 * utils.c (PREFIX, TOOLNAME): New.
11266 (malloc_failure): Use PREFIX.
11267 (error): In the IPA, an error causes an exit.
11268 (fatal, warning): Use PREFIX.
11269 (internal_error): Use TOOLNAME.
11270 (NUMCELLS): Increase to 10.
11271 * configure, config.in: Regenerate.
11272
11273 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11274
11275 * server.c (handle_query) <qSupported>: Do two passes over the
11276 qSupported string to avoid nesting strtok.
11277
11278 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11279
11280 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11281 (CDEPS): New.
11282 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11283 -Wl,--dynamic-list.
11284 * configure: Regenerate.
11285 * proc-service.list: New.
11286
11287 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11288
11289 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11290 New comment.
11291
11292 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11293
11294 * gdbreplay.c (remote_open): Check error return from socket() call by
11295 its equality to -1 not by it being negative.
11296 * remote-utils.c (remote_open): Likewise.
11297
11298 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11299
11300 * config.h: Regenerate.
11301
11302 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11303
11304 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11305 doesn't provide PTRACE_GET_THREAD_AREA.
11306
11307 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11308
11309 * linux-m68k-low.c: Include <asm/ptrace.h>
11310 (ps_get_thread_area): Implement.
11311
11312 2010-05-03 Doug Evans <dje@google.com>
11313
11314 * event-loop.c (struct callback_event): New struct.
11315 (callback_list): New global.
11316 (append_callback_event, delete_callback_event): New functions.
11317 (process_callback): New function.
11318 (start_event_loop): Call it.
11319 * remote-utils.c (NOT_SCHEDULED): Define.
11320 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11321 moved out of readchar.
11322 (readchar): Rewrite. Call reschedule before returning.
11323 (reset_readchar): New function.
11324 (remote_close): Call it.
11325 (process_remaining, reschedule): New functions.
11326 * server.h (callback_handler_func): New typedef.
11327 (append_callback_event, delete_callback_event): Declare.
11328
11329 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11330
11331 * proc-service.c (ps_pglobal_lookup): Use
11332 thread_db_look_up_one_symbol.
11333 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11334 parameter. Use it instead of all_symbols_looked_up.
11335 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11336 field.
11337 (all_symbols_looked_up): Don't declare.
11338 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11339 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11340 field.
11341 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11342 Set all_symbols_looked_up here.
11343 (thread_db_look_up_one_symbol): New.
11344 (thread_db_get_tls_address): Adjust.
11345 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11346 thread_db object on the heap, and tentatively set it in the
11347 process structure.
11348 (thread_db_init): Don't set all_symbols_looked_up here.
11349 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11350
11351 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11352
11353 * linux-low.c (linux_kill, linux_detach): Adjust.
11354 (status_pending_p_callback): Remove redundant statement. Check
11355 for !TARGET_WAITIKIND_IGNORE, instead of
11356 TARGET_WAITKIND_STOPPED.
11357 (handle_tracepoints): Make sure LWP is locked. Adjust.
11358 (linux_wait_for_event_1): Adjust.
11359 (linux_cancel_breakpoints): New.
11360 (unsuspend_one_lwp): New.
11361 (unsuspend_all_lwps): New.
11362 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11363 (send_sigstop_callback): Change return type to int, add new
11364 `except' parameter and handle it.
11365 (suspend_and_send_sigstop_callback): New.
11366 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11367 pass them down. If SUSPEND, also increment the lwp's suspend
11368 count.
11369 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11370 (need_step_over_p): Don't consider suspended LWPs.
11371 (start_step_over): Adjust.
11372 (proceed_one_lwp): Change return type to int, add new `except'
11373 parameter and handle it.
11374 (unsuspend_and_proceed_one_lwp): New.
11375 (proceed_all_lwps): Use find_inferior instead of
11376 for_each_inferior.
11377 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11378 also decrement the suspend count of LWPs. Pass `except' down,
11379 instead of hacking its suspend count.
11380 (linux_pause_all): Add `freeze' parameter. Adjust.
11381 (linux_unpause_all): New.
11382 (linux_target_ops): Install linux_unpause_all.
11383 * server.c (handle_status): Adjust.
11384 * target.h (struct target_ops): New fields `unpause_all' and
11385 `cancel_breakpoints'. Add new parameter to `pause_all'.
11386 (pause_all): Add new `freeze' parameter.
11387 (unpause_all): New.
11388 (cancel_breakpoints): New.
11389 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11390 cancel breakpoints.
11391 (cmd_qtstart): Pause threads.
11392 (stop_tracing): Pause threads, and cancel breakpoints.
11393 * win32-low.c (win32_target_ops): Adjust.
11394
11395 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11396
11397 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11398 the inferior right away from here...
11399 (linux_wait_1): ... to here, and adjust to check the thread's
11400 last_resume_kind instead of the lwp's step or stop_expected flags.
11401
11402 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11403
11404 * README: Use consistent `GDB' and `GDBserver' spellings.
11405
11406 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11407
11408 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11409 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11410 (linux_detach_one_lwp): Assume the lwp is stopped.
11411 (any_thread_of): Delete.
11412 (linux_detach): Stop all lwps here. Don't blindly delete all
11413 breakpoints.
11414 (delete_lwp_callback): New.
11415 (linux_mourn): Delete all lwps of the process that is gone.
11416 (linux_wait_1): Don't delete the last lwp of the process here.
11417 * mem-break.h (mark_breakpoints_out): Declare.
11418 * mem-break.c (mark_breakpoints_out): New.
11419 (free_all_breakpoints): Use it.
11420 * server.c (handle_target_event): If the process is gone, mark
11421 breakpoints out.
11422 * thread-db.c (struct thread_db) <create_bp>: New field.
11423 (thread_db_enable_reporting): Fix prototype. Store a thread event
11424 breakpoint reference in the thread_db struct.
11425 (thread_db_load_search): Clear the thread_db object.
11426 (try_thread_db_load_1): Ditto.
11427 (switch_to_process): New.
11428 (disable_thread_event_reporting): Use it.
11429 (remove_thread_event_breakpoints): New.
11430 (thread_db_detach, thread_db_mourn): Use it.
11431
11432 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11433
11434 * linux-low.c (linux_enable_event_reporting): New.
11435 (linux_wait_for_event_1, handle_extended_wait): Use it.
11436
11437 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11438
11439 * linux-low.c (linux_kill_one_lwp, linux_kill)
11440 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11441 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11442 SIGSTOP even if the LWP is stopped.
11443 (send_sigstop_callback): New.
11444 (stop_all_lwps): Use send_sigstop_callback instead.
11445 (linux_resume_one_thread): Adjust.
11446 (proceed_one_lwp): Still proceed an LWP that the client has
11447 requested to stop, if we haven't reported it as stopped yet. Make
11448 sure that LWPs the client want stopped, have a pending SIGSTOP.
11449
11450 2010-04-26 Doug Evans <dje@google.com>
11451
11452 * server.c (handle_general_set): Make static.
11453
11454 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11455 Print received char after testing for error/eof instead of before.
11456 (input_interrupt): Tweak comment.
11457
11458 2010-04-23 Doug Evans <dje@google.com>
11459
11460 * server.c (start_inferior): Print inferior argv if --debug.
11461
11462 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11463
11464 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11465 * nto-x86-low.c: Include server.h
11466
11467 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11468
11469 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11470 be consistent with other sources of this directory.
11471 (init_registers_amd64): Correct name of source file of this function
11472 in the comment.
11473
11474 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11475
11476 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11477 64-bit executables.
11478
11479 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11480
11481 * win32-i386-low.c: Add 64-bit support.
11482 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11483 (init_registers_amd64): Declare.
11484 (mappings): Add 64-bit version of array.
11485 (init_windows_x86): New function.
11486 (the_low_target): Change init_arch field to init_windows_x86.
11487
11488 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11489
11490 * win32-low.c: Adapt to support also 64-bit architecture.
11491 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11492 (get_image_name): Use SIZE_T type for local variable `done'.
11493 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11494 (toolhelp_get_dll_name): Idem.
11495 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11496 Use uintptr_t typecast to avoid warning.
11497 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11498 (handle_exception): Use phex_nz to avoid warning.
11499 (win32_wait): Remove unused local variable `process'.
11500
11501 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11502
11503 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11504 `amd64-avx.o'.
11505
11506 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11507
11508 * configure.ac: Use `ws2_32' library for srv_mingw.
11509 * configure: Regenerate.
11510 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11511 * remote-utils.c: Likewise.
11512
11513 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11514
11515 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11516 if __x86_64__ is defined.
11517
11518 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11519
11520 * configure: Regenerate.
11521
11522 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11523
11524 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11525 * target.h (target_ops): New get_tib_address field.
11526 * win32-low.h (win32_thread_info): Add thread_local_base field.
11527 * win32-low.c (child_add_thread): Add tlb argument.
11528 Set thread_local_base field to TLB.
11529 (get_child_debug_event): Adapt to child_add_thread change.
11530 (win32_get_tib_address): New function.
11531 (win32_target_ops): Set get_tib_address field to
11532 win32_get_tib_address.
11533 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11534
11535 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11536
11537 * linux-low.c (linux_mourn): Also remove the process.
11538 * server.c (handle_target_event): Don't remove the process here.
11539 * nto-low.c (nto_mourn): New.
11540 (nto_target_ops): Install it.
11541 * spu-low.c (spu_mourn): New.
11542 (spu_target_ops): Install it.
11543 * win32-low.c (win32_mourn): New.
11544 (win32_target_ops): Install it.
11545
11546 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11547
11548 * server.h (buffer_xml_printf): Remove redundant `;'.
11549
11550 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11551
11552 * regcache.c (set_register_cache): Invalidate regcaches before
11553 changing the register cache layout.
11554 (regcache_invalidate_one): Allow a NULL regcache.
11555 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11556 regcaches before changing the register cache layout or the target
11557 regsets.
11558
11559 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11560
11561 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11562 variable warning on Linux/x86-64.
11563
11564 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11565
11566 GDBserver disconnected tracing support.
11567
11568 * linux-low.c (linux_remove_process): Delete.
11569 (add_lwp): Don't set last_resume_kind here.
11570 (linux_kill): Use `mourn'.
11571 (linux_detach): Use `thread_db_detach', and `mourn'.
11572 (linux_mourn): New.
11573 (linux_attach_lwp_1): Adjust comment.
11574 (linux_attach): last_resume_kind moved the thread_info; adjust.
11575 (status_pending_p_callback): Adjust.
11576 (linux_wait_for_event_1): Adjust.
11577 (count_events_callback, select_singlestep_lwp_callback)
11578 (select_event_lwp_callback, cancel_breakpoints_callback)
11579 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11580 (proceed_one_lwp): Adjust.
11581 (linux_async): Add debug output.
11582 (linux_thread_stopped): New.
11583 (linux_pause_all): New.
11584 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11585 linux_pause_all.
11586 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11587 (thread_db_free): Delete declaration.
11588 (thread_db_detach, thread_db_mourn): Declare.
11589 * thread-db.c (thread_db_init): Use thread_db_mourn.
11590 (thread_db_free): Delete, split in two.
11591 (disable_thread_event_reporting): New.
11592 (thread_db_detach): New.
11593 (thread_db_mourn): New.
11594
11595 * server.h (struct thread_info) <last_resume_kind>: New field.
11596 <attached>: Add comment.
11597 <gdb_detached>: New field.
11598 (handler_func): Change return type to int.
11599 (handle_serial_event, handle_target_event): Ditto.
11600 (gdb_connected): Declare.
11601 (tracing): Delete.
11602 (disconnected_tracing): Declare.
11603 (stop_tracing): Declare.
11604
11605 * server.c (handle_query) <qSupported>: Report support for
11606 disconnected tracing.
11607 (queue_stop_reply_callback): Account for running threads.
11608 (gdb_wants_thread_stopped): New.
11609 (gdb_wants_all_threads_stopped): New.
11610 (gdb_reattached_process): New.
11611 (handle_status): Clear the `gdb_detached' flag of all processes.
11612 In all-stop, stop all threads.
11613 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11614 (process_serial_event): If the remote connection breaks, or if an
11615 exit was forced with "monitor exit", force an event loop exit.
11616 Handle disconnected tracing on detach.
11617 (handle_serial_event): Adjust.
11618 (handle_target_event): If GDB isn't connected, forward events back
11619 to the inferior, unless the last process exited, in which case,
11620 exit gdbserver. Adjust interface.
11621
11622 * remote-utils.c (remote_open): Don't block in accept. Instead
11623 register an event loop source on the listen socket file
11624 descriptor. Refactor bits into ...
11625 (listen_desc): ... this new global.
11626 (gdb_connected): ... this new function.
11627 (enable_async_notification): ... this new function.
11628 (handle_accept_event): ... this new function.
11629 (remote_close): Clear remote_desc.
11630
11631 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11632
11633 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11634 New fields.
11635 (mourn_inferior): Define.
11636 (target_process_qsupported): Avoid the dangling else problem.
11637 (thread_stopped): Define.
11638 (pause_all): Define.
11639 (target_waitstatus_to_string): Declare.
11640 * target.c (target_waitstatus_to_string): New.
11641
11642 * tracepoint.c (tracing): Make extern.
11643 (disconnected_tracing): New.
11644 (stop_tracing): Make extern. Handle tracing stops due to GDB
11645 disconnecting.
11646 (cmd_qtdisconnected): New.
11647 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11648 (handle_tracepoint_general_set): Handle QTDisconnected.
11649
11650 * event-loop.c (event_handler_func): Change return type to int.
11651 (process_event): Bail out if the event handler wants the event
11652 loop to stop.
11653 (handle_file_event): Ditto.
11654 (start_event_loop): Bail out if the event handler wants the event
11655 loop to stop.
11656
11657 * nto-low.c (nto_target_ops): Adjust.
11658 * spu-low.c (spu_wait): Don't remove the process here.
11659 (spu_target_ops): Adjust.
11660 * win32-low.c (win32_wait): Don't remove the process here.
11661 (win32_target_ops): Adjust.
11662
11663 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11664
11665 * regcache.c (realloc_register_cache): Invalidate inferior's
11666 regcache before recreating it.
11667
11668 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11669
11670 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11671
11672 2010-04-09 Stan Shebs <stan@codesourcery.com>
11673 Pedro Alves <pedro@codesourcery.com>
11674
11675 * server.h (LONGEST): New.
11676 (struct thread_info) <while_stepping>: New field.
11677 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11678 Declare.
11679 (initialize_tracepoint, handle_tracepoint_general_set)
11680 (handle_tracepoint_query, tracepoint_finished_step)
11681 (tracepoint_was_hit, release_while_stepping_state_list):
11682 (current_traceframe): Declare.
11683 * server.c (handle_general_set): Handle tracepoint packets.
11684 (read_memory): New.
11685 (write_memory): New.
11686 (handle_search_memory_1): Use read_memory.
11687 (handle_query): Report support for conditional tracepoints, trace
11688 state variables, and tracepoint sources. Handle tracepoint
11689 queries.
11690 (main): Initialize the tracepoints module.
11691 (process_serial_event): Handle traceframe reads/writes.
11692
11693 * linux-low.c (handle_tracepoints): New.
11694 (linux_wait_1): Call it.
11695 (linux_resume_one_lwp): Handle while-stepping.
11696 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11697 (linux_target_ops): Install them.
11698 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11699 New field.
11700 * linux-x86-low.c (x86_supports_tracepoints): New.
11701 (the_low_target). Install it.
11702
11703 * mem-break.h (delete_breakpoint): Declare.
11704 * mem-break.c (delete_breakpoint): Make external.
11705
11706 * target.h (struct target_ops): Add `supports_tracepoints',
11707 `read_pc', and `write_pc' fields.
11708 (target_supports_tracepoints): Define.
11709 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11710 (phex_nz): New.
11711
11712 * regcache.h (struct regcache) <registers_owned>: New field.
11713 (init_register_cache, regcache_cpy): Declare.
11714 (regcache_read_pc, regcache_write_pc): Declare.
11715 (register_cache_size): Declare.
11716 (supply_regblock): Declare.
11717 * regcache.c (init_register_cache): New.
11718 (new_register_cache): Use it.
11719 (regcache_cpy): New.
11720 (register_cache_size): New.
11721 (supply_regblock): New.
11722 (regcache_read_pc, regcache_write_pc): New.
11723
11724 * tracepoint.c: New.
11725
11726 * Makefile.in (OBS): Add tracepoint.o.
11727 (tracepoint.o): New rule.
11728
11729 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11730
11731 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11732 (i386-mmx.o): New.
11733 (i386-mmx.c): Likewise.
11734 (i386-mmx-linux.o): Likewise.
11735 (i386-mmx-linux.c): Likewise.
11736
11737 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11738 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11739 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11740 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11741
11742 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11743 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11744 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11745
11746 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11747
11748 * Makefile.in (clean): Updated.
11749 (i386-avx.o): New.
11750 (i386-avx.c): Likewise.
11751 (i386-avx-linux.o): Likewise.
11752 (i386-avx-linux.c): Likewise.
11753 (amd64-avx.o): Likewise.
11754 (amd64-avx.c): Likewise.
11755 (amd64-avx-linux.o): Likewise.
11756 (amd64-avx-linux.c): Likewise.
11757
11758 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11759 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11760 (srv_amd64_regobj): Add amd64-avx.o.
11761 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11762 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11763 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11764 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11765 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11766 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11767 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11768
11769 * i387-fp.c: Include "i386-xstate.h".
11770 (i387_xsave): New.
11771 (i387_cache_to_xsave): Likewise.
11772 (i387_xsave_to_cache): Likewise.
11773 (x86_xcr0): Likewise.
11774
11775 * i387-fp.h (i387_cache_to_xsave): Likewise.
11776 (i387_xsave_to_cache): Likewise.
11777 (x86_xcr0): Likewise.
11778
11779 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11780 * linux-crisv32-low.c (target_regsets): Likewise.
11781 * linux-m68k-low.c (target_regsets): Likewise.
11782 * linux-mips-low.c (target_regsets): Likewise.
11783 * linux-ppc-low.c (target_regsets): Likewise.
11784 * linux-s390-low.c (target_regsets): Likewise.
11785 * linux-sh-low.c (target_regsets): Likewise.
11786 * linux-sparc-low.c (target_regsets): Likewise.
11787 * linux-xtensa-low.c (target_regsets): Likewise.
11788
11789 * linux-low.c: Include <sys/uio.h>.
11790 (regsets_fetch_inferior_registers): Support nt_type.
11791 (regsets_store_inferior_registers): Likewise.
11792 (linux_process_qsupported): New.
11793 (linux_target_ops): Add linux_process_qsupported.
11794
11795 * linux-low.h (regset_info): Add nt_type.
11796 (linux_target_ops): Add process_qsupported.
11797
11798 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11799 and <sys/uio.h>.
11800 (init_registers_i386_avx_linux): New.
11801 (init_registers_amd64_avx_linux): Likewise.
11802 (xmltarget_i386_linux_no_xml): Likewise.
11803 (xmltarget_amd64_linux_no_xml): Likewise.
11804 (PTRACE_GETREGSET): Likewise.
11805 (PTRACE_SETREGSET): Likewise.
11806 (x86_fill_xstateregset): Likewise.
11807 (x86_store_xstateregset): Likewise.
11808 (use_xml): Likewise.
11809 (x86_linux_update_xmltarget): Likewise.
11810 (x86_linux_process_qsupported): Likewise.
11811 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11812 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11813 init_registers_i386_linux here. Call
11814 x86_linux_update_xmltarget.
11815 (the_low_target): Add x86_linux_process_qsupported.
11816
11817 * server.c (handle_query): Call target_process_qsupported.
11818
11819 * target.h (target_ops): Add process_qsupported.
11820 (target_process_qsupported): New.
11821
11822 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11823
11824 * inferiors.c (add_thread): Set last_status kind to
11825 TARGET_WAITKIND_IGNORE.
11826 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11827 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11828 (linux_wait_1): Move `thread' local definition to block that uses
11829 it. Don't NULL initialize `event_child'.
11830 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11831 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11832 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11833
11834 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11835
11836 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11837 an extended waitstatus, or by a watchpoint.
11838 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11839 thread was stepping or has been stopped by a watchpoint.
11840
11841 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11842
11843 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11844 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11845 of another, then delete the previous, and validate all
11846 breakpoints.
11847 (validate_inserted_breakpoint): New.
11848 (delete_disabled_breakpoints): New.
11849 (validate_breakpoints): New.
11850 (check_mem_read): Validate breakpoints before trusting their
11851 shadow. Delete disabled breakpoints.
11852 (check_mem_write): Validate breakpoints before trusting they
11853 should be inserted. Delete disabled breakpoints.
11854 * mem-break.h (validate_breakpoints):
11855 * server.c (handle_query): Validate breakpoints when we see a
11856 qSymbol query.
11857
11858 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11859
11860 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11861 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11862 if we could tell there's a GDB breakpoint at stop_pc.
11863 (need_step_over_p): Don't do a step over if we find a GDB
11864 breakpoint at the resume PC.
11865
11866 * mem-break.c (struct raw_breakpoint): New.
11867 (enum bkpt_type): New type `gdb_breakpoint'.
11868 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11869 fields. New field `raw'.
11870 (find_raw_breakpoint_at): New.
11871 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11872 breakpoint instead.
11873 (set_breakpoint_at): Adjust.
11874 (delete_raw_breakpoint): New.
11875 (release_breakpoint): New.
11876 (delete_breakpoint): Rename to...
11877 (delete_breakpoint_1): ... this. Add proc parameter. Use
11878 release_breakpoint. Return ENOENT.
11879 (delete_breakpoint): Reimplement.
11880 (find_breakpoint_at): Delete.
11881 (find_gdb_breakpoint_at): New.
11882 (delete_breakpoint_at): Delete.
11883 (set_gdb_breakpoint_at): New.
11884 (delete_gdb_breakpoint_at): New.
11885 (gdb_breakpoint_here): New.
11886 (set_reinsert_breakpoint): Use release_breakpoint.
11887 (uninsert_breakpoint): Rename to ...
11888 (uninsert_raw_breakpoint): ... this.
11889 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11890 (reinsert_raw_breakpoint): Change parameter type to
11891 raw_breakpoint.
11892 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11893 instead.
11894 (check_breakpoints): Adjust. Use release_breakpoint.
11895 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11896 (breakpoint_inserted_here): Ditto.
11897 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11898 Don't trust the breakpoint's shadow if it is not inserted.
11899 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11900 (delete_all_breakpoints): Adjust.
11901 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11902 use delete_breakpoint_1.
11903
11904 * mem-break.h (breakpoints_supported): Delete declaration.
11905 (set_gdb_breakpoint_at): Declare.
11906 (gdb_breakpoint_here): Declare.
11907 (delete_breakpoint_at): Delete.
11908 (delete_gdb_breakpoint_at): Declare.
11909
11910 * server.h (struct raw_breakpoint): Forward declare.
11911 (struct process_info): New field `raw_breakpoints'.
11912
11913 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11914 breakpoints.
11915
11916 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11917
11918 * linux-low.c (status_pending_p_callback): Fix comment.
11919 (linux_wait_for_event_1): Move most of the internal breakpoint
11920 handling from here...
11921 (linux_wait_1): ... to here.
11922 (count_events_callback): New.
11923 (select_singlestep_lwp_callback): New.
11924 (select_event_lwp_callback): New.
11925 (cancel_breakpoints_callback): New.
11926 (select_event_lwp): New.
11927 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11928 priority to all LWPs that have had events that should be reported
11929 to the client. Cancel breakpoints when about to reporting the
11930 event to the client, not while stopping lwps. No longer cancel
11931 finished single-steps here.
11932 (cancel_finished_single_step): Delete.
11933 (cancel_finished_single_steps): Delete.
11934
11935 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11936
11937 * mem-break.c (enum bkpt_type): New.
11938 (struct breakpoint): New field `type'.
11939 (set_breakpoint_at): Change return type to struct breakpoint
11940 pointer. Set type to `other_breakpoint' by default.
11941 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11942 in the breakpoint list.
11943 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11944 (reinsert_breakpoint): Rename to ...
11945 (reinsert_raw_breakpoint): ... this.
11946 (reinsert_breakpoints_at): Adjust.
11947 * mem-break.h (struct breakpoint): Declare.
11948 (set_breakpoint_at): Change return type to struct breakpoint
11949 pointer.
11950
11951 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11952
11953 * server.c (handle_query): Assign, not compare.
11954
11955 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11956
11957 Teach linux gdbserver to step-over-breakpoints.
11958
11959 * linux-low.c (can_hardware_single_step): New.
11960 (supports_breakpoints): New.
11961 (handle_extended_wait): If stopping threads, read the stop pc of
11962 the new cloned LWP.
11963 (get_pc): New.
11964 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11965 low target doesn't support retrieving the PC.
11966 (add_lwp): Set last_resume_kind to resume_continue.
11967 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11968 (linux_attach): Don't clear stop_expected. Set the lwp's
11969 last_resume_kind to resume_stop.
11970 (linux_detach_one_lwp): Don't check for removed breakpoints.
11971 (check_removed_breakpoint): Delete.
11972 (status_pending_p): Rename to ...
11973 (status_pending_p_callback): ... this. Don't check for removed
11974 breakpoints. Don't consider threads that are stopped from GDB's
11975 perspective.
11976 (linux_wait_for_lwp): Always read the stop_pc here.
11977 (cancel_breakpoint): New.
11978 (step_over_bkpt): New global.
11979 (linux_wait_for_event_1): Implement stepping over breakpoints.
11980 (gdb_wants_lwp_stopped): New.
11981 (gdb_wants_all_stopped): New.
11982 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11983 single-step traps here. Store the thread's last reported target
11984 wait status.
11985 (send_sigstop): Don't clear stop_expected. Always set it,
11986 instead.
11987 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11988 (cancel_finished_single_step): New.
11989 (cancel_finished_single_steps): New.
11990 (wait_for_sigstop): Don't cancel finished single-step traps here.
11991 (linux_resume_one_lwp): Don't check for removed breakpoints.
11992 Don't set `step' on non-hardware step archs.
11993 (linux_set_resume_request): Ignore resume_stop requests if already
11994 stopping or stopped. Set the lwp's last_resume_kind.
11995 (resume_status_pending_p): Don't check for removed breakpoints.
11996 (need_step_over_p): New.
11997 (start_step_over): New.
11998 (finish_step_over): New.
11999 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12000 requests. Clear the thread's last reported target waitstatus.
12001 Don't use the `suspended' flag. Don't consider pending breakpoints.
12002 (linux_resume): Start a step-over if necessary.
12003 (proceed_one_lwp): New.
12004 (proceed_all_lwps): New.
12005 (unstop_all_lwps): New.
12006 * linux-low.h (struct lwp_info): Rewrite comment for the
12007 `suspended' flag. Add the `stop_pc' field. Delete the
12008 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12009 Add `'last_resume_kind' and `need_step_over' fields.
12010 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12011 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12012 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12013 (set_raw_breakpoint_at): New.
12014 (set_breakpoint_at): Rewrite to use it.
12015 (reinsert_breakpoint_handler): Delete.
12016 (set_reinsert_breakpoint): New.
12017 (reinsert_breakpoint_by_bp): Delete.
12018 (delete_reinsert_breakpoints): New.
12019 (uninsert_breakpoint): Rewrite.
12020 (uninsert_breakpoints_at): New.
12021 (reinsert_breakpoint): Rewrite.
12022 (reinsert_breakpoints_at): New.
12023 (check_breakpoints): Rewrite.
12024 (breakpoint_here): New.
12025 (breakpoint_inserted_here): New.
12026 (check_mem_read): Adjust.
12027 * mem-break.h (breakpoints_supported, breakpoint_here)
12028 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12029 (reinsert_breakpoint_by_bp): Delete declaration.
12030 (delete_reinsert_breakpoints): Declare.
12031 (reinsert_breakpoint): Delete declaration.
12032 (reinsert_breakpoints_at): Declare.
12033 (uninsert_breakpoint): Delete declaration.
12034 (uninsert_breakpoints_at): Declare.
12035 (check_breakpoints): Adjust prototype.
12036 * server.h: Adjust include order.
12037 (struct thread_info): Declare here. Add a `last_status' field.
12038
12039 2010-03-23 Michael Snyder <msnyder@vmware.com>
12040
12041 * server.c (crc32): New function.
12042 (handle_query): Add handling for 'qCRC:' request.
12043
12044 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12045
12046 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12047 lwp had been stopped by a watchpoint.
12048
12049 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12050
12051 * server.h (internal_error): Declare.
12052 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12053 * utils.c (internal_error): New function.
12054
12055 2010-03-15 Andreas Schwab <schwab@redhat.com>
12056
12057 * configure.srv: Fix typo setting srv_regobj.
12058
12059 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12060
12061 * linux-low.c (fetch_register): Avoid passing a non string literal
12062 format to `error'.
12063 (usr_store_inferior_registers): Ditto.
12064
12065 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12066
12067 * linux-low.c (linux_write_memory): Bail out early if peeking
12068 memory failed.
12069
12070 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12071
12072 * linux-low.h (struct lwp_info): New fields
12073 `stopped_by_watchpoint' and `stopped_data_address'.
12074 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12075 here, and cache them in the lwp object.
12076 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12077 directly.
12078 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12079 field.
12080 (linux_stopped_by_watchpoint): Rewrite.
12081 (linux_stopped_data_address): Rewrite.
12082
12083 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12084
12085 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12086 switching the current inferior, not before.
12087
12088 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12089
12090 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12091 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12092 i386-linux.c and amd64-linux.c.
12093 (reg-i386.o): Removed.
12094 (reg-i386.c): Likewise.
12095 (reg-i386-linux.o): Likewise.
12096 (reg-i386-linux.c): Likewise.
12097 (reg-x86-64.o): Likewise.
12098 (reg-x86-64.c): Likewise.
12099 (reg-x86-64-linux.o): Likewise.
12100 (reg-x86-64-linux.c): Likewise.
12101 (i386.o): New.
12102 (i386.c): Likewise.
12103 (i386-linux.o): Likewise.
12104 (i386-linux.c): Likewise.
12105 (amd64.o): Likewise.
12106 (amd64.c): Likewise.
12107 (amd64-linux.o): Likewise.
12108 (amd64-linux.c): Likewise.
12109
12110 * configure.srv (srv_i386_regobj): New.
12111 (srv_i386_linux_regobj): Likewise.
12112 (srv_amd64_regobj): Likewise.
12113 (srv_amd64_linux_regobj): Likewise.
12114 (srv_i386_32bit_xmlfiles): Likewise.
12115 (srv_i386_64bit_xmlfiles): Likewise.
12116 (srv_i386_xmlfiles): Likewise.
12117 (srv_amd64_xmlfiles): Likewise.
12118 (srv_i386_linux_xmlfiles): Likewise.
12119 (srv_amd64_linux_xmlfiles): Likewise.
12120 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12121 srv_xmlfiles to $srv_i386_xmlfiles.
12122 (i[34567]86-*-mingw32ce*): Likewise.
12123 (i[34567]86-*-mingw*): Likewise.
12124 (i[34567]86-*-nto*): Likewise.
12125 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12126 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12127 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12128 (x86_64-*-linux*): Likewise.
12129
12130 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12131 (init_registers_amd64_linux): New.
12132 (x86_arch_setup): Replace init_registers_x86_64_linux with
12133 init_registers_amd64_linux.
12134
12135 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12136
12137 * configure.ac: Check for libdl. If it is not available link against
12138 static libthread_db.
12139 * configure: Regenerate.
12140
12141 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12142
12143 PR9605
12144
12145 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12146 handing a read watchpoint.
12147 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12148
12149 2010-02-12 Doug Evans <dje@google.com>
12150
12151 * linux-low.c (linux_supports_tracefork_flag): Document.
12152 (linux_look_up_symbols): Add comment.
12153
12154 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12155
12156 * regcache.c (supply_register): Clear regcache if buf is NULL.
12157
12158 2010-02-02 Nicolas Roche <roche@sourceware.org>
12159 Joel Brobecker <brobecker@adacore.com>
12160
12161 * inferiors.c (find_inferior): Add function documentation.
12162 (unloaded_dll): Handle the case where the unloaded dll has not
12163 been previously registered in the dll list.
12164
12165 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12166
12167 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12168 (thumb2_breakpoint): New.
12169 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12170
12171 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12172
12173 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12174 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12175 breakpoints.
12176
12177 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12178
12179 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12180
12181 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12182
12183 * linux-s390-low.c (s390_collect_ptrace_register)
12184 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12185
12186 2010-01-21 Doug Evans <dje@google.com>
12187
12188 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12189 (PTRACE_ARG4_TYPE): New macro.
12190 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12191 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12192 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12193 (usr_store_inferior_registers): Ditto.
12194 (linux_read_memory, linux_write_memory): Ditto.
12195 (linux_test_for_tracefork): Ditto.
12196
12197 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12198 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12199
12200 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12201
12202 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12203 target.
12204
12205 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12206
12207 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12208 prototype to take a regcache. Adjust.
12209
12210 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12211
12212 * regcache.h (struct thread_info): Forward declare.
12213 (struct regcache): New.
12214 (new_register_cache): Adjust prototype.
12215 (get_thread_regcache): Declare.
12216 (free_register_cache): Adjust prototype.
12217 (registers_to_string, registers_from_string): Ditto.
12218 (supply_register, supply_register_by_name, collect_register)
12219 (collect_register_as_string, collect_register_by_name): Ditto.
12220 * regcache.c (struct inferior_regcache_data): Delete.
12221 (get_regcache): Rename to ...
12222 (get_thread_regcache): ... this. Adjust. Switch inferior before
12223 fetching registers.
12224 (regcache_invalidate_one): Adjust.
12225 (regcache_invalidate): Fix prototype.
12226 (new_register_cache): Return the new register cache.
12227 (free_register_cache): Change prototype.
12228 (realloc_register_cache): Adjust.
12229 (registers_to_string): Change prototype to take a regcache. Adjust.
12230 (registers_from_string): Ditto.
12231 (register_data): Ditto.
12232 (supply_register): Ditto.
12233 (supply_register_by_name): Ditto.
12234 (collect_register): Ditto.
12235 (collect_register_as_string): Ditto.
12236 (collect_register_by_name): Ditto.
12237 * server.c (process_serial_event): Adjust.
12238 * linux-low.h (regset_fill_func, regset_store_func): Change
12239 prototype.
12240 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12241 Change prototype.
12242 * linux-low.c (get_stop_pc): Adjust.
12243 (check_removed_breakpoint): Adjust.
12244 (linux_wait_for_event): Adjust.
12245 (linux_resume_one_lwp): Adjust.
12246 (fetch_register): Add regcache parameter. Adjust.
12247 (usr_store_inferior_registers): Ditto.
12248 (regsets_fetch_inferior_registers): Ditto.
12249 (regsets_store_inferior_registers): Ditto.
12250 (linux_fetch_registers, linux_store_registers): Ditto.
12251 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12252 regcache. Adjust.
12253 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12254 Ditto.
12255 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12256 prototype to take a regcache.
12257 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12258 * remote-utils.c (convert_ascii_to_int, outreg)
12259 (prepare_resume_reply): Change prototype to take a regcache.
12260 Adjust.
12261 * target.h (struct target_ops) <fetch_registers, store_registers>:
12262 Change prototype to take a regcache.
12263 (fetch_inferior_registers, store_inferior_registers): Change
12264 prototype to take a regcache. Adjust.
12265 * proc-service.c (ps_lgetregs): Adjust.
12266 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12267 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12268 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12269 take a regcache. Adjust.
12270 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12271 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12272 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12273 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12274 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12275 (cris_cannot_fetch_register):
12276 (cris_breakpoint_at): Change prototype to take a regcache.
12277 Adjust.
12278 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12279 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12280 to take a regcache. Adjust.
12281 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12282 Adjust.
12283 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12284 take a regcache. Adjust.
12285 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12286 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12287 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12288 * linux-mips-low.c (mips_get_pc):
12289 (mips_set_pc): Change prototype to take a regcache. Adjust.
12290 (mips_reinsert_addr): Adjust.
12291 (mips_collect_register): Change prototype to take a regcache.
12292 Adjust.
12293 (mips_supply_register):
12294 (mips_collect_register_32bit, mips_supply_register_32bit)
12295 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12296 (mips_store_fpregset): Ditto.
12297 * linux-ppc-low.c (ppc_supply_ptrace_register)
12298 (ppc_supply_ptrace_register): Ditto.
12299 (parse_spufs_run): Adjust.
12300 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12301 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12302 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12303 take a regcache. Adjust.
12304 * linux-s390-low.c (s390_collect_ptrace_register)
12305 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12306 (s390_set_pc): Change prototype to take a regcache. Adjust.
12307 (s390_arch_setup): Adjust.
12308 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12309 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12310 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12311 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12312 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12313 regcache. Adjust.
12314 (sparc_breakpoint_at): Adjust.
12315 * linux-xtensa-low.c (xtensa_fill_gregset):
12316 (xtensa_store_gregset):
12317 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12318 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12319 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12320 prototype to take a regcache. Adjust.
12321 * win32-arm-low.c (arm_fetch_inferior_register)
12322 (arm_store_inferior_register): Change prototype to take a
12323 regcache. Adjust.
12324 * win32-i386-low.c (i386_fetch_inferior_register)
12325 (i386_store_inferior_register): Change prototype to take a
12326 regcache. Adjust.
12327 * win32-low.c (child_fetch_inferior_registers)
12328 (child_store_inferior_registers): Change prototype to take a
12329 regcache. Adjust.
12330 (win32_wait): Adjust.
12331 (win32_fetch_inferior_registers): Change prototype to take a
12332 regcache. Adjust.
12333 (win32_store_inferior_registers): Adjust.
12334 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12335 store_inferior_register>: Change prototype to take a regcache.
12336
12337 2010-01-20 Doug Evans <dje@google.com>
12338
12339 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12340 #ifdef.
12341 (linux_wait_for_event1, linux_init_signals): Ditto.
12342 (W_STOPCODE): Provide definition if missing.
12343
12344 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12345
12346 * linux-low.c (linux_core_of_thread): New.
12347 (compare_ints, show_process, list_threads): New.
12348 (linux_qxfer_osdata): Report threads and cores.
12349 (linux_target_op): Register linux_core_of_thread.
12350 * remote-utils.c (prepare_resume_reply): Report the core.
12351 (buffer_xml_printf): Support %d specifier.
12352 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12353 New.
12354 (handle_query): Handle qXfer:threads. Announce availability
12355 thereof.
12356 * target.h (struct target_ops): New field core_of_thread.
12357
12358 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12359
12360 * Makefile.in (clean): Remove new generated files.
12361 (reg-s390.o, reg-s390.c): Remove rules.
12362 (reg-s390x.o, reg-s390x.c): Likewise.
12363 (s390-linux32.o, s390-linux32.c): Add rules.
12364 (s390-linux64.o, s390-linux64.c): Likewise.
12365 (s390x-linux64.o, s390x-linux64.c): Likewise.
12366 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12367 * linux-s390-low.c: Include <elf.h>.
12368 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12369 (init_registers_s390): Remove prototype.
12370 (init_registers_s390x): Likewise.
12371 (init_registers_s390_linux32): Add prototype.
12372 (init_registers_s390_linux64): Likewise.
12373 (init_registers_s390x_linux64): Likewise.
12374 (s390_num_regs_3264): New define.
12375 (s390_regmap_3264): New global variable.
12376 (s390_cannot_fetch_register): Remove obsolete check.
12377 (s390_cannot_store_register): Likewise.
12378 (s390_collect_ptrace_register): Handle upper/lower register halves.
12379 (s390_supply_ptrace_register): Likewise.
12380 (s390_fill_gregset): Update to register number changes.
12381 (s390_get_hwcap): New routine.
12382 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12383 Install appropriate regmap and register set.
12384
12385 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12386
12387 * server.c (gdbserver_version): Update copyright year to 2010.
12388 * gdbreplay.c (gdbreplay_version): Likewise.
12389
12390 2009-12-28 Doug Evans <dje@google.com>
12391
12392 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12393 elf/external.h. Include <elf.h> instead but only if necessary.
12394
12395 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12396
12397 * linux-low.c (linux_remove_process): Remove `detaching'
12398 parameter. Don't release/detach from thread_db here.
12399 (linux_kill): Release/detach from thread_db here, ...
12400 (linux_detach): ... and here, before actually detaching.
12401 (linux_wait_1): ... and here, when a process exits.
12402 * thread-db.c (any_thread_of): New.
12403 (thread_db_free): Switch the current inferior to a thread of the
12404 passed in process.
12405
12406 2009-12-21 Doug Evans <dje@google.com>
12407
12408 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12409
12410 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12411 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12412 warning ifndef __NR_tkill. Move setting of errno there too.
12413 Delete unnecessary resetting of errno after syscall.
12414 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12415
12416 * configure.ac: Check for dladdr.
12417 * config.in: Regenerate.
12418 * configure: Regenerate.
12419 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12420 (try_thread_db_load): Update.
12421
12422 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12423
12424 2009-12-18 Doug Evans <dje@google.com>
12425
12426 * event-loop.c: Include unistd.h if it exists.
12427
12428 * linux-low.c (my_waitpid): Move definition away from being in
12429 between linux_tracefork_child/linux_test_for_tracefork.
12430
12431 * gdb_proc_service.h (psaddr_t): Fix type.
12432 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12433 signature to match glibc.
12434
12435 2009-12-16 Doug Evans <dje@google.com>
12436
12437 * linux-low.c (linux_read_memory): Fix argument to read.
12438
12439 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12440
12441 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12442 events, don't leave current_inferior pointing at null.
12443
12444 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12445
12446 * win32-low.c (LOG): Delete.
12447 (OUTMSG): Output to stderr.
12448 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12449 on compile time LOG macro.
12450 (win32_wait): Fix debug output.
12451
12452 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12453
12454 * win32-low.c (win32_add_one_solib): If the dll name is
12455 "ntdll.dll", prepend the system directory to the dll path.
12456
12457 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12458
12459 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12460
12461 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12462 Vladimir Prus <vladimir@codesourcery.com>
12463
12464 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12465 * configure.ac: Check for __mcoldfire__ and set
12466 gdb_cv_m68k_is_coldfire.
12467 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12468 reg-cf.o and reg-m68k.o.
12469 * configure: Regenerated.
12470
12471 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12472
12473 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12474 Pass it to thread_db_free.
12475 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12476 proper `detaching' argument to linux_remove_process.
12477 * linux-low.h (thread_db_free): Add `detaching' parameter.
12478 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12479 to thread_db_free.
12480 (thread_db_free): Add `detaching' parameter. Only
12481 call td_ta_clear_event if detaching from process.
12482
12483 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12484
12485 * thread-db.c (thread_db_free): Fix typo.
12486
12487 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12488
12489 PR gdb/10838
12490 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12491
12492 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12493
12494 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12495 with an i686 compiler.
12496 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12497 needed.
12498 * configure: Rebuilt.
12499
12500 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12501
12502 PR gdb/10783
12503
12504 * server.c (handle_search_memory_1): Correct read_addr initialization
12505 in loop for searching subsequent chunks.
12506
12507 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12508
12509 * configure.ac: New --with-libthread-db option.
12510 * thread-db.c: Allow direct dependence on libthread_db.
12511 (thread_db_free): Adjust.
12512 * config.in: Regenerate.
12513 * configure: Likewise.
12514
12515 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12516
12517 PR gdb/10757
12518 * thread-db.c (attach_thread): New function.
12519 (maybe_attach_thread): Return success/failure.
12520 (find_new_threads_callback): Adjust.
12521 (thread_db_find_new_threads): Loop until no new threads.
12522
12523 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12524
12525 * proc-service.c (ps_lgetregs): Formatting.
12526
12527 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12528
12529 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12530 * configure.ac: Adjust.
12531 * linux-low.h (struct process_info_private): Move members to struct
12532 thread_db.
12533 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12534 * linux-low.c (linux_remove_process): Adjust.
12535 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12536 * server.c (handle_query): Move code ...
12537 (handle_monitor_command): ... here. New function.
12538 * target.h (struct target_ops): New member.
12539 * thread-db.c (struct thread_db): New.
12540 (libthread_db_search_path): New variable.
12541 (thread_db_create_event, thread_db_enable_reporting)
12542 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12543 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12544 (try_thread_db_load_1, dladdr_to_soname): New functions.
12545 (try_thread_db_load, thread_db_load_search): New functions.
12546 (thread_db_init): Search for libthread_db.
12547 (thread_db_free): New function.
12548 (thread_db_handle_monitor_command): Likewise.
12549 * config.in: Regenerate.
12550 * configure: Regenerate.
12551
12552 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12553
12554 * spu-low.c (spu_kill): Wait for inferior to terminate.
12555 Call clear_inferiors.
12556 (spu_detach): Call clear_inferiors.
12557
12558 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12559
12560 * aclocal.m4: Regenerate.
12561 * config.in: Likewise.
12562 * configure: Likewise.
12563
12564 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12565
12566 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12567 (parse_spufs_run): New function.
12568 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12569 (ppc_breakpoint_at): Handle SPU breakpoints.
12570
12571 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12572
12573 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12574 (SPUFS_MAGIC): Define.
12575 (spu_enumerate_spu_ids): New function.
12576 (linux_qxfer_spu): New function.
12577 (linux_target_ops): Install linux_qxfer_spu.
12578
12579 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12580
12581 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12582 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12583 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12584 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12585 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12586 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12587 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12588 (init_registers_powerpc_cell32l): Add prototype.
12589 (init_registers_powerpc_cell64l): Likewise.
12590 (ppc_arch_setup): Detect Cell/B.E. architecture.
12591
12592 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12593
12594 * Makefile.in (datarootdir): New variable.
12595
12596 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12597
12598 * linux-low.c (linux_write_memory): Update debugging output.
12599 * Makefile.in (clean): Add new descriptions.
12600 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12601 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12602 * configure.srv: Add new files for arm*-*-linux*.
12603 * linux-arm-low.c: Add new declarations.
12604 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12605 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12606 (HWCAP_VFPv3D16): New.
12607 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12608 instead of __IWMMXT__.
12609 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12610 (arm_arch_setup): New.
12611 (target_regsets): Remove #ifdef. Add VFP regset.
12612 (the_low_target): Use arm_arch_setup.
12613
12614 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12615
12616 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12617 the main thread again.
12618
12619 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12620
12621 Adding Neutrino gdbserver.
12622 * configure: Regenerated.
12623 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12624 * configure.srv (i[34567]86-*-nto*): New target.
12625 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12626 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12627 (nto_comctrl) [__QNX__]: New function.
12628 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12629
12630 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12631
12632 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12633 srv_tgtobj.
12634
12635 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12636 Pedro Alves <pedro@codesourcery.com>
12637
12638 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12639 don't support CONTEXT_EXTENDED_REGISTERS.
12640 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12641 (the_low_target): Install them.
12642 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12643 failing with ERROR_PIPE_NOT_CONNECTED.
12644
12645 2009-06-30 Doug Evans <dje@google.com>
12646 Pierre Muller <muller@ics.u-strasbg.fr>
12647
12648 Add h/w watchpoint support to x86-linux, win32-i386.
12649 * Makefile.in (SFILES): Add i386-low.c
12650 (i386_low_h): Define.
12651 (i386-low.o): Add dependencies.
12652 (linux-x86-low.o): Add i386-low.h dependency.
12653 (win32-i386-low.o): Ditto.
12654 * i386-low.c: New file.
12655 * i386-low.h: New file.
12656 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12657 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12658 * linux-low.c (linux_add_process): Initialize arch_private.
12659 (linux_remove_process): Free arch_private.
12660 (add_lwp): Initialize arch_private.
12661 (delete_lwp): Free arch_private.
12662 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12663 provided.
12664 * linux-low.h (process_info_private): New member arch_private.
12665 (lwp_info): New member arch_private.
12666 (linux_target_ops): New members new_process, new_thread,
12667 prepare_to_resume.
12668 (ptid_of): New macro.
12669 * linux-x86-low.c: Include stddef.h, i386-low.h.
12670 (arch_process_info): New struct.
12671 (arch_lwp_info): New struct.
12672 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12673 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12674 (i386_dr_low_get_status): New function.
12675 (x86_insert_point, x86_remove_point): New functions.
12676 (x86_stopped_by_watchpoint): New function.
12677 (x86_stopped_data_address): New function.
12678 (x86_linux_new_process, x86_linux_new_thread): New functions.
12679 (x86_linux_prepare_to_resume): New function.
12680 (the_low_target): Add entries for insert_point, remove_point,
12681 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12682 prepare_to_resume.
12683 * server.c (debug_hw_points): New global.
12684 (monitor_show_help): Document set debug-hw-points.
12685 (handle_query): Process "set debug-hw-points".
12686 * server.h (debug_hw_points): Declare.
12687 (paddress): Declare.
12688 * utils.c (NUMCELLS, CELLSIZE): New macros.
12689 (get_sell, xsnprintf, paddress): New functions.
12690 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12691 remove_point, stopped_by_watchpoint, stopped_data_address.
12692 * win32-i386-low.c: Include i386-low.h.
12693 (debug_reg_state): Replaces dr.
12694 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12695 (i386_dr_low_get_status): New function.
12696 (i386_insert_point, i386_remove_point): New functions.
12697 (i386_stopped_by_watchpoint): New function.
12698 (i386_stopped_data_address): New function.
12699 (i386_initial_stuff): Update.
12700 (get_thread_context,set_thread_context,i386_thread_added): Update.
12701 (the_low_target): Add entries for insert_point,
12702 remove_point, stopped_by_watchpoint, stopped_data_address.
12703 * win32-low.c (win32_insert_watchpoint): New function.
12704 (win32_remove_watchpoint): New function.
12705 (win32_stopped_by_watchpoint): New function.
12706 (win32_stopped_data_address): New function.
12707 (win32_target_ops): Add entries for insert_watchpoint,
12708 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12709 * win32-low.h (win32_target_ops): New members insert_point,
12710 remove_point, stopped_by_watchpoint, stopped_data_address.
12711
12712 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12713
12714 * server.c (process_serial_event): Re-return unsupported, not
12715 error, if the type isn't recognized. Re-allow supporting only
12716 insert or remove packets. Also call require_running for
12717 breakpoints. Add missing break statement to default case. Tidy.
12718 * target.h (struct target_ops): Rename insert_watchpoint to
12719 insert_point, and remove_watchpoint to remove_point.
12720
12721 * linux-low.h (struct linux_target_ops): Likewise.
12722 * linux-low.c (linux_insert_watchpoint): Rename to ...
12723 (linux_insert_point): ... this. Adjust.
12724 (linux_remove_watchpoint): Rename to ...
12725 (linux_remove_point): ... this. Adjust.
12726 (linux_target_ops): Adjust.
12727 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12728 (cris_insert_point): ... this.
12729 (cris_remove_watchpoint): Rename to ...
12730 (cris_remove_point): ... this.
12731 (the_low_target): Adjust.
12732
12733 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12734
12735 * server.c (handle_v_kill): Pass signal_pid to
12736 kill_inferior if multi_process is zero.
12737
12738 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12739
12740 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12741 * target.h (target_ops): Comment for *_watchpoint to make it clear
12742 the functions can get types '0' and '1'.
12743
12744 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12745
12746 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12747 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12748 * regcache.c (get_regcache): Likewise.
12749 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12750 * win32-low.c (child_fetch_inferior_registers): Remove check for
12751 regno 0.
12752
12753 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12754 Pedro Alves <pedro@codesourcery.com>
12755
12756 * target.h (struct target_ops) <supports_multi_process>: New
12757 callback.
12758 (target_supports_multi_process): New.
12759 * server.c (handle_query): Even if GDB reports support, only
12760 enable multi-process if the target also supports it. Report
12761 multi-process support only if the target backend supports it.
12762 * linux-low.c (linux_supports_multi_process): New function.
12763 (linux_target_ops): Install it as target_supports_multi_process
12764 callback.
12765
12766 2009-05-24 Doug Evans <dje@google.com>
12767
12768 Global renaming of find_thread_pid to find_thread_ptid.
12769 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12770 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12771 All callers updated.
12772
12773 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12774 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12775 directly.
12776
12777 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12778 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12779 (linux_resume_one_lwp): Ditto.
12780
12781 2009-05-23 Doug Evans <dje@google.com>
12782
12783 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12784 from struct inferior_list_entry * to struct lwp_info *.
12785 All callers updated.
12786
12787 2009-05-13 Doug Evans <dje@google.com>
12788
12789 * linux-x86-low.c: Don't include assert.h.
12790 (x86_siginfo_fixup): Use fatal, not assert.
12791 (x86_arch_setup): Fix comment.
12792
12793 2009-05-12 Doug Evans <dje@google.com>
12794
12795 Biarch support for i386/amd64 gdbserver.
12796 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12797 Add linux-x86-low.c.
12798 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12799 (linux-x86-low.o): Add.
12800 * linux-x86-64-low.c: Delete.
12801 * linux-i386-low.c: Delete.
12802 * linux-x86-low.c: New file.
12803 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12804 linux-x86-low.o.
12805 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12806 linux-x86-low.o.
12807 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12808 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12809 (linux_child_pid_to_exec_file): New function.
12810 (elf_64_header_p, elf_64_file_p): New functions.
12811 (siginfo_fixup): New function.
12812 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12813 give target a chance to convert layout.
12814 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12815 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12816
12817 2009-05-07 Doug Evans <dje@google.com>
12818
12819 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12820 (regsets_store_inferior_registers): Ditto.
12821
12822 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12823
12824 PR server/10048
12825
12826 * linux-low.c (must_set_ptrace_flags): Delete.
12827 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12828 of the global.
12829 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12830 `lwp->must_set_ptrace_flags' instead.
12831 (linux_wait_for_event_1): Set ptrace options here.
12832 (linux_wait_1): ... not here.
12833
12834 2009-04-30 Doug Evans <dje@google.com>
12835
12836 * inferiors.c (started_inferior_callback): New function.
12837 (attached_inferior_callback): New function.
12838 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12839 * server.c (print_started_pid, print_attached_pid): New functions.
12840 (detach_or_kill_for_exit): New function.
12841 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12842 * server.h (have_started_inferiors_p): Declare.
12843 (have_attached_inferiors_p): Declare.
12844
12845 * inferiors.c (remove_process): Fix memory leak, free process.
12846 * linux-low.c (linux_remove_process): New function.
12847 (linux_kill): Call it instead of remove_process.
12848 (linux_detach, linux_wait_1): Ditto.
12849
12850 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12851
12852 * configure.srv: Add x86 Windows CE target.
12853
12854 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12855
12856 * inferiors.c (get_thread_process): Make global.
12857 * server.h (get_thread_process): Add prototype.
12858 * thread-db.c (find_one_thread): Use get_thread_process
12859 instead of current_process.
12860 (thread_db_get_tls_address): Do not crash if called when
12861 thread layer is not yet initialized.
12862
12863 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12864
12865 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12866 * spu-low.c (current_tid): Rename to ...
12867 (current_ptid): ... this.
12868 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12869 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12870 ptid_get_lwp (current_ptid) instead of current_tid.
12871 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12872 instead of current_tid. Use find_process_pid to verify pid
12873 argument is valid. Pass proper argument to remove_process.
12874 (spu_thread_alive): Compare current_ptid instead of current_tid.
12875 (spu_resume): Likewise.
12876
12877 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12878
12879 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12880 variable.
12881
12882 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12883
12884 Implement the multiprocess extensions, and add linux multiprocess
12885 support.
12886
12887 * server.h (ULONGEST): Declare.
12888 (struct ptid, ptid_t): New.
12889 (minus_one_ptid, null_ptid): Declare.
12890 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12891 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12892 (struct inferior_list_entry): Change `id' type from unsigned from
12893 to ptid_t.
12894 (struct sym_cache, struct breakpoint, struct
12895 process_info_private): Forward declare.
12896 (struct process_info): Declare.
12897 (current_process): Declare.
12898 (all_processes): Declare.
12899 (initialize_inferiors): Declare.
12900 (add_thread): Adjust to use ptid_t.
12901 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12902 (add_process, remove_process, find_thread_pid): Declare.
12903 (find_inferior_id): Adjust to use ptid_t.
12904 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12905 (multi_process): Declare.
12906 (push_event): Adjust to use ptid_t.
12907 (read_ptid, write_ptid): Declare.
12908 (prepare_resume_reply): Adjust to use ptid_t.
12909 (clear_symbol_cache): Declare.
12910 * inferiors.c (all_processes): New.
12911 (null_ptid, minus_one_ptid): New.
12912 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12913 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12914 (add_thread): Change unsigned long to ptid. Remove gdb_id
12915 parameter. Adjust.
12916 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12917 (gdb_id_to_thread): Rename to ...
12918 (find_thread_pid): ... this. Change unsigned long to ptid.
12919 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12920 (loaded_dll, pull_pid_from_list): Adjust.
12921 (add_process, remove_process, find_process_pid)
12922 (get_thread_process, current_process, initialize_inferiors): New.
12923 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12924 (struct target_waitstatus) <related_pid>: Ditto.
12925 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12926 return type to int.
12927 (struct target_ops) <join>: Add `pid' argument.
12928 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12929 (struct target_ops) <wait>: Add `ptid' field. Change return type
12930 to ptid.
12931 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12932 (mywait): Add `ptid' argument. Change return type to ptid_t.
12933 (target_pid_to_str): Declare.
12934 * target.c (set_desired_inferior): Adjust to use ptids.
12935 (mywait): Add new `ptid' argument. Adjust.
12936 (target_pid_to_str): New.
12937 * mem-break.h (free_all_breakpoints): Declare.
12938 * mem-break.c (breakpoints): Delelete.
12939 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12940 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12941 to use per-process breakpoint list.
12942 (free_all_breakpoints): New.
12943 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12944 (symbol_cache, all_symbols_looked_up): Delete.
12945 (hexchars): New.
12946 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12947 read_ptid): New.
12948 (prepare_resume_reply): Change ptid argument's type from unsigned
12949 long to ptid_t. Adjust. Implement W;process and X;process.
12950 (free_sym_cache, clear_symbol_cache): New.
12951 (look_up_one_symbol): Adjust to per-process symbol cache. *
12952 * server.c (cont_thread, general_thread, step_thread): Change type
12953 to ptid_t.
12954 (attached): Delete.
12955 (multi_process): New.
12956 (last_ptid): Change type to ptid_t.
12957 (struct vstop_notif) <ptid>: Change type to ptid_t.
12958 (queue_stop_reply, push_event): Change `ptid' argument's type to
12959 ptid_t.
12960 (discard_queued_stop_replies): Add `pid' argument.
12961 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12962 changes. Don't reference the `attached' global.
12963 (attach_inferior): Adjust to mywait interface changes.
12964 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12965 features. Handle and report "multiprocess+". Handle
12966 "qAttached:PID".
12967 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12968 changes.
12969 (handle_v_kill): New.
12970 (handle_v_stopped): Adjust to use target_pid_to_str.
12971 (handle_v_requests): Allow multiple attaches and runs when
12972 multiprocess extensions are in effect. Handle "vKill".
12973 (myresume): Adjust to use ptids.
12974 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12975 (handle_status): Adjust to discard_queued_stop_replies interface
12976 change.
12977 (first_thread_of, kill_inferior_callback)
12978 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12979 (main): Call initialize_inferiors. Adjust to use ptids, killing
12980 and detaching from all inferiors. Handle multiprocess packet
12981 variants.
12982 * linux-low.h: Include gdb_proc_service.h.
12983 (struct process_info_private): New.
12984 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12985 <lwpid_of>: Use ptid_get_lwp.
12986 (get_lwp_thread): Adjust.
12987 (struct lwp_info): Add `dead' member.
12988 (find_lwp_pid): Declare.
12989 * linux-low.c (thread_db_active): Delete.
12990 (new_inferior): Adjust comment.
12991 (inferior_pid): Delete.
12992 (linux_add_process): New.
12993 (handle_extended_wait): Adjust.
12994 (add_lwp): Change unsigned long to ptid.
12995 (linux_create_inferior): Add process to processes table. Adjust
12996 to use ptids. Don't set new_inferior here.
12997 (linux_attach_lwp): Rename to ...
12998 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12999 it. Adjust to use ptids.
13000 (linux_attach_lwp): New.
13001 (linux_attach): Add process to processes table. Don't set
13002 new_inferior here.
13003 (struct counter): New.
13004 (second_thread_of_pid_p, last_thread_of_process_p): New.
13005 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13006 multiple processes.
13007 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13008 processes. Remove process from process table.
13009 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13010 to multiple processes.
13011 (any_thread_of): New.
13012 (linux_detach): Add `pid' argument, and handle it. Remove process
13013 from processes table.
13014 (linux_join): Add `pid' argument. Handle it.
13015 (linux_thread_alive): Change unsighed long argument to ptid_t.
13016 Consider dead lwps as not being alive.
13017 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13018 threads we're not interested in.
13019 (same_lwp, find_lwp_pid): New.
13020 (linux_wait_for_lwp): Change `pid' argument's type from int to
13021 ptid_t. Adjust.
13022 (linux_wait_for_event): Rename to ...
13023 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13024 from int to ptid_t. Adjust.
13025 (linux_wait_for_event): New.
13026 (linux_wait_1): Add `ptid' argument. Change return type to
13027 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13028 that exit from the process table.
13029 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13030 Adjust.
13031 (mark_lwp_dead): New.
13032 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13033 stopping all threads, mark its main lwp as dead.
13034 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13035 ptids.
13036 (fetch_register, usr_store_inferior_registers)
13037 (regsets_fetch_inferior_registers)
13038 (regsets_store_inferior_registers, linux_read_memory)
13039 (linux_write_memory): Inline `inferior_pid'.
13040 (linux_look_up_symbols): Adjust to use per-process
13041 `thread_db_active'.
13042 (linux_request_interrupt): Adjust to use ptids.
13043 (linux_read_auxv): Inline `inferior_pid'.
13044 (initialize_low): Don't reference thread_db_active.
13045 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13046 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13047 (ps_getpid): Return the pid of the current inferior.
13048 * thread-db.c (proc_handle, thread_agent): Delete.
13049 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13050 per-process data.
13051 (find_one_thread): Change argument type to ptid_t. Adjust to
13052 per-process data.
13053 (maybe_attach_thread): Adjust to per-process data and ptids.
13054 (thread_db_find_new_threads): Ditto.
13055 (thread_db_init): Ditto.
13056 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13057 processes table. Adjust to use ptids.
13058 (spu_kill, spu_detach): Adjust interface. Remove process from
13059 processes table.
13060 (spu_join, spu_thread_alive): Adjust interface.
13061 (spu_wait): Adjust interface. Remove process from processes
13062 table. Adjust to use ptids.
13063 * win32-low.c (current_inferior_tid): Delete.
13064 (current_inferior_ptid): New.
13065 (debug_event_ptid): New.
13066 (thread_rec): Take a ptid. Adjust.
13067 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13068 (child_delete_thread): Ditto.
13069 (do_initial_child_stuff): Add `attached' argument. Add process to
13070 processes table.
13071 (child_fetch_inferior_registers, child_store_inferior_registers):
13072 Adjust.
13073 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13074 (win32_attach): Pass 1 to do_initial_child_stuff.
13075 (win32_kill): Adjust interface. Remove process from processes
13076 table.
13077 (win32_detach): Ditto.
13078 (win32_join): Adjust interface.
13079 (win32_thread_alive): Take a ptid.
13080 (win32_resume): Adjust to use ptids.
13081 (get_child_debug_event): Ditto.
13082 (win32_wait): Adjust interface. Remove exiting process from
13083 processes table.
13084
13085 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13086
13087 Non-stop mode support.
13088
13089 * server.h (non_stop): Declare.
13090 (gdb_client_data, handler_func): Declare.
13091 (delete_file_handler, add_file_handler, start_event_loop):
13092 Declare.
13093 (handle_serial_event, handle_target_event, push_event)
13094 (putpkt_notif): Declare.
13095 * target.h (enum resume_kind): New.
13096 (struct thread_resume): Replace `step' field by `kind' field.
13097 (TARGET_WNOHANG): Define.
13098 (struct target_ops) <wait>: Add `options' argument.
13099 <supports_non_stop, async, start_non_stop>: New fields.
13100 (target_supports_non_stop, target_async): New.
13101 (start_non_stop): Declare.
13102 (mywait): Add `options' argument.
13103 * target.c (mywait): Add `options' argument. Print child exit
13104 notifications here.
13105 (start_non_stop): New.
13106 * server.c (non_stop, own_buf, mem_buf): New globals.
13107 (struct vstop_notif): New.
13108 (notif_queue): New global.
13109 (queue_stop_reply, push_event, discard_queued_stop_replies)
13110 (send_next_stop_reply): New.
13111 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13112 interface changes.
13113 (attach_inferior): In non-stop mode, don't wait for the target
13114 here.
13115 (handle_general_set): Handle QNonStop.
13116 (handle_query): When handling qC, return the current general
13117 thread, instead of the first thread of the list.
13118 (handle_query): If the backend supports non-stop mode, include
13119 QNonStop+ in the qSupported query response.
13120 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13121 and non-stop mode.
13122 (handle_v_attach, handle_v_run): Handle non-stop mode.
13123 (handle_v_stopped): New.
13124 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13125 (myresume): Adjust to use resume_kind. Handle non-stop.
13126 (queue_stop_reply_callback): New.
13127 (handle_status): Handle non-stop mode.
13128 (main): Clear non_stop flag on reconnection. Use the event-loop.
13129 Refactor serial protocol handling from here ...
13130 (process_serial_event): ... to this new function. When GDB
13131 selects any thread, select one here. In non-stop mode, wait until
13132 GDB acks all pending events before exiting.
13133 (handle_serial_event, handle_target_event): New.
13134 * remote-utils.c (remote_open): Install remote_desc in the event
13135 loop.
13136 (remote_close): Remove remote_desc from the event loop.
13137 (putpkt_binary): Rename to...
13138 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13139 (putpkt_binary): New as wrapper around putpkt_binary_1.
13140 (putpkt_notif): New.
13141 (prepare_resume_reply): In non-stop mode, don't change the
13142 general_thread.
13143 * event-loop.c: New.
13144 * Makefile.in (OBJ): Add event-loop.o.
13145 (event-loop.o): New rule.
13146
13147 * linux-low.h (pid_of): Moved here.
13148 (lwpid_of): New.
13149 (get_lwp_thread): Use lwpid_of.
13150 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13151 * linux-low.c (pid_of): Delete.
13152 (inferior_pid): Use lwpid_of.
13153 (linux_event_pipe): New.
13154 (target_is_async_p): New.
13155 (delete_lwp): New.
13156 (handle_extended_wait): Use lwpid_of.
13157 (add_lwp): Don't set lwpid field.
13158 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13159 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13160 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13161 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13162 first. Adjust to linux_wait_for_event interface changes. Use
13163 lwpid_of.
13164 (linux_detach): Don't delete the main lwp here.
13165 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13166 (status_pending_p): Don't consider explicitly suspended lwps.
13167 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13168 pointer. Add OPTIONS argument. Change return type to int. Use
13169 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13170 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13171 pointer. Add status pointer argument. Return a pid instead of a
13172 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13173 changes. In non-stop mode, don't switch to a random thread.
13174 (linux_wait): Rename to...
13175 (linux_wait_1): ... this. Add target_options argument, and handle
13176 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13177 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13178 clean exit and signal exit code. Don't stop all threads in
13179 non-stop mode. In all-stop mode, only stop all threads when
13180 reporting a stop to GDB. Handle explicit thread stop requests.
13181 (async_file_flush, async_file_mark): New.
13182 (linux_wait): New.
13183 (send_sigstop): Use lwpid_of.
13184 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13185 interface changes. In non-stop mode, don't switch to a random
13186 thread.
13187 (linux_resume_one_lwp): Use lwpid_of.
13188 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13189 (linux_resume_one_thread): ... this. Handle resume_stop. In
13190 non-stop mode, don't look for pending flag in all threads.
13191 (resume_status_pending_p): Don't consider explicitly suspended
13192 threads.
13193 (my_waitpid): Reimplement. Emulate __WALL.
13194 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13195 Use lwpid_of.
13196 (sigchld_handler, linux_supports_non_stop, linux_async)
13197 (linux_start_non_stop): New.
13198 (linux_target_ops): Register linux_supports_non_stop, linux_async
13199 and linux_start_non_stop.
13200 (initialize_low): Install SIGCHLD handler.
13201 * thread-db.c (thread_db_create_event, find_one_thread)
13202 (thread_db_get_tls_address): Use lwpid_of.
13203 * win32-low.c (win32_detach): Adjust to use resume_kind.
13204 (win32_wait): Add `options' argument.
13205 * spu-low.c (spu_resume): Adjust to use resume_kind.
13206 (spu_wait): Add `options' argument.
13207
13208 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13209
13210 Decouple target code from remote protocol.
13211
13212 * target.h (enum target_waitkind): New.
13213 (struct target_waitstatus): New.
13214 (struct target_ops) <wait>: Return an unsigned long. Take a
13215 target_waitstatus pointer instead of a char pointer.
13216 (mywait): Likewise.
13217 * target.c (mywait): Change prototype to return an unsigned long.
13218 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13219 * server.h (thread_from_wait, old_thread_from_wait): Delete
13220 declarations.
13221 (prepare_resume_reply): Change prototype to take a
13222 target_waitstatus.
13223 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13224 (last_status, last_ptid): New.
13225 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13226 pid instead of a signal.
13227 (attach_inferior): Remove "status" and "signal" parameters.
13228 Adjust.
13229 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13230 not as an address.
13231 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13232 (handle_v_requests, myresume): Remove "status" and "signal"
13233 parameters. Adjust.
13234 (handle_status): New.
13235 (main): Delete local `status'. Adjust.
13236 * remote-utils.c: Include target.h.
13237 (prepare_resume_reply): Change prototype to take a
13238 target_waitstatus. Adjust.
13239
13240 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13241 interface.
13242 * spu-low.c (spu_wait): Adjust.
13243 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13244 Delete.
13245 (win32_wait): Adjust.
13246
13247 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13248
13249 * target.h (struct thread_resume): Delete leave_stopped member.
13250 (struct target_ops): Add a `n' argument to the `resume' callback.
13251 * server.c (start_inferior): Adjust.
13252 (handle_v_cont, myresume): Adjust.
13253 * linux-low.c (check_removed_breakpoint): Adjust to resume
13254 interface change, and to removed leave_stopped field.
13255 (resume_ptr): Delete.
13256 (struct thread_resume_array): New.
13257 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13258 resume interface change.
13259 (linux_continue_one_thread, linux_queue_one_thread)
13260 (resume_status_pending_p): Check if the resume field is NULL
13261 instead of checking the leave_stopped member.
13262 (linux_resume): Adjust to the target resume interface change.
13263 * spu-low.c (spu_resume): Adjust to the target resume interface
13264 change.
13265 * win32-low.c (win32_detach, win32_resume): Ditto.
13266
13267 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13268
13269 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13270 flag.
13271 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13272 pending.
13273 (linux_continue_one_thread): Only preserve the stepping flag if
13274 there's a pending breakpoint.
13275
13276 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13277
13278 * server.c (main): After the inferior having exited, call
13279 remote_close before exiting gdbserver.
13280
13281 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13282
13283 Fix size of FPSCR in Power 7 processors.
13284 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13285 (PPC_FEATURE_HAS_DFP): New #define.
13286 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13287 size of the FPSCR.
13288
13289 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13290
13291 * server.c (handle_query) Whitespace and formatting.
13292
13293 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13294
13295 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13296 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13297 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13298 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13299 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13300 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13301 Makefile.in, configure.ac: Fix whitespace throughout.
13302 * configure: Regenerate.
13303
13304 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13305
13306 * inferiors.c (find_inferior): Make it safe for the callback
13307 function to delete the currently iterated inferior.
13308
13309 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13310
13311 * Makefile.in (linuw_low_h): Move higher.
13312 (thread-db.o): Depend on $(linux_low_h).
13313
13314 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13315
13316 Rename "process" to "lwp" throughout.
13317
13318 * linux-low.c (all_processes): Rename to...
13319 (all_lwps): ... this.
13320 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13321 (add_process): Rename to ...
13322 (add_lwp): ... this. Adjust.
13323 (linux_create_inferior): Adjust.
13324 (linux_attach_lwp): Adjust.
13325 (linux_attach): Adjust.
13326 (linux_kill_one_process): Rename to ...
13327 (linux_kill_one_lwp): ... this. Adjust.
13328 (linux_kill): Adjust.
13329 (linux_detach_one_process): Rename to ...
13330 (linux_detach_one_lwp): ... this. Adjust.
13331 (linux_detach): Adjust.
13332 (check_removed_breakpoint): Adjust.
13333 (status_pending_p): Adjust.
13334 (linux_wait_for_process): Rename to ...
13335 (linux_wait_for_lwp): ... this. Adjust.
13336 (linux_wait_for_event): Adjust.
13337 (send_sigstop): Adjust.
13338 (wait_for_sigstop): Adjust.
13339 (stop_all_processes): Rename to ...
13340 (stop_all_lwps): ... this.
13341 (linux_resume_one_process): Rename to ...
13342 (linux_resume_one_lwp): ... this. Adjust.
13343 (linux_set_resume_request, linux_continue_one_thread)
13344 (linux_queue_one_thread, resume_status_pending_p)
13345 (usr_store_inferior_registers, regsets_store_inferior_registers)
13346 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13347 Adjust.
13348 * linux-low.h (get_process): Rename to ...
13349 (get_lwp): ... this. Adjust.
13350 (get_thread_process): Rename to ...
13351 (get_thread_lwp): ... this. Adjust.
13352 (get_process_thread): Rename to ...
13353 (get_lwp_thread): ... this. Adjust.
13354 (struct process_info): Rename to ...
13355 (struct lwp_info): ... this.
13356 (all_processes): Rename to ...
13357 (all_lwps): ... this.
13358 * proc-service.c (ps_lgetregs): Adjust.
13359 * thread-db.c (thread_db_create_event, find_one_thread)
13360 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13361
13362 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13363
13364 * server.c (handle_query): Handle "qAttached".
13365
13366 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13367
13368 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13369 GPLv3, update license URL.
13370
13371 2009-03-01 Doug Evans <dje@google.com>
13372
13373 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13374 (server_h): Add gdb_signals.h.
13375 (signals.o): Update.
13376 * server.h (target_signal_from_host,target_signal_to_host_p)
13377 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13378
13379 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13380
13381 * remote-utils.c (getpkt): Also generate remote-debug
13382 information if noack_mode is set.
13383
13384 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13385
13386 * server.c (handle_query): Report qXfer:siginfo:read and
13387 qXfer:siginfo:write as supported and handle them.
13388 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13389 * linux-low.c (linux_xfer_siginfo): New.
13390 (linux_target_ops): Set it.
13391
13392 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13393
13394 * server.c (gdbserver_usage): Mention --remote-debug.
13395 (main): Accept '--remote-debug' switch.
13396
13397 2009-01-18 Doug Evans <dje@google.com>
13398
13399 * regcache.c (new_register_cache): No need to check result of xcalloc.
13400 * server.c (handle_search_memory): Back out calls to xmalloc,
13401 result is checked and error is returned to user upon failure.
13402 (handle_query): Ditto. Add more checks for result of malloc.
13403 (handle_v_cont): Check result of malloc, report error back to
13404 user upon failure.
13405 (handle_v_run): Ditto. Call freeargv.
13406 * server.h (freeargv): Declare.
13407 * utils.c (freeargv): New fn.
13408
13409 2009-01-15 Doug Evans <dje@google.com>
13410
13411 * gdbreplay.c (perror_with_name): Make arg const char *.
13412 * server.h (target_signal_to_name): Make return type const char *.
13413 * thread-db.c (thread_db_err_str): Make return type const char *.
13414 * utils.c (perror_with_name): Make arg const char *.
13415
13416 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13417
13418 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13419 when handling a EXIT_PROCESS_DEBUG_EVENT.
13420
13421 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13422
13423 * gdbreplay.c (gdbreplay_version): Update copyright year.
13424 * server.c (gdbserver_version): Likewise.
13425
13426 2009-01-05 Doug Evans <dje@google.com>
13427
13428 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13429 (handle_extended_wait): Improve comment.
13430
13431 2008-12-13 Doug Evans <dje@google.com>
13432
13433 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13434 * server.h (ATTR_MALLOC): New macro.
13435 (xmalloc,xcalloc,xstrdup): Declare.
13436 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13437 * inferiors.c: Ditto.
13438 * linux-low.c: Ditto.
13439 * mem-break.c: Ditto.
13440 * regcache.c: Ditto.
13441 * remote-utils.c: Ditto.
13442 * server.c: Ditto.
13443 * target.c: Ditto.
13444 * win32-low.c: Ditto.
13445
13446 2008-12-12 Doug Evans <dje@google.com>
13447
13448 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13449 in debugging printf.
13450
13451 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13452
13453 2008-12-09 Doug Evans <dje@google.com>
13454
13455 * linux-low.h (struct process_info): Delete member tid, unused.
13456 * thread-db.c (find_one_thread): Update.
13457 (maybe_attach_thread): Update.
13458
13459 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13460
13461 * target.h (struct target_ops): Add qxfer_osdata member.
13462 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13463 and dirent.h.
13464 (linux_qxfer_osdata): New functions.
13465 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13466 callback.
13467 * server.c (handle_query): Handle "qXfer:osdata:read:".
13468 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13469 (buffer_xml_printf): New functions.
13470 * server.h (struct buffer): New.
13471 (buffer_grow_str, buffer_grow_str0): New macros.
13472 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13473 (buffer_xml_printf): Declare.
13474
13475 2008-11-24 Doug Evans <dje@google.com>
13476
13477 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13478
13479 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13480
13481 * server.c (handle_v_run): Always use the supplied argument list.
13482
13483 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13484
13485 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13486 (xtensa_regmap_table): Add entry for scompare1.
13487
13488 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13489
13490 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13491 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13492 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13493 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13494 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13495 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13496 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13497 XML target descriptions.
13498 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13499 when inferior is running on an ISA 2.05 or later processor. Add
13500 special case to return offset for full 64-bit slot of FPSCR when
13501 in 32-bits.
13502
13503 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13504
13505 * Makefile.in (SFILES, clean): Added sparc64 files.
13506 (reg-sparc64.o, reg-sparc64.c): New.
13507 * configure.srv (sparc*-*-linux*): New configuration.
13508 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13509 syscall arguments for SPARC.
13510 (regsets_store_inferior_registers): Likewise.
13511 * linux-sparc-low.c: New file.
13512
13513 2008-10-21 Doug Evans <dje@google.com>
13514
13515 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13516 (READLINE_DIR,READLINE_DEP): Delete.
13517 (INTERNAL_CFLAGS): Update.
13518 (LINTFLAGS): Update.
13519
13520 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13521
13522 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13523 whole argv from the last run, not just argv[0].
13524
13525 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13526
13527 * regcache.c (new_register_cache): Return NULL if the register
13528 cache size isn't known yet.
13529 (free_register_cache): Avoid dereferencing a NULL regcache.
13530
13531 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13532
13533 * configure.srv: Merge MIPS and MIPS64.
13534
13535 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13536
13537 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13538
13539 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13540
13541 * Makefile.in: Add required vsx dependencies.
13542
13543 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13544 Declare init_registers_powerpc_vsx32l.
13545 Declare init_registers_powerpc_vsx64l.
13546 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13547 (ppc_arch_setup): Check for VSX in hwcap.
13548 (ppc_fill_vsxregset): New function.
13549 (ppc_store_vsxregset): New function.
13550 Add new VSX entry in regset_info target_regsets.
13551
13552 * configure.srv: Add new VSX dependencies.
13553
13554 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13555
13556 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13557 (remote_open): Set or clear transport_is_reliable.
13558 (putpkt_binary): Don't expect acks in noack mode.
13559 (getpkt): Don't send ack/nac in noack mode.
13560 * server.c (handle_general_set): Handle QStartNoAckMode.
13561 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13562 qSupported.
13563 (main): Reset noack_mode on every connection.
13564 * server.h (noack_mode): Declare.
13565
13566 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13567
13568 * Makefile.in (GDBREPLAY_OBS): New variable.
13569 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13570
13571 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13572 Daniel Jacobowitz <dan@codesourcery.com>
13573
13574 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13575 (usr_store_inferior_registers): Likewise.
13576 (regsets_store_inferior_registers): Likewise.
13577
13578 2008-07-31 Rolf Jansen <rj@surtec.com>
13579 Pedro Alves <pedro@codesourcery.com>
13580
13581 * configure.ac: Check for memmem declaration.
13582 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13583 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13584 (disable_packet_qfThreadInfo): Unconditionally compile.
13585 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13586 * configure, config.in: Regenerate.
13587
13588 2008-07-28 Doug Kwan <dougkwan@google.com>
13589
13590 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13591 (linux_write_memory): Remove declaration of errno.
13592
13593 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13594
13595 * linux-low.c (handle_extended_wait): Do not use "status"
13596 variable uninitialized.
13597
13598 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13599
13600 * server.c (handle_v_attach): Inhibit reporting dll changes.
13601
13602 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13603
13604 * remote-utils.c (prepare_resume_reply): If requested, don't
13605 output "thread:TID" in the T stop reply.
13606
13607 * server.c (disable_packet_vCont, disable_packet_Tthread)
13608 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13609 (handle_query): If requested, disable support for qC, qfThreadInfo
13610 and qsThreadInfo.
13611 (handle_v_requests): If requested, disable support for vCont.
13612 (gdbserver_show_disableable): New.
13613 (main): Handle --disable-packet and --disable-packet=LIST.
13614
13615 * server.h (disable_packet_vCont, disable_packet_Tthread)
13616 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13617
13618 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13619
13620 * server.c (gdbserver_usage): Mention --version.
13621
13622 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13623
13624 * Makefile.in (gdbreplay.o): New rule.
13625
13626 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13627
13628 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13629 message, not gdbserver.
13630
13631 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13632 Nathan Sidwell <nathan@codesourcery.com>
13633 Joseph Myers <joseph@codesourcery.com>
13634
13635 * acinclude.m4: Include ../../config/acx.m4.
13636 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13637 * configure, config.in: Regenerate.
13638 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13639 * server.c (gdbserver_version): Print PKGVERSION.
13640 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13641 (main): Adjust gdbserver_usage calls.
13642 * gdbreplay.c (version, host_name): Add declarations.
13643 (gdbreplay_version, gdbreplay_usage): New.
13644 (main): Accept --version and --help options.
13645
13646 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13647
13648 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13649 (arm_breakpoint_at): Handle Thumb.
13650 (the_low_target): Add comment.
13651
13652 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13653
13654 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13655
13656 2008-05-09 Doug Evans <dje@google.com>
13657
13658 * server.h (decode_search_memory_packet): Declare.
13659 * remote-utils.c (decode_search_memory_packet): New fn.
13660 * server.c (handle_search_memory_1): New fn.
13661 (handle_search_memory): New fn.
13662 (handle_query): Process qSearch:memory packets.
13663
13664 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13665
13666 * regcache.c (registers_length): Remove.
13667 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13668 full register packet.
13669 * regcache.h (registers_length): Remove prototype.
13670 * server.h (PBUFSIZ): Define to 16384.
13671
13672 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13673
13674 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13675 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13676 powerpc-64l.o, and powerpc-altivec64l.o.
13677 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13678 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13679 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13680 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13681 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13682 to srv_xmlfiles.
13683
13684 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13685 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13686 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13687 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13688 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13689 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13690 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13691 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13692 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13693 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13694 (clean): Update.
13695
13696 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13697 (init_registers_powerpc_32l): ... this new prototype.
13698 (init_registers_powerpc_32): Remove, replace by ...
13699 (init_registers_powerpc_altivec32l): ... this new prototype.
13700 (init_registers_powerpc_e500): Remove, replace by ...
13701 (init_registers_powerpc_e500l): ... this new prototype.
13702 (init_registers_ppc64): Remove, replace by ...
13703 (init_registers_powerpc_64l): ... this new prototype.
13704 (init_registers_powerpc_64): Remove, replace by ...
13705 (init_registers_powerpc_altivec64l): ... this new prototype.
13706 (ppc_num_regs): Set to 73.
13707 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13708 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13709 (ppc_cannot_store_register): Handle orig_r3 and trap.
13710 (ppc_arch_setup): Update init_registers_... calls.
13711 (ppc_fill_gregset): Handle orig_r3 and trap.
13712
13713 * inferiors.c (clear_inferiors): Reset current_inferior.
13714
13715 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13716
13717 * acinclude.m4: Add override.m4.
13718 * configure: Regenerate.
13719
13720 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13721
13722 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13723 initial call to init_register_ppc64.
13724
13725 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13726
13727 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13728 single powerpc*-*-linux* case.
13729 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13730
13731 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13732
13733 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13734 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13735 from reg_xmlfiles.
13736 * linux-ppc-low.c: Include <elf.h>.
13737 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13738 (ppc_hwcap): New global variable.
13739 (ppc_regmap): Remove __SPE__ #ifdef sections.
13740 (ppc_regmap_e500): New global variable.
13741 (ppc_cannot_store_register): Update __SPE__ special case.
13742 (ppc_get_hwcap): New function.
13743 (ppc_arch_setup): Use it to determine whether inferior supports
13744 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13745 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13746 Do not access registers if target does not support AltiVec.
13747 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13748 Do not access registers if target does not support SPE.
13749 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13750
13751 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13752
13753 * linux-low.c (disabled_regsets, num_regsets): New.
13754 (use_regsets_p): Delete.
13755 (linux_wait_for_process): Clear disabled_regsets.
13756 (regsets_fetch_inferior_registers): Check and set it.
13757 (regsets_store_inferior_registers): Likewise.
13758 (linux_fetch_registers, linux_store_registers): Do not use
13759 use_regsets_p.
13760 (initialize_low): Allocate disabled_regsets.
13761
13762 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13763
13764 * Makefile.in (LIBOBJS): New.
13765 (OBS): Use LIBOBJS.
13766 (memmem.o): New rule.
13767 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13768 * configure: Regenerated.
13769
13770 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13771
13772 * server.c (handle_query): Never return "unsupported" for
13773 qXfer:features:read queries.
13774
13775 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13776
13777 * server.c (get_features_xml): Fix inverted condition.
13778 (handle_query): Always support qXfer:feature:read.
13779
13780 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13781
13782 * server.c (wrapper_argv): New.
13783 (start_inferior): Handle wrapper_argv. If set, expect an extra
13784 trap.
13785 (gdbserver_usage): Document --wrapper.
13786 (main): Parse --wrapper.
13787
13788 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13789
13790 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13791 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13792 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13793 (ppc_set_pc): Likewise.
13794 (ppc_arch_setup): New function.
13795 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13796 of collect_register.
13797 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13798
13799 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13800
13801 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13802 instead of linux-ppc64-low.o.
13803 * linux-ppc64-low.c: Remove file.
13804 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13805 (linux-ppc64-low.o): Remove rule.
13806
13807 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13808 (init_registers_powerpc_64): Likewise.
13809 (ppc_regmap): Conditionally define depending on __powerpc64__.
13810 (ppc_cannot_store_register): Do not special-case "fpscr" when
13811 compiled on __powerpc64__.
13812 (ppc_collect_ptrace_register): New function.
13813 (ppc_supply_ptrace_register): New function.
13814 (ppc_breakpoint): Change type to "unsigned int".
13815 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13816 (the_low_target): Conditionally provide initializers for the
13817 arch_setup member depending on __powerpc64__. Install
13818 collect_ptrace_register and supply_ptrace_register members.
13819
13820 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13821
13822 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13823 * server.c (gdbserver_xmltarget): Define.
13824 (get_features_xml): Use it to replace "target.xml" and arch_string.
13825
13826 * configure.srv: Remove srv_xmltarget. Add XML files that were
13827 mentioned there to srv_xmlfiles instead. Remove conditional tests
13828 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13829 srv_xmlfiles and srv_regobj to include all possible choices.
13830 * configure.ac (srv_xmltarget): Remove.
13831 (srv_xmlfiles): Do not add "target.xml".
13832 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13833 checks for supplementary target information.
13834 * configure: Regenerate.
13835 * Makefile.in (XML_TARGET): Remove.
13836 (target.xml): Remove rule.
13837 (clean): Do not clean up target.xml.
13838 (.PRECIOUS): Do not mention target.xml.
13839
13840 * target.h (struct target_ops): Remove arch_string member.
13841 * linux-low.c (linux_arch_string): Remove.
13842 (linux_target_ops): Remove arch_string initializer.
13843 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13844 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13845 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13846 * spu-low.c (spu_arch_string): Remove.
13847 (spu_target_ops): Remove arch_string initializer.
13848 * win32-low.c (win32_arch_string): Remove.
13849 (win32_target_ops): Remove arch_string initializer.
13850 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13851 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13852 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13853
13854 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13855
13856 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13857 by collect_ptrace_register and supply_ptrace_register hooks.
13858 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13859 instead of checking for the_low_target.left_pad_xfer.
13860 (usr_store_inferior_registers): Use collect_ptrace_register callback
13861 instead of checking for the_low_target.left_pad_xfer.
13862
13863 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13864 (s390_supply_ptrace_register): Likewise.
13865 (s390_fill_gregset): Call s390_collect_ptrace_register.
13866 (the_low_target): Update.
13867
13868 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13869 (ppc_supply_ptrace_register): Likewise.
13870 (the_low_target): Update.
13871
13872 * linux-i386-low.c (the_low_target): Update.
13873 * linux-x86-64-low.c (the_low_target): Update.
13874
13875 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13876
13877 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13878 reg-s390.o and reg-s390x.o.
13879
13880 * linux-low.c (new_inferior): New global variable.
13881 (linux_create_inferior, linux_attach): Set it.
13882 (linux_wait_for_process): Call the_low_target.arch_setup after the
13883 target has stopped for the first time.
13884 (initialize_low): Do not call the_low_target.arch_setup.
13885
13886 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13887 (s390_set_pc): Likewise.
13888 (s390_arch_setup): New function.
13889 (the_low_target): Use s390_arch_setup as arch_setup routine.
13890
13891 * regcache.c (realloc_register_cache): New function.
13892 (set_register_cache): Call it for each existing regcache.
13893
13894 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13895
13896 * server.h (init_registers): Remove prototype.
13897
13898 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13899 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13900 instead of init_registers ().
13901 * linux-arm-low.c (init_registers_arm): Add prototype.
13902 (init_registers_arm_with_iwmmxt): Likewise.
13903 (the_low_target): Add initializer for arch_setup field.
13904 * linux-cris-low.c (init_registers_cris): Add prototype.
13905 (the_low_target): Add initializer for arch_setup field.
13906 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13907 (the_low_target): Add initializer for arch_setup field.
13908 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13909 (the_low_target): Add initializer for arch_setup field.
13910 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13911 (the_low_target): Add initializer for arch_setup field.
13912 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13913 (the_low_target): Add initializer for arch_setup field.
13914 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13915 (the_low_target): Add initializer for arch_setup field.
13916 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13917 (init_registers_mips64_linux): Likewise.
13918 (the_low_target): Add initializer for arch_setup field.
13919 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13920 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13921 (the_low_target): Add initializer for arch_setup field.
13922 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13923 (init_registers_powerpc_64): Likewise.
13924 (the_low_target): Add initializer for arch_setup field.
13925 * linux-s390-low.c (init_registers_s390): Add prototype.
13926 (init_registers_s390x): Likewise.
13927 (the_low_target): Add initializer for arch_setup field.
13928 * linux-sh-low.c (init_registers_sh): Add prototype.
13929 (the_low_target): Add initializer for arch_setup field.
13930 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13931 (the_low_target): Add initializer for arch_setup field.
13932 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13933 (the_low_target): Add initializer for arch_setup field.
13934
13935 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13936 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13937 instead of init_registers ().
13938 * win32-arm-low.c (init_registers_arm): Add prototype.
13939 (the_low_target): Add initializer for arch_setup field.
13940 * win32-i386-low.c (init_registers_i386): Add prototype.
13941 (the_low_target): Add initializer for arch_setup field.
13942
13943 * spu-low.c (init_registers_spu): Add prototype.
13944 (initialize_low): Call initialie_registers_spu () instead of
13945 initialize_registers ().
13946
13947 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13948
13949 * server.c (handle_v_requests): When handling the vRun and vAttach
13950 packets, if already debugging a process, don't kill it. Return an
13951 error instead.
13952
13953 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13954
13955 * server.c (handle_query): Correct length check.
13956
13957 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13958
13959 * win32-low.c (do_initial_child_stuff): Add process handle
13960 parameter. Set current_process_handle and current_process_id from the
13961 parameters. Clear globals.
13962 (win32_create_inferior): Don't set current_process_handle and
13963 current_process_id here. Instead pass them on the call to
13964 do_initial_child_stuff.
13965 (win32_attach): Likewise.
13966 (win32_clear_inferiors): New.
13967 (win32_kill): Don't close the current process handle or the
13968 current thread handle here. Instead call win32_clear_inferiors.
13969 (win32_detach): Don't open a new handle to the process. Call
13970 win32_clear_inferiors.
13971 (win32_join): Don't rely on current_process_handle; open a new
13972 handle using the process id.
13973 (win32_wait): Call win32_clear_inferiors when the inferior process
13974 has exited.
13975
13976 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13977
13978 * server.c (monitor_show_help): Add "exit".
13979
13980 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13981
13982 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13983 (clean): Add reg-xtensa.c.
13984 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13985 * configure.srv (xtensa*-*-linux*) New target.
13986 * linux-xtensa-low.c: New.
13987 * xtensa-xtregs.c: New.
13988
13989 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13990
13991 * hostio.c: Don't include errno.h.
13992 (errno_to_fileio_errno): Move to hostio-errno.
13993 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13994 error number outputting to the target->hostio_last_error callback.
13995 (hostio_packet_error): Use FILEIO_EINVAL directly.
13996 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13997 calls to hostio_error.
13998 * hostio-errno.c: New.
13999 * server.h (hostio_last_error_from_errno): Declare.
14000 * target.h (target_ops): Add hostio_last_error member.
14001 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14002 as hostio_last_error handler.
14003 * spu-low.c (spu_target_ops): Likewise.
14004 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14005 (wince_hostio_last_error): New functions.
14006 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14007 as hostio_last_error handler.
14008 (win32_target_ops) [!_WIN32_WCE]: Register
14009 hostio_last_error_from_errno as hostio_last_error handler.
14010 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14011 (hostio-errno.o): New rule.
14012 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14013 * configure.srv (srv_hostio_err_objs): New variable. Default to
14014 hostio-errno.o.
14015 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14016 * configure: Regenerate.
14017
14018 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14019
14020 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14021 (linux_kill, linux_detach): Clean up the process list.
14022 * remote-utils.c (remote_open): Improve port number parsing.
14023 (putpkt_binary, input_interrupt): Only send interrupts if the target
14024 is running.
14025 * server.c (extended_protocol): Make static.
14026 (attached): Define earlier.
14027 (exit_requested, response_needed, program_argv): New variables.
14028 (target_running): New.
14029 (start_inferior): Clear attached here.
14030 (attach_inferior): Set attached here.
14031 (require_running): Define.
14032 (handle_query): Use require_running and target_running. Implement
14033 "monitor exit".
14034 (handle_v_attach, handle_v_run): New.
14035 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14036 (gdbserver_usage): Update.
14037 (main): Redo argument parsing. Handle --debug and --multi. Handle
14038 --attach along with other options or after the port. Save
14039 program_argv. Support no initial program. Resynchronize
14040 communication with GDB after an error. Handle "monitor exit".
14041 Use require_running and target_running. Always allow the extended
14042 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14043 restart in extended mode.
14044 * README: Refer to the GDB manual. Update --attach usage.
14045
14046 2007-12-20 Andreas Schwab <schwab@suse.de>
14047
14048 * linux-low.c (STACK_SIZE): Define.
14049 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14050 (linux_test_for_tracefork): Likewise.
14051
14052 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14053
14054 * linux-low.c (linux_wait_for_event): Update messages. Do not
14055 reinsert auto-delete breakpoints.
14056 * mem-break.c (struct breakpoint): Change return type of handler to
14057 int.
14058 (set_breakpoint_at): Update handler type.
14059 (reinsert_breakpoint_handler): Return 1 instead of calling
14060 delete_breakpoint.
14061 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14062 setting a new one.
14063 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14064 * mem-break.h (set_breakpoint_at): Update handler type.
14065 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14066 * win32-low.c (auto_delete_breakpoint): New.
14067 (get_child_debug_event): Use it.
14068
14069 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14070
14071 * configure.ac: Check for pread and pwrite.
14072 * hostio.c (handle_pread): Fall back to lseek and read.
14073 (handle_pwrite): Fall back to lseek and write.
14074 * config.in, configure: Regenerated.
14075
14076 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14077
14078 * server.c (myresume): Add own_buf argument.
14079 (main): Update calls.
14080
14081 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14082
14083 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14084 * remote-utils.c (remote_open): Do not call disable_async_io.
14085 (block_async_io): Delete.
14086 (unblock_async_io): Make static.
14087 (initialize_async_io): New.
14088 * server.c (handle_v_cont): Handle async I/O here.
14089 (myresume): Likewise. Move other common resume tasks here...
14090 (main): ... from here. Call initialize_async_io. Disable async
14091 I/O before the main loop.
14092 * server.h (initialize_async_io): Declare.
14093 (block_async_io, unblock_async_io): Delete prototypes.
14094 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14095
14096 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14097
14098 * remote-utils.c (readchar): Allow binary data in received messages.
14099
14100 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14101
14102 * win32-low.c (attaching): New global.
14103 (win32_create_inferior): Clear the `attaching' global.
14104 (win32_attach): Set the `attaching' global.
14105 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14106 attaching. Only set a breakpoint at the entry point if not
14107 attaching.
14108
14109 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14110
14111 * server.c (main): Don't report dll events on the initial
14112 connection on attaches.
14113
14114 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14115
14116 * server.c (main): Relax numerical bases supported for the pid of
14117 the --attach command line argument.
14118
14119 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14120
14121 * win32-low.c (win32_attach): Call OpenProcess before
14122 DebugActiveProcess, not after. Add last error output to error
14123 call.
14124
14125 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14126
14127 * win32-low.c (win32_get_thread_context)
14128 (win32_set_thread_context): New functions.
14129 (thread_rec): Use win32_get_thread_context.
14130 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14131 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14132 field.
14133
14134 2007-12-03 Leo Zayas
14135 Pedro Alves <pedro_alves@portugalmail.pt>
14136
14137 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14138 global variables.
14139 (child_add_thread): Minor cleanup.
14140 (child_continue): Resume artificially suspended threads before
14141 calling ContinueDebugEvent.
14142 (suspend_one_thread): New.
14143 (fake_breakpoint_event): New.
14144 (get_child_debug_event): Change return type to int. Check here if
14145 gdb sent an interrupt request. If a soft interrupt was requested,
14146 fake a breakpoint event. Return 0 if there is no event to handle,
14147 and 1 otherwise.
14148 (win32_wait): Don't check here if gdb sent an interrupt request.
14149 Ensure there is a valid event to handle.
14150 (win32_request_interrupt): Add soft interruption method as last
14151 resort.
14152
14153 2007-12-03 Leo Zayas
14154 Pedro Alves <pedro_alves@portugalmail.pt>
14155
14156 * win32-low.h (win32_thread_info): Add descriptions to the
14157 structure members. Replace `suspend_count' counter by a
14158 `suspended' flag.
14159 * win32-low.c (thread_rec): Update condition of when to get the
14160 context from the inferior. Rely on ContextFlags being set if it
14161 has already been retrieved. Only suspend the inferior thread if
14162 we haven't already. Warn if that fails.
14163 (continue_one_thread): s/suspend_count/suspended/. Only call
14164 ResumeThread once. Warn if that fails.
14165
14166 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14167
14168 * win32-low.c (win32_wait): Don't read from the inferior when it
14169 has already exited.
14170
14171 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14172
14173 * Makefile.in (win32_low_h): New variable.
14174 (win32-low.o): Add dependency on $(win32_low_h).
14175 (win32-arm-low.o, win32-i386-low.o): New rules.
14176
14177 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14178
14179 * hostio.c: Correct copyright year.
14180
14181 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14182
14183 * Makefile.in (OBS): Add hostio.o.
14184 (hostio.o): New rule.
14185 * server.h (handle_vFile): Declare.
14186 * hostio.c: New file.
14187 * server.c (handle_v_requests): Take packet_len and new_packet_len
14188 for binary packets. Call handle_vFile.
14189 (main): Update call to handle_v_requests.
14190
14191 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14192
14193 * linux-low.c: Include <sched.h>.
14194
14195 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14196
14197 * linux-low.c (linux_tracefork_grandchild): New.
14198 (linux_tracefork_child): Use clone.
14199 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14200
14201 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14202
14203 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14204
14205 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14206
14207 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14208
14209 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14210
14211 * inferiors.c (change_inferior_id): Delete.
14212 (add_pid_to_list, pull_pid_from_list): New.
14213 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14214 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14215 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14216 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14217 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14218 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14219 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14220 (using_threads): Always set to 1.
14221 (handle_extended_wait): New.
14222 (add_process): Do not set TID.
14223 (linux_create_inferior): Set must_set_ptrace_flags.
14224 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14225 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14226 (linux_thread_alive): Rename TID argument to LWPID.
14227 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14228 (linux_wait_for_event): Do not use TID or check using_threads. Update
14229 call to dead_thread_notify. Call handle_extended_wait.
14230 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14231 (send_sigstop): Delete sigstop_sent.
14232 (wait_for_sigstop): Avoid TID.
14233 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14234 (linux_test_for_tracefork): New.
14235 (linux_lookup_signals): Use thread_db_active and
14236 linux_supports_tracefork_flag.
14237 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14238 * linux-low.h (get_process_thread): Avoid TID.
14239 (struct process_ifo): Move thread_known and tid to the end. Remove
14240 sigstop_sent.
14241 (linux_attach_lwp, thread_db_init): Update prototypes.
14242 * server.h (change_inferior_id): Delete prototype.
14243 (add_pid_to_list, pull_pid_from_list): New prototypes.
14244 * thread-db.c (thread_db_use_events): New.
14245 (find_first_thread): Rename to...
14246 (find_one_thread): ...this. Update callers and messages. Do not
14247 call fatal. Check thread_db_use_events. Do not call
14248 change_inferior_id or new_thread_notify.
14249 (maybe_attach_thread): Update. Do not call new_thread_notify.
14250 (thread_db_init): Set thread_db_use_events. Check use_events.
14251 * utils.c (fatal, warning): Correct message prefix.
14252
14253 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14254
14255 * Makefile.in (clean): Remove new files.
14256 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14257 (powerpc-64.o, powerpc-64.c): New rules.
14258 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14259 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14260 with SPE.
14261 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14262 SPE targets.
14263 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14264 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14265 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14266 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14267 (target_regsets): Add AltiVec and SPE register sets.
14268 * configure.ac: Check for AltiVec and SPE.
14269 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14270 (ppc_fill_vrregset, ppc_store_vrregset): New.
14271 (target_regsets): Add AltiVec register set.
14272 * configure: Regenerated.
14273
14274 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14275
14276 * linux-low.c (O_LARGEFILE): Define.
14277 (linux_read_memory): Use /proc/PID/mem.
14278 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14279 * configure, config.in: Regenerated.
14280
14281 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14282
14283 * linux-low.c (linux_wait_for_event): Do not pass signals while
14284 single-stepping.
14285
14286 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14287
14288 * win32-low.c (create_process): New.
14289 (win32_create_inferior): Use create_process instead of
14290 CreateProcess. If create_process failed retry appending an ".exe"
14291 suffix. Store the GetLastError result immediatelly after
14292 create_process calls and use it on the call to error.
14293
14294 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14295
14296 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14297
14298 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14299
14300 * configure.ac: Switch license to GPLv3.
14301
14302 2007-08-01 Michael Snyder <msnyder@access-company.com>
14303
14304 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14305
14306 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14307
14308 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14309 typedef.
14310 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14311 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14312 CloseToolhelp32Snapshot.
14313 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14314 CloseToolhelp32Snapshot.
14315
14316 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14317
14318 * server.c (main): Check for inferior exit before main loop.
14319
14320 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14321
14322 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14323 instead of on tmp_desc.
14324
14325 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14326 Daniel Jacobowitz <dan@codesourcery.com>
14327
14328 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14329 (add_thread): Minor cleanups.
14330 (clear_inferiors): Move lower in the file. Clear the DLL
14331 list.
14332 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14333 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14334 (xml_escape_text): New.
14335 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14336 for qSupported.
14337 (handle_v_cont): Report errors.
14338 (gdbserver_version): Update.
14339 (main): Correct size of own_buf. Do not report initial DLL events.
14340 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14341 (unloaded_dll, xml_escape_text): New.
14342 * win32-low.c (enum target_waitkind): Update comments.
14343 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14344 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14345 (win32_EnumProcessModules, win32_GetModuleInformation)
14346 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14347 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14348 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14349 (win32_Module32First, win32_Module32Next, load_toolhelp)
14350 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14351 (get_child_debug_event): Handle DLL events.
14352 (win32_wait): Likewise.
14353
14354 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14355
14356 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14357 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14358
14359 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14360
14361 * win32-low.c (handle_output_debug_string): Ignore event if not
14362 waiting.
14363
14364 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14365
14366 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14367
14368 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14369
14370 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14371
14372 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14373
14374 * inferiors.c (change_inferior_id): Add comment.
14375 * linux-low.c (check_removed_breakpoint): Add an early
14376 prototype. Improve debug output.
14377 (linux_attach): Doc update.
14378 (linux_detach_one_process, linux_detach): Clean up before releasing
14379 each process.
14380 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14381 * linux-low.h (struct process_info): Doc improvement.
14382 * mem-break.c (delete_all_breakpoints): New.
14383 * mem-break.h (delete_all_breakpoints): New prototype.
14384 * thread-db.c (find_first_thread): New.
14385 (thread_db_create_event): Call it instead of
14386 thread_db_find_new_threads. Clean up unused variables.
14387 (maybe_attach_thread): Remove first thread handling.
14388 (thread_db_find_new_threads): Use find_first_thread.
14389 (thread_db_get_tls_address): Likewise.
14390
14391 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14392
14393 * thread-db.c (thread_db_find_new_threads): Add prototype.
14394 (thread_db_create_event): Check for the main thread before adding
14395 a new thread.
14396 (maybe_attach_thread): Only enable event reporting if TID == 0.
14397 (thread_db_get_tls_address): Check for new threads.
14398
14399 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14400
14401 * linux-low.c (linux_create_inferior): Try execv before execvp.
14402 * spu-low.c (spu_create_inferior): Likewise.
14403
14404 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14405
14406 * linux-low.c (linux_create_inferior): Change execv to execvp.
14407 * spu-low.c (spu_create_inferior): Likewies.
14408
14409 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14410
14411 * Makefile.in (clean): Clean new files instead of deleted ones.
14412 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14413 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14414 rules.
14415 * configure.srv: Specify XML files and new regformats for MIPS and
14416 MIPS64 GNU/Linux.
14417 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14418 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14419 an entry for the restart register.
14420 (mips_cannot_fetch_register, mips_cannot_store_register)
14421 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14422 register names to match the XML descriptions.
14423 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14424 restart register instead of $0.
14425
14426 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14427 Markus Deuling <deuling@de.ibm.com>
14428
14429 * remote-utils.c (decode_xfer_write): New function.
14430 * server.h (decode_xfer_write): Add prototype.
14431 * server.c (handle_query): Add PACKET_LEN argument. Support
14432 qXfer:spu:read and qXfer:spu:write packets.
14433 (main): Pass packet_len to handle_query.
14434 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14435 * target.h (target_ops): Add qxfer_spu.
14436
14437 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14438
14439 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14440 accessing non-seekable spufs files.
14441
14442 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14443
14444 * server.c (handle_query): Add reply for qC packet.
14445
14446 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14447 Leo Zayas <lerele@champenstudios@com>
14448
14449 * server.h (check_remote_input_interrupt_request): New function.
14450 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14451 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14452 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14453 (check_remote_input_interrupt_request): New function.
14454 * server.h (check_remote_input_interrupt_request): Declare.
14455 * win32-low.c (winapi_DebugBreakProcess,
14456 winapi_GenerateConsoleCtrlEvent): New typedefs.
14457 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14458 to 250 ms.
14459 (win32_wait): Check for remote interrupt request
14460 with check_remote_input_interrupt_request.
14461 (win32_request_interrupt): New function.
14462 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14463
14464 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14465
14466 * win32-low.c (debug_registers_changed,
14467 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14468 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14469 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14470 (thread_rec): Get context using the low target.
14471 (child_add_thread): Call thread_added on the low target,
14472 which does the same thing.
14473 (regptr): Delete.
14474 (do_initial_child_stuff): Remove debug registers references.
14475 Set context using the low target. Resume threads after
14476 setting the contexts.
14477 (child_continue): Remove dead variable. Remove debug
14478 registers references.
14479 (child_fetch_inferior_registers): Go through the low target.
14480 (do_child_store_inferior_registers): Remove.
14481 (child_store_inferior_registers): Go through the low target.
14482 (win32_resume): Remove debug registers references.
14483 Set context using the low target.
14484 (handle_exception): Change return type to void. Don't record
14485 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14486 first chance exception.
14487 (get_child_debug_event): Change return type to void. Remove
14488 goto loop. Always return after waiting for debug event.
14489 (win32_wait): Convert to switch statement. Handle spurious
14490 events.
14491
14492 * win32-i386-low.c (debug_registers_changed,
14493 debug_registers_used): New.
14494 (initial_stuff): Rename to ...
14495 (i386_initial_stuff): ... this. Clear debug registers
14496 state variables.
14497 (store_debug_registers): Delete.
14498 (i386_get_thread_context): New.
14499 (load_debug_registers): Delete.
14500 (i386_set_thread_context): New.
14501 (i386_thread_added): New.
14502 (single_step): Rename to ...
14503 (i386_single_step): ... this.
14504 (do_fetch_inferior_registers): Rename to ...
14505 (i386_fetch_inferior_register): ... this.
14506 (i386_store_inferior_register): New.
14507 (the_low_target): Adapt to new interface.
14508
14509 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14510 (arm_get_thread_context): New.
14511 (arm_set_thread_context): New.
14512 (regptr): New.
14513 (do_fetch_inferior_registers): Rename to ...
14514 (arm_fetch_inferior_register): ... this.
14515 (arm_store_inferior_register): New.
14516 (arm_wince_breakpoint): Reimplement as unsigned long.
14517 (arm_wince_breakpoint_len): Define.
14518 (the_low_target): Adapt to new interface.
14519
14520 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14521 load_debug_registers. Add get_thread_context, set_thread_context,
14522 thread_added and store_inferior_register. Rename
14523 fetch_inferior_registers to fetch_inferior_register.
14524 (regptr): Remove declaration.
14525
14526 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14527
14528 * linux-low.c (linux_detach): Change return type to int. Return 0.
14529 * spu-low.c (spu_detach): Likewise.
14530
14531 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14532
14533 * target.h (target_ops): Change return type of detach to int.
14534 Add join.
14535 (join_inferior): New.
14536 * server.c (main): Don't skip detach support on mingw32.
14537 If the inferior doesn't support detaching return error.
14538 Call join_inferior instead of using waitpid.
14539 * linux-low.c (linux_join): New.
14540 (linux_target_op): Add linux_join.
14541 * spu-low.c (spu_join): New.
14542 (spu_target_ops): Add spu_join.
14543 * win32-low.c (win32_detach): Adapt to new interface.
14544 Reopen current_process_handle before detaching. Issue a child
14545 resume before detaching.
14546 (win32_join): New.
14547 (win32_target_op): Add win32_join.
14548
14549 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14550
14551 * win32-low.c (win32-attach): Fix return value.
14552 * target.h (target_ops): Describe ATTACH return values.
14553
14554 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14555
14556 * win32-low.c (GETPROCADDRESS): Define.
14557 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14558 (winapi_DebugSetProcessKillOnExit): Likewise.
14559 (win32_create_inferior): Force usage of ansi CreateProcessA.
14560 (win32_attach): Use GETPROCADDRESS.
14561 (win32_detach): Likewise.
14562
14563 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14564
14565 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14566
14567 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14568
14569 * win32-low.c: Commit leftover changes from 2007-03-29.
14570
14571 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14572
14573 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14574 fields short instead of int. Add explicit padding.
14575 (i387_cache_to_fsave): Remove unnecessary casts.
14576 (i387_fsave_to_cache): Doc fix.
14577 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14578
14579 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14580
14581 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14582 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14583
14584 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14585
14586 * configure.srv (arm*-*-mingw32ce*): Move near the other
14587 arm targets.
14588
14589 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14590
14591 * configure.ac: Add errno checking.
14592 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14593 sys/file.h and malloc.h.
14594 (AC_CHECK_DECLS): Add perror.
14595 (srv_mingwce): Handle.
14596 * configure.srv (i[34567]86-*-cygwin*): Add
14597 win32-i386-low.o to srv_tgtobj.
14598 (i[34567]86-*-mingw*): Likewise.
14599 (arm*-*-mingw32ce*): Add case.
14600 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14601 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14602 [__MINGW32CE__] (strerror): New function.
14603 [__MINGW32CE__] (errno): Define to GetLastError.
14604 [__MINGW32CE__] (COUNTOF): New macro.
14605 (remote_open): Remove extra close call.
14606 * mem-break.c (delete_breakpoint_at): New function.
14607 * mem-break.h (delete_breakpoint_at): Declare.
14608 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14609 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14610 [USE_WIN32API] (read, write): Add char* casts.
14611 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14612 * server.h: Include wincecompat.h on Windows CE.
14613 [HAVE_ERRNO_H]: Check.
14614 (perror): Declare if not declared.
14615 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14616 (perror_with_name): Remove errno declaration.
14617 * wincecompat.h: New.
14618 * wincecompat.c: New.
14619 * win32-low.h: New.
14620 * win32-arm-low.c: New.
14621 * win32-i386-low.c: New.
14622 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14623 (OUTMSG2): Make it safe.
14624 (_T): New macro.
14625 (COUNTOF): New macro.
14626 (NUM_REGS): Get it from the low target.
14627 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14628 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14629 (thread_rec): Let low target handle debug registers.
14630 (child_add_thread): Likewise.
14631 (child_init_thread_list): Likewise.
14632 (continue_one_thread): Likewise.
14633 (regptr): New.
14634 (do_child_fetch_inferior_registers): Move to ...
14635 * win32-i386-low.c: ... here, and rename to ...
14636 (do_fetch_inferior_registers): ... this.
14637 * win32-low.c (child_fetch_inferior_registers):
14638 Go through the low target.
14639 (do_child_store_inferior_registers): Use regptr.
14640 (strwinerror): New function.
14641 (win32_create_inferior): Handle Windows CE.
14642 Use strwinerror instead of strerror on Windows error
14643 codes. Add program to the error output.
14644 Don't close the main thread handle on Windows CE.
14645 (win32_attach): Use coredll.dll on Windows CE.
14646 (win32_kill): Close current process and current
14647 thread handles.
14648 (win32_detach): Use coredll.dll on Windows CE.
14649 (win32_resume): Let low target handle debug registers, and
14650 step request.
14651 (handle_exception): Add/Remove initial breakpoint. Avoid
14652 non-existant WSTOPSIG on Windows CE.
14653 (win32_read_inferior_memory): Cast to remove warning.
14654 (win32_arch_string): Go through the low target.
14655 (initialize_low): Call set_breakpoint_data with the low
14656 target's breakpoint.
14657 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14658 FOP_REGNUM, mappings): Move to ...
14659 * win32-i386-low.c: ... here.
14660 * win32-low.c (win32_thread_info): Move to ...
14661 * win32-low.h: ... here.
14662 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14663 win32-arm-low.c and wincecompat.c.
14664 (all:): Add $EXEEXT.
14665 (install-only:): Likewise.
14666 (gdbserver:): Likewise.
14667 (gdbreplay:): Likewise.
14668 * config.in: Regenerate.
14669 * configure: Regenerate.
14670
14671 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14672
14673 * win32-low.c: Rename typedef thread_info to
14674 win32_thread_info throughout.
14675
14676 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14677
14678 * win32-i386-low.c: Rename to ...
14679 * win32-low.c: ... this.
14680 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14681 * Makefile.in: Likewise.
14682
14683 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14684
14685 * remote-utils.c (monitor_output): Constify msg parameter.
14686 * server.h (monitor_output): Likewise.
14687 * win32-i386-low.c (handle_output_debug_string): New.
14688 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14689 handle_output_debug_string.
14690 (get_child_debug_event): Likewise.
14691
14692 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14693
14694 * server.c (main): Correct strtoul check.
14695
14696 2007-03-27 Jon Ringle <jon@ringle.org>
14697
14698 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14699
14700 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14701
14702 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14703
14704 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14705
14706 * terminal.h: Check HAVE_SGTTY_H.
14707
14708 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14709
14710 * remote-utils.c (remote_open): Print out the assigned port number.
14711
14712 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14713
14714 * remote-utils.c (monitor_output): New function.
14715 * server.c (debug_threads): Define here.
14716 (monitor_show_help): New function.
14717 (handle_query): Handle qRcmd.
14718 (main): Do not handle 'd' packet.
14719 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14720 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14721 of debug_threads.
14722
14723 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14724
14725 * Makefile.in (EXEEXT): New.
14726 (clean): Use $(EXEEXT).
14727
14728 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14729
14730 * target.h (target_ops): Rename send_signal to request_interrupt,
14731 and remove enum target_signal parameter.
14732 * linux-low.c (linux_request_interrupt): Rename from
14733 linux_send_signal, and always send SIGINT.
14734 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14735 and always send SIGINT.
14736 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14737 of send_signal.
14738 (input_interrupt): Likewise.
14739
14740 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14741
14742 * server.c (get_features_xml): Check if target implemented
14743 arch_string.
14744 * win32-i386-low.c (win32_arch_string): New.
14745 (win32_target_ops): Add win32_arch_string as arch_string member.
14746
14747 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14748
14749 * spu-low.c (spu_arch_string): New.
14750 (spu_target_ops): Add spu_arch_string.
14751
14752 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14753
14754 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14755 * configure.ac: Do not check for terminal.h.
14756 * configure, config.in: Regenerated.
14757
14758 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14759
14760 * Makefile.in (OBS): Add $(XML_BUILTIN).
14761 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14762 (clean): Update.
14763 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14764 (arm-with-iwmmxt.c): New.
14765 * config.in, configure: Regenerate.
14766 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14767 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14768 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14769 (arm*-*-linux*): Add iWMMXt and regset support.
14770 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14771 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14772 (arm_store_wmmxregset, target_regsets): New.
14773 * server.c (get_features_xml): Take annex argument. Check builtin
14774 XML documents.
14775 (handle_query): Handle multiple annexes.
14776
14777 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14778
14779 * remote-utils.c [USE_WIN32API] (read, write): Define.
14780 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14781 write.
14782
14783 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14784
14785 * linux-i386-low.c (the_low_target): Set arch_string.
14786 * linux-x86-64-low.c (the_low_target): Likewise.
14787 * linux-low.c (linux_arch_string): New.
14788 (linux_target_ops): Add it.
14789 * linux-low.h (struct linux_target_ops): Add arch_string.
14790 * server.c (write_qxfer_response): Use const void * for DATA.
14791 (get_features_xml): New.
14792 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14793 * target.h (struct target_ops): Add arch_string method.
14794
14795 2007-01-03 Denis Pilat <denis.pilat@st.com>
14796 Daniel Jacobowitz <dan@codesourcery.com>
14797
14798 * linux-low.c (linux_kill): Handle being called with no threads.
14799 * win32-i386-low.c (win32_kill): Likewise.
14800 (get_child_debug_event): Clear current_process_handle.
14801
14802 2006-12-30 Denis PILAT <denis.pilat@st.com>
14803 Daniel Jacobowitz <dan@codesourcery.com>
14804
14805 * remote-utils.c (remote_open): Check the type of specified
14806 serial port devices before opening them.
14807 * server.c (main): Kill the inferior if an error occurs during
14808 the first remote_open.
14809
14810 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14811
14812 * README: Update supported targets.
14813
14814 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14815
14816 * Makefile.in (clean): Remove reg-mips64.c.
14817 (reg-mips64.c, reg-mips64.o): New rules.
14818 * configure.srv: Handle mips64. Include regset support for mips.
14819 * linux-mips-low.c (union mips_register): New.
14820 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14821 (mips_breakpoint, mips_breakpoint_at): Use int.
14822 (mips_collect_register, mips_supply_register)
14823 (mips_collect_register_32bit, mips_supply_register_32bit)
14824 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14825 (mips_store_fpregset, target_regsets): New.
14826 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14827
14828 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14829
14830 * configure.srv: Add target "spu*-*-*".
14831 * Makefile.in (clean): Remove reg-spu.c.
14832 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14833 * spu-low.c: New file.
14834
14835 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14836
14837 * configure.ac: Correct td_thr_tls_get_addr test.
14838 * configure: Regenerated.
14839
14840 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14841
14842 * linux-low.c (linux_wait_for_event): Reformat. Use the
14843 pass_signals array.
14844 * remote-utils.c (decode_address_to_semicolon): New.
14845 * server.c (pass_signals, handle_general_set): New.
14846 (handle_query): Mention QPassSignals for qSupported.
14847 (main): Call handle_general_set.
14848 * server.h (pass_signals, decode_address_to_semicolon): New.
14849
14850 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14851
14852 * server.c (handle_query): Correct error handling for read_auxv.
14853
14854 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14855
14856 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14857 and srv_linux_thread_db to yes.
14858 * linux-s390-low.c (s390_fill_gregset): New function.
14859 (target_regsets): Define data structure.
14860
14861 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14862
14863 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14864 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14865 * config.in, configure: Regenerated.
14866 * inferiors.c (gdb_id_to_thread): New function.
14867 (gdb_id_to_thread_id): Use it.
14868 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14869 * linux-low.h (struct process_info): Add th member.
14870 (thread_db_get_tls_address): New prototype.
14871 * remote-utils.c (decode_address): Make non-static.
14872 * server.c (handle_query): Handle qGetTLSAddr.
14873 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14874 * target.h (struct target_ops): Add get_tls_address.
14875 * thread-db.c (maybe_attach_thread): Save the thread handle.
14876 (thread_db_get_tls_address): New.
14877
14878 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14879
14880 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14881 (linux_resume_one_process): Take a siginfo_t *. Update all
14882 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14883 (struct pending_signals): Add a siginfo_t.
14884 (linux_wait_for_process): Always set last_status.
14885 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14886 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14887 * linux-low.h (struct process_info): Add last_status.
14888
14889 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14890
14891 * remote-utils.c (try_rle): New function.
14892 (putpkt_binary): Use it.
14893
14894 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14895
14896 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14897 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14898 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14899 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14900 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14901 point registers.
14902
14903 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14904
14905 * server.c (terminal_fd): New variable.
14906 (old_foreground_pgrp): Likewise.
14907 (restore_old_foreground_pgrp): New function.
14908 (start_inferior): Record the terminal file descriptor in terminal_fd
14909 and its original foreground group in old_foreground_pgrp. Register
14910 restore_old_foreground_pgrp with atexit().
14911
14912 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14913
14914 * server.c (handle_query): Correct qPart to qXfer.
14915
14916 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14917
14918 * configure.ac: Check for more headers which are missing on
14919 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14920 * configure.srv: Add Cygwin and mingw32.
14921 * remote-utils.c: Don't include headers unconditionally which
14922 are missing on mingw32. Include <winsock.h> for mingw32.
14923 (remote_open): Adjust for mingw32 support. Flush
14924 standard error after writing to it.
14925 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14926 (unblock_async_io, enable_async_io, disable_async_io)
14927 (readchar, getpkt): Update for Winsock support.
14928 (prepare_resume_reply): Expect a protocol signal number.
14929 * server.c: Disable <sys/wait.h> on mingw32.
14930 (start_inferior): Adjust for mingw32 support. Flush
14931 standard error after writing to it.
14932 (attach_inferior): Likewise. Use protocol signal
14933 numbers.
14934 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14935 and names.
14936 * win32-i386-low.c: New file.
14937 * Makefile.in (XM_CLIBS): Set.
14938 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14939 (win32-i386-low.o): New dependency rule.
14940 * linux-low.c (linux_wait): Use target signal numbers.
14941 * target.h (struct target_ops): Doc fix.
14942 * server.h (target_signal_to_name): New prototype.
14943 * gdbreplay.c: Don't include headers unconditionally which
14944 are missing on mingw32. Include <winsock.h> for mingw32.
14945 (remote_close, remote_open): Adjust for Winsock support.
14946 * configure, config.in: Regenerated.
14947
14948 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14949
14950 * server.c (decode_xfer_read, write_qxfer_response): New.
14951 (handle_query): Take a packet length argument. Handle
14952 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14953 the qSupported response.
14954 (main): Update call to handle_query.
14955
14956 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14957
14958 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14959 (putpkt_binary): Renamed from putpkt and adjusted for binary
14960 data.
14961 (putpkt): New wrapper for putpkt_binary.
14962 (readchar): Don't mask off the high bit.
14963 (decode_X_packet): New function.
14964 * server.c (main): Call putpkt_binary if a handler sets the packet
14965 length. Save the length of the incoming packet. Handle 'X'.
14966 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14967
14968 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14969
14970 * server.c (handle_query): Handle qSupported.
14971
14972 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14973
14974 * remote-utils.c (all_symbols_looked_up): New variable.
14975 (look_up_one_symbol): Check it.
14976 * server.h (look_up_one_symbol): New declaration.
14977 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14978
14979 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14980
14981 * Makefile.in (linux-arm-low.o): Update dependencies.
14982 * linux-arm-low.c: Include "gdb_proc_service.h".
14983 (PTRACE_GET_THREAD_AREA): Define.
14984 (ps_get_thread_area): New function.
14985
14986 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14987
14988 * configure.srv (m68k*-*-uclinux*): New target.
14989 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14990 (linux_resume_one_process): Remove extraneous cast.
14991 (linux_read_offsets): New.
14992 (linux_target_op): Add linux_read_offsets on mmuless systems.
14993 * server.c (handle_query): Add qOffsets logic.
14994 * target.h (struct target_ops): Add read_offsets.
14995
14996 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14997
14998 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14999 (PTRACE_GET_THREAD_AREA): Define.
15000 (ps_get_thread_area): New function.
15001 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15002 (linux-x86-64-low.o): Update.
15003
15004 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15005
15006 * configure.ac: Remove checks for prfpregset_t.
15007 * gdb_proc_service.h: New file.
15008 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15009 new "gdb_proc_service.h".
15010 * proc-service.c: Likewise.
15011 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15012 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15013 * Makefile.in (gdb_proc_service_h): Updated.
15014 * configure, config.in: Regenerated.
15015
15016 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15017
15018 * remote-utils.c (prepare_resume_reply): Move declaration
15019 of gdb_id_from_wait to the top of the block.
15020
15021 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15022
15023 * linux-low.c (regsets_store_inferior_registers): Read the regset
15024 from the target before filling it.
15025
15026 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15027
15028 * server.c (attach_inferior): Return SIGTRAP for a successful
15029 attach.
15030
15031 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15032
15033 * Makefile.in (OBS): Add version.o.
15034 (STAGESTUFF): Delete.
15035 (version.o): Add dependencies.
15036 (version.c): Replace rule.
15037 (clean): Remove version.c.
15038 * server.c (gdbserver_version): New.
15039 (gdbserver_usage): Use printf.
15040 (main): Handle --version and --help.
15041 * server.h (version, host_name): Add declarations.
15042
15043 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15044
15045 * linux-arm-low.c:
15046 * linux-arm-low.c:
15047 * inferiors.c:
15048 * i387-fp.h:
15049 * i387-fp.c:
15050 * gdbreplay.c:
15051 * regcache.c:
15052 * proc-service.c:
15053 * mem-break.h:
15054 * mem-break.c:
15055 * linux-x86-64-low.c:
15056 * linux-sh-low.c:
15057 * linux-s390-low.c:
15058 * linux-ppc64-low.c:
15059 * linux-ppc-low.c:
15060 * linux-mips-low.c:
15061 * linux-m68k-low.c:
15062 * linux-m32r-low.c:
15063 * linux-low.h:
15064 * linux-low.c:
15065 * linux-ia64-low.c:
15066 * linux-i386-low.c:
15067 * linux-crisv32-low.c:
15068 * thread-db.c:
15069 * terminal.h:
15070 * target.h:
15071 * target.c:
15072 * server.h:
15073 * server.c:
15074 * remote-utils.c:
15075 * regcache.h:
15076 * utils.c:
15077 * Makefile.in:
15078 * configure.ac:
15079 * gdbserver.1: Add (C) after Copyright. Update the FSF
15080 address.
15081
15082 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15083
15084 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15085 (arm_breakpoint_at): Recognize both breakpoints.
15086 (the_low_target): Use the correct breakpoint instruction.
15087
15088 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15089
15090 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15091 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15092 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15093 (the_low_target): Update.
15094
15095 2005-10-25 Andreas Schwab <schwab@suse.de>
15096
15097 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15098
15099 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15100 (ia64_num_regs): Reduce to 462.
15101
15102 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15103
15104 * acinclude.m4: Correct quoting.
15105 * aclocal.m4: Regenerated.
15106
15107 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15108 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15109 (thread_db_init): Call thread_db_err_str.
15110 * configure.ac: Check for TD_VERSION.
15111 * config.in, configure: Regenerated.
15112
15113 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15114
15115 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15116
15117 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15118
15119 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15120 is not available. Define HAVE_PTRACE_GETREGS if it is.
15121 * config.in, configure: Regenerated.
15122 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15123 * linux-i386-low.c, linux-m68k-low.c: Update to use
15124 HAVE_PTRACE_GETREGS.
15125 * linux-low.c (regsets_fetch_inferior_registers)
15126 (regsets_store_inferior_registers): Only return 0 if we processed
15127 GENERAL_REGS.
15128 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15129 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15130
15131 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15132
15133 * inferiors.c (struct thread_info): Add gdb_id.
15134 (add_thread): Add gdb_id argument.
15135 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15136 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15137 calls to add_thread.
15138 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15139 * server.c (handle_query): Use thread_to_gdb_id.
15140 (handle_v_cont, main): Use gdb_id_to_thread_id.
15141 * server.h (add_thread): Update prototype.
15142 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15143 prototypes.
15144
15145 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15146
15147 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15148 left-padded registers.
15149 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15150 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15151
15152 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15153
15154 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15155 * configure: Regenerate.
15156 * config.in: Regenerate.
15157 * server.h (NEED_DECLARATION_STRERROR):
15158 Replace with !HAVE_DECL_STRERROR.
15159
15160 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15161
15162 * linux-low.c (linux_wait, linux_send_signal): Don't test
15163 an unsigned long variable for > 0 if it could be MAX_ULONG.
15164 * server.c (myresume): Likewise.
15165 * target.c (set_desired_inferior): Likewise.
15166
15167 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15168
15169 * configure.ac: Simplify and improve check for socklen_t.
15170 * configure, config.in: Regenerate.
15171
15172 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15173
15174 * acconfig.h: Remove.
15175 * configure.ac: Add a test for socklen_t. Use three-argument
15176 AC_DEFINE throughout.
15177 * config.in: Regenerated using autoheader 2.59.
15178 * configure: Regenerated.
15179
15180 * gdbreplay.c (socklen_t): Provide a default.
15181 (remote_open): Use socklen_t.
15182 * remote-utils.c (socklen_t): Provide a default.
15183 (remote_open): Use socklen_t.
15184 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15185 unsigned char.
15186
15187 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15188 char for buffers.
15189 * linux-low.c (linux_read_memory, linux_write_memory)
15190 (linux_read_auxv): Likewise.
15191 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15192 (check_mem_write): Likewise.
15193 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15194 Likewise.
15195 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15196 (registers_from_string, register_data): Likewise.
15197 * server.c (handle_query, main): Likewise.
15198 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15199 (decode_M_packet): Likewise.
15200 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15201 * target.h (struct target_ops): Update read_memory, write_memory,
15202 and read_auxv.
15203 (read_inferior_memory, write_inferior_memory): Update.
15204 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15205 to unsigned char *.
15206 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15207 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15208 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15209 linux-s390-low.c, linux-sh-low.c: Update for changes in
15210 read_inferior_memory and the_low_target->breakpoint.
15211
15212 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15213
15214 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15215 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15216 * configure.srv: Add powerpc64-*-linux*.
15217 * linux-ppc64-low.c: New file.
15218
15219 2005-05-23 Orjan Friberg <orjanf@axis.com>
15220
15221 * linux-cris-low.c: New file with support for CRIS.
15222 * linux-crisv32-low.c: Ditto for CRISv32.
15223 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15224 (clean): Add reg-cris.c and reg-crisv32.c.
15225 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15226 reg-crisv32.o, and reg-crisv32.c to make rules.
15227 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15228 recognized targets.
15229
15230 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15231
15232 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15233 of sizeof (PTRACE_XFER_TYPE).
15234 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15235
15236 2005-05-12 Orjan Friberg <orjanf@axis.com>
15237
15238 * target.h (struct target_ops): Add insert_watchpoint,
15239 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15240 pointers for hardware watchpoint support.
15241 * linux-low.h (struct linux_target_ops): Ditto.
15242 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15243 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15244 to linux_target_ops.
15245 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15246 reply packet.
15247 * server.c (main): Recognize 'Z' and 'z' packets.
15248
15249 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15250
15251 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15252 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15253 (the_low_target): Add new members.
15254
15255 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15256
15257 * proc-service.c (ps_lgetregs): Search all_processes instead of
15258 all_threads.
15259
15260 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15261
15262 * server.c (start_inferior): Change return type to int.
15263 (attach_inferior): Change sigptr to int *.
15264 (handle_v_cont, handle_v_requests): Change signal to int *.
15265 (main): Change signal to int.
15266
15267 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15268
15269 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15270 * configure.srv: Add m32r*-*-linux*.
15271 * linux-m32r-low.c: New file.
15272
15273 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15274
15275 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15276
15277 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15278
15279 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15280 Take unsigned long arguments for PIDs.
15281 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15282 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15283 (wait_for_sigstop, linux_resume_one_process)
15284 (regsets_fetch_inferior_registers, linux_send_signal)
15285 (linux_read_auxv): Likewise. Update the types of variables holding
15286 PIDs. Update format string specifiers.
15287 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15288 * remote-utils.c (prepare_resume_reply): Likewise.
15289 * server.c (cont_thread, general_thread, step_thread)
15290 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15291 unsigned long.
15292 (handle_query): Update format specifiers.
15293 (handle_v_cont, main): Use strtoul for thread IDs.
15294 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15295 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15296 (general_thread, step_thread, thread_from_wait)
15297 (old_thread_from_wait): Update.
15298 * target.h (struct thread_resume): Use unsigned long for THREAD.
15299 (struct target_ops): Use unsigned long for arguments to attach and
15300 thread_alive.
15301
15302 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15303
15304 * acinclude.m4: Include bfd/bfd.m4 directly.
15305 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15306 <agriffis@toolchain.org>.
15307 * aclocal.m4, configure: Regenerated.
15308
15309 2005-01-07 Andrew Cagney <cagney@gnu.org>
15310
15311 * configure.ac: Rename configure.in, require autoconf 2.59.
15312 * configure: Re-generate.
15313
15314 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15315
15316 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15317 LIBS when finished.
15318 * aclocal.m4: Regenerated.
15319 * configure: Regenerated.
15320
15321 2004-11-21 Andreas Schwab <schwab@suse.de>
15322
15323 * linux-m68k-low.c (m68k_num_gregs): Define.
15324 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15325 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15326 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15327 (m68k_breakpoint_at): New. Add to the_low_target.
15328
15329 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15330 srv_linux_thread_db to yes.
15331
15332 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15333
15334 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15335 (ARCH_SET_FS): Likewise.
15336 (ARCH_GET_FS): Likewise.
15337 (ARCH_GET_GS): Likewise.
15338
15339 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15340
15341 * linux-i386-low.c (ps_get_thread_area): New.
15342 * linux-x86-64-low.c (ps_get_thread_area): New.
15343 * linux-low.c: Include <sys/syscall.h>.
15344 (linux_kill_one_process): Don't kill the first thread here.
15345 (linux_kill): Kill the first thread here.
15346 (kill_lwp): New function.
15347 (send_sigstop, linux_send_signal): Use it.
15348 * proc-service.c: Clean up #ifdefs.
15349 (fpregset_info): Delete.
15350 (ps_lgetregs): Update and enable implementation.
15351 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15352 implementations.
15353 * remote-utils.c (struct sym_cache, symbol_cache): New.
15354 (input_interrupt): Print a clearer message.
15355 (async_io_enabled): New variable.
15356 (enable_async_io, disable_async_io): Use it. Update comments.
15357 (look_up_one_symbol): Use the symbol cache.
15358 * thread-db.c (thread_db_look_up_symbols): New function.
15359 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15360
15361 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15362
15363 * configure.in: Test for -rdynamic.
15364 * configure: Regenerated.
15365 * Makefile (INTERNAL_LDFLAGS): New.
15366 (gdbserver, gdbreplay): Use it.
15367
15368 2004-09-02 Andrew Cagney <cagney@gnu.org>
15369
15370 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15371
15372 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15373
15374 * linux-low.c (linux_wait): Clear all_processes list also.
15375
15376 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15377
15378 * linux-low.c: Include <errno.h>. Remove extern declaration of
15379 errno.
15380
15381 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15382
15383 * gdbreplay.c, server.h, utils.c: Update copyright years.
15384
15385 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15386
15387 * server.c (main): Print child status or termination signal from
15388 variable 'signal', not 'sig'.
15389
15390 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15391
15392 * linux-low.c (linux_read_memory): Change return type to
15393 int. Check for and return error from ptrace().
15394 * target.c (read_inferior_memory): Change return type to int. Pass
15395 back return status from the_target->read_memory().
15396 * target.h (struct target_ops): Adapt *read_memory() prototype.
15397 Update comment.
15398 (read_inferior_memory): Adapt prototype.
15399 * server.c (main): Return an error packet if
15400 read_inferior_memory() returns an error.
15401
15402 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15403
15404 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15405 Unify with other clean targets.
15406
15407 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15408
15409 * server.c (handle_v_cont): Call set_desired_inferior.
15410
15411 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15412
15413 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15414
15415 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15416
15417 * linux-low.c (linux_wait): Unblock async I/O.
15418 (linux_resume): Block and enable async I/O.
15419 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15420 * server.h (block_async_io, unblock_async_io): Add prototypes.
15421
15422 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15423
15424 * remote-utils.c (remote_open): Print a status notice after
15425 opening a TCP port.
15426 * server.c (attach_inferior): Print a status notice after
15427 attaching.
15428
15429 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15430
15431 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15432
15433 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15434
15435 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15436 error packet.
15437 * server.c, target.h: Update copyright years.
15438
15439 2004-02-25 Roland McGrath <roland@redhat.com>
15440
15441 * target.h (struct target_ops): New member `read_auxv'.
15442 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15443 * linux-low.c (linux_read_auxv): New function.
15444 (linux_target_ops): Initialize `read_auxv' member to that.
15445
15446 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15447
15448 Committed by Jim Blandy <jimb@redhat.com>.
15449
15450 * linux-s390-low.c (s390_num_regs): Update.
15451 (s390_regmap): Remove control registers. Use __s390x__ predefine
15452 instead of GPR_SIZE to distiguish s390 and s390x targets.
15453
15454 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15455
15456 * linux-low.c: Update copyright year.
15457 (check_removed_breakpoint): Clear pending_is_breakpoint.
15458 (linux_set_resume_request, linux_queue_one_thread)
15459 (resume_status_pending_p): New functions.
15460 (linux_continue_one_thread): Use process->resume.
15461 (linux_resume): Only resume threads if there are no pending events.
15462 * linux-low.h (struct process_info): Add resume request
15463 pointer.
15464
15465 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15466
15467 * regcache.c (new_register_cache): Clear the allocated register
15468 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15469
15470 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15471
15472 * linux-low.c (linux_resume): Take a struct thread_resume *
15473 argument.
15474 (linux_wait): Update call.
15475 (resume_ptr): New static variable.
15476 (linux_continue_one_thread): Renamed from
15477 linux_continue_one_process. Use resume_ptr.
15478 (linux_resume): Use linux_continue_one_thread.
15479 * server.c (handle_v_cont, handle_v_requests): New functions.
15480 (myresume): New function.
15481 (main): Handle 'v' case.
15482 * target.h (struct thread_resume): New type.
15483 (struct target_ops): Change argument of "resume" to struct
15484 thread_resume *.
15485 (myresume): Delete macro.
15486
15487 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15488
15489 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15490 (uninstall): Support DESTDIR.
15491
15492 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15493
15494 * configure.srv: Add xscale*linux copy of arm*linux entry.
15495
15496 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15497
15498 * linux-arm-low.c (arm_reinsert_addr): New function.
15499 (the_low_target): Add arm_reinsert_addr.
15500
15501 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15502
15503 * mem-break.c: Remove whitespace at end of file.
15504
15505 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15506
15507 * configure.in: Check whether we need to prototype strerror.
15508 * server.h: Optionally prototype strerror.
15509 * gdbreplay.c (perror_with_name): Use strerror.
15510 * linux-low.c (linux_attach_lwp): Use strerror.
15511 * utils.c (perror_with_name): Use strerror.
15512 * config.in, configure: Regenerated.
15513
15514 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15515
15516 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15517 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15518
15519 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15520
15521 * Makefile.in (SFILES): Update.
15522 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15523 low-sun3.c: Remove files.
15524
15525 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15526
15527 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15528 (linux_detach_one_process, linux_detach): New functions.
15529 (linux_target_ops): Add linux_detach.
15530 * server.c (main): Handle 'D' packet.
15531 * target.h (struct target_ops): Add "detach" member.
15532 (detach_inferior): Define.
15533
15534 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15535
15536 From Kelley Cook <kelleycook@wideopenwest.com>:
15537 * configure.srv: Accept i[34567]86 variants.
15538
15539 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15540
15541 * linux-low.c (linux_wait_for_event): Correct comment typos.
15542 (linux_resume_one_process): Call check_removed_breakpoint.
15543 (linux_send_signal): New function.
15544 (linux_target_ops): Add linux_send_signal.
15545 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15546 of kill.
15547 * target.h (struct target_ops): Add send_signal.
15548
15549 2003-05-29 Jim Blandy <jimb@redhat.com>
15550
15551 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15552 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15553 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15554 away part of the register's value.
15555
15556 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15557
15558 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15559 (linux_wait_for_event, linux_init_signals): Likewise.
15560
15561 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15562
15563 * configure.in: Check for stdlib.h.
15564 * configure: Regenerated.
15565 * config.in: Regenerated.
15566
15567 2003-01-04 Andreas Schwab <schwab@suse.de>
15568
15569 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15570
15571 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15572
15573 * Makefile.in: Remove obsolete code.
15574
15575 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15576
15577 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15578 defined(PT_FPR0_HI).
15579
15580 2002-11-17 Stuart Hughes <seh@zee2.com>
15581
15582 * linux-arm-low.c (arm_num_regs): Increase.
15583 (arm_regmap): Include status register.
15584
15585 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15586
15587 * linux-low.c (register_addr): Remove incorrect -1 check.
15588
15589 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15590
15591 * linux-low.c (linux_create_inferior): Call setpgid. Return
15592 the new PID.
15593 (unstopped_p, linux_signal_pid): Remove.
15594 (linux_target_ops): Remove linux_signal_pid.
15595 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15596 global instead of target method.
15597 * target.h (struct target_ops): Remove signal_pid. Update comment
15598 for create_inferior.
15599 * server.c (signal_pid): New variable.
15600 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15601 gdbserver. Set the child to be the foreground process group.
15602 (attach_inferior): Set signal_pid.
15603
15604 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15605
15606 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15607
15608 2002-08-20 Jim Blandy <jimb@redhat.com>
15609
15610 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15611 default for this.
15612
15613 2002-08-01 Andrew Cagney <cagney@redhat.com>
15614
15615 * Makefile.in: Make chill references obsolete.
15616
15617 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15618
15619 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15620 * configure: Regenerate.
15621 * config.in: Regenerate.
15622
15623 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15624
15625 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15626 (perror_with_name, remote_close, remote_open, expect, play): Static.
15627
15628 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15629
15630 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15631 byte offsets instead of an array of indexes.
15632 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15633
15634 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15635
15636 * regcache.c: Add comment.
15637
15638 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15639
15640 * thread-db.c: New file.
15641 * proc-service.c: New file.
15642 * acinclude.m4: New file.
15643 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15644 proc-service.o, and thread-db.o.
15645 (linux-low.o): Add USE_THREAD_DB.
15646 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15647 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15648 * aclocal.m4: Regenerated.
15649 * config.in: Regenerated.
15650 * configure: Regenerated.
15651 * configure.in: Check for proc_service.h, sys/procfs.h,
15652 thread_db.h, and linux/elf.h headrs.
15653 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15654 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15655 Check for -lthread_db and thread support.
15656 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15657 PowerPC, and SuperH.
15658 * i387-fp.c: Constify arguments.
15659 * i387-fp.h: Likewise.
15660 * inferiors.c: (struct thread_info): Renamed from
15661 `struct inferior_info'. Remove PID member. Use generic inferior
15662 list header. All uses updated.
15663 (inferiors, signal_pid): Removed.
15664 (all_threads): New variable.
15665 (get_thread): Define.
15666 (add_inferior_to_list): New function.
15667 (for_each_inferior): New function.
15668 (change_inferior_id): New function.
15669 (add_inferior): Removed.
15670 (remove_inferior): New function.
15671 (add_thread): New function.
15672 (free_one_thread): New function.
15673 (remove_thread): New function.
15674 (clear_inferiors): Use for_each_inferior and free_one_thread.
15675 (find_inferior): New function.
15676 (find_inferior_id): New function.
15677 (inferior_target_data): Update argument type.
15678 (set_inferior_target_data): Likewise.
15679 (inferior_regcache_data): Likewise.
15680 (set_inferior_regcache_data): Likewise.
15681 * linux-low.c (linux_bp_reinsert): Remove.
15682 (all_processes, stopping_threads, using_thrads)
15683 (struct pending_signals, debug_threads, pid_of): New.
15684 (inferior_pid): Replace with macro.
15685 (struct inferior_linux_data): Remove.
15686 (get_stop_pc, add_process): New functions.
15687 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15688 Use add_process and add_thread.
15689 (linux_attach_lwp): New function, based on old linux_attach. Use
15690 add_process and add_thread. Set stop_expected for new threads.
15691 (linux_attach): New function.
15692 (linux_kill_one_process): New function.
15693 (linux_kill): Kill all LWPs.
15694 (linux_thread_alive): Use find_inferior_id.
15695 (check_removed_breakpoints, status_pending_p): New functions.
15696 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15697 Update. Use WNOHANG. Wait for cloned processes also. Update process
15698 struct for the found process.
15699 (linux_wait_for_event): New function.
15700 (linux_wait): Use it. Support LWPs.
15701 (send_sigstop, wait_for_sigstop, stop_all_processes)
15702 (linux_resume_one_process, linux_continue_one_process): New functions.
15703 (linux_resume): Support LWPs.
15704 (REGISTER_RAW_SIZE): Remove.
15705 (fetch_register): Use register_size instead. Call supply_register.
15706 (usr_store_inferior_registers): Likewise. Call collect_register.
15707 Fix recursive case.
15708 (regsets_fetch_inferior_registers): Improve error message.
15709 (regsets_store_inferior_registers): Add debugging.
15710 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15711 (unstopped_p, linux_signal_pid): New functions.
15712 (linux_target_ops): Add linux_signal_pid.
15713 (linux_init_signals): New function.
15714 (initialize_low): Call it. Initialize using_threads.
15715 * regcache.c (inferior_regcache_data): Add valid
15716 flag.
15717 (get_regcache): Fetch registers lazily. Add fetch argument
15718 and update all callers.
15719 (regcache_invalidate_one, regcache_invalidate): New
15720 functions.
15721 (new_register_cache): Renamed from create_register_cache.
15722 Return the new regcache.
15723 (free_register_cache): Change argument to a void *.
15724 (registers_to_string, registers_from_string): Call get_regcache
15725 with fetch flag set.
15726 (register_data): Make static. Pass fetch flag to get_regcache.
15727 (supply_register): Call get_regcache with fetch flag clear.
15728 (collect_register): Call get_regcache with fetch flag set.
15729 (collect_register_as_string): New function.
15730 * regcache.h: Update.
15731 * remote-utils.c (putpkt): Flush after debug output and use
15732 stderr.
15733 Handle input interrupts while waiting for an ACK.
15734 (input_interrupt): Use signal_pid method.
15735 (getpkt): Flush after debug output and use stderr.
15736 (outreg): Use collect_register_as_string.
15737 (new_thread_notify, dead_thread_notify): New functions.
15738 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15739 and general_thread.
15740 (look_up_one_symbol): Flush after debug output.
15741 * server.c (step_thread, server_waiting): New variables.
15742 (start_inferior): Don't use signal_pid. Update call to mywait.
15743 (attach_inferior): Update call to mywait.
15744 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15745 (main): Don't fetch/store registers explicitly. Use
15746 set_desired_inferior. Support proposed ``Hs'' packet. Update
15747 calls to mywait.
15748 * server.h: Update.
15749 (struct inferior_list, struct_inferior_list_entry): New.
15750 * target.c (set_desired_inferior): New.
15751 (write_inferior_memory): Constify.
15752 (mywait): New function.
15753 * target.h: Update.
15754 (struct target_ops): New signal_pid method.
15755 (mywait): Removed macro, added prototype.
15756
15757 * linux-low.h (regset_func): Removed.
15758 (regset_fill_func, regset_store_func): New.
15759 (enum regset_type): New.
15760 (struct regset_info): Add type field. Use new operation types.
15761 (struct linux_target_ops): stop_pc renamed to get_pc.
15762 Add decr_pc_after_break and breakpoint_at.
15763 (get_process, get_thread_proess, get_process_thread)
15764 (strut process_info, all_processes, linux_attach_lwp)
15765 (thread_db_init): New.
15766
15767 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15768 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15769 (the_low_target): Add new members.
15770 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15771 (i386_store_fpxregset): Constify.
15772 (target_regsets): Add new kind identifier.
15773 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15774 (i386_set_pc): Add debugging.
15775 (i386_breakpoint_at): New function.
15776 (the_low_target): Add new members.
15777 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15778 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15779 (mips_breakpoint_at): New.
15780 (the_low_target): Add new members.
15781 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15782 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15783 (the_low_target): Add new members.
15784 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15785 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15786 (the_low_target): Add new members.
15787 * linux-x86-64-low.c (target_regsets): Add new kind
15788 identifier.
15789
15790 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15791
15792 From Martin Pool <mbp@samba.org>:
15793 * server.c (gdbserver_usage): New function.
15794 (main): Call it.
15795
15796 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15797
15798 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15799 stop_at -> stop_pc.
15800
15801 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15802
15803 * Makefile.in: Remove obsolete code.
15804
15805 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15806
15807 * linux-low.c (regsets_fetch_inferior_registers),
15808 (regsets_store_inferior_registers): Removed cast to int from
15809 ptrace() calls.
15810 * regcache.h: Added declaration of struct inferior_info.
15811
15812 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15813
15814 * inferiors.c (struct inferior_info): Add regcache_data.
15815 (add_inferior): Call create_register_cache.
15816 (clear_inferiors): Call free_register_cache.
15817 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15818 * regcache.c (struct inferior_regcache_data): New.
15819 (registers): Remove.
15820 (get_regcache): New function.
15821 (create_register_cache, free_register_cache): New functions.
15822 (set_register_cache): Don't initialize the register cache here.
15823 (registers_to_string, registers_from_string, register_data): Call
15824 get_regcache.
15825 * regcache.h: Add prototypes.
15826 * server.h: Likewise.
15827
15828 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15829
15830 * mem-break.c: New file.
15831 * mem-break.h: New file.
15832 * Makefile.in: Add mem-break.o rule; update server.h
15833 dependencies.
15834 * inferiors.c (struct inferior_info): Add target_data
15835 member.
15836 (clear_inferiors): Free target_data member if set.
15837 (inferior_target_data, set_inferior_target_data): New functions.
15838 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15839 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15840 * linux-low.c (linux_bp_reinsert): New variable.
15841 (struct inferior_linux_data): New.
15842 (linux_create_inferior): Use set_inferior_target_data.
15843 (linux_attach): Likewise. Call add_inferior.
15844 (linux_wait_for_one_inferior): New function.
15845 (linux_wait): Call it.
15846 (linux_write_memory): Add const.
15847 (initialize_low): Call set_breakpoint_data.
15848 * linux-low.h (struct linux_target_ops): Add breakpoint
15849 handling members.
15850 * server.c (attach_inferior): Remove extra add_inferior
15851 call.
15852 * server.h: Include mem-break.h. Update inferior.c
15853 prototypes.
15854 * target.c (read_inferior_memory)
15855 (write_inferior_memory): New functions.
15856 * target.h (read_inferior_memory)
15857 (write_inferior_memory): Change macros to prototypes.
15858 (struct target_ops): Update comments. Add const to write_memory
15859 definition.
15860
15861 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15862
15863 * linux-low.c (usr_store_inferior_registers): Support
15864 registers which are allowed to fail to store.
15865 * linux-low.h (linux_target_ops): Likewise.
15866 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15867 (ppc_cannot_store_register): FPSCR may not be storable.
15868
15869 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15870
15871 * server.h: Include <string.h> if HAVE_STRING_H.
15872 * ChangeLog: Correct paths in last ChangeLog entry.
15873
15874 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15875
15876 * linux-low.h: Remove obsolete prototypes.
15877 (struct linux_target_ops): New.
15878 (extern the_low_target): New.
15879 * linux-low.c (num_regs, regmap): Remove declarations.
15880 (register_addr): Use the_low_target explicitly.
15881 (fetch_register): Likewise.
15882 (usr_fetch_inferior_registers): Likewise.
15883 (usr_store_inferior_registers): Likewise.
15884 * linux-arm-low.c (num_regs): Remove.
15885 (arm_num_regs): Define.
15886 (arm_regmap): Renamed from regmap, made static.
15887 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15888 made static.
15889 (arm_cannot_store_register): Renamed from cannot_store_register,
15890 made static.
15891 (the_low_target): New.
15892 * linux-i386-low.c (num_regs): Remove.
15893 (i386_num_regs): Define.
15894 (i386_regmap): Renamed from regmap, made static.
15895 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15896 made static.
15897 (i386_cannot_store_register): Renamed from cannot_store_register,
15898 made static.
15899 (the_low_target): New.
15900 * linux-ia64-low.c (num_regs): Remove.
15901 (ia64_num_regs): Define.
15902 (ia64_regmap): Renamed from regmap, made static.
15903 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15904 made static.
15905 (ia64_cannot_store_register): Renamed from cannot_store_register,
15906 made static.
15907 (the_low_target): New.
15908 * linux-m68k-low.c (num_regs): Remove.
15909 (m68k_num_regs): Define.
15910 (m68k_regmap): Renamed from regmap, made static.
15911 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15912 made static.
15913 (m68k_cannot_store_register): Renamed from cannot_store_register,
15914 made static.
15915 (the_low_target): New.
15916 * linux-mips-low.c (num_regs): Remove.
15917 (mips_num_regs): Define.
15918 (mips_regmap): Renamed from regmap, made static.
15919 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15920 made static.
15921 (mips_cannot_store_register): Renamed from cannot_store_register,
15922 made static.
15923 (the_low_target): New.
15924 * linux-ppc-low.c (num_regs): Remove.
15925 (ppc_num_regs): Define.
15926 (ppc_regmap): Renamed from regmap, made static.
15927 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15928 made static.
15929 (ppc_cannot_store_register): Renamed from cannot_store_register,
15930 made static.
15931 (the_low_target): New.
15932 * linux-s390-low.c (num_regs): Remove.
15933 (s390_num_regs): Define.
15934 (s390_regmap): Renamed from regmap, made static.
15935 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15936 made static.
15937 (s390_cannot_store_register): Renamed from cannot_store_register,
15938 made static.
15939 (the_low_target): New.
15940 * linux-sh-low.c (num_regs): Remove.
15941 (sh_num_regs): Define.
15942 (sh_regmap): Renamed from regmap, made static.
15943 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15944 made static.
15945 (sh_cannot_store_register): Renamed from cannot_store_register,
15946 made static.
15947 (the_low_target): New.
15948 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15949 (the_low_target): New.
15950
15951 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15952
15953 * Makefile.in: Add stamp-h target.
15954 * configure.in: Create stamp-h.
15955 * configure: Regenerated.
15956
15957 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15958
15959 * inferiors.c: New file.
15960 * target.c: New file.
15961 * target.h: New file.
15962 * Makefile.in: Add target.o and inferiors.o. Update
15963 dependencies.
15964 * linux-low.c (inferior_pid): New static variable,
15965 moved from server.c.
15966 (linux_create_inferior): Renamed from create_inferior.
15967 Call add_inferior. Return 0 on success instead of a PID.
15968 (linux_attach): Renamed from myattach.
15969 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15970 (linux_thread_alive): Renamed from mythread_alive.
15971 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15972 child dies.
15973 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15974 (regsets_store_inferior_registers): Correct error message.
15975 Add missing ``return 0''.
15976 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15977 (linux_store_registers): Renamed from store_inferior_registers.
15978 (linux_read_memory): Renamed from read_inferior_memory.
15979 (linux_write_memory): Renamed from write_inferior_memory.
15980 (linux_target_ops): New structure.
15981 (initialize_low): Call set_target_ops ().
15982 * remote-utils.c (unhexify): New function.
15983 (hexify): New function.
15984 (input_interrupt): Send signals to ``signal_pid''.
15985 * server.c (inferior_pid): Remove.
15986 (start_inferior): Update create_inferior call.
15987 (attach_inferior): Call add_inferior.
15988 (handle_query): New function.
15989 (main): Call handle_query for `q' packets.
15990 * server.h: Include "target.h". Remove obsolete prototypes.
15991 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15992
15993 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15994
15995 * Makefile.in: Add WARN_CFLAGS. Update configury
15996 dependencies.
15997 * configure.in: Check for <string.h>
15998 * configure: Regenerate.
15999 * config.in: Regenerate.
16000 * gdbreplay.c: Include needed system headers.
16001 (remote_open): Remove strchr prototype.
16002 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16003 * regcache.c (supply_register): Change buf argument to const void *.
16004 (supply_register_by_name): Likewise.
16005 (collect_register): Change buf argument to void *.
16006 (collect_register_by_name): Likewise.
16007 * regcache.h: Add missing prototypes.
16008 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16009 * server.c (handle_query): New function.
16010 (attached): New static variable, moved out of main.
16011 (main): Quiet longjmp clobber warnings.
16012 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16013 * utils.c (error): Remove NORETURN.
16014 (fatal): Likewise.
This page took 0.432516 seconds and 4 git commands to generate.