967dff0dc0ba4fb95d6d739c81c3ed7481d6c49e
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * linux-mips-low.c (update_watch_registers_callback): Return
4 void, remove pid_p parameter, don't check for pid.
5 (mips_insert_point, mips_remove_point): Use for_each_thread.
6
7 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
8
9 * lynx.low (lynx_delete_thread_callback): Remove.
10 (lynx_mourn): Use for_each_thread.
11
12 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
13
14 * regcache.c (regcache_invalidate_one): Remove.
15 (regcache_invalidate_pid): use for_each_thread.
16
17 2017-11-26 Tom Tromey <tom@tromey.com>
18
19 * linux-low.c (linux_create_inferior): Update.
20
21 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
22
23 * spu-low.c (spu_create_inferior): Fix typo in argument name.
24
25 2017-11-24 Alan Hayward <alan.hayward@arm.com>
26
27 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
28 * linux-aarch64-low.c (initialize_low_arch): Call init func.
29 * linux-aarch64-tdesc-selftest.c: New file.
30 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
31
32 2017-11-24 Alan Hayward <alan.hayward@arm.com>
33
34 * configure.srv: Add new file.
35 * linux-aarch64-low.c (initialize_low_arch): Call init func.
36 * linux-aarch64-tdesc-selftest.c: New file.
37 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
38
39 2017-11-24 Alan Hayward <alan.hayward@arm.com>
40
41 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
42 * linux-aarch64-low.c (initialize_low_arch): Remove init.
43 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
44
45 2017-11-24 Alan Hayward <alan.hayward@arm.com>
46
47 * configure.srv: Add new files.
48 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
49 aarch64_linux_read_description.
50 * linux-aarch64-low.c (aarch64_linux_read_description):
51 Merge with aarch64_arch_setup.
52 (aarch64_arch_setup): Call aarch64_linux_read_description.
53 * linux-aarch64-tdesc.c: New file.
54 * linux-aarch64-tdesc.h: New file.
55
56 2017-11-24 Yao Qi <yao.qi@linaro.org>
57
58 * configure.srv: Set $srv_regobj for tic6x-linux.
59 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
60 (tic6x_read_description): Move some code to tic6x_arch_setup.
61 (tic6x_tdesc_test): New function.
62 (initialize_low_arch): Call selftests::register_test.
63
64 2017-11-22 Yao Qi <yao.qi@linaro.org>
65
66 * remote-utils.c (prepare_resume_reply): Use memcpy.
67
68 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
69
70 * linux-low.c (kill_one_lwp_callback): Return void, take
71 argument directly, don't filter on pid.
72 (linux_kill): Use for_each_thread.
73
74 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
75
76 * linux-low.c (need_step_over_p): Return bool, remove dummy
77 argument.
78 (linux_resume, proceed_all_lwps): Use find_thread.
79
80 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
81
82 * linux-low.c (resume_status_pending_p): Return bool, remove
83 flag_p argument.
84 (linux_resume): Use find_thread.
85
86 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
87
88 * linux-low.c (struct thread_resume_array): Remove.
89 (linux_set_resume_request): Return void, take arguments
90 directly.
91 (linux_resume): Use for_each_thread.
92
93 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
94
95 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
96 return bool, remove data argument.
97 (linux_stabilize_threads): Use find_thread.
98
99 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
100
101 * linux-low.c (unsuspend_one_lwp): Remove.
102 (unsuspend_all_lwps): Use for_each_thread, inline code from
103 unsuspend_one_lwp.
104
105 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
106
107 * gdbthread.h (find_thread): Add overload with ptid_t filter.
108 * linux-low.c (struct iterate_over_lwps_args): Remove.
109 (iterate_over_lwps_filter): Remove.
110 (iterate_over_lwps): Use find_thread.
111
112 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
113
114 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
115 (linux_handle_new_gdb_connection): Use for_each_thread, inline
116 code from reset_lwp_ptrace_options_callback.
117
118 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
119
120 * linux-arm-low.c (struct update_registers_data): Remove.
121 (update_registers_callback): Return void, take arguments
122 directly, don't check thread's pid.
123 (arm_insert_point, arm_remove_point): Use for_each_thread.
124
125 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
126
127 * win32-low.c (continue_one_thread): Return void, take argument
128 directly.
129 (child_continue): Use for_each_thread.
130
131 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
132
133 * win32-i386-low.c (update_debug_registers_callback): Rename
134 to ...
135 (update_debug_registers): ... this, return void, remove pid_p arg.
136 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
137
138 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
139
140 * inferiors.h (struct process_info): Add constructor, initialize
141 fields..
142 <syscalls_to_catch>: Change type to std::vector<int>.
143 * inferiors.c (add_process): Allocate process_info with new.
144 (remove_process): Free process_info with delete.
145 * linux-low.c (handle_extended_wait): Adjust.
146 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
147 * server.c (handle_general_set): Adjust.
148
149 2017-11-16 Pedro Alves <palves@redhat.com>
150
151 * remote-utils.c (remote_close): Block SIGIO signals instead of
152 uninstalling the SIGIO handler.
153
154 2017-11-16 Alan Hayward <alan.hayward@arm.com>
155
156 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
157
158 2017-11-16 Yao Qi <yao.qi@linaro.org>
159
160 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
161 (tic6x_store_gregset): Likewise.
162 (tic6x_usrregs_info): Move it up.
163
164 2017-11-15 Alan Hayward <alan.hayward@arm.com>
165
166 * Makefile.in: Update arch rules.
167 * configure.srv: Explicitly mark arch/ files.
168
169 2017-11-13 Andreas Schwab <schwab@suse.de>
170
171 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
172 function.
173 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
174
175 2017-11-06 Pedro Alves <palves@redhat.com>
176
177 * config.in, configure: Regenerate.
178
179 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
180
181 * target.c (struct thread_search): Remove.
182 (thread_search_callback): Remove.
183 (prepare_to_access_memory): Use for_each_thread instead of
184 find_inferior. Inline code from thread_search_callback.
185
186 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
187
188 * server.c (struct visit_actioned_threads_data): Remove.
189 (visit_actioned_threads): Change prototype to take arguments
190 directly.
191 (resume): Use find_thread instead of find_inferior.
192
193 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
194
195 * server.c (queue_stop_reply_callback): Change prototype, return
196 void.
197 (find_status_pending_thread_callback): Remove.
198 (handle_status): Replace find_inferior with find_thread and
199 for_each_thread.
200
201 2017-10-25 Alan Hayward <alan.hayward@arm.com>
202
203 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
204 with REGNO.
205 (aarch64_store_gregset): Likewise.
206 (aarch64_fill_fpregset): Likewise.
207 (aarch64_store_fpregset): Likewise.
208
209 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
210
211 * gdbthread.h (find_thread, for_each_thread): New functions.
212 * inferiors.c (thread_of_pid): Remove.
213 (find_any_thread_of_pid): Use find_thread.
214 * linux-low.c (num_lwps): Use for_each_thread.
215
216 2017-10-17 Yao Qi <yao.qi@linaro.org>
217
218 * Makefile.in: Remove one rule.
219 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
220
221 2017-10-17 Yao Qi <yao.qi@linaro.org>
222
223 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
224 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
225
226 2017-10-17 Yao Qi <yao.qi@linaro.org>
227
228 * configure.srv: Rename arm.o with arch/arm.o.
229
230 2017-10-17 Yao Qi <yao.qi@linaro.org>
231
232 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
233 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
234 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
235 (arch-i386.o, arch-amd64.o): Remove rules.
236 (arch/%.o): New rule.
237 Update POSTCOMPILE and COMPILE.pre.
238 * configure.ac: Invoke AC_CONFIG_COMMANDS.
239 * configure: Re-generated.
240 * configure.srv: Replace arch-i386.o with arch/i386.o.
241 Replace arch-amd64.o with arch/amd64.o.
242
243 2017-10-16 Yao Qi <yao.qi@linaro.org>
244
245 * configure: Regenerated.
246
247 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
248
249 * inferiors.h: (struct inferior_list): Remove.
250 (struct inferior_list_entry); Remove.
251 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
252 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
253 get_first_inferior): Remove.
254 (for_each_inferior, for_each_inferior_with_data, find_inferior,
255 find_inferior_id, find_inferior_in_random): Change signature.
256 * inferiors.c (all_threads): Change type to
257 std::list<thread_info *>.
258 (get_thread): Remove macro.
259 (find_inferior, find_inferior_id): Change signature, implement
260 using find_thread.
261 (find_inferior_in_random): Change signature, implement using
262 find_thread_in_random.
263 (for_each_inferior, for_each_inferior_with_data): Change
264 signature, implement using for_each_thread.
265 (add_inferior_to_list, remove_inferior): Remove.
266 (add_thread, get_first_thread, thread_of_pid,
267 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
268 (get_first_inferior, one_inferior_p, clear_inferior_list):
269 Remove.
270 (clear_inferiors, get_thread_process): Update.
271 * gdbthread.h: Include <list>.
272 (struct thread_info) <entry>: Remove field.
273 <id>: New field.
274 (all_threads): Change type to std::list<thread_info *>.
275 (get_first_inferior): Add doc.
276 (find_thread, for_each_thread, find_thread_in_random): New
277 functions.
278 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
279 * linux-arm-low.c (update_registers_callback): Update.
280 * linux-low.c (second_thread_of_pid_p): Update.
281 (kill_one_lwp_callback, linux_detach_lwp_callback,
282 delete_lwp_callback, status_pending_p_callback, same_lwp,
283 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
284 iterate_over_lwps, not_stopped_callback,
285 resume_stopped_resumed_lwps, count_events_callback,
286 select_singlestep_lwp_callback, select_event_lwp_callback,
287 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
288 suspend_and_send_sigstop_callback, wait_for_sigstop,
289 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
290 lwp_running, linux_set_resume_request, resume_status_pending_p,
291 need_step_over_p, start_step_over, linux_resume_one_thread,
292 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
293 reset_lwp_ptrace_options_callback): Update.
294 * linux-mips-low.c (update_watch_registers_callback): Update.
295 * regcache.c (regcache_invalidate_one, regcache_invalidate):
296 Update.
297 (free_register_cache_thread_one): Remove.
298 (regcache_release): Update.
299 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
300 handle_qxfer_threads_worker): Update.
301 (handle_query): Update, use list iterator.
302 (visit_actioned_threads, handle_pending_status,
303 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
304 clear_pending_status_callback, set_pending_status_callback,
305 find_status_pending_thread_callback, handle_status,
306 process_serial_event): Update.
307 * target.c (thread_search_callback): Update.
308 * thread-db.c (thread_db_get_tls_address): Update.
309 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
310 Update.
311 * win32-i386-low.c (update_debug_registers_callback): Update.
312 * win32-low.c (delete_thread_info, child_delete_thread,
313 continue_one_thread, suspend_one_thread,
314 get_child_debug_event): Adjust.
315
316 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
317
318 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
319 * inferiors.h: Include <list>.
320 (struct process_info) <entry>: Remove field.
321 <pid>: New field.
322 (pid_of): Change macro to function.
323 (ptid_of, lwpid_of): Remove macro.
324 (all_processes): Change type to std::list<process_info *>.
325 (ALL_PROCESSES): Remove macro.
326 (for_each_process, find_process): New function.
327 * inferiors.c (all_processes): Change type to
328 std::list<process_info *>.
329 (find_thread_process): Adjust.
330 (add_process): Likewise.
331 (remove_process): Likewise.
332 (find_process_pid): Likewise.
333 (get_first_process): Likewise.
334 (started_inferior_callback): Remove.
335 (have_started_inferiors_p): Adjust.
336 (attached_inferior_callback): Remove.
337 (have_attached_inferiors_p): Adjust.
338 * linux-low.c (check_zombie_leaders): Likewise.
339 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
340 (x86_linux_update_xmltarget): Adjust.
341 * server.c (handle_query): Likewise.
342 (gdb_reattached_process): Remove.
343 (handle_status): Adjust.
344 (kill_inferior_callback): Likewise.
345 (detach_or_kill_inferior): Remove.
346 (print_started_pid): Likewise.
347 (print_attached_pid): Likewise.
348 (detach_or_kill_for_exit): Update.
349 (process_serial_event): Likewise.
350 * linux-arm-low.c (arm_new_fork): Likewise.
351
352 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
353
354 * dll.h: Include <list>.
355 (struct dll_info): Add constructor.
356 <entry>: Remove field.
357 (all_dlls): Change type to std::list<dll_info>.
358 * dll.c: Include <algorithm>.
359 (get_dll): Remove macro.
360 (all_dlls): Change type to std::list<dll_info *>.
361 (free_one_dll): Remove.
362 (match_dll): Likewise.
363 (loaded_dll): Adjust.
364 (unloaded_dll): Adjust to all_dlls type change, use
365 std::find_if. Inline code from match_dll.
366 (clear_dlls): Adjust to all_dlls type change.
367 * server.c (emit_dll_description): Remove.
368 (handle_qxfer_libraries): Adjust to all_dlls type change,
369 integrate emit_dll_description's functionality.
370
371 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
372
373 * linux-low.h (struct linux_target_ops) <delete_process>: New
374 field.
375 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
376 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
377 (struct linux_target_ops): Add delete_process callback.
378 * linux-arm-low.c (arm_delete_process): New.
379 (struct linux_target_ops): Add delete_process callback.
380 * linux-bfin-low.c (struct linux_target_ops): Likewise.
381 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
382 * linux-m32r-low.c (struct linux_target_ops): Likewise.
383 * linux-mips-low.c (mips_linux_delete_process): New.
384 (struct linux_target_ops): Add delete_process callback.
385 * linux-ppc-low.c (struct linux_target_ops): Likewise.
386 * linux-s390-low.c (struct linux_target_ops): Likewise.
387 * linux-sh-low.c (struct linux_target_ops): Likewise.
388 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
389 * linux-tile-low.c (struct linux_target_ops): Likewise.
390 * linux-x86-low.c (x86_linux_delete_process): New.
391 (struct linux_target_ops): Add delete_process callback.
392 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
393
394 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
395
396 * linux-aarch64-low.c (the_low_target): Add thread delete
397 callback.
398 * linux-arm-low.c (arm_delete_thread): New function.
399 (the_low_target): Add thread delete callback.
400 * linux-bfin-low.c (the_low_target): Likewise.
401 * linux-crisv32-low.c (the_low_target): Likewise.
402 * linux-low.c (delete_lwp): Invoke delete_thread callback if
403 set.
404 * linux-low.h (struct linux_target_ops) <delete_thread>: New
405 field.
406 * linux-m32r-low.c (the_low_target): Add thread delete callback.
407 * linux-mips-low.c (mips_linux_delete_thread): New function.
408 (the_low_target): Add thread delete callback.
409 * linux-ppc-low.c (the_low_target): Likewise.
410 * linux-s390-low.c (the_low_target): Likewise.
411 * linux-sh-low.c (the_low_target): Likewise.
412 * linux-tic6x-low.c (the_low_target): Likewise.
413 * linux-tile-low.c (the_low_target): Likewise.
414 * linux-x86-low.c (the_low_target): Likewise.
415 * linux-xtensa-low.c (the_low_target): Likewise.
416
417 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
418
419 * win32-low.c: Include "common-inferior.h".
420
421 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
422
423 * inferiors.c (set_inferior_cwd): New function.
424 * server.c (handle_general_set): Handle QSetWorkingDir packet.
425 (handle_query): Inform that QSetWorkingDir is supported.
426 * win32-low.c (create_process): Pass the inferior's cwd to
427 CreateProcess.
428
429 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
430
431 * inferiors.c (current_inferior_cwd): New global variable.
432 (get_inferior_cwd): New function.
433 * inferiors.h (struct process_info) <cwd>: New field.
434
435 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
436
437 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
438 (OBS): Add gdb_tilde_expand.o.
439
440 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
441
442 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
443 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
444
445 2017-09-29 Pedro Alves <palves@redhat.com>
446
447 * ax.c (gdb_parse_agent_expr): Constify.
448 * ax.h (gdb_parse_agent_expr): Constify.
449 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
450 Constify.
451 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
452 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
453 * remote-utils.h (read_ptid): Constify.
454 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
455 (process_point_options, process_serial_event): Constify.
456 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
457 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
458 (cmd_qtbuffer): Constify.
459
460 2017-09-29 Pedro Alves <palves@redhat.com>
461
462 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
463 fails.
464
465 2017-09-29 Pedro Alves <palves@redhat.com>
466
467 * linux-low.c (handle_extended_wait): Pass parent thread instead
468 of process to thread_db_notice_clone.
469 * linux-low.h (thread_db_notice_clone): Replace parent process
470 parameter with parent thread parameter.
471 * thread-db.c (find_one_thread): Add comment.
472 (thread_db_notice_clone): Replace parent process parameter with
473 parent thread parameter. Temporarily switch to the parent thread.
474
475 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
476
477 * gdbthread.h: Include "common-gdbthread.h".
478 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
479 "if" when validating the ptid.
480 * remote-utils.c: Include "gdbthread.h".
481 (prepare_resume_reply): Use "switch_to_thread".
482 * target.c (done_accessing_memory): Likewise.
483
484 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
485
486 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
487 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
488 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
489 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
490 s390x-gs-linux64-ipa.o to ipa_obj.
491 * linux-s390-low.c (HWCAP_S390_GS): New define.
492 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
493 New functions.
494 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
495 (s390_arch_setup): Check for guarded-storage support and choose
496 appropriate tdesc.
497 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
498 init_registers_s390x_gs_linux64.
499 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
500 enum value.
501 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
502 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
503
504 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
505
506 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
507
508 2017-09-21 Kevin Buettner <kevinb@redhat.com>
509
510 * linux-low.h (struct lwp_info): Add new field, thread_handle.
511 (thread_db_thread_handle): Declare.
512 * linux-low.c (linux_target_ops): Initialize thread_handle.
513 * server.c (handle_qxfer_threads_worker): Add support for
514 "handle" attribute.
515 * target.h (struct target_ops): Add new function pointer,
516 thread_handle.
517 (target_thread_handle): Define.
518 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
519 field in lwp.
520 (thread_db_thread_handle): New function.
521
522 2017-09-21 Kevin Buettner <kevinb@redhat.com>
523
524 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
525 * linux-low.h (thread_db_notice_clone): Declare.
526 * thread-db.c (thread_db_notice_clone): New function.
527
528 2017-09-21 Pedro Alves <palves@redhat.com>
529
530 * server.c (gdb_read_memory, handle_status, process_serial_event)
531 (handle_serial_event, handle_target_event): Adjust to
532 set_desired_thread prototype change.
533 * target.c (set_desired_thread): Remove 'use_general' parameter
534 and adjust.
535 * target.h (set_desired_thread): Remove 'use_general' parameter.
536
537 2017-09-20 Tom Tromey <tom@tromey.com>
538
539 * target.c (target_terminal::terminal_state): Define.
540 (target_terminal::init): Rename from target_terminal_init.
541 (target_terminal::inferior): Rename from
542 target_terminal_inferior.
543 (target_terminal::ours): Rename from target_terminal_ours.
544 (target_terminal::ours_for_output, target_terminal::info): New.
545
546 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
547
548 * server.c (accumulate_file_name_length): Remove.
549 (emit_dll_description): Adjust to std::string change.
550 (handle_qxfer_libraries): Use std::string to hold document.
551
552 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
553
554 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
555 return type of xml_escape_text.
556 * server.c (emit_dll_description): Likewise.
557
558 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
559
560 * server.c (captured_main): Accept argument for --selftest.
561 Update run_tests call.
562 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
563 when registering selftests.
564
565 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
566
567 * regcache.c (get_thread_regcache): Update code to use "std::vector"
568 instead of "VEC" for "target_desc.reg_defs".
569 (regcache_cpy): Likewise.
570 (registers_to_string): Likewise.
571 (registers_from_string): Likewise.
572 (find_regno): Likewise.
573 (supply_regblock): Likewise.
574 (regcache_raw_read_unsigned): Likewise.
575 * tdesc.c (init_target_desc): Likewise.
576 (tdesc_create_reg): Likewise.
577 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
578 (struct target_desc) <reg_defs>: Convert to "std::vector".
579 (target_desc): Do not initialize "reg_defs".
580 (~target_desc): Update code to use "std::vector" instead of "VEC"
581 for "target_desc.reg_defs".
582 (operator==): Likewise.
583
584 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
585
586 * inferiors.h (thread_to_gdb_id): Remove.
587 * inferiors.c (thread_to_gdb_id): Remove.
588 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
589 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
590 lynx_store_registers, lynx_read_memory, lynx_write_memory):
591 Likewise.
592 * nto-low.c (nto_fetch_registers, nto_store_registers,
593 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
594
595 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
596
597 * inferiors.h (gdb_id_to_thread_id): Remove.
598 * inferiors.c (gdb_id_to_thread_id): Remove.
599 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
600 removal. Move pid declaration closer to where it's used.
601
602 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
603
604 * server.c (handle_detach): New function.
605 (process_serial_event): Move code out, call handle_detach.
606
607 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
608
609 * server.c (require_running): Rename to ...
610 (require_running_or_return): ... this ...
611 (require_running_or_break): ... and this.
612 (handle_query, process_serial_event): Adjust.
613
614 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
615
616 * linux-low.c (linux_set_resume_request): Remove unused
617 variables.
618
619 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
620
621 * server.c (first_thread_of): Remove.
622 (process_serial_event): Replace usage of first_thread_of with
623 find_any_thread_of_pid.
624 * tracepoint.c (same_process_p): Remove.
625 (gdb_agent_about_to_close): Replace usage of same_process_p with
626 find_any_thread_of_pid.
627 * linux-x86-low.c (same_process_callback): Remove.
628 (x86_arch_setup_process_callback): Replace usage of
629 same_process_callback with find_any_thread_of_pid.
630 * thread-db.c (any_thread_of): Remove.
631 (switch_to_process): Replace usage of any_thread_of with
632 find_any_thread_of_pid.
633 * inferiors.c (thread_pid_matches_callback): Remove.
634 (find_thread_process): Adjust to use find_any_thread_of_pid.
635
636 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
637
638 * regcache.c (get_thread_regcache): Guard calls to "memset"
639 with "!VEC_empty".
640
641 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
642
643 * linux-low.c (handle_extended_wait): Use
644 "allocate_target_description" instead of "XNEW".
645 * linux-x86-low.c (initialize_low_arch): Likewise.
646
647 2017-09-05 Yao Qi <yao.qi@linaro.org>
648
649 * configure.srv (srv_i386_regobj): Remove.
650 (srv_amd64_regobj): Remove.
651 (srv_regobj): Set it to "" for x86 non-linux targets.
652 * linux-x86-tdesc.c (i386_linux_read_description):
653 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
654 (init_registers_i386): Remove the declaration.
655 (tdesc_i386): Remove the declaration.
656 (lynx_i386_arch_setup): Call i386_create_target_description.
657 * nto-x86-low.c: Likewise.
658 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
659 [!__x86_64__]: include arch/i386.h.
660 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
661
662 2017-09-05 Yao Qi <yao.qi@linaro.org>
663
664 * configure.srv (srv_amd64_linux_xmlfiles): Remove
665 i386/amd64-XXX-linux from it.
666
667 2017-09-05 Yao Qi <yao.qi@linaro.org>
668
669 * configure.srv: Empty srv_amd64_linux_regobj if $development is
670 false.
671 (ipa_amd64_linux_regobj): Remove.
672 (ipa_x32_linux_regobj): Remove.
673
674 2017-09-05 Yao Qi <yao.qi@linaro.org>
675
676 * Makefile.in (arch-amd64.o): New rule.
677 * configure.srv: Append arch-amd64.o.
678 * linux-amd64-ipa.c: Include common/x86-xstate.h.
679 (get_ipa_tdesc): Call amd64_linux_read_description.
680 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
681 and init_registers_amd64_XXX.
682 * linux-x86-low.c (x86_linux_read_description): Call
683 amd64_linux_read_description.
684 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
685 (initialize_low_arch): Don't call init_registers_x32_XXX and
686 init_registers_amd64_XXX.
687 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
688 and tdesc_amd64_XXX.
689 [__x86_64__] (amd64_tdesc_test): New function.
690 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
691 and init_registers_amd64_XXX.
692 * linux-x86-tdesc.c: Include arch/amd64.h.
693 (xcr0_to_tdesc_idx): New function.
694 (i386_linux_read_description): New function.
695 (amd64_get_ipa_tdesc_idx): New function.
696 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
697 (amd64_get_ipa_tdesc): Declare.
698
699 2017-09-05 Yao Qi <yao.qi@linaro.org>
700
701 * configure.srv (srv_i386_linux_xmlfiles): Remove
702 i386/i386-XXX-linux.xml from it.
703
704 2017-09-05 Yao Qi <yao.qi@linaro.org>
705
706 * configure.srv: Set srv_i386_linux_regobj empty if $development
707 is false.
708 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
709 initialize_low_tdesc.
710 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
711 with #if initialize_low_tdesc.
712 * linux-x86-tdesc-selftest.c: New file.
713 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
714
715 2017-09-05 Yao Qi <yao.qi@linaro.org>
716
717 * Makefile.in (arch-i386.o): New rule.
718 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
719 (x86_64-*-linux*): Likewise.
720 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
721 include arch/i386.h.
722 (i386_linux_read_description): Remove code and call
723 i386_create_target_description.
724 * tdesc.c (allocate_target_description): New function.
725 * tdesc.h (set_tdesc_architecture): Remove declaration.
726 (set_tdesc_osabi): Likewise.
727
728 2017-09-05 Yao Qi <yao.qi@linaro.org>
729
730 * linux-x86-tdesc.c: Don't include <inttypes.h>.
731 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
732 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
733 .xmltarget.
734 * server.c (get_features_xml): Call tdesc_get_features_xml.
735 * tdesc.c (set_tdesc_architecture): New function.
736 (set_tdesc_osabi): New function.
737 (tdesc_get_features_xml): New function.
738 (tdesc_create_feature): Add an argument.
739 * tdesc.h (struct target_desc) <features>: New field.
740 <arch, osabi>: New field.
741 (~target_desc): xfree features, arch, and osabi.
742 (target_desc::oerator==): Don't compare .xmltarget.
743 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
744 (set_tdesc_osabi): Likewise.
745 (tdesc_get_features_xml): Likewise.
746
747 2017-09-05 Yao Qi <yao.qi@linaro.org>
748
749 * linux-x86-tdesc.c: Include selftest.h.
750 (i386_tdesc_test): New function.
751 (initialize_low_tdesc): Call selftests::register_test.
752 * tdesc.h: Include regdef.h.
753 (target_desc): Override operator == and !=.
754
755 2017-09-05 Yao Qi <yao.qi@linaro.org>
756
757 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
758 (ipa_obj): Likewise.
759 * linux-i386-ipa.c: Include common/x86-xstate.h
760 (get_ipa_tdesc): Call i386_linux_read_description.
761 (initialize_low_tracepoint): Don't call init_registers_XXX
762 functions, call initialize_low_tdesc instead.
763 * linux-x86-low.c (x86_linux_read_description): Call
764 i386_linux_read_description.
765 (initialize_low_arch): Don't call init_registers_i386_XXX
766 functions, call initialize_low_tdesc.
767 * linux-x86-tdesc.c: New file.
768 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
769 (i386_get_ipa_tdesc_idx): Declare.
770 (i386_get_ipa_tdesc): Declare.
771 (initialize_low_tdesc): Declare.
772
773 2017-09-05 Yao Qi <yao.qi@linaro.org>
774
775 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
776 instead of 0.
777
778 2017-09-05 Yao Qi <yao.qi@linaro.org>
779
780 * Makefile.in (IPA_OBJS): Add vec-ipa.o
781 * regcache.c (get_thread_regcache): Use VEC_length.
782 (init_register_cache): Likewise.
783 (regcache_cpy): Likewise.
784 (registers_to_string): Iterate reg_defs via VEC_iterate.
785 (find_regno): Likewise.
786 (find_register_by_number): Use VEC_index.
787 (register_size): Call find_register_by_number.
788 (register_data): Call find_register_by_number.
789 (supply_regblock): Use VEC_length.
790 (regcache_raw_read_unsigned): Likewise.
791 * tdesc.c (init_target_desc): Iterate reg_defs via
792 VEC_iterate.
793 (default_description): Update initializer.
794 (copy_target_description): Don't update field num_registers.
795 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
796 <num_registers>: Remove.
797
798 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
799
800 * Makefile.in (.SECONDARY): Define target.
801
802 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
803
804 * linux-low.c (linux_wait_1): Adjust.
805 * server.c (queue_stop_reply_callback): Adjust.
806
807 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
808
809 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
810 QEnvironmentUnset and QEnvironmentReset packets.
811 (handle_query): Inform remote that QEnvironmentHexEncoded,
812 QEnvironmentUnset and QEnvironmentReset are supported.
813
814 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
815
816 * inferiors.h (inferior_target_data): Rename to ...
817 (thread_target_data): ... this.
818 (inferior_regcache_data): Rename to ...
819 (thread_regcache_data): ... this.
820 (set_inferior_regcache_data): Rename to ...
821 (set_thread_regcache_data): ... this.
822 * inferiors.c (inferior_target_data): Rename to ...
823 (thread_target_data): ... this.
824 (inferior_regcache_data): Rename to ...
825 (thread_regcache_data): ... this.
826 (set_inferior_regcache_data): Rename to ...
827 (set_thread_regcache_data): ... this.
828 (free_one_thread): Update.
829 * linux-low.h (get_thread_lwp): Update.
830 * regcache.c (get_thread_regcache): Update.
831 (regcache_invalidate_thread): Update.
832 (free_register_cache_thread): Update.
833 * win32-i386-low.c (update_debug_registers_callback): Update.
834 (win32_get_current_dr): Update.
835 * win32-low.c (thread_rec): Update.
836 (delete_thread_info): Update.
837 (continue_one_thread): Update.
838 (suspend_one_thread): Update.
839
840 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
841
842 * inferiors.c (set_inferior_target_data): Remove.
843 * inferiors.h (set_inferior_target_data): Remove.
844
845 2017-08-18 Yao Qi <yao.qi@linaro.org>
846
847 * Makefile.in (OBS): Add selftest.o.
848 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
849 * configure, config.in: Re-generated.
850 * server.c: Include common/sefltest.h.
851 (captured_main): Handle option --selftest.
852
853 2017-08-09 Yao Qi <yao.qi@linaro.org>
854
855 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
856 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
857 i386-avx-mpx.o and i386-mmx.o.
858 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
859 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
860 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
861 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
862 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
863 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
864 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
865 i386/amd64-avx-mpx.xml.
866
867 2017-08-09 Yao Qi <yao.qi@linaro.org>
868
869 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
870 and x32-avx-avx512.o.
871 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
872 i386/x32-avx-avx512.xml.
873
874 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
875
876 * tracepoint.h (enum class fast_tpoint_collect_result): New
877 enumeration.
878 (fast_tracepoint_collecting): Change return type to
879 fast_tpoint_collect_result.
880 * tracepoint.c (fast_tracepoint_collecting): Likewise.
881 * linux-low.h: Include tracepoint.h.
882 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
883 fast_tpoint_collect_result.
884 * linux-low.c (handle_tracepoints): Adjust.
885 (linux_fast_tracepoint_collecting): Change return type to
886 fast_tpoint_collect_result.
887 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
888 linux_wait_1, stuck_in_jump_pad_callback,
889 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
890 proceed_one_lwp): Adjust to type change.
891
892 2017-07-10 Yao Qi <yao.qi@linaro.org>
893
894 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
895
896 2017-06-29 Yao Qi <yao.qi@linaro.org>
897
898 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
899 Remove.
900 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
901
902 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
903
904 * Makefile.in (IPA_OBJS): Sort and format one item per line.
905
906 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
907
908 * linux-low.c (linux_create_inferior): Adjust code to access the
909 environment information via 'gdb_environ' class.
910 * lynx-low.c (lynx_create_inferior): Likewise.
911 * server.c (our_environ): Make it an instance of 'gdb_environ'.
912 (get_environ): Return a pointer to 'our_environ'.
913 (captured_main): Initialize 'our_environ'.
914 * server.h (get_environ): Adjust prototype.
915 * spu-low.c (spu_create_inferior): Adjust code to access the
916 environment information via 'gdb_environ' class.
917
918 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
919
920 * linux-low.c (linux_read_memory, linux_write_memory): Remove
921 usage of "register" keyword.
922
923 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
924
925 * configure: Re-generate.
926
927 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
928
929 * configure: Re-generate.
930
931 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
932
933 * Makefile.in (COMPILE.pre): Add "-x c++".
934
935 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
936
937 * fork-child.c: Conditionally include <signal.h>.
938
939 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
940
941 * server.c (handle_general_set): Handle new packet
942 "QStartupWithShell".
943 (handle_query): Add "QStartupWithShell" to the list of supported
944 packets.
945 (gdbserver_usage): Add help text explaining the
946 new "--startup-with-shell" and "--no-startup-with-shell" CLI
947 options.
948 (captured_main): Recognize and act upon the presence of the new
949 CLI options.
950
951 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
952 Pedro Alves <palves@redhat.com>
953
954 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
955 * configure: Regenerate.
956 * configure.srv (srv_linux_obj): Add "fork-child.o" and
957 "fork-inferior.o".
958 (i[34567]86-*-lynxos*): Likewise.
959 (spu*-*-*): Likewise.
960 * fork-child.c: New file.
961 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
962 and "environ.h".
963 (linux_ptrace_fun): New function.
964 (linux_create_inferior): Adjust function prototype to reflect
965 change on "target.h". Adjust function code to use
966 "fork_inferior".
967 (linux_request_interrupt): Delete "signal_pid".
968 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
969 (lynx_ptrace_fun): New function.
970 (lynx_create_inferior): Adjust function prototype to reflect
971 change on "target.h". Adjust function code to use
972 "fork_inferior".
973 * nto-low.c (nto_create_inferior): Adjust function prototype and
974 code to reflect change on "target.h". Update comments.
975 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
976 "common-terminal.h" and "environ.h".
977 (terminal_fd): Moved to fork-child.c.
978 (old_foreground_pgrp): Likewise.
979 (restore_old_foreground_pgrp): Likewise.
980 (last_status): Make it global.
981 (last_ptid): Likewise.
982 (our_environ): New variable.
983 (startup_with_shell): Likewise.
984 (program_name): Likewise.
985 (program_argv): Rename to...
986 (program_args): ...this.
987 (wrapper_argv): New variable.
988 (start_inferior): Delete function.
989 (get_exec_wrapper): New function.
990 (get_exec_file): Likewise.
991 (get_environ): Likewise.
992 (prefork_hook): Likewise.
993 (post_fork_inferior): Likewise.
994 (postfork_hook): Likewise.
995 (postfork_child_hook): Likewise.
996 (handle_v_run): Update code to deal with arguments coming from the
997 remote host. Update calls from "start_inferior" to
998 "create_inferior".
999 (captured_main): Likewise. Initialize environment variable. Call
1000 "have_job_control".
1001 * server.h (post_fork_inferior): New prototype.
1002 (get_environ): Likewise.
1003 (last_status): Declare.
1004 (last_ptid): Likewise.
1005 (signal_pid): Likewise.
1006 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1007 (spu_ptrace_fun): New function.
1008 (spu_create_inferior): Adjust function prototype to reflect change
1009 on "target.h". Adjust function code to use "fork_inferior".
1010 * target.c (target_terminal_init): New function.
1011 (target_terminal_inferior): Likewise.
1012 (target_terminal_ours): Likewise.
1013 * target.h: Include <vector>.
1014 (struct target_ops) <create_inferior>: Update prototype.
1015 (create_inferior): Update macro.
1016 * utils.c (gdb_flush_out_err): New function.
1017 * win32-low.c (win32_create_inferior): Adjust function prototype
1018 and code to reflect change on "target.h".
1019
1020 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1021
1022 * inferiors.c (switch_to_thread): New function.
1023
1024 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1025
1026 * Makefile.in (SFILE): Add "common/job-control.c".
1027 (OBS): Add "job-control.o".
1028
1029 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1030
1031 * Makefile: Remove "@host_makefile_frag@".
1032
1033 2017-05-05 Pedro Alves <palves@redhat.com>
1034
1035 * configure: Regenerate.
1036
1037 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1038
1039 * configure: Regenerate.
1040
1041 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1042
1043 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1044 software_single_step change of return type to
1045 std::vector<CORE_ADDR>.
1046 * linux-low.c (install_software_single_step_breakpoints):
1047 Likewise.
1048 * linux-low.h (install_software_single_step_breakpoints):
1049 Likewise.
1050
1051 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1052
1053 * remote-utils.c: Include "gdb_termios.h" instead of
1054 "terminal.h".
1055 * terminal.h: Delete file.
1056
1057 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1058
1059 * server.c: Include <vector>.
1060 <program_argv, wrapper_argv>: Convert to std::vector.
1061 (start_inferior): Rewrite function to use C++.
1062 (handle_v_run): Likewise. Update code that calculates the argv
1063 based on the vRun packet; use C++.
1064 (captured_main): Likewise.
1065
1066 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1067
1068 * server.c (handle_v_cont): Initialize thread_resume::thread
1069 with null_ptid.
1070
1071 2017-04-05 Pedro Alves <palves@redhat.com>
1072
1073 * configure: Regenerate.
1074
1075 2017-04-05 Pedro Alves <palves@redhat.com>
1076
1077 * gdbreplay.c (sync_error): Constify.
1078 * linux-x86-low.c (push_opcode): Constify.
1079
1080 2017-04-05 Pedro Alves <palves@redhat.com>
1081
1082 * win32-low.c (get_child_debug_event)
1083 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1084 Report TARGET_WAITKIND_SPURIOUS instead.
1085
1086 2017-04-05 Pedro Alves <palves@redhat.com>
1087
1088 * remote-utils.c (remote_prepare, remote_open): Constify.
1089 * remote-utils.h (remote_prepare, remote_open): Constify.
1090 * server.c (captured_main): Constify 'port' handling.
1091
1092 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1093
1094 * Makefile.in (clean): Clear .deps.
1095
1096 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1097
1098 * .gitignore: Remove generated files, replace with wildcard.
1099 * (clean): Replace removal of generated files with wildcard.
1100 (version.c): Replace with...
1101 (version-generated.c): ...this.
1102 (xml-builtin.c): Replace with...
1103 (xml-builtin-generated.c): ...this.
1104 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1105 (%.c: *regformats*): Replace with...
1106 (%-generated.c: *regformats*): ...this.
1107
1108 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1109
1110 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1111 (xtensa_fill_gregset): Call collect_register_by_name for
1112 threadptr register.
1113 (xtensa_store_gregset): Call supply_register_by_name for
1114 threadptr register.
1115
1116 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1117
1118 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1119 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1120 (xtensa_store_gregset): Call supply_register for all registers in
1121 a0_regnum..a0_regnum + C0_NREGS range.
1122
1123 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1124
1125 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1126 (ax-ipa.o: ax.c): Remove.
1127 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1128 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1129 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1130 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1131 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1132
1133 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1134
1135 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1136 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1137 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1138 (errors-ipa.o: ../common/errors.c): Remove.
1139 (format-ipa.o: ../common/format.c): Remove.
1140 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1141
1142 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1143
1144 * Makefile.in (%-ipa.o: %.c): New rule.
1145 (tracepoint-ipa.o: tracepoint.c): Remove.
1146 (utils-ipa.o: utils.c): Remove.
1147 (remote-utils-ipa.o: remote-utils.c): Remove.
1148 (regcache-ipa.o: regcache.c): Remove.
1149 (i386-linux-ipa.o: i386-linux.c): Remove.
1150 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1151 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1152 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1153 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1154 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1155 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1156 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1157 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1158 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1159 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1160 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1161 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1162 (aarch64-ipa.o: aarch64.c): Remove.
1163 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1164 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1165 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1166 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1167 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1168 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1169 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1170 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1171 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1172 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1173 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1174 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1175 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1176 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1177 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1178 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1179 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1180 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1181 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1182 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1183 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1184 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1185 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1186 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1187 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1188 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1189 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1190 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1191 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1192 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1193 (tdesc-ipa.o: tdesc.c): Remove.
1194 (x32-linux-ipa.o: x32-linux.c): Remove.
1195 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1196 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1197
1198 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1199
1200 * Makefile.in (%.o: ../arch/%.c): New rule.
1201 (arm.o: ../arch/arm.c): Remove.
1202 (arm-linux.o: ../arch/arm-linux.c): Remove.
1203 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1204 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1205
1206 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1207
1208 * Makefile.in (%.o: ../nat/%.c): New rule.
1209 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1210 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1211 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1212 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1213 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1214 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1215 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1216 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1217 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1218 (linux-personality.o: ../nat/linux-personality.c): Remove.
1219 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1220 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1221 (x86-linux.o: ../nat/x86-linux.c): Remove.
1222 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1223 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1224
1225 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1226
1227 * Makefile.in (%.o: ../common/%.c): New rule.
1228 (signals.o: ../common/signals.c): Remove.
1229 (print-utils.o: ../common/print-utils.c): Remove.
1230 (rsp-low.o: ../common/rsp-low.c): Remove.
1231 (common-utils.o: ../common/common-utils.c): Remove.
1232 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1233 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1234 (vec.o: ../common/vec.c): Remove.
1235 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1236 (xml-utils.o: ../common/xml-utils.c): Remove.
1237 (ptid.o: ../common/ptid.c): Remove.
1238 (buffer.o: ../common/buffer.c): Remove.
1239 (format.o: ../common/format.c): Remove.
1240 (filestuff.o: ../common/filestuff.c): Remove.
1241 (agent.o: ../common/agent.c): Remove.
1242 (errors.o: ../common/errors.c): Remove.
1243 (environ.o: ../common/environ.c): Remove.
1244 (common-debug.o: ../common/common-debug.c): Remove.
1245 (cleanups.o: ../common/cleanups.c): Remove.
1246 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1247 (fileio.o: ../common/fileio.c): Remove.
1248 (common-regcache.o: ../common/common-regcache.c): Remove.
1249 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1250 (new-op.o: ../common/new-op.c): Remove.
1251 (btrace-common.o: ../common/btrace-common.c): Remove.
1252
1253 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1254
1255 * Makefile.in (%.o: ../target/%.c): New rule.
1256 (waitstatus.o: ../target/waitstatus.c): Remove.
1257
1258 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1259
1260 * Makefile.in
1261 (%.c: ../regformats/%.dat,
1262 (%.c: ../regformats/arm/%.dat,
1263 (%.c: ../regformats/i386/%.dat,
1264 (%.c: ../regformats/rs6000/%.dat): New rules.
1265 (aarch64.c): Remove.
1266 (reg-arm.c): Remove.
1267 (arm-with-iwmmxt.c): Remove.
1268 (arm-with-vfpv2.c): Remove.
1269 (arm-with-vfpv3.c): Remove.
1270 (arm-with-neon.c): Remove.
1271 (reg-bfin.c): Remove.
1272 (reg-cris.c): Remove.
1273 (reg-crisv32.c): Remove.
1274 (i386.c): Remove.
1275 (i386-linux.c): Remove.
1276 (i386-avx.c): Remove.
1277 (i386-avx-linux.c): Remove.
1278 (i386-avx-avx512.c): Remove.
1279 (i386-avx-avx512-linux.c): Remove.
1280 (i386-mpx.c): Remove.
1281 (i386-mpx-linux.c): Remove.
1282 (i386-avx-mpx-avx512-pku.c): Remove.
1283 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1284 (i386-avx-mpx.c): Remove.
1285 (i386-avx-mpx-linux.c): Remove.
1286 (i386-mmx.c): Remove.
1287 (i386-mmx-linux.c): Remove.
1288 (reg-ia64.c): Remove.
1289 (reg-m32r.c): Remove.
1290 (reg-m68k.c): Remove.
1291 (reg-cf.c): Remove.
1292 (mips-linux.c): Remove.
1293 (mips-dsp-linux.c): Remove.
1294 (mips64-linux.c): Remove.
1295 (mips64-dsp-linux.c): Remove.
1296 (nios2-linux.c): Remove.
1297 (powerpc-32.c): Remove.
1298 (powerpc-32l.c): Remove.
1299 (powerpc-altivec32l.c): Remove.
1300 (powerpc-cell32l.c): Remove.
1301 (powerpc-vsx32l.c): Remove.
1302 (powerpc-isa205-32l.c): Remove.
1303 (powerpc-isa205-altivec32l.c): Remove.
1304 (powerpc-isa205-vsx32l.c): Remove.
1305 (powerpc-e500l.c): Remove.
1306 (powerpc-64l.c): Remove.
1307 (powerpc-altivec64l.c): Remove.
1308 (powerpc-cell64l.c): Remove.
1309 (powerpc-vsx64l.c): Remove.
1310 (powerpc-isa205-64l.c): Remove.
1311 (powerpc-isa205-altivec64l.c): Remove.
1312 (powerpc-isa205-vsx64l.c): Remove.
1313 (s390-linux32.c): Remove.
1314 (s390-linux32v1.c): Remove.
1315 (s390-linux32v2.c): Remove.
1316 (s390-linux64.c): Remove.
1317 (s390-linux64v1.c): Remove.
1318 (s390-linux64v2.c): Remove.
1319 (s390-te-linux64.c): Remove.
1320 (s390-vx-linux64.c): Remove.
1321 (s390-tevx-linux64.c): Remove.
1322 (s390x-linux64.c): Remove.
1323 (s390x-linux64v1.c): Remove.
1324 (s390x-linux64v2.c): Remove.
1325 (s390x-te-linux64.c): Remove.
1326 (s390x-vx-linux64.c): Remove.
1327 (s390x-tevx-linux64.c): Remove.
1328 (tic6x-c64xp-linux.c): Remove.
1329 (tic6x-c64x-linux.c): Remove.
1330 (tic6x-c62x-linux.c): Remove.
1331 (reg-sh.c): Remove.
1332 (reg-sparc64.c): Remove.
1333 (reg-spu.c): Remove.
1334 (amd64.c): Remove.
1335 (amd64-linux.c): Remove.
1336 (amd64-avx.c): Remove.
1337 (amd64-avx-linux.c): Remove.
1338 (amd64-avx-avx512.c): Remove.
1339 (amd64-avx-avx512-linux.c): Remove.
1340 (amd64-mpx.c): Remove.
1341 (amd64-mpx-linux.c): Remove.
1342 (amd64-avx-mpx-avx512-pku.c): Remove.
1343 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1344 (amd64-avx-mpx.c): Remove.
1345 (amd64-avx-mpx-linux.c): Remove.
1346 (x32.c): Remove.
1347 (x32-linux.c): Remove.
1348 (x32-avx.c): Remove.
1349 (x32-avx-linux.c): Remove.
1350 (x32-avx-avx512.c): Remove.
1351 (x32-avx-avx512-linux.c): Remove.
1352 (reg-xtensa.c): Remove.
1353 (reg-tilegx.c): Remove.
1354 (reg-tilegx32.c): Remove.
1355
1356 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1357
1358 * Makefile.in (SFILES): Add "common/environ.c".
1359 (OBJS): Add "common/environ.h".
1360
1361 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1362
1363 * configure.ac: Check if the fs_base and gs_base members of
1364 `struct user_regs_struct' exist.
1365 * config.in: Regenerated.
1366 * configure: Likewise.
1367
1368 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1369
1370 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1371 target_read_memory.
1372 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1373 (get_next_pcs_syscall_next_pc): Likewise.
1374
1375 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1376
1377 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1378 * nto-x86-low.c: Likewise.
1379
1380 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1381
1382 * Makefile.in: Include disable-implicit-rules.mk.
1383
1384 2016-11-23 Pedro Alves <palves@redhat.com>
1385
1386 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1387 (debug_vprintf): Use std::chrono::steady_clock instead of
1388 gettimeofday. Use '.' instead of ':'.
1389 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1390 (get_timestamp): Use std::chrono::steady_clock instead of
1391 gettimeofday.
1392
1393 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1394
1395 * Makefile.in: Fix whitespace formatting.
1396
1397 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1398
1399 * Makefile.in (SFILES, OBS): Flatten list and order
1400 alphabetically.
1401
1402 2016-11-23 Pedro Alves <palves@redhat.com>
1403
1404 * event-loop.c (handle_file_event): Use warning.
1405 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1406 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1407 Use warning.
1408
1409 2016-11-23 Pedro Alves <palves@redhat.com>
1410
1411 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1412 output.
1413 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1414 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1415 debug_printf and debug_flush for debug output.
1416 * server.c (handle_general_set): Likewise.
1417 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1418 output.
1419
1420 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1421
1422 * Makefile.in (.c.o): Replace rule with ...
1423 (%.o: %.c): ... this one.
1424
1425 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1426
1427 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1428 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1429 make.
1430 * configure.ac: Remove checks for the make program.
1431 * configure: Re-generate.
1432
1433 2016-10-28 Pedro Alves <palves@redhat.com>
1434
1435 * Makefile.in (CXX_DIALECT): Get from configure.
1436 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1437 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1438 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1439 * config.in: Regenerate.
1440 * configure: Regenerate.
1441
1442 2016-10-27 Yao Qi <yao.qi@linaro.org>
1443
1444 * linux-low.c (linux_supports_range_stepping): Return true if
1445 can_software_single_step return true.
1446
1447 2016-10-27 Yao Qi <yao.qi@linaro.org>
1448
1449 * inferiors.c (find_inferior_in_random): New function.
1450 * inferiors.h (find_inferior_in_random): Declare.
1451 * linux-low.c (linux_wait_for_event_filtered): Call
1452 find_inferior_in_random instead of find_inferior.
1453
1454 2016-10-27 Yao Qi <yao.qi@linaro.org>
1455
1456 * linux-low.c (linux_wait_1): If single-step breakpoints are
1457 inserted, remove them.
1458
1459 2016-10-26 Pedro Alves <palves@redhat.com>
1460
1461 * linux-low.c (handle_extended_wait): Link parent/child fork
1462 threads.
1463 (linux_wait_1): Unlink them.
1464 (linux_set_resume_request): Ignore resume requests for
1465 already-resumed and unhandled fork child threads.
1466 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1467 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1468 New functions.
1469 (handle_v_requests) <vCont>: Don't call require_running.
1470 * server.h (in_queued_stop_replies): New declaration.
1471
1472 2016-10-24 Yao Qi <yao.qi@linaro.org>
1473
1474 PR server/20733
1475 * linux-aarch64-low.c (append_insns): Cast the return value to
1476 'uint32_t *'.
1477
1478 2016-10-10 Yao Qi <yao.qi@linaro.org>
1479
1480 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1481
1482 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1483
1484 * target.c (target_supports_multi_process): New function, moved
1485 from...
1486 * target.h (target_supports_multi_process): ... here. Remove
1487 macro.
1488
1489 2016-10-05 Tom Tromey <tom@tromey.com>
1490
1491 PR remote/20655:
1492 * tracepoint.c (handle_tracepoint_bkpts): Check
1493 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1494
1495 2016-10-05 Yao Qi <yao.qi@linaro.org>
1496
1497 * configure.srv: Update the path of arm-*.xml files.
1498
1499 2016-10-05 Terry Guo <terry.guo@arm.com>
1500 Yao Qi <yao.qi@linaro.org>
1501
1502 * Makefile.in: Adjust the path of rules.
1503 * configure.srv: Update the path of xml files.
1504 * regformats/arm-with-iwmmxt.dat: Regenerated.
1505 * regformats/arm-with-neon.dat: Likewise.
1506 * regformats/arm-with-vfpv2.dat: Likewise.
1507 * regformats/arm-with-vfpv3.dat Likewise.
1508
1509 2016-09-30 Yao Qi <yao.qi@linaro.org>
1510
1511 PR gdbserver/20627
1512 * target.c (target_stop_and_wait): Don't call
1513 target_continue_no_signal, use resume_stop instead.
1514
1515 2016-09-26 Yao Qi <yao.qi@linaro.org>
1516
1517 * linux-low.c (linux_wait_1): Call debug_exit.
1518
1519 2016-09-23 Pedro Alves <palves@redhat.com>
1520
1521 * Makefile.in (SFILES): Add common/new-op.c.
1522 (OBS): Add common/new-op.o.
1523 (new-op.o): New rule.
1524
1525 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1526
1527 * .gitinore: Ignore more files.
1528
1529 2016-09-21 Yao Qi <yao.qi@linaro.org>
1530
1531 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1532 23.
1533
1534 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1535
1536 * server.c (start_inferior): Call target_mourn_inferior instead of
1537 mourn_inferior; pass ptid_t argument to it.
1538 (resume): Likewise.
1539 (handle_target_event): Likewise.
1540 * target.c (target_mourn_inferior): New function.
1541 * target.h (mourn_inferior): Delete macro.
1542
1543 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1544
1545 * linux-low.c (lwp_is_stepping): New function.
1546
1547 2016-09-06 Carl Love <cel@us.ibm.com>
1548
1549 * server.c (start_inferior): Fixed comment, requested comment change
1550 didn't get updated correctly. Removed reference to ptrace () call as
1551 it is only true on Linux systems.
1552
1553 2016-09-06 Carl Love <cel@us.ibm.com>
1554
1555 * server.c (start_inferior): Do not call
1556 function target_post_create_inferior () if the
1557 inferior process has already exited.
1558
1559 2016-09-05 Pedro Alves <palves@redhat.com>
1560
1561 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1562 (COMPILE.pre, CC_LD): Use CXX directly.
1563 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1564 * acinclude.m4: Don't include build-with-cxx.m4.
1565 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1566 * configure: Regenerate.
1567
1568 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1569
1570 PR gdb/19495
1571 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1572 call writing data to own_buf.
1573
1574 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1575
1576 * target.c (mywait): Call target_wait instead of
1577 the_target->wait.
1578 (target_wait): New function.
1579
1580 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1581
1582 * server.c (start_inferior): New variable 'ptid'. Replace calls
1583 to the_target->resume by target_continue{,_no_signal}, depending
1584 on the case.
1585 * target.c (target_stop_and_wait): Call target_continue_no_signal
1586 instead of the_target->resume.
1587 (target_continue): New function.
1588
1589 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1590
1591 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1592
1593 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1594
1595 PR server/20491
1596 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1597 ps_prochandle.
1598 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1599 * linux-arm-low.c (ps_get_thread_area): Likewise.
1600 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1601 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1602 * linux-mips-low.c (ps_get_thread_area): Likewise.
1603 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1604 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1605 * linux-x86-low.c (ps_get_thread_area): Likewise.
1606 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1607
1608 2016-08-19 Pedro Alves <palves@redhat.com>
1609
1610 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1611
1612 2016-08-19 Pedro Alves <palves@redhat.com>
1613
1614 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1615 comment. Use memcpy instead of casting through unsigned long.
1616
1617 2016-08-19 Pedro Alves <palves@redhat.com>
1618
1619 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1620 allocating around 0x80000000.
1621
1622 2016-08-19 Pedro Alves <palves@redhat.com>
1623
1624 PR gdb/20415
1625 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1626 (x32-avx512-linux-ipa.o): New rules.
1627 * configure.ac (x86_64-*-linux*): New x32 check.
1628 * configure.srv (ipa_x32_linux_regobj): New.
1629 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1630 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1631 descriptions.
1632 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1633 descriptions.
1634 * configure: Regenerate.
1635
1636 2016-08-09 Pedro Alves <palves@redhat.com>
1637
1638 PR gdb/18653
1639 * Makefile.in (OBS): Add signals-state-save-restore.o.
1640 (signals-state-save-restore.o): New rule.
1641 * config.in: Regenerate.
1642 * configure: Regenerate.
1643 * linux-low.c: Include "signals-state-save-restore.h".
1644 (linux_create_inferior): Call
1645 restore_original_signals_state.
1646 * server.c: Include "dispositions-save-restore.h".
1647 (captured_main): Call save_original_signals_state.
1648
1649 2016-08-05 Pedro Alves <palves@redhat.com>
1650
1651 * configure: Regenerate.
1652
1653 2016-08-04 Yao Qi <yao.qi@linaro.org>
1654
1655 * linux-low.c (regsets_fetch_inferior_registers): Check
1656 errno is ESRCH or not.
1657
1658 2016-08-02 Yao Qi <yao.qi@linaro.org>
1659
1660 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1661 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1662 (thread_db_load_search): Update.
1663 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1664 td_ta_set_event and td_ta_event_getmsg.
1665
1666 2016-07-26 Pedro Alves <palves@redhat.com>
1667
1668 PR server/20414
1669 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1670 of unsigned long for 64-bit registers and use uint32_t instead of
1671 unsigned int for 32-bit registers.
1672
1673 2016-07-26 Pedro Alves <palves@redhat.com>
1674
1675 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1676 to 'ptrace'.
1677
1678 2016-07-21 Tom Tromey <tom@tromey.com>
1679
1680 * configure: Rebuild.
1681
1682 2016-07-21 Yao Qi <yao.qi@linaro.org>
1683
1684 * mem-break.c (find_gdb_breakpoint): Cast bp to
1685 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1686
1687 2016-07-21 Yao Qi <yao.qi@linaro.org>
1688
1689 * server.c (handle_v_requests): Support s and S actions
1690 if target_supports_software_single_step return true.
1691
1692 2016-07-21 Yao Qi <yao.qi@linaro.org>
1693
1694 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1695 is resume_step, call maybe_hw_step.
1696 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1697 and unstop them.
1698 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1699 breakpoints or not.
1700 (proceed_one_lwp): If resume request is resume_step, install
1701 reinsert breakpoints and call maybe_hw_step.
1702
1703 2016-07-21 Yao Qi <yao.qi@linaro.org>
1704
1705 * linux-low.c (proceed_one_lwp): Declare.
1706 (linux_resume_one_thread): Remove local variable 'step'.
1707 Lift code enqueue signal. Call proceed_one_lwp instead of
1708 linux_resume_one_lwp.
1709
1710 2016-07-21 Yao Qi <yao.qi@linaro.org>
1711
1712 * linux-low.c (linux_resume_one_thread): Call
1713 enqueue_pending_signal.
1714
1715 2016-07-21 Yao Qi <yao.qi@linaro.org>
1716
1717 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1718 * inferiors.c (do_restore_current_thread_cleanup): New function.
1719 (make_cleanup_restore_current_thread): Likewise.
1720 * linux-low.c (install_software_single_step_breakpoints): Call
1721 make_cleanup_restore_current_thread. Switch current_thread to
1722 thread.
1723
1724 2016-07-21 Yao Qi <yao.qi@linaro.org>
1725
1726 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1727 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1728 (clone_one_breakpoint): Likewise.
1729 (delete_reinsert_breakpoints): Change parameter to thread.
1730 Callers updated.
1731 (has_reinsert_breakpoints): Likewise.
1732 (uninsert_reinsert_breakpoints): Likewise.
1733 (reinsert_reinsert_breakpoints): Likewise.
1734 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1735 (delete_reinsert_breakpoints): Likewise.
1736 (reinsert_reinsert_breakpoints): Likewise.
1737 (uninsert_reinsert_breakpoints): Likewise.
1738 (has_reinsert_breakpoints): Likewise.
1739
1740 2016-07-21 Yao Qi <yao.qi@linaro.org>
1741
1742 * inferiors.c (get_thread_process): Make parameter const.
1743 * inferiors.h (get_thread_process): Update declaration.
1744 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1745 Add new parameters child_thread and parent_thread. Callers
1746 updated.
1747 * mem-break.h (clone_all_breakpoints): Update declaration.
1748
1749 2016-07-21 Yao Qi <yao.qi@linaro.org>
1750
1751 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1752 <command_list, handler>: Remove.
1753 (struct gdb_breakpoint): New.
1754 (struct other_breakpoint): New.
1755 (struct reinsert_breakpoint): New.
1756 (is_gdb_breakpoint): New function.
1757 (any_persistent_commands): Update command_list if
1758 is_gdb_breakpoint returns true.
1759 (set_breakpoint): Create breakpoints according to their types.
1760 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1761 (set_gdb_breakpoint_1): Likewise.
1762 (set_gdb_breakpoint): Likewise.
1763 (clear_breakpoint_conditions): Change parameter type to
1764 'struct gdb_breakpoint *'.
1765 (clear_breakpoint_commands): Likewise.
1766 (clear_breakpoint_conditions_and_commands): Likewise.
1767 (add_condition_to_breakpoint): Likewise.
1768 (add_breakpoint_condition): Likewise.
1769 (add_commands_to_breakpoint): Likewise.
1770 (check_breakpoints): Check other_breakpoint.
1771 (clone_one_breakpoint): Clone breakpopint according to its type.
1772 * mem-break.h (struct gdb_breakpoint): Declare.
1773 (set_gdb_breakpoint): Update declaration.
1774 (clear_breakpoint_conditions_and_commands): Likewise.
1775 (add_breakpoint_condition): Likewise.
1776 (add_breakpoint_commands): Likewise.
1777 * server.c (process_point_options): Change parameter type to
1778 'struct gdb_breakpoint *'.
1779
1780 2016-07-21 Yao Qi <yao.qi@linaro.org>
1781
1782 * mem-break.c (set_breakpoint_at): Rename it to ...
1783 (set_breakpoint_type_at): ... it.
1784 (set_breakpoint_at): Call set_breakpoint_type_at.
1785 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1786 * mem-break.h (set_breakpoint_at): Update comments.
1787
1788 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1789
1790 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1791 to buf parameter.
1792 (nios2_store_gregset): Likewise.
1793
1794 2016-07-01 Pedro Alves <palves@redhat.com>
1795 Antoine Tremblay <antoine.tremblay@ericsson.com>
1796
1797 * linux-low.c: Change interface to take the target lwp_info
1798 pointer directly and return void. Handle detaching from a zombie
1799 thread.
1800 (linux_detach_lwp_callback): New function.
1801 (linux_detach): Detach from the leader thread after detaching from
1802 the clone threads.
1803
1804 2016-06-28 Yao Qi <yao.qi@linaro.org>
1805
1806 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1807 for variable new_offset.
1808 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1809 (aarch64_ftrace_insn_reloc_cb): Likewise.
1810 (aarch64_ftrace_insn_reloc_tb): Likewise.
1811 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1812 PRIx64 instead of PRIx32.
1813
1814 2016-06-28 Yao Qi <yao.qi@linaro.org>
1815
1816 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1817 (the_low_target): Install arm_get_syscall_trapinfo.
1818
1819 2016-06-28 Yao Qi <yao.qi@linaro.org>
1820
1821 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1822 function.
1823 (the_low_target): Install aarch64_get_syscall_trapinfo.
1824
1825 2016-06-28 Yao Qi <yao.qi@linaro.org>
1826
1827 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1828 Callers updated.
1829 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1830 Remove parameter sysno.
1831 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1832 sysret.
1833
1834 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1835
1836 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1837 (s390_emit_ne_goto): Likewise.
1838 (s390_emit_lt_goto): Likewise.
1839 (s390_emit_le_goto): Likewise.
1840 (s390_emit_gt_goto): Likewise.
1841 (s390_emit_ge_goto): Likewise.
1842 (s390x_emit_eq_goto): Likewise.
1843 (s390x_emit_ne_goto): Likewise.
1844 (s390x_emit_lt_goto): Likewise.
1845 (s390x_emit_le_goto): Likewise.
1846 (s390x_emit_gt_goto): Likewise.
1847 (s390x_emit_ge_goto): Likewise.
1848 (s390_emit_ops_impl): Mark variable static.
1849 (s390x_emit_ops): Likewise.
1850
1851 2016-06-17 Yao Qi <yao.qi@linaro.org>
1852
1853 * linux-low.c (handle_extended_wait): Call
1854 uninsert_reinsert_breakpoints for the parent process. Remove
1855 reinsert breakpoints from the child process. Reinsert them to
1856 the parent process when vfork is done.
1857 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1858 (reinsert_reinsert_breakpoints): New function.
1859 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1860 (reinsert_reinsert_breakpoints): Declare.
1861
1862 2016-06-17 Yao Qi <yao.qi@linaro.org>
1863
1864 * linux-low.c (handle_extended_wait): If the parent is doing
1865 step-over, remove the reinsert breakpoints from the forked child.
1866
1867 2016-06-17 Yao Qi <yao.qi@linaro.org>
1868
1869 * linux-low.c (unsuspend_all_lwps): Declare.
1870 (linux_low_filter_event): If thread exited, call finish_step_over.
1871 If step-over is finished, unsuspend other threads.
1872
1873 2016-06-17 Yao Qi <yao.qi@linaro.org>
1874
1875 * linux-low.c (linux_resume_one_lwp_throw): Assert
1876 has_reinsert_breakpoints returns false.
1877 * mem-break.c (delete_disabled_breakpoints): Assert
1878 bp type isn't reinsert_breakpoint.
1879
1880 2016-06-17 Yao Qi <yao.qi@linaro.org>
1881
1882 * linux-low.c (maybe_hw_step): New function.
1883 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1884 (finish_step_over): Switch current_thread to lwp temporarily,
1885 and assert has_reinsert_breakpoints returns true.
1886 (proceed_one_lwp): Call maybe_hw_step.
1887 * mem-break.c (has_reinsert_breakpoints): New function.
1888 * mem-break.h (has_reinsert_breakpoints): Declare.
1889
1890 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1891
1892 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1893
1894 2016-05-17 Yao Qi <yao.qi@linaro.org>
1895
1896 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1897 instead of find_inferior.
1898
1899 2016-05-05 Yao Qi <yao.qi@linaro.org>
1900
1901 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1902 Initialize res to zero.
1903
1904 2016-05-05 Yao Qi <yao.qi@linaro.org>
1905
1906 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1907 to uint32_t.
1908
1909 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1910
1911 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1912 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1913 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1914
1915 2016-04-28 Par Olsson <par.olsson@windriver.com>
1916 Simon Marchi <simon.marchi@ericsson.com>
1917
1918 * tracepoint.c (write_inferior_int8): New function.
1919 (cmd_qtenable_disable): Write enable flag using
1920 write_inferior_int8.
1921
1922 2016-04-25 Yao Qi <yao.qi@linaro.org>
1923
1924 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1925 (need_step_over_p): Return zero if the LWP has pending signals
1926 can be delivered on software single step target.
1927
1928 2016-04-25 Yao Qi <yao.qi@linaro.org>
1929
1930 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1931 return instead of error.
1932
1933 2016-04-22 Yao Qi <yao.qi@linaro.org>
1934
1935 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1936 to 23.
1937
1938 2016-04-22 Yao Qi <yao.qi@linaro.org>
1939
1940 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1941 signal when stepping over breakpoint with software single
1942 step.
1943
1944 2016-04-21 Pedro Alves <palves@redhat.com>
1945
1946 * linux-s390-low.c (s390_collect_ptrace_register)
1947 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1948 add casts.
1949 (s390_check_regset): Use void * instead of gdb_byte *.
1950
1951 2016-04-20 Pedro Alves <palves@redhat.com>
1952
1953 * configure: Renegerate.
1954
1955 2016-04-20 Yao Qi <yao.qi@linaro.org>
1956
1957 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1958 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1959 number 16.
1960 (arm_store_gregset): Likewise.
1961
1962 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1963
1964 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1965 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1966 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1967 (amd64-avx-mpx-linux.c): New rules.
1968 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1969 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1970 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1971 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1972 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1973 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1974 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1975 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1976 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1977 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1978 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1979 * linux-x86-low.c (x86_linux_read_description): Add case for
1980 X86_XSTATE_AVX_MPX_MASK.
1981 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1982 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1983 init_registers_i386_avx_mpx_linux.
1984 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1985 (initialize_low_tracepoint): Call
1986 init_registers_i386_avx_mpx_linux.
1987 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1988 (initialize_low_tracepoint): Call
1989 init_registers_amd64_avx_mpx_linux.
1990 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1991 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1992 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1993 declarations.
1994
1995 2016-04-18 Pedro Alves <palves@redhat.com>
1996
1997 * configure: Regenerate.
1998
1999 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2000
2001 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2002 (aarch64_emit_sub): Likewise.
2003
2004 2016-04-12 Pedro Alves <palves@redhat.com>
2005
2006 * utils.c (prepare_to_throw_exception): Delete.
2007
2008 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2009
2010 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2011
2012 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2013
2014 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2015
2016 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2017
2018 * linux-aarch64-ipa.c: Add <elf.h> include.
2019 * linux-ppc-ipa.c: Add <elf.h> include.
2020 * linux-s390-ipa.c: Add <elf.h> include.
2021
2022 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2023
2024 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2025 (get_raw_reg_ptr): Likewise.
2026 (get_trace_state_variable_value_ptr): Likewise.
2027 (set_trace_state_variable_value_ptr): Likewise.
2028 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2029 char *.
2030
2031 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2032 Marcin Kościelnicki <koriakin@0x04.net>
2033
2034 PR/17221
2035 * linux-ppc-low.c (emit_insns): New function.
2036 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2037 (ppc_emit_prologue): New function.
2038 (ppc_emit_epilogue): New function.
2039 (ppc_emit_add): New function.
2040 (ppc_emit_sub): New function.
2041 (ppc_emit_mul): New function.
2042 (ppc_emit_lsh): New function.
2043 (ppc_emit_rsh_signed): New function.
2044 (ppc_emit_rsh_unsigned): New function.
2045 (ppc_emit_ext): New function.
2046 (ppc_emit_zero_ext): New function.
2047 (ppc_emit_log_not): New function.
2048 (ppc_emit_bit_and): New function.
2049 (ppc_emit_bit_or): New function.
2050 (ppc_emit_bit_xor): New function.
2051 (ppc_emit_bit_not): New function.
2052 (ppc_emit_equal): New function.
2053 (ppc_emit_less_signed): New function.
2054 (ppc_emit_less_unsigned): New function.
2055 (ppc_emit_ref): New function.
2056 (ppc_emit_const): New function.
2057 (ppc_emit_reg): New function.
2058 (ppc_emit_pop): New function.
2059 (ppc_emit_stack_flush): New function.
2060 (ppc_emit_swap): New function.
2061 (ppc_emit_stack_adjust): New function.
2062 (ppc_emit_call): New function.
2063 (ppc_emit_int_call_1): New function.
2064 (ppc_emit_void_call_2): New function.
2065 (ppc_emit_if_goto): New function.
2066 (ppc_emit_goto): New function.
2067 (ppc_emit_eq_goto): New function.
2068 (ppc_emit_ne_goto): New function.
2069 (ppc_emit_lt_goto): New function.
2070 (ppc_emit_le_goto): New function.
2071 (ppc_emit_gt_goto): New function.
2072 (ppc_emit_ge_goto): New function.
2073 (ppc_write_goto_address): New function.
2074 (ppc_emit_ops_impl): New static variable.
2075 (ppc64v1_emit_prologue): New function.
2076 (ppc64v2_emit_prologue): New function.
2077 (ppc64_emit_epilogue): New function.
2078 (ppc64_emit_add): New function.
2079 (ppc64_emit_sub): New function.
2080 (ppc64_emit_mul): New function.
2081 (ppc64_emit_lsh): New function.
2082 (ppc64_emit_rsh_signed): New function.
2083 (ppc64_emit_rsh_unsigned): New function.
2084 (ppc64_emit_ext): New function.
2085 (ppc64_emit_zero_ext): New function.
2086 (ppc64_emit_log_not): New function.
2087 (ppc64_emit_bit_and): New function.
2088 (ppc64_emit_bit_or): New function.
2089 (ppc64_emit_bit_xor): New function.
2090 (ppc64_emit_bit_not): New function.
2091 (ppc64_emit_equal): New function.
2092 (ppc64_emit_less_signed): New function.
2093 (ppc64_emit_less_unsigned): New function.
2094 (ppc64_emit_ref): New function.
2095 (ppc64_emit_const): New function.
2096 (ppc64v1_emit_reg): New function.
2097 (ppc64v2_emit_reg): New function.
2098 (ppc64_emit_pop): New function.
2099 (ppc64_emit_stack_flush): New function.
2100 (ppc64_emit_swap): New function.
2101 (ppc64v1_emit_call): New function.
2102 (ppc64v2_emit_call): New function.
2103 (ppc64v1_emit_int_call_1): New function.
2104 (ppc64v2_emit_int_call_1): New function.
2105 (ppc64v1_emit_void_call_2): New function.
2106 (ppc64v2_emit_void_call_2): New function.
2107 (ppc64_emit_if_goto): New function.
2108 (ppc64_emit_eq_goto): New function.
2109 (ppc64_emit_ne_goto): New function.
2110 (ppc64_emit_lt_goto): New function.
2111 (ppc64_emit_le_goto): New function.
2112 (ppc64_emit_gt_goto): New function.
2113 (ppc64_emit_ge_goto): New function.
2114 (ppc64v1_emit_ops_impl): New static variable.
2115 (ppc64v2_emit_ops_impl): New static variable.
2116 (ppc_emit_ops): New function.
2117 (linux_low_target): Wire in ppc_emit_ops.
2118
2119 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2120 Marcin Kościelnicki <koriakin@0x04.net>
2121
2122 PR/17221
2123 * Makefile.in: Add powerpc-*-ipa.o
2124 * configure.srv: Add ipa_obj for powerpc*-linux.
2125 * linux-ppc-ipa.c: New file.
2126 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2127 includes.
2128 (PPC_FIELD): New macro.
2129 (PPC_SEXT): New macro.
2130 (PPC_OP6): New macro.
2131 (PPC_BO): New macro.
2132 (PPC_LI): New macro.
2133 (PPC_BD): New macro.
2134 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2135 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2136 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2137 (ppc_get_thread_area): New function.
2138 (is_elfv2_inferior): New function.
2139 (gen_ds_form): New function.
2140 (GEN_STD): New macro.
2141 (GEN_STDU): New macro.
2142 (GEN_LD): New macro.
2143 (GEN_LDU): New macro.
2144 (gen_d_form): New function.
2145 (GEN_ADDI): New macro.
2146 (GEN_ADDIS): New macro.
2147 (GEN_LI): New macro.
2148 (GEN_LIS): New macro.
2149 (GEN_ORI): New macro.
2150 (GEN_ORIS): New macro.
2151 (GEN_LWZ): New macro.
2152 (GEN_STW): New macro.
2153 (GEN_STWU): New macro.
2154 (gen_xfx_form): New function.
2155 (GEN_MFSPR): New macro.
2156 (GEN_MTSPR): New macro.
2157 (GEN_MFCR): New macro.
2158 (GEN_MTCR): New macro.
2159 (GEN_SYNC): New macro.
2160 (GEN_LWSYNC): New macro.
2161 (gen_x_form): New function.
2162 (GEN_OR): New macro.
2163 (GEN_MR): New macro.
2164 (GEN_LWARX): New macro.
2165 (GEN_STWCX): New macro.
2166 (GEN_CMPW): New macro.
2167 (gen_md_form): New function.
2168 (GEN_RLDICL): New macro.
2169 (GEN_RLDICR): New macro.
2170 (gen_i_form): New function.
2171 (GEN_B): New macro.
2172 (GEN_BL): New macro.
2173 (gen_b_form): New function.
2174 (GEN_BNE): New macro.
2175 (GEN_LOAD): New macro.
2176 (GEN_STORE): New macro.
2177 (gen_limm): New function.
2178 (gen_atomic_xchg): New function.
2179 (gen_call): New function.
2180 (ppc_relocate_instruction): New function.
2181 (ppc_install_fast_tracepoint_jump_pad): New function.
2182 (ppc_get_min_fast_tracepoint_insn_len): New function.
2183 (ppc_get_ipa_tdesc_idx): New function.
2184 (the_low_target): Wire in the new functions.
2185 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2186 tdescs.
2187 * linux-ppc-tdesc.h: New file.
2188
2189 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2190
2191 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2192 (alloc_jump_pad_buffer): New function.
2193 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2194 (alloc_jump_pad_buffer): New function.
2195 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2196 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2197 (alloc_jump_pad_buffer): New function.
2198 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2199 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2200 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2201 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2202
2203 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2204
2205 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2206 * linux-amd64-ipa.c: Likewise.
2207 * linux-i386-ipa.c: Likewise.
2208 * linux-s390-ipa.c: Likewise.
2209 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2210 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2211 set_trace_state_variable_value_ptr.
2212 (struct ipa_sym_addresses): Likewise.
2213 (symbol_list): Likewise.
2214 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2215 accessing gdb_collect directly.
2216 (gdb_collect_ptr_type): New typedef.
2217 (get_raw_reg_ptr_type): New typedef.
2218 (get_trace_state_variable_value_ptr_type): New typedef.
2219 (set_trace_state_variable_value_ptr_type): New typedef.
2220 (gdb_collect_ptr): New global.
2221 (get_raw_reg_ptr): New global.
2222 (get_trace_state_variable_value_ptr): New global.
2223 (set_trace_state_variable_value_ptr): New global.
2224 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2225 accessing get_raw_reg directly.
2226 (get_get_tsv_func_addr): Likewise for
2227 get_trace_state_variable_value_ptr.
2228 (get_set_tsv_func_addr): Likewise for
2229 set_trace_state_variable_value_ptr.
2230 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2231
2232 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2233
2234 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2235
2236 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2237
2238 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2239 packets.
2240 (relocate_instruction): Remove own_buf.
2241 * server.c (own_buf): Make global.
2242 (handle_v_requests): Make global.
2243 * server.h (own_buf): New declaration.
2244 (handle_v_requests): New prototype.
2245
2246 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2247
2248 PR 18377
2249 * linux-s390-low.c (add_insns): New function.
2250 (s390_emit_prologue): New function.
2251 (s390_emit_epilogue): New function.
2252 (s390_emit_add): New function.
2253 (s390_emit_sub): New function.
2254 (s390_emit_mul): New function.
2255 (s390_emit_lsh): New function.
2256 (s390_emit_rsh_signed): New function.
2257 (s390_emit_rsh_unsigned): New function.
2258 (s390_emit_ext): New function.
2259 (s390_emit_log_not): New function.
2260 (s390_emit_bit_and): New function.
2261 (s390_emit_bit_or): New function.
2262 (s390_emit_bit_xor): New function.
2263 (s390_emit_bit_not): New function.
2264 (s390_emit_equal): New function.
2265 (s390_emit_less_signed): New function.
2266 (s390_emit_less_unsigned): New function.
2267 (s390_emit_ref): New function.
2268 (s390_emit_if_goto): New function.
2269 (s390_emit_goto): New function.
2270 (s390_write_goto_address): New function.
2271 (s390_emit_litpool): New function.
2272 (s390_emit_const): New function.
2273 (s390_emit_call): New function.
2274 (s390_emit_reg): New function.
2275 (s390_emit_pop): New function.
2276 (s390_emit_stack_flush): New function.
2277 (s390_emit_zero_ext): New function.
2278 (s390_emit_swap): New function.
2279 (s390_emit_stack_adjust): New function.
2280 (s390_emit_set_r2): New function.
2281 (s390_emit_int_call_1): New function.
2282 (s390_emit_void_call_2): New function.
2283 (s390_emit_eq_goto): New function.
2284 (s390_emit_ne_goto): New function.
2285 (s390_emit_lt_goto): New function.
2286 (s390_emit_le_goto): New function.
2287 (s390_emit_gt_goto): New function.
2288 (s390_emit_ge_goto): New function.
2289 (s390x_emit_prologue): New function.
2290 (s390x_emit_epilogue): New function.
2291 (s390x_emit_add): New function.
2292 (s390x_emit_sub): New function.
2293 (s390x_emit_mul): New function.
2294 (s390x_emit_lsh): New function.
2295 (s390x_emit_rsh_signed): New function.
2296 (s390x_emit_rsh_unsigned): New function.
2297 (s390x_emit_ext): New function.
2298 (s390x_emit_log_not): New function.
2299 (s390x_emit_bit_and): New function.
2300 (s390x_emit_bit_or): New function.
2301 (s390x_emit_bit_xor): New function.
2302 (s390x_emit_bit_not): New function.
2303 (s390x_emit_equal): New function.
2304 (s390x_emit_less_signed): New function.
2305 (s390x_emit_less_unsigned): New function.
2306 (s390x_emit_ref): New function.
2307 (s390x_emit_if_goto): New function.
2308 (s390x_emit_const): New function.
2309 (s390x_emit_call): New function.
2310 (s390x_emit_reg): New function.
2311 (s390x_emit_pop): New function.
2312 (s390x_emit_stack_flush): New function.
2313 (s390x_emit_zero_ext): New function.
2314 (s390x_emit_swap): New function.
2315 (s390x_emit_stack_adjust): New function.
2316 (s390x_emit_int_call_1): New function.
2317 (s390x_emit_void_call_2): New function.
2318 (s390x_emit_eq_goto): New function.
2319 (s390x_emit_ne_goto): New function.
2320 (s390x_emit_lt_goto): New function.
2321 (s390x_emit_le_goto): New function.
2322 (s390x_emit_gt_goto): New function.
2323 (s390x_emit_ge_goto): New function.
2324 (s390_emit_ops): New function.
2325 (struct linux_target_ops): Fill in emit_ops hook.
2326
2327 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2328
2329 PR 18377
2330 * Makefile.in: Add s390 IPA files.
2331 * configure.srv: Build IPA for s390.
2332 * linux-s390-ipa.c: New file.
2333 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2334 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2335 (tdesc_s390_linux32): Likewise.
2336 (init_registers_s390_linux32v1): Likewise.
2337 (tdesc_s390_linux32v1): Likewise.
2338 (init_registers_s390_linux32v2): Likewise.
2339 (tdesc_s390_linux32v2): Likewise.
2340 (init_registers_s390_linux64): Likewise.
2341 (tdesc_s390_linux64): Likewise.
2342 (init_registers_s390_linux64v1): Likewise.
2343 (tdesc_s390_linux64v1): Likewise.
2344 (init_registers_s390_linux64v2): Likewise.
2345 (tdesc_s390_linux64v2): Likewise.
2346 (init_registers_s390_te_linux64): Likewise.
2347 (tdesc_s390_te_linux64): Likewise.
2348 (init_registers_s390_vx_linux64): Likewise.
2349 (tdesc_s390_vx_linux64): Likewise.
2350 (init_registers_s390_tevx_linux64): Likewise.
2351 (tdesc_s390_tevx_linux64): Likewise.
2352 (init_registers_s390x_linux64): Likewise.
2353 (tdesc_s390x_linux64): Likewise.
2354 (init_registers_s390x_linux64v1): Likewise.
2355 (tdesc_s390x_linux64v1): Likewise.
2356 (init_registers_s390x_linux64v2): Likewise.
2357 (tdesc_s390x_linux64v2): Likewise.
2358 (init_registers_s390x_te_linux64): Likewise.
2359 (tdesc_s390x_te_linux64): Likewise.
2360 (init_registers_s390x_vx_linux64): Likewise.
2361 (tdesc_s390x_vx_linux64): Likewise.
2362 (init_registers_s390x_tevx_linux64): Likewise.
2363 (tdesc_s390x_tevx_linux64): Likewise.
2364 (have_hwcap_s390_vx): New static variable.
2365 (s390_arch_setup): Fill have_hwcap_s390_vx.
2366 (s390_get_thread_area): New function.
2367 (s390_ft_entry_gpr_esa): New const.
2368 (s390_ft_entry_gpr_zarch): New const.
2369 (s390_ft_entry_misc): New const.
2370 (s390_ft_entry_fr): New const.
2371 (s390_ft_entry_vr): New const.
2372 (s390_ft_main_31): New const.
2373 (s390_ft_main_64): New const.
2374 (s390_ft_exit_fr): New const.
2375 (s390_ft_exit_vr): New const.
2376 (s390_ft_exit_misc): New const.
2377 (s390_ft_exit_gpr_esa): New const.
2378 (s390_ft_exit_gpr_zarch): New const.
2379 (append_insns): New function.
2380 (s390_relocate_instruction): New function.
2381 (s390_install_fast_tracepoint_jump_pad): New function.
2382 (s390_get_min_fast_tracepoint_insn_len): New function.
2383 (s390_get_ipa_tdesc_idx): New function.
2384 (struct linux_target_ops): Wire in the above functions.
2385 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2386 * linux-s390-tdesc.h: New file.
2387
2388 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2389
2390 * linux-s390-low.c (s390_supports_tracepoints): New function.
2391 (struct linux_target_ops): Fill supports_tracepoints hook.
2392
2393 2016-03-18 Yao Qi <yao.qi@linaro.org>
2394
2395 * linux-low.c (lwp_signal_can_be_delivered): New function.
2396 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2397
2398 2016-03-18 Yao Qi <yao.qi@linaro.org>
2399
2400 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2401 0 if signal is enqueued. Remove 'signal' from one debugging
2402 message. Move one debugging message to some lines below.
2403 Remove code setting 'signal' to 0.
2404
2405 2016-03-18 Yao Qi <yao.qi@linaro.org>
2406
2407 * linux-low.c (linux_low_filter_event): Remove redundant
2408 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2409
2410 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2411
2412 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2413 (struct linux_target_ops): Wire in the above.
2414
2415 2016-03-03 Yao Qi <yao.qi@linaro.org>
2416
2417 * linux-low.c: Update comments to start_step_over.
2418
2419 2016-03-03 Yao Qi <yao.qi@linaro.org>
2420
2421 PR server/19736
2422 * linux-low.c (handle_extended_wait): Set child suspended
2423 if event_lwp->bp_reinsert isn't zero.
2424
2425 2016-03-02 Yao Qi <yao.qi@linaro.org>
2426
2427 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2428 enqueue_pending_signal.
2429
2430 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2431
2432 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2433 is actually loaded.
2434
2435 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2436
2437 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2438 (s390_regmap_3264) [!__s390x__]: New global.
2439 (s390_collect_ptrace_register): Skip map entries containing -1.
2440 (s390_supply_ptrace_register): Ditto.
2441 (s390_fill_gprs_high): New function.
2442 (s390_store_gprs_high): New function.
2443 (s390_regsets): Add NT_S390_HIGH_GPRS.
2444 (s390_get_hwcap): Enable on 31-bit.
2445 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2446 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2447 Detect NT_S390_HIGH_GPRS.
2448 (s390_usrregs_info_3264): Enable on 31-bit.
2449 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2450 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2451
2452 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2453
2454 PR gdb/13808
2455 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2456 * configure.srv: Ditto.
2457 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2458 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2459 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2460 (init_registers_amd64_linux): Remove prototype.
2461 (tdesc_amd64_linux): Remove declaration.
2462 (get_ipa_tdesc): New function.
2463 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2464 initialize remaining tdescs.
2465 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2466 (init_registers_i386_linux): Remove prototype.
2467 (tdesc_i386_linux): Remove declaration.
2468 (get_ipa_tdesc): New function.
2469 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2470 initialize remaining tdescs.
2471 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2472 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2473 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2474 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2475 (x86_get_ipa_tdesc_idx): New function.
2476 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2477 * linux-x86-tdesc.h: New file.
2478 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2479 (target_get_ipa_tdesc_idx): New macro.
2480 * tracepoint.c (ipa_tdesc_idx): New macro.
2481 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2482 (symbol_list): Add ipa_tdesc_idx.
2483 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2484 (ipa_tdesc): Remove.
2485 (ipa_tdesc_idx): New variable.
2486 (get_context_regcache): Use get_ipa_tdesc.
2487 (gdb_collect): Ditto.
2488 (gdb_probe): Ditto.
2489 * tracepoint.h (get_ipa_tdesc): New prototype.
2490 (ipa_tdesc): Remove.
2491
2492 2016-02-24 Pedro Alves <palves@redhat.com>
2493
2494 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2495 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2496 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2497 Factor out common code between the USE_SIGTRAP_SIGINFO and
2498 !USE_SIGTRAP_SIGINFO blocks.
2499 (linux_low_filter_event): Call save_stop_reason instead of
2500 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2501 Update comments.
2502 (linux_wait_1): Update comments.
2503
2504 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2505
2506 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2507 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2508 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2509 ppc_insert_point, ppc_remove_point.
2510
2511 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2512
2513 * linux-s390-low.c (s390_supports_z_point_type): New function.
2514 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2515
2516 2016-02-16 Yao Qi <yao.qi@linaro.org>
2517
2518 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2519 PC. Get pc from regcache_read_pc.
2520
2521 2016-02-12 Yao Qi <yao.qi@linaro.org>
2522
2523 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2524 or linux_get_pc_32bit.
2525 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2526
2527 2016-02-12 Yao Qi <yao.qi@linaro.org>
2528
2529 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2530 arm_linux_get_next_pcs_fixup.
2531
2532 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2533
2534 * tracepoint.c (x_tracepoint_action_download): Change
2535 write_inferior_data_ptr to write_inferior_data_pointer.
2536 (cmd_qtstart): Likewise.
2537 (write_inferior_data_ptr): Remove.
2538 (download_agent_expr): Change write_inferior_data_ptr to
2539 write_inferior_data_pointer.
2540 (download_tracepoint_1): Likewise.
2541 (download_tracepoint): Likewise.
2542 (download_trace_state_variables): Likewise.
2543
2544 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2545 Marcin Kościelnicki <koriakin@0x04.net>
2546
2547 * tracepoint.c (struct tracepoint_action_ops): Remove.
2548 (struct tracepoint_action): Remove ops.
2549 (m_tracepoint_action_download, r_tracepoint_action_download)
2550 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2551 size and offset accordingly.
2552 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2553 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2554 (tracepoint_action_send, tracepoint_action_download): New functions.
2555 Helpers for trace action handlers.
2556 (add_tracepoint_action): Remove setup actions ops.
2557 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2558
2559 2016-02-10 Yao Qi <yao.qi@linaro.org>
2560
2561 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2562
2563 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2564
2565 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2566 to AC_OUTPUT.
2567 * configure: Regenerate.
2568
2569 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2570
2571 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2572 void * to gdb_byte *.
2573 * linux-low.c (siginfo_fixup): Likewise.
2574 (linux_xfer_siginfo): Likewise.
2575 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2576 Likewise.
2577 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2578
2579 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2580
2581 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2582 to srv_tgtobj.
2583 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2584 to srv_tgtobj.
2585 * linux-x86-low.c [__x86_64__]: Include
2586 "nat/amd64-linux-siginfo.h".
2587 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2588 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2589 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2590 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2591 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2592 (cpt_si_fd, si_timerid, si_overrun): Move from
2593 nat/amd64-linux-siginfo.c.
2594 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2595
2596 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2597
2598 * server.c (skip_to_semicolon): Remove.
2599 (process_point_options): Use strchrnul instead of
2600 skip_to_semicolon.
2601
2602 2016-01-26 Yao Qi <yao.qi@linaro.org>
2603
2604 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2605 * linux-low.c (install_software_single_step_breakpoints): Don't
2606 call regcache_read_pc.
2607 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2608 argument pc.
2609
2610 2016-01-26 Yao Qi <yao.qi@linaro.org>
2611
2612 * linux-low.c (install_software_single_step_breakpoints): Call
2613 regcache_read_pc instead of get_pc.
2614
2615 2016-01-26 Yao Qi <yao.qi@linaro.org>
2616
2617 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2618 (unblock_async_io): Rename to ...
2619 (block_unblock_async_io): ... it. New function.
2620 (enable_async_io): Don't install SIGIO handler. Unblock it
2621 instead.
2622 (disable_async_io): Don't ignore SIGIO. Block it instead.
2623 (initialize_async_io): Install SIGIO handler. Don't call
2624 unblock_async_io.
2625
2626 2016-01-26 Yao Qi <yao.qi@linaro.org>
2627
2628 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2629 first character is '\003', call *the_target->request_interrupt.
2630
2631 2016-01-25 Yao Qi <yao.qi@linaro.org>
2632
2633 * remote-utils.c (new_thread_notify): Remove.
2634 (dead_thread_notify): Likewise.
2635 * remote-utils.h (new_thread_notify): Remove declaration.
2636 (dead_thread_notify): Likewise.
2637
2638 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2639
2640 * gdb.trace/pending.exp: Fix expected message on continue.
2641
2642 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2643
2644 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2645 it works properly on big-endian machines where sizeof (CORE_ADDR)
2646 != sizeof (void *).
2647
2648 2016-01-21 Pedro Alves <palves@redhat.com>
2649
2650 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2651 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2652 * configure: Regenerate.
2653
2654 2016-01-21 Yao Qi <yao.qi@linaro.org>
2655
2656 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2657 is_thumb and set it according to CPSR saved on the stack.
2658 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2659 arm_sigreturn_next_pc.
2660
2661 2016-01-18 Yao Qi <yao.qi@linaro.org>
2662
2663 * linux-low.c (linux_set_pc_64bit): New function.
2664 (linux_get_pc_64bit): New function.
2665 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2666 Declare.
2667 * linux-sparc-low.c (debug_threads): Remove declaration.
2668 (sparc_get_pc): Remove.
2669 (the_low_target): Use linux_get_pc_64bit instead of
2670 sparc_get_pc.
2671 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2672 (the_low_target): Use linux_get_pc_64bit and
2673 linux_set_pc_64bit.
2674
2675 2016-01-18 Yao Qi <yao.qi@linaro.org>
2676
2677 * linux-arm-low.c (debug_threads): Remove declaration.
2678 (arm_get_pc, arm_set_pc): Remove.
2679 (the_low_target): Use linux_get_pc_32bit and
2680 linux_set_pc_32bit.
2681 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2682 (the_low_target): Use linux_get_pc_32bit and
2683 linux_set_pc_32bit.
2684 * linux-cris-low.c (debug_threads): Remove declaration.
2685 (cris_get_pc, cris_set_pc,): Remove.
2686 (the_low_target): Use linux_get_pc_32bit and
2687 linux_set_pc_32bit.
2688 * linux-crisv32-low.c (debug_threads): Remove declaration.
2689 (cris_get_pc, cris_set_pc): Remove.
2690 (the_low_target): Use linux_get_pc_32bit and
2691 linux_set_pc_32bit.
2692 * linux-low.c: Include inttypes.h.
2693 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2694 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2695 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2696 (the_low_target): Use linux_get_pc_32bit and
2697 linux_set_pc_32bit.
2698 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2699 (the_low_target): Use linux_get_pc_32bit and
2700 linux_set_pc_32bit.
2701 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2702 (the_low_target): Use linux_get_pc_32bit and
2703 linux_set_pc_32bit.
2704 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2705 (the_low_target): Use linux_get_pc_32bit and
2706 linux_set_pc_32bit.
2707 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2708 (the_low_target): Use linux_get_pc_32bit and
2709 linux_set_pc_32bit.
2710
2711 2016-01-18 Gary Benson <gbenson@redhat.com>
2712
2713 * configure.ac (AC_FUNC_FORK): New check.
2714 * config.in: Regenerate.
2715 * configure: Likewise.
2716
2717 2016-01-14 Yao Qi <yao.qi@linaro.org>
2718
2719 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2720 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2721 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2722 arm_get_next_pcs_ctor.
2723
2724 2016-01-12 Josh Stone <jistone@redhat.com>
2725 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2726
2727 * inferiors.h: Include "gdb_vecs.h".
2728 (struct process_info): Add syscalls_to_catch.
2729 * inferiors.c (remove_process): Free syscalls_to_catch.
2730 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2731 syscall_return stops.
2732 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2733 * server.c (handle_general_set): Handle QCatchSyscalls.
2734 (handle_query): Report support for QCatchSyscalls.
2735 * target.h (struct target_ops): Add supports_catch_syscall.
2736 (target_supports_catch_syscall): New macro.
2737 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2738 (struct lwp_info): Add syscall_state.
2739 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2740 Maintain syscall_state and syscalls_to_catch across exec.
2741 (get_syscall_trapinfo): New function, proxy to the_low_target.
2742 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2743 (linux_low_filter_event): Toggle syscall_state entry/return for
2744 syscall traps, and set it ignored for all others.
2745 (gdb_catching_syscalls_p): New function.
2746 (gdb_catch_this_syscall_p): New function.
2747 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2748 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2749 (linux_supports_catch_syscall): New function.
2750 (linux_target_ops): Install it.
2751 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2752 (the_low_target): Install it.
2753
2754 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2755
2756 * acinclude.m4: Include new ../warning.m4 file.
2757 * configure: Regenerated.
2758 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2759
2760 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2761
2762 * ax.c (is_goto_target): Mark static.
2763 * linux-low.c (register_addr): Likewise.
2764 (linux_fetch_registers, linux_store_registers): Likewise.
2765 * mem-break.c (any_persistent_commands): Fix old prototype.
2766 (add_commands_to_breakpoint): Mark static.
2767 * regcache.c (find_register_by_name): Delete unused func.
2768 * remote-utils.c (hex_or_minus_one): Mark static.
2769 * server.c (monitor_show_help): Mark static.
2770 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2771 handle_v_requests): Likewise.
2772
2773 2016-01-12 Pedro Alves <palves@redhat.com>
2774
2775 Remove use of the registered trademark symbol throughout.
2776
2777 2016-01-08 Yao Qi <yao.qi@linaro.org>
2778
2779 * remote-utils.c (getpkt): If c is '\003', call target hook
2780 request_interrupt.
2781
2782 2016-01-06 Yao Qi <yao.qi@linaro.org>
2783
2784 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2785 linux-aarch32-low.c.
2786 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2787 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2788 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2789 (thumb2_breakpoint): Declare.
2790 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2791 linux-aarch32-low.h.
2792 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2793 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2794 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2795
2796 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2797
2798 * gdbreplay.c (gdbreplay_version): Change copyright year in
2799 version message.
2800 * server.c (gdbserver_version): Likewise.
2801
2802 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2803
2804 * server.c (crc32_table): Delete.
2805 (crc32): Use libiberty's xcrc32 function.
2806
2807 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2808
2809 * lynx-low.c (lynx_delete_thread_callback): New function.
2810 (lynx_mourn): Properly delete our process and all of its
2811 threads. Remove call to clear_inferiors.
2812
2813 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2814
2815 * target.c (thread_search_callback): Add check that
2816 the thread_stopped target callback is not NULL before
2817 calling it.
2818
2819 2015-12-21 Yao Qi <yao.qi@linaro.org>
2820
2821 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2822 arm breakpoint.
2823
2824 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2825
2826 * server.c (handle_query): Call target_supports_software_single_step.
2827
2828 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2829
2830 * linux-low.c (single_step): New function.
2831 (linux_resume_one_lwp_throw): Call single_step.
2832 (start_step_over): Likewise.
2833
2834 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2835
2836 * Makefile.in (SFILES): Append arch/arm-linux.c,
2837 arch/arm-get-next-pcs.c.
2838 (arm-linux.o): New rule.
2839 (arm-get-next-pcs.o): New rule.
2840 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2841 arm-linux.o.
2842 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2843 to linux-aarch32-low.c.
2844 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2845 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2846 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2847 (thumb2_breakpoint_len): Likewise.
2848 (arm_is_thumb_mode): Make non-static.
2849 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2850 from linux-aarch32-low.c.
2851 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2852 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2853 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2854 (thumb2_breakpoint_len): Likewise.
2855 (arm_is_thumb_mode): New declaration.
2856 * linux-arm-low.c: Include arch/arm-linux.h
2857 aarch/arm-get-next-pcs.h, sys/syscall.h.
2858 (get_next_pcs_ops): New struct.
2859 (get_next_pcs_addr_bits_remove): New function.
2860 (get_next_pcs_is_thumb): New function.
2861 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2862 (arm_sigreturn_next_pc): Likewise.
2863 (get_next_pcs_syscall_next_pc): Likewise.
2864 (arm_gdbserver_get_next_pcs): Likewise.
2865 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2866 Initialize.
2867 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2868 * server.h: Include gdb_vecs.h.
2869
2870 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2871
2872 * Makefile.in (SFILES): Append common/common-regcache.c.
2873 (OBS): Append common-regcache.o.
2874 (common-regcache.o): New rule.
2875 * regcache.c (init_register_cache): Initialize cache to
2876 REG_UNAVAILABLE.
2877 (regcache_raw_read_unsigned): New function.
2878 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2879 register_status enum.
2880
2881 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2882
2883 * linux-aarch64-low.c (the_low_targets): Rename
2884 breakpoint_reinsert_addr to get_next_pcs.
2885 * linux-arm-low.c (the_low_targets): Likewise.
2886 * linux-bfin-low.c (the_low_targets): Likewise.
2887 * linux-cris-low.c (the_low_targets): Likewise.
2888 * linux-crisv32-low.c (the_low_targets): Likewise.
2889 * linux-low.c (can_software_single_step): Likewise.
2890 (install_software_single_step_breakpoints): New function.
2891 (start_step_over): Use install_software_single_step_breakpoints.
2892 * linux-low.h: New CORE_ADDR vector.
2893 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2894 get_next_pcs.
2895 * linux-mips-low.c (the_low_targets): Likewise.
2896 * linux-nios2-low.c (the_low_targets): Likewise.
2897 * linux-sparc-low.c (the_low_targets): Likewise.
2898
2899 2015-12-17 Pedro Alves <palves@redhat.com>
2900
2901 * linux-low.c (linux_kill_one_lwp): Remove references to
2902 LinuxThreads.
2903 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2904 to 'kill'.
2905 (linux_init_signals): Delete.
2906 (initialize_low): Adjust.
2907 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2908
2909 2015-12-16 Pedro Alves <palves@redhat.com>
2910
2911 * configure.ac (compiler warning flags): When testing a
2912 -Wno-foo option, check whether -Wfoo works instead.
2913 * configure: Regenerate.
2914
2915 2015-12-11 Don Breazeal <donb@codesourcery.com>
2916
2917 * server.c (process_serial_event): Don't exit from gdbserver
2918 in remote mode if there are still active inferiors.
2919
2920 2015-12-11 Yao Qi <yao.qi@linaro.org>
2921
2922 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2923 arm_breakpoint_at if the process is 32-bit.
2924
2925 2015-12-11 Yao Qi <yao.qi@linaro.org>
2926
2927 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2928 arm breakpoint.
2929
2930 2015-12-07 Yao Qi <yao.qi@linaro.org>
2931
2932 * configure.srv: Append arm.o to srv_tgtobj for
2933 aarch64*-*-linux* target.
2934 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2935 from linux-arm-low.c.
2936 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2937 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2938 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2939 (thumb2_breakpoint_len): Likewise.
2940 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2941 (arm_breakpoint_kinds): Likewise.
2942 (arm_breakpoint_kind_from_pc): Likewise.
2943 (arm_sw_breakpoint_from_kind): Likewise.
2944 (arm_breakpoint_kind_from_current_state): Likewise.
2945 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2946 (arm_sw_breakpoint_from_kind): Declare.
2947 (arm_breakpoint_kind_from_current_state): Declare.
2948 (arm_breakpoint_at): Declare.
2949 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2950 arm_sw_breakpoint_from_kind if process is 32-bit.
2951 (aarch64_breakpoint_kind_from_pc): New function.
2952 (aarch64_breakpoint_kind_from_current_state): New function.
2953 (the_low_target): Initialize fields breakpoint_kind_from_pc
2954 and breakpoint_kind_from_current_state.
2955 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2956 linux-aarch32-low.c.
2957 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2958 (arm_breakpoint, arm_breakpoint_len): Likewise.
2959 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2960 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2961 (arm_is_thumb_mode): Likewise.
2962 (arm_breakpoint_at): Likewise.
2963 (arm_breakpoint_kind_from_pc): Likewise.
2964 (arm_sw_breakpoint_from_kind): Likewise.
2965 (arm_breakpoint_kind_from_current_state): Likewise.
2966
2967 Revert:
2968 2015-08-04 Yao Qi <yao.qi@linaro.org>
2969
2970 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2971 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2972 * server.c (extended_protocol): Remove "static".
2973 * server.h (extended_protocol): Declare it.
2974
2975 2015-12-04 Josh Stone <jistone@redhat.com>
2976
2977 * target.h (struct target_ops) <arch_setup>: Rename to ...
2978 (struct target_ops) <post_create_inferior>: ... this.
2979 (target_arch_setup): Rename to ...
2980 (target_post_create_inferior): ... this, calling post_create_inferior.
2981 * server.c (start_inferior): Update target_arch_setup calls to
2982 target_post_create_inferior.
2983 * linux-low.c (linux_low_ptrace_options): Forward declare.
2984 (linux_arch_setup): Update its comment for general use.
2985 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2986 (struct linux_target_ops): Use linux_post_create_inferior.
2987 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2988 to post_create_inferior.
2989 * nto-low.c (struct nto_target_ops): Likewise.
2990 * spu-low.c (struct spu_target_ops): Likewise.
2991 * win32-low.c (struct win32_target_ops): Likewise.
2992
2993 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2994
2995 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2996
2997 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2998
2999 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3000 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3001 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3002 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3003 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3004 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3005 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3006 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3007 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3008 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3009 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3010 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3011
3012 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3013
3014 * linux-low.c (linux_look_up_symbols): Don't call
3015 linux_supports_traceclone.
3016 * linux-low.h (thread_db_init): Remove use_events argument.
3017 * thread-db.c (thread_db_use_event): Remove global variable.
3018 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3019 (struct thread_db) <td_create_bp>: Remove field.
3020 (thread_db_create_event): Remove function.
3021 (thread_db_enable_reporting): Likewise.
3022 (find_one_thread): Don't check for thread_db_use_events.
3023 (attach_thread): Likewise.
3024 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3025 (try_thread_db_load_1): Don't check for thread_db_use_events.
3026 (thread_db_init): Remove use_events argument and thread events
3027 handling.
3028 (remove_thread_event_breakpoints): Remove function.
3029 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3030
3031 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3032
3033 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3034 New function.
3035 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3036 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3037 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3038 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3039 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3040 Initialize.
3041 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3042 New function.
3043 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3044 * linux-low.c (can_hardware_single_step): Use
3045 supports_hardware_single_step.
3046 (can_software_single_step): New function.
3047 (start_step_over): Call can_software_single_step.
3048 (linux_supports_hardware_single_step): New function.
3049 (struct target_ops) <supports_software_single_step>: Initialize.
3050 * linux-low.h (struct linux_target_ops)
3051 <supports_hardware_single_step>: Initialize.
3052 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3053 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3054 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3055 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3056 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3057 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3058 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3059 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3060 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3061 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3062 Initialize.
3063 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3064 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3065 Initialize.
3066 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3067 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3068 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3069 New function.
3070 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3071 * target.h (struct target_ops): <supports_software_single_step>:
3072 New field.
3073 (target_supports_software_single_step): New macro.
3074
3075 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3076
3077 * linux-low.c (linux_wait_1): Fix pc advance condition.
3078 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3079 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3080
3081 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3082
3083 * linux-arm-low.c (arm_is_thumb_mode): New function.
3084 (arm_breakpoint_at): Use arm_is_thumb_mode.
3085 (arm_breakpoint_kind_from_current_state): New function.
3086 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3087 Initialize.
3088 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3089 (linux_breakpoint_kind_from_current_state): New function.
3090 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3091 * linux-low.h (struct linux_target_ops)
3092 <breakpoint_kind_from_current_state>: New field.
3093 * target.h (struct target_ops): Likewise.
3094 (target_breakpoint_kind_from_current_state): New macro.
3095
3096 2015-11-30 Pedro Alves <palves@redhat.com>
3097
3098 * linux-low.c (linux_resume): Wake up the event loop before
3099 returning.
3100
3101 2015-11-30 Pedro Alves <palves@redhat.com>
3102
3103 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3104 check.
3105 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3106 to -1.
3107 * target.c (struct thread_search): New structure.
3108 (thread_search_callback): New function.
3109 (prev_general_thread): New global.
3110 (prepare_to_access_memory, done_accessing_memory): New functions.
3111 * target.h (prepare_to_access_memory, done_accessing_memory):
3112 Replace macros with function declarations.
3113
3114 2015-11-30 Pedro Alves <palves@redhat.com>
3115
3116 PR 14618
3117 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3118 report TARGET_WAITKIND_NO_RESUMED.
3119 * remote-utils.c (prepare_resume_reply): Handle
3120 TARGET_WAITKIND_NO_RESUMED.
3121 * server.c (report_no_resumed): New global.
3122 (handle_query) <qSupported>: Handle "no-resumed+". Report
3123 "no-resumed+" support.
3124 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3125 return error if the client doesn't support no-resumed events.
3126 (push_stop_notification): New function.
3127 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3128 events if the client supports them.
3129
3130 2015-11-30 Pedro Alves <palves@redhat.com>
3131
3132 * linux-low.c (thread_still_has_status_pending_p): Don't check
3133 vCont;t here.
3134 (lwp_resumed): New function.
3135 (status_pending_p_callback): Return early if the LWP is not
3136 supposed to be resumed.
3137
3138 2015-11-30 Pedro Alves <palves@redhat.com>
3139
3140 * linux-low.c (handle_extended_wait): Assert that the LWP's
3141 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3142 thread create events, leave the new child's status pending.
3143 (linux_low_filter_event): If GDB wants to hear about thread exit
3144 events, leave the LWP marked dead and don't delete it.
3145 (linux_wait_for_event_filtered): Don't check for thread exit.
3146 (filter_exit_event): New function.
3147 (linux_wait_1): Use it, when returning an exit event.
3148 (linux_resume_one_lwp_throw): Assert that the LWP's
3149 waitstatus is TARGET_WAITKIND_IGNORE.
3150 * remote-utils.c (prepare_resume_reply): Handle
3151 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3152 * server.c (report_thread_events): New global.
3153 (handle_general_set): Handle QThreadEvents.
3154 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3155 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3156 TARGET_WAITKIND_THREAD_EXITED.
3157 * server.h (report_thread_events): Declare.
3158
3159 2015-11-30 Pedro Alves <palves@redhat.com>
3160
3161 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3162 the thread's last_resume_kind was resume_stop.
3163
3164 2015-11-30 Pedro Alves <palves@redhat.com>
3165
3166 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3167 before returning.
3168
3169 2015-11-30 Pedro Alves <palves@redhat.com>
3170
3171 * server.c (handle_v_requests): Handle vCtrlC.
3172
3173 2015-11-30 Pedro Alves <palves@redhat.com>
3174
3175 * gdbthread.h (find_any_thread_of_pid): Declare.
3176 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3177 functions.
3178 * server.c (handle_query): If current_thread is NULL, look for
3179 another thread of the selected process.
3180
3181 2015-11-26 Daniel Colascione <dancol@dancol.org>
3182 Simon Marchi <simon.marchi@ericsson.com>
3183
3184 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3185 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3186 name in reply.
3187 * target.h (struct target_ops) <thread_name>: New field.
3188 (target_thread_name): New macro.
3189
3190 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3191
3192 * regcache.h (regcache_invalidate_pid): Add declaration.
3193 * regcache.c (regcache_invalidate_pid): New function, extracted
3194 from regcache_invalidate.
3195 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3196 Add trivial documentation comment.
3197 * lynx-low.c: Use regcache_invalidate_pid instead of
3198 regcache_invalidate.
3199
3200 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3201
3202 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3203 and Elf64_auxv_t if the target is Android.
3204
3205 2015-11-22 Doug Evans <xdje42@gmail.com>
3206
3207 * target.h: #include <sys/types.h>.
3208
3209 2015-11-19 Pedro Alves <palves@redhat.com>
3210
3211 * linux-low.c (linux_process_qsupported): Change prototype.
3212 Adjust.
3213 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3214 Change prototype.
3215 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3216 and adjust to loop over all features.
3217 * server.c (handle_query) <qSupported>: Adjust to call
3218 target_process_qsupported once, passing it a vector of unprocessed
3219 features.
3220 * target.h (struct target_ops) <process_qsupported>: Change
3221 prototype.
3222 (target_process_qsupported): Adjust.
3223
3224 2015-11-19 Pedro Alves <palves@redhat.com>
3225
3226 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3227 mode.
3228 * configure: Regenerate.
3229
3230 2015-11-19 Pedro Alves <palves@redhat.com>
3231
3232 * configure: Regenerate.
3233
3234 2015-11-19 Yao Qi <yao.qi@linaro.org>
3235
3236 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3237 type to uint32_t.
3238
3239 2015-11-19 Yao Qi <yao.qi@linaro.org>
3240
3241 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3242 (struct aarch64_operand): Move enum out.
3243
3244 2015-11-19 Yao Qi <yao.qi@linaro.org>
3245
3246 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3247 struct user_fpsimd_state *.
3248 (aarch64_store_fpregset): Likewise.
3249
3250 2015-11-19 Yao Qi <yao.qi@linaro.org>
3251
3252 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3253 struct user_pt_regs *.
3254 (aarch64_store_gregset): Likewise.
3255
3256 2015-11-18 Pedro Alves <palves@redhat.com>
3257
3258 * Makefile.in (all_object_files): Add $IPA_OBJS.
3259
3260 2015-11-17 Pedro Alves <palves@redhat.com>
3261
3262 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3263 GDB_SIGNAL_0 and gdb_signal_to_string.
3264
3265 2015-11-17 Pedro Alves <palves@redhat.com>
3266
3267 * win32-low.c (handle_output_debug_string): Remove parameter.
3268 (win32_kill): Remove our_status local and adjust call to
3269 handle_output_debug_string.
3270 (get_child_debug_event): Adjust call to
3271 handle_output_debug_string.
3272
3273 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3274
3275 * linux-mips-low.c (mips_fill_gregset): Add cast.
3276 (mips_store_gregset): Likewise.
3277 (mips_fill_fpregset): Likewise.
3278 (mips_store_fpregset): Likewise.
3279
3280 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3281
3282 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3283 priv.
3284
3285 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3286
3287 * linux-mips-low.c (mips_linux_new_thread): Change type of
3288 watch_type to enum target_hw_bp_type.
3289
3290 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3291
3292 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3293 Change return type to arm_hwbp_type.
3294
3295 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3296
3297 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3298 (arm_store_gregset): Likewise.
3299 * linux-arm-low.c (arm_get_hwcap): Likewise.
3300 (arm_read_description): Likewise.
3301
3302 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3303
3304 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3305
3306 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3307
3308 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3309 (ppc_fill_vsxregset): Likewise.
3310 (ppc_store_vsxregset): Likewise.
3311 (ppc_fill_vrregset): Likewise.
3312 (ppc_store_vrregset): Likewise.
3313 (ppc_fill_evrregset): Likewise.
3314 (ppc_store_evrregset): Likewise.
3315
3316 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3317
3318 * linux-ppc-low.c (ppc_usrregs_info): Remove
3319 forward-declaration.
3320 (ppc_arch_setup): Move lower in file.
3321
3322 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3323
3324 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3325 (ps_pdwrite): Likewise.
3326
3327 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3328
3329 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3330 to after assert checks.
3331
3332 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3333
3334 * proc-service.c (ps_pdread): Add/adjust casts.
3335 (ps_pdwrite): Add/adjust casts.
3336
3337 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3338
3339 * server.c (handle_search_memory_1): Cast return value of
3340 memmem.
3341
3342 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3343
3344 * server.c (write_qxfer_response): Change type of data to
3345 gdb_byte *.
3346
3347 2015-10-29 Pedro Alves <palves@redhat.com>
3348
3349 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3350
3351 2015-10-29 Pedro Alves <palves@redhat.com>
3352
3353 * tracepoint.c (clear_installed_tracepoints): Add casts.
3354
3355 2015-10-29 Pedro Alves <palves@redhat.com>
3356
3357 * server.c (handle_v_cont, process_serial_event): Add enum
3358 gdb_signal casts to signal parsing code.
3359
3360 2015-10-29 Pedro Alves <palves@redhat.com>
3361
3362 * linux-low.h (NULL_REGSET): Define.
3363 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3364 * linux-arm-low.c (arm_regsets): Likewise.
3365 * linux-crisv32-low.c (cris_regsets): Likewise.
3366 * linux-m68k-low.c (m68k_regsets): Likewise.
3367 * linux-mips-low.c (mips_regsets): Likewise.
3368 * linux-nios2-low.c (nios2_regsets): Likewise.
3369 * linux-ppc-low.c (ppc_regsets): Likewise.
3370 * linux-s390-low.c (s390_regsets): Likewise.
3371 * linux-sh-low.c (sh_regsets): Likewise.
3372 * linux-sparc-low.c (sparc_regsets): Likewise.
3373 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3374 * linux-tile-low.c (tile_regsets): Likewise.
3375 * linux-x86-low.c (x86_regsets): Likewise.
3376 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3377
3378 2015-10-29 Pedro Alves <palves@redhat.com>
3379
3380 * linux-low.h (NULL_REGSET): Define.
3381 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3382 * linux-arm-low.c (arm_regsets): Likewise.
3383 * linux-crisv32-low.c (cris_regsets): Likewise.
3384 * linux-m68k-low.c (m68k_regsets): Likewise.
3385 * linux-mips-low.c (mips_regsets): Likewise.
3386 * linux-nios2-low.c (nios2_regsets): Likewise.
3387 * linux-ppc-low.c (ppc_regsets): Likewise.
3388 * linux-s390-low.c (s390_regsets): Likewise.
3389 * linux-sh-low.c (sh_regsets): Likewise.
3390 * linux-sparc-low.c (sparc_regsets): Likewise.
3391 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3392 * linux-tile-low.c (tile_regsets): Likewise.
3393 * linux-x86-low.c (x86_regsets): Likewise.
3394 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3395
3396 2015-10-26 Doug Evans <dje@google.com>
3397
3398 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3399
3400 2015-10-26 Doug Evans <dje@google.com>
3401
3402 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3403
3404 2015-10-26 Doug Evans <dje@google.com>
3405
3406 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3407 for debug_printf.
3408 (attach_thread, find_new_threads_callback): Ditto.
3409
3410 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3411
3412 * mem-break.h (set_breakpoint_data): Remove.
3413
3414 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3415
3416 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3417 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3418 (initialize_low): Remove set_breakpoint_data call.
3419 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3420 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3421 (initialize_low): Remove set_breakpoint_data call.
3422 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3423 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3424 (initialize_low): Remove set_breakpoint_data call.
3425
3426 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3427
3428 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3429 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3430 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3431 * target.h (target_breakpoint_kind_from_pc): New macro.
3432
3433 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3434
3435 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3436 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3437 the default breakpoint kind.
3438
3439 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3440
3441 * linux-arm-low.c (arm_supports_z_point_type): Add software
3442 breakpoint support.
3443
3444 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3445
3446 * linux-arm-low.c: Refactor breakpoint definitions.
3447 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3448 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3449
3450 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3451
3452 * Makefile.in: Add arm.c/o.
3453 * configure.srv: Likewise.
3454 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3455 (arm_breakpoint_kind_from_pc): New function.
3456 (arm_sw_breakpoint_from_kind): Return proper kind.
3457 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3458
3459 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3460
3461 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3462 removal.
3463 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3464 (struct raw_breakpoint) <size>: Remove.
3465 (struct raw_breakpoint) <kind>: Add.
3466 (bp_size): New function.
3467 (bp_opcode): Likewise.
3468 (find_raw_breakpoint_at): Adjust for kind.
3469 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3470 (remove_memory_breakpoint): Adjust for kind call bp_size.
3471 (set_raw_breakpoint_at): Adjust for kind.
3472 (set_breakpoint): Likewise.
3473 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3474 (delete_raw_breakpoint): Adjust for kind.
3475 (delete_breakpoint): Likewise.
3476 (find_gdb_breakpoint): Likewise.
3477 (set_gdb_breakpoint_1): Likewise.
3478 (set_gdb_breakpoint): Likewise.
3479 (delete_gdb_breakpoint_1): Likewise.
3480 (delete_gdb_breakpoint): Likewise.
3481 (uninsert_raw_breakpoint): Likewise.
3482 (reinsert_raw_breakpoint): Likewise.
3483 (set_breakpoint_data): Remove.
3484 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3485 (check_mem_read): Adjust for kind call bp_size.
3486 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3487 (clone_one_breakpoint): Adjust for kind.
3488 * mem-break.h (set_gdb_breakpoint): Likewise.
3489 (delete_gdb_breakpoint): Likewise.
3490 * server.c (process_serial_event): Likewise.
3491
3492 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3493
3494 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3495 (struct linux_target_ops) <breakpoint>: Remove.
3496 (struct linux_target_ops) <breakpoint_len>: Remove.
3497 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3498 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3499 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3500 (arm_sw_breakpoint_from_kind): New function.
3501 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3502 (struct linux_target_ops) <breakpoint>: Remove.
3503 (struct linux_target_ops) <breakpoint_len>: Remove.
3504 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3505 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3506 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3507 (struct linux_target_ops) <breakpoint>: Remove.
3508 (struct linux_target_ops) <breakpoint_len>: Remove.
3509 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3510 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3511 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3512 (struct linux_target_ops) <breakpoint>: Remove.
3513 (struct linux_target_ops) <breakpoint_len>: Remove.
3514 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3515 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3516 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3517 and sw_breakpoint_from_kind to increment the pc.
3518 (linux_breakpoint_kind_from_pc): New function.
3519 (linux_sw_breakpoint_from_kind): New function.
3520 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3521 (initialize_low): Call breakpoint_kind_from_pc and
3522 sw_breakpoint_from_kind to replace breakpoint_data/len.
3523 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3524 New field.
3525 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3526 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3527 (struct linux_target_ops) <breakpoint>: Remove.
3528 (struct linux_target_ops) <breakpoint_len>: Remove.
3529 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3530 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3531 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3532 (struct linux_target_ops) <breakpoint>: Remove.
3533 (struct linux_target_ops) <breakpoint_len>: Remove.
3534 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3535 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3536 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3537 (struct linux_target_ops) <breakpoint>: Remove.
3538 (struct linux_target_ops) <breakpoint_len>: Remove.
3539 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3540 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3541 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3542 (struct linux_target_ops) <breakpoint>: Remove.
3543 (struct linux_target_ops) <breakpoint_len>: Remove.
3544 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3545 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3546 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3547 (struct linux_target_ops) <breakpoint>: Remove.
3548 (struct linux_target_ops) <breakpoint_len>: Remove.
3549 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3550 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3551 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3552 (struct linux_target_ops) <breakpoint>: Remove.
3553 (struct linux_target_ops) <breakpoint_len>: Remove.
3554 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3555 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3556 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3557 (struct linux_target_ops) <breakpoint>: Remove.
3558 (struct linux_target_ops) <breakpoint_len>: Remove.
3559 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3560 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3561 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3562 (struct linux_target_ops) <breakpoint>: Remove.
3563 (struct linux_target_ops) <breakpoint_len>: Remove.
3564 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3565 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3566 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3567 (struct linux_target_ops) <breakpoint>: Remove.
3568 (struct linux_target_ops) <breakpoint_len>: Remove.
3569 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3570 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3571 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3572 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3573 (struct linux_target_ops) <breakpoint>: Remove.
3574 (struct linux_target_ops) <breakpoint_len>: Remove.
3575 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3576 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3577 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3578 (struct linux_target_ops) <breakpoint>: Remove.
3579 (struct linux_target_ops) <breakpoint_len>: Remove.
3580 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3581 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3582
3583 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3584
3585 * linux-cris-low.c (cris_get_pc): Remove void arg.
3586
3587 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3588
3589 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3590 variable name.
3591
3592 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3593
3594 * inferiors.c (thread_pid_matches_callback): New function.
3595 (find_thread_process): New function.
3596 (remove_thread): Reset current_thread.
3597 (remove_process): Assert threads have been removed first.
3598
3599 2015-10-15 Yao Qi <yao.qi@linaro.org>
3600
3601 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3602 if it is 3.
3603 (aarch64_remove_point): Likewise.
3604 * regcache.c (regcache_register_size): New function.
3605
3606 2015-10-12 Yao Qi <yao.qi@linaro.org>
3607
3608 * linux-aarch64-low.c: Update all callers as emit_load_store
3609 is renamed to aarch64_emit_load_store.
3610
3611 2015-10-12 Yao Qi <yao.qi@linaro.org>
3612
3613 * linux-aarch64-low.c: Update all callers of function renaming
3614 from emit_insn to aarch64_emit_insn.
3615
3616 2015-10-12 Yao Qi <yao.qi@linaro.org>
3617
3618 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3619 arch/aarch64-insn.h.
3620 (struct aarch64_memory_operand): Likewise.
3621 (ENCODE): Likewise.
3622 (emit_insn): Move to arch/aarch64-insn.c.
3623 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3624 (emit_load_store): Move to arch/aarch64-insn.c.
3625 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3626 (can_encode_int32): Remove.
3627
3628 2015-10-12 Yao Qi <yao.qi@linaro.org>
3629
3630 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3631 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3632 (aarch64_relocate_instruction): Likewise.
3633 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3634 (struct aarch64_insn_visitor): Likewise.
3635
3636 2015-10-12 Yao Qi <yao.qi@linaro.org>
3637
3638 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3639 (struct aarch64_insn_visitor): New.
3640 (struct aarch64_insn_relocation_data): New.
3641 (aarch64_ftrace_insn_reloc_b): New function.
3642 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3643 (aarch64_ftrace_insn_reloc_cb): Likewise.
3644 (aarch64_ftrace_insn_reloc_tb): Likewise.
3645 (aarch64_ftrace_insn_reloc_adr): Likewise.
3646 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3647 (aarch64_ftrace_insn_reloc_others): Likewise.
3648 (visitor): New.
3649 (aarch64_relocate_instruction): Use visitor.
3650
3651 2015-10-12 Yao Qi <yao.qi@linaro.org>
3652
3653 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3654 int. Add argument buf.
3655 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3656 aarch64_relocate_instruction.
3657
3658 2015-10-12 Yao Qi <yao.qi@linaro.org>
3659
3660 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3661 argument insn. Remove local variable insn. Don't call
3662 target_read_uint32.
3663 (aarch64_install_fast_tracepoint_jump_pad): Call
3664 target_read_uint32.
3665
3666 2015-09-30 Yao Qi <yao.qi@linaro.org>
3667
3668 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3669 (emit_load_store_pair): Likewise.
3670
3671 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3672
3673 * dll.c (match_dll): Add cast(s).
3674 (unloaded_dll): Likewise.
3675 * linux-low.c (second_thread_of_pid_p): Likewise.
3676 (delete_lwp_callback): Likewise.
3677 (count_events_callback): Likewise.
3678 (select_event_lwp_callback): Likewise.
3679 (linux_set_resume_request): Likewise.
3680 * server.c (accumulate_file_name_length): Likewise.
3681 (emit_dll_description): Likewise.
3682 (handle_qxfer_threads_worker): Likewise.
3683 (visit_actioned_threads): Likewise.
3684 * thread-db.c (any_thread_of): Likewise.
3685 * tracepoint.c (same_process_p): Likewise.
3686 (match_blocktype): Likewise.
3687 (build_traceframe_info_xml): Likewise.
3688
3689 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3690
3691 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3692 assignment.
3693 (gdb_unparse_agent_expr): Likewise.
3694 * hostio.c (require_data): Likewise.
3695 (handle_pread): Likewise.
3696 * linux-low.c (disable_regset): Likewise.
3697 (fetch_register): Likewise.
3698 (store_register): Likewise.
3699 (get_dynamic): Likewise.
3700 (linux_qxfer_libraries_svr4): Likewise.
3701 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3702 (set_fast_tracepoint_jump): Likewise.
3703 (uninsert_fast_tracepoint_jumps_at): Likewise.
3704 (reinsert_fast_tracepoint_jumps_at): Likewise.
3705 (validate_inserted_breakpoint): Likewise.
3706 (clone_agent_expr): Likewise.
3707 * regcache.c (init_register_cache): Likewise.
3708 * remote-utils.c (putpkt_binary_1): Likewise.
3709 (decode_M_packet): Likewise.
3710 (decode_X_packet): Likewise.
3711 (look_up_one_symbol): Likewise.
3712 (relocate_instruction): Likewise.
3713 (monitor_output): Likewise.
3714 * server.c (handle_search_memory): Likewise.
3715 (handle_qxfer_exec_file): Likewise.
3716 (handle_qxfer_libraries): Likewise.
3717 (handle_qxfer): Likewise.
3718 (handle_query): Likewise.
3719 (handle_v_cont): Likewise.
3720 (handle_v_run): Likewise.
3721 (captured_main): Likewise.
3722 * target.c (write_inferior_memory): Likewise.
3723 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3724 * tracepoint.c (init_trace_buffer): Likewise.
3725 (add_tracepoint_action): Likewise.
3726 (add_traceframe): Likewise.
3727 (add_traceframe_block): Likewise.
3728 (cmd_qtdpsrc): Likewise.
3729 (cmd_qtdv): Likewise.
3730 (cmd_qtstatus): Likewise.
3731 (response_source): Likewise.
3732 (response_tsv): Likewise.
3733 (cmd_qtnotes): Likewise.
3734 (gdb_collect): Likewise.
3735 (initialize_tracepoint): Likewise.
3736
3737 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3738
3739 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3740 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3741 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3742 <NOP>: New.
3743 (enum aarch64_condition_codes): New enum.
3744 (w0): New static global.
3745 (fp): Likewise.
3746 (lr): Likewise.
3747 (struct aarch64_memory_operand) <type>: New
3748 MEMORY_OPERAND_POSTINDEX type.
3749 (postindex_memory_operand): New helper function.
3750 (emit_ret): New function.
3751 (emit_load_store_pair): New function, factored out of emit_stp
3752 with support for MEMORY_OPERAND_POSTINDEX.
3753 (emit_stp): Rewrite using emit_load_store_pair.
3754 (emit_ldp): New function.
3755 (emit_load_store): Likewise.
3756 (emit_ldr): Mention post-index instruction in comment.
3757 (emit_ldrh): New function.
3758 (emit_ldrb): New function.
3759 (emit_ldrsw): Mention post-index instruction in comment.
3760 (emit_str): Likewise.
3761 (emit_subs): New function.
3762 (emit_cmp): Likewise.
3763 (emit_and): Likewise.
3764 (emit_orr): Likewise.
3765 (emit_orn): Likewise.
3766 (emit_eor): Likewise.
3767 (emit_mvn): Likewise.
3768 (emit_lslv): Likewise.
3769 (emit_lsrv): Likewise.
3770 (emit_asrv): Likewise.
3771 (emit_mul): Likewise.
3772 (emit_sbfm): Likewise.
3773 (emit_sbfx): Likewise.
3774 (emit_ubfm): Likewise.
3775 (emit_ubfx): Likewise.
3776 (emit_csinc): Likewise.
3777 (emit_cset): Likewise.
3778 (emit_nop): Likewise.
3779 (emit_ops_insns): New helper function.
3780 (emit_pop): Likewise.
3781 (emit_push): Likewise.
3782 (aarch64_emit_prologue): New function.
3783 (aarch64_emit_epilogue): Likewise.
3784 (aarch64_emit_add): Likewise.
3785 (aarch64_emit_sub): Likewise.
3786 (aarch64_emit_mul): Likewise.
3787 (aarch64_emit_lsh): Likewise.
3788 (aarch64_emit_rsh_signed): Likewise.
3789 (aarch64_emit_rsh_unsigned): Likewise.
3790 (aarch64_emit_ext): Likewise.
3791 (aarch64_emit_log_not): Likewise.
3792 (aarch64_emit_bit_and): Likewise.
3793 (aarch64_emit_bit_or): Likewise.
3794 (aarch64_emit_bit_xor): Likewise.
3795 (aarch64_emit_bit_not): Likewise.
3796 (aarch64_emit_equal): Likewise.
3797 (aarch64_emit_less_signed): Likewise.
3798 (aarch64_emit_less_unsigned): Likewise.
3799 (aarch64_emit_ref): Likewise.
3800 (aarch64_emit_if_goto): Likewise.
3801 (aarch64_emit_goto): Likewise.
3802 (aarch64_write_goto_address): Likewise.
3803 (aarch64_emit_const): Likewise.
3804 (aarch64_emit_call): Likewise.
3805 (aarch64_emit_reg): Likewise.
3806 (aarch64_emit_pop): Likewise.
3807 (aarch64_emit_stack_flush): Likewise.
3808 (aarch64_emit_zero_ext): Likewise.
3809 (aarch64_emit_swap): Likewise.
3810 (aarch64_emit_stack_adjust): Likewise.
3811 (aarch64_emit_int_call_1): Likewise.
3812 (aarch64_emit_void_call_2): Likewise.
3813 (aarch64_emit_eq_goto): Likewise.
3814 (aarch64_emit_ne_goto): Likewise.
3815 (aarch64_emit_lt_goto): Likewise.
3816 (aarch64_emit_le_goto): Likewise.
3817 (aarch64_emit_gt_goto): Likewise.
3818 (aarch64_emit_ge_got): Likewise.
3819 (aarch64_emit_ops_impl): New static global variable.
3820 (aarch64_emit_ops): New target function, return
3821 &aarch64_emit_ops_impl.
3822 (struct linux_target_ops): Install it.
3823
3824 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3825
3826 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3827 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3828 aarch64-ipa.o.
3829 * linux-aarch64-ipa.c: New file.
3830 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3831 and endian.h.
3832 (aarch64_get_thread_area): New target method.
3833 (extract_signed_bitfield): New helper function.
3834 (aarch64_decode_ldr_literal): New function.
3835 (enum aarch64_opcodes): New enum.
3836 (struct aarch64_register): New struct.
3837 (struct aarch64_operand): New struct.
3838 (x0): New static global.
3839 (x1): Likewise.
3840 (x2): Likewise.
3841 (x3): Likewise.
3842 (x4): Likewise.
3843 (w2): Likewise.
3844 (ip0): Likewise.
3845 (sp): Likewise.
3846 (xzr): Likewise.
3847 (aarch64_register): New helper function.
3848 (register_operand): Likewise.
3849 (immediate_operand): Likewise.
3850 (struct aarch64_memory_operand): New struct.
3851 (offset_memory_operand): New helper function.
3852 (preindex_memory_operand): Likewise.
3853 (enum aarch64_system_control_registers): New enum.
3854 (ENCODE): New macro.
3855 (emit_insn): New helper function.
3856 (emit_b): New function.
3857 (emit_bcond): Likewise.
3858 (emit_cb): Likewise.
3859 (emit_tb): Likewise.
3860 (emit_blr): Likewise.
3861 (emit_stp): Likewise.
3862 (emit_ldp_q_offset): Likewise.
3863 (emit_stp_q_offset): Likewise.
3864 (emit_load_store): Likewise.
3865 (emit_ldr): Likewise.
3866 (emit_ldrsw): Likewise.
3867 (emit_str): Likewise.
3868 (emit_ldaxr): Likewise.
3869 (emit_stxr): Likewise.
3870 (emit_stlr): Likewise.
3871 (emit_data_processing_reg): Likewise.
3872 (emit_data_processing): Likewise.
3873 (emit_add): Likewise.
3874 (emit_sub): Likewise.
3875 (emit_mov): Likewise.
3876 (emit_movk): Likewise.
3877 (emit_mov_addr): Likewise.
3878 (emit_mrs): Likewise.
3879 (emit_msr): Likewise.
3880 (emit_sevl): Likewise.
3881 (emit_wfe): Likewise.
3882 (append_insns): Likewise.
3883 (can_encode_int32_in): New helper function.
3884 (aarch64_relocate_instruction): New function.
3885 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3886 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3887 (struct linux_target_ops): Install aarch64_get_thread_area,
3888 aarch64_install_fast_tracepoint_jump_pad and
3889 aarch64_get_min_fast_tracepoint_insn_len.
3890
3891 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3892
3893 * Makefile.in (aarch64-insn.o): New rule.
3894 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3895
3896 2015-09-21 Yao Qi <yao.qi@linaro.org>
3897
3898 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3899
3900 2015-09-21 Yao Qi <yao.qi@linaro.org>
3901
3902 * tracepoint.c (max_jump_pad_size): Remove.
3903
3904 2015-09-18 Yao Qi <yao.qi@linaro.org>
3905
3906 * linux-aarch64-low.c: Don't include sys/uio.h.
3907 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3908
3909 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3910
3911 * tracepoint.c (eval_result_type): Change prototype.
3912 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3913
3914 2015-09-15 Pedro Alves <palves@redhat.com>
3915
3916 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3917 Check whether to report exec events instead of checking whether
3918 multiprocess is enabled.
3919
3920 2015-09-15 Pedro Alves <palves@redhat.com>
3921
3922 PR remote/18965
3923 * remote-utils.c (prepare_resume_reply): Merge
3924 TARGET_WAITKIND_VFORK_DONE switch case with the
3925 TARGET_WAITKIND_FORKED case.
3926
3927 2015-09-15 Yao Qi <yao.qi@linaro.org>
3928
3929 * server.c (handle_query): Check string comparison using
3930 "else if" instead of "if".
3931
3932 2015-09-15 Yao Qi <yao.qi@linaro.org>
3933
3934 * server.c (vCont_supported): New global variable.
3935 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3936 matches. Append ";vContSupported+" to own_buf.
3937 (handle_v_requests): Append ";s;S" to own_buf if target supports
3938 hardware single step or vCont_supported is false.
3939 (capture_main): Set vCont_supported to zero.
3940
3941 2015-09-15 Yao Qi <yao.qi@linaro.org>
3942
3943 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3944 it to ...
3945 (linux_supports_hardware_single_step): ... New function.
3946 (linux_target_ops): Update.
3947 * lynx-low.c (lynx_target_ops): Set field
3948 supports_hardware_single_step to target_can_do_hardware_single_step.
3949 * nto-low.c (nto_target_ops): Likewise.
3950 * spu-low.c (spu_target_ops): Likewise.
3951 * win32-low.c (win32_target_ops): Likewise.
3952 * target.c (target_can_do_hardware_single_step): New function.
3953 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3954 Remove. <supports_hardware_single_step>: New field.
3955 (target_supports_conditional_breakpoints): Remove.
3956 (target_supports_hardware_single_step): New macro.
3957 (target_can_do_hardware_single_step): Declare.
3958 * server.c (handle_query): Use target_supports_hardware_single_step
3959 instead of target_supports_conditional_breakpoints.
3960
3961 2015-09-15 Yao Qi <yao.qi@linaro.org>
3962
3963 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3964 function.
3965 (struct linux_target_ops the_low_target): Install
3966 aarch64_linux_siginfo_fixup.
3967
3968 2015-09-11 Don Breazeal <donb@codesourcery.com>
3969 Luis Machado <lgustavo@codesourcery.com>
3970
3971 * linux-low.c (linux_mourn): Static declaration.
3972 (linux_arch_setup): Move in front of
3973 handle_extended_wait.
3974 (linux_arch_setup_thread): New function.
3975 (handle_extended_wait): Handle exec events. Call
3976 linux_arch_setup_thread. Make event_lwp argument a
3977 pointer-to-a-pointer.
3978 (check_zombie_leaders): Do not check stopped threads.
3979 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3980 (linux_low_filter_event): Add lwp and thread for exec'ing
3981 non-leader thread if leader thread has been deleted.
3982 Refactor code into linux_arch_setup_thread and call it.
3983 Pass child lwp pointer by reference to handle_extended_wait.
3984 (linux_wait_for_event_filtered): Update comment.
3985 (linux_wait_1): Prevent clobbering exec event status.
3986 (linux_supports_exec_events): New function.
3987 (linux_target_ops) <supports_exec_events>: Initialize new member.
3988 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3989 new member.
3990 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3991 * server.c (report_exec_events): New global variable.
3992 (handle_query): Handle qSupported query for exec-events feature.
3993 (captured_main): Initialize report_exec_events.
3994 * server.h (report_exec_events): Declare new global variable.
3995 * target.h (struct target_ops) <supports_exec_events>: New
3996 member.
3997 (target_supports_exec_events): New macro.
3998 * win32-low.c (win32_target_ops) <supports_exec_events>:
3999 Initialize new member.
4000
4001 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4002
4003 * linux-low.c (linux_low_enable_btrace): Remove.
4004 (linux_target_ops): Replace linux_low_enable_btrace with
4005 linux_enable_btrace.
4006
4007 2015-09-03 Yao Qi <yao.qi@linaro.org>
4008
4009 * linux-aarch64-low.c (aarch64_insert_point): Call
4010 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4011 returns true.
4012
4013 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4014
4015 * linux-low.c (check_stopped_by_breakpoint): Use
4016 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4017
4018 2015-08-27 Pedro Alves <palves@redhat.com>
4019
4020 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4021
4022 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4023
4024 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4025 the XNEW-family equivalent.
4026 (compile_bytecodes): Likewise.
4027 * dll.c (loaded_dll): Likewise.
4028 * event-loop.c (append_callback_event): Likewise.
4029 (create_file_handler): Likewise.
4030 (create_file_event): Likewise.
4031 * hostio.c (handle_open): Likewise.
4032 * inferiors.c (add_thread): Likewise.
4033 (add_process): Likewise.
4034 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4035 * linux-arm-low.c (arm_new_process): Likewise.
4036 (arm_new_thread): Likewise.
4037 * linux-low.c (add_to_pid_list): Likewise.
4038 (linux_add_process): Likewise.
4039 (handle_extended_wait): Likewise.
4040 (add_lwp): Likewise.
4041 (enqueue_one_deferred_signal): Likewise.
4042 (enqueue_pending_signal): Likewise.
4043 (linux_resume_one_lwp_throw): Likewise.
4044 (linux_resume_one_thread): Likewise.
4045 (linux_read_memory): Likewise.
4046 (linux_write_memory): Likewise.
4047 * linux-mips-low.c (mips_linux_new_process): Likewise.
4048 (mips_linux_new_thread): Likewise.
4049 (mips_add_watchpoint): Likewise.
4050 * linux-x86-low.c (initialize_low_arch): Likewise.
4051 * lynx-low.c (lynx_add_process): Likewise.
4052 * mem-break.c (set_raw_breakpoint_at): Likewise.
4053 (set_breakpoint): Likewise.
4054 (add_condition_to_breakpoint): Likewise.
4055 (add_commands_to_breakpoint): Likewise.
4056 (clone_agent_expr): Likewise.
4057 (clone_one_breakpoint): Likewise.
4058 * regcache.c (new_register_cache): Likewise.
4059 * remote-utils.c (look_up_one_symbol): Likewise.
4060 * server.c (queue_stop_reply): Likewise.
4061 (start_inferior): Likewise.
4062 (queue_stop_reply_callback): Likewise.
4063 (handle_target_event): Likewise.
4064 * spu-low.c (fetch_ppc_memory): Likewise.
4065 (store_ppc_memory): Likewise.
4066 * target.c (set_target_ops): Likewise.
4067 * thread-db.c (thread_db_load_search): Likewise.
4068 (try_thread_db_load_1): Likewise.
4069 * tracepoint.c (add_tracepoint): Likewise.
4070 (add_tracepoint_action): Likewise.
4071 (create_trace_state_variable): Likewise.
4072 (cmd_qtdpsrc): Likewise.
4073 (cmd_qtro): Likewise.
4074 (add_while_stepping_state): Likewise.
4075 * win32-low.c (child_add_thread): Likewise.
4076 (get_image_name): Likewise.
4077
4078 2015-08-25 Yao Qi <yao.qi@linaro.org>
4079
4080 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4081
4082 2015-08-25 Yao Qi <yao.qi@linaro.org>
4083
4084 * Makefile.in (aarch64-linux.o): New rule.
4085 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4086 srv_tgtobj.
4087 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4088 (aarch64_init_debug_reg_state): Make it extern.
4089 (aarch64_linux_prepare_to_resume): Remove.
4090
4091 2015-08-25 Yao Qi <yao.qi@linaro.org>
4092
4093 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4094 lwp_arch_private_info and ptid_of_lwp.
4095
4096 2015-08-25 Yao Qi <yao.qi@linaro.org>
4097
4098 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4099 Find proc_info by find_process_pid. All callers updated.
4100
4101 2015-08-25 Yao Qi <yao.qi@linaro.org>
4102
4103 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4104 Remove.
4105 (debug_reg_change_callback): Remove.
4106 (aarch64_notify_debug_reg_change): Remove.
4107
4108 2015-08-25 Yao Qi <yao.qi@linaro.org>
4109
4110 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4111 Call current_lwp_ptid.
4112
4113 2015-08-25 Yao Qi <yao.qi@linaro.org>
4114
4115 * linux-aarch64-low.c (debug_reg_change_callback): Use
4116 debug_printf.
4117
4118 2015-08-25 Yao Qi <yao.qi@linaro.org>
4119
4120 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4121
4122 2015-08-25 Yao Qi <yao.qi@linaro.org>
4123
4124 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4125
4126 2015-08-25 Yao Qi <yao.qi@linaro.org>
4127
4128 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4129 the code.
4130
4131 2015-08-25 Yao Qi <yao.qi@linaro.org>
4132
4133 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4134 Remove.
4135 (debug_reg_change_callback): Remove argument entry and add argument
4136 lwp. Remove local variable thread. Don't print thread id in the
4137 debugging output. Don't check whether pid of thread equals to pid.
4138 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4139 iterate_over_lwps instead find_inferior.
4140
4141 2015-08-24 Pedro Alves <palves@redhat.com>
4142
4143 * inferiors.c (get_first_process): New function.
4144 * inferiors.h (get_first_process): New declaration.
4145 * remote-utils.c (read_ptid): Default to the first process in the
4146 list, instead of to the current thread's process.
4147
4148 2015-08-24 Pedro Alves <palves@redhat.com>
4149
4150 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4151 * event-loop.c: Likewise.
4152 * remote-utils.c: Likewise.
4153 * tracepoint.c: Likewise.
4154
4155 2015-08-24 Pedro Alves <palves@redhat.com>
4156
4157 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4158 ptid_get_lwp.
4159
4160 2015-08-21 Pedro Alves <palves@redhat.com>
4161
4162 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4163 instead of literal 1.
4164
4165 2015-08-21 Pedro Alves <palves@redhat.com>
4166
4167 * tdesc.c (default_description): Explicitly zero-initialize.
4168
4169 2015-08-21 Pedro Alves <palves@redhat.com>
4170
4171 PR gdb/18749
4172 * inferiors.c (remove_thread): Discard any pending stop reply for
4173 this thread.
4174 * server.c (remove_all_on_match_pid): Rename to ...
4175 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4176 instead of a pid.
4177 (discard_queued_stop_replies): Change parameter to a ptid. Now
4178 extern.
4179 (handle_v_kill, kill_inferior_callback, captured_main)
4180 (process_serial_event): Adjust.
4181 * server.h (discard_queued_stop_replies): Declare.
4182
4183 2015-08-21 Pedro Alves <palves@redhat.com>
4184
4185 * linux-low.c (wait_for_sigstop): Always switch to no thread
4186 selected if the previously current thread dies.
4187 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4188 process instead of the current thread's.
4189 * remote-utils.c (input_interrupt): Don't check if there's no
4190 current thread.
4191 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4192 current thread to the general thread fails, error out.
4193 (handle_qxfer_auxv, handle_qxfer_libraries)
4194 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4195 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4196 (handle_query): Check if there's a thread selected instead of
4197 checking whether there's any thread in the thread list.
4198 (handle_qxfer_threads, handle_qxfer_btrace)
4199 (handle_qxfer_btrace_conf): Don't error out early if there's no
4200 thread in the thread list.
4201 (handle_v_cont, myresume): Don't set the current thread to the
4202 continue thread.
4203 (process_serial_event) <Hg handling>: Also set thread_id if the
4204 previous general thread is still alive.
4205 (process_serial_event) <g/G handling>: If setting the current
4206 thread to the general thread fails, error out.
4207 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4208 thread's lwp instead of the current thread's.
4209 * target.c (set_desired_thread): If the desired thread was not
4210 found, leave the current thread pointing to NULL. Return an int
4211 (boolean) indicating success.
4212 * target.h (set_desired_thread): Change return type to int.
4213
4214 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4215
4216 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4217 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4218 #includes.
4219 (ps_get_thread_area): New function.
4220
4221 2015-08-19 Gary Benson <gbenson@redhat.com>
4222
4223 * hostio.c (handle_pread): Do not attempt to read more data
4224 than hostio_reply_with_data can fit in a packet.
4225
4226 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4227
4228 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4229
4230 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4231
4232 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4233
4234 2015-08-06 Pedro Alves <palves@redhat.com>
4235
4236 * tracepoint.c (expr_eval_result): Now an int.
4237
4238 2015-08-06 Pedro Alves <palves@redhat.com>
4239
4240 * gdbthread.h (struct regcache): Forward declare.
4241 (struct thread_info) <regcache_data>: Now a struct regcache
4242 pointer.
4243 * inferiors.c (inferior_regcache_data)
4244 (set_inferior_regcache_data): Now work with struct regcache
4245 pointers.
4246 * inferiors.h (struct regcache): Forward declare.
4247 (inferior_regcache_data, set_inferior_regcache_data): Now work
4248 with struct regcache pointers.
4249 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4250 (free_register_cache_thread): Remove struct regcache pointer
4251 casts.
4252
4253 2015-08-06 Pedro Alves <palves@redhat.com>
4254
4255 * server.c (captured_main): On error, print the exception message
4256 to stderr, and if run_once is set, throw a quit.
4257
4258 2015-08-06 Pedro Alves <palves@redhat.com>
4259
4260 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4261 the current thread.
4262
4263 2015-08-06 Pedro Alves <palves@redhat.com>
4264
4265 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4266 reading beyond the passed in buffer length.
4267
4268 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4269
4270 * tracepoint.c (symbol_list) <required>: Remove.
4271
4272 2015-08-06 Pedro Alves <palves@redhat.com>
4273
4274 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4275 count if stopping and suspending threads.
4276 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4277 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4278 (linux_detach): Complete an ongoing step-over.
4279 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4280 throughout.
4281 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4282 (linux_wait_1): If passing a signal to the inferior after
4283 finishing a step-over, unsuspend and re-resume all lwps. If we
4284 see a single-step event but the thread should be continuing, don't
4285 pass the trap to gdb.
4286 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4287 internal_error instead of gdb_assert.
4288 (enqueue_pending_signal): New function.
4289 (check_ptrace_stopped_lwp_gone): Add debug output.
4290 (start_step_over): Use internal_error instead of gdb_assert.
4291 (complete_ongoing_step_over): New function.
4292 (linux_resume_one_thread): Don't resume a suspended thread.
4293 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4294 it stepping.
4295
4296 2015-08-06 Pedro Alves <palves@redhat.com>
4297
4298 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4299 (linux_thread_alive): Use lwp_is_marked_dead.
4300 (extended_event_reported): Delete.
4301 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4302 instead of extended_event_reported.
4303 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4304 as well.
4305 (lwp_is_marked_dead): New function.
4306 (lwp_running): Use lwp_is_marked_dead.
4307 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4308 comment.
4309
4310 2015-08-06 Pedro Alves <palves@redhat.com>
4311
4312 * linux-low.c (linux_wait_1): Move fork event output out of the
4313 !report_to_gdb check. Pass event_child->waitstatus to
4314 target_waitstatus_to_string instead of ourstatus.
4315
4316 2015-08-04 Yao Qi <yao.qi@linaro.org>
4317
4318 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4319 if current_thread is 32 bit.
4320
4321 2015-08-04 Yao Qi <yao.qi@linaro.org>
4322
4323 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4324 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4325 * server.c (extended_protocol): Remove "static".
4326 * server.h (extended_protocol): Declare it.
4327
4328 2015-08-04 Yao Qi <yao.qi@linaro.org>
4329
4330 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4331 both aarch64 and aarch32.
4332 (aarch64_set_pc): Likewise.
4333
4334 2015-08-04 Yao Qi <yao.qi@linaro.org>
4335
4336 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4337 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4338 arm-with-neon.xml to srv_xmlfiles.
4339 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4340 (is_64bit_tdesc): New function.
4341 (aarch64_linux_read_description): New function.
4342 (aarch64_arch_setup): Call aarch64_linux_read_description.
4343 (regs_info): Rename to regs_info_aarch64.
4344 (aarch64_regs_info): Return right regs_info.
4345 (initialize_low_arch): Call initialize_low_arch_aarch32.
4346
4347 2015-08-04 Yao Qi <yao.qi@linaro.org>
4348
4349 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4350 * linux-aarch32-low.c: New file.
4351 * linux-aarch32-low.h: New file.
4352 * linux-arm-low.c (arm_fill_gregset): Move it to
4353 linux-aarch32-low.c.
4354 (arm_store_gregset): Likewise.
4355 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4356 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4357 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4358 (regs_info): Rename to regs_info_arm.
4359 (arm_regs_info): Return regs_info_aarch32 if
4360 have_ptrace_getregset is 1 and target description is
4361 arm_with_neon or arm_with_vfpv3.
4362 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4363 Call initialize_low_arch_aarch32 instead.
4364
4365 2015-08-04 Yao Qi <yao.qi@linaro.org>
4366
4367 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4368 * linux-low.c: ... here.
4369 * linux-low.h (have_ptrace_getregset): Declare it.
4370
4371 2015-08-04 Pedro Alves <palves@redhat.com>
4372
4373 * thread-db.c (struct thread_db): Use new typedefs.
4374 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4375 CHK calls.
4376 (disable_thread_event_reporting): Cast result of dlsym to
4377 destination function pointer type.
4378 (thread_db_mourn): Use td_ta_delete_ftype.
4379
4380 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4381
4382 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4383 arch variant.
4384 (CDX_BREAKPOINT): Define for R2.
4385 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4386 (the_low_target): Add comments.
4387
4388 2015-07-30 Yao Qi <yao.qi@linaro.org>
4389
4390 * linux-arm-low.c (arm_hwcap): Remove it.
4391 (arm_read_description): New local variable arm_hwcap. Don't
4392 set arm_hwcap to zero.
4393
4394 2015-07-30 Yao Qi <yao.qi@linaro.org>
4395
4396 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4397 Use regcache->tdesc instead.
4398 (arm_store_wmmxregset): Likewise.
4399 (arm_fill_vfpregset): Likewise.
4400 (arm_store_vfpregset): Likewise.
4401
4402 2015-07-30 Yao Qi <yao.qi@linaro.org>
4403
4404 * linux-arm-low.c: Include arch/arm.h.
4405 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4406 (arm_store_gregset): Likewise.
4407
4408 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4409
4410 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4411 ptrace's 4th parameter.
4412
4413 2015-07-27 Yao Qi <yao.qi@linaro.org>
4414
4415 * configure.srv (case aarch64*-*-linux*): Don't set
4416 srv_linux_usrregs.
4417
4418 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4419
4420 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4421 sys/ptrace.h.
4422 * linux-arm-low.c: Likewise.
4423 * linux-cris-low.c: Likewise.
4424 * linux-crisv32-low.c: Likewise.
4425 * linux-low.c: Likewise.
4426 * linux-m68k-low.c: Likewise.
4427 * linux-mips-low.c: Likewise.
4428 * linux-nios2-low.c: Likewise.
4429 * linux-s390-low.c: Likewise.
4430 * linux-sparc-low.c: Likewise.
4431 * linux-tic6x-low.c: Likewise.
4432 * linux-tile-low.c: Likewise.
4433 * linux-x86-low.c: Likewise.
4434
4435 2015-07-24 Pedro Alves <palves@redhat.com>
4436
4437 * config.in: Regenerate.
4438 * configure: Regenerate.
4439
4440 2015-07-24 Pedro Alves <palves@redhat.com>
4441
4442 * acinclude.m4: Include ../ptrace.m4.
4443 * configure.ac: Call GDB_AC_PTRACE.
4444 * config.in, configure: Regenerate.
4445
4446 2015-07-24 Yao Qi <yao.qi@linaro.org>
4447
4448 * linux-low.c (linux_create_inferior): Remove setting to
4449 proc->priv->new_inferior.
4450 (linux_attach): Likewise.
4451 (linux_low_filter_event): Likewise.
4452 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4453
4454 2015-07-24 Yao Qi <yao.qi@linaro.org>
4455
4456 * linux-low.c (linux_arch_setup): New function.
4457 (linux_low_filter_event): If proc->tdesc is NULL and
4458 proc->attached is true, call the_low_target.arch_setup.
4459 Otherwise, keep status pending, and return.
4460 (linux_resume_one_lwp_throw): Don't call get_pc if
4461 thread->while_stepping isn't NULL. Don't call
4462 get_thread_regcache if proc->tdesc is NULL.
4463 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4464 (linux_target_ops): Install arch_setup.
4465 * server.c (start_inferior): Call the_target->arch_setup.
4466 * target.h (struct target_ops) <arch_setup>: New field.
4467 (target_arch_setup): New marco.
4468 * lynx-low.c (lynx_target_ops): Update.
4469 * nto-low.c (nto_target_ops): Update.
4470 * spu-low.c (spu_target_ops): Update.
4471 * win32-low.c (win32_target_ops): Update.
4472
4473 2015-07-24 Yao Qi <yao.qi@linaro.org>
4474
4475 * linux-low.c (linux_add_process): Don't set
4476 proc->priv->new_inferior.
4477 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4478 (linux_attach): Likewise.
4479
4480 2015-07-24 Yao Qi <yao.qi@linaro.org>
4481
4482 * server.c (start_inferior): Code refactor.
4483
4484 2015-07-24 Yao Qi <yao.qi@linaro.org>
4485
4486 * server.c (process_serial_event): Set general_thread.
4487
4488 2015-07-21 Yao Qi <yao.qi@linaro.org>
4489
4490 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4491 aarch64_linux_get_debug_reg_capacity.
4492
4493 2015-07-17 Yao Qi <yao.qi@linaro.org>
4494
4495 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4496 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4497 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4498 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4499 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4500 (AARCH64_HWP_ALIGNMENT): Likewise.
4501 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4502 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4503 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4504 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4505 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4506 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4507 (struct aarch64_debug_reg_state): Likewise.
4508 (struct arch_lwp_info): Likewise.
4509 (aarch64_align_watchpoint): Likewise.
4510 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4511 (aarch64_watchpoint_length): Likewise.
4512 (aarch64_point_encode_ctrl_reg): Likewise
4513 (aarch64_point_is_aligned): Likewise.
4514 (aarch64_align_watchpoint): Likewise.
4515 (aarch64_linux_set_debug_regs):
4516 (aarch64_dr_state_insert_one_point): Likewise.
4517 (aarch64_dr_state_remove_one_point): Likewise.
4518 (aarch64_handle_breakpoint): Likewise.
4519 (aarch64_handle_aligned_watchpoint): Likewise.
4520 (aarch64_handle_unaligned_watchpoint): Likewise.
4521 (aarch64_handle_watchpoint): Likewise.
4522
4523 2015-07-17 Yao Qi <yao.qi@linaro.org>
4524
4525 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4526 and don't aarch64_get_debug_reg_state. All callers update.
4527 (aarch64_handle_aligned_watchpoint): Likewise.
4528 (aarch64_handle_unaligned_watchpoint): Likewise.
4529 (aarch64_handle_watchpoint): Likewise.
4530 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4531 (aarch64_remove_point): Likewise.
4532
4533 2015-07-17 Yao Qi <yao.qi@linaro.org>
4534
4535 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4536 debug_printf.
4537 (aarch64_handle_unaligned_watchpoint): Likewise.
4538
4539 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4540
4541 Revert the previous 3 commits:
4542 Move gdb_regex* to common/
4543 Move linux_find_memory_regions_full & co.
4544 gdbserver build-id attribute generator
4545
4546 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4547 Jan Kratochvil <jan.kratochvil@redhat.com>
4548
4549 gdbserver build-id attribute generator.
4550 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4551 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4552 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4553 (find_phdr): New.
4554 (get_dynamic): Use find_pdhr to traverse program headers.
4555 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4556 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4557 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4558 (get_hex_build_id): New.
4559 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4560 to reply XML document.
4561
4562 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4563 Jan Kratochvil <jan.kratochvil@redhat.com>
4564
4565 * target.c: Include target/target-utils.h and fcntl.h.
4566 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4567 (target_fileio_read_stralloc): New functions.
4568
4569 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4570
4571 * Makefile.in (OBS): Add gdb_regex.o.
4572 (gdb_regex.o): New.
4573 * config.in: Rebuilt.
4574 * configure: Rebuilt.
4575
4576 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4577 Jan Kratochvil <jan.kratochvil@redhat.com>
4578
4579 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4580 * Makefile.in (OBS): Add target-utils.o.
4581 (linux-maps.o, target-utils.o): New.
4582 * configure.srv (srv_linux_obj): Add linux-maps.o.
4583
4584 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4585
4586 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4587 function, return 1.
4588 (the_low_target): Install it.
4589
4590 2015-07-14 Pedro Alves <palves@redhat.com>
4591
4592 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4593 Instead, ignore ECHILD, and throw an error for other errnos.
4594
4595 2015-07-10 Pedro Alves <palves@redhat.com>
4596
4597 * event-loop.c (struct callback_event) <data>: Change type to
4598 gdb_client_data instance instead of gdb_client_data pointer.
4599 (append_callback_event): Adjust.
4600
4601 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4602
4603 * linux-aarch64-low.c: Add comments for each linux_target_ops
4604 method. Remove comments already covered in target_ops and
4605 linux_target_ops definitions.
4606 (the_low_target): Add comments for each unimplemented method.
4607
4608 2015-07-09 Yao Qi <yao.qi@linaro.org>
4609
4610 * linux-aarch64-low.c (aarch64_regmap): Remove.
4611 (aarch64_usrregs_info): Remove.
4612 (regs_info): Set field usrregs to NULL.
4613
4614 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4615
4616 * linux-low.c: Include "rsp-low.h"
4617 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4618 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4619 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4620 (handle_btrace_enable_pt): New.
4621 (handle_btrace_general_set): Support "pt".
4622 (handle_btrace_conf_general_set): Support "pt:size".
4623
4624 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4625
4626 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4627 Z_PACKET_SW_BP.
4628
4629 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4630
4631 * linux-aarch64-low.c: Remove comment about endianness.
4632 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4633 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4634 memcmp.
4635
4636 2015-06-24 Gary Benson <gbenson@redhat.com>
4637
4638 * linux-i386-ipa.c (stdint.h): Do not include.
4639 * lynx-i386-low.c (stdint.h): Likewise.
4640 * lynx-ppc-low.c (stdint.h): Likewise.
4641 * mem-break.c (stdint.h): Likewise.
4642 * thread-db.c (stdint.h): Likewise.
4643 * tracepoint.c (stdint.h): Likewise.
4644 * win32-low.c (stdint.h): Likewise.
4645
4646 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4647
4648 * server.c (write_qxfer_response): Update call to
4649 remote_escape_output.
4650
4651 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4652 Jan Kratochvil <jan.kratochvil@redhat.com>
4653
4654 Merge multiple hex conversions.
4655 * gdbreplay.c (tohex): Rename to 'fromhex'.
4656 (logchar): Use fromhex.
4657
4658 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4659
4660 * server.c (handle_qxfer_libraries): Set `version' attribute for
4661 <library-list>.
4662
4663 2015-06-10 Gary Benson <gbenson@redhat.com>
4664
4665 * target.h (struct target_ops) <multifs_open>: New field.
4666 <multifs_unlink>: Likewise.
4667 <multifs_readlink>: Likewise.
4668 * linux-low.c (nat/linux-namespaces.h): New include.
4669 (linux_target_ops): Initialize the_target->multifs_open,
4670 the_target->multifs_unlink and the_target->multifs_readlink.
4671 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4672 * hostio.c (hostio_fs_pid): New static variable.
4673 (hostio_handle_new_gdb_connection): New function.
4674 (handle_setfs): Likewise.
4675 (handle_open): Use the_target->multifs_open as appropriate.
4676 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4677 (handle_readlink): Use the_target->multifs_readlink as
4678 appropriate.
4679 (handle_vFile): Handle vFile:setfs packets.
4680 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4681 after target_handle_new_gdb_connection.
4682
4683 2015-06-10 Gary Benson <gbenson@redhat.com>
4684
4685 * configure.ac (AC_CHECK_FUNCS): Add setns.
4686 * config.in: Regenerate.
4687 * configure: Likewise.
4688 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4689 (linux-namespaces.o): New rule.
4690 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4691
4692 2015-06-09 Gary Benson <gbenson@redhat.com>
4693
4694 * hostio.c (handle_open): Process mode argument with
4695 fileio_to_host_mode.
4696
4697 2015-06-01 Yao Qi <yao.qi@linaro.org>
4698
4699 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4700 * linux-x86-low.c: Likewise.
4701
4702 2015-05-28 Don Breazeal <donb@codesourcery.com>
4703
4704 * linux-low.c (handle_extended_wait): Initialize
4705 thread_info.last_resume_kind for new fork children.
4706
4707 2015-05-15 Pedro Alves <palves@redhat.com>
4708
4709 * target.h (target_handle_new_gdb_connection): Rewrite using if
4710 wrapped in do/while.
4711
4712 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4713
4714 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4715 * configure, config.in: Regenerate.
4716 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4717 Declare typedef.
4718
4719 2015-05-12 Don Breazeal <donb@codesourcery.com>
4720
4721 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4722 PTRACE_EVENT_VFORK_DONE.
4723 (linux_low_ptrace_options, extended_event_reported): Add vfork
4724 events.
4725 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4726 and "vforkdone" for RSP 'T' Stop Reply Packet.
4727 * server.h (report_vfork_events): Declare
4728 global variable.
4729
4730 2015-05-12 Don Breazeal <donb@codesourcery.com>
4731
4732 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4733 (the_low_target) <new_fork>: Initialize new member.
4734 * linux-arm-low.c (arm_new_fork): New function.
4735 (the_low_target) <new_fork>: Initialize new member.
4736 * linux-low.c (handle_extended_wait): Call new target function
4737 new_fork.
4738 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4739 * linux-mips-low.c (mips_add_watchpoint): New function
4740 extracted from mips_insert_point.
4741 (the_low_target) <new_fork>: Initialize new member.
4742 (mips_linux_new_fork): New function.
4743 (mips_insert_point): Call mips_add_watchpoint.
4744 * linux-x86-low.c (x86_linux_new_fork): New function.
4745 (the_low_target) <new_fork>: Initialize new member.
4746
4747 2015-05-12 Don Breazeal <donb@codesourcery.com>
4748
4749 * linux-low.c (handle_extended_wait): Implement return value,
4750 rename argument 'event_child' to 'event_lwp', handle
4751 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4752 (linux_low_ptrace_options): New function.
4753 (linux_low_filter_event): Call linux_low_ptrace_options,
4754 use different argument fo linux_enable_event_reporting,
4755 use return value from handle_extended_wait.
4756 (extended_event_reported): New function.
4757 (linux_wait_1): Call extended_event_reported and set
4758 status to report fork events.
4759 (linux_write_memory): Add pid to debug message.
4760 (reset_lwp_ptrace_options_callback): New function.
4761 (linux_handle_new_gdb_connection): New function.
4762 (linux_target_ops): Initialize new structure member.
4763 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4764 * lynx-low.c: Initialize new structure member.
4765 * remote-utils.c (prepare_resume_reply): Implement stop reason
4766 "fork" for "T" stop message.
4767 * server.c (handle_query): Call handle_new_gdb_connection.
4768 * server.h (report_fork_events): Declare global flag.
4769 * target.h (struct target_ops) <handle_new_gdb_connection>:
4770 New member.
4771 (target_handle_new_gdb_connection): New macro.
4772 * win32-low.c: Initialize new structure member.
4773
4774 2015-05-12 Don Breazeal <donb@codesourcery.com>
4775
4776 * mem-break.c (APPEND_TO_LIST): Define macro.
4777 (clone_agent_expr): New function.
4778 (clone_one_breakpoint): New function.
4779 (clone_all_breakpoints): New function.
4780 * mem-break.h: Declare new functions.
4781
4782 2015-05-12 Don Breazeal <donb@codesourcery.com>
4783
4784 * linux-low.c (linux_supports_fork_events): New function.
4785 (linux_supports_vfork_events): New function.
4786 (linux_target_ops): Initialize new structure members.
4787 (initialize_low): Call linux_check_ptrace_features.
4788 * lynx-low.c (lynx_target_ops): Initialize new structure
4789 members.
4790 * server.c (report_fork_events, report_vfork_events):
4791 New global flags.
4792 (handle_query): Add new features to qSupported packet and
4793 response.
4794 (captured_main): Initialize new global variables.
4795 * target.h (struct target_ops) <supports_fork_events>:
4796 New member.
4797 <supports_vfork_events>: New member.
4798 (target_supports_fork_events): New macro.
4799 (target_supports_vfork_events): New macro.
4800 * win32-low.c (win32_target_ops): Initialize new structure
4801 members.
4802
4803 2015-05-12 Gary Benson <gbenson@redhat.com>
4804
4805 * server.c (handle_qxfer_exec_file): Use current process
4806 if annex is empty.
4807
4808 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4809
4810 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4811 Remove HAVE_PTRACE_GETREGS conditionals.
4812 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4813 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4814
4815 2015-05-08 Yao Qi <yao.qi@linaro.org>
4816
4817 * linux-low.c (linux_supports_conditional_breakpoints): New
4818 function.
4819 (linux_target_ops): Install new target method.
4820 * lynx-low.c (lynx_target_ops): Install NULL hook for
4821 supports_conditional_breakpoints.
4822 * nto-low.c (nto_target_ops): Likewise.
4823 * spu-low.c (spu_target_ops): Likewise.
4824 * win32-low.c (win32_target_ops): Likewise.
4825 * server.c (handle_query): Check
4826 target_supports_conditional_breakpoints.
4827 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4828 New field.
4829 (target_supports_conditional_breakpoints): New macro.
4830
4831 2015-05-06 Pedro Alves <palves@redhat.com>
4832
4833 PR server/18081
4834 * server.c (start_inferior): If the process exits, mourn it.
4835
4836 2015-04-21 Gary Benson <gbenson@redhat.com>
4837
4838 * hostio.c (fileio_open_flags_to_host): Factored out to
4839 fileio_to_host_openflags in common/fileio.c. Single use
4840 updated.
4841
4842 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4843
4844 * linux-xtensa-low.c (xtensa_fill_gregset)
4845 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4846 XCHAL_HAVE_LOOP.
4847
4848 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4849
4850 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4851 (regs_info): Replace usrregs pointer with NULL.
4852
4853 2015-04-17 Gary Benson <gbenson@redhat.com>
4854
4855 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4856 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4857 * server.c (handle_qxfer_exec_file): New function.
4858 (qxfer_packets): Add exec-file entry.
4859 (handle_query): Report qXfer:exec-file:read as supported packet.
4860
4861 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4862
4863 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4864
4865 2015-04-09 Gary Benson <gbenson@redhat.com>
4866
4867 * hostio-errno.c (errno_to_fileio_error): Remove function.
4868 Update caller to use remote_fileio_to_fio_error.
4869
4870 2015-04-09 Yao Qi <yao.qi@linaro.org>
4871
4872 * linux-low.c (linux_insert_point): Call
4873 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4874 (linux_remove_point): Call remove_memory_breakpoint if type is
4875 raw_bkpt_type_sw.
4876 * linux-x86-low.c (x86_insert_point): Don't call
4877 insert_memory_breakpoint.
4878 (x86_remove_point): Don't call remove_memory_breakpoint.
4879
4880 2015-04-01 Pedro Alves <palves@redhat.com>
4881 Cleber Rosa <crosa@redhat.com>
4882
4883 * server.c (gdbserver_usage): Reorganize and extend the usage
4884 message.
4885
4886 2015-03-24 Pedro Alves <palves@redhat.com>
4887
4888 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4889 output. Also dump TRAP_TRACE.
4890 (linux_low_filter_event): In debug output, distinguish a
4891 resume_stop SIGSTOP from a delayed SIGSTOP.
4892
4893 2015-03-24 Gary Benson <gbenson@redhat.com>
4894
4895 * linux-x86-low.c (x86_linux_new_thread): Moved to
4896 nat/x86-linux.c.
4897 (x86_linux_prepare_to_resume): Likewise.
4898
4899 2015-03-24 Gary Benson <gbenson@redhat.com>
4900
4901 * Makefile.in (x86-linux-dregs.o): New rule.
4902 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4903 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4904 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4905 (x86_linux_dr_get): Likewise.
4906 (x86_linux_dr_set): Likewise.
4907 (update_debug_registers_callback): Likewise.
4908 (x86_linux_dr_set_addr): Likewise.
4909 (x86_linux_dr_get_addr): Likewise.
4910 (x86_linux_dr_set_control): Likewise.
4911 (x86_linux_dr_get_control): Likewise.
4912 (x86_linux_dr_get_status): Likewise.
4913 (x86_linux_update_debug_registers): Likewise.
4914
4915 2015-03-24 Gary Benson <gbenson@redhat.com>
4916
4917 * linux-x86-low.c (x86_linux_update_debug_registers):
4918 New function, factored out from...
4919 (x86_linux_prepare_to_resume): ...this.
4920
4921 2015-03-24 Gary Benson <gbenson@redhat.com>
4922
4923 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4924 (x86_linux_dr_set): Likewise.
4925 (update_debug_registers_callback): Likewise.
4926 (x86_linux_dr_set_addr): Likewise.
4927 (x86_linux_dr_get_addr): Likewise.
4928 (x86_linux_dr_set_control): Likewise.
4929 (x86_linux_dr_get_control): Likewise.
4930 (x86_linux_dr_get_status): Likewise.
4931 (x86_linux_prepare_to_resume): Likewise.
4932
4933 2015-03-24 Gary Benson <gbenson@redhat.com>
4934
4935 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4936 Use perror_with_name. Pass string through gettext.
4937 (x86_linux_dr_set): Likewise.
4938
4939 2015-03-24 Gary Benson <gbenson@redhat.com>
4940
4941 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4942 (x86_linux_dr_set_addr): ...this.
4943 (x86_dr_low_get_addr): Rename to...
4944 (x86_linux_dr_get_addr): ...this.
4945 (x86_dr_low_set_control): Rename to...
4946 (x86_linux_dr_set_control): ...this.
4947 (x86_dr_low_get_control): Rename to...
4948 (x86_linux_dr_get_control): ...this.
4949 (x86_dr_low_get_status): Rename to...
4950 (x86_linux_dr_get_status): ...this.
4951 (x86_dr_low): Update with new function names.
4952
4953 2015-03-24 Gary Benson <gbenson@redhat.com>
4954
4955 * Makefile.in (x86-linux.o): New rule.
4956 * configure.srv: Add x86-linux.o to relevant targets.
4957 * linux-low.c (lwp_set_arch_private_info): New function.
4958 (lwp_arch_private_info): Likewise.
4959 * linux-x86-low.c: Include nat/x86-linux.h.
4960 (arch_lwp_info): Removed structure.
4961 (update_debug_registers_callback):
4962 Use lwp_set_debug_registers_changed.
4963 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4964 and lwp_set_debug_registers_changed.
4965 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4966
4967 2015-03-24 Gary Benson <gbenson@redhat.com>
4968
4969 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4970 * linux-arm-low.c (arm_new_thread): Likewise.
4971 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4972 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4973 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4974 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4975
4976 2015-03-24 Gary Benson <gbenson@redhat.com>
4977
4978 * linux-low.c (ptid_of_lwp): New function.
4979 (lwp_is_stopped): Likewise.
4980 (lwp_stop_reason): Likewise.
4981 * linux-x86-low.c (update_debug_registers_callback):
4982 Use lwp_is_stopped.
4983 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4984 lwp_stop_reason.
4985
4986 2015-03-24 Gary Benson <gbenson@redhat.com>
4987
4988 * linux-low.h (linux_stop_lwp): Remove declaration.
4989
4990 2015-03-24 Gary Benson <gbenson@redhat.com>
4991
4992 * linux-low.h: Include nat/linux-nat.h.
4993 * linux-low.c (iterate_over_lwps_args): New structure.
4994 (iterate_over_lwps_filter): New function.
4995 (iterate_over_lwps): Likewise.
4996 * linux-x86-low.c (update_debug_registers_callback):
4997 Update signature to what iterate_over_lwps expects.
4998 Remove PID check that iterate_over_lwps now performs.
4999 (x86_dr_low_set_addr): Use iterate_over_lwps.
5000 (x86_dr_low_set_control): Likewise.
5001
5002 2015-03-24 Gary Benson <gbenson@redhat.com>
5003
5004 * linux-x86-low.c (x86_debug_reg_state): New function.
5005 (x86_linux_prepare_to_resume): Use the above.
5006
5007 2015-03-24 Gary Benson <gbenson@redhat.com>
5008
5009 * linux-low.c (current_lwp_ptid): New function.
5010 * linux-x86-low.c: Include nat/linux-nat.h.
5011 (x86_dr_low_get_addr): Use current_lwp_ptid.
5012 (x86_dr_low_get_control): Likewise.
5013 (x86_dr_low_get_status): Likewise.
5014
5015 2015-03-20 Pedro Alves <palves@redhat.com>
5016
5017 * tracepoint.c (cmd_qtstatus): Make "str" const.
5018
5019 2015-03-20 Pedro Alves <palves@redhat.com>
5020
5021 * server.c (handle_general_set): Make "req_str" const.
5022
5023 2015-03-19 Pedro Alves <palves@redhat.com>
5024
5025 * linux-low.c (linux_resume_one_lwp): Rename to ...
5026 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5027 instead call perror_with_name.
5028 (check_ptrace_stopped_lwp_gone): New function.
5029 (linux_resume_one_lwp): Reimplement as wrapper around
5030 linux_resume_one_lwp_throw that swallows errors if the LWP is
5031 gone.
5032
5033 2015-03-19 Pedro Alves <palves@redhat.com>
5034
5035 * linux-low.c (count_events_callback, select_event_lwp_callback):
5036 No longer check whether the thread has resume_stop as last resume
5037 kind.
5038
5039 2015-03-19 Pedro Alves <palves@redhat.com>
5040
5041 * linux-low.c (count_events_callback, select_event_lwp_callback):
5042 Use the lwp's status_pending_p field, not the thread's.
5043
5044 2015-03-19 Pedro Alves <palves@redhat.com>
5045
5046 * linux-low.c (select_event_lwp_callback): Update comments to
5047 no longer mention SIGTRAP.
5048
5049 2015-03-18 Gary Benson <gbenson@redhat.com>
5050
5051 * server.c (handle_query): Do not report vFile:fstat as supported.
5052
5053 2015-03-11 Gary Benson <gbenson@redhat.com>
5054
5055 * hostio.c (sys/types.h): New include.
5056 (sys/stat.h): Likewise.
5057 (common-remote-fileio.h): Likewise.
5058 (handle_fstat): New function.
5059 (handle_vFile): Handle vFile:fstat packets.
5060
5061 2015-03-11 Gary Benson <gbenson@redhat.com>
5062
5063 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5064 struct stat.st_blocks and struct stat.st_blksize.
5065 * configure: Regenerate.
5066 * config.in: Likewise.
5067 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5068 (OBS): Add common-remote-fileio.o.
5069 (common-remote-fileio.o): New rule.
5070
5071 2015-03-09 Pedro Alves <palves@redhat.com>
5072
5073 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5074 'struct sockaddr' pointer in 'accept' call.
5075
5076 2015-03-09 Pedro Alves <palves@redhat.com>
5077
5078 Revert:
5079 2015-03-07 Pedro Alves <palves@redhat.com>
5080 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5081 or <winsock2.h> here. Instead include "gdb_socket.h".
5082 (remote_open): Use union gdb_sockaddr_u.
5083 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5084 or <winsock2.h> here. Instead include "gdb_socket.h".
5085 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5086 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5087 or <sys/un.h>.
5088 (init_named_socket, gdb_agent_helper_thread): Use union
5089 gdb_sockaddr_u.
5090
5091 2015-03-07 Pedro Alves <palves@redhat.com>
5092
5093 * configure.ac (build_warnings): Move
5094 -Wdeclaration-after-statement to the C-specific set.
5095 * configure: Regenerate.
5096
5097 2015-03-07 Pedro Alves <palves@redhat.com>
5098
5099 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5100 or <winsock2.h> here. Instead include "gdb_socket.h".
5101 (remote_open): Use union gdb_sockaddr_u.
5102 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5103 or <winsock2.h> here. Instead include "gdb_socket.h".
5104 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5105 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5106 or <sys/un.h>.
5107 (init_named_socket, gdb_agent_helper_thread): Use union
5108 gdb_sockaddr_u.
5109
5110 2015-03-07 Pedro Alves <palves@redhat.com>
5111
5112 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5113 instead.
5114
5115 2015-03-06 Yao Qi <yao.qi@linaro.org>
5116
5117 * linux-aarch64-low.c (aarch64_insert_point): Use
5118 show_debug_regs as a boolean.
5119 (aarch64_remove_point): Likewise.
5120
5121 2015-03-05 Pedro Alves <palves@redhat.com>
5122
5123 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5124 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5125 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5126 * nto-low.c (nto_target_ops): Likewise.
5127 * spu-low.c (spu_target_ops): Likewise.
5128 * win32-low.c (win32_target_ops): Likewise.
5129
5130 2015-03-04 Pedro Alves <palves@redhat.com>
5131
5132 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5133 Decide whether a breakpoint triggered based on the SIGTRAP's
5134 siginfo.si_code.
5135 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5136 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5137 (linux_low_filter_event): Check for breakpoints before checking
5138 watchpoints.
5139 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5140 siginfo.si_code.
5141 (linux_stopped_by_sw_breakpoint)
5142 (linux_supports_stopped_by_sw_breakpoint)
5143 (linux_stopped_by_hw_breakpoint)
5144 (linux_supports_stopped_by_hw_breakpoint): New functions.
5145 (linux_target_ops): Install new target methods.
5146
5147 2015-03-04 Pedro Alves <palves@redhat.com>
5148
5149 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5150 * server.c (swbreak_feature, hwbreak_feature): New globals.
5151 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5152 (captured_main): Clear swbreak_feature and hwbreak_feature.
5153 * server.h (swbreak_feature, hwbreak_feature): Declare.
5154 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5155 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5156 supports_stopped_by_hw_breakpoint>: New fields.
5157 (target_supports_stopped_by_sw_breakpoint)
5158 (target_stopped_by_sw_breakpoint)
5159 (target_supports_stopped_by_hw_breakpoint)
5160 (target_stopped_by_hw_breakpoint): Declare.
5161
5162 2015-03-04 Pedro Alves <palves@redhat.com>
5163
5164 enum lwp_stop_reason -> enum target_stop_reason
5165 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5166 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5167 (linux_wait_1, stuck_in_jump_pad_callback)
5168 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5169 (linux_stopped_by_watchpoint):
5170 * linux-low.h (enum lwp_stop_reason): Delete.
5171 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5172 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5173
5174 2015-03-04 Yao Qi <yao.qi@linaro.org>
5175
5176 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5177
5178 2015-03-03 Gary Benson <gbenson@redhat.com>
5179
5180 * hostio.c (handle_vFile): Fix prefix lengths.
5181
5182 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5183
5184 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5185 ptr_bits.
5186
5187 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5188
5189 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5190 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5191 (clean): Add "rm -f" for above C files.
5192 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5193 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5194 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5195 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5196 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5197 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5198 (init_registers_s390x_vx_linux64)
5199 (init_registers_s390x_tevx_linux64)
5200 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5201 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5202 declarations.
5203 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5204 (s390_store_vxrs_high): New functions.
5205 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5206 NT_S390_VXRS_HIGH.
5207 (s390_arch_setup): Add logic for selecting one of the new target
5208 descriptions. Activate the new vector regsets if applicable.
5209 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5210 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5211 and init_registers_s390x_tevx_linux64.
5212
5213 2015-03-01 Pedro Alves <palves@redhat.com>
5214
5215 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5216 parameter.
5217
5218 2015-02-27 Pedro Alves <palves@redhat.com>
5219
5220 * linux-x86-low.c (u_debugreg_offset): New function.
5221 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5222
5223 2015-02-27 Pedro Alves <palves@redhat.com>
5224
5225 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5226 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5227 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5228 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5229 (ps_lsetfpregs, ps_getpid)
5230 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5231 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5232 (ps_lsetxregs, ps_plog): Declare.
5233
5234 2015-02-27 Pedro Alves <palves@redhat.com>
5235
5236 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5237 IP_AGENT_EXPORT_FUNC.
5238 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5239 IP_AGENT_EXPORT_FUNC.
5240 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5241 (IP_AGENT_EXPORT): Delete.
5242 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5243 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5244 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5245 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5246 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5247 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5248 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5249 (traceframe_read_count, traceframe_write_count)
5250 (traceframes_created, trace_state_variables, get_raw_reg)
5251 (get_trace_state_variable_value, set_trace_state_variable_value)
5252 (ust_loaded, helper_thread_id, cmd_buf): Use
5253 IPA_SYM_EXPORTED_NAME.
5254 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5255 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5256 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5257 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5258 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5259 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5260 EXTERN_C_PUSH/EXTERN_C_POP.
5261 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5262 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5263 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5264 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5265 (traceframe_write_count, traceframe_read_count)
5266 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5267 (about_to_request_buffer_space, get_trace_state_variable_value)
5268 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5269 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5270 EXTERN_C_PUSH/EXTERN_C_POP.
5271 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5272 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5273 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5274 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5275 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5276 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5277 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5278 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5279 Define.
5280 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5281 (IP_AGENT_EXPORT_VAR_DECL): Define.
5282 (tracing): Declare.
5283 (gdb_agent_get_raw_reg): Declare.
5284
5285 2015-02-27 Tom Tromey <tromey@redhat.com>
5286 Pedro Alves <palves@redhat.com>
5287
5288 Rename symbols whose names are reserved C++ keywords throughout.
5289
5290 2015-02-27 Pedro Alves <palves@redhat.com>
5291
5292 * Makefile.in (COMPILER): New, get it from autoconf.
5293 (CXX): Get from autoconf instead.
5294 (COMPILE.pre): Use COMPILER.
5295 (CC-LD): Rename to ...
5296 (CC_LD): ... this. Use COMPILER.
5297 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5298 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5299 * acinclude.m4: Include build-with-cxx.m4.
5300 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5301 Disable -Werror by default if building in C++ mode.
5302 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5303 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5304 the C++ compiler. Save/restore CXXFLAGS too.
5305 * configure: Regenerate.
5306
5307 2015-02-27 Pedro Alves <palves@redhat.com>
5308
5309 * acinclude.m4: Include libiberty.m4.
5310 * configure.ac: Call libiberty_INIT.
5311 * config.in, configure: Regenerate.
5312
5313 2015-02-26 Pedro Alves <palves@redhat.com>
5314
5315 * linux-low.c (linux_wait_1): When incrementing the PC past a
5316 program breakpoint always use the_low_target.breakpoint_len as
5317 increment, rather than the maximum between that and
5318 the_low_target.decr_pc_after_break.
5319
5320 2015-02-23 Pedro Alves <palves@redhat.com>
5321
5322 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5323 thread was doing a step-over; always adjust the PC if
5324 we stepped over a permanent breakpoint.
5325 (linux_wait_1): If we stepped over breakpoint that was on top of a
5326 permanent breakpoint, manually advance the PC past it.
5327
5328 2015-02-23 Pedro Alves <palves@redhat.com>
5329
5330 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5331 modes.
5332 (x86_fill_gregset, x86_store_gregset): Use it when handling
5333 $orig_eax.
5334
5335 2015-02-20 Pedro Alves <palves@redhat.com>
5336
5337 * thread-db.c: Include "nat/linux-procfs.h".
5338 (thread_db_init): Skip listing new threads if the kernel supports
5339 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5340
5341 2015-02-20 Pedro Alves <palves@redhat.com>
5342
5343 * linux-low.c (status_pending_p_callback): Use ptid_match.
5344
5345 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5346
5347 PR breakpoints/16812
5348 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5349 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5350 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5351
5352 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5353
5354 PR breakpoints/15956
5355 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5356
5357 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5358
5359 * linux-low.c (linux_low_btrace_conf): Print size.
5360 * server.c (handle_btrace_conf_general_set): New.
5361 (hanle_general_set): Call handle_btrace_conf_general_set.
5362 (handle_query): Report Qbtrace-conf:bts:size as supported.
5363
5364 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5365
5366 * linux-low.c (linux_low_enable_btrace): Update parameters.
5367 (linux_low_btrace_conf): New.
5368 (linux_target_ops)<to_btrace_conf>: Initialize.
5369 * server.c (current_btrace_conf): New.
5370 (handle_btrace_enable): Rename to ...
5371 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5372 to target_enable_btrace. Update comment. Update users.
5373 (handle_qxfer_btrace_conf): New.
5374 (qxfer_packets): Add btrace-conf entry.
5375 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5376 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5377 (target_ops)<read_btrace_conf>: New.
5378 (target_enable_btrace): Update parameters.
5379 (target_read_btrace_conf): New.
5380
5381 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5382
5383 * server.c (handle_btrace_general_set): Remove call to
5384 target_supports_btrace.
5385 (supported_btrace_packets): New.
5386 (handle_query): Call supported_btrace_packets.
5387 * target.h: include btrace-common.h.
5388 (btrace_target_info): Removed.
5389 (supports_btrace, target_supports_btrace): Update parameters.
5390
5391 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5392
5393 * Makefile.in (SFILES): Add common/btrace-common.c.
5394 (OBS): Add common/btrace-common.o.
5395 (btrace-common.o): Add build rules.
5396 * linux-low: Include btrace-common.h.
5397 (linux_low_read_btrace): Use struct btrace_data. Call
5398 btrace_data_init and btrace_data_fini.
5399
5400 2015-02-06 Pedro Alves <palves@redhat.com>
5401
5402 * thread-db.c (find_new_threads_callback): Add debug output.
5403
5404 2015-02-04 Pedro Alves <palves@redhat.com>
5405
5406 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5407 (resume_stopped_resumed_lwps): New function.
5408 (linux_wait_for_event_filtered): Use it.
5409
5410 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5411
5412 * Makefile.in (SFILES): Add linux-personality.c.
5413 (linux-personality.o): New rule.
5414 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5415 list of objects to be built.
5416 * linux-low.c: Include nat/linux-personality.h.
5417 (linux_create_inferior): Remove code to disable address space
5418 randomization (moved to ../nat/linux-personality.c). Create
5419 cleanup to disable address space randomization.
5420
5421 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5422
5423 * Makefile.in (posix-strerror.o): New rule.
5424 (mingw-strerror.o): Likewise.
5425 * configure: Regenerated.
5426 * configure.ac: Source file ../common/common.host. Initialize new
5427 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5428
5429 2015-01-14 Yao Qi <yao@codesourcery.com>
5430
5431 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5432 (ppc-linux.o): New rule.
5433 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5434 * configure.ac: AC_CHECK_FUNCS(getauxval).
5435 * config.in: Re-generated.
5436 * configure: Re-generated.
5437 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5438 ppc64_64bit_inferior_p
5439
5440 2015-01-14 Yao Qi <yao@codesourcery.com>
5441
5442 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5443 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5444 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5445 (PT_ORIG_R3, PT_TRAP): Likewise.
5446 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5447 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5448 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5449
5450 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5451
5452 * i387-fp.c (i387_cache_to_xsave): In look over
5453 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5454 zmmh_low_space field by use of zmmh_high_space.
5455
5456 2015-01-09 Pedro Alves <palves@redhat.com>
5457
5458 * linux-low.c (step_over_bkpt): Move higher up in the file.
5459 (handle_extended_wait): Don't store the stop_pc here.
5460 (get_stop_pc): Adjust comments and rename to ...
5461 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5462 stopped for a software breakpoint or hardware breakpoint.
5463 (thread_still_has_status_pending_p): New function.
5464 (status_pending_p_callback): Use
5465 thread_still_has_status_pending_p. If the event is no longer
5466 interesting, resume the LWP.
5467 (handle_tracepoints): Add assert.
5468 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5469 (wstatus_maybe_breakpoint): New function.
5470 (cancel_breakpoint): Delete function.
5471 (check_stopped_by_watchpoint): New function, factored out from
5472 linux_low_filter_event.
5473 (lp_status_maybe_breakpoint): Delete function.
5474 (linux_low_filter_event): Remove filter_ptid argument.
5475 Leave thread group exits pending here. Store the LWP's stop PC.
5476 Always leave events pending.
5477 (linux_wait_for_event_filtered): Pull all events out of the
5478 kernel, and leave them all pending.
5479 (count_events_callback, select_event_lwp_callback): Consider all
5480 events.
5481 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5482 (select_event_lwp): Only give preference to the stepping LWP in
5483 all-stop mode. Adjust comments.
5484 (ignore_event): New function.
5485 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5486 references to cancel_breakpoints. Adjust to renames. Also give
5487 equal priority to all LWPs that have had events in non-stop mode.
5488 If reporting a software breakpoint event, unadjust the LWP's PC.
5489 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5490 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5491 Adjust.
5492 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5493 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5494 (linux_stopped_by_watchpoint): Adjust.
5495 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5496 * linux-low.h (enum lwp_stop_reason): New.
5497 (struct lwp_info) <stop_pc>: Adjust comment.
5498 <stopped_by_watchpoint>: Delete field.
5499 <stop_reason>: New field.
5500 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5501 * mem-break.c (software_breakpoint_inserted_here)
5502 (hardware_breakpoint_inserted_here): New function.
5503 * mem-break.h (software_breakpoint_inserted_here)
5504 (hardware_breakpoint_inserted_here): Declare.
5505 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5506 (cancel_breakpoints): Delete.
5507 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5508 (upload_fast_traceframes): Remove references to
5509 cancel_breakpoints.
5510
5511 2015-01-09 Pedro Alves <palves@redhat.com>
5512
5513 * thread-db.c (find_new_threads_callback): Ignore thread if the
5514 kernel thread ID is -1.
5515
5516 2015-01-09 Pedro Alves <palves@redhat.com>
5517
5518 * linux-low.c (linux_attach_fail_reason_string): Move to
5519 nat/linux-ptrace.c, and rename.
5520 (linux_attach_lwp): Update comment.
5521 (attach_proc_task_lwp_callback): New function.
5522 (linux_attach): Adjust to rename and use
5523 linux_proc_attach_tgid_threads.
5524 (linux_attach_fail_reason_string): Delete declaration.
5525
5526 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5527
5528 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5529 * server.c (gdbserver_version): Likewise.
5530
5531 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5532
5533 * remote-utils.c: Include ctype.h.
5534 (input_interrupt): Explicitly handle the case when the char
5535 received is the NUL byte. Improve the printing of non-ASCII
5536 characters.
5537
5538 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5539
5540 * linux-low.c (linux_low_filter_event): Update call to
5541 linux_enable_event_reporting following the addition of
5542 a new parameter to that function.
5543
5544 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5545
5546 PR server/17457
5547 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5548 (AARCH64_FPCR_REGNO): Likewise.
5549 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5550 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5551 (aarch64_store_fpregset): Likewise.
5552
5553 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5554
5555 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5556 Remove FIXME comment about assumption about N.
5557
5558 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5559
5560 * configure.ac: If large-file support is disabled in GDBserver,
5561 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5562 * configure: Regenerate.
5563
5564 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5565
5566 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5567 warning upon ENODATA from ptrace.
5568 * linux-s390-low.c (s390_store_tdb): New.
5569 (s390_regsets): Add regset for NT_S390_TDB.
5570
5571 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5572
5573 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5574 without a fill_function.
5575 * linux-s390-low.c (s390_fill_last_break): Remove.
5576 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5577 (s390_arch_setup): Use regset's size instead of fill_function for
5578 loop end condition.
5579
5580 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5581
5582 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5583 the regset's store function when ptrace returned an error.
5584 * regcache.c (get_thread_regcache): Invalidate register cache
5585 before fetching inferior's registers.
5586
5587 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5588
5589 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5590 while-loop as for-loop.
5591 (regsets_store_inferior_registers): Likewise.
5592
5593 2014-11-28 Yao Qi <yao@codesourcery.com>
5594
5595 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5596 * config.in, configure: Re-generate.
5597 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5598 is defined.
5599
5600 2014-11-21 Yao Qi <yao@codesourcery.com>
5601
5602 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5603 (AC_CHECK_HEADERS): Remove malloc.h.
5604 * configure: Re-generated.
5605 * config.in: Re-generated.
5606 * server.h: Don't include alloca.h and malloc.h.
5607 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5608 Don't include malloc.h.
5609
5610 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5611
5612 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5613 corresponding ERRNO check in same block.
5614
5615 2014-11-12 Pedro Alves <palves@redhat.com>
5616
5617 * server.c (cont_thread): Update comment.
5618 (start_inferior, attach_inferior): No longer clear cont_thread.
5619 (handle_v_cont): No longer set cont_thread.
5620 (captured_main): Clear cont_thread each time a GDB connects.
5621
5622 2014-11-12 Pedro Alves <palves@redhat.com>
5623
5624 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5625 thread, and don't resume all threads if the Hc thread has exited.
5626
5627 2014-11-12 Pedro Alves <palves@redhat.com>
5628
5629 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5630 the process group instead of to a specific LWP.
5631
5632 2014-10-15 Pedro Alves <palves@redhat.com>
5633
5634 PR server/17487
5635 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5636 parameter.
5637 (arm_set_thread_context): Delete.
5638 (the_low_target): Adjust.
5639 * win32-i386-low.c (debug_registers_changed)
5640 (debug_registers_used): Delete.
5641 (update_debug_registers_callback): New function.
5642 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5643 needing to update their debug registers.
5644 (win32_get_current_dr): New function.
5645 (x86_dr_low_get_addr, x86_dr_low_get_control)
5646 (x86_dr_low_get_status): Fetch the debug register from the thread
5647 record's context.
5648 (i386_initial_stuff): Adjust.
5649 (i386_get_thread_context): Remove current_event parameter. Don't
5650 clear debug_registers_changed nor copy DR values to
5651 debug_reg_state.
5652 (i386_set_thread_context): Delete.
5653 (i386_prepare_to_resume): New function.
5654 (i386_thread_added): Mark the thread as needing to update irs
5655 debug registers.
5656 (the_low_target): Remove i386_set_thread_context and install
5657 i386_prepare_to_resume.
5658 * win32-low.c (win32_get_thread_context): Adjust.
5659 (win32_set_thread_context): Use SetThreadContext
5660 directly.
5661 (win32_prepare_to_resume): New function.
5662 (win32_require_context): New function, factored out from ...
5663 (thread_rec): ... this.
5664 (continue_one_thread): Call win32_prepare_to_resume on each thread
5665 we're about to continue.
5666 (win32_resume): Call win32_prepare_to_resume on the event thread.
5667 * win32-low.h (struct win32_thread_info)
5668 <debug_registers_changed>: New field.
5669 (struct win32_target_ops): Change prototype of set_thread_context,
5670 delete set_thread_context and add prepare_to_resume.
5671 (win32_require_context): New declaration.
5672
5673 2014-10-08 Gary Benson <gbenson@redhat.com>
5674
5675 * server.h: Do not include common-exceptions.h.
5676
5677 2014-10-08 Gary Benson <gbenson@redhat.com>
5678
5679 * server.h: Do not include cleanups.h.
5680
5681 2014-09-30 James Hogan <james.hogan@imgtec.com>
5682
5683 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5684 mips64-dsp-linux.c.
5685
5686 2014-09-23 Yao Qi <yao@codesourcery.com>
5687
5688 * linux-low.c (lp_status_maybe_breakpoint): New function.
5689 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5690 (count_events_callback): Likewise.
5691 (select_event_lwp_callback): Likewise.
5692 (cancel_breakpoints_callback): Likewise.
5693
5694 2014-09-19 Don Breazeal <donb@codesourcery.com>
5695
5696 * linux-low.c (handle_extended_wait): Call
5697 linux_ptrace_get_extended_event.
5698 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5699 linux_is_extended_waitstatus.
5700
5701 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5702
5703 * Makefile.in (CPPFLAGS): Define.
5704 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5705 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5706
5707 2014-09-16 Gary Benson <gbenson@redhat.com>
5708
5709 * inferiors.h (current_inferior): Renamed as...
5710 (current_thread): New variable. All uses updated.
5711 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5712 (maybe_move_out_of_jump_pad): Likewise.
5713 (cancel_breakpoint): Likewise.
5714 (linux_low_filter_event): Likewise.
5715 (wait_for_sigstop): Likewise.
5716 (linux_resume_one_lwp): Likewise.
5717 (need_step_over_p): Likewise.
5718 (start_step_over): Likewise.
5719 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5720 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5721 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5722 and save_inferior as saved_thread.
5723 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5724 saved_thread.
5725 (regcache_invalidate_thread): Likewise.
5726 * remote-utils.c (prepare_resume_reply): Likewise.
5727 * thread-db.c (thread_db_get_tls_address): Likewise.
5728 (disable_thread_event_reporting): Likewise.
5729 (remove_thread_event_breakpoints): Likewise.
5730 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5731 as saved_thread.
5732 * target.h (set_desired_inferior): Renamed as...
5733 (set_desired_thread): New declaration. All uses updated.
5734 * server.c (myresume): Updated comment to reference thread instead
5735 of inferior.
5736 (handle_serial_event): Likewise.
5737 (handle_target_event): Likewise.
5738
5739 2014-09-12 Tom Tromey <tromey@redhat.com>
5740 Gary Benson <gbenson@redhat.com>
5741
5742 * regcache.h: Include common-regcache.h.
5743 (regcache_read_pc): Don't declare.
5744 * regcache.c (get_thread_regcache_for_ptid): New function.
5745
5746 2014-09-11 Tom Tromey <tromey@redhat.com>
5747 Gary Benson <gbenson@redhat.com>
5748
5749 * symbol.c: New file.
5750 * Makefile.in (SFILES): Add symbol.c.
5751 (OBS): Add symbol.o.
5752
5753 2014-09-11 Gary Benson <gbenson@redhat.com>
5754
5755 * target.c (target_stop_ptid, target_continue_ptid): New
5756 functions.
5757
5758 2014-09-11 Tom Tromey <tromey@redhat.com>
5759 Gary Benson <gbenson@redhat.com>
5760
5761 * target.h: Include target/target.h.
5762 * target.c (target_read_memory, target_read_uint32)
5763 (target_write_memory): New functions.
5764
5765 2014-09-11 Gary Benson <gbenson@redhat.com>
5766
5767 * server.h (debug_hw_points): Don't declare.
5768 * server.c (debug_hw_points): Don't define. Replace all uses
5769 with show_debug_regs.
5770 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5771 all uses with show_debug_regs.
5772
5773 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5774
5775 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5776 endianness into account.
5777 (ppc_supply_ptrace_register): Likewise.
5778
5779 2014-09-03 James Hogan <james.hogan@imgtec.com>
5780
5781 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5782 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5783
5784 2014-09-03 Gary Benson <gbenson@redhat.com>
5785
5786 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5787 ALL_DEBUG_ADDRESS_REGISTERS.
5788
5789 2014-09-02 Gary Benson <gbenson@redhat.com>
5790
5791 * i386-low.h: Renamed as...
5792 * x86-low.h: New file. All type, function and variable name
5793 prefixes changed from "i386_" to "x86_". All references updated.
5794 * i386-low.c: Renamed as...
5795 * x86-low.c: New file. All type, function and variable name
5796 prefixes changed from "i386_" to "x86_". All references updated.
5797
5798 2014-09-02 Gary Benson <gbenson@redhat.com>
5799
5800 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5801 (x86_linux_new_thread): Likewise.
5802
5803 2014-08-29 Gary Benson <gbenson@redhat.com>
5804
5805 * server.h (setjmp.h): Do not include.
5806 (toplevel): Do not declare.
5807 (common-exceptions.h): Include.
5808 (cleanups.h): Likewise.
5809 * server.c (toplevel): Do not define.
5810 (exit_code): New static global.
5811 (detach_or_kill_for_exit_cleanup): New function.
5812 (main): New function. Original main renamed to...
5813 (captured_main): New function.
5814 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5815
5816 2014-08-29 Gary Benson <gbenson@redhat.com>
5817
5818 * Makefile.in (SFILES): Add common/common-exceptions.c.
5819 (OBS): Add common-exceptions.o.
5820 (common-exceptions.o): New rule.
5821 * utils.c (prepare_to_throw_exception): New function.
5822
5823 2014-08-29 Gary Benson <gbenson@redhat.com>
5824
5825 * config.in: Regenerate.
5826 * configure: Likewise.
5827
5828 2014-08-29 Gary Benson <gbenson@redhat.com>
5829
5830 * Makefile.in (SFILES): Add common/cleanups.c.
5831 (OBS): cleanups.o.
5832 (cleanups.o): New rule.
5833
5834 2014-08-29 Gary Benson <gbenson@redhat.com>
5835
5836 * utils.c (internal_vwarning): New function.
5837
5838 2014-08-28 Gary Benson <gbenson@redhat.com>
5839
5840 * utils.h (fatal): Remove declaration.
5841 * utils.c (fatal): Remove function.
5842
5843 2014-08-28 Gary Benson <gbenson@redhat.com>
5844
5845 * tracepoint.c (gdb_agent_init): Replace fatal with
5846 perror_with_name.
5847 (initialize_tracepoint): Likewise.
5848
5849 2014-08-28 Gary Benson <gbenson@redhat.com>
5850
5851 * remote-utils.c (remote_prepare): Replace fatal with error.
5852
5853 2014-08-28 Gary Benson <gbenson@redhat.com>
5854
5855 * linux-low.c (linux_async): Replace fatal with warning.
5856 Tidy up and return.
5857 (linux_start_non_stop): Return -1 if linux_async failed.
5858
5859 2014-08-28 Gary Benson <gbenson@redhat.com>
5860
5861 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5862 gdb_assert.
5863 (i386_dr_low_get_addr): Remove vague comment.
5864 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5865 gdb_assert.
5866
5867 2014-08-28 Gary Benson <gbenson@redhat.com>
5868
5869 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5870 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5871 internal_error.
5872 (linux_resume_one_lwp): Likewise.
5873 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5874 gdb_assert.
5875 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5876 with internal_error.
5877 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5878 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5879 (find_register_by_name): Replace fatal with internal_error.
5880 (find_regno): Likewise.
5881 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5882 * thread-db.c (thread_db_create_event): Likewise.
5883 (thread_db_load_search): Likewise.
5884 (try_thread_db_load_1): Likewise.
5885 * tracepoint.c (get_jump_space_head): Replace fatal with
5886 internal_error.
5887 (claim_trampoline_space): Likewise.
5888 (have_fast_tracepoint_trampoline_buffer): Likewise.
5889 (cmd_qtstart): Likewise.
5890 (stop_tracing): Likewise.
5891 (fast_tracepoint_collecting): Likewise.
5892 (target_malloc): Likewise.
5893 (download_tracepoint): Likewise.
5894 (download_trace_state_variables): Replace check with gdb_assert.
5895 (upload_fast_traceframes): Replace fatal with internal_error.
5896
5897 2014-08-19 Tom Tromey <tromey@redhat.com>
5898 Gary Benson <gbenson@redhat.com>
5899
5900 * Makefile.in (SFILES): Add common/common-debug.c.
5901 (OBS): Add common-debug.o.
5902 (common-debug.o): New rule.
5903 * debug.h (debug_printf): Don't declare.
5904 * debug.c (debug_printf): Renamed and rewritten as...
5905 (debug_vprintf): New function.
5906
5907 2014-08-19 Gary Benson <gbenson@redhat.com>
5908
5909 * utils.h: Do not include print-utils.h.
5910
5911 2014-08-19 Tom Tromey <tromey@redhat.com>
5912 Gary Benson <gbenson@redhat.com>
5913
5914 * server.h: Add static assertion.
5915 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5916
5917 2014-08-19 Tom Tromey <tromey@redhat.com>
5918 Gary Benson <gbenson@redhat.com>
5919
5920 * Makefile.in (SFILES): Add common/errors.c.
5921 (OBS): Add errors.o.
5922 (IPA_OBS): Add errors-ipa.o.
5923 (errors.o): New rule.
5924 (errors-ipa.o): Likewise.
5925 * utils.h (perror_with_name, error, warning): Don't declare.
5926 * utils.c (warning): Renamed and rewritten as...
5927 (vwarning): New function.
5928 (error): Renamed and rewritten as...
5929 (verror): New function.
5930 (internal_error): Renamed and rewritten as...
5931 (internal_verror): New function.
5932
5933 2014-08-07 Gary Benson <gbenson@redhat.com>
5934
5935 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5936 * configure: Regenerate.
5937 * config.in: Likewise.
5938 * server.h: Do not include errno.h.
5939 * event-loop.c: Likewise.
5940 * hostio-errno.c: Likewise.
5941 * linux-low.c: Likewise.
5942 * remote-utils.c: Likewise.
5943 * spu-low.c: Likewise.
5944 * utils.c: Likewise.
5945 * gdbreplay.c: Unconditionally include errno.h.
5946
5947 2014-08-07 Gary Benson <gbenson@redhat.com>
5948
5949 * server.h: Do not include string.h.
5950 * event-loop.c: Likewise.
5951 * linux-low.c: Likewise.
5952 * regcache.c: Likewise.
5953 * remote-utils.c: Likewise.
5954 * spu-low.c: Likewise.
5955 * utils.c: Likewise.
5956
5957 2014-08-07 Gary Benson <gbenson@redhat.com>
5958
5959 * server.h: Do not include gdb_assert.h.
5960
5961 2014-08-07 Gary Benson <gbenson@redhat.com>
5962
5963 * server.h: Do not include common-utils.h.
5964
5965 2014-08-07 Gary Benson <gbenson@redhat.com>
5966
5967 * server.h: Do not include ptid.h.
5968 * notif.h: Likewise.
5969
5970 2014-08-07 Gary Benson <gbenson@redhat.com>
5971
5972 * server.h: Do not include gdb_locale.h.
5973
5974 2014-08-07 Gary Benson <gbenson@redhat.com>
5975
5976 * server.h: Do not include gdb/signals.h.
5977 * win32-low.c: Likewise.
5978
5979 2014-08-07 Gary Benson <gbenson@redhat.com>
5980
5981 * server.h: Do not include pathmax.h.
5982
5983 2014-08-07 Gary Benson <gbenson@redhat.com>
5984
5985 * server.h: Do not include libiberty.h.
5986 * linux-bfin-low.c: Likewise.
5987
5988 2014-08-07 Gary Benson <gbenson@redhat.com>
5989
5990 * server.h: Do not include ansidecl.h.
5991
5992 2014-08-07 Gary Benson <gbenson@redhat.com>
5993
5994 * linux-x86-low.c: Do not include stddef.h.
5995 * lynx-ppc-low.c: Likewise.
5996 * tracepoint.c: Likewise.
5997
5998 2014-08-07 Gary Benson <gbenson@redhat.com>
5999
6000 * server.h: Do not include stdarg.h.
6001 * nto-low.c: Likewise.
6002
6003 2014-08-07 Gary Benson <gbenson@redhat.com>
6004
6005 * server.h: Do not include stdlib.h.
6006 * inferiors.c: Likewise.
6007 * linux-low.c: Likewise.
6008 * regcache.c: Likewise.
6009 * spu-low.c: Likewise.
6010 * tracepoint.c: Likewise.
6011 * utils.c: Likewise.
6012
6013 2014-08-07 Gary Benson <gbenson@redhat.com>
6014
6015 * server.h: Do not include stdio.h.
6016 * linux-low.c: Likewise.
6017 * remote-utils.c: Likewise.
6018 * spu-low.c: Likewise.
6019 * utils.c: Likewise.
6020 * wincecompat.c: Likewise.
6021
6022 2014-08-06 Gary Benson <gbenson@redhat.com>
6023
6024 * regcache.c (init_register_cache): Move conditionals inside if.
6025
6026 2014-08-06 Gary Benson <gbenson@redhat.com>
6027
6028 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6029
6030 2014-07-31 Gary Benson <gbenson@redhat.com>
6031
6032 * ax.h: Do not include server.h.
6033 * gdbthread.h: Likewise.
6034 * lynx-low.h: Likewise.
6035 * notif.h: Likewise.
6036
6037 2014-07-30 Gary Benson <gbenson@redhat.com>
6038
6039 * server.h: Include common-defs.h.
6040 Do not include config.h or build-gnulib-gdbserver/config.h.
6041
6042 2014-07-30 Gary Benson <gbenson@redhat.com>
6043
6044 * hostio-errno.c: Move server.h to top of includes list.
6045 * inferiors.c: Likewise.
6046 * linux-x86-low.c: Likewise.
6047 * notif.c: Include server.h.
6048
6049 2014-07-24 Tom Tromey <tromey@redhat.com>
6050 Gary Benson <gbenson@redhat.com>
6051
6052 * server.h (CORE_ADDR): Now unsigned.
6053
6054 2014-07-16 Pedro Alves <palves@redhat.com>
6055
6056 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6057
6058 2014-07-15 Pedro Alves <palves@redhat.com>
6059
6060 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6061 copy.
6062
6063 2014-07-11 Pedro Alves <palves@redhat.com>
6064
6065 * linux-low.c (kill_wait_lwp): New function, based on
6066 kill_one_lwp_callback, but use my_waitpid directly.
6067 (kill_one_lwp_callback, linux_kill): Use it.
6068
6069 2014-06-23 Pedro Alves <palves@redhat.com>
6070
6071 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6072 before setting DR0..DR3.
6073
6074 2014-06-20 Gary Benson <gbenson@redhat.com>
6075
6076 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6077 * configure: Regenerated.
6078 * config.in: Likewise.
6079
6080 2014-06-20 Gary Benson <gbenson@redhat.com>
6081
6082 * Makefile.in (SFILES): Update locations for files moved
6083 from common to nat.
6084 (object file files): Reordered.
6085
6086 2014-06-20 Gary Benson <gbenson@redhat.com>
6087
6088 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6089 (i386_dr_low_set_addr): Likewise.
6090 (i386_dr_low_get_addr): Likewise.
6091 (i386_dr_low_can_set_control): Likewise.
6092 (i386_dr_low_set_control): Likewise.
6093 (i386_dr_low_get_control): Likewise.
6094 (i386_dr_low_get_status): Likewise.
6095 (i386_get_debug_register_length): Likewise.
6096 * linux-x86-low.c (i386_dr_low_set_addr):
6097 Changed signature. Made static.
6098 (i386_dr_low_get_addr): Likewise.
6099 (i386_dr_low_set_control): Likewise.
6100 (i386_dr_low_get_control): Likewise.
6101 (i386_dr_low_get_status): Likewise.
6102 (i386_dr_low): New global variable.
6103 * win32-i386-low.c (i386_dr_low_set_addr):
6104 Changed signature. Made static.
6105 (i386_dr_low_get_addr): Likewise.
6106 (i386_dr_low_set_control): Likewise.
6107 (i386_dr_low_get_control): Likewise.
6108 (i386_dr_low_get_status): Likewise.
6109 (i386_dr_low): New global variable.
6110
6111 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6112
6113 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6114 * Makefile.in (AR, AR_FLAGS): Define.
6115 * configure: Regenerate.
6116
6117 2014-06-19 Gary Benson <gbenson@redhat.com>
6118
6119 * Makefile.in (i386-dregs.o): New rule.
6120 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6121 * i386-low.c (target.h): Remove include.
6122 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6123 (DR_CONTROL_SHIFT): Likewise.
6124 (DR_CONTROL_SIZE): Likewise.
6125 (DR_RW_EXECUTE): Likewise.
6126 (DR_RW_WRITE): Likewise.
6127 (DR_RW_READ): Likewise.
6128 (DR_RW_IORW): Likewise.
6129 (DR_LEN_1): Likewise.
6130 (DR_LEN_2): Likewise.
6131 (DR_LEN_4): Likewise.
6132 (DR_LEN_8): Likewise.
6133 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6134 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6135 (DR_ENABLE_SIZE): Likewise.
6136 (DR_LOCAL_SLOWDOWN): Likewise.
6137 (DR_GLOBAL_SLOWDOWN): Likewise.
6138 (DR_CONTROL_RESERVED): Likewise.
6139 (I386_DR_CONTROL_MASK): Likewise.
6140 (I386_DR_VACANT): Likewise.
6141 (I386_DR_LOCAL_ENABLE): Likewise.
6142 (I386_DR_GLOBAL_ENABLE): Likewise.
6143 (I386_DR_DISABLE): Likewise.
6144 (I386_DR_SET_RW_LEN): Likewise.
6145 (I386_DR_GET_RW_LEN): Likewise.
6146 (I386_DR_WATCH_HIT): Likewise.
6147 (i386_wp_op_t): Likewise.
6148 (i386_show_dr): Likewise.
6149 (i386_length_and_rw_bits): Likewise.
6150 (i386_insert_aligned_watchpoint): Likewise.
6151 (i386_remove_aligned_watchpoint): Likewise.
6152 (i386_handle_nonaligned_watchpoint): Likewise.
6153 i386_update_inferior_debug_regs(): Likewise.
6154 (i386_dr_insert_watchpoint): Likewise.
6155 (i386_dr_remove_watchpoint): Likewise.
6156 (i386_dr_region_ok_for_watchpoint): Likewise.
6157 (i386_dr_stopped_data_address): Likewise.
6158 (i386_dr_stopped_by_watchpoint): Likewise.
6159
6160 2014-06-19 Gary Benson <gbenson@redhat.com>
6161
6162 * i386-low.c (i386_dr_show): Renamed to
6163 i386_show_dr and made static. All uses updated.
6164 (i386_dr_length_and_rw_bits): Renamed to
6165 i386_length_and_rw_bits and made static.
6166 All uses updated.
6167 (i386_dr_insert_aligned_watchpoint): Renamed to
6168 i386_insert_aligned_watchpoint and made static.
6169 All uses updated.
6170 (i386_dr_remove_aligned_watchpoint): Renamed to
6171 i386_remove_aligned_watchpoint and made static.
6172 All uses updated.
6173 (i386_dr_update_inferior_debug_regs): Renamed to
6174 i386_update_inferior_debug_regs and made static.
6175 All uses updated.
6176
6177 2014-06-18 Gary Benson <gbenson@redhat.com>
6178
6179 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6180 (i386_dr_low_can_set_control): Likewise.
6181 (i386_get_debug_register_length): Likewise.
6182 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6183 (i386_dr_low_can_set_control): Likewise.
6184 (i386_get_debug_register_length): Likewise.
6185
6186 2014-06-17 Gary Benson <gbenson@redhat.com>
6187
6188 * i386-low.h (i386-dregs.h): New include.
6189 (DR_FIRSTADDR): Now in i386-dregs.h.
6190 (DR_LASTADDR): Likewise.
6191 (DR_NADDR): Likewise.
6192 (DR_STATUS): Likewise.
6193 (DR_CONTROL): Likewise.
6194 (i386_debug_reg_state): Likewise.
6195 (i386_dr_insert_watchpoint): Likewise.
6196 (i386_dr_remove_watchpoint): Likewise.
6197 (i386_dr_region_ok_for_watchpoint): Likewise.
6198 (i386_dr_stopped_data_address): Likewise.
6199 (i386_dr_stopped_by_watchpoint): Likewise.
6200 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6201
6202 2014-06-18 Gary Benson <gbenson@redhat.com>
6203
6204 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6205 i386_dr_insert_watchpoint.
6206 (i386_low_remove_watchpoint): Renamed to
6207 i386_dr_remove_watchpoint.
6208 (i386_low_region_ok_for_watchpoint): Renamed to
6209 i386_dr_region_ok_for_watchpoint.
6210 (i386_low_stopped_data_address): Renamed to
6211 i386_dr_stopped_data_address.
6212 (i386_low_stopped_by_watchpoint): Renamed to
6213 i386_dr_stopped_by_watchpoint.
6214 * i386-low.c (i386_show_dr): Renamed to
6215 i386_dr_show and made nonstatic. All uses updated.
6216 (i386_length_and_rw_bits): Renamed to
6217 i386_dr_length_and_rw_bits and made nonstatic.
6218 All uses updated.
6219 (i386_insert_aligned_watchpoint): Renamed to
6220 i386_dr_insert_aligned_watchpoint and made nonstatic.
6221 All uses updated.
6222 (i386_remove_aligned_watchpoint): Renamed to
6223 i386_dr_remove_aligned_watchpoint and made nonstatic.
6224 All uses updated.
6225 (i386_update_inferior_debug_regs): Renamed to
6226 i386_dr_update_inferior_debug_regs and made nonstatic.
6227 All uses updated.
6228 (i386_low_insert_watchpoint): Renamed to
6229 i386_dr_insert_watchpoint. All uses updated.
6230 (i386_low_remove_watchpoint): Renamed to
6231 i386_dr_remove_watchpoint. All uses updated.
6232 (i386_low_region_ok_for_watchpoint): Renamed to
6233 i386_dr_region_ok_for_watchpoint. All uses updated.
6234 (i386_low_stopped_data_address): Renamed to
6235 i386_dr_stopped_data_address. All uses updated.
6236 (i386_low_stopped_by_watchpoint): Renamed to
6237 i386_dr_stopped_by_watchpoint. All uses updated.
6238
6239 2014-06-18 Gary Benson <gbenson@redhat.com>
6240
6241 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6242 (i386_dr_low_can_set_control): Likewise.
6243 (i386_insert_aligned_watchpoint): New check.
6244
6245 2014-06-18 Gary Benson <gbenson@redhat.com>
6246
6247 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6248 Renamed to state.
6249
6250 2014-06-18 Gary Benson <gbenson@redhat.com>
6251
6252 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6253 instead of fatal and error.
6254 (i386_handle_nonaligned_watchpoint): Likewise.
6255
6256 2014-06-18 Gary Benson <gbenson@redhat.com>
6257
6258 * i386-low.c (i386_get_debug_register_length): New macro.
6259 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6260 (i386_show_dr): Use debug_printf instead of fprintf. Use
6261 phex to format values.
6262
6263 2014-06-18 Gary Benson <gbenson@redhat.com>
6264
6265 * i386-low.h: Comment changes.
6266 * i386-low.c: Likewise.
6267
6268 2014-06-18 Gary Benson <gbenson@redhat.com>
6269
6270 * i386-low.c: Whitespace changes.
6271
6272 2014-06-12 Tom Tromey <tromey@redhat.com>
6273
6274 * utils.c (freeargv): Remove.
6275
6276 2014-06-12 Tom Tromey <tromey@redhat.com>
6277
6278 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6279 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6280 (parse_debug_format_options): Likewise.
6281 (gdbserver_usage): Likewise.
6282 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6283 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6284 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6285 against libiberty.
6286 ($(LIBGNU)): Depend on libiberty.
6287 (all-lib): Recurse into all subdirs.
6288 (install-only): Invoke "install" target in subdirs.
6289 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6290 targets.
6291 * configure: Rebuild.
6292 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6293 for vasprintf, vsnprintf, or gettimeofday.
6294 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6295 srv_tgtobj.
6296
6297 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6298
6299 * development.sh: Delete.
6300 * Makefile.in (config.status): Adjust dependency on development.sh.
6301 * configure.ac: Adjust development.sh source call.
6302 * configure: Regenerate.
6303
6304 2014-06-02 Pedro Alves <palves@redhat.com>
6305
6306 * ax.c (gdb_free_agent_expr): New function.
6307 * ax.h (gdb_free_agent_expr): New declaration.
6308 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6309 list.
6310 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6311 static.
6312 (clear_breakpoint_conditions_and_commands): New function.
6313 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6314 (clear_breakpoint_conditions_and_commands): New declaration.
6315
6316 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6317
6318 * linux-aarch64-low.c (asm/ptrace.h): Include.
6319
6320 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6321
6322 Fix TLS access for -static -pthread.
6323 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6324 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6325 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6326
6327 2014-05-20 Pedro Alves <palves@redhat.com>
6328
6329 * linux-aarch64-low.c (aarch64_insert_point)
6330 (aarch64_remove_point): No longer check whether the type is
6331 supported here. Adjust to new interface.
6332 (the_low_target): Install aarch64_supports_z_point_type as
6333 supports_z_point_type method.
6334 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6335 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6336 instead of a Z packet char. Adjust.
6337 (arm_supports_z_point_type): New function.
6338 (arm_insert_point, arm_remove_point): Adjust to new interface.
6339 (the_low_target): Install arm_supports_z_point_type.
6340 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6341 (cris_insert_point, cris_remove_point): Adjust to new interface.
6342 Don't check whether the type is supported here.
6343 (the_low_target): Install cris_supports_z_point_type.
6344 * linux-low.c (linux_supports_z_point_type): New function.
6345 (linux_insert_point, linux_remove_point): Adjust to new interface.
6346 * linux-low.h (struct linux_target_ops) <insert_point,
6347 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6348 raw_breakpoint pointer parameter.
6349 <supports_z_point_type>: New method.
6350 * linux-mips-low.c (mips_supports_z_point_type): New function.
6351 (mips_insert_point, mips_remove_point): Adjust to new interface.
6352 Use mips_supports_z_point_type.
6353 (the_low_target): Install mips_supports_z_point_type.
6354 * linux-ppc-low.c (the_low_target): Install NULL as
6355 supports_z_point_type method.
6356 * linux-s390-low.c (the_low_target): Install NULL as
6357 supports_z_point_type method.
6358 * linux-sparc-low.c (the_low_target): Install NULL as
6359 supports_z_point_type method.
6360 * linux-x86-low.c (x86_supports_z_point_type): New function.
6361 (x86_insert_point): Adjust to new insert_point interface. Use
6362 insert_memory_breakpoint. Adjust to new
6363 i386_low_insert_watchpoint interface.
6364 (x86_remove_point): Adjust to remove_point interface. Use
6365 remove_memory_breakpoint. Adjust to new
6366 i386_low_remove_watchpoint interface.
6367 (the_low_target): Install x86_supports_z_point_type.
6368 * lynx-low.c (lynx_target_ops): Install NULL as
6369 supports_z_point_type callback.
6370 * nto-low.c (nto_supports_z_point_type): New.
6371 (nto_insert_point, nto_remove_point): Adjust to new interface.
6372 (nto_target_ops): Install nto_supports_z_point_type.
6373 * mem-break.c: Adjust intro comment.
6374 (struct raw_breakpoint) <raw_type, size>: New fields.
6375 <inserted>: Update comment.
6376 <shlib_disabled>: Delete field.
6377 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6378 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6379 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6380 (raw_bkpt_type_to_target_hw_bp_type): New function.
6381 (find_enabled_raw_code_breakpoint_at): New function.
6382 (find_raw_breakpoint_at): New type and size parameters. Use them.
6383 (insert_memory_breakpoint): New function, based off
6384 set_raw_breakpoint_at.
6385 (remove_memory_breakpoint): New function.
6386 (set_raw_breakpoint_at): Reimplement.
6387 (set_breakpoint): New, based on set_breakpoint_at.
6388 (set_breakpoint_at): Reimplement.
6389 (delete_raw_breakpoint): Go through the_target->remove_point
6390 instead of assuming memory breakpoints.
6391 (find_gdb_breakpoint_at): Delete.
6392 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6393 (find_gdb_breakpoint): New function.
6394 (set_gdb_breakpoint_at): Delete.
6395 (z_type_supported): New function.
6396 (set_gdb_breakpoint_1): New function, loosely based off
6397 set_gdb_breakpoint_at.
6398 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6399 (delete_gdb_breakpoint_at): Delete.
6400 (delete_gdb_breakpoint_1): New function, loosely based off
6401 delete_gdb_breakpoint_at.
6402 (delete_gdb_breakpoint): New function.
6403 (clear_gdb_breakpoint_conditions): Rename to ...
6404 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6405 breakpoint.
6406 (add_condition_to_breakpoint): Make static.
6407 (add_breakpoint_condition): Take a struct breakpoint pointer
6408 instead of an address. Adjust.
6409 (gdb_condition_true_at_breakpoint): Rename to ...
6410 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6411 z_type parameter.
6412 (gdb_condition_true_at_breakpoint): Reimplement.
6413 (add_breakpoint_commands): Take a struct breakpoint pointer
6414 instead of an address. Adjust.
6415 (gdb_no_commands_at_breakpoint): Rename to ...
6416 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6417 parameter. Return true if no breakpoint was found. Change debug
6418 output.
6419 (gdb_no_commands_at_breakpoint): Reimplement.
6420 (run_breakpoint_commands): Rename to ...
6421 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6422 and change return type to boolean.
6423 (run_breakpoint_commands): New function.
6424 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6425 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6426 breakpoint. Go through the_target->remove_point instead of
6427 assuming memory breakpoint.
6428 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6429 software and hardware breakpoints.
6430 (reinsert_raw_breakpoint): Go through the_target->insert_point
6431 instead of assuming memory breakpoint.
6432 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6433 software and hardware breakpoints.
6434 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6435 Check both software and hardware breakpoints.
6436 (validate_inserted_breakpoint): Assert the breakpoint is a
6437 software breakpoint. Set the inserted flag to -1 instead of
6438 setting shlib_disabled.
6439 (delete_disabled_breakpoints): Adjust.
6440 (validate_breakpoints): Only validate software breakpoints.
6441 Adjust to inserted flag change.
6442 (check_mem_read, check_mem_write): Skip breakpoint types other
6443 than software breakpoints. Adjust to inserted flag change.
6444 * mem-break.h (enum raw_bkpt_type): New enum.
6445 (raw_breakpoint, struct process_info): Forward declare.
6446 (Z_packet_to_target_hw_bp_type): Delete declaration.
6447 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6448 (set_gdb_breakpoint, delete_gdb_breakpoint)
6449 (clear_breakpoint_conditions): New declarations.
6450 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6451 (breakpoint_inserted_here): Update comment.
6452 (add_breakpoint_condition, add_breakpoint_commands): Replace
6453 address parameter with a breakpoint pointer parameter.
6454 (gdb_breakpoint_here): Update comment.
6455 (delete_gdb_breakpoint_at): Delete.
6456 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6457 * server.c (process_point_options): Take a struct breakpoint
6458 pointer instead of an address. Adjust.
6459 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6460 delete_gdb_breakpoint.
6461 * spu-low.c (spu_target_ops): Install NULL as
6462 supports_z_point_type method.
6463 * target.h: Include mem-break.h.
6464 (struct target_ops) <prepare_to_access_memory>: Update comment.
6465 <supports_z_point_type>: New field.
6466 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6467 instead of a char. Also take a raw breakpoint pointer.
6468 * win32-arm-low.c (the_low_target): Install NULL as
6469 supports_z_point_type.
6470 * win32-i386-low.c (i386_supports_z_point_type): New function.
6471 (i386_insert_point, i386_remove_point): Adjust to new interface.
6472 (the_low_target): Install i386_supports_z_point_type.
6473 * win32-low.c (win32_supports_z_point_type): New function.
6474 (win32_insert_point, win32_remove_point): Adjust to new interface.
6475 (win32_target_ops): Install win32_supports_z_point_type.
6476 * win32-low.h (struct win32_target_ops):
6477 <supports_z_point_type>: New method.
6478 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6479 instead of a char. Also take a raw breakpoint pointer.
6480
6481 2014-05-20 Pedro Alves <palves@redhat.com>
6482
6483 * mem-break.h: Include break-common.h.
6484 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6485 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6486 (Z_packet_to_target_hw_bp_type): New declaration.
6487 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6488 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6489 (Z_PACKET_ACCESS_WP): Delete macros.
6490 (Z_packet_to_hw_type): Delete function.
6491 * i386-low.h: Don't include break-common.h here.
6492 (Z_packet_to_hw_type): Delete declaration.
6493 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6494 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6495 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6496 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6497 * linux-aarch64-low.c: Don't include break-common.h here.
6498 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6499 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6500 (Z_packet_to_target_hw_bp_type): Delete function.
6501 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6502 function.
6503 (mips_insert_point, mips_remove_point): Use
6504 Z_packet_to_target_hw_bp_type.
6505
6506 2014-05-20 Pedro Alves <palves@redhat.com>
6507
6508 * linux-aarch64-low.c: Include break-common.h.
6509 (enum target_point_type): Delete.
6510 (Z_packet_to_point_type): Rename to ...
6511 (Z_packet_to_target_hw_bp_type): ... this, and return a
6512 target_hw_bp_type instead.
6513 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6514 instead of an enum target_point_type.
6515 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6516 breakpoint type.
6517 (aarch64_dr_state_insert_one_point)
6518 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6519 (aarch64_handle_aligned_watchpoint)
6520 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6521 Take an enum target_hw_bp_type instead of an enum
6522 target_point_type.
6523 (aarch64_supports_z_point_type): New function.
6524 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6525 use Z_packet_to_target_hw_bp_type.
6526
6527 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6528
6529 * configure.ac: Only use -Werror by default when DEVELOPMENT
6530 is true.
6531 * configure: Regenerate.
6532
6533 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6534
6535 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6536 * linux-x86-low.c (X86_64_USER_REGS): New.
6537 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6538
6539 2014-04-28 Yao Qi <yao@codesourcery.com>
6540
6541 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6542 name.
6543
6544 2014-04-25 Pedro Alves <palves@redhat.com>
6545
6546 PR server/16255
6547 * linux-low.c (linux_attach_fail_reason_string): New function.
6548 (linux_attach_lwp): Delete.
6549 (linux_attach_lwp_1): Rename to ...
6550 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6551 argument. Remove "initial" parameter. Return int instead of
6552 void. Don't error or warn here.
6553 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6554 failure to attach to the tgid. Call warning when failing to
6555 attach to an lwp.
6556 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6557 argument. Remove "initial" parameter. Return int instead of
6558 void. Don't error or warn here.
6559 (linux_attach_fail_reason_string): New declaration.
6560 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6561 interface change. Use linux_attach_fail_reason_string.
6562
6563 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6564 Walfred Tedeschi <walfred.tedeschi@intel.com>
6565
6566 * Makefile.in: Added rules to handle new files
6567 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6568 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6569 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6570 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6571 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6572 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6573 x32-avx512-linux.o.
6574 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6575 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6576 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6577 i386/x32-avx512.xml.
6578 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6579 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6580 i386/x32-avx512-linux.xml.
6581 * i387-fp.c (num_avx512_k_registers): New constant for number
6582 of K registers.
6583 (num_avx512_zmmh_low_registers): New constant for number of
6584 lower ZMM registers (0-15).
6585 (num_avx512_zmmh_high_registers): New constant for number of
6586 higher ZMM registers (16-31).
6587 (num_avx512_ymmh_registers): New contant for number of higher
6588 YMM registers (ymm16-31 added by avx521 on x86_64).
6589 (num_avx512_xmm_registers): New constant for number of higher
6590 XMM registers (xmm16-31 added by AVX512 on x86_64).
6591 (struct i387_xsave): Add space for AVX512 registers.
6592 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6593 Add code to handle AVX512 registers.
6594 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6595 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6596 prototypei from generated file.
6597 (tdesc_amd64_avx512_linux): Likewise.
6598 (init_registers_x32_avx512_linux): Likewise.
6599 (tdesc_x32_avx512_linux): Likewise.
6600 (init_registers_i386_avx512_linux): Likewise.
6601 (tdesc_i386_avx512_linux): Likewise.
6602 (x86_64_regmap): Add AVX512 registers.
6603 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6604 mask.
6605 (initialize_low_arch): Add code to initialize AVX512 registers.
6606
6607 2014-04-23 Pedro Alves <palves@redhat.com>
6608
6609 * mem-break.c (find_gdb_breakpoint_at): Make static.
6610 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6611
6612 2014-04-23 Pedro Alves <palves@redhat.com>
6613
6614 * i386-low.c: Don't include break-common.h here.
6615 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6616 prototype to take target_hw_bp_type as argument instead of a Z
6617 packet char.
6618 * i386-low.h: Include break-common.h here.
6619 (Z_packet_to_hw_type): Declare.
6620 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6621 prototypes.
6622 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6623 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6624 (x86_remove_point): Convert the packet number to a
6625 target_hw_bp_type before calling i386_low_remove_watchpoint.
6626 * win32-i386-low.c (i386_insert_point): Convert the packet number
6627 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6628 (i386_remove_point): Convert the packet number to a
6629 target_hw_bp_type before calling i386_low_remove_watchpoint.
6630
6631 2014-04-23 Pedro Alves <palves@redhat.com>
6632
6633 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6634
6635 2014-04-10 Pedro Alves <palves@redhat.com>
6636
6637 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6638 Check if the condition or command is NULL before checking if the
6639 breakpoint is known. On success, return true.
6640 * mem-break.h (add_breakpoint_condition): Document return.
6641 (add_breakpoint_commands): Add describing comment.
6642 * server.c (skip_to_semicolon): New function.
6643 (process_point_options): Use it.
6644
6645 2014-04-09 Pedro Alves <palves@redhat.com>
6646
6647 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6648 to lwpid_of.
6649
6650 2014-02-27 Pedro Alves <palves@redhat.com>
6651
6652 PR 12702
6653 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6654 macros.
6655 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6656 output.
6657 (last_thread_of_process_p): Take a PID argument instead of a
6658 thread pointer.
6659 (linux_wait_for_lwp): Delete.
6660 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6661 functions.
6662 (linux_low_filter_event): New function, party factored out from
6663 linux_wait_for_event.
6664 (linux_wait_for_event): Rename to ...
6665 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6666 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6667 sigsuspend. Check for zombie leaders.
6668 (linux_wait_for_event): Reimplement as wrapper around
6669 linux_wait_for_event_filtered.
6670 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6671 a normal or signal exit is seen, it's the whole process exiting.
6672 (wait_for_sigstop): No longer a for_each_inferior callback.
6673 Rewrite on top of linux_wait_for_event_filtered.
6674 (stop_all_lwps): Call wait_for_sigstop directly.
6675 * server.c (resume, handle_target_event): Handle
6676 TARGET_WAITKIND_NO_RESUMED.
6677
6678 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6679
6680 * win32-low.c (psapi_get_dll_name,
6681 * win32_CreateToolhelp32Snapshot): Delete.
6682 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6683 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6684 Delete.
6685 (handle_load_dll): Add function description.
6686 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6687
6688 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6689
6690 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6691 Add comment.
6692 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6693 base address when calling win32_add_one_solib.
6694 (handle_load_dll): Delete local variable load_addr.
6695 Remove 0x1000 offset applied to DLL base address when calling
6696 win32_add_one_solib.
6697 (handle_unload_dll): Add comment.
6698
6699 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6700
6701 * win32-low.c (win32_add_all_dlls): Renames
6702 win32_ensure_ntdll_loaded. Rewrite function documentation.
6703 Adjust implementation to always load all DLLs.
6704 Add 0x1000 offset to DLL base address when calling
6705 win32_add_one_solib.
6706 (child_initialization_done): New static global.
6707 (do_initial_child_stuff): Set child_initialization_done to
6708 zero during child initialization, and 1 after. Replace call
6709 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6710 Add comment.
6711 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6712 (handle_unload_dll): Add function documentation.
6713 (get_child_debug_event): Ignore load and unload DLL events
6714 during child initialization.
6715
6716 2014-02-20 Doug Evans <dje@google.com>
6717
6718 Remove global all_lwps.
6719 * inferiors.h (ptid_of): Move here from linux-low.h.
6720 (pid_of, lwpid_of): Ditto.
6721 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6722 parameter is a struct thread_info * now.
6723 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6724 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6725 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6726 directly.
6727 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6728 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6729 * linux-arm-low.c (update_registers_callback): Update, "entry"
6730 parameter is a struct thread_info * now.
6731 Fetch lwpid from current_inferior directly.
6732 (arm_insert_point): Pass &all_threads to find_inferior instead of
6733 &all_lwps.
6734 (arm_remove_point): Ditto.
6735 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6736 (arm_prepare_to_resume): Fetch pid from thread.
6737 (arm_read_description): Fetch lwpid from current_inferior directly.
6738 * linux-low.c (all_lwps): Delete.
6739 (delete_lwp): Delete call to remove_inferior.
6740 (handle_extended_wait): Fetch lwpid from thread.
6741 (add_lwp): Don't set lwp->entry.id. Remove call to
6742 add_inferior_to_list.
6743 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6744 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6745 (kill_one_lwp_callback): Ditto.
6746 (linux_kill): Don't dereference NULL pointer.
6747 Fetch ptid,lwpid from thread.
6748 (get_detach_signal): Fetch ptid from thread.
6749 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6750 Simplify call to regcache_invalidate_thread.
6751 (delete_lwp_callback): Update, "entry" parameter is a
6752 struct thread_info * now. Fetch pid from thread.
6753 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6754 (status_pending_p_callback): Update, "entry" parameter is a
6755 struct thread_info * now. Fetch ptid from thread.
6756 (find_lwp_pid): Update, "entry" parameter is a
6757 struct thread_info * now.
6758 (linux_wait_for_lwp): Fetch pid from thread.
6759 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6760 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6761 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6762 (dequeue_one_deferred_signal): Ditto.
6763 (cancel_breakpoint): Fetch ptid from current_inferior.
6764 (linux_wait_for_event): Pass &all_threads to find_inferior,
6765 not &all_lwps. Fetch ptid, lwpid from thread.
6766 (count_events_callback): Update, "entry" parameter is a
6767 struct thread_info * now.
6768 (select_singlestep_lwp_callback): Ditto.
6769 (select_event_lwp_callback): Ditto.
6770 (cancel_breakpoints_callback): Ditto.
6771 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6772 not &all_lwps.
6773 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6774 (unsuspend_one_lwp): Update, "entry" parameter is a
6775 struct thread_info * now.
6776 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6777 not &all_lwps.
6778 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6779 Fetch lwpid from thread, not lwp.
6780 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6781 Pass &all_threads to find_inferior, not &all_lwps.
6782 (send_sigstop): Fetch lwpid from thread, not lwp.
6783 (send_sigstop_callback): Update, "entry" parameter is a
6784 struct thread_info * now.
6785 (suspend_and_send_sigstop_callback): Ditto.
6786 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6787 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6788 struct thread_info * now.
6789 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6790 from thread, lwp.
6791 (lwp_running): Update, "entry" parameter is a
6792 struct thread_info * now.
6793 (stop_all_lwps): Fetch ptid from thread.
6794 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6795 (linux_resume_one_lwp): Fetch lwpid from thread.
6796 (linux_set_resume_request): Update, "entry" parameter is a
6797 struct thread_info * now. Fetch pid, lwpid from thread.
6798 (resume_status_pending_p): Update, "entry" parameter is a
6799 struct thread_info * now.
6800 (need_step_over_p): Ditto. Fetch lwpid from thread.
6801 (start_step_over): Fetch lwpid from thread.
6802 (linux_resume_one_thread): Update, "entry" parameter is a
6803 struct thread_info * now. Fetch lwpid from thread.
6804 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6805 (proceed_one_lwp): Update, "entry" parameter is a
6806 struct thread_info * now. Fetch lwpid from thread.
6807 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6808 struct thread_info * now.
6809 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6810 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6811 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6812 directly.
6813 (regsets_store_inferior_registers): Ditto.
6814 (fetch_register, store_register): Ditto.
6815 (linux_read_memory, linux_write_memory): Ditto.
6816 (linux_request_interrupt): Ditto.
6817 (linux_read_auxv): Ditto.
6818 (linux_xfer_siginfo): Ditto.
6819 (linux_qxfer_spu): Ditto.
6820 (linux_qxfer_libraries_svr4): Ditto.
6821 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6822 moved to inferiors.h.
6823 (get_lwp): Delete.
6824 (get_thread_lwp): Update.
6825 (struct lwp_info): Delete member "entry". Simplify comment for
6826 member "thread".
6827 (all_lwps): Delete.
6828 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6829 current_inferior directly.
6830 (update_watch_registers_callback): Update, "entry" parameter is a
6831 struct thread_info * now. Fetch pid from thread.
6832 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6833 (mips_insert_point): Fetch lwpid from current_inferior.
6834 Pass &all_threads to find_inferior, not &all_lwps.
6835 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6836 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6837 directly.
6838 (mips_stopped_data_address): Ditto.
6839 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6840 directly.
6841 * linux-tile-low.c (tile_arch_setup): Ditto.
6842 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6843 (update_debug_registers_callback): Update, "entry" parameter is a
6844 struct thread_info * now. Fetch pid from thread.
6845 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6846 Pass &all_threads to find_inferior, not &all_lwps.
6847 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6848 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6849 Pass &all_threads to find_inferior, not &all_lwps.
6850 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6851 (i386_dr_low_get_status): Ditto.
6852 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6853 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6854 (x86_linux_read_description): Ditto.
6855 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6856
6857 2014-02-20 Doug Evans <dje@google.com>
6858
6859 * inferiors.c (get_first_inferior): Fix buglet.
6860
6861 2014-02-19 Doug Evans <dje@google.com>
6862
6863 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6864 * inferiors.c (add_thread): Change result type to struct thread_info *.
6865 All callers updated.
6866 (add_lwp): Call add_thread here instead of in callers.
6867 All callers updated.
6868 * linux-low.h (get_lwp_thread): Rewrite.
6869 (struct lwp_info): New member "thread".
6870
6871 2014-02-19 Doug Evans <dje@google.com>
6872
6873 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6874 All callers updated.
6875
6876 2014-02-19 Doug Evans <dje@google.com>
6877
6878 * inferiors.c (add_thread): Fix whitespace.
6879
6880 2014-02-19 Doug Evans <dje@google.com>
6881
6882 * dll.c (clear_dlls): Replace accessing list implemention details
6883 with API function.
6884 * gdbthread.h (get_first_thread): Declare.
6885 * inferiors.c (for_each_inferior_with_data): New function.
6886 (get_first_thread): New function.
6887 (find_thread_ptid): Simplify.
6888 (get_first_inferior): New function.
6889 (clear_list): Delete.
6890 (one_inferior_p): New function.
6891 (clear_inferior_list): New function.
6892 (clear_inferiors): Update.
6893 * inferiors.h (for_each_inferior_with_data): Declare.
6894 (clear_inferior_list): Declare.
6895 (one_inferior_p): Declare.
6896 (get_first_inferior): Declare.
6897 * linux-low.c (linux_wait_for_event): Replace accessing list
6898 implemention details with API function.
6899 * server.c (target_running): Ditto.
6900 (accumulate_file_name_length): New function.
6901 (emit_dll_description): New function.
6902 (handle_qxfer_libraries): Replace accessing list implemention
6903 details with API function.
6904 (handle_qxfer_threads_worker): New function.
6905 (handle_qxfer_threads_proper): Replace accessing list implemention
6906 details with API function.
6907 (handle_query): Ditto.
6908 (visit_actioned_threads_callback_ftype): New typedef.
6909 (visit_actioned_threads_data): New struct.
6910 (visit_actioned_threads): Rewrite to be find_inferior callback.
6911 (resume): Call find_inferior.
6912 (handle_status): Replace accessing list implemention
6913 details with API function.
6914 (process_serial_event): Replace accessing list implemention details
6915 with API function.
6916 * target.c (set_desired_inferior): Replace accessing list implemention
6917 details with API function.
6918 * tracepoint.c (same_process_p): New function.
6919 (gdb_agent_about_to_close): Replace accessing list implemention
6920 details with API function.
6921 * win32-low.c (child_delete_thread): Replace accessing list
6922 implemention details with API function.
6923 (match_dll_by_basename): New function.
6924 (dll_is_loaded_by_basename): New function.
6925 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6926 details call to dll_is_loaded_by_basename.
6927
6928 2014-02-19 Doug Evans <dje@google.com>
6929
6930 * dll.h (struct dll_info): Add comment.
6931 * gdbthread.h (struct thread_info): Add comment.
6932 (current_ptid): Simplify.
6933 * inferiors.c (add_process): Update.
6934 (remove_process): Update.
6935 * inferiors.h (struct process_info): Rename member "head" to "entry".
6936 * linux-low.c (delete_lwp): Update.
6937 (add_lwp): Update.
6938 (last_thread_of_process_p): Update.
6939 (kill_one_lwp_callback, linux_kill): Update.
6940 (status_pending_p_callback): Update.
6941 (wait_for_sigstop): Update. Simplify read of ptid.
6942 (start_step_over): Update.
6943 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6944 (get_lwp_thread): Update.
6945 (struct lwp_info): Rename member "head" to "entry".
6946 * regcache.h (inferior_list_entry): Delete.
6947 * server.c (kill_inferior_callback): Update.
6948 (detach_or_kill_inferior_callback): Update.
6949 (print_started_pid): Update.
6950 (print_attached_pid): Update.
6951 (process_serial_event): Simplify read of ptid.
6952 * thread-db.c (thread_db_create_event): Update.
6953 (thread_db_get_tls_address): Update.
6954 * win32-low.c (current_inferior_ptid): Simplify.
6955
6956 2014-02-19 Tom Tromey <tromey@redhat.com>
6957
6958 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6959 argument.
6960 (target_supports_btrace): Update.
6961
6962 2014-02-14 Yao Qi <yao@codesourcery.com>
6963
6964 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6965 (rsp-low-ipa.o): New target.
6966
6967 2014-02-12 Tom Tromey <tromey@redhat.com>
6968
6969 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6970 convert_ascii_to_int.
6971 * regcache.c (registers_to_string): Likewise.
6972 * remote-utils.c (decode_M_packet): Likewise.
6973 * server.c (process_serial_event): Likewise.
6974
6975 2014-02-12 Tom Tromey <tromey@redhat.com>
6976
6977 * server.c (handle_query, handle_v_run): Use hex2bin, not
6978 unhexify.
6979 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6980
6981 2014-02-12 Tom Tromey <tromey@redhat.com>
6982
6983 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6984 convert_int_to_ascii.
6985 * regcache.c (registers_to_string, collect_register_as_string):
6986 Likewise.
6987 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6988 Likewise.
6989 * server.c (process_serial_event): Likewise.
6990 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6991 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6992
6993 2014-02-12 Tom Tromey <tromey@redhat.com>
6994
6995 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6996 bin2hex, not hexify.
6997 * tracepoint.c (cmd_qtstatus): Likewise.
6998
6999 2014-02-12 Tom Tromey <tromey@redhat.com>
7000
7001 * remote-utils.c (monitor_output): Pass explicit length to
7002 hexify.
7003
7004 2014-02-12 Tom Tromey <tromey@redhat.com>
7005
7006 * tracepoint.c: Include rsp-low.h.
7007 * server.c: Include rsp-low.h.
7008 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7009 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7010 declare.
7011 * remote-utils.c: Include rsp-low.h.
7012 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7013 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7014 (convert_int_to_ascii, convert_ascii_to_int): Move to
7015 common/rsp-low.c.
7016 * regcache.c: Include rsp-low.h.
7017 * ax.c: Include rsp-low.h.
7018 * Makefile.in (SFILES): Add common/rsp-low.c.
7019 (OBS): Add rsp-low.o.
7020 (rsp-low.o): New target.
7021
7022 2014-02-12 Tom Tromey <tromey@redhat.com>
7023
7024 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7025 Include print-utils.h.
7026 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7027 (plongest, thirty_two, phex_nz): Remove.
7028 * Makefile.in (SFILES): Add common/print-utils.c.
7029 (OBS): Add print-utils.o.
7030 (print-utils-ipa.o): New target.
7031 (print-utils.o): New target.
7032 (IPA_OBJS): Add print-utils-ipa.o.
7033
7034 2014-02-06 Tom Tromey <tromey@redhat.com>
7035
7036 * Makefile.in (SFILES): Fix indentation.
7037
7038 2014-02-05 Doug Evans <dje@google.com>
7039
7040 * linux-low.c (linux_wait_for_event): Improve comment.
7041 (linux_wait_1): Keep current_inferior in sync with event_child.
7042
7043 2014-01-22 Doug Evans <dje@google.com>
7044
7045 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7046
7047 2014-01-22 Doug Evans <dje@google.com>
7048
7049 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7050 * configure: Regenerate.
7051 * config.in: Regenerate.
7052 * Makefile.in (SFILES): Add debug.c.
7053 (OBS): Add debug.o.
7054 * debug.c: New file.
7055 * debug.h: New file.
7056 * linux-aarch64-low.c (*): Update all debugging printfs to use
7057 debug_printf instead of fprintf.
7058 * linux-arm-low.c (*): Ditto.
7059 * linux-cris-low.c (*): Ditto.
7060 * linux-crisv32-low.c (*): Ditto.
7061 * linux-m32r-low.c (*): Ditto.
7062 * linux-sparc-low.c (*): Ditto.
7063 * linux-x86.c (*): Ditto.
7064 * linux-low.c (*): Ditto.
7065 (linux_wait_1): Add calls to debug_enter, debug_exit.
7066 (linux_wait): Remove redundant debugging printf.
7067 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7068 (linux_resume, unstop_all_lwps): Ditto.
7069 * mem-break.c (*): Update all debugging printfs to use
7070 debug_printf instead of fprintf.
7071 * remote-utils.c (*): Ditto.
7072 * thread-db.c (*): Ditto.
7073 * server.c #include <ctype.h>, "gdb_vecs.h".
7074 (debug_threads): Moved to debug.c.
7075 (*): Update all debugging printfs to use debug_printf instead of
7076 fprintf.
7077 (start_inferior): Replace call to fflush with call to debug_flush.
7078 (monitor_show_help): Mention set debug-format.
7079 (parse_debug_format_options): New function.
7080 (handle_monitor_command): Handle "monitor set debug-format".
7081 (gdbserver_usage): Mention --debug-format.
7082 (main): Parse --debug-format.
7083 * server.h (debug_threads): Declaration moved to debug.h.
7084 #include "debug.h".
7085 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7086 trace_debug_1 that uses debug_printf.
7087 (tracepoint_look_up_symbols): Update all debugging printfs to use
7088 debug_printf instead of fprintf.
7089
7090 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7091
7092 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7093 sys/ptrace.h.
7094
7095 2014-01-17 Pedro Alves <palves@redhat.com>
7096
7097 PR build/16445
7098 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7099 defined after including gdb_proc_service.h.
7100
7101 2014-01-16 Doug Evans <dje@google.com>
7102
7103 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7104 (match_dll): Use it.
7105
7106 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7107
7108 * target.h (target_ops) <read_btrace>: Change parameters and
7109 return type to allow error reporting.
7110 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7111 trace reading errors on.
7112 * linux-low.c (linux_low_read_btrace): Pass trace reading
7113 errors on.
7114 (linux_low_disable_btrace): New.
7115
7116 2014-01-15 Doug Evans <dje@google.com>
7117
7118 * inferiors.c (thread_id_to_gdb_id): Delete.
7119 * inferiors.h (thread_id_to_gdb_id): Delete.
7120
7121 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7122
7123 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7124 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7125 versions.
7126
7127 2014-01-08 Pedro Alves <palves@redhat.com>
7128
7129 * server.c (handle_status): Don't discard previous queued stop
7130 replies or thread's pending status here.
7131 (main) <disconnection>: Do it here instead.
7132
7133 2014-01-08 Pedro Alves <palves@redhat.com>
7134
7135 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7136 * server.c (visit_actioned_threads, handle_pending_status): New
7137 function.
7138 (handle_v_cont): Factor out parts to ...
7139 (resume): ... this new function. If in all-stop, and a thread
7140 being resumed has a pending status, report it without actually
7141 resuming.
7142 (myresume): Adjust to use the new 'resume' function.
7143 (clear_pending_status_callback, set_pending_status_callback)
7144 (find_status_pending_thread_callback): New functions.
7145 (handle_status): Handle the case of multiple threads having
7146 interesting statuses to report. Report threads' real last signal
7147 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7148 with an interesting thread to report the status for, instead of
7149 always reporting the status of the first thread.
7150
7151 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7152
7153 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7154 * gdbreplay.c (gdbreplay_version): Likewise.
7155
7156 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7157
7158 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7159 iov.iov_len with the real length in use.
7160
7161 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7162
7163 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7164 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7165 for all targets that use win32-low.c.
7166 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7167 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7168
7169 2013-12-13 Pedro Alves <palves@redhat.com>
7170
7171 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7172 if equal to TARGET_WAITKIND_LOADED.
7173 * win32-low.c (cached_status): New static global.
7174 (win32_wait): Add declaration.
7175 (do_initial_child_stuff): Flush all initial pending debug events
7176 up to the initial breakpoint.
7177 (win32_wait): If CACHED_STATUS was set, return that instead
7178 of doing a real wait. Remove the code resuming the execution
7179 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7180 during the initial phase. Also remove the code changing
7181 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7182 TARGET_WAITKIND_STOPPED.
7183
7184 2013-12-11 Yao Qi <yao@codesourcery.com>
7185
7186 * notif.c (handle_notif_ack): Return 0 if no notification
7187 matches.
7188
7189 2013-11-20 Doug Evans <dje@google.com>
7190
7191 * linux-low.c (linux_set_resume_request): Fix comment.
7192
7193 2013-11-20 Doug Evans <dje@google.com>
7194
7195 * linux-low.c (resume_status_pending_p): Tweak comment.
7196
7197 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7198
7199 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7200 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7201 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7202 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7203 (srv_amd64_regobj): Add amd64-mpx.o.
7204 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7205 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7206 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7207 * i387-fp.c (num_pl_bnd_register) Added constant.
7208 (num_pl_bnd_cfg_registers) Added constant.
7209 (struct i387_xsave) Added reserved area and MPX fields.
7210 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7211 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7212 function.
7213 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7214 (init_registers_amd64_mpx_linux): Declare new function.
7215 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7216 (x86_64_regmap): Add MPX registers.
7217 (x86_linux_read_description): Add MPX case.
7218 (initialize_low_arch): Initialize MPX targets.
7219
7220 2013-11-18 Tom Tromey <tromey@redhat.com>
7221
7222 * configure: Rebuild.
7223 * configure.ac: Don't check for stdlib.h.
7224 * gdbreplay.c: Unconditionally include stdlib.h.
7225
7226 2013-11-18 Tom Tromey <tromey@redhat.com>
7227
7228 * config.in: Rebuild.
7229 * configure: Rebuild.
7230 * configure.ac: Don't use AC_HEADER_DIRENT.
7231
7232 2013-11-18 Tom Tromey <tromey@redhat.com>
7233
7234 * server.h: Don't check HAVE_STRING_H.
7235 * gdbreplay.c: Don't check HAVE_STRING_H.
7236 * configure: Rebuild.
7237
7238 2013-11-18 Tom Tromey <tromey@redhat.com>
7239
7240 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7241 LIBGNU.
7242
7243 2013-11-08 Tom Tromey <tromey@redhat.com>
7244
7245 * configure, config.in: Rebuild.
7246 * configure.ac: Remove unused configury.
7247
7248 2013-11-08 Tom Tromey <tromey@redhat.com>
7249
7250 * acinclude.m4: Include common.m4, codeset.m4.
7251 * configure, config.in: Rebuild.
7252 * configure.ac: Use GDB_AC_COMMON.
7253
7254 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7255
7256 * linux-s390-low.c (HWCAP_S390_TE): New define.
7257 (s390_arch_setup): Consider the TE field in the HWCAP for
7258 determining 'have_regset_tdb'.
7259
7260 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7261
7262 PR gdb/16014
7263 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7264 call to sizeof.
7265
7266 2013-10-02 Pedro Alves <palves@redhat.com>
7267
7268 * server.c (process_serial_event): Don't output "GDBserver
7269 exiting" if GDB is connected through stdio.
7270 * target.c (mywait): Likewise, be silent if GDB is connected
7271 through stdio.
7272
7273 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7274
7275 * lynx-low.c (lynx_add_threads_after_attach): New function.
7276 (lynx_attach): Remove call to add_thread. Add call to
7277 lynx_add_threads_after_attach instead.
7278
7279 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7280
7281 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7282 * config.in, configure: Regenerated.
7283
7284 2013-09-18 Yao Qi <yao@codesourcery.com>
7285
7286 PR server/15959
7287 * server.c (start_inferior): Clear 'resume_info'.
7288
7289 2013-09-16 Jiong Wang <jiwang@tilera.com>
7290
7291 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7292 for each register.
7293
7294 2013-09-16 Jiong Wang <jiwang@tilera.com>
7295
7296 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7297 linux-tile-low.o to srv_tgtobj.
7298
7299 2013-09-16 Will Newton <will.newton@linaro.org>
7300
7301 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7302 out regs.
7303
7304 2013-09-06 Pedro Alves <palves@redhat.com>
7305
7306 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7307 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7308 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7309 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7310 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7311 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7312
7313 2013-09-06 Pedro Alves <palves@redhat.com>
7314
7315 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7316 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7317
7318 2013-09-06 Pedro Alves <palves@redhat.com>
7319
7320 * linux-amd64-ipa.c: Include tracepoint.h.
7321 * linux-i386-ipa.c: Include tracepoint.h.
7322
7323 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7324
7325 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7326 (ps_get_thread_area): New function.
7327
7328 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7329
7330 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7331 (initialize_low_arch): Call init_registers_crisv32 rather than
7332 init_register_crisv32.
7333
7334 2013-09-05 Pedro Alves <palves@redhat.com>
7335
7336 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7337 to ...
7338 * hostio.h: ... this new file.
7339 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7340 win32-low.c: Include hostio.h.
7341
7342 2013-09-05 Pedro Alves <palves@redhat.com>
7343
7344 * server.h (gdb_client_data, handler_func, callback_handler_func)
7345 (delete_file_handler, add_file_handler, append_callback_event)
7346 (delete_callback_event, start_event_loop, initialize_event_loop):
7347 Move to event-loop.h and include it.
7348 * event-loop.h: New file.
7349
7350 2013-09-05 Pedro Alves <palves@redhat.com>
7351
7352 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7353 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7354 (loaded_dll, unloaded_dll): Move to ...
7355 * dll.h: ... this new file.
7356 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7357
7358 2013-09-05 Pedro Alves <palves@redhat.com>
7359
7360 * server.h (current_process, get_thread_process, all_processes)
7361 (add_inferior_to_list, for_each_inferior, current_inferior)
7362 (remove_inferior, add_process, remove_process, find_process_pid)
7363 (have_started_inferiors_p, have_attached_inferiors_p)
7364 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7365 (clear_inferiors, find_inferior, find_inferior_id)
7366 (inferior_target_data, set_inferior_target_data)
7367 (inferior_regcache_data, set_inferior_regcache_data): Move to
7368 inferiors.h, and include it.
7369 * inferiors.h: New file.
7370
7371 2013-09-05 Pedro Alves <palves@redhat.com>
7372
7373 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7374 Move ...
7375 * ax.h: ... here.
7376
7377 2013-09-05 Pedro Alves <palves@redhat.com>
7378
7379 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7380 tracepoint.h.
7381 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7382 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7383 (handle_tracepoint_general_set, handle_tracepoint_query)
7384 (tracepoint_finished_step, tracepoint_was_hit)
7385 (release_while_stepping_state_list, current_traceframe)
7386 (in_readonly_region, traceframe_read_mem)
7387 (fetch_traceframe_registers, traceframe_read_sdata)
7388 (traceframe_read_info, struct fast_tpoint_collect_status)
7389 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7390 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7391 (supply_fast_tracepoint_registers)
7392 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7393 (ipa_tdesc, claim_trampoline_space)
7394 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7395 (agent_mem_read, agent_get_trace_state_variable_value)
7396 (agent_set_trace_state_variable_value, agent_tsv_read)
7397 (agent_mem_read_string, get_raw_reg_func_addr)
7398 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7399 * tracepoint.h: ... this new file.
7400
7401 2013-09-05 Pedro Alves <palves@redhat.com>
7402
7403 * server.h (perror_with_name, error, fatal, warning, paddress)
7404 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7405 include it.
7406 * utils.h: New file.
7407
7408 2013-09-05 Pedro Alves <palves@redhat.com>
7409
7410 * server.h (remote_debug, noack_mode, transport_is_reliable)
7411 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7412 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7413 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7414 (write_enn, initialize_async_io, enable_async_io)
7415 (disable_async_io, check_remote_input_interrupt_request)
7416 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7417 (dead_thread_notify, prepare_resume_reply)
7418 (decode_address_to_semicolon, decode_address, decode_m_packet)
7419 (decode_M_packet, decode_X_packet, decode_xfer_write)
7420 (decode_search_memory_packet, unhexify, hexify)
7421 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7422 (look_up_one_symbol, relocate_instruction)
7423 (monitor_output): Move to remote-utils.h, and include it.
7424 * remote-utils.h: New file.
7425
7426 2013-09-05 Pedro Alves <palves@redhat.com>
7427
7428 * server.h (_): Delete.
7429
7430 2013-09-02 Pedro Alves <palves@redhat.com>
7431
7432 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7433 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7434 allocated.
7435 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7436
7437 2013-09-02 Pierre Muller <muller@sourceware.org>
7438
7439 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7440 or WriteProcessMemory complete successfully and handle
7441 ERROR_PARTIAL_COPY error.
7442
7443 2013-09-02 Pedro Alves <palves@redhat.com>
7444
7445 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7446 error instead of EIO.
7447
7448 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7449
7450 PR server/15604
7451 * linux-low.c: Include filestuff.h.
7452 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7453 * lynx-low.c: Include filestuff.h.
7454 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7455 * server.c: Include filestuff.h.
7456 (main): Call notice_open_fds.
7457 * spu-low.c: Include filestuff.h.
7458 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7459
7460 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7461
7462 * Makefile.in: Explain why ../target and ../nat are not
7463 listed as include file search paths.
7464 (linux-waitpid.o): New object file rule.
7465 * configure.srv (srv_native_linux_obj): New variable.
7466 Replace all occurrences of linux native object files with
7467 $srv_native_linux_obj.
7468 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7469 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7470 (linux_enable_event_reporting): Remove declaration.
7471 (my_waitpid): Moved to common/linux-waitpid.c.
7472 (linux_wait_for_event): Pass ptid when calling
7473 linux_enable_event_reporting.
7474 (linux_supports_tracefork_flag): Remove.
7475 (linux_enable_event_reporting): Likewise.
7476 (linux_tracefork_grandchild): Remove.
7477 (STACK_SIZE): Moved to common/linux-ptrace.c.
7478 (linux_tracefork_child): Remove.
7479 (linux_test_for_tracefork): Remove.
7480 (linux_look_up_symbols): Call linux_supports_traceclone.
7481 (initialize_low): Remove call to linux_test_for_tracefork.
7482 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7483 common/linux-ptrace.h.
7484 (PTRACE_TYPE_ARG4): Likewise.
7485 Include linux-ptrace.h.
7486
7487 2013-08-21 Pedro Alves <palves@redhat.com>
7488
7489 * config.in: Renegerate.
7490
7491 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7492
7493 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7494 (SFILES): Remove $(srcdir)/common/target-common.c and
7495 add $(srcdir)/target/waitstatus.c.
7496 (OBS): Remove target-common.o and add waitstatus.o.
7497 (server_h): Remove $(srcdir)/../common/target-common.h and
7498 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7499 and $(srcdir)/../target/waitstatus.h.
7500 (target-common.o): Remove.
7501 (waitstatus.o): New target object file.
7502 * target.h: Do not include target-common.h and
7503 include target/resume.h, target/wait.h and
7504 target/waitstatus.h.
7505
7506 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7507
7508 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7509 to PTRACE_TYPE_ARG3.
7510 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7511 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7512 PTRACE_TYPE_ARG4.
7513 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7514 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7515
7516 2013-07-27 Jie Zhang <jie@codesourcery.com>
7517 Daniel Jacobowitz <dan@codesourcery.com>
7518 Yao Qi <yao@codesourcery.com>
7519
7520 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7521 (mips-linux-watch.o): New rule.
7522 (mips_linux_watch_h): New variable.
7523 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7524 srv_tgtobj.
7525 * linux-mips-low.c: Include mips-linux-watch.h.
7526 (struct arch_process_info, struct arch_lwp_info): New.
7527 (update_watch_registers_callback): New function.
7528 (mips_linux_new_process, mips_linux_new_thread) New functions.
7529 (mips_linux_prepare_to_resume, mips_insert_point): New
7530 functions.
7531 (mips_remove_point, mips_stopped_by_watchpoint): New
7532 functions.
7533 (rsp_bp_type_to_target_hw_bp_type): New function.
7534 (mips_stopped_data_address): New function.
7535 (the_low_target): Add watchpoint support functions.
7536
7537 2013-07-27 Yao Qi <yao@codesourcery.com>
7538
7539 * i386-low.c: Include break-common.h.
7540 (enum target_hw_bp_type): Remove.
7541
7542 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7543
7544 * Makefile.in (SFILES): /common/target-common.c.
7545 (OBS): Add target-common.o.
7546 (server_h): Add $(srcdir)/../common/target-common.h.
7547 (target-common.o): New target.
7548 * server.c (queue_stop_reply_callback): Free
7549 status string after use.
7550 * target.c (target_waitstatus_to_string): Remove.
7551 * target.h: Include target-common.h.
7552 (resume_kind): Likewise.
7553 (target_waitkind): Likewise.
7554 (target_waitstatus): Likewise.
7555 (TARGET_WNOHANG): Likewise.
7556
7557 2013-07-04 Yao Qi <yao@codesourcery.com>
7558
7559 * Makefile.in (host_alias): Use @host_noncanonical@.
7560 (target_alias): Use @target_noncanonical@.
7561 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7562 ACX_NONCANONICAL_HOST.
7563 * configure: Regenerated.
7564
7565 Revert:
7566 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7567
7568 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7569 * configure: Rebuild.
7570 * Makefile.in (version_host, version_target): Get from configure.
7571 (version.c): Use $(version_host) and $(version_target).
7572
7573 2013-07-03 Pedro Alves <palves@redhat.com>
7574
7575 * Makefile.in (config.status): Depend on development.sh.
7576 * acinclude.m4: Include libmcheck.m4.
7577 * configure: Regenerate.
7578
7579 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7580
7581 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7582 attribute inside the parentheses.
7583 (winapi_DebugSetProcessKillOnExit): Ditto.
7584 (winapi_DebugBreakProcess): Ditto.
7585 (winapi_GenerateConsoleCtrlEvent): Ditto.
7586
7587 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7588
7589 * notif.h (notif_event): Add a dummy member to avoid compiler
7590 errors.
7591
7592 2013-07-01 Pedro Alves <palves@redhat.com>
7593
7594 * hostio.c (HOSTIO_PATH_MAX): Define.
7595 (require_filename, handle_open, handle_unlink, handle_readlink):
7596 Use it.
7597
7598 2013-07-01 Pedro Alves <palves@redhat.com>
7599
7600 * server.h: Include "pathmax.h".
7601 * linux-low.c: Don't include sys/param.h.
7602 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7603 MAXPATHLEN.
7604 * win32-low.c: Don't include sys/param.h.
7605 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7606
7607 2013-07-01 Pedro Alves <palves@redhat.com>
7608
7609 * event-loop.c: Don't check HAVE_UNISTD_H before including
7610 <unistd.h>.
7611 * gdbreplay.c: Likewise.
7612 * remote-utils.c: Likewise.
7613 * server.c: Likewise.
7614 * configure.ac: Don't check for unistd.h.
7615 * configure: Regenerate.
7616
7617 2013-06-28 Tom Tromey <tromey@redhat.com>
7618
7619 * Makefile.in (version.c): Use version.in, not
7620 common/version.in.
7621
7622 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7623
7624 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7625 * configure: Rebuild.
7626 * Makefile.in (version_host, version_target): Get from configure.
7627 (version.c): Use $(version_host) and $(version_target).
7628
7629 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7630
7631 Fix trace-status to output user name without trailing colon.
7632 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7633
7634 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7635
7636 Fix trace-status to output proper start-time and stop-time.
7637 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7638 output start time and stop time in hex as gdb expects.
7639
7640 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7641
7642 * tracepoint.c (build_traceframe_info_xml): Output trace state
7643 variables present in the trace buffer.
7644
7645 2013-06-24 Tom Tromey <tromey@redhat.com>
7646
7647 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7648 create-version.sh.
7649 (version.o): Remove.
7650 * gdbreplay.c: Include version.h.
7651 (version, host_name): Don't declare.
7652 * server.h: Include version.h.
7653 (version, host_name): Don't declare.
7654
7655 2013-06-12 Pedro Alves <palves@redhat.com>
7656
7657 * linux-x86-low.c (linux_is_elf64): Delete global.
7658 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7659 with local linux_pid_exe_is_elf_64_file use.
7660
7661 2013-06-11 Pedro Alves <palves@redhat.com>
7662
7663 * linux-low.c (regset_disabled, disable_regset): New functions.
7664 (regsets_fetch_inferior_registers)
7665 (regsets_store_inferior_registers): Use them.
7666 (initialize_regsets_info); Don't allocate the disabled_regsets
7667 array here.
7668 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7669 comment.
7670
7671 2013-06-11 Pedro Alves <palves@redhat.com>
7672
7673 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7674 xmalloc.
7675
7676 2013-06-11 Pedro Alves <palves@redhat.com>
7677
7678 * linux-x86-low.c (initialize_low_arch): Call
7679 init_registers_x32_avx_linux.
7680
7681 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7682
7683 Fix compatibility with Android Bionic.
7684 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7685 it is not empty.
7686
7687 2013-06-07 Pedro Alves <palves@redhat.com>
7688
7689 PR server/14823
7690 * Makefile.in (OBS): Add tdesc.o.
7691 (IPA_OBJS): Add tdesc-ipa.o.
7692 (tdesc-ipa.o): New rule.
7693 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7694 interface.
7695 * linux-low.c (new_inferior): Delete.
7696 (disabled_regsets, num_regsets): Delete.
7697 (linux_add_process): Adjust to set the new per-process
7698 new_inferior flag.
7699 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7700 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7701 was a stop. When calling arch_setup, switch the current inferior
7702 to the thread that got an event.
7703 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7704 (regsets_fetch_inferior_registers)
7705 (regsets_store_inferior_registers): New regsets_info parameter.
7706 Adjust to use it.
7707 (linux_register_in_regsets): New regs_info parameter. Adjust to
7708 use it.
7709 (register_addr, fetch_register, store_register): New usrregs_info
7710 parameter. Adjust to use it.
7711 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7712 parameter regs_info. Adjust to use it.
7713 (linux_fetch_registers): Get the current inferior's regs_info, and
7714 adjust to use it.
7715 (linux_store_registers): Ditto.
7716 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7717 (initialize_low): Don't initialize the target_regsets here. Call
7718 initialize_low_arch.
7719 * linux-low.h (target_regsets): Delete declaration.
7720 (struct regsets_info): New.
7721 (struct usrregs_info): New.
7722 (struct regs_info): New.
7723 (struct process_info_private) <new_inferior>: New field.
7724 (struct linux_target_ops): Delete the num_regs, regmap, and
7725 regset_bitmap fields. New field regs_info.
7726 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7727 * i387-fp.c (num_xmm_registers): Delete.
7728 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7729 calls to new interface.
7730 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7731 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7732 Infer the number of xmm registers from the regcache's target
7733 description.
7734 * i387-fp.h (num_xmm_registers): Delete.
7735 * inferiors.c (add_thread): Don't install the thread's regcache
7736 here.
7737 * proc-service.c (gregset_info): Fetch the current inferior's
7738 regs_info. Adjust to use it.
7739 * regcache.c: Include tdesc.h.
7740 (register_bytes, reg_defs, num_registers)
7741 (gdbserver_expedite_regs): Delete.
7742 (get_thread_regcache): If the thread doesn't have a regcache yet,
7743 create one, instead of aborting gdbserver.
7744 (regcache_invalidate_one): Rename to ...
7745 (regcache_invalidate_thread): ... this.
7746 (regcache_invalidate_one): New.
7747 (regcache_invalidate): Only invalidate registers of the current
7748 process.
7749 (init_register_cache): Add target_desc parameter, and use it.
7750 (new_register_cache): Ditto. Assert the target description has a
7751 non zero registers_size.
7752 (regcache_cpy): Add assertions. Adjust.
7753 (realloc_register_cache, set_register_cache): Delete.
7754 (registers_to_string, registers_from_string): Adjust.
7755 (find_register_by_name, find_regno, find_register_by_number)
7756 (register_cache_size): Add target_desc parameter, and use it.
7757 (free_register_cache_thread, free_register_cache_thread_one)
7758 (regcache_release, register_cache_size): New.
7759 (register_size): Add target_desc parameter, and use it.
7760 (register_data, supply_register, supply_register_zeroed)
7761 (supply_regblock, supply_register_by_name, collect_register)
7762 (collect_register_as_string, collect_register_by_name): Adjust.
7763 * regcache.h (struct target_desc): Forward declare.
7764 (struct regcache) <tdesc>: New field.
7765 (init_register_cache, new_register_cache): Add target_desc
7766 parameter.
7767 (regcache_invalidate_thread): Declare.
7768 (regcache_invalidate_one): Delete declaration.
7769 (regcache_release): Declare.
7770 (find_register_by_number, register_cache_size, register_size)
7771 (find_regno): Add target_desc parameter.
7772 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7773 declarations.
7774 * remote-utils.c: Include tdesc.h.
7775 (outreg, prepare_resume_reply): Adjust.
7776 * server.c: Include tdesc.h.
7777 (gdbserver_xmltarget): Delete declaration.
7778 (get_features_xml, process_serial_event): Adjust.
7779 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7780 declare.
7781 (struct process_info) <tdesc>: New field.
7782 (ipa_tdesc): Declare.
7783 * tdesc.c: New file.
7784 * tdesc.h: New file.
7785 * tracepoint.c: Include tdesc.h.
7786 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7787 (get_context_regcache): Adjust to pass ipa_tdesc down.
7788 (do_action_at_tracepoint): Adjust to get the register cache size
7789 from the context regcache's description.
7790 (traceframe_walk_blocks): Adjust to get the register cache size
7791 from the current trace frame's description.
7792 (traceframe_get_pc): Adjust to get current trace frame's
7793 description and pass it down.
7794 (gdb_collect): Adjust to get the register cache size from the
7795 IPA's description.
7796 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7797 (gdbserver_xmltarget): Delete.
7798 (initialize_low_tracepoint): Set the ipa's target description.
7799 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7800 (initialize_low_tracepoint): Set the ipa's target description.
7801 * linux-x86-low.c: Include tdesc.h.
7802 [__x86_64__] (is_64bit_tdesc): New.
7803 (ps_get_thread_area, x86_get_thread_area): Use it.
7804 (i386_cannot_store_register): Rename to ...
7805 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7806 (i386_cannot_fetch_register): Rename to ...
7807 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7808 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7809 to new interface.
7810 (target_regsets): Rename to ...
7811 (x86_regsets): ... this.
7812 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7813 interface.
7814 (x86_siginfo_fixup): Use is_64bit_tdesc.
7815 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7816 (tdesc_x32_avx_linux, tdesc_x32_linux)
7817 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7818 Declare.
7819 (x86_linux_update_xmltarget): Delete.
7820 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7821 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7822 (AMD64_LINUX_USER64_CS): New.
7823 (x86_linux_read_description): New, based on
7824 x86_linux_update_xmltarget.
7825 (same_process_callback): New.
7826 (x86_arch_setup_process_callback): New.
7827 (x86_linux_update_xmltarget): New.
7828 (x86_regsets_info): New.
7829 (amd64_linux_regs_info): New.
7830 (i386_linux_usrregs_info): New.
7831 (i386_linux_regs_info): New.
7832 (x86_linux_regs_info): New.
7833 (x86_arch_setup): Reimplement.
7834 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7835 (x86_emit_ops): Ditto.
7836 (the_low_target): Adjust. Install x86_linux_regs_info,
7837 x86_cannot_fetch_register, and x86_cannot_store_register.
7838 (initialize_low_arch): New.
7839 * linux-ia64-low.c (tdesc_ia64): Declare.
7840 (ia64_fetch_register): Adjust.
7841 (ia64_usrregs_info, regs_info): New globals.
7842 (ia64_regs_info): New function.
7843 (the_low_target): Adjust.
7844 (initialize_low_arch): New function.
7845 * linux-sparc-low.c (tdesc_sparc64): Declare.
7846 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7847 Adjust.
7848 (sparc_arch_setup): New function.
7849 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7850 (the_low_target): Adjust.
7851 (initialize_low_arch): New function.
7852 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7853 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7854 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7855 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7856 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7857 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7858 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7859 (tdesc_powerpc_isa205_vsx64l): Declare.
7860 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7861 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7862 (ppc_set_pc, ppc_get_hwcap): Adjust.
7863 (ppc_usrregs_info): Forward declare.
7864 (!__powerpc64__) ppc_regmap_adjusted: New global.
7865 (ppc_arch_setup): Adjust to the current process'es target
7866 description.
7867 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7868 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7869 (ppc_store_evrregset): Adjust.
7870 (target_regsets): Rename to ...
7871 (ppc_regsets): ... this, and make static.
7872 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7873 (ppc_regs_info): New function.
7874 (the_low_target): Adjust.
7875 (initialize_low_arch): New function.
7876 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7877 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7878 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7879 (tdesc_s390x_linux64v2): Declare.
7880 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7881 (s390_fill_gregset, s390_store_last_break): Adjust.
7882 (target_regsets): Rename to ...
7883 (s390_regsets): ... this, and make static.
7884 (s390_get_pc, s390_set_pc): Adjust.
7885 (s390_get_hwcap): New target_desc parameter, and use it.
7886 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7887 (s390_arch_setup): Adjust to set the current process'es target
7888 description. Don't adjust the regmap.
7889 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7890 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7891 (regs_info_3264): New globals.
7892 (s390_regs_info): New function.
7893 (the_low_target): Adjust.
7894 (initialize_low_arch): New function.
7895 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7896 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7897 [__mips64] (init_registers_mips_linux)
7898 (init_registers_mips_dsp_linux): Delete defines.
7899 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7900 (have_dsp): New global.
7901 (mips_read_description): New, based on mips_arch_setup.
7902 (mips_arch_setup): Reimplement.
7903 (get_usrregs_info): New function.
7904 (mips_cannot_fetch_register, mips_cannot_store_register)
7905 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7906 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7907 (target_regsets): Rename to ...
7908 (mips_regsets): ... this, and make static.
7909 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7910 (dsp_regs_info, regs_info): New globals.
7911 (mips_regs_info): New function.
7912 (the_low_target): Adjust.
7913 (initialize_low_arch): New function.
7914 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7915 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7916 Declare.
7917 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7918 (arm_read_description): New, with bits factored from
7919 arm_arch_setup.
7920 (arm_arch_setup): Reimplement.
7921 (target_regsets): Rename to ...
7922 (arm_regsets): ... this, and make static.
7923 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7924 (arm_regs_info): New function.
7925 (the_low_target): Adjust.
7926 (initialize_low_arch): New function.
7927 * linux-m68k-low.c (tdesc_m68k): Declare.
7928 (target_regsets): Rename to ...
7929 (m68k_regsets): ... this, and make static.
7930 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7931 (m68k_regs_info): New function.
7932 (m68k_arch_setup): New function.
7933 (the_low_target): Adjust.
7934 (initialize_low_arch): New function.
7935 * linux-sh-low.c (tdesc_sharch): Declare.
7936 (target_regsets): Rename to ...
7937 (sh_regsets): ... this, and make static.
7938 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7939 (sh_regs_info, sh_arch_setup): New functions.
7940 (the_low_target): Adjust.
7941 (initialize_low_arch): New function.
7942 * linux-bfin-low.c (tdesc_bfin): Declare.
7943 (bfin_arch_setup): New function.
7944 (bfin_usrregs_info, regs_info): New globals.
7945 (bfin_regs_info): New function.
7946 (the_low_target): Adjust.
7947 (initialize_low_arch): New function.
7948 * linux-cris-low.c (tdesc_cris): Declare.
7949 (cris_arch_setup): New function.
7950 (cris_usrregs_info, regs_info): New globals.
7951 (cris_regs_info): New function.
7952 (the_low_target): Adjust.
7953 (initialize_low_arch): New function.
7954 * linux-cris-low.c (tdesc_crisv32): Declare.
7955 (cris_arch_setup): New function.
7956 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7957 (cris_regs_info): New function.
7958 (the_low_target): Adjust.
7959 (initialize_low_arch): New function.
7960 * linux-m32r-low.c (tdesc_m32r): Declare.
7961 (m32r_arch_setup): New function.
7962 (m32r_usrregs_info, regs_info): New globals.
7963 (m32r_regs_info): Adjust.
7964 (initialize_low_arch): New function.
7965 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7966 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7967 (tic6x_usrregs_info): Forward declare.
7968 (tic6x_read_description): New function, based on ...
7969 (tic6x_arch_setup): ... this. Reimplement.
7970 (target_regsets): Rename to ...
7971 (tic6x_regsets): ... this, and make static.
7972 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7973 (tic6x_regs_info): New function.
7974 (the_low_target): Adjust.
7975 (initialize_low_arch): New function.
7976 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7977 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7978 (target_regsets): Rename to ...
7979 (xtensa_regsets): ... this, and make static.
7980 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7981 globals.
7982 (xtensa_arch_setup, xtensa_regs_info): New functions.
7983 (the_low_target): Adjust.
7984 (initialize_low_arch): New function.
7985 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7986 (nios2_arch_setup): Set the current process'es tdesc.
7987 (target_regsets): Rename to ...
7988 (nios2_regsets): ... this.
7989 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7990 (nios2_regs_info): New function.
7991 (the_low_target): Adjust.
7992 (initialize_low_arch): New function.
7993 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7994 (aarch64_arch_setup): Set the current process'es tdesc.
7995 (target_regsets): Rename to ...
7996 (aarch64_regsets): ... this.
7997 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7998 (aarch64_regs_info): New function.
7999 (the_low_target): Adjust.
8000 (initialize_low_arch): New function.
8001 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8002 globals.
8003 (target_regsets): Rename to ...
8004 (tile_regsets): ... this.
8005 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8006 (tile_regs_info): New function.
8007 (tile_arch_setup): Set the current process'es tdesc.
8008 (the_low_target): Adjust.
8009 (initialize_low_arch): New function.
8010 * spu-low.c (tdesc_spu): Declare.
8011 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8012 * win32-arm-low.c (tdesc_arm): Declare.
8013 (arm_arch_setup): New function.
8014 (the_low_target): Install arm_arch_setup instead of
8015 init_registers_arm.
8016 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8017 (init_windows_x86): Rename to ...
8018 (i386_arch_setup): ... this. Set `win32_tdesc'.
8019 (the_low_target): Adjust.
8020 * win32-low.c (win32_tdesc): New global.
8021 (child_add_thread): Don't create the thread cache here.
8022 (do_initial_child_stuff): Set the new process'es tdesc.
8023 * win32-low.h (struct target_desc): Forward declare.
8024 (win32_tdesc): Declare.
8025 * lynx-i386-low.c (tdesc_i386): Declare global.
8026 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8027 * lynx-low.c (lynx_tdesc): New global.
8028 (lynx_add_process): Set the new process'es tdesc.
8029 * lynx-low.h (struct target_desc): Forward declare.
8030 (lynx_tdesc): Declare global.
8031 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8032 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8033 * nto-low.c (nto_tdesc): New global.
8034 (do_attach): Set the new process'es tdesc.
8035 * nto-low.h (struct target_desc): Forward declare.
8036 (nto_tdesc): Declare.
8037 * nto-x86-low.c (tdesc_i386): Declare.
8038 (nto_x86_arch_setup): Set `nto_tdesc'.
8039
8040 2013-06-04 Gary Benson <gbenson@redhat.com>
8041
8042 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8043 to qSupported response when appropriate.
8044 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8045 with nonzero-length annex.
8046 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8047 arguments supplied in annex.
8048
8049 2013-05-31 Doug Evans <dje@google.com>
8050
8051 PR server/15594
8052 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8053 64 bits in 64-cross-32 environment.
8054
8055 2013-05-28 Pedro Alves <palves@redhat.com>
8056
8057 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8058 (aarch64-without-fpu.c): Delete rule.
8059 * configure.srv (aarch64*-*-linux*): Remove references to
8060 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8061 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8062 declaration.
8063
8064 2013-05-24 Pedro Alves <palves@redhat.com>
8065
8066 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8067 instead of strchr/decode_address. Error if the range isn't split
8068 with a ','. Don't assume there's be a ':' in the action.
8069
8070 2013-05-23 Yao Qi <yao@codesourcery.com>
8071 Pedro Alves <palves@redhat.com>
8072
8073 * linux-low.c (lwp_in_step_range): New function.
8074 (linux_wait_1): If the thread was range stepping and stopped
8075 outside the stepping range, report the stop to GDB. Otherwise,
8076 continue stepping. Add range stepping debug output.
8077 (linux_set_resume_request): Copy the step range from the resume
8078 request to the lwp.
8079 (linux_supports_range_stepping): New.
8080 (linux_target_ops) <supports_range_stepping>: Set to
8081 linux_supports_range_stepping.
8082 * linux-low.h (struct linux_target_ops)
8083 <supports_range_stepping>: New field.
8084 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8085 * linux-x86-low.c (x86_supports_range_stepping): New.
8086 (the_low_target) <supports_range_stepping>: Set to
8087 x86_supports_range_stepping.
8088 * server.c (handle_v_cont): Handle 'r' action.
8089 (handle_v_requests): Append ";r" if the target supports range
8090 stepping.
8091 * target.h (struct thread_resume) <step_range_start,
8092 step_range_end>: New fields.
8093 (struct target_ops) <supports_range_stepping>:
8094 New field.
8095 (target_supports_range_stepping): New macro.
8096
8097 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8098
8099 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8100 confusion in comment.
8101
8102 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8103
8104 * lynx-low.c (struct process_info_private): New type.
8105 (lynx_add_process): New function.
8106 (lynx_create_inferior, lynx_attach): Replace calls to
8107 add_process by calls to lynx_add_process.
8108 (lynx_resume): If PTID is null, then try using
8109 current_process()->private->last_wait_event_ptid.
8110 Add comments.
8111 (lynx_clear_inferiors): Delete. The contents of that function
8112 has been inlined in lynx_mourn;
8113 (lynx_wait_1): Save the ptid in the process's private data.
8114 (lynx_mourn): Free the process' private data. Replace call
8115 to lynx_clear_inferiors by call to clear_inferiors.
8116
8117 2013-05-17 Yao Qi <yao@codesourcery.com>
8118
8119 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8120 the right place.
8121
8122 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8123
8124 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8125 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8126 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8127 PT_TEXT_END_ADDR guards. Update comments.
8128 (linux_target_op) <read_offsets>: Conditionally define to
8129 linux_read_offsets if the target is UCLIBC and if it defines
8130 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8131
8132 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8133 Andrew Jenner <andrew@codesourcery.com>
8134
8135 * Makefile.in (SFILES): Add linux-nios2-low.c.
8136 (clean): Add action to delete nios2-linux.c.
8137 (nios2-linux.c): New rule.
8138 * configure.srv: Add nios2*-*-linux*.
8139 * linux-nios2-low.c: New.
8140
8141 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8142
8143 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8144
8145 2013-04-25 Hui Zhu <hui@codesourcery.com>
8146
8147 PR gdb/15186
8148 * ax.c (ax_printf): Add fflush.
8149
8150 2013-04-22 Tom Tromey <tromey@redhat.com>
8151
8152 * Makefile.in (SFILES): Add filestuff.c.
8153 (OBS): Add filestuff.o.
8154 (filestuff.o): New target.
8155 * config.in, configure: Rebuild.
8156 * configure.ac: Check for fdwalk, pipe2.
8157
8158 2013-04-17 Pedro Alves <palves@redhat.com>
8159
8160 * configure.ac (USE_THREAD_DB): Delete variable.
8161 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8162 Don't AC_SUBST USE_THREAD_DB.
8163 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8164 * config.in, configure: Regenerate.
8165
8166 2013-04-16 Pedro Alves <palves@redhat.com>
8167
8168 * linux-low.h (struct lwp_info) <thread_known>: Move under
8169 the USE_THREAD_DB #ifdef.
8170
8171 2013-04-16 Pedro Alves <palves@redhat.com>
8172
8173 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8174 (linux-low.o): Delete rule.
8175 * linux-low.h: Always include "gdb_thread_db.h" instead of
8176 conditionally including thread_db.h.
8177 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8178 HAVE_THREAD_DB_H.
8179
8180 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8181
8182 * Makefile.in (install-only): Fix make install regression.
8183
8184 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8185
8186 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8187 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8188 installation.
8189 * gdbserver.1: Remove.
8190
8191 2013-03-22 Pedro Alves <palves@redhat.com>
8192
8193 * linux-low.c (handle_extended_wait): Don't call
8194 linux_enable_event_reporting.
8195
8196 2013-03-15 Tony Theodore <tonyt@logyst.com>
8197
8198 PR build/9098:
8199 * Makefile.in (SHELL): Use @SHELL@.
8200
8201 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8202
8203 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8204 compiler warning.
8205
8206 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8207
8208 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8209 Remove extraneous NULL element.
8210
8211 2013-03-13 Yao Qi <yao@codesourcery.com>
8212
8213 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8214 'V' block in trace frame.
8215
8216 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8217
8218 * target.h (struct target_ops): Add btrace ops.
8219 (target_supports_btrace): New macro.
8220 (target_enable_btrace): New macro.
8221 (target_disable_btrace): New macro.
8222 (target_read_btrace): New macro.
8223 * gdbthread.h (struct thread_info): Add btrace field.
8224 * server.c: Include btrace-common.h.
8225 (handle_btrace_general_set): New function.
8226 (handle_btrace_enable): New function.
8227 (handle_btrace_disable): New function.
8228 (handle_general_set): Call handle_btrace_general_set.
8229 (handle_qxfer_btrace): New function.
8230 (struct qxfer qxfer_packets[]): Add btrace entry.
8231 * inferiors.c (remove_thread): Disable btrace.
8232 * linux-low: Include linux-btrace.h.
8233 (linux_low_enable_btrace): New function.
8234 (linux_low_read_btrace): New function.
8235 (linux_target_ops): Add btrace ops.
8236 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8237 Add srv_linux_btrace=yes.
8238 (x86_64-*-linux*): Add linux-btrace.o.
8239 Add srv_linux_btrace=yes.
8240 * configure.ac: Define HAVE_LINUX_BTRACE.
8241 * config.in: Regenerated.
8242 * configure: Regenerated.
8243
8244 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8245
8246 * server.c (handle_qxfer): Preserve error message if -3 is
8247 returned.
8248 (qxfer): Document the -3 return value.
8249
8250 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8251
8252 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8253 (linux_btrace_h): New variable.
8254 (linux-btrace.o): New rule.
8255
8256 2013-03-08 Stan Shebs <stan@codesourcery.com>
8257 Hafiz Abid Qadeer <abidh@codesourcery.com>
8258
8259 * tracepoint.c (trace_buffer_size): New global.
8260 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8261 (init_trace_buffer): Change to one-argument function. Allocate
8262 trace buffer memory.
8263 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8264 handle QTBuffer:size packet.
8265 (cmd_bigqtbuffer_size): New function.
8266 (initialize_tracepoint): Call init_trace_buffer with
8267 DEFAULT_TRACE_BUFFER_SIZE.
8268 * server.c (handle_query): Add QTBuffer:size in the
8269 supported packets.
8270
8271 2013-03-07 Yao Qi <yao@codesourcery.com>
8272
8273 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8274 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8275 of -1.
8276 (cmd_qtsp): Adjust condition. Do post increment.
8277 Set cur_action and cur_step_action back to 0.
8278
8279 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8280
8281 PR server/15236
8282 * linux-low.c (linux_write_memory): Return early success if LEN is
8283 zero.
8284
8285 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8286
8287 * configure.srv: Add x86_64-*-cygwin* as target.
8288
8289 2013-02-28 Tom Tromey <tromey@redhat.com>
8290
8291 * configure.ac: Invoke AC_SYS_LARGEFILE.
8292 * configure, config.in: Rebuild.
8293
8294 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8295
8296 * win32-low.c: Throughout, fix format strings and casts of
8297 printf-like functions to avoid type related warnings on all
8298 platforms.
8299 (get_child_debug_event): Print dwDebugEventCode as hex since
8300 that's how it's usually documented.
8301
8302 2013-02-28 Yao Qi <yao@codesourcery.com>
8303
8304 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8305 pulongest.
8306
8307 2013-02-27 Jiong Wang <jiwang@tilera.com>
8308
8309 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8310 (reg-tilegx32.c): New rule.
8311 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8312 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8313 different register info initializer according to elf class.
8314 (init_registers_tilgx32): New function. The tilegx32 register info
8315 initializer.
8316 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8317 (tile_store_gregset): Likewise.
8318
8319 2013-02-27 Yao Qi <yao@codesourcery.com>
8320
8321 * server.c (process_point_options): Print debug message when
8322 debug_threads is true.
8323
8324 2013-02-26 Yao Qi <yao@codesourcery.com>
8325
8326 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8327
8328 2013-02-19 Pedro Alves <palves@redhat.com>
8329 Kai Tietz <ktietz@redhat.com>
8330
8331 PR gdb/15161
8332
8333 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8334 instead of strtoul to extract address from packet.
8335 (process_serial_event) <'z'>: Likewise.
8336
8337 2013-02-18 Yao Qi <yao@codesourcery.com>
8338
8339 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8340
8341 2013-02-14 Pedro Alves <palves@redhat.com>
8342
8343 Plug memory leak.
8344
8345 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8346 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8347
8348 2013-02-14 Pedro Alves <palves@redhat.com>
8349
8350 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8351
8352 2013-02-14 Pedro Alves <palves@redhat.com>
8353
8354 * tracepoint.c (save_string): Delete.
8355 (add_tracepoint_action): Use savestring instead of save_string.
8356
8357 2013-02-12 Pedro Alves <palves@redhat.com>
8358
8359 * linux-xtensa-low.c: Ditto.
8360 * xtensa-xtregs.c: Ditto.
8361
8362 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8363
8364 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8365 thread_db.
8366
8367 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8368
8369 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8370 aarch64_num_wp_regs and aarch64_num_bp_regs to
8371 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8372
8373 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8374
8375 * linux-aarch64-low.c (ps_get_thread_area): Replace
8376 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8377
8378 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8379 Marcus Shawcroft <marcus.shawcroft@arm.com>
8380 Nigel Stephens <nigel.stephens@arm.com>
8381 Yufeng Zhang <yufeng.zhang@arm.com>
8382
8383 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8384 (aarch64.c, aarch64-without-fpu.c): New targets.
8385 * configure.srv (aarch64*-*-linux*): New.
8386 * linux-aarch64-low.c: New file.
8387
8388 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8389
8390 * linux-low.c (handle_extended_wait, linux_create_inferior)
8391 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8392 (dequeue_one_deferred_signal, linux_resume_one_thread)
8393 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8394 (linux_tracefork_grandchild, linux_test_for_tracefork)
8395 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8396 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8397 where the argument is 0.
8398
8399 2013-01-25 Yao Qi <yao@codesourcery.com>
8400
8401 * event-loop.c: Include "queue.h".
8402 (gdb_event_p): New typedef.
8403 (struct gdb_event) <next_event>: Remove.
8404 (event_queue): Change to QUEUE(gdb_event_p).
8405 (async_queue_event): Remove.
8406 (gdb_event_xfree): New.
8407 (initialize_event_loop): New.
8408 (process_event): Use API from QUEUE.
8409 (wait_for_event): Likewise.
8410 * server.c (main): Call initialize_event_loop.
8411 * server.h (initialize_event_loop): Declare.
8412
8413 2013-01-18 Yao Qi <yao@codesourcery.com>
8414
8415 * ax.h (struct eval_agent_expr_context): New.
8416 (gdb_eval_agent_expr): Update declaration.
8417 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8418 TFRAME. Add new argument CTX.
8419 * server.h (struct eval_agent_expr_context): Declare.
8420 (agent_mem_read, agent_tsv_read): Update declaration.
8421 (agent_mem_read_string): Likewise.
8422 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8423 (add_traceframe_block): Add new argument TPOINT.
8424 Increase TPOINT->traceframe_usage.
8425 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8426 eval_tracepoint_agent_expr.
8427 (condition_true_at_tracepoint): Likewise.
8428 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8429 (agent_mem_read_string, agent_tsv_read): Likewise.
8430
8431 2013-01-16 Yao Qi <yao@codesourcery.com>
8432
8433 * linux-low.c (linux_resume_one_lwp): Don't check
8434 'lwp->bp_reinsert != 0'.
8435
8436 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8437 Pedro Alves <palves@redhat.com>
8438
8439 * lynx-low.c (ptrace_request_to_str): Define a temporary
8440 macro and use it to simplify this function's implementation.
8441
8442 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8443
8444 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8445 sets errno.
8446
8447 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8448
8449 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8450
8451 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8452
8453 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8454
8455 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8456
8457 * lynx-low.c (lynx_resume): Use the resume_info parameter
8458 to determine the ptid for the lynx_ptrace call, unless
8459 it is equal to minus_one_ptid, in which case we use the
8460 ptid of the current_inferior.
8461 (lynx_wait_1): After having received a thread create/exit
8462 event, resume the inferior's execution using the signaling
8463 thread's ptid, rather than the old ptid.
8464
8465 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8466
8467 * lynx-low.c (lynx_resume): Delete variable ret.
8468
8469 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8470
8471 * gdbreplay.c (gdbreplay_version): Update copyright year.
8472 * server.c (gdbserver_version): Likewise.
8473
8474 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8475
8476 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8477 new thread.
8478
8479 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8480
8481 * lynx-low.c (ptrace_request_to_str): Add handling for
8482 PTRACE_GETTRACESIG.
8483
8484 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8485
8486 * lynx-low.c (lynx_attach): Delete variable new_process.
8487
8488 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8489
8490 * lynx-low.c (lynx_create_inferior): Delete variable
8491 new_process.
8492
8493 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8494
8495 * lynx-low.c (ptrace_request_to_str): Do not handle
8496 PTRACE_GETTHREADLIST if this macro does not exist.
8497
8498 2012-12-15 Yao Qi <yao@codesourcery.com>
8499
8500 * Makefile.in (OBS): Add notif.o.
8501 * notif.c, notif.h: New.
8502 * server.c: Include "notif.h".
8503 (struct vstop_notif) <next>: Remove.
8504 <base>: New field.
8505 (queue_stop_reply): Update.
8506 (push_event, send_next_stop_reply): Remove.
8507 (discard_queued_stop_replies): Update.
8508 (notif_stop): New variable.
8509 (handle_v_stopped): Remove.
8510 (handle_v_requests): Don't call handle_v_stopped. Call
8511 handle_ack_notif instead.
8512 (queue_stop_reply_callback): Call notif_event_enque instead
8513 of queue_stop_reply.
8514 (handle_status): Don't call send_next_stop_reply, call
8515 notif_write_event instead.
8516 (kill_inferior_callback): Likewise.
8517 (detach_or_kill_inferior_callback): Likewise.
8518 (main): Call initialize_notif.
8519 (process_serial_event): Call QUEUE_is_empty.
8520 (handle_target_event): Call notif_push instead of push event.
8521 * server.h (push_event): Remove declaration.
8522
8523 2012-12-10 Tom Tromey <tromey@redhat.com>
8524
8525 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8526 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8527 macros.
8528 (.c.o): Rewrite.
8529 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8530 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8531 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8532 (amd64-linux-ipa.o, ax.o): Rewrite.
8533 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8534 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8535 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8536 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8537 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8538 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8539 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8540 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8541 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8542 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8543 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8544 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8545 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8546 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8547 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8548 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8549 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8550 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8551 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8552 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8553 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8554 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8555 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8556 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8557 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8558 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8559 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8560 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8561 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8562 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8563 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8564 (reg-tilegx.o): Remove.
8565 (all_object_files): New macro.
8566 Include .deps files.
8567 * aclocal.m4, configure: Rebuild.
8568 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8569 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8570 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8571
8572 2012-12-05 Tom Tromey <tromey@redhat.com>
8573
8574 PR gdb/14917:
8575 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8576
8577 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8578
8579 * configure.ac: Check for linux/perf_event.h.
8580 * config.in: Regenerated.
8581 * configure: Regenerated.
8582
8583 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8584
8585 * hostio.c (handle_readlink): Decrease buffer size
8586 parameter passed to readlink by one byte.
8587
8588 2012-11-26 Yao Qi <yao@codesourcery.com>
8589
8590 * configure.ac (build_warnings): Append '-Wempty-body'.
8591 * configure: Regenerated.
8592 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8593 body.
8594
8595 2012-11-15 Pierre Muller <muller@sourceware.org>
8596
8597 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8598 * config.in: Regenerate.
8599 * configure: Regenerate.
8600 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8601 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8602 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8603 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8604 header.
8605 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8606 instead of <sys/wait.h> header.
8607 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8608
8609 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8610
8611 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8612 (various make rules): Remove -DGDBSERVER
8613
8614 2012-11-09 Yao Qi <yao@codesourcery.com>
8615
8616 * spu-low.c (current_ptid): Move it to ..
8617 * gdbthread.h: ... here. New.
8618 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8619 * server.c (myresume, process_serial_event): Likewise.
8620 * thread-db.c (thread_db_find_new_threads): Likewise.
8621 * tracepoint.c (run_inferior_command): Likewise.
8622
8623 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8624
8625 * server.c (handle_search_memory_1): Include access length in
8626 warning message.
8627
8628 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8629
8630 * linux-crisv32-low.c: Fix compile errors.
8631
8632 2012-09-04 Yao Qi <yao@codesourcery.com>
8633
8634 * tracepoint.c (cmd_qtsv): Adjust debug message.
8635 Don't check CUR_TPOINT.
8636
8637 2012-08-28 Yao Qi <yao@codesourcery.com>
8638
8639 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8640 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8641 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8642 Remove declarations of xmalloc, xreallloc, xstrdup and
8643 freeargv.
8644 * Makefile.in (libiberty_h): New.
8645 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8646 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8647
8648 2012-08-23 Yao Qi <yao@codesourcery.com>
8649
8650 * server.h: Remove declaration of 'xsnprintf'.
8651
8652 2012-08-22 Keith Seitz <keiths@redhat.com>
8653
8654 * server.h: Include build-gnulib-gbserver/config.h.
8655 * gdbreplay.c: Likewise.
8656
8657 2012-08-08 Doug Evans <dje@google.com>
8658
8659 * Makefile.in (SFILES): Add gdb_vecs.c.
8660 (OBS): Add gdb_vecs.o.
8661 (gdb_vecs_h, host_defs_h): New variables.
8662 (thread-db.o): Add $(gdb_vecs_h) dependency.
8663 (gdb_vecs.o): New rule.
8664 * thread-db.c: #include "gdb_vecs.h".
8665 (thread_db_load_search): Use a vector to iterate over path elements.
8666 Handle text appearing after "$pdir".
8667
8668 * configure.ac: Add check for strstr.
8669 * config.in: Regenerate.
8670 * configure: Regenerate.
8671
8672 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8673
8674 * hostio.c (handle_pread): If pread fails, fall back to attempting
8675 lseek/read.
8676 (handle_pwrite): Likewise for pwrite.
8677
8678 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8679
8680 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8681 between unsupported TYPE and unimplementable ADDR/LEN combination.
8682 (arm_insert_point): Act on new return value.
8683
8684 2012-07-31 Pedro Alves <palves@redhat.com>
8685
8686 * server.c (process_point_options): Only skip tokens if we find
8687 one that is unrecognized. Don't treat 'X' specially while
8688 skipping unrecognized tokens.
8689
8690 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8691
8692 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8693 to 4-byte-align HW breakpoint addresses for Thumb.
8694
8695 2012-07-27 Yao Qi <yao@codesourcery.com>
8696
8697 PR remote/14161.
8698
8699 * server.h: Declare gdb_agent_about_to_close.
8700 * target.c (kill_inferior): Include "agent.h".
8701 New. Send command 'kill'.
8702 * target.h (kill_inferior): Removed macro.
8703 * tracepoint.c (gdb_agent_about_to_close): New.
8704 (gdb_agent_helper_thread): Handle command 'close'.
8705 Wait endlessly until the inferior stops.
8706 Install gdb_agent_remove_socket to atexit hook.
8707 (agent_socket_name): New static variable.
8708 (gdb_agent_socket_init): Replace local variable 'name' with
8709 'agent_socket_name'.
8710 (gdb_agent_remove_socket): New.
8711
8712 2012-07-27 Yao Qi <yao@codesourcery.com>
8713
8714 * server.c (process_point_options): Stop at 'X' when parsing.
8715
8716 2012-07-19 Michael Eager <eager@eagercon.com>
8717
8718 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8719 to hw_execute.
8720 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8721 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8722 hardware breakpoint.
8723
8724 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8725
8726 * gdbserver/linux-low.c (initialize_low): Call
8727 linux_ptrace_init_warnings.
8728
8729 2012-07-02 Doug Evans <dje@google.com>
8730
8731 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8732 pointer to int.
8733
8734 2012-07-02 Stan Shebs <stan@codesourcery.com>
8735
8736 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8737 (ax.o): Add it to build rule.
8738 (ax-ipa.o): Ditto.
8739 (OBS): Add format.o.
8740 (IPA_OBS): Add format.o.
8741 * server.c (handle_query): Claim support for breakpoint commands.
8742 (process_point_options): Add command case.
8743 (process_serial_event): Leave running if there are printfs in
8744 effect.
8745 * mem-break.h (any_persistent_commands): Declare.
8746 (add_breakpoint_commands): Declare.
8747 (gdb_no_commands_at_breakpoint): Declare.
8748 (run_breakpoint_commands): Declare.
8749 * mem-break.c (struct point_command_list): New struct.
8750 (struct breakpoint): New field command_list.
8751 (any_persistent_commands): New function.
8752 (add_commands_to_breakpoint): New function.
8753 (add_breakpoint_commands): New function.
8754 (gdb_no_commands_at_breakpoint): New function.
8755 (run_breakpoint_commands): New function.
8756 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8757 locally.
8758 * ax.c: Include format.h.
8759 (ax_printf): New function.
8760 (gdb_eval_agent_expr): Add printf opcode.
8761
8762 2012-06-13 Yao Qi <yao@codesourcery.com>
8763
8764 * server.c (start_inferior): Remove duplicated writes to fields
8765 'last_resume_kind' and 'last_status' of 'current_inferior'.
8766
8767 2012-06-12 Yao Qi <yao@codesourcery.com>
8768 Pedro Alves <palves@redhat.com>
8769
8770 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8771 comment.
8772 * server.c (handle_v_cont): Extend comment.
8773
8774 2012-06-11 Yao Qi <yao@codesourcery.com>
8775
8776 * linux-low.c (linux_attach): Add 'static'.
8777
8778 2012-06-06 Yao Qi <yao@codesourcery.com>
8779
8780 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8781
8782 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8783
8784 Fix gcc -flto compilation warning.
8785 * server.c (main): Make variable multi_mode and attach volatile.
8786
8787 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8788
8789 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8790 if the platform doesn't know about it.
8791
8792 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8793
8794 * Makefile.in (SFILES): Add linux-tile-low.c.
8795 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8796 * configure.srv: Handle tilegx-*-linux*.
8797 * linux-tile-low.c: New file.
8798
8799 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8800
8801 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8802
8803 2012-05-24 Pedro Alves <palves@redhat.com>
8804
8805 PR gdb/7205
8806
8807 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8808
8809 2012-05-24 Pedro Alves <palves@redhat.com>
8810
8811 PR gdb/7205
8812
8813 Replace target_signal with gdb_signal throughout.
8814
8815 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8816
8817 * linux-low.c (linux_store_registers): Avoid the copying sequence
8818 when no data has been retrieved by ptrace.
8819
8820 2012-05-22 Will Deacon <will.deacon@arm.com>
8821
8822 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8823 Include asm/ptrace.h.
8824 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8825 already defined.
8826
8827 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8828
8829 * linux-low.c (linux_store_registers): Don't re-retrieve data
8830 with ptrace that has already been obtained from /proc. Always
8831 copy any data retrieved with ptrace to the buffer supplied.
8832
8833 2012-05-11 Yao Qi <yao@codesourcery.com>
8834 Pedro Alves <palves@redhat.com>
8835
8836 * linux-low.c (enum stopping_threads_kind): New.
8837 (stopping_threads): Change type to `enum stopping_threads_kind'.
8838 (handle_extended_wait): If stopping and suspending threads, leave
8839 the new_lwp suspended too.
8840 (linux_wait_for_event): Adjust.
8841 (stop_all_lwps): Set `stopping_threads' to
8842 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8843 whether we're suspending threads or just stopping them. Assert no
8844 recursion happens.
8845
8846 2012-04-29 Yao Qi <yao@codesourcery.com>
8847
8848 * server.h: Move some code to ...
8849 * gdbthread.h: ... here. New.
8850 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8851 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8852 (nto-low.o, win32-low.o): Likewise.
8853 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8854 * regcache.c, remote-utils.c, server.c: Likewise.
8855 * target.c, tracepoint.c, win32-low.c: Likewise.
8856
8857 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8858
8859 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8860 (PTRACE_ARG4_TYPE): Likewise.
8861 (PTRACE_XFER_TYPE): Likewise.
8862 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8863 ptrace to PTRACE_ARG3_TYPE.
8864 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8865 (PTRACE_ARG4_TYPE): Likewise.
8866 (PTRACE_XFER_TYPE): Likewise.
8867 (linux_detach_one_lwp): Cast fourth argument of
8868 ptrace to long then PTRACE_ARG4_TYPE.
8869 (regsets_fetch_inferior_registers): Cast third argument of
8870 ptrace to long then PTRACE_ARG3_TYPE.
8871 (regsets_store_inferior_registers): Likewise.
8872
8873 2012-04-20 Pedro Alves <palves@redhat.com>
8874
8875 * configure: Regenerate.
8876
8877 2012-04-19 Pedro Alves <palves@redhat.com>
8878
8879 * Makefile.in (GNULIB_BUILDDIR): New.
8880 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8881 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8882 (all, install-only, uninstall, clean-info, all-lib, clean): No
8883 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8884 (maintainer-clean realclean distclean): Use subdir_do.
8885 (subdir_do): New.
8886 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8887 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8888 * acinclude.m4: Include acx_configure_dir.m4.
8889 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8890 calls. Call AC_PROG_RANLIB. Configure gnulib using
8891 ACX_CONFIGURE_DIR.
8892 (GNULIB): New.
8893 (GNULIB_STDINT_H): Adjust.
8894 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8895 * gdbreplay.c: Include build-gnulib/config.h.
8896 * server.h: Likewise.
8897 * aclocal.m4: Regenerate.
8898 * config.in: Regenerate.
8899 * configure: Regenerate.
8900
8901 2012-04-19 Pedro Alves <palves@redhat.com>
8902
8903 * Makefile.in (LIBGNU, INCGNU): Adjust.
8904 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8905 (all, install-only, uninstall, clean-info, all-lib, clean)
8906 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8907 * configure.ac: Adjust AC_OUTPUT output.
8908 * aclocal.m4: Regenerate.
8909 * configure: Regenerate.
8910
8911 2012-04-19 Pedro Alves <palves@redhat.com>
8912
8913 * Makefile.in (generated_files): New.
8914 (server_h): Remove the explicit dependency on config.h, and depend
8915 on $generated_files.
8916
8917 2012-04-19 Pedro Alves <palves@redhat.com>
8918
8919 * Makefile.in (INCGNU): Add -Ignulib.
8920
8921 2012-04-19 Pedro Alves <palves@redhat.com>
8922
8923 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8924 (INCGNU): ... this, and spell out -I here.
8925 (GNULIB_LIB): Rename to ...
8926 (LIBGNU): ... this.
8927 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8928
8929 2012-04-19 Pedro Alves <palves@redhat.com>
8930
8931 * config.in: Regenerate.
8932
8933 2012-04-19 Pedro Alves <palves@redhat.com>
8934
8935 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8936 * server.h (memmem): Remove declaration.
8937 * config.in: Regenerate.
8938 * configure: Regenerate.
8939
8940 2012-04-19 Yao Qi <yao@codesourcery.com>
8941
8942 * Makefile.in (SFILES): Add common/vec.c.
8943 (OBS): Add vec.o.
8944 (vec.o): New rule.
8945
8946 2012-04-19 Yao Qi <yao@codesourcery.com>
8947
8948 * remote-utils.c (prepare_resume_reply): Replace with macro
8949 target_core_of_thread.
8950 * server.c (handle_qxfer_threads_proper): Likewise.
8951 * target.h (traget_core_of_thread): New macro.
8952
8953 2012-04-18 Pedro Alves <palves@redhat.com>
8954
8955 * aclocal.m4: Regenerate.
8956 * configure: Regenerate.
8957
8958 2012-04-16 Yao Qi <yao@codesourcery.com>
8959
8960 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8961 duplicated on address.
8962
8963 2012-04-16 Yao Qi <yao@codesourcery.com>
8964
8965 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8966 (struct tracepoint_action_ops) <send>: New field.
8967 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8968 (agent_expr_send, x_tracepoint_action_send): New.
8969 (l_tracepoint_action_send): New.
8970 (cmd_qtdp): Download and install tracepoint
8971 according to `use_agent'.
8972 (run_inferior_command): Add one more parameter `len'.
8973 Update callers.
8974 (tracepoint_send_agent): New.
8975 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8976
8977 2012-04-16 Yao Qi <yao@codesourcery.com>
8978
8979 * tracepoint.c (download_tracepoints): Moved to ...
8980 (cmd_qtstart): ... here.
8981
8982 2012-04-14 Yao Qi <yao@codesourcery.com>
8983
8984 * tracepoint.c: Include inttypes.h.
8985 (struct collect_memory_action): Use sized types.
8986 (struct tracepoint): Likewise.
8987 (cmd_qtdp, stop_tracing): Update print specifiers.
8988 (cmd_qtp, response_tracepoint): Likewise.
8989 (collect_data_at_tracepoint): Likewise.
8990 (collect_data_at_step): Likewise.
8991
8992 2012-04-14 Yao Qi <yao@codesourcery.com>
8993
8994 Import gnulib module inttypes.
8995 * aclocal.m4, config.in, configure: Regenerated.
8996
8997 2012-04-14 Yao Qi <yao@codesourcery.com>
8998
8999 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9000 Makefile and config.status at last.
9001
9002 2012-04-13 Yao Qi <yao@codesourcery.com>
9003
9004 * tracepoint.c: Include stdint.h unconditionally.
9005
9006 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9007
9008 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9009 on BFD_HAVE_SYS_PROCFS_TYPE.
9010 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9011 * configure: Regenerate.
9012 * config.in: Likewise.
9013
9014 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9015
9016 * Makefile.in (clean): Also remove x32.c x32-linux.c
9017 x32-avx.c x32-avx-linux.c.
9018 (x32.o): New target.
9019 (x32.c): Likewise.
9020 (x32-linux.o): Likewise.
9021 (x32-linux.c): Likewise.
9022 (x32-avx.o): Likewise.
9023 (x32-avx.c): Likewise.
9024 (x32-avx-linux.o): Likewise.
9025 (x32-avx-linux.c): Likewise.
9026
9027 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9028 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9029 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9030 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9031 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9032 i386/x32-avx-linux.xml.
9033
9034 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9035 (init_registers_x32_avx_linux): Likwise.
9036 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9037 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9038
9039 2012-04-13 Pedro Alves <palves@redhat.com>
9040
9041 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9042 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9043 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9044 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9045 the sub-make.
9046
9047 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9048
9049 * linux-x86-low.c (compat_x32_clock_t): New.
9050 (compat_x32_siginfo_t): Likewise.
9051 (compat_x32_siginfo_from_siginfo): Likewise.
9052 (siginfo_from_compat_x32_siginfo): Likewise.
9053 (linux_is_elf64): Likewise.
9054 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9055 and siginfo_from_compat_x32_siginfo for x32.
9056 (x86_arch_setup): Set linux_is_elf64.
9057
9058 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9059
9060 PR gdb/13969
9061 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9062 e_machine field.
9063 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9064 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9065 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9066 compatible with process.
9067
9068 2012-04-12 Yao Qi <yao@codesourcery.com>
9069
9070 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9071 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9072 (install-only, install-info, clean): Handle sub dir gnulib.
9073 (all-lib, am--refresh): New targets.
9074 (memmem.o): Remove target.
9075 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9076 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9077 (AC_REPLACE_FUNCS): Remove memmem.
9078 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9079 (AC_OUTPUT): Generate Makefile in gnulib/.
9080 * aclocal.m4, config.in, configure: Regenerated.
9081
9082 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9083
9084 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9085
9086 2012-04-05 Pedro Alves <palves@redhat.com>
9087
9088 -Werror=strict-aliasing
9089
9090 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9091 pointer.
9092
9093 2012-04-04 Pedro Alves <palves@redhat.com>
9094
9095 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9096 (sparc_store_gregset_from_stack, sparc_store_gregset)
9097 (sparc_breakpoint_at): Fix formatting.
9098
9099 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9100
9101 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9102 are available.
9103 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9104 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9105 * config.in: Regenerate.
9106 * configure: Likewise.
9107
9108 2012-03-29 Pedro Alves <palves@redhat.com>
9109
9110 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9111 Correct ptrace arguments.
9112
9113 2012-03-28 Pedro Alves <palves@redhat.com>
9114
9115 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9116 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9117 (IA64_FR1_REGNUM): New defines.
9118 (ia64_fetch_register): New.
9119 (the_low_target): Install it.
9120 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9121 field.
9122 * linux-low.c (linux_fetch_registers): Try the
9123 the_low_target.fetch_register hook first.
9124
9125 * linux-arm-low.c (the_low_target): Adjust.
9126 * linux-bfin-low.c (the_low_target): Adjust.
9127 * linux-cris-low.c (the_low_target): Adjust.
9128 * linux-crisv32-low.c (the_low_target): Adjust.
9129 * linux-m32r-low.c (the_low_target): Adjust.
9130 * linux-m68k-low.c (the_low_target): Adjust.
9131 * linux-mips-low.c (the_low_target): Adjust.
9132 * linux-ppc-low.c (the_low_target): Adjust.
9133 * linux-s390-low.c (the_low_target): Adjust.
9134 * linux-sh-low.c (the_low_target): Adjust.
9135 * linux-sparc-low.c (the_low_target): Adjust.
9136 * linux-tic6x-low.c (the_low_target): Adjust.
9137 * linux-x86-low.c (the_low_target): Adjust.
9138 * linux-xtensa-low.c (the_low_target): Adjust.
9139
9140 2012-03-26 Pedro Alves <palves@redhat.com>
9141
9142 * server.c (handle_qxfer_libraries): Don't bail early if
9143 the_target->qxfer_libraries_svr4 is not NULL.
9144
9145 2012-03-26 Pedro Alves <palves@redhat.com>
9146
9147 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9148
9149 2012-03-23 Pedro Alves <palves@redhat.com>
9150
9151 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9152 "library-list-svr4" element's start tag when the the DSO list is
9153 empty.
9154
9155 2012-03-23 Pedro Alves <palves@redhat.com>
9156
9157 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9158 a variable whose type size is the same as the inferior's pointer
9159 size.
9160
9161 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9162
9163 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9164 struct siginfo.
9165 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9166 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9167 * linux-low.h: Include <signal.h>.
9168 (struct siginfo): Remove forward declaration.
9169 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9170 struct siginfo.
9171
9172 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9173
9174 * .gitignore: Ignore more files.
9175
9176 2012-03-19 Pedro Alves <palves@redhat.com>
9177 Jan Kratochvil <jan.kratochvil@redhat.com>
9178
9179 * server.c (cont_thread, general_thread): Add describing comments.
9180 (start_inferior): Clear `cont_thread'.
9181 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9182 of a process.
9183
9184 2012-03-15 Yao Qi <yao@codesourcery.com>
9185
9186 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9187 handling to ...
9188 (cmd_qtdp): ... here.
9189
9190 2012-03-15 Yao Qi <yao@codesourcery.com>
9191
9192 * tracepoint.c (struct tracepoint_action_ops): New.
9193 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9194 (m_tracepoint_action_download): New.
9195 (r_tracepoint_action_download): New.
9196 (x_tracepoint_action_download): New.
9197 (l_tracepoint_action_download): New.
9198 (add_tracepoint_action): Install `action->ops' according type.
9199 (download_tracepoint_1): Move code `download' function pointer
9200 of various tracepoint_action_ops.
9201
9202 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9203
9204 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9205 linux_ptrace_attach_warnings.
9206
9207 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9208
9209 * Makefile.in (linux-ptrace.o): New.
9210 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9211 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9212 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9213 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9214 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9215 of these targets.
9216 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9217
9218 2012-03-08 Yao Qi <yao@codesourcery.com>
9219 Pedro Alves <palves@redhat.com>
9220
9221 Fix PR server/13392.
9222 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9223 offset of JMP insn.
9224 * tracepoint.c (remove_tracepoint): New.
9225 (cmd_qtdp): Call remove_tracepoint when failed to install.
9226
9227 2012-03-07 Pedro Alves <palves@redhat.com>
9228
9229 * linux-low.c (get_detach_signal): New.
9230 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9231 Pass on pending signals to PTRACE_DETACH. Check the result of the
9232 ptrace call.
9233 * server.c (program_signals, program_signals_p): New.
9234 (handle_general_set): Handle QProgramSignals.
9235 * server.h (program_signals, program_signals_p): Declare.
9236
9237 2012-03-05 Pedro Alves <palves@redhat.com>
9238 Jan Kratochvil <jan.kratochvil@redhat.com>
9239
9240 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9241 New comment why.
9242
9243 2012-03-03 Yao Qi <yao@codesourcery.com>
9244
9245 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9246 agent_look_up_symbols.
9247
9248 2012-03-03 Yao Qi <yao@codesourcery.com>
9249
9250 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9251 (linux-x86-low.o): Likewise.
9252 * server.h: Remove in_process_agent_loaded.
9253 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9254 common/agent.c.
9255 Update callers.
9256
9257 2012-03-03 Yao Qi <yao@codesourcery.com>
9258
9259 * tracepoint.c (gdb_agent_capability): New global.
9260 (in_process_agent_loaded_ust): Renamed to
9261 `in_process_agent_supports_ust'.
9262 Update callers.
9263 (in_process_agent_supports_ust): Call agent_capability_check.
9264 (clear_installed_tracepoints): Assert that agent supports
9265 agent.
9266
9267 2012-03-03 Yao Qi <yao@codesourcery.com>
9268
9269 * linux-low.c (linux_supports_agent): New.
9270 (linux_target_ops): Initialize field `supports_agent' with
9271 linux_supports_agent.
9272 * target.h (struct target_ops) <supports_agent>: New.
9273 (target_supports_agent): New macro.
9274 * server.c (handle_general_set): Handle packet 'QAgent'.
9275 (handle_query): Send `QAgent+'.
9276 * Makefile.in (server.o): Depends on agent.h.
9277
9278 2012-03-03 Yao Qi <yao@codesourcery.com>
9279
9280 * Makefile.in (OBS): Add agent.o.
9281 Add new rule for agent.o.
9282 Track dependence of tracepoint.c on agent.h.
9283 * tracepoint.c (run_inferior_command_1):
9284 (run_inferior_command): Call agent_run_command.
9285 (gdb_ust_connect_sync_socket): Deleted. Move it to
9286 common/agent.c.
9287 (resume_thread, stop_thread): Likewise.
9288 (gdb_ust_socket_init): Renamed to ...
9289 (gdb_agent_socket_init): ... New.
9290 (gdb_ust_thread): Renamed to ...
9291 (gdb_agent_helper_thread): ... New.
9292 (gdb_ust_init): Move some code to ...
9293 (gdb_agent_init): ... here. New.
9294 [HAVE_UST]: Call gdb_ust_init.
9295 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9296 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9297 * config.in, configure: Regenerated.
9298
9299 2012-03-02 Pedro Alves <palves@redhat.com>
9300
9301 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9302 * linux-low.c (struct simple_pid_list): New.
9303 (stopped_pids): New a struct simple_pid_list pointer.
9304 (add_to_pid_list, pull_pid_from_list): New.
9305 (handle_extended_wait): Don't assume the first signal new children
9306 report is SIGSTOP. Adjust call to pull_pid_from_list.
9307 (linux_wait_for_lwp): Adjust.
9308
9309 2012-03-02 Yao Qi <yao@codesourcery.com>
9310
9311 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9312 debug log.
9313
9314 2012-03-02 Yao Qi <yao@codesourcery.com>
9315
9316 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9317 `stop_pc' and `tpoint'. Update caller.
9318
9319 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9320
9321 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9322 * linux-low.c (use_linux_regsets): New macro.
9323 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9324 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9325 (linux_register_in_regsets): New function.
9326 (usr_fetch_inferior_registers): Skip registers covered by
9327 regsets.
9328 (usr_store_inferior_registers): Likewise.
9329 (usr_fetch_inferior_registers): New macro.
9330 (usr_store_inferior_registers): Likewise.
9331 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9332 (linux_store_registers): Likewise.
9333 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9334 prototype.
9335 (init_registers_mips64_dsp_linux): Likewise.
9336 (init_registers_mips_linux): New macro.
9337 (init_registers_mips_dsp_linux): Likewise.
9338 (mips_dsp_num_regs): Likewise.
9339 (DSP_BASE, DSP_CONTROL): New fallback macros.
9340 (mips_base_regs): New macro.
9341 (mips_regmap): Use it. Fix the size.
9342 (mips_dsp_regmap): New variable.
9343 (mips_dsp_regset_bitmap): Likewise.
9344 (mips_arch_setup): New function.
9345 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9346 than mips_regmap.
9347 (mips_cannot_store_register): Likewise.
9348 (the_low_target): Update .arch_setup, .num_regs and .regmap
9349 initializers. Add .regset_bitmap initializer.
9350 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9351 initializer.
9352 * linux-bfin-low.c (the_low_target): Likewise.
9353 * linux-cris-low.c (the_low_target): Likewise.
9354 * linux-crisv32-low.c (the_low_target): Likewise.
9355 * linux-ia64-low.c (the_low_target): Likewise.
9356 * linux-m32r-low.c (the_low_target): Likewise.
9357 * linux-m68k-low.c (the_low_target): Likewise.
9358 * linux-ppc-low.c (the_low_target): Likewise.
9359 * linux-s390-low.c (the_low_target): Likewise.
9360 * linux-sh-low.c (the_low_target): Likewise.
9361 * linux-sparc-low.c (the_low_target): Likewise.
9362 * linux-tic6x-low.c (the_low_target): Likewise.
9363 * linux-x86-low.c (the_low_target): Likewise.
9364 * linux-xtensa-low.c (the_low_target): Likewise.
9365 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9366 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9367 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9368 srv_xmlfiles.
9369 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9370 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9371
9372 2012-02-29 Yao Qi <yao@codesourcery.com>
9373 Pedro Alves <palves@redhat.com>
9374
9375 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9376 `step_over_finished' is true.
9377
9378 2012-02-27 Pedro Alves <palves@redhat.com>
9379
9380 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9381 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9382
9383 2012-02-27 Pedro Alves <palves@redhat.com>
9384
9385 PR server/9684
9386 * linux-low.c (pid_is_stopped): New.
9387 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9388
9389 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9390
9391 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9392 of conditions.
9393
9394 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9395
9396 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9397
9398 2012-02-24 Luis Machado <lgustavo@codesourcery>
9399
9400 * server.c (handle_query): Advertise support for target-side
9401 breakpoint condition evaluation.
9402 (process_point_options): New function.
9403 (process_serial_event): When inserting a breakpoint, check for
9404 a target-side condition that should be evaluated.
9405
9406 * mem-break.c: Include regcache.h and ax.h.
9407 (point_cond_list_t): New data structure.
9408 (breakpoint) <cond_list>: New field.
9409 (find_gdb_breakpoint_at): Make non-static.
9410 (delete_gdb_breakpoint_at): Clear any target-side
9411 conditions.
9412 (clear_gdb_breakpoint_conditions): New function.
9413 (add_condition_to_breakpoint): Likewise.
9414 (add_breakpoint_condition): Likewise.
9415 (gdb_condition_true_at_breakpoint): Likewise.
9416 (gdb_breakpoint_here): Return result directly instead
9417 of going through a local variable.
9418
9419 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9420 (clear_gdb_breakpoint_conditions): Likewise.
9421 (add_breakpoint_condition): Likewise.
9422 (gdb_condition_true_at_breakpoint): Likewise.
9423
9424 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9425 (need_step_over_p): Take target-side breakpoint condition into
9426 consideration.
9427
9428 2012-02-24 Luis Machado <lgustavo@codesourcery>
9429
9430 * server.h: Include tracepoint.h.
9431 (agent_mem_read, agent_get_trace_state_variable_value,
9432 agent_set_trace_state_variable_value,
9433 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9434 get_set_tsv_func_addr): New prototypes.
9435
9436 * ax.h: New include file.
9437 * ax.c: New source file.
9438
9439 * tracepoint.c: Include ax.h.
9440 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9441 agent_expr, eval_result_type): Move to ax.h.
9442 (parse_agent_expr): Rename to ...
9443 (gdb_parse_agent_expr): ... this, make it non-static and move
9444 to ax.h.
9445 (unparse_agent_expr) Rename to ...
9446 (gdb_unparse_agent_expr): ... this, make it non-static and move
9447 to ax.h.
9448 (eval_agent_expr): Rename to ...
9449 (eval_tracepoint_agent_expr): ... this.
9450 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9451 forward declarations.
9452 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9453 (agent_get_trace_state_variable_value): New function.
9454 (agent_set_trace_state_variable_value): New function.
9455 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9456 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9457 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9458 (condition_true_at_tracepoint): Likewise.
9459 (parse_agent_expr): Rename to ...
9460 (gdb_parse_agent_expr): ... this and move to ax.c.
9461 (unparse_agent_expr): Rename to ...
9462 (gdb_unparse_agent_expr): ... this and move to ax.c.
9463 (gdb_agent_op_name): Move to ax.c.
9464 (eval_agent_expr): Rename to ...
9465 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9466 and move to ax.c.
9467 (eval_tracepoint_agent_expr): New function.
9468 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9469 non-static.
9470 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9471 ax.c.
9472 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9473 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9474 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9475 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9476 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9477 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9478 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9479 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9480 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9481 (compile_bytecodes): Remove forward declaration.
9482 (is_goto_target): Move to ax.c.
9483 (compile_bytecodes): Move to ax.c and call
9484 agent_get_trace_state_variable_value (...) and
9485 agent_set_trace_state_variable_value (...).
9486
9487 * Makefile.in: Update ax.c and IPA dependencies.
9488
9489 2012-02-24 Pedro Alves <palves@redhat.com>
9490
9491 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9492 (cmd_bigqtbuffer_circular): ... this. Only handle
9493 'QTBuffer:circular:'.
9494 (handle_tracepoint_general_set): Adjust.
9495
9496 2012-02-16 Yao Qi <yao@codesourcery.com>
9497
9498 * inferiors.c: Move code to ...
9499 * dll.c: .... here. New.
9500 * server.h: Declare clear_dlls.
9501 * Makefile.in (SFILES): Add dll.c.
9502 (OBS): Add dll.o
9503 (dll.o): New rule.
9504
9505 2012-02-11 Yao Qi <yao@codesourcery.com>
9506
9507 * server.c: (handle_monitor_command): Add a new parameter
9508 `own_buf'.
9509 (handle_query): Update caller.
9510
9511 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9512
9513 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9514 * configure, config.in: Regenerate.
9515 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9516 is not defined.
9517
9518 2012-02-02 Pedro Alves <palves@redhat.com>
9519
9520 Try SIGKILL first, then PTRACE_KILL.
9521 * linux-low.c (linux_kill_one_lwp): New.
9522 (linux_kill_one_lwp): Rename to ...
9523 (kill_one_lwp_callback): ... this. Use the new
9524 linux_kill_one_lwp.
9525
9526 2012-02-02 Pedro Alves <palves@redhat.com>
9527
9528 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9529 inferior.
9530
9531 2012-01-27 Pedro Alves <palves@redhat.com>
9532
9533 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9534 (elf_64_file_p): Make static.
9535 (linux_pid_exe_is_elf_64_file): New.
9536 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9537 Delete declarations.
9538 (linux_pid_exe_is_elf_64_file): Declare.
9539 * linux-x86-low.c (x86_arch_setup): Use
9540 linux_pid_exe_is_elf_64_file.
9541
9542 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9543
9544 * linux-low.c (linux_wait_for_event_1): Rename to ...
9545 (linux_wait_for_event): ... here and merge it with former
9546 linux_wait_for_event - new variable wait_ptid, use it.
9547 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9548
9549 2012-01-23 Pedro Alves <palves@redhat.com>
9550
9551 * server.c (main): Avoid yet another case of infinite loop while
9552 detaching/killing after a longjmp.
9553
9554 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9555
9556 Code cleanup.
9557 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9558
9559 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9560
9561 * hostio.c (handle_readlink): New function.
9562 (handle_vFile): Call it to handle "vFile:readlink" packets.
9563
9564 2012-01-20 Pedro Alves <palves@redhat.com>
9565 Ulrich Weigand <ulrich.weigand@linaro.org>
9566
9567 * server.c (handle_v_requests): Only support vAttach and vRun to
9568 start multiple processes when in extended protocol mode.
9569
9570 2012-01-17 Pedro Alves <palves@redhat.com>
9571
9572 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9573 memalign plus mprotect to allocate the scratch buffer.
9574
9575 2012-01-13 Pedro Alves <palves@redhat.com>
9576
9577 * server.c (attach_inferior): Clear `cont_thread'.
9578
9579 2012-01-13 Pedro Alves <palves@redhat.com>
9580
9581 * server.c (main): Avoid infinite loop while detaching/killing
9582 after a longjmp.
9583
9584 2012-01-09 Doug Evans <dje@google.com>
9585
9586 * server.c (start_inferior): Set last_ptid in --wrapper case.
9587
9588 2012-01-06 Yao Qi <yao@codesourcery.com>
9589
9590 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9591 defined.
9592 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9593
9594 2012-01-04 Yao Qi <yao@codesourcery.com>
9595
9596 * tracepoint.c (cmd_qtdp): Print debug message
9597 for static tracepoint.
9598
9599 2012-01-04 Yao Qi <yao@codesourcery.com>
9600
9601 * tracepoint.c (trace_vdebug): Differentiate debug message
9602 between gdbserver and IPA.
9603
9604 2012-01-03 Yao Qi <yao@codesourcery.com>
9605
9606 * tracepoint.c (tracepoint_was_hit): Don't collect for
9607 static tracepoint.
9608
9609 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9610
9611 * terminal.h: Reformat copyright header.
9612
9613 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9614
9615 * server.c (gdbserver_version): Update copyright year.
9616 * gdbreplay.c (gdbreplay_version): Likewise.
9617
9618 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9619
9620 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9621
9622 Revert:
9623 2011-12-18 Hui Zhu <teawater@gmail.com>
9624 * linux-low.c (linux_create_inferior): Save return value to ret.
9625
9626 2011-12-18 Hui Zhu <teawater@gmail.com>
9627
9628 * linux-low.c (linux_create_inferior): Save return value to ret.
9629
9630 2011-12-16 Doug Evans <dje@google.com>
9631
9632 * linux-low.c (linux_create_inferior): If stdio connection,
9633 redirect stdin from /dev/null, stdout to stderr.
9634 * remote-utils.c (remote_is_stdio): New static global.
9635 (remote_connection_is_stdio): New function.
9636 (remote_prepare): Handle stdio connection.
9637 (remote_open): Ditto.
9638 (remote_close): Don't close stdin for stdio connections.
9639 (read_prim,write_prim): New functions. Replace all calls to
9640 read/write to these.
9641 * server.c (main): Watch for "-" argument. Move call to
9642 remote_prepare before start_inferior.
9643 * server.h (STDIO_CONNECTION_NAME): New macro.
9644 (remote_connection_is_stdio): Declare.
9645
9646 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9647 in debugging output.
9648
9649 2011-12-15 Yao Qi <yao@codesourcery.com>
9650
9651 * tracepoint.c: Include sys/syscall.h.
9652 (gdb_ust_thread): Remove preprocessor conditional.
9653
9654 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9655
9656 * linux-low.c (linux_detach_one_lwp): Call
9657 the_low_target.prepare_to_resume before detaching.
9658
9659 2011-12-14 Yao Qi <yao@codesourcery.com>
9660
9661 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9662 of write.
9663
9664 2011-12-14 Yao Qi <yao@codesourcery.com>
9665
9666 * i386-low.c (i386_low_stopped_data_address): Initialize local
9667 variable `control'.
9668
9669 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9670
9671 PR remote/13492
9672
9673 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9674 DR_CONTROL unless necessary. Extend comments.
9675 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9676 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9677
9678 2011-12-13 Yao Qi <yao@codesourcery.com>
9679
9680 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9681 macros.
9682 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9683
9684 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9685
9686 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9687 Print new debug message for such case.
9688
9689 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9690
9691 Fix overlapping memcpy.
9692 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9693 the read_inferior_memory transfer.
9694 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9695 write_inferior_memory transfer.
9696 (set_fast_tracepoint_jump): New variable buf. Use it for the
9697 read_inferior_memory and write_inferior_memory transfers.
9698 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9699 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9700 Use it for the write_inferior_memory transfer.
9701 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9702 buffers.
9703
9704 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9705
9706 * linux-low.c (fetch_register, store_register): Make code
9707 consistent, fix formatting.
9708
9709 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9710
9711 * linux-low.c (usr_store_inferior_registers): Factor out code
9712 to handle individual registers into...
9713 (store_register): ... this new function.
9714
9715 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9716
9717 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9718 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9719 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9720 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9721 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9722 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9723 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9724 (srv_xmlfiles): Add new XML files.
9725
9726 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9727 and <sys/uio.h>.
9728 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9729 (init_registers_s390_linux32v1): Add prototype.
9730 (init_registers_s390_linux32v2): Likewise.
9731 (init_registers_s390_linux64v1): Likewise.
9732 (init_registers_s390_linux64v2): Likewise.
9733 (init_registers_s390x_linux64v1): Likewise.
9734 (init_registers_s390x_linux64v2): Likewise.
9735 (s390_num_regs): Increment to 52.
9736 (s390_regmap): Add orig_r2 register.
9737 (s390_num_regs_3264): Increment to 68.
9738 (s390_regmap_3264): Add orig_r2 register.
9739 (s390_collect_ptrace_register): Handle orig_r2 register.
9740 (s390_supply_ptrace_register): Likewise.
9741 (s390_fill_last_break): New function.
9742 (s390_store_last_break): Likewise.
9743 (s390_fill_system_call): New function.
9744 (s390_store_system_call): Likewise.
9745 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9746 register sets.
9747 (s390_check_regset): New function.
9748 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9749 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9750 Update target_regsets for available register sets.
9751
9752 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9753 Jan Kratochvil <jan.kratochvil@redhat.com>
9754
9755 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9756 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9757 New.
9758 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9759 * linux-low.h (struct process_info_private): New member r_debug.
9760 * server.c (handle_qxfer_libraries): Call
9761 the_target->qxfer_libraries_svr4.
9762 (handle_qxfer_libraries_svr4): New function.
9763 (qxfer_packets): New entry "libraries-svr4".
9764 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9765 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9766 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9767 PACKET_qXfer_libraries_svr4.
9768
9769 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9770
9771 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9772 PSW address/mask between 8-byte and 16-byte formats.
9773 (s390_supply_ptrace_register): Likewise.
9774 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9775 basic addressing mode bit.
9776
9777 2011-11-24 Stan Shebs <stan@codesourcery.com>
9778
9779 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9780
9781 2011-11-17 Stan Shebs <stan@codesourcery.com>
9782
9783 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9784 (tracing_start_time): New global.
9785 (tracing_stop_time): New global.
9786 (tracing_user_name): New global.
9787 (tracing_notes): New global.
9788 (tracing_stop_note): New global.
9789 (cmd_qtstart): Set traceframe_usage, start_time.
9790 (stop_tracing): Set stop_time.
9791 (cmd_qtstatus): Report additional status.
9792 (cmd_qtp): New function.
9793 (handle_tracepoint_query): Call it.
9794 (cmd_qtnotes): New function.
9795 (handle_tracepoint_general_set): Call it.
9796 (get_timestamp): Rename from tsv_get_timestamp.
9797
9798 2011-11-14 Stan Shebs <stan@codesourcery.com>
9799 Kwok Cheung Yeung <kcy@codesourcery.com>
9800
9801 * linux-x86-low.c (small_jump_insn): New.
9802 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9803 trampoline and error message, build a trampoline and issue a small
9804 jump instruction to it.
9805 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9806 trampoline and error message.
9807 (x86_get_min_fast_tracepoint_insn_len): New.
9808 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9809 * linux-low.h (struct linux_target_ops): Add arguments to
9810 install_fast_tracepoint_jump_pad operation, add new operation.
9811 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9812 arguments.
9813 (linux_get_min_fast_tracepoint_insn_len): New function.
9814 (linux_target_op): Add new operation.
9815 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9816 (gdb_trampoline_buffer_end): Ditto.
9817 (gdb_trampoline_buffer_error): Ditto.
9818 (struct ipa_sym_addresses): Add fields for new IPA variables.
9819 (symbol_list): Add entries for new IPA variables.
9820 (struct tracepoint): Add fields to hold the address range of the
9821 trampoline used by the tracepoint.
9822 (trampoline_buffer_head): New static variable.
9823 (trampoline_buffer_tail): Ditto.
9824 (claim_trampoline_space): New function.
9825 (have_fast_tracepoint_trampoline_buffer): New function.
9826 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9827 structure.
9828 (install_fast_tracepoint): Ditto, also add error buffer argument.
9829 (cmd_qtminftpilen): New function.
9830 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9831 (fast_tracepoint_from_trampoline_address): New function.
9832 (fast_tracepoint_collecting): Handle trampoline as part of jump
9833 pad space.
9834 (set_trampoline_buffer_space): New function.
9835 (initialize_tracepoint): Initialize new IPA variables.
9836 * target.h (struct target_ops): Add arguments to
9837 install_fast_tracepoint_jump_pad operation, add new
9838 get_min_fast_tracepoint_insn_len operation.
9839 (target_get_min_fast_tracepoint_insn_len): New.
9840 (install_fast_tracepoint_jump_pad): Add arguments.
9841 * server.h (IPA_BUFSIZ): Define.
9842 * linux-i386-ipa.c: Include extra header files.
9843 (initialize_fast_tracepoint_trampoline_buffer): New function.
9844 (initialize_low_tracepoint): Call it.
9845 * server.h (set_trampoline_buffer_space): Declare.
9846 (claim_trampoline_space): Ditto.
9847 (have_fast_tracepoint_trampoline_buffer): Ditto.
9848
9849 2011-11-14 Yao Qi <yao@codesourcery.com>
9850
9851 * server.c (handle_query): Handle InstallInTrace for qSupported.
9852 * tracepoint.c (add_tracepoint): Sort list.
9853 (install_tracepoint, download_tracepoint): New.
9854 (cmd_qtdp): Call them to install and download tracepoints.
9855 (sort_tracepoints): Removed.
9856 (cmd_qtstart): Update.
9857
9858 2011-11-14 Yao Qi <yao@codesourcery.com>
9859
9860 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9861 * mem-break.h: Declare.
9862 * tracepoint.c (cmd_qtstart): Move some code to ...
9863 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9864 New.
9865 (download_tracepoints): Move some code to ...
9866 (download_tracepoint_1): ... here. New.
9867
9868 2011-11-08 Yao Qi <yao@codesourcery.com>
9869
9870 * remote-utils.c (relocate_instruction): A comment fix.
9871
9872 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9873
9874 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9875 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9876 dr_status_mirror and dr_control_mirror from debug_reg_state.
9877 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9878 (i386_initial_stuff): Remove use of deleted globals.
9879 (i386_get_thread_context, i386_set_thread_context,
9880 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9881 from debug_reg_state.
9882
9883 2011-11-05 Yao Qi <yao@codesourcery.com>
9884
9885 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9886 address as TPOINT's.
9887
9888 2011-11-02 Stan Shebs <stan@codesourcery.com>
9889
9890 * tracepoint.c (agent_mem_read_string): New function.
9891 (eval_agent_expr): Call it for tracenz.
9892 * server.c (handle_query): Report support for tracenz.
9893
9894 2011-11-02 Yao Qi <yao@codesourcery.com>
9895
9896 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9897
9898 2011-11-02 Yao Qi <yao@codesourcery.com>
9899
9900 * target.h: Fix a typo in comment.
9901
9902 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9903
9904 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9905 clobber the breakpoints' shadows with fast tracepoint jumps.
9906 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9907 * target.c (write_inferior_memory): Also pass MYADDR down to
9908 check_mem_write.
9909
9910 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9911
9912 * configure.ac: Check support for personality routine.
9913 * configure: Regenerate.
9914 * config.in: Likewise.
9915 * linux-low.c: Include <sys/personality.h>.
9916 Define ADDR_NO_RANDOMIZE if necessary.
9917 (linux_create_inferior): Disable address space randomization when
9918 forking inferior, if requested.
9919 (linux_supports_disable_randomization): New function.
9920 (linux_target_ops): Install it.
9921 * server.h (disable_randomization): Declare.
9922 * server.c (disable_randomization): New global variable.
9923 (handle_general_set): Handle QDisableRandomization.
9924 (handle_query): Likewise for qSupported.
9925 (main): Support --disable-randomization and --no-disable-randomization
9926 command line arguments.
9927 * target.h (struct target_ops): Add supports_disable_randomization.
9928 (target_supports_disable_randomization): New macro.
9929
9930 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9931
9932 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9933 ifdef check.
9934 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9935 [!PT_GETDSBT] (target_loadmap): New definition.
9936 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9937 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9938 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9939 and PT_GETDSBT to LINUX_LOADMAP.
9940 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9941 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9942
9943 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9944
9945 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9946 (arm_linux_hwbp_cap): New static variable.
9947 (arm_linux_get_hwbp_cap): Replace by ...
9948 (arm_linux_init_hwbp_cap): ... this new function.
9949 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9950 (arm_linux_get_hw_watchpoint_count): Likewise.
9951 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9952 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9953 (arm_prepare_to_resume): Use perror_with_name instead of error.
9954
9955 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9956
9957 * linux-arm-low.c: Include <signal.h>.
9958 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9959 (struct arm_linux_hwbp_cap): New data type.
9960 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9961 (struct arm_linux_hw_breakpoint): New data type.
9962 (MAX_BPTS, MAX_WPTS): Define.
9963 (struct arch_process_info, struct arch_lwp_info): New data types.
9964 (arm_linux_get_hwbp_cap): New function.
9965 (arm_linux_get_hw_breakpoint_count): Likewise.
9966 (arm_linux_get_hw_watchpoint_count): Likewise.
9967 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9968 (arm_hwbp_control_initialize): Likewise.
9969 (arm_hwbp_control_is_enabled): Likewise.
9970 (arm_hwbp_control_is_initialized): Likewise.
9971 (arm_hwbp_control_disable): Likewise.
9972 (arm_linux_hw_breakpoint_equal): Likewise.
9973 (arm_linux_hw_point_initialize): Likewise.
9974 (struct update_registers_data): New data structure.
9975 (update_registers_callback: New function.
9976 (arm_insert_point): Likewise.
9977 (arm_remove_point): Likewise.
9978 (arm_stopped_by_watchpoint): Likewise.
9979 (arm_stopped_data_address): Likewise.
9980 (arm_new_process): Likewise.
9981 (arm_new_thread): Likewise.
9982 (arm_prepare_to_resume): Likewise.
9983 (the_low_target): Register arm_insert_point, arm_remove_point,
9984 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9985 arm_new_thread, and arm_prepare_to_resume.
9986
9987 2011-09-15 Stan Shebs <stan@codesourcery.com>
9988
9989 * server.h (struct emit_ops): Add compare-goto fields.
9990 * tracepoint.c (gdb_agent_op_sizes): New table.
9991 (emit_eq_goto): New function.
9992 (emit_ne_goto): New function.
9993 (emit_lt_goto): New function.
9994 (emit_le_goto): New function.
9995 (emit_gt_goto): New function.
9996 (emit_ge_goto): New function.
9997 (is_goto_target): New function.
9998 (compile_bytecodes): Recognize special cases of compare-goto
9999 combinations and call specialized emitters for them.
10000 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10001 (amd64_emit_ne_goto): New function.
10002 (amd64_emit_lt_goto): New function.
10003 (amd64_emit_le_goto): New function.
10004 (amd64_emit_gt_goto): New function.
10005 (amd64_emit_ge_goto): New function.
10006 (amd64_emit_ops): Add the new functions.
10007 (i386_emit_eq_goto): New function.
10008 (i386_emit_ne_goto): New function.
10009 (i386_emit_lt_goto): New function.
10010 (i386_emit_le_goto): New function.
10011 (i386_emit_gt_goto): New function.
10012 (i386_emit_ge_goto): New function.
10013 (i386_emit_ops): Add the new functions.
10014
10015 2011-09-08 Stan Shebs <stan@codesourcery.com>
10016
10017 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10018 (i386_emit_epilogue): Restore %ebx.
10019
10020 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10021
10022 * server.c (step_thread): Remove definition.
10023 (process_serial_event): Don't handle Hs.
10024 * server.h (step_thread): Remove declaration.
10025 * target.c (set_desired_inferior): Remove use of step_thread.
10026
10027 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10028
10029 * linux-low.c: Include linux-procfs.h.
10030 (linux_attach_lwp_1): Update comments.
10031 (linux_attach): Scan for existing threads when attaching to a
10032 process that is the tgid.
10033 * Makefile.in: Update dependencies.
10034
10035 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10036
10037 * configure.srv: Add linux-procfs.o dependencies.
10038
10039 2011-08-14 Yao Qi <yao@codesourcery.com>
10040
10041 * target.h (struct target_ops): Fix indent.
10042 * win32-low.c (win32_target_ops): Fix comment.
10043
10044 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10045 Yao Qi <yao@codesourcery.com>
10046
10047 * Makefile.in (clean): Remove tic6x-*.c files.
10048 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10049 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10050 (tic6x-c64xp-linux.c): Likewise.
10051 * configure.srv: Add support for tic6x-*-uclinux.
10052 * linux-tic6x-low.c: New.
10053 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10054
10055 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10056 Yao Qi <yao@codesourcery.com>
10057
10058 * target.h (struct target_ops): Add read_loadmap.
10059 * linux-low.c (struct target_loadseg): New type.
10060 (struct target_loadmap): New type.
10061 (linux_read_loadmap): New function.
10062 (linux_target_ops): Add linux_read_loadmap.
10063 * server.c (handle_query): Support qXfer:fdpic:read packet.
10064 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10065 to NULL.
10066
10067 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10068
10069 * win32-low.c: Include <stdint.h>.
10070
10071 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10072
10073 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10074 to the inferior here.
10075 (i386_remove_aligned_watchpoint): Ditto.
10076 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10077 fit part of the watchpoint in the debug registers.
10078 (i386_update_inferior_debug_regs): New.
10079 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10080 registers, and only update the inferior on success.
10081 (i386_low_remove_watchpoint): Ditto.
10082
10083 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10084
10085 * linux-low.c (compare_ints, unique, list_threads, show_process,
10086 linux_core_of_thread): Delete.
10087 (linux_target_ops): Change linux_core_of_thread to
10088 linux_common_core_of_thread.
10089 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10090 * utils.c (malloc_failure): Change type of argument.
10091 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10092 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10093 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10094 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10095 (IPA_OBJS): Add common-utils-ipa.o.
10096 (ptid_h, linux_osdata_h): New macros.
10097 (server_h): Add common/common-utils.h, common/xml-utils.h,
10098 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10099 common/ptid.h.
10100 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10101 ptid.o, buffer.o): New rules.
10102 (linux-low.o): Add common/linux-osdata.h as a dependency.
10103 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10104 * configure.ac: Add AC_HEADER_DIRENT check.
10105 * config.in: Regenerate.
10106 * configure: Regenerate.
10107 * remote-utils.c (xml_escape_text): Delete.
10108 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10109 buffer_xml_printf): Move to common/buffer.c.
10110 * server.c (main): Remove call to initialize_inferiors.
10111 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10112 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10113 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10114 internal_error, gdb_assert, gdb_assert_fail): Delete.
10115 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10116 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10117 common/buffer.h.
10118 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10119 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10120 initialize_inferiors): Delete.
10121
10122 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10123
10124 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10125 symbol error.
10126
10127 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10128
10129 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10130 assertion.
10131 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10132
10133 2011-05-26 Yao Qi <yao@codesourcery.com>
10134
10135 * Makefile.in (thread-db.o): Track dependence to
10136 common/gdb_thread_db.h.
10137 * thread-db.c: include gdb_thread_db.h from right place.
10138
10139 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10140
10141 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10142 __FILE__ and __LINE__ to internal_error.
10143
10144 2011-05-13 Doug Evans <dje@google.com>
10145
10146 * thread-db.c (try_thread_db_load_from_sdir): New function.
10147 (try_thread_db_load_from_dir): New function.
10148 (thread_db_load_search): Handle $sdir, ignore $pdir.
10149 Remove trying of system directories if search of
10150 libthread-db-search-path fails, that is now done via $sdir.
10151
10152 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10153
10154 * server.c (handle_query): Add EnableDisableTracepoints to the list
10155 of supported features.
10156 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10157 tracepoints.
10158 (cmd_qtenable_disable): New.
10159 (cmd_qtstart): Install tracepoints even if disabled.
10160 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10161 receiving a QTEnable or QTDisable packet.
10162 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10163 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10164 tracepoints.
10165 (gdb_probe): Skip data collection if static tracepoint is disabled.
10166
10167 2011-05-10 Doug Evans <dje@google.com>
10168
10169 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10170
10171 2011-05-04 Doug Evans <dje@google.com>
10172
10173 * linux-low.c (linux_join): Skip process lookup.
10174 * spu-low.c (spu_join): Ditto.
10175 * server.c (join_inferiors_callback): Delete.
10176 (process_serial_event): For 'D' packet (detach) call join_inferior
10177 directly.
10178
10179 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10180
10181 * README: Don't mention xscale*-*-linux*.
10182 * configure.srv (xscale*-*-linux*): Don't handle target.
10183
10184 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10185
10186 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10187 casting pointers.
10188 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10189 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10190 (i386_emit_void_call_2): Likewise.
10191
10192 2011-04-26 Yao Qi <yao@codesourcery.com>
10193
10194 * linux-low.c: Move common macros to linux-ptrace.h.
10195 Include linux-ptrace.h.
10196 * Makefile.in (linux_ptrace_h): New.
10197 (linux-low.o): Depends on linux-ptrace.h.
10198
10199 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10200
10201 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10202 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10203 (remote_prepare): New function with most of the TCP code from ...
10204 (remote_open): ... here. Detect PORT here unconditionally. Move also
10205 setting transport_is_reliable.
10206 * server.c (run_once): New variable.
10207 (gdbserver_usage): Document it.
10208 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10209 the first run if RUN_ONCE.
10210 * server.h (run_once, remote_prepare): New declarations.
10211
10212 2011-04-19 Tom Tromey <tromey@redhat.com>
10213
10214 * win32-low.c (handle_load_dll): Remove duplicate "the".
10215
10216 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10217
10218 Remove support for old Cygwin 1.5 versions.
10219 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10220 function to avoid warning.
10221 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10222 warning.
10223
10224 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10225
10226 * gdbserver/server.h (Macro _): Define it if not available.
10227
10228 2011-03-14 Michael Snyder <msnyder@vmware.com>
10229
10230 * hostio.c (handle_close): Remove unnecessary null test.
10231
10232 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10233
10234 * Makefile.in (maintainer-clean realclean distclean): Remove
10235 "make ... subdir_do" command.
10236
10237 2011-03-10 Michael Snyder <msnyder@vmware.com>
10238
10239 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10240
10241 * server.c (handle_v_run): Free alloced buffer on early return.
10242
10243 2011-03-09 Yao Qi <yao@codesourcery.com>
10244
10245 Revert:
10246 2011-03-04 Yao Qi <yao@codesourcery.com>
10247
10248 * Makefile.in: Remove GNU make feature --directory.
10249
10250 2011-03-05 Yao Qi <yao@codesourcery.com>
10251
10252 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10253 (subdir_do): New make target. Copied from gdb/Makefile.
10254 (maintainer-clean, realclean, distclean, clean): Call corresponding
10255 make targets in common/Makefile.
10256
10257 2011-02-11 Yao Qi <yao@codesourcery.com>
10258
10259 * configure.ac: Call AC_PROG_RANLIB.
10260 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10261 * configure: Regenerate.
10262
10263 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10264
10265 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10266
10267 2011-03-06 Yao Qi <yao@codesourcery.com>
10268
10269 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10270
10271 2011-03-05 Yao Qi <yao@codesourcery.com>
10272
10273 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10274 (subdir_do): New make target. Copied from gdb/Makefile.
10275 (maintainer-clean, realclean, distclean, clean): Call corresponding
10276 make targets in common/Makefile.
10277
10278 2011-03-04 Yao Qi <yao@codesourcery.com>
10279
10280 * Makefile.in: Remove GNU make feature --directory.
10281
10282 2011-03-04 Michael Snyder <msnyder@vmware.com>
10283
10284 * server.c (queue_stop_reply): Call xmalloc not malloc.
10285
10286 2011-03-02 Michael Snyder <msnyder@vmware.com>
10287
10288 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10289
10290 2011-02-28 Michael Snyder <msnyder@vmware.com>
10291
10292 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10293 (cmd_qtframe): Ditto.
10294 (cmd_qtbuffer): Ditto.
10295 (cmd_bigqtbuffer): Ditto.
10296
10297 * utils.c (decimal2str): Initialize 'width' to nine, then
10298 don't mess with it.
10299
10300 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10301
10302 * hostio.c (require_data): Free *data, not data.
10303
10304 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10305
10306 * hostio.c (require_data): Use free, not xfree.
10307
10308 2011-02-27 Michael Snyder <msnyder@vmware.com>
10309
10310 * server.c (handle_query): Discard unused value.
10311
10312 * hostio.c (require_data): Free malloc memory before returning
10313 error.
10314
10315 2011-02-26 Michael Snyder <msnyder@vmware.com>
10316
10317 * linux-low.c (list_threads): Call closedir for dirent.
10318
10319 2011-02-27 Michael Snyder <msnyder@vmware.com>
10320
10321 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10322 a case statement falls through.
10323
10324 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10325
10326 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10327 in comparison.
10328
10329 2011-02-26 Michael Snyder <msnyder@vmware.com>
10330
10331 * utils.c (decimal2str): Eliminate dead code and dead param.
10332 (pulongest): Drop dead param from call to decimal2str.
10333 (plongest): Ditto.
10334
10335 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10336
10337 Revert the following patch (not approved yet):
10338 2011-02-21 Hui Zhu <teawater@gmail.com>
10339 * tracepoint.c (tp_printf): New function.
10340 (eval_agent_expr): Handle gdb_agent_op_printf.
10341
10342 2011-02-21 Hui Zhu <teawater@gmail.com>
10343
10344 * tracepoint.c (tp_printf): New function.
10345 (eval_agent_expr): Handle gdb_agent_op_printf.
10346
10347 2011-02-18 Tom Tromey <tromey@redhat.com>
10348
10349 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10350 (tracepoint.o): Likewise.
10351 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10352 (gdb_agent_op_names): Likewise.
10353
10354 2011-02-18 Tom Tromey <tromey@redhat.com>
10355
10356 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10357 gdb_agent_op_rot>: New constants.
10358 (gdb_agent_op_names): Add pick and roll.
10359 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10360 cases.
10361
10362 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10363
10364 * aclocal.m4: Regenerated with aclocal-1.11.1.
10365
10366 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10367
10368 * server.c (handle_qxfer_traceframe_info): New.
10369 (qxfer_packets): Register "traceframe-info".
10370 (handle_query): Report support for qXfer:traceframe-info:read+.
10371 * tracepoint.c (match_blocktype): New.
10372 (traceframe_find_block_type): Rename to ...
10373 (traceframe_walk_blocks): ... this. Add callback filter argument,
10374 and use it.
10375 (traceframe_find_block_type): New, reimplemented on top of
10376 traceframe_walk_blocks.
10377 (build_traceframe_info_xml): New.
10378 (traceframe_read_info): New.
10379 * server.h (traceframe_read_info): Declare.
10380
10381 2011-02-11 Yao Qi <yao@codesourcery.com>
10382
10383 * configure.ac: Call AC_PROG_RANLIB.
10384 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10385 * configure: Regenerate.
10386
10387 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10388
10389 * server.c (gdb_read_memory): Change return semantics to allow
10390 partial transfers.
10391 (handle_search_memory_1): Adjust.
10392 (process_serial_event) <'m' packet>: Handle partial transfers.
10393 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10394
10395 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10396
10397 * regcache.c (init_register_cache): Initialize
10398 regcache->register_status.
10399 (free_register_cache): Release regcache->register_status.
10400 (regcache_cpy): Copy register_status.
10401 (registers_to_string): Print 'x's for unavailable registers.
10402 (supply_register): Mark the register's status valid or
10403 unavailable, depending on whether a buffer was passed in or not.
10404 (supply_register_zeroed): New.
10405 (supply_regblock): Mark the registers' status valid or
10406 unavailable, depending on whether a buffer was passed in or not.
10407 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10408 (struct regcache): New `register_status' field.
10409 (supply_register_zeroed): Declare.
10410 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10411 supply_register_zeroed, rather than passing a NULL buffer to
10412 supply_register.
10413 * tracepoint.c (fetch_traceframe_registers): Update comment.
10414
10415 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10416
10417 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10418 buffer explicit.
10419
10420 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10421
10422 * server.h (decode_xfer_write): Change prototype.
10423 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10424 and don't extract the annex here.
10425 * server.c (decode_xfer_read): Remove `annex' parameter,
10426 and don't extract the annex here.
10427 (decode_xfer): New.
10428 (struct qxfer): New.
10429 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10430 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10431 (handle_qxfer_statictrace): New functions, abstracted out from
10432 handle_query, and made to use the struct qxfer interface.
10433 (handle_threads_qxfer_proper): Rename to ...
10434 (handle_qxfer_threads_proper): ... this.
10435 (handle_threads_qxfer): Rename to ...
10436 (handle_qxfer_threads): ... this. Adjust.
10437 (qxfer_packets): New array.
10438 (handle_qxfer): New function.
10439 (handle_query): Use handle_qxfer.
10440
10441 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10442
10443 * gdbreplay.c: Shorten lines of >= 80 columns.
10444 * linux-low.c: Ditto.
10445 * linux-ppc-low.c: Ditto.
10446 * linux-s390-low.c: Ditto.
10447 * linux-sparc-low.c: Ditto.
10448 * linux-x86-low.c: Ditto.
10449 * linux-xtensa-low.c: Ditto.
10450 * mem-break.c: Ditto.
10451 * nto-low.c: Ditto.
10452 * regcache.h: Ditto.
10453 * remote-utils.c: Ditto.
10454 * server.c: Ditto.
10455 * server.h: Ditto.
10456 * thread-db.c: Ditto.
10457 * tracepoint.c: Ditto.
10458 * utils.c: Ditto.
10459 * win32-low.h: Ditto.
10460
10461 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10462
10463 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10464 update.
10465
10466 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10467
10468 * server.c (gdbserver_version): Update copyright year in version
10469 output.
10470 * gdbreplay.c (gdbreplay_version): Ditto.
10471
10472 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10473
10474 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10475 * linux-bfin-low.c: New file.
10476 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10477 PT_DATA_ADDR for BFIN targets.
10478 * Makefile.in (SFILES): Add linux-bfin-low.c.
10479 (clean): Remove reg-bfin.c.
10480 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10481 * README: Mention supported Blackfin targets.
10482
10483 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10484
10485 * .gitignore: New file.
10486
10487 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10488
10489 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10490
10491 2010-10-22 Jie Zhang <jie@codesourcery.com>
10492
10493 * Makefile.in: Add FLAGS_TO_PASS variable.
10494 (install): Remove dependency of install-only and recursively
10495 invoke make for install-only.
10496
10497 2010-10-04 Doug Evans <dje@google.com>
10498
10499 * Makefile.in (uninstall): Use $(DESTDIR).
10500
10501 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10502
10503 PR gdb/11842
10504
10505 * linux-x86-low.c (compat_siginfo_from_siginfo)
10506 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10507 si_code is < 0. Check for si_code == SI_TIMER before checking for
10508 si_code < 0.
10509
10510 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10511
10512 * lynx-i386-low.c: New file.
10513 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10514
10515 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10516
10517 * lynx-low.c (ptrace_request_to_str): Remove handling for
10518 request values that have been removed in LynxOS 5.x.
10519
10520 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10521
10522 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10523 <ptrace.h>
10524
10525 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10526
10527 * configure.ac: Add --enable-inprocess-agent option.
10528 * configure: Rebuilt.
10529
10530 2010-09-06 Yao Qi <yao@codesourcery.com>
10531
10532 * linux-low.c (linux_kill): Remove unused variable.
10533 (linux_stabilize_threads): Likewise.
10534 * server.c (start_inferior): Likewise.
10535 (queue_stop_reply_callback): Likewise.
10536 * tracepoint.c (do_action_at_tracepoint): Likewise.
10537
10538 2010-09-06 Yao Qi <yao@codesourcery.com>
10539
10540 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10541 on return.
10542
10543 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10544
10545 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10546
10547 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10548
10549 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10550 "$(IPA_DEPFILES)".
10551
10552 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10553
10554 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10555 gdbserver/lynx-ppc-low.c: New files.
10556 * Makefile.in (lynx_low_h): New variable.
10557 (lynx-low.o, lynx-ppc-low.o): New rules.
10558 * configure.ac: On LynxOS, link with -lnetinet.
10559 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10560 * configure: regenerate.
10561
10562 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10563
10564 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10565 * configure.ac: Add check for vasprintf and vsnprintf.
10566 * configure, config.in: Regenerate.
10567 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10568
10569 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10570
10571 * gdbreplay.c: Move include of alloca.h up, next to include of
10572 malloc.h.
10573 * server.h: Add include of malloc.h.
10574 * mem-break.c: Remove include of malloc.h.
10575 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10576
10577 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10578
10579 * Makefile.in (memmem.o): Build with -Wno-error.
10580
10581 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10582
10583 * utils.c (xsnprintf): Make non-static.
10584 * server.h: Add xsnprintf declaration.
10585 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10586 replace calls to snprintf by calls to xsnprintf throughout.
10587
10588 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10589
10590 * configure.ac: Add configure check for alloca.
10591 * configure, config.in: Regenerate.
10592 * server.h: Include alloca.h if it exists.
10593 * gdbreplay.c: Include alloca.h if it exists.
10594
10595 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10596
10597 * linux-low.c (__SIGRTMIN): Define if not already defined.
10598 (linux_create_inferior): Check for __ANDROID__ rather than
10599 __SIGRTMIN.
10600 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10601 are already deferred.
10602 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10603 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10604 stopped and already has a pending signal to report.
10605 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10606 a pending signal to report or is moving out of a jump pad.
10607 (linux_init_signals): Check for __ANDROID__ rather than
10608 __SIGRTMIN.
10609
10610 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10611
10612 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10613 debug_threads check. Avoid a linear search when not doing debug
10614 output.
10615
10616 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10617
10618 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10619 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10620 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10621 (process_event): Change local fd's type to gdb_fildes_t.
10622 (create_file_handler): Adjust prototype.
10623 (delete_file_handler): Adjust prototype.
10624 (handle_file_event): Adjust prototype. Use pfildes.
10625 (create_file_event): Adjsut prototype.
10626 * remote-utils.c (remote_desc, listen_desc): Change type to
10627 gdb_fildes_t.
10628 * server.h: New gdb_fildes_t typedef.
10629 [USE_WIN32API]: Include winsock2.h.
10630 (delete_file_handler, add_file_handler): Adjust prototypes.
10631 (pfildes): Declare.
10632 * utils.c (pfildes): New.
10633
10634 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10635
10636 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10637 * configure: Regenerate.
10638
10639 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10640
10641 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10642 (linux_done_accessing_memory): ... this.
10643 (linux_target_ops): Adjust.
10644 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10645 * nto-low.c (nto_target_ops): Adjust comment.
10646 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10647 * spu-low.c (spu_target_ops): Adjust comment.
10648 * target.h (target_ops): Rename unprepare_to_access_memory field
10649 to done_accessing_memory.
10650 (unprepare_to_access_memory): Rename to ...
10651 (done_accessing_memory): ... this.
10652
10653 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10654
10655 * linux-low.c (linux_prepare_to_access_memory): New.
10656 (linux_unprepare_to_access_memory): New.
10657 (linux_target_ops): Install them.
10658 * server.c (read_memory): Rename to ...
10659 (gdb_read_memory): ... this. Use
10660 prepare_to_access_memory/prepare_to_access_memory.
10661 (write_memory): Rename to ...
10662 (gdb_write_memory): ... this. Use
10663 prepare_to_access_memory/prepare_to_access_memory.
10664 (handle_search_memory_1): Adjust.
10665 (process_serial_event): Adjust.
10666 * target.h (struct target_ops): New fields
10667 prepare_to_access_memory and unprepare_to_access_memory.
10668 (prepare_to_access_memory, unprepare_to_access_memory): New.
10669 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10670 prepare_to_access_memory/prepare_to_access_memory.
10671 * nto-low.c (nto_target_ops): Adjust.
10672 * spu-low.c (spu_target_ops): Adjust.
10673 * win32-low.c (win32_target_ops): Adjust.
10674
10675 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10676
10677 * Makefile.in (WARN_CFLAGS): Get it from configure.
10678 (WERROR_CFLAGS): New.
10679 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10680 * configure.ac: Introduce --enable-werror, which adds -Werror to
10681 the compiler command line. Enabled by default. Disable with
10682 --disable-werror. Add -Wdeclaration-after-statement
10683 Wpointer-arith and -Wformat-nonliteral to warning flags.
10684 * configure: Regenerate.
10685
10686 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10687
10688 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10689
10690 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10691
10692 * gdbreplay.c (remote_error): New.
10693 (gdbchar): New.
10694 (expect): Use gdbchar. Check for error reading from GDB.
10695 Clarify sync error output.
10696 (play): Check for errors writing to GDB.
10697 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10698 * remote-utils.c (getpkt): Check for errors writing to the remote
10699 descriptor.
10700
10701 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10702
10703 * linux-low.c (linux_wait_1): Move non-debugging code out of
10704 `debug_threads' control.
10705
10706 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10707
10708 * linux-low.c (linux_wait_1): Don't set last_status here.
10709 * server.c (push_event, queue_stop_reply_callback): Assert we're
10710 not pushing a TARGET_WAITKIND_IGNORE event.
10711 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10712 (myresume, handle_target_event): Set the thread's last_resume_kind
10713 and last_status from the target returned status.
10714
10715 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10716
10717 PR threads/10729
10718
10719 * linux-x86-low.c (update_debug_registers_callback): New.
10720 (i386_dr_low_set_addr): Use it.
10721 (i386_dr_low_get_addr): New.
10722 (i386_dr_low_set_control): Use update_debug_registers_callback.
10723 (i386_dr_low_get_control): New.
10724 (i386_dr_low_get_status): Adjust.
10725 * linux-low.c (linux_stop_lwp): New.
10726 * linux-low.h (linux_stop_lwp): Declare.
10727
10728 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10729 argument instead of a i386_debug_reg_state.
10730 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10731 a i386_debug_reg_state.
10732 (i386_insert_aligned_watchpoint): Adjust.
10733 (i386_remove_aligned_watchpoint): Adjust.
10734 (i386_low_stopped_data_address): Read the debug registers from the
10735 inferior instead of from the mirrors.
10736 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10737 (i386_dr_low_get_addr): Declare.
10738 (i386_dr_low_get_control): Declare.
10739 (i386_dr_low_get_status): Change prototype.
10740
10741 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10742 (i386_dr_low_get_addr): New.
10743 (i386_dr_low_get_control): New.
10744 (i386_dr_low_get_status): Adjust prototype. Return
10745 dr_status_mirror.
10746 (i386_initial_stuff): Clear dr_status_mirror and
10747 dr_control_mirror.
10748 (i386_get_thread_context): Adjust.
10749 (i386_set_thread_context): Adjust.
10750 (i386_thread_added): Adjust.
10751
10752 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10753
10754 * linux-low.h (linux_thread_area): Delete declaration.
10755
10756 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10757
10758 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10759 after its termination.
10760
10761 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10762
10763 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10764 (gdb_wants_all_stopped): Delete.
10765 (linux_wait_1): Don't call them.
10766 * server.c (handle_v_cont): Tag all threads as want-stopped.
10767 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10768 stopped as "client-wants-stopped".
10769
10770 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10771
10772 * Makefile.in (signals_h): New.
10773 (server_h): Depend on it.
10774 (server.o): Don't depend on $(signals_def).
10775 (signals.o): Depend on $(signals_def).
10776
10777 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10778
10779 * Makefile.in (signals_def): New.
10780 (server_h): Append include/gdb/signals.h and signals_def.
10781 (server.o): Append signals_def.
10782
10783 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10784
10785 * server.c (handle_target_event): Use target_signal_to_host for
10786 resume_info.sig initialization.
10787 * target.h (struct thread_resume) <sig>: New comment.
10788
10789 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10790
10791 * server.c (handle_query): strcpy() the returned string from paddress()
10792 instead of sprintf().
10793 * utils.c (paddress): Return phex_nz().
10794
10795 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10796
10797 * server.c (handle_v_cont): Call mourn_inferior if process
10798 just exited.
10799 (myresume): Likewise.
10800
10801 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10802
10803 Static tracepoints, and integration with UST.
10804
10805 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10806 * mem-break.c (uninsert_all_breakpoints)
10807 (reinsert_all_breakpoints): New.
10808 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10809 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10810 (gdb_agent_ust_loaded, helper_thread_id)
10811 (gdb_agent_helper_thread_id): New macros.
10812 (struct ipa_sym_addresses): Add addr_ust_loaded,
10813 addr_helper_thread_id, addr_cmd_buf.
10814 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10815 (in_process_agent_loaded_ust): New.
10816 (write_e_ust_not_loaded): New.
10817 (maybe_write_ipa_ust_not_loaded): New.
10818 (struct collect_static_trace_data_action): New.
10819 (enum tracepoint_type) <static_tracepoint>: New.
10820 (struct tracepoint) <handle>: Mention static tracepoints.
10821 (struct static_tracepoint_ctx): New.
10822 (CMD_BUF_SIZE): New.
10823 (add_tracepoint_action): Handle static tracepoint actions.
10824 (unprobe_marker_at): New.
10825 (clear_installed_tracepoints): Handle static tracepoints.
10826 (cmd_qtdp): Handle static tracepoints.
10827 (probe_marker_at): New.
10828 (cmd_qtstart): Handle static tracepoints.
10829 (response_tracepoint): Handle static tracepoints.
10830 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10831 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10832 (get_context_regcache): Handle static tracepoints.
10833 (do_action_at_tracepoint): Handle static tracepoint actions.
10834 (traceframe_find_block_type): Handle static trace data blocks.
10835 (traceframe_read_sdata): New.
10836 (download_tracepoints): Download static tracepoint actions.
10837 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10838 (GDB_PROBE_NAME): New.
10839 (ust_ops): New.
10840 (GET_UST_SYM): New.
10841 (USTF): New.
10842 (dlsym_ust): New.
10843 (ust_marker_to_static_tracepoint): New.
10844 (gdb_probe): New.
10845 (collect_ust_data_at_tracepoint): New.
10846 (gdb_ust_probe): New.
10847 (UNIX_PATH_MAX, SOCK_DIR): New.
10848 (gdb_ust_connect_sync_socket): New.
10849 (resume_thread, stop_thread): New.
10850 (run_inferior_command): New.
10851 (init_named_socket): New.
10852 (gdb_ust_socket_init): New.
10853 (cstr_to_hexstr): New.
10854 (next_st): New.
10855 (first_marker, next_marker): New.
10856 (response_ust_marker): New.
10857 (cmd_qtfstm, cmd_qtsstm): New.
10858 (unprobe_marker_at, probe_marker_at): New.
10859 (cmd_qtstmat, gdb_ust_thread): New.
10860 (gdb_ust_init): New.
10861 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10862 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10863 (ST_REGENTRY): New.
10864 (x86_64_st_collect_regmap): New.
10865 (X86_64_NUM_ST_COLLECT_GREGS): New.
10866 (AMD64_RIP_REGNUM): New.
10867 (supply_static_tracepoint_registers): New.
10868 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10869 (ST_REGENTRY): New.
10870 (i386_st_collect_regmap): New.
10871 (i386_NUM_ST_COLLECT_GREGS): New.
10872 (supply_static_tracepoint_registers): New.
10873 * server.c (handle_query): Handle qXfer:statictrace:read.
10874 <qSupported>: Report support for StaticTracepoints, and
10875 qXfer:statictrace:read features.
10876 * server.h (traceframe_read_sdata)
10877 (supply_static_tracepoint_registers): Declare.
10878 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10879 (unpack_varlen_hex): Include in IPA build.
10880 * Makefile.in (ustlibs, ustinc): New.
10881 (IPA_OBJS): Add remote-utils-ipa.o.
10882 ($(IPA_LIB)): Link -ldl and -lpthread.
10883 (UST_CFLAGS): New.
10884 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10885 * config.in, configure: Regenerate.
10886
10887 2010-06-20 Ian Lance Taylor <iant@google.com>
10888 Pedro Alves <pedro@codesourcery.com>
10889
10890 * linux-x86-low.c (always_true): Delete.
10891 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10892 trying to fool the compiler with always_true.
10893
10894 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10895
10896 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10897 conditions in gdbserver.
10898
10899 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10900
10901 * spu-low.c (spu_read_memory): Wrap around local store limit.
10902 (spu_write_memory): Likewise.
10903
10904 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10905
10906 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10907 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10908 LONGEST uses.
10909 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10910 uses.
10911 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10912 uses with LONGEST uses.
10913
10914 2010-06-14 Stan Shebs <stan@codesourcery.com>
10915 Pedro Alves <pedro@codesourcery.com>
10916
10917 Bytecode compiler.
10918
10919 * linux-x86-low.c: Include limits.h.
10920 (add_insns): New.
10921 (always_true): New.
10922 (EMIT_ASM): New.
10923 (EMIT_ASM32): New.
10924 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10925 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10926 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10927 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10928 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10929 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10930 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10931 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10932 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10933 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10934 (amd64_emit_void_call_2): New.
10935 (amd64_emit_ops): New.
10936 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10937 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10938 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10939 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10940 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10941 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10942 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10943 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10944 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10945 (i386_emit_stack_adjust, i386_emit_int_call_1)
10946 (i386_emit_void_call_2): New.
10947 (i386_emit_ops): New.
10948 (x86_emit_ops): New.
10949 (the_low_target): Install x86_emit_ops.
10950 * server.h (struct emit_ops): New.
10951 (get_raw_reg_func_addr): Declare.
10952 (current_insn_ptr, emit_error): Declare.
10953 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10954 (set_trace_state_variable_value): New defines.
10955 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10956 addr_get_trace_state_variable_value and
10957 addr_set_trace_state_variable_value.
10958 (symbol_list): New fields for get_raw_reg,
10959 get_trace_state_variable_value and set_trace_state_variable_value.
10960 (condfn): New typedef.
10961 (struct tracepoint): New field `compiled_cond'.
10962 (do_action_at_tracepoint): Clear compiled_cond.
10963 (get_trace_state_variable_value, set_trace_state_variable_value):
10964 Export in the IPA.
10965 (condition_true_at_tracepoint): If there's a compiled condition,
10966 run that.
10967 (current_insn_ptr, emit_error): New globals.
10968 (struct bytecode_address): New.
10969 (get_raw_reg_func_addr): New.
10970 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10971 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10972 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10973 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10974 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10975 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10976 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10977 (compile_tracepoint_condition, compile_bytecodes): New.
10978 * target.h (emit_ops): Forward declare.
10979 (struct target_ops): New field emit_ops.
10980 (target_emit_ops): New.
10981 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10982 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10983 * linux-low.c (linux_emit_ops): New.
10984 (linux_target_ops): Install it.
10985 * linux-low.h (struct linux_target_ops): New field emit_ops.
10986
10987 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10988
10989 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10990 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10991
10992 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10993 Stan Shebs <stan@codesourcery.com>
10994
10995 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10996 (all): Depend on $(extra_libraries).
10997 (install-only): Install the IPA.
10998 (IPA_OBJS, IPA_LIB): New.
10999 (clean): Remove the IPA lib.
11000 (IPAGENT_CFLAGS): New.
11001 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11002 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11003 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11004 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11005 * configure.ac: Check for atomic builtins support in the compiler.
11006 (IPA_DEPFILES, extra_libraries): Define.
11007 * configure.srv (ipa_obj): Add description.
11008 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11009 (i[34567]86-*-linux*): Set ipa_obj.
11010 (x86_64-*-linux*): Set ipa_obj.
11011 * linux-low.c (stabilizing_threads): New.
11012 (supports_fast_tracepoints): New.
11013 (linux_detach): Stabilize threads before detaching.
11014 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11015 the lwp is either not stabilizing, or is moving out of a jump pad.
11016 (linux_fast_tracepoint_collecting): New.
11017 (maybe_move_out_of_jump_pad): New.
11018 (enqueue_one_deferred_signal): New.
11019 (dequeue_one_deferred_signal): New.
11020 (linux_wait_for_event_1): If moving out of a jump pad, defer
11021 pending signals to later.
11022 (linux_stabilize_threads): New.
11023 (linux_wait_1): Check if threads need moving out of jump pads, and
11024 do it if so.
11025 (stuck_in_jump_pad_callback): New.
11026 (move_out_of_jump_pad_callback): New.
11027 (lwp_running): New.
11028 (linux_resume_one_lwp): Handle moving out of jump pads.
11029 (linux_set_resume_request): Dequeue deferred signals.
11030 (need_step_over_p): Also step over fast tracepoint jumps.
11031 (start_step_over): Also uninsert fast tracepoint jumps.
11032 (finish_step_over): Also reinsert fast tracepoint jumps.
11033 (linux_install_fast_tracepoint_jump): New.
11034 (linux_target_ops): Install linux_stabilize_threads and
11035 linux_install_fast_tracepoint_jump_pad.
11036 * linux-low.h (linux_target_ops) <get_thread_area,
11037 install_fast_tracepoint_jump_pad>: New fields.
11038 (struct lwp_info) <collecting_fast_tracepoint,
11039 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11040 (linux_get_thread_area): Declare.
11041 * linux-x86-low.c (jump_insn): New.
11042 (x86_get_thread_area): New.
11043 (append_insns): New.
11044 (push_opcode): New.
11045 (amd64_install_fast_tracepoint_jump_pad): New.
11046 (i386_install_fast_tracepoint_jump_pad): New.
11047 (x86_install_fast_tracepoint_jump_pad): New.
11048 (the_low_target): Install x86_get_thread_area and
11049 x86_install_fast_tracepoint_jump_pad.
11050 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11051 (struct fast_tracepoint_jump): New.
11052 (fast_tracepoint_jump_insn): New.
11053 (fast_tracepoint_jump_shadow): New.
11054 (find_fast_tracepoint_jump_at): New.
11055 (fast_tracepoint_jump_here): New.
11056 (delete_fast_tracepoint_jump): New.
11057 (set_fast_tracepoint_jump): New.
11058 (uninsert_fast_tracepoint_jumps_at): New.
11059 (reinsert_fast_tracepoint_jumps_at): New.
11060 (set_breakpoint_at): Use write_inferior_memory.
11061 (uninsert_raw_breakpoint): Use write_inferior_memory.
11062 (check_mem_read): Mask out fast tracepoint jumps.
11063 (check_mem_write): Mask out fast tracepoint jumps.
11064 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11065 (set_fast_tracepoint_jump): Declare.
11066 (delete_fast_tracepoint_jump)
11067 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11068 (reinsert_fast_tracepoint_jumps_at): Declare.
11069 * regcache.c: Don't compile many functions when building the
11070 in-process agent library.
11071 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11072 the register buffer in the heap.
11073 (free_register_cache): If the register buffer isn't owned by the
11074 regcache, don't free it.
11075 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11076 pre-existing register caches.
11077 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11078 type.
11079 (convert_ascii_to_int): : Constify `from' parameter type.
11080 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11081 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11082 the needed buffer in-place.
11083 (relocate_instruction): New.
11084 * server.c (handle_query) <qSymbols>: If the target supports
11085 tracepoints, give it a chance of looking up symbols. Report
11086 support for fast tracepoints.
11087 (handle_status): Stabilize threads.
11088 (process_serial_event): Adjust.
11089 * server.h (struct fast_tracepoint_jump): Forward declare.
11090 (struct process_info) <fast_tracepoint_jumps>: New field.
11091 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11092 (decode_X_packet, decode_M_packet): Adjust.
11093 (relocate_instruction): Declare.
11094 (in_process_agent_loaded): Declare.
11095 (tracepoint_look_up_symbols): Declare.
11096 (struct fast_tpoint_collect_status): Declare.
11097 (fast_tracepoint_collecting): Declare.
11098 (force_unlock_trace_buffer): Declare.
11099 (handle_tracepoint_bkpts): Declare.
11100 (initialize_low_tracepoint)
11101 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11102 * target.h (struct target_ops) <stabilize_threads,
11103 install_fast_tracepoint_jump_pad>: New fields.
11104 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11105 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11106 [HAVE_STDINT_H]: Include stdint.h.
11107 (trace_debug_1): Rename to ...
11108 (trace_vdebug): ... this.
11109 (trace_debug): Rename to ...
11110 (trace_debug_1): ... this. Add `level' parameter.
11111 (trace_debug): New.
11112 (ATTR_USED, ATTR_NOINLINE): New.
11113 (IP_AGENT_EXPORT): New.
11114 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11115 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11116 (about_to_request_buffer_space, trace_buffer_is_full)
11117 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11118 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11119 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11120 (traceframe_write_count, traceframes_created)
11121 (trace_state_variables)
11122 New renaming defines.
11123 (struct ipa_sym_addresses): New.
11124 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11125 (symbol_list): New.
11126 (ipa_sym_addrs): New.
11127 (all_tracepoint_symbols_looked_up): New.
11128 (in_process_agent_loaded): New.
11129 (write_e_ipa_not_loaded): New.
11130 (maybe_write_ipa_not_loaded): New.
11131 (tracepoint_look_up_symbols): New.
11132 (debug_threads) [IN_PROCESS_AGENT]: New.
11133 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11134 (UNKNOWN_SIDE_EFFECTS): New.
11135 (stop_tracing): New.
11136 (flush_trace_buffer): New.
11137 (stop_tracing_bkpt): New.
11138 (flush_trace_buffer_bkpt): New.
11139 (read_inferior_integer): New.
11140 (read_inferior_uinteger): New.
11141 (read_inferior_data_pointer): New.
11142 (write_inferior_data_pointer): New.
11143 (write_inferior_integer): New.
11144 (write_inferior_uinteger): New.
11145 (struct collect_static_trace_data_action): Delete.
11146 (enum tracepoint_type): New.
11147 (struct tracepoint) <type>: New field `type'.
11148 <actions_str, step_actions, step_actions_str>: Only include in
11149 GDBserver.
11150 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11151 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11152 (tracepoints): Use IP_AGENT_EXPORT.
11153 (last_tracepoint): Don't include in the IPA.
11154 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11155 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11156 (alloced_trace_state_variables): New.
11157 (trace_state_variables): Use IP_AGENT_EXPORT.
11158 (traceframe_t): Delete unused variable.
11159 (circular_trace_buffer): Don't include in the IPA.
11160 (trace_buffer_start): Delete.
11161 (struct trace_buffer_control): New.
11162 (trace_buffer_free): Delete.
11163 (struct ipa_trace_buffer_control): New.
11164 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11165 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11166 New.
11167 (trace_buffer_ctrl): New.
11168 (TRACE_BUFFER_CTRL_CURR): New.
11169 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11170 Reimplement as macros.
11171 (trace_buffer_wrap): Delete.
11172 (traceframe_write_count, traceframe_read_count)
11173 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11174 (struct tracepoint_hit_ctx) <type>: New field.
11175 (struct fast_tracepoint_ctx): New.
11176 (memory_barrier): New.
11177 (cmpxchg): New.
11178 (record_tracepoint_error): Update atomically in the IPA.
11179 (clear_inferior_trace_buffer): New.
11180 (about_to_request_buffer_space): New.
11181 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11182 updating the same buffer.
11183 (add_tracepoint): Default the tracepoint's type to trap
11184 tracepoint, and orig_size to -1.
11185 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11186 internal variables.
11187 (create_trace_state_variable): New parameter `gdb'. Handle it.
11188 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11189 (cmd_qtdp): Handle fast tracepoints.
11190 (cmd_qtdv): Adjust.
11191 (max_jump_pad_size): New.
11192 (gdb_jump_pad_head): New.
11193 (get_jump_space_head): New.
11194 (claim_jump_space): New.
11195 (sort_tracepoints): New.
11196 (MAX_JUMP_SIZE): New.
11197 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11198 IPA.
11199 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11200 support. Upload fast traceframes, and delete internal IPA
11201 breakpoints.
11202 (stop_tracing_handler): New.
11203 (flush_trace_buffer_handler): New.
11204 (cmd_qtstop): Upload fast tracepoints.
11205 (response_tracepoint): Handle fast tracepoints.
11206 (tracepoint_finished_step): Upload fast traceframes. Set the
11207 tracepoint hit context's tracepoint type.
11208 (handle_tracepoint_bkpts): New.
11209 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11210 type. Add comment about fast tracepoints.
11211 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11212 non-existing action_str field.
11213 (get_context_regcache): Handle fast tracepoints.
11214 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11215 to the regcache.
11216 (fast_tracepoint_from_jump_pad_address): New.
11217 (fast_tracepoint_from_ipa_tpoint_address): New.
11218 (collecting_t): New.
11219 (force_unlock_trace_buffer): New.
11220 (fast_tracepoint_collecting): New.
11221 (collecting): New.
11222 (gdb_collect): New.
11223 (write_inferior_data_ptr): New.
11224 (target_tp_heap): New.
11225 (target_malloc): New.
11226 (download_agent_expr): New.
11227 (UALIGN): New.
11228 (download_tracepoints): New.
11229 (download_trace_state_variables): New.
11230 (upload_fast_traceframes): New.
11231 (IPA_FIRST_TRACEFRAME): New.
11232 (IPA_NEXT_TRACEFRAME_1): New.
11233 (IPA_NEXT_TRACEFRAME): New.
11234 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11235 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11236 (gdb_jump_pad_buffer_end): New.
11237 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11238 (initialize_tracepoint): Adjust.
11239 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11240 buffer. Initialize the low module.
11241 * utils.c (PREFIX, TOOLNAME): New.
11242 (malloc_failure): Use PREFIX.
11243 (error): In the IPA, an error causes an exit.
11244 (fatal, warning): Use PREFIX.
11245 (internal_error): Use TOOLNAME.
11246 (NUMCELLS): Increase to 10.
11247 * configure, config.in: Regenerate.
11248
11249 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11250
11251 * server.c (handle_query) <qSupported>: Do two passes over the
11252 qSupported string to avoid nesting strtok.
11253
11254 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11255
11256 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11257 (CDEPS): New.
11258 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11259 -Wl,--dynamic-list.
11260 * configure: Regenerate.
11261 * proc-service.list: New.
11262
11263 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11264
11265 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11266 New comment.
11267
11268 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11269
11270 * gdbreplay.c (remote_open): Check error return from socket() call by
11271 its equality to -1 not by it being negative.
11272 * remote-utils.c (remote_open): Likewise.
11273
11274 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11275
11276 * config.h: Regenerate.
11277
11278 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11279
11280 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11281 doesn't provide PTRACE_GET_THREAD_AREA.
11282
11283 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11284
11285 * linux-m68k-low.c: Include <asm/ptrace.h>
11286 (ps_get_thread_area): Implement.
11287
11288 2010-05-03 Doug Evans <dje@google.com>
11289
11290 * event-loop.c (struct callback_event): New struct.
11291 (callback_list): New global.
11292 (append_callback_event, delete_callback_event): New functions.
11293 (process_callback): New function.
11294 (start_event_loop): Call it.
11295 * remote-utils.c (NOT_SCHEDULED): Define.
11296 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11297 moved out of readchar.
11298 (readchar): Rewrite. Call reschedule before returning.
11299 (reset_readchar): New function.
11300 (remote_close): Call it.
11301 (process_remaining, reschedule): New functions.
11302 * server.h (callback_handler_func): New typedef.
11303 (append_callback_event, delete_callback_event): Declare.
11304
11305 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11306
11307 * proc-service.c (ps_pglobal_lookup): Use
11308 thread_db_look_up_one_symbol.
11309 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11310 parameter. Use it instead of all_symbols_looked_up.
11311 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11312 field.
11313 (all_symbols_looked_up): Don't declare.
11314 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11315 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11316 field.
11317 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11318 Set all_symbols_looked_up here.
11319 (thread_db_look_up_one_symbol): New.
11320 (thread_db_get_tls_address): Adjust.
11321 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11322 thread_db object on the heap, and tentatively set it in the
11323 process structure.
11324 (thread_db_init): Don't set all_symbols_looked_up here.
11325 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11326
11327 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11328
11329 * linux-low.c (linux_kill, linux_detach): Adjust.
11330 (status_pending_p_callback): Remove redundant statement. Check
11331 for !TARGET_WAITIKIND_IGNORE, instead of
11332 TARGET_WAITKIND_STOPPED.
11333 (handle_tracepoints): Make sure LWP is locked. Adjust.
11334 (linux_wait_for_event_1): Adjust.
11335 (linux_cancel_breakpoints): New.
11336 (unsuspend_one_lwp): New.
11337 (unsuspend_all_lwps): New.
11338 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11339 (send_sigstop_callback): Change return type to int, add new
11340 `except' parameter and handle it.
11341 (suspend_and_send_sigstop_callback): New.
11342 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11343 pass them down. If SUSPEND, also increment the lwp's suspend
11344 count.
11345 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11346 (need_step_over_p): Don't consider suspended LWPs.
11347 (start_step_over): Adjust.
11348 (proceed_one_lwp): Change return type to int, add new `except'
11349 parameter and handle it.
11350 (unsuspend_and_proceed_one_lwp): New.
11351 (proceed_all_lwps): Use find_inferior instead of
11352 for_each_inferior.
11353 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11354 also decrement the suspend count of LWPs. Pass `except' down,
11355 instead of hacking its suspend count.
11356 (linux_pause_all): Add `freeze' parameter. Adjust.
11357 (linux_unpause_all): New.
11358 (linux_target_ops): Install linux_unpause_all.
11359 * server.c (handle_status): Adjust.
11360 * target.h (struct target_ops): New fields `unpause_all' and
11361 `cancel_breakpoints'. Add new parameter to `pause_all'.
11362 (pause_all): Add new `freeze' parameter.
11363 (unpause_all): New.
11364 (cancel_breakpoints): New.
11365 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11366 cancel breakpoints.
11367 (cmd_qtstart): Pause threads.
11368 (stop_tracing): Pause threads, and cancel breakpoints.
11369 * win32-low.c (win32_target_ops): Adjust.
11370
11371 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11372
11373 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11374 the inferior right away from here...
11375 (linux_wait_1): ... to here, and adjust to check the thread's
11376 last_resume_kind instead of the lwp's step or stop_expected flags.
11377
11378 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11379
11380 * README: Use consistent `GDB' and `GDBserver' spellings.
11381
11382 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11383
11384 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11385 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11386 (linux_detach_one_lwp): Assume the lwp is stopped.
11387 (any_thread_of): Delete.
11388 (linux_detach): Stop all lwps here. Don't blindly delete all
11389 breakpoints.
11390 (delete_lwp_callback): New.
11391 (linux_mourn): Delete all lwps of the process that is gone.
11392 (linux_wait_1): Don't delete the last lwp of the process here.
11393 * mem-break.h (mark_breakpoints_out): Declare.
11394 * mem-break.c (mark_breakpoints_out): New.
11395 (free_all_breakpoints): Use it.
11396 * server.c (handle_target_event): If the process is gone, mark
11397 breakpoints out.
11398 * thread-db.c (struct thread_db) <create_bp>: New field.
11399 (thread_db_enable_reporting): Fix prototype. Store a thread event
11400 breakpoint reference in the thread_db struct.
11401 (thread_db_load_search): Clear the thread_db object.
11402 (try_thread_db_load_1): Ditto.
11403 (switch_to_process): New.
11404 (disable_thread_event_reporting): Use it.
11405 (remove_thread_event_breakpoints): New.
11406 (thread_db_detach, thread_db_mourn): Use it.
11407
11408 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11409
11410 * linux-low.c (linux_enable_event_reporting): New.
11411 (linux_wait_for_event_1, handle_extended_wait): Use it.
11412
11413 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11414
11415 * linux-low.c (linux_kill_one_lwp, linux_kill)
11416 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11417 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11418 SIGSTOP even if the LWP is stopped.
11419 (send_sigstop_callback): New.
11420 (stop_all_lwps): Use send_sigstop_callback instead.
11421 (linux_resume_one_thread): Adjust.
11422 (proceed_one_lwp): Still proceed an LWP that the client has
11423 requested to stop, if we haven't reported it as stopped yet. Make
11424 sure that LWPs the client want stopped, have a pending SIGSTOP.
11425
11426 2010-04-26 Doug Evans <dje@google.com>
11427
11428 * server.c (handle_general_set): Make static.
11429
11430 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11431 Print received char after testing for error/eof instead of before.
11432 (input_interrupt): Tweak comment.
11433
11434 2010-04-23 Doug Evans <dje@google.com>
11435
11436 * server.c (start_inferior): Print inferior argv if --debug.
11437
11438 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11439
11440 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11441 * nto-x86-low.c: Include server.h
11442
11443 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11444
11445 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11446 be consistent with other sources of this directory.
11447 (init_registers_amd64): Correct name of source file of this function
11448 in the comment.
11449
11450 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11451
11452 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11453 64-bit executables.
11454
11455 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11456
11457 * win32-i386-low.c: Add 64-bit support.
11458 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11459 (init_registers_amd64): Declare.
11460 (mappings): Add 64-bit version of array.
11461 (init_windows_x86): New function.
11462 (the_low_target): Change init_arch field to init_windows_x86.
11463
11464 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11465
11466 * win32-low.c: Adapt to support also 64-bit architecture.
11467 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11468 (get_image_name): Use SIZE_T type for local variable `done'.
11469 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11470 (toolhelp_get_dll_name): Idem.
11471 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11472 Use uintptr_t typecast to avoid warning.
11473 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11474 (handle_exception): Use phex_nz to avoid warning.
11475 (win32_wait): Remove unused local variable `process'.
11476
11477 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11478
11479 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11480 `amd64-avx.o'.
11481
11482 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11483
11484 * configure.ac: Use `ws2_32' library for srv_mingw.
11485 * configure: Regenerate.
11486 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11487 * remote-utils.c: Likewise.
11488
11489 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11490
11491 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11492 if __x86_64__ is defined.
11493
11494 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11495
11496 * configure: Regenerate.
11497
11498 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11499
11500 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11501 * target.h (target_ops): New get_tib_address field.
11502 * win32-low.h (win32_thread_info): Add thread_local_base field.
11503 * win32-low.c (child_add_thread): Add tlb argument.
11504 Set thread_local_base field to TLB.
11505 (get_child_debug_event): Adapt to child_add_thread change.
11506 (win32_get_tib_address): New function.
11507 (win32_target_ops): Set get_tib_address field to
11508 win32_get_tib_address.
11509 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11510
11511 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11512
11513 * linux-low.c (linux_mourn): Also remove the process.
11514 * server.c (handle_target_event): Don't remove the process here.
11515 * nto-low.c (nto_mourn): New.
11516 (nto_target_ops): Install it.
11517 * spu-low.c (spu_mourn): New.
11518 (spu_target_ops): Install it.
11519 * win32-low.c (win32_mourn): New.
11520 (win32_target_ops): Install it.
11521
11522 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11523
11524 * server.h (buffer_xml_printf): Remove redundant `;'.
11525
11526 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11527
11528 * regcache.c (set_register_cache): Invalidate regcaches before
11529 changing the register cache layout.
11530 (regcache_invalidate_one): Allow a NULL regcache.
11531 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11532 regcaches before changing the register cache layout or the target
11533 regsets.
11534
11535 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11536
11537 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11538 variable warning on Linux/x86-64.
11539
11540 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11541
11542 GDBserver disconnected tracing support.
11543
11544 * linux-low.c (linux_remove_process): Delete.
11545 (add_lwp): Don't set last_resume_kind here.
11546 (linux_kill): Use `mourn'.
11547 (linux_detach): Use `thread_db_detach', and `mourn'.
11548 (linux_mourn): New.
11549 (linux_attach_lwp_1): Adjust comment.
11550 (linux_attach): last_resume_kind moved the thread_info; adjust.
11551 (status_pending_p_callback): Adjust.
11552 (linux_wait_for_event_1): Adjust.
11553 (count_events_callback, select_singlestep_lwp_callback)
11554 (select_event_lwp_callback, cancel_breakpoints_callback)
11555 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11556 (proceed_one_lwp): Adjust.
11557 (linux_async): Add debug output.
11558 (linux_thread_stopped): New.
11559 (linux_pause_all): New.
11560 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11561 linux_pause_all.
11562 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11563 (thread_db_free): Delete declaration.
11564 (thread_db_detach, thread_db_mourn): Declare.
11565 * thread-db.c (thread_db_init): Use thread_db_mourn.
11566 (thread_db_free): Delete, split in two.
11567 (disable_thread_event_reporting): New.
11568 (thread_db_detach): New.
11569 (thread_db_mourn): New.
11570
11571 * server.h (struct thread_info) <last_resume_kind>: New field.
11572 <attached>: Add comment.
11573 <gdb_detached>: New field.
11574 (handler_func): Change return type to int.
11575 (handle_serial_event, handle_target_event): Ditto.
11576 (gdb_connected): Declare.
11577 (tracing): Delete.
11578 (disconnected_tracing): Declare.
11579 (stop_tracing): Declare.
11580
11581 * server.c (handle_query) <qSupported>: Report support for
11582 disconnected tracing.
11583 (queue_stop_reply_callback): Account for running threads.
11584 (gdb_wants_thread_stopped): New.
11585 (gdb_wants_all_threads_stopped): New.
11586 (gdb_reattached_process): New.
11587 (handle_status): Clear the `gdb_detached' flag of all processes.
11588 In all-stop, stop all threads.
11589 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11590 (process_serial_event): If the remote connection breaks, or if an
11591 exit was forced with "monitor exit", force an event loop exit.
11592 Handle disconnected tracing on detach.
11593 (handle_serial_event): Adjust.
11594 (handle_target_event): If GDB isn't connected, forward events back
11595 to the inferior, unless the last process exited, in which case,
11596 exit gdbserver. Adjust interface.
11597
11598 * remote-utils.c (remote_open): Don't block in accept. Instead
11599 register an event loop source on the listen socket file
11600 descriptor. Refactor bits into ...
11601 (listen_desc): ... this new global.
11602 (gdb_connected): ... this new function.
11603 (enable_async_notification): ... this new function.
11604 (handle_accept_event): ... this new function.
11605 (remote_close): Clear remote_desc.
11606
11607 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11608
11609 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11610 New fields.
11611 (mourn_inferior): Define.
11612 (target_process_qsupported): Avoid the dangling else problem.
11613 (thread_stopped): Define.
11614 (pause_all): Define.
11615 (target_waitstatus_to_string): Declare.
11616 * target.c (target_waitstatus_to_string): New.
11617
11618 * tracepoint.c (tracing): Make extern.
11619 (disconnected_tracing): New.
11620 (stop_tracing): Make extern. Handle tracing stops due to GDB
11621 disconnecting.
11622 (cmd_qtdisconnected): New.
11623 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11624 (handle_tracepoint_general_set): Handle QTDisconnected.
11625
11626 * event-loop.c (event_handler_func): Change return type to int.
11627 (process_event): Bail out if the event handler wants the event
11628 loop to stop.
11629 (handle_file_event): Ditto.
11630 (start_event_loop): Bail out if the event handler wants the event
11631 loop to stop.
11632
11633 * nto-low.c (nto_target_ops): Adjust.
11634 * spu-low.c (spu_wait): Don't remove the process here.
11635 (spu_target_ops): Adjust.
11636 * win32-low.c (win32_wait): Don't remove the process here.
11637 (win32_target_ops): Adjust.
11638
11639 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11640
11641 * regcache.c (realloc_register_cache): Invalidate inferior's
11642 regcache before recreating it.
11643
11644 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11645
11646 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11647
11648 2010-04-09 Stan Shebs <stan@codesourcery.com>
11649 Pedro Alves <pedro@codesourcery.com>
11650
11651 * server.h (LONGEST): New.
11652 (struct thread_info) <while_stepping>: New field.
11653 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11654 Declare.
11655 (initialize_tracepoint, handle_tracepoint_general_set)
11656 (handle_tracepoint_query, tracepoint_finished_step)
11657 (tracepoint_was_hit, release_while_stepping_state_list):
11658 (current_traceframe): Declare.
11659 * server.c (handle_general_set): Handle tracepoint packets.
11660 (read_memory): New.
11661 (write_memory): New.
11662 (handle_search_memory_1): Use read_memory.
11663 (handle_query): Report support for conditional tracepoints, trace
11664 state variables, and tracepoint sources. Handle tracepoint
11665 queries.
11666 (main): Initialize the tracepoints module.
11667 (process_serial_event): Handle traceframe reads/writes.
11668
11669 * linux-low.c (handle_tracepoints): New.
11670 (linux_wait_1): Call it.
11671 (linux_resume_one_lwp): Handle while-stepping.
11672 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11673 (linux_target_ops): Install them.
11674 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11675 New field.
11676 * linux-x86-low.c (x86_supports_tracepoints): New.
11677 (the_low_target). Install it.
11678
11679 * mem-break.h (delete_breakpoint): Declare.
11680 * mem-break.c (delete_breakpoint): Make external.
11681
11682 * target.h (struct target_ops): Add `supports_tracepoints',
11683 `read_pc', and `write_pc' fields.
11684 (target_supports_tracepoints): Define.
11685 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11686 (phex_nz): New.
11687
11688 * regcache.h (struct regcache) <registers_owned>: New field.
11689 (init_register_cache, regcache_cpy): Declare.
11690 (regcache_read_pc, regcache_write_pc): Declare.
11691 (register_cache_size): Declare.
11692 (supply_regblock): Declare.
11693 * regcache.c (init_register_cache): New.
11694 (new_register_cache): Use it.
11695 (regcache_cpy): New.
11696 (register_cache_size): New.
11697 (supply_regblock): New.
11698 (regcache_read_pc, regcache_write_pc): New.
11699
11700 * tracepoint.c: New.
11701
11702 * Makefile.in (OBS): Add tracepoint.o.
11703 (tracepoint.o): New rule.
11704
11705 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11706
11707 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11708 (i386-mmx.o): New.
11709 (i386-mmx.c): Likewise.
11710 (i386-mmx-linux.o): Likewise.
11711 (i386-mmx-linux.c): Likewise.
11712
11713 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11714 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11715 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11716 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11717
11718 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11719 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11720 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11721
11722 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11723
11724 * Makefile.in (clean): Updated.
11725 (i386-avx.o): New.
11726 (i386-avx.c): Likewise.
11727 (i386-avx-linux.o): Likewise.
11728 (i386-avx-linux.c): Likewise.
11729 (amd64-avx.o): Likewise.
11730 (amd64-avx.c): Likewise.
11731 (amd64-avx-linux.o): Likewise.
11732 (amd64-avx-linux.c): Likewise.
11733
11734 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11735 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11736 (srv_amd64_regobj): Add amd64-avx.o.
11737 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11738 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11739 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11740 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11741 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11742 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11743 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11744
11745 * i387-fp.c: Include "i386-xstate.h".
11746 (i387_xsave): New.
11747 (i387_cache_to_xsave): Likewise.
11748 (i387_xsave_to_cache): Likewise.
11749 (x86_xcr0): Likewise.
11750
11751 * i387-fp.h (i387_cache_to_xsave): Likewise.
11752 (i387_xsave_to_cache): Likewise.
11753 (x86_xcr0): Likewise.
11754
11755 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11756 * linux-crisv32-low.c (target_regsets): Likewise.
11757 * linux-m68k-low.c (target_regsets): Likewise.
11758 * linux-mips-low.c (target_regsets): Likewise.
11759 * linux-ppc-low.c (target_regsets): Likewise.
11760 * linux-s390-low.c (target_regsets): Likewise.
11761 * linux-sh-low.c (target_regsets): Likewise.
11762 * linux-sparc-low.c (target_regsets): Likewise.
11763 * linux-xtensa-low.c (target_regsets): Likewise.
11764
11765 * linux-low.c: Include <sys/uio.h>.
11766 (regsets_fetch_inferior_registers): Support nt_type.
11767 (regsets_store_inferior_registers): Likewise.
11768 (linux_process_qsupported): New.
11769 (linux_target_ops): Add linux_process_qsupported.
11770
11771 * linux-low.h (regset_info): Add nt_type.
11772 (linux_target_ops): Add process_qsupported.
11773
11774 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11775 and <sys/uio.h>.
11776 (init_registers_i386_avx_linux): New.
11777 (init_registers_amd64_avx_linux): Likewise.
11778 (xmltarget_i386_linux_no_xml): Likewise.
11779 (xmltarget_amd64_linux_no_xml): Likewise.
11780 (PTRACE_GETREGSET): Likewise.
11781 (PTRACE_SETREGSET): Likewise.
11782 (x86_fill_xstateregset): Likewise.
11783 (x86_store_xstateregset): Likewise.
11784 (use_xml): Likewise.
11785 (x86_linux_update_xmltarget): Likewise.
11786 (x86_linux_process_qsupported): Likewise.
11787 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11788 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11789 init_registers_i386_linux here. Call
11790 x86_linux_update_xmltarget.
11791 (the_low_target): Add x86_linux_process_qsupported.
11792
11793 * server.c (handle_query): Call target_process_qsupported.
11794
11795 * target.h (target_ops): Add process_qsupported.
11796 (target_process_qsupported): New.
11797
11798 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11799
11800 * inferiors.c (add_thread): Set last_status kind to
11801 TARGET_WAITKIND_IGNORE.
11802 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11803 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11804 (linux_wait_1): Move `thread' local definition to block that uses
11805 it. Don't NULL initialize `event_child'.
11806 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11807 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11808 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11809
11810 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11811
11812 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11813 an extended waitstatus, or by a watchpoint.
11814 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11815 thread was stepping or has been stopped by a watchpoint.
11816
11817 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11818
11819 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11820 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11821 of another, then delete the previous, and validate all
11822 breakpoints.
11823 (validate_inserted_breakpoint): New.
11824 (delete_disabled_breakpoints): New.
11825 (validate_breakpoints): New.
11826 (check_mem_read): Validate breakpoints before trusting their
11827 shadow. Delete disabled breakpoints.
11828 (check_mem_write): Validate breakpoints before trusting they
11829 should be inserted. Delete disabled breakpoints.
11830 * mem-break.h (validate_breakpoints):
11831 * server.c (handle_query): Validate breakpoints when we see a
11832 qSymbol query.
11833
11834 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11835
11836 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11837 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11838 if we could tell there's a GDB breakpoint at stop_pc.
11839 (need_step_over_p): Don't do a step over if we find a GDB
11840 breakpoint at the resume PC.
11841
11842 * mem-break.c (struct raw_breakpoint): New.
11843 (enum bkpt_type): New type `gdb_breakpoint'.
11844 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11845 fields. New field `raw'.
11846 (find_raw_breakpoint_at): New.
11847 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11848 breakpoint instead.
11849 (set_breakpoint_at): Adjust.
11850 (delete_raw_breakpoint): New.
11851 (release_breakpoint): New.
11852 (delete_breakpoint): Rename to...
11853 (delete_breakpoint_1): ... this. Add proc parameter. Use
11854 release_breakpoint. Return ENOENT.
11855 (delete_breakpoint): Reimplement.
11856 (find_breakpoint_at): Delete.
11857 (find_gdb_breakpoint_at): New.
11858 (delete_breakpoint_at): Delete.
11859 (set_gdb_breakpoint_at): New.
11860 (delete_gdb_breakpoint_at): New.
11861 (gdb_breakpoint_here): New.
11862 (set_reinsert_breakpoint): Use release_breakpoint.
11863 (uninsert_breakpoint): Rename to ...
11864 (uninsert_raw_breakpoint): ... this.
11865 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11866 (reinsert_raw_breakpoint): Change parameter type to
11867 raw_breakpoint.
11868 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11869 instead.
11870 (check_breakpoints): Adjust. Use release_breakpoint.
11871 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11872 (breakpoint_inserted_here): Ditto.
11873 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11874 Don't trust the breakpoint's shadow if it is not inserted.
11875 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11876 (delete_all_breakpoints): Adjust.
11877 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11878 use delete_breakpoint_1.
11879
11880 * mem-break.h (breakpoints_supported): Delete declaration.
11881 (set_gdb_breakpoint_at): Declare.
11882 (gdb_breakpoint_here): Declare.
11883 (delete_breakpoint_at): Delete.
11884 (delete_gdb_breakpoint_at): Declare.
11885
11886 * server.h (struct raw_breakpoint): Forward declare.
11887 (struct process_info): New field `raw_breakpoints'.
11888
11889 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11890 breakpoints.
11891
11892 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11893
11894 * linux-low.c (status_pending_p_callback): Fix comment.
11895 (linux_wait_for_event_1): Move most of the internal breakpoint
11896 handling from here...
11897 (linux_wait_1): ... to here.
11898 (count_events_callback): New.
11899 (select_singlestep_lwp_callback): New.
11900 (select_event_lwp_callback): New.
11901 (cancel_breakpoints_callback): New.
11902 (select_event_lwp): New.
11903 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11904 priority to all LWPs that have had events that should be reported
11905 to the client. Cancel breakpoints when about to reporting the
11906 event to the client, not while stopping lwps. No longer cancel
11907 finished single-steps here.
11908 (cancel_finished_single_step): Delete.
11909 (cancel_finished_single_steps): Delete.
11910
11911 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11912
11913 * mem-break.c (enum bkpt_type): New.
11914 (struct breakpoint): New field `type'.
11915 (set_breakpoint_at): Change return type to struct breakpoint
11916 pointer. Set type to `other_breakpoint' by default.
11917 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11918 in the breakpoint list.
11919 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11920 (reinsert_breakpoint): Rename to ...
11921 (reinsert_raw_breakpoint): ... this.
11922 (reinsert_breakpoints_at): Adjust.
11923 * mem-break.h (struct breakpoint): Declare.
11924 (set_breakpoint_at): Change return type to struct breakpoint
11925 pointer.
11926
11927 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11928
11929 * server.c (handle_query): Assign, not compare.
11930
11931 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11932
11933 Teach linux gdbserver to step-over-breakpoints.
11934
11935 * linux-low.c (can_hardware_single_step): New.
11936 (supports_breakpoints): New.
11937 (handle_extended_wait): If stopping threads, read the stop pc of
11938 the new cloned LWP.
11939 (get_pc): New.
11940 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11941 low target doesn't support retrieving the PC.
11942 (add_lwp): Set last_resume_kind to resume_continue.
11943 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11944 (linux_attach): Don't clear stop_expected. Set the lwp's
11945 last_resume_kind to resume_stop.
11946 (linux_detach_one_lwp): Don't check for removed breakpoints.
11947 (check_removed_breakpoint): Delete.
11948 (status_pending_p): Rename to ...
11949 (status_pending_p_callback): ... this. Don't check for removed
11950 breakpoints. Don't consider threads that are stopped from GDB's
11951 perspective.
11952 (linux_wait_for_lwp): Always read the stop_pc here.
11953 (cancel_breakpoint): New.
11954 (step_over_bkpt): New global.
11955 (linux_wait_for_event_1): Implement stepping over breakpoints.
11956 (gdb_wants_lwp_stopped): New.
11957 (gdb_wants_all_stopped): New.
11958 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11959 single-step traps here. Store the thread's last reported target
11960 wait status.
11961 (send_sigstop): Don't clear stop_expected. Always set it,
11962 instead.
11963 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11964 (cancel_finished_single_step): New.
11965 (cancel_finished_single_steps): New.
11966 (wait_for_sigstop): Don't cancel finished single-step traps here.
11967 (linux_resume_one_lwp): Don't check for removed breakpoints.
11968 Don't set `step' on non-hardware step archs.
11969 (linux_set_resume_request): Ignore resume_stop requests if already
11970 stopping or stopped. Set the lwp's last_resume_kind.
11971 (resume_status_pending_p): Don't check for removed breakpoints.
11972 (need_step_over_p): New.
11973 (start_step_over): New.
11974 (finish_step_over): New.
11975 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11976 requests. Clear the thread's last reported target waitstatus.
11977 Don't use the `suspended' flag. Don't consider pending breakpoints.
11978 (linux_resume): Start a step-over if necessary.
11979 (proceed_one_lwp): New.
11980 (proceed_all_lwps): New.
11981 (unstop_all_lwps): New.
11982 * linux-low.h (struct lwp_info): Rewrite comment for the
11983 `suspended' flag. Add the `stop_pc' field. Delete the
11984 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11985 Add `'last_resume_kind' and `need_step_over' fields.
11986 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11987 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11988 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11989 (set_raw_breakpoint_at): New.
11990 (set_breakpoint_at): Rewrite to use it.
11991 (reinsert_breakpoint_handler): Delete.
11992 (set_reinsert_breakpoint): New.
11993 (reinsert_breakpoint_by_bp): Delete.
11994 (delete_reinsert_breakpoints): New.
11995 (uninsert_breakpoint): Rewrite.
11996 (uninsert_breakpoints_at): New.
11997 (reinsert_breakpoint): Rewrite.
11998 (reinsert_breakpoints_at): New.
11999 (check_breakpoints): Rewrite.
12000 (breakpoint_here): New.
12001 (breakpoint_inserted_here): New.
12002 (check_mem_read): Adjust.
12003 * mem-break.h (breakpoints_supported, breakpoint_here)
12004 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12005 (reinsert_breakpoint_by_bp): Delete declaration.
12006 (delete_reinsert_breakpoints): Declare.
12007 (reinsert_breakpoint): Delete declaration.
12008 (reinsert_breakpoints_at): Declare.
12009 (uninsert_breakpoint): Delete declaration.
12010 (uninsert_breakpoints_at): Declare.
12011 (check_breakpoints): Adjust prototype.
12012 * server.h: Adjust include order.
12013 (struct thread_info): Declare here. Add a `last_status' field.
12014
12015 2010-03-23 Michael Snyder <msnyder@vmware.com>
12016
12017 * server.c (crc32): New function.
12018 (handle_query): Add handling for 'qCRC:' request.
12019
12020 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12021
12022 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12023 lwp had been stopped by a watchpoint.
12024
12025 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12026
12027 * server.h (internal_error): Declare.
12028 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12029 * utils.c (internal_error): New function.
12030
12031 2010-03-15 Andreas Schwab <schwab@redhat.com>
12032
12033 * configure.srv: Fix typo setting srv_regobj.
12034
12035 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12036
12037 * linux-low.c (fetch_register): Avoid passing a non string literal
12038 format to `error'.
12039 (usr_store_inferior_registers): Ditto.
12040
12041 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12042
12043 * linux-low.c (linux_write_memory): Bail out early if peeking
12044 memory failed.
12045
12046 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12047
12048 * linux-low.h (struct lwp_info): New fields
12049 `stopped_by_watchpoint' and `stopped_data_address'.
12050 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12051 here, and cache them in the lwp object.
12052 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12053 directly.
12054 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12055 field.
12056 (linux_stopped_by_watchpoint): Rewrite.
12057 (linux_stopped_data_address): Rewrite.
12058
12059 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12060
12061 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12062 switching the current inferior, not before.
12063
12064 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12065
12066 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12067 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12068 i386-linux.c and amd64-linux.c.
12069 (reg-i386.o): Removed.
12070 (reg-i386.c): Likewise.
12071 (reg-i386-linux.o): Likewise.
12072 (reg-i386-linux.c): Likewise.
12073 (reg-x86-64.o): Likewise.
12074 (reg-x86-64.c): Likewise.
12075 (reg-x86-64-linux.o): Likewise.
12076 (reg-x86-64-linux.c): Likewise.
12077 (i386.o): New.
12078 (i386.c): Likewise.
12079 (i386-linux.o): Likewise.
12080 (i386-linux.c): Likewise.
12081 (amd64.o): Likewise.
12082 (amd64.c): Likewise.
12083 (amd64-linux.o): Likewise.
12084 (amd64-linux.c): Likewise.
12085
12086 * configure.srv (srv_i386_regobj): New.
12087 (srv_i386_linux_regobj): Likewise.
12088 (srv_amd64_regobj): Likewise.
12089 (srv_amd64_linux_regobj): Likewise.
12090 (srv_i386_32bit_xmlfiles): Likewise.
12091 (srv_i386_64bit_xmlfiles): Likewise.
12092 (srv_i386_xmlfiles): Likewise.
12093 (srv_amd64_xmlfiles): Likewise.
12094 (srv_i386_linux_xmlfiles): Likewise.
12095 (srv_amd64_linux_xmlfiles): Likewise.
12096 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12097 srv_xmlfiles to $srv_i386_xmlfiles.
12098 (i[34567]86-*-mingw32ce*): Likewise.
12099 (i[34567]86-*-mingw*): Likewise.
12100 (i[34567]86-*-nto*): Likewise.
12101 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12102 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12103 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12104 (x86_64-*-linux*): Likewise.
12105
12106 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12107 (init_registers_amd64_linux): New.
12108 (x86_arch_setup): Replace init_registers_x86_64_linux with
12109 init_registers_amd64_linux.
12110
12111 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12112
12113 * configure.ac: Check for libdl. If it is not available link against
12114 static libthread_db.
12115 * configure: Regenerate.
12116
12117 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12118
12119 PR9605
12120
12121 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12122 handing a read watchpoint.
12123 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12124
12125 2010-02-12 Doug Evans <dje@google.com>
12126
12127 * linux-low.c (linux_supports_tracefork_flag): Document.
12128 (linux_look_up_symbols): Add comment.
12129
12130 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12131
12132 * regcache.c (supply_register): Clear regcache if buf is NULL.
12133
12134 2010-02-02 Nicolas Roche <roche@sourceware.org>
12135 Joel Brobecker <brobecker@adacore.com>
12136
12137 * inferiors.c (find_inferior): Add function documentation.
12138 (unloaded_dll): Handle the case where the unloaded dll has not
12139 been previously registered in the dll list.
12140
12141 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12142
12143 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12144 (thumb2_breakpoint): New.
12145 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12146
12147 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12148
12149 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12150 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12151 breakpoints.
12152
12153 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12154
12155 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12156
12157 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12158
12159 * linux-s390-low.c (s390_collect_ptrace_register)
12160 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12161
12162 2010-01-21 Doug Evans <dje@google.com>
12163
12164 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12165 (PTRACE_ARG4_TYPE): New macro.
12166 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12167 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12168 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12169 (usr_store_inferior_registers): Ditto.
12170 (linux_read_memory, linux_write_memory): Ditto.
12171 (linux_test_for_tracefork): Ditto.
12172
12173 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12174 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12175
12176 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12177
12178 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12179 target.
12180
12181 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12182
12183 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12184 prototype to take a regcache. Adjust.
12185
12186 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12187
12188 * regcache.h (struct thread_info): Forward declare.
12189 (struct regcache): New.
12190 (new_register_cache): Adjust prototype.
12191 (get_thread_regcache): Declare.
12192 (free_register_cache): Adjust prototype.
12193 (registers_to_string, registers_from_string): Ditto.
12194 (supply_register, supply_register_by_name, collect_register)
12195 (collect_register_as_string, collect_register_by_name): Ditto.
12196 * regcache.c (struct inferior_regcache_data): Delete.
12197 (get_regcache): Rename to ...
12198 (get_thread_regcache): ... this. Adjust. Switch inferior before
12199 fetching registers.
12200 (regcache_invalidate_one): Adjust.
12201 (regcache_invalidate): Fix prototype.
12202 (new_register_cache): Return the new register cache.
12203 (free_register_cache): Change prototype.
12204 (realloc_register_cache): Adjust.
12205 (registers_to_string): Change prototype to take a regcache. Adjust.
12206 (registers_from_string): Ditto.
12207 (register_data): Ditto.
12208 (supply_register): Ditto.
12209 (supply_register_by_name): Ditto.
12210 (collect_register): Ditto.
12211 (collect_register_as_string): Ditto.
12212 (collect_register_by_name): Ditto.
12213 * server.c (process_serial_event): Adjust.
12214 * linux-low.h (regset_fill_func, regset_store_func): Change
12215 prototype.
12216 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12217 Change prototype.
12218 * linux-low.c (get_stop_pc): Adjust.
12219 (check_removed_breakpoint): Adjust.
12220 (linux_wait_for_event): Adjust.
12221 (linux_resume_one_lwp): Adjust.
12222 (fetch_register): Add regcache parameter. Adjust.
12223 (usr_store_inferior_registers): Ditto.
12224 (regsets_fetch_inferior_registers): Ditto.
12225 (regsets_store_inferior_registers): Ditto.
12226 (linux_fetch_registers, linux_store_registers): Ditto.
12227 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12228 regcache. Adjust.
12229 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12230 Ditto.
12231 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12232 prototype to take a regcache.
12233 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12234 * remote-utils.c (convert_ascii_to_int, outreg)
12235 (prepare_resume_reply): Change prototype to take a regcache.
12236 Adjust.
12237 * target.h (struct target_ops) <fetch_registers, store_registers>:
12238 Change prototype to take a regcache.
12239 (fetch_inferior_registers, store_inferior_registers): Change
12240 prototype to take a regcache. Adjust.
12241 * proc-service.c (ps_lgetregs): Adjust.
12242 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12243 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12244 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12245 take a regcache. Adjust.
12246 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12247 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12248 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12249 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12250 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12251 (cris_cannot_fetch_register):
12252 (cris_breakpoint_at): Change prototype to take a regcache.
12253 Adjust.
12254 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12255 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12256 to take a regcache. Adjust.
12257 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12258 Adjust.
12259 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12260 take a regcache. Adjust.
12261 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12262 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12263 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12264 * linux-mips-low.c (mips_get_pc):
12265 (mips_set_pc): Change prototype to take a regcache. Adjust.
12266 (mips_reinsert_addr): Adjust.
12267 (mips_collect_register): Change prototype to take a regcache.
12268 Adjust.
12269 (mips_supply_register):
12270 (mips_collect_register_32bit, mips_supply_register_32bit)
12271 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12272 (mips_store_fpregset): Ditto.
12273 * linux-ppc-low.c (ppc_supply_ptrace_register)
12274 (ppc_supply_ptrace_register): Ditto.
12275 (parse_spufs_run): Adjust.
12276 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12277 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12278 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12279 take a regcache. Adjust.
12280 * linux-s390-low.c (s390_collect_ptrace_register)
12281 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12282 (s390_set_pc): Change prototype to take a regcache. Adjust.
12283 (s390_arch_setup): Adjust.
12284 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12285 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12286 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12287 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12288 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12289 regcache. Adjust.
12290 (sparc_breakpoint_at): Adjust.
12291 * linux-xtensa-low.c (xtensa_fill_gregset):
12292 (xtensa_store_gregset):
12293 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12294 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12295 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12296 prototype to take a regcache. Adjust.
12297 * win32-arm-low.c (arm_fetch_inferior_register)
12298 (arm_store_inferior_register): Change prototype to take a
12299 regcache. Adjust.
12300 * win32-i386-low.c (i386_fetch_inferior_register)
12301 (i386_store_inferior_register): Change prototype to take a
12302 regcache. Adjust.
12303 * win32-low.c (child_fetch_inferior_registers)
12304 (child_store_inferior_registers): Change prototype to take a
12305 regcache. Adjust.
12306 (win32_wait): Adjust.
12307 (win32_fetch_inferior_registers): Change prototype to take a
12308 regcache. Adjust.
12309 (win32_store_inferior_registers): Adjust.
12310 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12311 store_inferior_register>: Change prototype to take a regcache.
12312
12313 2010-01-20 Doug Evans <dje@google.com>
12314
12315 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12316 #ifdef.
12317 (linux_wait_for_event1, linux_init_signals): Ditto.
12318 (W_STOPCODE): Provide definition if missing.
12319
12320 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12321
12322 * linux-low.c (linux_core_of_thread): New.
12323 (compare_ints, show_process, list_threads): New.
12324 (linux_qxfer_osdata): Report threads and cores.
12325 (linux_target_op): Register linux_core_of_thread.
12326 * remote-utils.c (prepare_resume_reply): Report the core.
12327 (buffer_xml_printf): Support %d specifier.
12328 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12329 New.
12330 (handle_query): Handle qXfer:threads. Announce availability
12331 thereof.
12332 * target.h (struct target_ops): New field core_of_thread.
12333
12334 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12335
12336 * Makefile.in (clean): Remove new generated files.
12337 (reg-s390.o, reg-s390.c): Remove rules.
12338 (reg-s390x.o, reg-s390x.c): Likewise.
12339 (s390-linux32.o, s390-linux32.c): Add rules.
12340 (s390-linux64.o, s390-linux64.c): Likewise.
12341 (s390x-linux64.o, s390x-linux64.c): Likewise.
12342 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12343 * linux-s390-low.c: Include <elf.h>.
12344 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12345 (init_registers_s390): Remove prototype.
12346 (init_registers_s390x): Likewise.
12347 (init_registers_s390_linux32): Add prototype.
12348 (init_registers_s390_linux64): Likewise.
12349 (init_registers_s390x_linux64): Likewise.
12350 (s390_num_regs_3264): New define.
12351 (s390_regmap_3264): New global variable.
12352 (s390_cannot_fetch_register): Remove obsolete check.
12353 (s390_cannot_store_register): Likewise.
12354 (s390_collect_ptrace_register): Handle upper/lower register halves.
12355 (s390_supply_ptrace_register): Likewise.
12356 (s390_fill_gregset): Update to register number changes.
12357 (s390_get_hwcap): New routine.
12358 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12359 Install appropriate regmap and register set.
12360
12361 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12362
12363 * server.c (gdbserver_version): Update copyright year to 2010.
12364 * gdbreplay.c (gdbreplay_version): Likewise.
12365
12366 2009-12-28 Doug Evans <dje@google.com>
12367
12368 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12369 elf/external.h. Include <elf.h> instead but only if necessary.
12370
12371 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12372
12373 * linux-low.c (linux_remove_process): Remove `detaching'
12374 parameter. Don't release/detach from thread_db here.
12375 (linux_kill): Release/detach from thread_db here, ...
12376 (linux_detach): ... and here, before actually detaching.
12377 (linux_wait_1): ... and here, when a process exits.
12378 * thread-db.c (any_thread_of): New.
12379 (thread_db_free): Switch the current inferior to a thread of the
12380 passed in process.
12381
12382 2009-12-21 Doug Evans <dje@google.com>
12383
12384 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12385
12386 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12387 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12388 warning ifndef __NR_tkill. Move setting of errno there too.
12389 Delete unnecessary resetting of errno after syscall.
12390 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12391
12392 * configure.ac: Check for dladdr.
12393 * config.in: Regenerate.
12394 * configure: Regenerate.
12395 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12396 (try_thread_db_load): Update.
12397
12398 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12399
12400 2009-12-18 Doug Evans <dje@google.com>
12401
12402 * event-loop.c: Include unistd.h if it exists.
12403
12404 * linux-low.c (my_waitpid): Move definition away from being in
12405 between linux_tracefork_child/linux_test_for_tracefork.
12406
12407 * gdb_proc_service.h (psaddr_t): Fix type.
12408 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12409 signature to match glibc.
12410
12411 2009-12-16 Doug Evans <dje@google.com>
12412
12413 * linux-low.c (linux_read_memory): Fix argument to read.
12414
12415 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12416
12417 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12418 events, don't leave current_inferior pointing at null.
12419
12420 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12421
12422 * win32-low.c (LOG): Delete.
12423 (OUTMSG): Output to stderr.
12424 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12425 on compile time LOG macro.
12426 (win32_wait): Fix debug output.
12427
12428 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12429
12430 * win32-low.c (win32_add_one_solib): If the dll name is
12431 "ntdll.dll", prepend the system directory to the dll path.
12432
12433 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12434
12435 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12436
12437 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12438 Vladimir Prus <vladimir@codesourcery.com>
12439
12440 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12441 * configure.ac: Check for __mcoldfire__ and set
12442 gdb_cv_m68k_is_coldfire.
12443 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12444 reg-cf.o and reg-m68k.o.
12445 * configure: Regenerated.
12446
12447 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12448
12449 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12450 Pass it to thread_db_free.
12451 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12452 proper `detaching' argument to linux_remove_process.
12453 * linux-low.h (thread_db_free): Add `detaching' parameter.
12454 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12455 to thread_db_free.
12456 (thread_db_free): Add `detaching' parameter. Only
12457 call td_ta_clear_event if detaching from process.
12458
12459 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12460
12461 * thread-db.c (thread_db_free): Fix typo.
12462
12463 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12464
12465 PR gdb/10838
12466 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12467
12468 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12469
12470 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12471 with an i686 compiler.
12472 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12473 needed.
12474 * configure: Rebuilt.
12475
12476 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12477
12478 PR gdb/10783
12479
12480 * server.c (handle_search_memory_1): Correct read_addr initialization
12481 in loop for searching subsequent chunks.
12482
12483 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12484
12485 * configure.ac: New --with-libthread-db option.
12486 * thread-db.c: Allow direct dependence on libthread_db.
12487 (thread_db_free): Adjust.
12488 * config.in: Regenerate.
12489 * configure: Likewise.
12490
12491 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12492
12493 PR gdb/10757
12494 * thread-db.c (attach_thread): New function.
12495 (maybe_attach_thread): Return success/failure.
12496 (find_new_threads_callback): Adjust.
12497 (thread_db_find_new_threads): Loop until no new threads.
12498
12499 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12500
12501 * proc-service.c (ps_lgetregs): Formatting.
12502
12503 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12504
12505 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12506 * configure.ac: Adjust.
12507 * linux-low.h (struct process_info_private): Move members to struct
12508 thread_db.
12509 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12510 * linux-low.c (linux_remove_process): Adjust.
12511 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12512 * server.c (handle_query): Move code ...
12513 (handle_monitor_command): ... here. New function.
12514 * target.h (struct target_ops): New member.
12515 * thread-db.c (struct thread_db): New.
12516 (libthread_db_search_path): New variable.
12517 (thread_db_create_event, thread_db_enable_reporting)
12518 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12519 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12520 (try_thread_db_load_1, dladdr_to_soname): New functions.
12521 (try_thread_db_load, thread_db_load_search): New functions.
12522 (thread_db_init): Search for libthread_db.
12523 (thread_db_free): New function.
12524 (thread_db_handle_monitor_command): Likewise.
12525 * config.in: Regenerate.
12526 * configure: Regenerate.
12527
12528 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12529
12530 * spu-low.c (spu_kill): Wait for inferior to terminate.
12531 Call clear_inferiors.
12532 (spu_detach): Call clear_inferiors.
12533
12534 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12535
12536 * aclocal.m4: Regenerate.
12537 * config.in: Likewise.
12538 * configure: Likewise.
12539
12540 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12541
12542 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12543 (parse_spufs_run): New function.
12544 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12545 (ppc_breakpoint_at): Handle SPU breakpoints.
12546
12547 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12548
12549 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12550 (SPUFS_MAGIC): Define.
12551 (spu_enumerate_spu_ids): New function.
12552 (linux_qxfer_spu): New function.
12553 (linux_target_ops): Install linux_qxfer_spu.
12554
12555 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12556
12557 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12558 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12559 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12560 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12561 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12562 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12563 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12564 (init_registers_powerpc_cell32l): Add prototype.
12565 (init_registers_powerpc_cell64l): Likewise.
12566 (ppc_arch_setup): Detect Cell/B.E. architecture.
12567
12568 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12569
12570 * Makefile.in (datarootdir): New variable.
12571
12572 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12573
12574 * linux-low.c (linux_write_memory): Update debugging output.
12575 * Makefile.in (clean): Add new descriptions.
12576 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12577 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12578 * configure.srv: Add new files for arm*-*-linux*.
12579 * linux-arm-low.c: Add new declarations.
12580 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12581 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12582 (HWCAP_VFPv3D16): New.
12583 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12584 instead of __IWMMXT__.
12585 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12586 (arm_arch_setup): New.
12587 (target_regsets): Remove #ifdef. Add VFP regset.
12588 (the_low_target): Use arm_arch_setup.
12589
12590 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12591
12592 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12593 the main thread again.
12594
12595 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12596
12597 Adding Neutrino gdbserver.
12598 * configure: Regenerated.
12599 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12600 * configure.srv (i[34567]86-*-nto*): New target.
12601 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12602 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12603 (nto_comctrl) [__QNX__]: New function.
12604 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12605
12606 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12607
12608 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12609 srv_tgtobj.
12610
12611 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12612 Pedro Alves <pedro@codesourcery.com>
12613
12614 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12615 don't support CONTEXT_EXTENDED_REGISTERS.
12616 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12617 (the_low_target): Install them.
12618 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12619 failing with ERROR_PIPE_NOT_CONNECTED.
12620
12621 2009-06-30 Doug Evans <dje@google.com>
12622 Pierre Muller <muller@ics.u-strasbg.fr>
12623
12624 Add h/w watchpoint support to x86-linux, win32-i386.
12625 * Makefile.in (SFILES): Add i386-low.c
12626 (i386_low_h): Define.
12627 (i386-low.o): Add dependencies.
12628 (linux-x86-low.o): Add i386-low.h dependency.
12629 (win32-i386-low.o): Ditto.
12630 * i386-low.c: New file.
12631 * i386-low.h: New file.
12632 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12633 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12634 * linux-low.c (linux_add_process): Initialize arch_private.
12635 (linux_remove_process): Free arch_private.
12636 (add_lwp): Initialize arch_private.
12637 (delete_lwp): Free arch_private.
12638 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12639 provided.
12640 * linux-low.h (process_info_private): New member arch_private.
12641 (lwp_info): New member arch_private.
12642 (linux_target_ops): New members new_process, new_thread,
12643 prepare_to_resume.
12644 (ptid_of): New macro.
12645 * linux-x86-low.c: Include stddef.h, i386-low.h.
12646 (arch_process_info): New struct.
12647 (arch_lwp_info): New struct.
12648 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12649 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12650 (i386_dr_low_get_status): New function.
12651 (x86_insert_point, x86_remove_point): New functions.
12652 (x86_stopped_by_watchpoint): New function.
12653 (x86_stopped_data_address): New function.
12654 (x86_linux_new_process, x86_linux_new_thread): New functions.
12655 (x86_linux_prepare_to_resume): New function.
12656 (the_low_target): Add entries for insert_point, remove_point,
12657 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12658 prepare_to_resume.
12659 * server.c (debug_hw_points): New global.
12660 (monitor_show_help): Document set debug-hw-points.
12661 (handle_query): Process "set debug-hw-points".
12662 * server.h (debug_hw_points): Declare.
12663 (paddress): Declare.
12664 * utils.c (NUMCELLS, CELLSIZE): New macros.
12665 (get_sell, xsnprintf, paddress): New functions.
12666 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12667 remove_point, stopped_by_watchpoint, stopped_data_address.
12668 * win32-i386-low.c: Include i386-low.h.
12669 (debug_reg_state): Replaces dr.
12670 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12671 (i386_dr_low_get_status): New function.
12672 (i386_insert_point, i386_remove_point): New functions.
12673 (i386_stopped_by_watchpoint): New function.
12674 (i386_stopped_data_address): New function.
12675 (i386_initial_stuff): Update.
12676 (get_thread_context,set_thread_context,i386_thread_added): Update.
12677 (the_low_target): Add entries for insert_point,
12678 remove_point, stopped_by_watchpoint, stopped_data_address.
12679 * win32-low.c (win32_insert_watchpoint): New function.
12680 (win32_remove_watchpoint): New function.
12681 (win32_stopped_by_watchpoint): New function.
12682 (win32_stopped_data_address): New function.
12683 (win32_target_ops): Add entries for insert_watchpoint,
12684 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12685 * win32-low.h (win32_target_ops): New members insert_point,
12686 remove_point, stopped_by_watchpoint, stopped_data_address.
12687
12688 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12689
12690 * server.c (process_serial_event): Re-return unsupported, not
12691 error, if the type isn't recognized. Re-allow supporting only
12692 insert or remove packets. Also call require_running for
12693 breakpoints. Add missing break statement to default case. Tidy.
12694 * target.h (struct target_ops): Rename insert_watchpoint to
12695 insert_point, and remove_watchpoint to remove_point.
12696
12697 * linux-low.h (struct linux_target_ops): Likewise.
12698 * linux-low.c (linux_insert_watchpoint): Rename to ...
12699 (linux_insert_point): ... this. Adjust.
12700 (linux_remove_watchpoint): Rename to ...
12701 (linux_remove_point): ... this. Adjust.
12702 (linux_target_ops): Adjust.
12703 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12704 (cris_insert_point): ... this.
12705 (cris_remove_watchpoint): Rename to ...
12706 (cris_remove_point): ... this.
12707 (the_low_target): Adjust.
12708
12709 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12710
12711 * server.c (handle_v_kill): Pass signal_pid to
12712 kill_inferior if multi_process is zero.
12713
12714 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12715
12716 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12717 * target.h (target_ops): Comment for *_watchpoint to make it clear
12718 the functions can get types '0' and '1'.
12719
12720 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12721
12722 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12723 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12724 * regcache.c (get_regcache): Likewise.
12725 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12726 * win32-low.c (child_fetch_inferior_registers): Remove check for
12727 regno 0.
12728
12729 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12730 Pedro Alves <pedro@codesourcery.com>
12731
12732 * target.h (struct target_ops) <supports_multi_process>: New
12733 callback.
12734 (target_supports_multi_process): New.
12735 * server.c (handle_query): Even if GDB reports support, only
12736 enable multi-process if the target also supports it. Report
12737 multi-process support only if the target backend supports it.
12738 * linux-low.c (linux_supports_multi_process): New function.
12739 (linux_target_ops): Install it as target_supports_multi_process
12740 callback.
12741
12742 2009-05-24 Doug Evans <dje@google.com>
12743
12744 Global renaming of find_thread_pid to find_thread_ptid.
12745 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12746 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12747 All callers updated.
12748
12749 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12750 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12751 directly.
12752
12753 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12754 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12755 (linux_resume_one_lwp): Ditto.
12756
12757 2009-05-23 Doug Evans <dje@google.com>
12758
12759 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12760 from struct inferior_list_entry * to struct lwp_info *.
12761 All callers updated.
12762
12763 2009-05-13 Doug Evans <dje@google.com>
12764
12765 * linux-x86-low.c: Don't include assert.h.
12766 (x86_siginfo_fixup): Use fatal, not assert.
12767 (x86_arch_setup): Fix comment.
12768
12769 2009-05-12 Doug Evans <dje@google.com>
12770
12771 Biarch support for i386/amd64 gdbserver.
12772 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12773 Add linux-x86-low.c.
12774 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12775 (linux-x86-low.o): Add.
12776 * linux-x86-64-low.c: Delete.
12777 * linux-i386-low.c: Delete.
12778 * linux-x86-low.c: New file.
12779 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12780 linux-x86-low.o.
12781 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12782 linux-x86-low.o.
12783 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12784 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12785 (linux_child_pid_to_exec_file): New function.
12786 (elf_64_header_p, elf_64_file_p): New functions.
12787 (siginfo_fixup): New function.
12788 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12789 give target a chance to convert layout.
12790 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12791 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12792
12793 2009-05-07 Doug Evans <dje@google.com>
12794
12795 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12796 (regsets_store_inferior_registers): Ditto.
12797
12798 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12799
12800 PR server/10048
12801
12802 * linux-low.c (must_set_ptrace_flags): Delete.
12803 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12804 of the global.
12805 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12806 `lwp->must_set_ptrace_flags' instead.
12807 (linux_wait_for_event_1): Set ptrace options here.
12808 (linux_wait_1): ... not here.
12809
12810 2009-04-30 Doug Evans <dje@google.com>
12811
12812 * inferiors.c (started_inferior_callback): New function.
12813 (attached_inferior_callback): New function.
12814 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12815 * server.c (print_started_pid, print_attached_pid): New functions.
12816 (detach_or_kill_for_exit): New function.
12817 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12818 * server.h (have_started_inferiors_p): Declare.
12819 (have_attached_inferiors_p): Declare.
12820
12821 * inferiors.c (remove_process): Fix memory leak, free process.
12822 * linux-low.c (linux_remove_process): New function.
12823 (linux_kill): Call it instead of remove_process.
12824 (linux_detach, linux_wait_1): Ditto.
12825
12826 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12827
12828 * configure.srv: Add x86 Windows CE target.
12829
12830 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12831
12832 * inferiors.c (get_thread_process): Make global.
12833 * server.h (get_thread_process): Add prototype.
12834 * thread-db.c (find_one_thread): Use get_thread_process
12835 instead of current_process.
12836 (thread_db_get_tls_address): Do not crash if called when
12837 thread layer is not yet initialized.
12838
12839 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12840
12841 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12842 * spu-low.c (current_tid): Rename to ...
12843 (current_ptid): ... this.
12844 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12845 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12846 ptid_get_lwp (current_ptid) instead of current_tid.
12847 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12848 instead of current_tid. Use find_process_pid to verify pid
12849 argument is valid. Pass proper argument to remove_process.
12850 (spu_thread_alive): Compare current_ptid instead of current_tid.
12851 (spu_resume): Likewise.
12852
12853 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12854
12855 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12856 variable.
12857
12858 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12859
12860 Implement the multiprocess extensions, and add linux multiprocess
12861 support.
12862
12863 * server.h (ULONGEST): Declare.
12864 (struct ptid, ptid_t): New.
12865 (minus_one_ptid, null_ptid): Declare.
12866 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12867 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12868 (struct inferior_list_entry): Change `id' type from unsigned from
12869 to ptid_t.
12870 (struct sym_cache, struct breakpoint, struct
12871 process_info_private): Forward declare.
12872 (struct process_info): Declare.
12873 (current_process): Declare.
12874 (all_processes): Declare.
12875 (initialize_inferiors): Declare.
12876 (add_thread): Adjust to use ptid_t.
12877 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12878 (add_process, remove_process, find_thread_pid): Declare.
12879 (find_inferior_id): Adjust to use ptid_t.
12880 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12881 (multi_process): Declare.
12882 (push_event): Adjust to use ptid_t.
12883 (read_ptid, write_ptid): Declare.
12884 (prepare_resume_reply): Adjust to use ptid_t.
12885 (clear_symbol_cache): Declare.
12886 * inferiors.c (all_processes): New.
12887 (null_ptid, minus_one_ptid): New.
12888 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12889 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12890 (add_thread): Change unsigned long to ptid. Remove gdb_id
12891 parameter. Adjust.
12892 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12893 (gdb_id_to_thread): Rename to ...
12894 (find_thread_pid): ... this. Change unsigned long to ptid.
12895 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12896 (loaded_dll, pull_pid_from_list): Adjust.
12897 (add_process, remove_process, find_process_pid)
12898 (get_thread_process, current_process, initialize_inferiors): New.
12899 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12900 (struct target_waitstatus) <related_pid>: Ditto.
12901 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12902 return type to int.
12903 (struct target_ops) <join>: Add `pid' argument.
12904 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12905 (struct target_ops) <wait>: Add `ptid' field. Change return type
12906 to ptid.
12907 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12908 (mywait): Add `ptid' argument. Change return type to ptid_t.
12909 (target_pid_to_str): Declare.
12910 * target.c (set_desired_inferior): Adjust to use ptids.
12911 (mywait): Add new `ptid' argument. Adjust.
12912 (target_pid_to_str): New.
12913 * mem-break.h (free_all_breakpoints): Declare.
12914 * mem-break.c (breakpoints): Delelete.
12915 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12916 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12917 to use per-process breakpoint list.
12918 (free_all_breakpoints): New.
12919 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12920 (symbol_cache, all_symbols_looked_up): Delete.
12921 (hexchars): New.
12922 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12923 read_ptid): New.
12924 (prepare_resume_reply): Change ptid argument's type from unsigned
12925 long to ptid_t. Adjust. Implement W;process and X;process.
12926 (free_sym_cache, clear_symbol_cache): New.
12927 (look_up_one_symbol): Adjust to per-process symbol cache. *
12928 * server.c (cont_thread, general_thread, step_thread): Change type
12929 to ptid_t.
12930 (attached): Delete.
12931 (multi_process): New.
12932 (last_ptid): Change type to ptid_t.
12933 (struct vstop_notif) <ptid>: Change type to ptid_t.
12934 (queue_stop_reply, push_event): Change `ptid' argument's type to
12935 ptid_t.
12936 (discard_queued_stop_replies): Add `pid' argument.
12937 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12938 changes. Don't reference the `attached' global.
12939 (attach_inferior): Adjust to mywait interface changes.
12940 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12941 features. Handle and report "multiprocess+". Handle
12942 "qAttached:PID".
12943 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12944 changes.
12945 (handle_v_kill): New.
12946 (handle_v_stopped): Adjust to use target_pid_to_str.
12947 (handle_v_requests): Allow multiple attaches and runs when
12948 multiprocess extensions are in effect. Handle "vKill".
12949 (myresume): Adjust to use ptids.
12950 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12951 (handle_status): Adjust to discard_queued_stop_replies interface
12952 change.
12953 (first_thread_of, kill_inferior_callback)
12954 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12955 (main): Call initialize_inferiors. Adjust to use ptids, killing
12956 and detaching from all inferiors. Handle multiprocess packet
12957 variants.
12958 * linux-low.h: Include gdb_proc_service.h.
12959 (struct process_info_private): New.
12960 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12961 <lwpid_of>: Use ptid_get_lwp.
12962 (get_lwp_thread): Adjust.
12963 (struct lwp_info): Add `dead' member.
12964 (find_lwp_pid): Declare.
12965 * linux-low.c (thread_db_active): Delete.
12966 (new_inferior): Adjust comment.
12967 (inferior_pid): Delete.
12968 (linux_add_process): New.
12969 (handle_extended_wait): Adjust.
12970 (add_lwp): Change unsigned long to ptid.
12971 (linux_create_inferior): Add process to processes table. Adjust
12972 to use ptids. Don't set new_inferior here.
12973 (linux_attach_lwp): Rename to ...
12974 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12975 it. Adjust to use ptids.
12976 (linux_attach_lwp): New.
12977 (linux_attach): Add process to processes table. Don't set
12978 new_inferior here.
12979 (struct counter): New.
12980 (second_thread_of_pid_p, last_thread_of_process_p): New.
12981 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12982 multiple processes.
12983 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12984 processes. Remove process from process table.
12985 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12986 to multiple processes.
12987 (any_thread_of): New.
12988 (linux_detach): Add `pid' argument, and handle it. Remove process
12989 from processes table.
12990 (linux_join): Add `pid' argument. Handle it.
12991 (linux_thread_alive): Change unsighed long argument to ptid_t.
12992 Consider dead lwps as not being alive.
12993 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12994 threads we're not interested in.
12995 (same_lwp, find_lwp_pid): New.
12996 (linux_wait_for_lwp): Change `pid' argument's type from int to
12997 ptid_t. Adjust.
12998 (linux_wait_for_event): Rename to ...
12999 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13000 from int to ptid_t. Adjust.
13001 (linux_wait_for_event): New.
13002 (linux_wait_1): Add `ptid' argument. Change return type to
13003 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13004 that exit from the process table.
13005 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13006 Adjust.
13007 (mark_lwp_dead): New.
13008 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13009 stopping all threads, mark its main lwp as dead.
13010 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13011 ptids.
13012 (fetch_register, usr_store_inferior_registers)
13013 (regsets_fetch_inferior_registers)
13014 (regsets_store_inferior_registers, linux_read_memory)
13015 (linux_write_memory): Inline `inferior_pid'.
13016 (linux_look_up_symbols): Adjust to use per-process
13017 `thread_db_active'.
13018 (linux_request_interrupt): Adjust to use ptids.
13019 (linux_read_auxv): Inline `inferior_pid'.
13020 (initialize_low): Don't reference thread_db_active.
13021 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13022 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13023 (ps_getpid): Return the pid of the current inferior.
13024 * thread-db.c (proc_handle, thread_agent): Delete.
13025 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13026 per-process data.
13027 (find_one_thread): Change argument type to ptid_t. Adjust to
13028 per-process data.
13029 (maybe_attach_thread): Adjust to per-process data and ptids.
13030 (thread_db_find_new_threads): Ditto.
13031 (thread_db_init): Ditto.
13032 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13033 processes table. Adjust to use ptids.
13034 (spu_kill, spu_detach): Adjust interface. Remove process from
13035 processes table.
13036 (spu_join, spu_thread_alive): Adjust interface.
13037 (spu_wait): Adjust interface. Remove process from processes
13038 table. Adjust to use ptids.
13039 * win32-low.c (current_inferior_tid): Delete.
13040 (current_inferior_ptid): New.
13041 (debug_event_ptid): New.
13042 (thread_rec): Take a ptid. Adjust.
13043 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13044 (child_delete_thread): Ditto.
13045 (do_initial_child_stuff): Add `attached' argument. Add process to
13046 processes table.
13047 (child_fetch_inferior_registers, child_store_inferior_registers):
13048 Adjust.
13049 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13050 (win32_attach): Pass 1 to do_initial_child_stuff.
13051 (win32_kill): Adjust interface. Remove process from processes
13052 table.
13053 (win32_detach): Ditto.
13054 (win32_join): Adjust interface.
13055 (win32_thread_alive): Take a ptid.
13056 (win32_resume): Adjust to use ptids.
13057 (get_child_debug_event): Ditto.
13058 (win32_wait): Adjust interface. Remove exiting process from
13059 processes table.
13060
13061 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13062
13063 Non-stop mode support.
13064
13065 * server.h (non_stop): Declare.
13066 (gdb_client_data, handler_func): Declare.
13067 (delete_file_handler, add_file_handler, start_event_loop):
13068 Declare.
13069 (handle_serial_event, handle_target_event, push_event)
13070 (putpkt_notif): Declare.
13071 * target.h (enum resume_kind): New.
13072 (struct thread_resume): Replace `step' field by `kind' field.
13073 (TARGET_WNOHANG): Define.
13074 (struct target_ops) <wait>: Add `options' argument.
13075 <supports_non_stop, async, start_non_stop>: New fields.
13076 (target_supports_non_stop, target_async): New.
13077 (start_non_stop): Declare.
13078 (mywait): Add `options' argument.
13079 * target.c (mywait): Add `options' argument. Print child exit
13080 notifications here.
13081 (start_non_stop): New.
13082 * server.c (non_stop, own_buf, mem_buf): New globals.
13083 (struct vstop_notif): New.
13084 (notif_queue): New global.
13085 (queue_stop_reply, push_event, discard_queued_stop_replies)
13086 (send_next_stop_reply): New.
13087 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13088 interface changes.
13089 (attach_inferior): In non-stop mode, don't wait for the target
13090 here.
13091 (handle_general_set): Handle QNonStop.
13092 (handle_query): When handling qC, return the current general
13093 thread, instead of the first thread of the list.
13094 (handle_query): If the backend supports non-stop mode, include
13095 QNonStop+ in the qSupported query response.
13096 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13097 and non-stop mode.
13098 (handle_v_attach, handle_v_run): Handle non-stop mode.
13099 (handle_v_stopped): New.
13100 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13101 (myresume): Adjust to use resume_kind. Handle non-stop.
13102 (queue_stop_reply_callback): New.
13103 (handle_status): Handle non-stop mode.
13104 (main): Clear non_stop flag on reconnection. Use the event-loop.
13105 Refactor serial protocol handling from here ...
13106 (process_serial_event): ... to this new function. When GDB
13107 selects any thread, select one here. In non-stop mode, wait until
13108 GDB acks all pending events before exiting.
13109 (handle_serial_event, handle_target_event): New.
13110 * remote-utils.c (remote_open): Install remote_desc in the event
13111 loop.
13112 (remote_close): Remove remote_desc from the event loop.
13113 (putpkt_binary): Rename to...
13114 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13115 (putpkt_binary): New as wrapper around putpkt_binary_1.
13116 (putpkt_notif): New.
13117 (prepare_resume_reply): In non-stop mode, don't change the
13118 general_thread.
13119 * event-loop.c: New.
13120 * Makefile.in (OBJ): Add event-loop.o.
13121 (event-loop.o): New rule.
13122
13123 * linux-low.h (pid_of): Moved here.
13124 (lwpid_of): New.
13125 (get_lwp_thread): Use lwpid_of.
13126 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13127 * linux-low.c (pid_of): Delete.
13128 (inferior_pid): Use lwpid_of.
13129 (linux_event_pipe): New.
13130 (target_is_async_p): New.
13131 (delete_lwp): New.
13132 (handle_extended_wait): Use lwpid_of.
13133 (add_lwp): Don't set lwpid field.
13134 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13135 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13136 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13137 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13138 first. Adjust to linux_wait_for_event interface changes. Use
13139 lwpid_of.
13140 (linux_detach): Don't delete the main lwp here.
13141 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13142 (status_pending_p): Don't consider explicitly suspended lwps.
13143 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13144 pointer. Add OPTIONS argument. Change return type to int. Use
13145 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13146 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13147 pointer. Add status pointer argument. Return a pid instead of a
13148 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13149 changes. In non-stop mode, don't switch to a random thread.
13150 (linux_wait): Rename to...
13151 (linux_wait_1): ... this. Add target_options argument, and handle
13152 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13153 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13154 clean exit and signal exit code. Don't stop all threads in
13155 non-stop mode. In all-stop mode, only stop all threads when
13156 reporting a stop to GDB. Handle explicit thread stop requests.
13157 (async_file_flush, async_file_mark): New.
13158 (linux_wait): New.
13159 (send_sigstop): Use lwpid_of.
13160 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13161 interface changes. In non-stop mode, don't switch to a random
13162 thread.
13163 (linux_resume_one_lwp): Use lwpid_of.
13164 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13165 (linux_resume_one_thread): ... this. Handle resume_stop. In
13166 non-stop mode, don't look for pending flag in all threads.
13167 (resume_status_pending_p): Don't consider explicitly suspended
13168 threads.
13169 (my_waitpid): Reimplement. Emulate __WALL.
13170 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13171 Use lwpid_of.
13172 (sigchld_handler, linux_supports_non_stop, linux_async)
13173 (linux_start_non_stop): New.
13174 (linux_target_ops): Register linux_supports_non_stop, linux_async
13175 and linux_start_non_stop.
13176 (initialize_low): Install SIGCHLD handler.
13177 * thread-db.c (thread_db_create_event, find_one_thread)
13178 (thread_db_get_tls_address): Use lwpid_of.
13179 * win32-low.c (win32_detach): Adjust to use resume_kind.
13180 (win32_wait): Add `options' argument.
13181 * spu-low.c (spu_resume): Adjust to use resume_kind.
13182 (spu_wait): Add `options' argument.
13183
13184 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13185
13186 Decouple target code from remote protocol.
13187
13188 * target.h (enum target_waitkind): New.
13189 (struct target_waitstatus): New.
13190 (struct target_ops) <wait>: Return an unsigned long. Take a
13191 target_waitstatus pointer instead of a char pointer.
13192 (mywait): Likewise.
13193 * target.c (mywait): Change prototype to return an unsigned long.
13194 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13195 * server.h (thread_from_wait, old_thread_from_wait): Delete
13196 declarations.
13197 (prepare_resume_reply): Change prototype to take a
13198 target_waitstatus.
13199 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13200 (last_status, last_ptid): New.
13201 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13202 pid instead of a signal.
13203 (attach_inferior): Remove "status" and "signal" parameters.
13204 Adjust.
13205 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13206 not as an address.
13207 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13208 (handle_v_requests, myresume): Remove "status" and "signal"
13209 parameters. Adjust.
13210 (handle_status): New.
13211 (main): Delete local `status'. Adjust.
13212 * remote-utils.c: Include target.h.
13213 (prepare_resume_reply): Change prototype to take a
13214 target_waitstatus. Adjust.
13215
13216 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13217 interface.
13218 * spu-low.c (spu_wait): Adjust.
13219 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13220 Delete.
13221 (win32_wait): Adjust.
13222
13223 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13224
13225 * target.h (struct thread_resume): Delete leave_stopped member.
13226 (struct target_ops): Add a `n' argument to the `resume' callback.
13227 * server.c (start_inferior): Adjust.
13228 (handle_v_cont, myresume): Adjust.
13229 * linux-low.c (check_removed_breakpoint): Adjust to resume
13230 interface change, and to removed leave_stopped field.
13231 (resume_ptr): Delete.
13232 (struct thread_resume_array): New.
13233 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13234 resume interface change.
13235 (linux_continue_one_thread, linux_queue_one_thread)
13236 (resume_status_pending_p): Check if the resume field is NULL
13237 instead of checking the leave_stopped member.
13238 (linux_resume): Adjust to the target resume interface change.
13239 * spu-low.c (spu_resume): Adjust to the target resume interface
13240 change.
13241 * win32-low.c (win32_detach, win32_resume): Ditto.
13242
13243 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13244
13245 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13246 flag.
13247 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13248 pending.
13249 (linux_continue_one_thread): Only preserve the stepping flag if
13250 there's a pending breakpoint.
13251
13252 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13253
13254 * server.c (main): After the inferior having exited, call
13255 remote_close before exiting gdbserver.
13256
13257 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13258
13259 Fix size of FPSCR in Power 7 processors.
13260 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13261 (PPC_FEATURE_HAS_DFP): New #define.
13262 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13263 size of the FPSCR.
13264
13265 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13266
13267 * server.c (handle_query) Whitespace and formatting.
13268
13269 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13270
13271 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13272 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13273 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13274 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13275 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13276 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13277 Makefile.in, configure.ac: Fix whitespace throughout.
13278 * configure: Regenerate.
13279
13280 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13281
13282 * inferiors.c (find_inferior): Make it safe for the callback
13283 function to delete the currently iterated inferior.
13284
13285 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13286
13287 * Makefile.in (linuw_low_h): Move higher.
13288 (thread-db.o): Depend on $(linux_low_h).
13289
13290 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13291
13292 Rename "process" to "lwp" throughout.
13293
13294 * linux-low.c (all_processes): Rename to...
13295 (all_lwps): ... this.
13296 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13297 (add_process): Rename to ...
13298 (add_lwp): ... this. Adjust.
13299 (linux_create_inferior): Adjust.
13300 (linux_attach_lwp): Adjust.
13301 (linux_attach): Adjust.
13302 (linux_kill_one_process): Rename to ...
13303 (linux_kill_one_lwp): ... this. Adjust.
13304 (linux_kill): Adjust.
13305 (linux_detach_one_process): Rename to ...
13306 (linux_detach_one_lwp): ... this. Adjust.
13307 (linux_detach): Adjust.
13308 (check_removed_breakpoint): Adjust.
13309 (status_pending_p): Adjust.
13310 (linux_wait_for_process): Rename to ...
13311 (linux_wait_for_lwp): ... this. Adjust.
13312 (linux_wait_for_event): Adjust.
13313 (send_sigstop): Adjust.
13314 (wait_for_sigstop): Adjust.
13315 (stop_all_processes): Rename to ...
13316 (stop_all_lwps): ... this.
13317 (linux_resume_one_process): Rename to ...
13318 (linux_resume_one_lwp): ... this. Adjust.
13319 (linux_set_resume_request, linux_continue_one_thread)
13320 (linux_queue_one_thread, resume_status_pending_p)
13321 (usr_store_inferior_registers, regsets_store_inferior_registers)
13322 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13323 Adjust.
13324 * linux-low.h (get_process): Rename to ...
13325 (get_lwp): ... this. Adjust.
13326 (get_thread_process): Rename to ...
13327 (get_thread_lwp): ... this. Adjust.
13328 (get_process_thread): Rename to ...
13329 (get_lwp_thread): ... this. Adjust.
13330 (struct process_info): Rename to ...
13331 (struct lwp_info): ... this.
13332 (all_processes): Rename to ...
13333 (all_lwps): ... this.
13334 * proc-service.c (ps_lgetregs): Adjust.
13335 * thread-db.c (thread_db_create_event, find_one_thread)
13336 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13337
13338 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13339
13340 * server.c (handle_query): Handle "qAttached".
13341
13342 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13343
13344 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13345 GPLv3, update license URL.
13346
13347 2009-03-01 Doug Evans <dje@google.com>
13348
13349 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13350 (server_h): Add gdb_signals.h.
13351 (signals.o): Update.
13352 * server.h (target_signal_from_host,target_signal_to_host_p)
13353 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13354
13355 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13356
13357 * remote-utils.c (getpkt): Also generate remote-debug
13358 information if noack_mode is set.
13359
13360 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13361
13362 * server.c (handle_query): Report qXfer:siginfo:read and
13363 qXfer:siginfo:write as supported and handle them.
13364 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13365 * linux-low.c (linux_xfer_siginfo): New.
13366 (linux_target_ops): Set it.
13367
13368 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13369
13370 * server.c (gdbserver_usage): Mention --remote-debug.
13371 (main): Accept '--remote-debug' switch.
13372
13373 2009-01-18 Doug Evans <dje@google.com>
13374
13375 * regcache.c (new_register_cache): No need to check result of xcalloc.
13376 * server.c (handle_search_memory): Back out calls to xmalloc,
13377 result is checked and error is returned to user upon failure.
13378 (handle_query): Ditto. Add more checks for result of malloc.
13379 (handle_v_cont): Check result of malloc, report error back to
13380 user upon failure.
13381 (handle_v_run): Ditto. Call freeargv.
13382 * server.h (freeargv): Declare.
13383 * utils.c (freeargv): New fn.
13384
13385 2009-01-15 Doug Evans <dje@google.com>
13386
13387 * gdbreplay.c (perror_with_name): Make arg const char *.
13388 * server.h (target_signal_to_name): Make return type const char *.
13389 * thread-db.c (thread_db_err_str): Make return type const char *.
13390 * utils.c (perror_with_name): Make arg const char *.
13391
13392 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13393
13394 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13395 when handling a EXIT_PROCESS_DEBUG_EVENT.
13396
13397 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13398
13399 * gdbreplay.c (gdbreplay_version): Update copyright year.
13400 * server.c (gdbserver_version): Likewise.
13401
13402 2009-01-05 Doug Evans <dje@google.com>
13403
13404 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13405 (handle_extended_wait): Improve comment.
13406
13407 2008-12-13 Doug Evans <dje@google.com>
13408
13409 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13410 * server.h (ATTR_MALLOC): New macro.
13411 (xmalloc,xcalloc,xstrdup): Declare.
13412 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13413 * inferiors.c: Ditto.
13414 * linux-low.c: Ditto.
13415 * mem-break.c: Ditto.
13416 * regcache.c: Ditto.
13417 * remote-utils.c: Ditto.
13418 * server.c: Ditto.
13419 * target.c: Ditto.
13420 * win32-low.c: Ditto.
13421
13422 2008-12-12 Doug Evans <dje@google.com>
13423
13424 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13425 in debugging printf.
13426
13427 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13428
13429 2008-12-09 Doug Evans <dje@google.com>
13430
13431 * linux-low.h (struct process_info): Delete member tid, unused.
13432 * thread-db.c (find_one_thread): Update.
13433 (maybe_attach_thread): Update.
13434
13435 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13436
13437 * target.h (struct target_ops): Add qxfer_osdata member.
13438 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13439 and dirent.h.
13440 (linux_qxfer_osdata): New functions.
13441 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13442 callback.
13443 * server.c (handle_query): Handle "qXfer:osdata:read:".
13444 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13445 (buffer_xml_printf): New functions.
13446 * server.h (struct buffer): New.
13447 (buffer_grow_str, buffer_grow_str0): New macros.
13448 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13449 (buffer_xml_printf): Declare.
13450
13451 2008-11-24 Doug Evans <dje@google.com>
13452
13453 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13454
13455 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13456
13457 * server.c (handle_v_run): Always use the supplied argument list.
13458
13459 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13460
13461 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13462 (xtensa_regmap_table): Add entry for scompare1.
13463
13464 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13465
13466 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13467 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13468 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13469 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13470 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13471 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13472 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13473 XML target descriptions.
13474 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13475 when inferior is running on an ISA 2.05 or later processor. Add
13476 special case to return offset for full 64-bit slot of FPSCR when
13477 in 32-bits.
13478
13479 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13480
13481 * Makefile.in (SFILES, clean): Added sparc64 files.
13482 (reg-sparc64.o, reg-sparc64.c): New.
13483 * configure.srv (sparc*-*-linux*): New configuration.
13484 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13485 syscall arguments for SPARC.
13486 (regsets_store_inferior_registers): Likewise.
13487 * linux-sparc-low.c: New file.
13488
13489 2008-10-21 Doug Evans <dje@google.com>
13490
13491 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13492 (READLINE_DIR,READLINE_DEP): Delete.
13493 (INTERNAL_CFLAGS): Update.
13494 (LINTFLAGS): Update.
13495
13496 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13497
13498 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13499 whole argv from the last run, not just argv[0].
13500
13501 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13502
13503 * regcache.c (new_register_cache): Return NULL if the register
13504 cache size isn't known yet.
13505 (free_register_cache): Avoid dereferencing a NULL regcache.
13506
13507 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13508
13509 * configure.srv: Merge MIPS and MIPS64.
13510
13511 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13512
13513 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13514
13515 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13516
13517 * Makefile.in: Add required vsx dependencies.
13518
13519 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13520 Declare init_registers_powerpc_vsx32l.
13521 Declare init_registers_powerpc_vsx64l.
13522 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13523 (ppc_arch_setup): Check for VSX in hwcap.
13524 (ppc_fill_vsxregset): New function.
13525 (ppc_store_vsxregset): New function.
13526 Add new VSX entry in regset_info target_regsets.
13527
13528 * configure.srv: Add new VSX dependencies.
13529
13530 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13531
13532 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13533 (remote_open): Set or clear transport_is_reliable.
13534 (putpkt_binary): Don't expect acks in noack mode.
13535 (getpkt): Don't send ack/nac in noack mode.
13536 * server.c (handle_general_set): Handle QStartNoAckMode.
13537 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13538 qSupported.
13539 (main): Reset noack_mode on every connection.
13540 * server.h (noack_mode): Declare.
13541
13542 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13543
13544 * Makefile.in (GDBREPLAY_OBS): New variable.
13545 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13546
13547 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13548 Daniel Jacobowitz <dan@codesourcery.com>
13549
13550 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13551 (usr_store_inferior_registers): Likewise.
13552 (regsets_store_inferior_registers): Likewise.
13553
13554 2008-07-31 Rolf Jansen <rj@surtec.com>
13555 Pedro Alves <pedro@codesourcery.com>
13556
13557 * configure.ac: Check for memmem declaration.
13558 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13559 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13560 (disable_packet_qfThreadInfo): Unconditionally compile.
13561 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13562 * configure, config.in: Regenerate.
13563
13564 2008-07-28 Doug Kwan <dougkwan@google.com>
13565
13566 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13567 (linux_write_memory): Remove declaration of errno.
13568
13569 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13570
13571 * linux-low.c (handle_extended_wait): Do not use "status"
13572 variable uninitialized.
13573
13574 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13575
13576 * server.c (handle_v_attach): Inhibit reporting dll changes.
13577
13578 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13579
13580 * remote-utils.c (prepare_resume_reply): If requested, don't
13581 output "thread:TID" in the T stop reply.
13582
13583 * server.c (disable_packet_vCont, disable_packet_Tthread)
13584 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13585 (handle_query): If requested, disable support for qC, qfThreadInfo
13586 and qsThreadInfo.
13587 (handle_v_requests): If requested, disable support for vCont.
13588 (gdbserver_show_disableable): New.
13589 (main): Handle --disable-packet and --disable-packet=LIST.
13590
13591 * server.h (disable_packet_vCont, disable_packet_Tthread)
13592 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13593
13594 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13595
13596 * server.c (gdbserver_usage): Mention --version.
13597
13598 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13599
13600 * Makefile.in (gdbreplay.o): New rule.
13601
13602 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13603
13604 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13605 message, not gdbserver.
13606
13607 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13608 Nathan Sidwell <nathan@codesourcery.com>
13609 Joseph Myers <joseph@codesourcery.com>
13610
13611 * acinclude.m4: Include ../../config/acx.m4.
13612 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13613 * configure, config.in: Regenerate.
13614 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13615 * server.c (gdbserver_version): Print PKGVERSION.
13616 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13617 (main): Adjust gdbserver_usage calls.
13618 * gdbreplay.c (version, host_name): Add declarations.
13619 (gdbreplay_version, gdbreplay_usage): New.
13620 (main): Accept --version and --help options.
13621
13622 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13623
13624 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13625 (arm_breakpoint_at): Handle Thumb.
13626 (the_low_target): Add comment.
13627
13628 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13629
13630 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13631
13632 2008-05-09 Doug Evans <dje@google.com>
13633
13634 * server.h (decode_search_memory_packet): Declare.
13635 * remote-utils.c (decode_search_memory_packet): New fn.
13636 * server.c (handle_search_memory_1): New fn.
13637 (handle_search_memory): New fn.
13638 (handle_query): Process qSearch:memory packets.
13639
13640 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13641
13642 * regcache.c (registers_length): Remove.
13643 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13644 full register packet.
13645 * regcache.h (registers_length): Remove prototype.
13646 * server.h (PBUFSIZ): Define to 16384.
13647
13648 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13649
13650 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13651 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13652 powerpc-64l.o, and powerpc-altivec64l.o.
13653 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13654 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13655 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13656 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13657 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13658 to srv_xmlfiles.
13659
13660 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13661 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13662 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13663 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13664 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13665 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13666 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13667 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13668 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13669 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13670 (clean): Update.
13671
13672 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13673 (init_registers_powerpc_32l): ... this new prototype.
13674 (init_registers_powerpc_32): Remove, replace by ...
13675 (init_registers_powerpc_altivec32l): ... this new prototype.
13676 (init_registers_powerpc_e500): Remove, replace by ...
13677 (init_registers_powerpc_e500l): ... this new prototype.
13678 (init_registers_ppc64): Remove, replace by ...
13679 (init_registers_powerpc_64l): ... this new prototype.
13680 (init_registers_powerpc_64): Remove, replace by ...
13681 (init_registers_powerpc_altivec64l): ... this new prototype.
13682 (ppc_num_regs): Set to 73.
13683 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13684 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13685 (ppc_cannot_store_register): Handle orig_r3 and trap.
13686 (ppc_arch_setup): Update init_registers_... calls.
13687 (ppc_fill_gregset): Handle orig_r3 and trap.
13688
13689 * inferiors.c (clear_inferiors): Reset current_inferior.
13690
13691 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13692
13693 * acinclude.m4: Add override.m4.
13694 * configure: Regenerate.
13695
13696 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13697
13698 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13699 initial call to init_register_ppc64.
13700
13701 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13702
13703 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13704 single powerpc*-*-linux* case.
13705 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13706
13707 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13708
13709 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13710 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13711 from reg_xmlfiles.
13712 * linux-ppc-low.c: Include <elf.h>.
13713 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13714 (ppc_hwcap): New global variable.
13715 (ppc_regmap): Remove __SPE__ #ifdef sections.
13716 (ppc_regmap_e500): New global variable.
13717 (ppc_cannot_store_register): Update __SPE__ special case.
13718 (ppc_get_hwcap): New function.
13719 (ppc_arch_setup): Use it to determine whether inferior supports
13720 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13721 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13722 Do not access registers if target does not support AltiVec.
13723 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13724 Do not access registers if target does not support SPE.
13725 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13726
13727 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13728
13729 * linux-low.c (disabled_regsets, num_regsets): New.
13730 (use_regsets_p): Delete.
13731 (linux_wait_for_process): Clear disabled_regsets.
13732 (regsets_fetch_inferior_registers): Check and set it.
13733 (regsets_store_inferior_registers): Likewise.
13734 (linux_fetch_registers, linux_store_registers): Do not use
13735 use_regsets_p.
13736 (initialize_low): Allocate disabled_regsets.
13737
13738 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13739
13740 * Makefile.in (LIBOBJS): New.
13741 (OBS): Use LIBOBJS.
13742 (memmem.o): New rule.
13743 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13744 * configure: Regenerated.
13745
13746 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13747
13748 * server.c (handle_query): Never return "unsupported" for
13749 qXfer:features:read queries.
13750
13751 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13752
13753 * server.c (get_features_xml): Fix inverted condition.
13754 (handle_query): Always support qXfer:feature:read.
13755
13756 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13757
13758 * server.c (wrapper_argv): New.
13759 (start_inferior): Handle wrapper_argv. If set, expect an extra
13760 trap.
13761 (gdbserver_usage): Document --wrapper.
13762 (main): Parse --wrapper.
13763
13764 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13765
13766 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13767 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13768 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13769 (ppc_set_pc): Likewise.
13770 (ppc_arch_setup): New function.
13771 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13772 of collect_register.
13773 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13774
13775 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13776
13777 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13778 instead of linux-ppc64-low.o.
13779 * linux-ppc64-low.c: Remove file.
13780 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13781 (linux-ppc64-low.o): Remove rule.
13782
13783 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13784 (init_registers_powerpc_64): Likewise.
13785 (ppc_regmap): Conditionally define depending on __powerpc64__.
13786 (ppc_cannot_store_register): Do not special-case "fpscr" when
13787 compiled on __powerpc64__.
13788 (ppc_collect_ptrace_register): New function.
13789 (ppc_supply_ptrace_register): New function.
13790 (ppc_breakpoint): Change type to "unsigned int".
13791 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13792 (the_low_target): Conditionally provide initializers for the
13793 arch_setup member depending on __powerpc64__. Install
13794 collect_ptrace_register and supply_ptrace_register members.
13795
13796 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13797
13798 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13799 * server.c (gdbserver_xmltarget): Define.
13800 (get_features_xml): Use it to replace "target.xml" and arch_string.
13801
13802 * configure.srv: Remove srv_xmltarget. Add XML files that were
13803 mentioned there to srv_xmlfiles instead. Remove conditional tests
13804 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13805 srv_xmlfiles and srv_regobj to include all possible choices.
13806 * configure.ac (srv_xmltarget): Remove.
13807 (srv_xmlfiles): Do not add "target.xml".
13808 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13809 checks for supplementary target information.
13810 * configure: Regenerate.
13811 * Makefile.in (XML_TARGET): Remove.
13812 (target.xml): Remove rule.
13813 (clean): Do not clean up target.xml.
13814 (.PRECIOUS): Do not mention target.xml.
13815
13816 * target.h (struct target_ops): Remove arch_string member.
13817 * linux-low.c (linux_arch_string): Remove.
13818 (linux_target_ops): Remove arch_string initializer.
13819 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13820 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13821 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13822 * spu-low.c (spu_arch_string): Remove.
13823 (spu_target_ops): Remove arch_string initializer.
13824 * win32-low.c (win32_arch_string): Remove.
13825 (win32_target_ops): Remove arch_string initializer.
13826 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13827 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13828 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13829
13830 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13831
13832 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13833 by collect_ptrace_register and supply_ptrace_register hooks.
13834 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13835 instead of checking for the_low_target.left_pad_xfer.
13836 (usr_store_inferior_registers): Use collect_ptrace_register callback
13837 instead of checking for the_low_target.left_pad_xfer.
13838
13839 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13840 (s390_supply_ptrace_register): Likewise.
13841 (s390_fill_gregset): Call s390_collect_ptrace_register.
13842 (the_low_target): Update.
13843
13844 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13845 (ppc_supply_ptrace_register): Likewise.
13846 (the_low_target): Update.
13847
13848 * linux-i386-low.c (the_low_target): Update.
13849 * linux-x86-64-low.c (the_low_target): Update.
13850
13851 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13852
13853 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13854 reg-s390.o and reg-s390x.o.
13855
13856 * linux-low.c (new_inferior): New global variable.
13857 (linux_create_inferior, linux_attach): Set it.
13858 (linux_wait_for_process): Call the_low_target.arch_setup after the
13859 target has stopped for the first time.
13860 (initialize_low): Do not call the_low_target.arch_setup.
13861
13862 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13863 (s390_set_pc): Likewise.
13864 (s390_arch_setup): New function.
13865 (the_low_target): Use s390_arch_setup as arch_setup routine.
13866
13867 * regcache.c (realloc_register_cache): New function.
13868 (set_register_cache): Call it for each existing regcache.
13869
13870 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13871
13872 * server.h (init_registers): Remove prototype.
13873
13874 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13875 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13876 instead of init_registers ().
13877 * linux-arm-low.c (init_registers_arm): Add prototype.
13878 (init_registers_arm_with_iwmmxt): Likewise.
13879 (the_low_target): Add initializer for arch_setup field.
13880 * linux-cris-low.c (init_registers_cris): Add prototype.
13881 (the_low_target): Add initializer for arch_setup field.
13882 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13883 (the_low_target): Add initializer for arch_setup field.
13884 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13885 (the_low_target): Add initializer for arch_setup field.
13886 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13887 (the_low_target): Add initializer for arch_setup field.
13888 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13889 (the_low_target): Add initializer for arch_setup field.
13890 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13891 (the_low_target): Add initializer for arch_setup field.
13892 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13893 (init_registers_mips64_linux): Likewise.
13894 (the_low_target): Add initializer for arch_setup field.
13895 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13896 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13897 (the_low_target): Add initializer for arch_setup field.
13898 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13899 (init_registers_powerpc_64): Likewise.
13900 (the_low_target): Add initializer for arch_setup field.
13901 * linux-s390-low.c (init_registers_s390): Add prototype.
13902 (init_registers_s390x): Likewise.
13903 (the_low_target): Add initializer for arch_setup field.
13904 * linux-sh-low.c (init_registers_sh): Add prototype.
13905 (the_low_target): Add initializer for arch_setup field.
13906 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13907 (the_low_target): Add initializer for arch_setup field.
13908 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13909 (the_low_target): Add initializer for arch_setup field.
13910
13911 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13912 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13913 instead of init_registers ().
13914 * win32-arm-low.c (init_registers_arm): Add prototype.
13915 (the_low_target): Add initializer for arch_setup field.
13916 * win32-i386-low.c (init_registers_i386): Add prototype.
13917 (the_low_target): Add initializer for arch_setup field.
13918
13919 * spu-low.c (init_registers_spu): Add prototype.
13920 (initialize_low): Call initialie_registers_spu () instead of
13921 initialize_registers ().
13922
13923 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13924
13925 * server.c (handle_v_requests): When handling the vRun and vAttach
13926 packets, if already debugging a process, don't kill it. Return an
13927 error instead.
13928
13929 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13930
13931 * server.c (handle_query): Correct length check.
13932
13933 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13934
13935 * win32-low.c (do_initial_child_stuff): Add process handle
13936 parameter. Set current_process_handle and current_process_id from the
13937 parameters. Clear globals.
13938 (win32_create_inferior): Don't set current_process_handle and
13939 current_process_id here. Instead pass them on the call to
13940 do_initial_child_stuff.
13941 (win32_attach): Likewise.
13942 (win32_clear_inferiors): New.
13943 (win32_kill): Don't close the current process handle or the
13944 current thread handle here. Instead call win32_clear_inferiors.
13945 (win32_detach): Don't open a new handle to the process. Call
13946 win32_clear_inferiors.
13947 (win32_join): Don't rely on current_process_handle; open a new
13948 handle using the process id.
13949 (win32_wait): Call win32_clear_inferiors when the inferior process
13950 has exited.
13951
13952 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13953
13954 * server.c (monitor_show_help): Add "exit".
13955
13956 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13957
13958 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13959 (clean): Add reg-xtensa.c.
13960 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13961 * configure.srv (xtensa*-*-linux*) New target.
13962 * linux-xtensa-low.c: New.
13963 * xtensa-xtregs.c: New.
13964
13965 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13966
13967 * hostio.c: Don't include errno.h.
13968 (errno_to_fileio_errno): Move to hostio-errno.
13969 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13970 error number outputting to the target->hostio_last_error callback.
13971 (hostio_packet_error): Use FILEIO_EINVAL directly.
13972 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13973 calls to hostio_error.
13974 * hostio-errno.c: New.
13975 * server.h (hostio_last_error_from_errno): Declare.
13976 * target.h (target_ops): Add hostio_last_error member.
13977 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13978 as hostio_last_error handler.
13979 * spu-low.c (spu_target_ops): Likewise.
13980 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13981 (wince_hostio_last_error): New functions.
13982 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13983 as hostio_last_error handler.
13984 (win32_target_ops) [!_WIN32_WCE]: Register
13985 hostio_last_error_from_errno as hostio_last_error handler.
13986 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13987 (hostio-errno.o): New rule.
13988 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13989 * configure.srv (srv_hostio_err_objs): New variable. Default to
13990 hostio-errno.o.
13991 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13992 * configure: Regenerate.
13993
13994 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13995
13996 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13997 (linux_kill, linux_detach): Clean up the process list.
13998 * remote-utils.c (remote_open): Improve port number parsing.
13999 (putpkt_binary, input_interrupt): Only send interrupts if the target
14000 is running.
14001 * server.c (extended_protocol): Make static.
14002 (attached): Define earlier.
14003 (exit_requested, response_needed, program_argv): New variables.
14004 (target_running): New.
14005 (start_inferior): Clear attached here.
14006 (attach_inferior): Set attached here.
14007 (require_running): Define.
14008 (handle_query): Use require_running and target_running. Implement
14009 "monitor exit".
14010 (handle_v_attach, handle_v_run): New.
14011 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14012 (gdbserver_usage): Update.
14013 (main): Redo argument parsing. Handle --debug and --multi. Handle
14014 --attach along with other options or after the port. Save
14015 program_argv. Support no initial program. Resynchronize
14016 communication with GDB after an error. Handle "monitor exit".
14017 Use require_running and target_running. Always allow the extended
14018 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14019 restart in extended mode.
14020 * README: Refer to the GDB manual. Update --attach usage.
14021
14022 2007-12-20 Andreas Schwab <schwab@suse.de>
14023
14024 * linux-low.c (STACK_SIZE): Define.
14025 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14026 (linux_test_for_tracefork): Likewise.
14027
14028 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14029
14030 * linux-low.c (linux_wait_for_event): Update messages. Do not
14031 reinsert auto-delete breakpoints.
14032 * mem-break.c (struct breakpoint): Change return type of handler to
14033 int.
14034 (set_breakpoint_at): Update handler type.
14035 (reinsert_breakpoint_handler): Return 1 instead of calling
14036 delete_breakpoint.
14037 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14038 setting a new one.
14039 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14040 * mem-break.h (set_breakpoint_at): Update handler type.
14041 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14042 * win32-low.c (auto_delete_breakpoint): New.
14043 (get_child_debug_event): Use it.
14044
14045 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14046
14047 * configure.ac: Check for pread and pwrite.
14048 * hostio.c (handle_pread): Fall back to lseek and read.
14049 (handle_pwrite): Fall back to lseek and write.
14050 * config.in, configure: Regenerated.
14051
14052 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14053
14054 * server.c (myresume): Add own_buf argument.
14055 (main): Update calls.
14056
14057 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14058
14059 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14060 * remote-utils.c (remote_open): Do not call disable_async_io.
14061 (block_async_io): Delete.
14062 (unblock_async_io): Make static.
14063 (initialize_async_io): New.
14064 * server.c (handle_v_cont): Handle async I/O here.
14065 (myresume): Likewise. Move other common resume tasks here...
14066 (main): ... from here. Call initialize_async_io. Disable async
14067 I/O before the main loop.
14068 * server.h (initialize_async_io): Declare.
14069 (block_async_io, unblock_async_io): Delete prototypes.
14070 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14071
14072 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14073
14074 * remote-utils.c (readchar): Allow binary data in received messages.
14075
14076 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14077
14078 * win32-low.c (attaching): New global.
14079 (win32_create_inferior): Clear the `attaching' global.
14080 (win32_attach): Set the `attaching' global.
14081 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14082 attaching. Only set a breakpoint at the entry point if not
14083 attaching.
14084
14085 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14086
14087 * server.c (main): Don't report dll events on the initial
14088 connection on attaches.
14089
14090 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14091
14092 * server.c (main): Relax numerical bases supported for the pid of
14093 the --attach command line argument.
14094
14095 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14096
14097 * win32-low.c (win32_attach): Call OpenProcess before
14098 DebugActiveProcess, not after. Add last error output to error
14099 call.
14100
14101 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14102
14103 * win32-low.c (win32_get_thread_context)
14104 (win32_set_thread_context): New functions.
14105 (thread_rec): Use win32_get_thread_context.
14106 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14107 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14108 field.
14109
14110 2007-12-03 Leo Zayas
14111 Pedro Alves <pedro_alves@portugalmail.pt>
14112
14113 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14114 global variables.
14115 (child_add_thread): Minor cleanup.
14116 (child_continue): Resume artificially suspended threads before
14117 calling ContinueDebugEvent.
14118 (suspend_one_thread): New.
14119 (fake_breakpoint_event): New.
14120 (get_child_debug_event): Change return type to int. Check here if
14121 gdb sent an interrupt request. If a soft interrupt was requested,
14122 fake a breakpoint event. Return 0 if there is no event to handle,
14123 and 1 otherwise.
14124 (win32_wait): Don't check here if gdb sent an interrupt request.
14125 Ensure there is a valid event to handle.
14126 (win32_request_interrupt): Add soft interruption method as last
14127 resort.
14128
14129 2007-12-03 Leo Zayas
14130 Pedro Alves <pedro_alves@portugalmail.pt>
14131
14132 * win32-low.h (win32_thread_info): Add descriptions to the
14133 structure members. Replace `suspend_count' counter by a
14134 `suspended' flag.
14135 * win32-low.c (thread_rec): Update condition of when to get the
14136 context from the inferior. Rely on ContextFlags being set if it
14137 has already been retrieved. Only suspend the inferior thread if
14138 we haven't already. Warn if that fails.
14139 (continue_one_thread): s/suspend_count/suspended/. Only call
14140 ResumeThread once. Warn if that fails.
14141
14142 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14143
14144 * win32-low.c (win32_wait): Don't read from the inferior when it
14145 has already exited.
14146
14147 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14148
14149 * Makefile.in (win32_low_h): New variable.
14150 (win32-low.o): Add dependency on $(win32_low_h).
14151 (win32-arm-low.o, win32-i386-low.o): New rules.
14152
14153 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14154
14155 * hostio.c: Correct copyright year.
14156
14157 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14158
14159 * Makefile.in (OBS): Add hostio.o.
14160 (hostio.o): New rule.
14161 * server.h (handle_vFile): Declare.
14162 * hostio.c: New file.
14163 * server.c (handle_v_requests): Take packet_len and new_packet_len
14164 for binary packets. Call handle_vFile.
14165 (main): Update call to handle_v_requests.
14166
14167 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14168
14169 * linux-low.c: Include <sched.h>.
14170
14171 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14172
14173 * linux-low.c (linux_tracefork_grandchild): New.
14174 (linux_tracefork_child): Use clone.
14175 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14176
14177 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14178
14179 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14180
14181 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14182
14183 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14184
14185 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14186
14187 * inferiors.c (change_inferior_id): Delete.
14188 (add_pid_to_list, pull_pid_from_list): New.
14189 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14190 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14191 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14192 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14193 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14194 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14195 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14196 (using_threads): Always set to 1.
14197 (handle_extended_wait): New.
14198 (add_process): Do not set TID.
14199 (linux_create_inferior): Set must_set_ptrace_flags.
14200 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14201 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14202 (linux_thread_alive): Rename TID argument to LWPID.
14203 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14204 (linux_wait_for_event): Do not use TID or check using_threads. Update
14205 call to dead_thread_notify. Call handle_extended_wait.
14206 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14207 (send_sigstop): Delete sigstop_sent.
14208 (wait_for_sigstop): Avoid TID.
14209 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14210 (linux_test_for_tracefork): New.
14211 (linux_lookup_signals): Use thread_db_active and
14212 linux_supports_tracefork_flag.
14213 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14214 * linux-low.h (get_process_thread): Avoid TID.
14215 (struct process_ifo): Move thread_known and tid to the end. Remove
14216 sigstop_sent.
14217 (linux_attach_lwp, thread_db_init): Update prototypes.
14218 * server.h (change_inferior_id): Delete prototype.
14219 (add_pid_to_list, pull_pid_from_list): New prototypes.
14220 * thread-db.c (thread_db_use_events): New.
14221 (find_first_thread): Rename to...
14222 (find_one_thread): ...this. Update callers and messages. Do not
14223 call fatal. Check thread_db_use_events. Do not call
14224 change_inferior_id or new_thread_notify.
14225 (maybe_attach_thread): Update. Do not call new_thread_notify.
14226 (thread_db_init): Set thread_db_use_events. Check use_events.
14227 * utils.c (fatal, warning): Correct message prefix.
14228
14229 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14230
14231 * Makefile.in (clean): Remove new files.
14232 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14233 (powerpc-64.o, powerpc-64.c): New rules.
14234 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14235 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14236 with SPE.
14237 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14238 SPE targets.
14239 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14240 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14241 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14242 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14243 (target_regsets): Add AltiVec and SPE register sets.
14244 * configure.ac: Check for AltiVec and SPE.
14245 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14246 (ppc_fill_vrregset, ppc_store_vrregset): New.
14247 (target_regsets): Add AltiVec register set.
14248 * configure: Regenerated.
14249
14250 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14251
14252 * linux-low.c (O_LARGEFILE): Define.
14253 (linux_read_memory): Use /proc/PID/mem.
14254 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14255 * configure, config.in: Regenerated.
14256
14257 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14258
14259 * linux-low.c (linux_wait_for_event): Do not pass signals while
14260 single-stepping.
14261
14262 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14263
14264 * win32-low.c (create_process): New.
14265 (win32_create_inferior): Use create_process instead of
14266 CreateProcess. If create_process failed retry appending an ".exe"
14267 suffix. Store the GetLastError result immediatelly after
14268 create_process calls and use it on the call to error.
14269
14270 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14271
14272 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14273
14274 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14275
14276 * configure.ac: Switch license to GPLv3.
14277
14278 2007-08-01 Michael Snyder <msnyder@access-company.com>
14279
14280 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14281
14282 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14283
14284 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14285 typedef.
14286 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14287 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14288 CloseToolhelp32Snapshot.
14289 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14290 CloseToolhelp32Snapshot.
14291
14292 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14293
14294 * server.c (main): Check for inferior exit before main loop.
14295
14296 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14297
14298 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14299 instead of on tmp_desc.
14300
14301 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14302 Daniel Jacobowitz <dan@codesourcery.com>
14303
14304 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14305 (add_thread): Minor cleanups.
14306 (clear_inferiors): Move lower in the file. Clear the DLL
14307 list.
14308 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14309 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14310 (xml_escape_text): New.
14311 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14312 for qSupported.
14313 (handle_v_cont): Report errors.
14314 (gdbserver_version): Update.
14315 (main): Correct size of own_buf. Do not report initial DLL events.
14316 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14317 (unloaded_dll, xml_escape_text): New.
14318 * win32-low.c (enum target_waitkind): Update comments.
14319 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14320 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14321 (win32_EnumProcessModules, win32_GetModuleInformation)
14322 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14323 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14324 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14325 (win32_Module32First, win32_Module32Next, load_toolhelp)
14326 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14327 (get_child_debug_event): Handle DLL events.
14328 (win32_wait): Likewise.
14329
14330 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14331
14332 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14333 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14334
14335 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14336
14337 * win32-low.c (handle_output_debug_string): Ignore event if not
14338 waiting.
14339
14340 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14341
14342 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14343
14344 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14345
14346 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14347
14348 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14349
14350 * inferiors.c (change_inferior_id): Add comment.
14351 * linux-low.c (check_removed_breakpoint): Add an early
14352 prototype. Improve debug output.
14353 (linux_attach): Doc update.
14354 (linux_detach_one_process, linux_detach): Clean up before releasing
14355 each process.
14356 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14357 * linux-low.h (struct process_info): Doc improvement.
14358 * mem-break.c (delete_all_breakpoints): New.
14359 * mem-break.h (delete_all_breakpoints): New prototype.
14360 * thread-db.c (find_first_thread): New.
14361 (thread_db_create_event): Call it instead of
14362 thread_db_find_new_threads. Clean up unused variables.
14363 (maybe_attach_thread): Remove first thread handling.
14364 (thread_db_find_new_threads): Use find_first_thread.
14365 (thread_db_get_tls_address): Likewise.
14366
14367 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14368
14369 * thread-db.c (thread_db_find_new_threads): Add prototype.
14370 (thread_db_create_event): Check for the main thread before adding
14371 a new thread.
14372 (maybe_attach_thread): Only enable event reporting if TID == 0.
14373 (thread_db_get_tls_address): Check for new threads.
14374
14375 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14376
14377 * linux-low.c (linux_create_inferior): Try execv before execvp.
14378 * spu-low.c (spu_create_inferior): Likewise.
14379
14380 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14381
14382 * linux-low.c (linux_create_inferior): Change execv to execvp.
14383 * spu-low.c (spu_create_inferior): Likewies.
14384
14385 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14386
14387 * Makefile.in (clean): Clean new files instead of deleted ones.
14388 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14389 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14390 rules.
14391 * configure.srv: Specify XML files and new regformats for MIPS and
14392 MIPS64 GNU/Linux.
14393 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14394 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14395 an entry for the restart register.
14396 (mips_cannot_fetch_register, mips_cannot_store_register)
14397 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14398 register names to match the XML descriptions.
14399 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14400 restart register instead of $0.
14401
14402 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14403 Markus Deuling <deuling@de.ibm.com>
14404
14405 * remote-utils.c (decode_xfer_write): New function.
14406 * server.h (decode_xfer_write): Add prototype.
14407 * server.c (handle_query): Add PACKET_LEN argument. Support
14408 qXfer:spu:read and qXfer:spu:write packets.
14409 (main): Pass packet_len to handle_query.
14410 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14411 * target.h (target_ops): Add qxfer_spu.
14412
14413 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14414
14415 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14416 accessing non-seekable spufs files.
14417
14418 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14419
14420 * server.c (handle_query): Add reply for qC packet.
14421
14422 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14423 Leo Zayas <lerele@champenstudios@com>
14424
14425 * server.h (check_remote_input_interrupt_request): New function.
14426 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14427 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14428 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14429 (check_remote_input_interrupt_request): New function.
14430 * server.h (check_remote_input_interrupt_request): Declare.
14431 * win32-low.c (winapi_DebugBreakProcess,
14432 winapi_GenerateConsoleCtrlEvent): New typedefs.
14433 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14434 to 250 ms.
14435 (win32_wait): Check for remote interrupt request
14436 with check_remote_input_interrupt_request.
14437 (win32_request_interrupt): New function.
14438 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14439
14440 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14441
14442 * win32-low.c (debug_registers_changed,
14443 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14444 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14445 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14446 (thread_rec): Get context using the low target.
14447 (child_add_thread): Call thread_added on the low target,
14448 which does the same thing.
14449 (regptr): Delete.
14450 (do_initial_child_stuff): Remove debug registers references.
14451 Set context using the low target. Resume threads after
14452 setting the contexts.
14453 (child_continue): Remove dead variable. Remove debug
14454 registers references.
14455 (child_fetch_inferior_registers): Go through the low target.
14456 (do_child_store_inferior_registers): Remove.
14457 (child_store_inferior_registers): Go through the low target.
14458 (win32_resume): Remove debug registers references.
14459 Set context using the low target.
14460 (handle_exception): Change return type to void. Don't record
14461 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14462 first chance exception.
14463 (get_child_debug_event): Change return type to void. Remove
14464 goto loop. Always return after waiting for debug event.
14465 (win32_wait): Convert to switch statement. Handle spurious
14466 events.
14467
14468 * win32-i386-low.c (debug_registers_changed,
14469 debug_registers_used): New.
14470 (initial_stuff): Rename to ...
14471 (i386_initial_stuff): ... this. Clear debug registers
14472 state variables.
14473 (store_debug_registers): Delete.
14474 (i386_get_thread_context): New.
14475 (load_debug_registers): Delete.
14476 (i386_set_thread_context): New.
14477 (i386_thread_added): New.
14478 (single_step): Rename to ...
14479 (i386_single_step): ... this.
14480 (do_fetch_inferior_registers): Rename to ...
14481 (i386_fetch_inferior_register): ... this.
14482 (i386_store_inferior_register): New.
14483 (the_low_target): Adapt to new interface.
14484
14485 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14486 (arm_get_thread_context): New.
14487 (arm_set_thread_context): New.
14488 (regptr): New.
14489 (do_fetch_inferior_registers): Rename to ...
14490 (arm_fetch_inferior_register): ... this.
14491 (arm_store_inferior_register): New.
14492 (arm_wince_breakpoint): Reimplement as unsigned long.
14493 (arm_wince_breakpoint_len): Define.
14494 (the_low_target): Adapt to new interface.
14495
14496 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14497 load_debug_registers. Add get_thread_context, set_thread_context,
14498 thread_added and store_inferior_register. Rename
14499 fetch_inferior_registers to fetch_inferior_register.
14500 (regptr): Remove declaration.
14501
14502 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14503
14504 * linux-low.c (linux_detach): Change return type to int. Return 0.
14505 * spu-low.c (spu_detach): Likewise.
14506
14507 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14508
14509 * target.h (target_ops): Change return type of detach to int.
14510 Add join.
14511 (join_inferior): New.
14512 * server.c (main): Don't skip detach support on mingw32.
14513 If the inferior doesn't support detaching return error.
14514 Call join_inferior instead of using waitpid.
14515 * linux-low.c (linux_join): New.
14516 (linux_target_op): Add linux_join.
14517 * spu-low.c (spu_join): New.
14518 (spu_target_ops): Add spu_join.
14519 * win32-low.c (win32_detach): Adapt to new interface.
14520 Reopen current_process_handle before detaching. Issue a child
14521 resume before detaching.
14522 (win32_join): New.
14523 (win32_target_op): Add win32_join.
14524
14525 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14526
14527 * win32-low.c (win32-attach): Fix return value.
14528 * target.h (target_ops): Describe ATTACH return values.
14529
14530 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14531
14532 * win32-low.c (GETPROCADDRESS): Define.
14533 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14534 (winapi_DebugSetProcessKillOnExit): Likewise.
14535 (win32_create_inferior): Force usage of ansi CreateProcessA.
14536 (win32_attach): Use GETPROCADDRESS.
14537 (win32_detach): Likewise.
14538
14539 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14540
14541 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14542
14543 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14544
14545 * win32-low.c: Commit leftover changes from 2007-03-29.
14546
14547 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14548
14549 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14550 fields short instead of int. Add explicit padding.
14551 (i387_cache_to_fsave): Remove unnecessary casts.
14552 (i387_fsave_to_cache): Doc fix.
14553 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14554
14555 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14556
14557 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14558 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14559
14560 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14561
14562 * configure.srv (arm*-*-mingw32ce*): Move near the other
14563 arm targets.
14564
14565 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14566
14567 * configure.ac: Add errno checking.
14568 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14569 sys/file.h and malloc.h.
14570 (AC_CHECK_DECLS): Add perror.
14571 (srv_mingwce): Handle.
14572 * configure.srv (i[34567]86-*-cygwin*): Add
14573 win32-i386-low.o to srv_tgtobj.
14574 (i[34567]86-*-mingw*): Likewise.
14575 (arm*-*-mingw32ce*): Add case.
14576 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14577 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14578 [__MINGW32CE__] (strerror): New function.
14579 [__MINGW32CE__] (errno): Define to GetLastError.
14580 [__MINGW32CE__] (COUNTOF): New macro.
14581 (remote_open): Remove extra close call.
14582 * mem-break.c (delete_breakpoint_at): New function.
14583 * mem-break.h (delete_breakpoint_at): Declare.
14584 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14585 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14586 [USE_WIN32API] (read, write): Add char* casts.
14587 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14588 * server.h: Include wincecompat.h on Windows CE.
14589 [HAVE_ERRNO_H]: Check.
14590 (perror): Declare if not declared.
14591 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14592 (perror_with_name): Remove errno declaration.
14593 * wincecompat.h: New.
14594 * wincecompat.c: New.
14595 * win32-low.h: New.
14596 * win32-arm-low.c: New.
14597 * win32-i386-low.c: New.
14598 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14599 (OUTMSG2): Make it safe.
14600 (_T): New macro.
14601 (COUNTOF): New macro.
14602 (NUM_REGS): Get it from the low target.
14603 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14604 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14605 (thread_rec): Let low target handle debug registers.
14606 (child_add_thread): Likewise.
14607 (child_init_thread_list): Likewise.
14608 (continue_one_thread): Likewise.
14609 (regptr): New.
14610 (do_child_fetch_inferior_registers): Move to ...
14611 * win32-i386-low.c: ... here, and rename to ...
14612 (do_fetch_inferior_registers): ... this.
14613 * win32-low.c (child_fetch_inferior_registers):
14614 Go through the low target.
14615 (do_child_store_inferior_registers): Use regptr.
14616 (strwinerror): New function.
14617 (win32_create_inferior): Handle Windows CE.
14618 Use strwinerror instead of strerror on Windows error
14619 codes. Add program to the error output.
14620 Don't close the main thread handle on Windows CE.
14621 (win32_attach): Use coredll.dll on Windows CE.
14622 (win32_kill): Close current process and current
14623 thread handles.
14624 (win32_detach): Use coredll.dll on Windows CE.
14625 (win32_resume): Let low target handle debug registers, and
14626 step request.
14627 (handle_exception): Add/Remove initial breakpoint. Avoid
14628 non-existant WSTOPSIG on Windows CE.
14629 (win32_read_inferior_memory): Cast to remove warning.
14630 (win32_arch_string): Go through the low target.
14631 (initialize_low): Call set_breakpoint_data with the low
14632 target's breakpoint.
14633 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14634 FOP_REGNUM, mappings): Move to ...
14635 * win32-i386-low.c: ... here.
14636 * win32-low.c (win32_thread_info): Move to ...
14637 * win32-low.h: ... here.
14638 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14639 win32-arm-low.c and wincecompat.c.
14640 (all:): Add $EXEEXT.
14641 (install-only:): Likewise.
14642 (gdbserver:): Likewise.
14643 (gdbreplay:): Likewise.
14644 * config.in: Regenerate.
14645 * configure: Regenerate.
14646
14647 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14648
14649 * win32-low.c: Rename typedef thread_info to
14650 win32_thread_info throughout.
14651
14652 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14653
14654 * win32-i386-low.c: Rename to ...
14655 * win32-low.c: ... this.
14656 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14657 * Makefile.in: Likewise.
14658
14659 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14660
14661 * remote-utils.c (monitor_output): Constify msg parameter.
14662 * server.h (monitor_output): Likewise.
14663 * win32-i386-low.c (handle_output_debug_string): New.
14664 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14665 handle_output_debug_string.
14666 (get_child_debug_event): Likewise.
14667
14668 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14669
14670 * server.c (main): Correct strtoul check.
14671
14672 2007-03-27 Jon Ringle <jon@ringle.org>
14673
14674 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14675
14676 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14677
14678 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14679
14680 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14681
14682 * terminal.h: Check HAVE_SGTTY_H.
14683
14684 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14685
14686 * remote-utils.c (remote_open): Print out the assigned port number.
14687
14688 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14689
14690 * remote-utils.c (monitor_output): New function.
14691 * server.c (debug_threads): Define here.
14692 (monitor_show_help): New function.
14693 (handle_query): Handle qRcmd.
14694 (main): Do not handle 'd' packet.
14695 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14696 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14697 of debug_threads.
14698
14699 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14700
14701 * Makefile.in (EXEEXT): New.
14702 (clean): Use $(EXEEXT).
14703
14704 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14705
14706 * target.h (target_ops): Rename send_signal to request_interrupt,
14707 and remove enum target_signal parameter.
14708 * linux-low.c (linux_request_interrupt): Rename from
14709 linux_send_signal, and always send SIGINT.
14710 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14711 and always send SIGINT.
14712 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14713 of send_signal.
14714 (input_interrupt): Likewise.
14715
14716 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14717
14718 * server.c (get_features_xml): Check if target implemented
14719 arch_string.
14720 * win32-i386-low.c (win32_arch_string): New.
14721 (win32_target_ops): Add win32_arch_string as arch_string member.
14722
14723 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14724
14725 * spu-low.c (spu_arch_string): New.
14726 (spu_target_ops): Add spu_arch_string.
14727
14728 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14729
14730 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14731 * configure.ac: Do not check for terminal.h.
14732 * configure, config.in: Regenerated.
14733
14734 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14735
14736 * Makefile.in (OBS): Add $(XML_BUILTIN).
14737 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14738 (clean): Update.
14739 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14740 (arm-with-iwmmxt.c): New.
14741 * config.in, configure: Regenerate.
14742 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14743 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14744 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14745 (arm*-*-linux*): Add iWMMXt and regset support.
14746 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14747 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14748 (arm_store_wmmxregset, target_regsets): New.
14749 * server.c (get_features_xml): Take annex argument. Check builtin
14750 XML documents.
14751 (handle_query): Handle multiple annexes.
14752
14753 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14754
14755 * remote-utils.c [USE_WIN32API] (read, write): Define.
14756 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14757 write.
14758
14759 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14760
14761 * linux-i386-low.c (the_low_target): Set arch_string.
14762 * linux-x86-64-low.c (the_low_target): Likewise.
14763 * linux-low.c (linux_arch_string): New.
14764 (linux_target_ops): Add it.
14765 * linux-low.h (struct linux_target_ops): Add arch_string.
14766 * server.c (write_qxfer_response): Use const void * for DATA.
14767 (get_features_xml): New.
14768 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14769 * target.h (struct target_ops): Add arch_string method.
14770
14771 2007-01-03 Denis Pilat <denis.pilat@st.com>
14772 Daniel Jacobowitz <dan@codesourcery.com>
14773
14774 * linux-low.c (linux_kill): Handle being called with no threads.
14775 * win32-i386-low.c (win32_kill): Likewise.
14776 (get_child_debug_event): Clear current_process_handle.
14777
14778 2006-12-30 Denis PILAT <denis.pilat@st.com>
14779 Daniel Jacobowitz <dan@codesourcery.com>
14780
14781 * remote-utils.c (remote_open): Check the type of specified
14782 serial port devices before opening them.
14783 * server.c (main): Kill the inferior if an error occurs during
14784 the first remote_open.
14785
14786 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14787
14788 * README: Update supported targets.
14789
14790 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14791
14792 * Makefile.in (clean): Remove reg-mips64.c.
14793 (reg-mips64.c, reg-mips64.o): New rules.
14794 * configure.srv: Handle mips64. Include regset support for mips.
14795 * linux-mips-low.c (union mips_register): New.
14796 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14797 (mips_breakpoint, mips_breakpoint_at): Use int.
14798 (mips_collect_register, mips_supply_register)
14799 (mips_collect_register_32bit, mips_supply_register_32bit)
14800 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14801 (mips_store_fpregset, target_regsets): New.
14802 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14803
14804 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14805
14806 * configure.srv: Add target "spu*-*-*".
14807 * Makefile.in (clean): Remove reg-spu.c.
14808 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14809 * spu-low.c: New file.
14810
14811 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14812
14813 * configure.ac: Correct td_thr_tls_get_addr test.
14814 * configure: Regenerated.
14815
14816 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14817
14818 * linux-low.c (linux_wait_for_event): Reformat. Use the
14819 pass_signals array.
14820 * remote-utils.c (decode_address_to_semicolon): New.
14821 * server.c (pass_signals, handle_general_set): New.
14822 (handle_query): Mention QPassSignals for qSupported.
14823 (main): Call handle_general_set.
14824 * server.h (pass_signals, decode_address_to_semicolon): New.
14825
14826 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14827
14828 * server.c (handle_query): Correct error handling for read_auxv.
14829
14830 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14831
14832 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14833 and srv_linux_thread_db to yes.
14834 * linux-s390-low.c (s390_fill_gregset): New function.
14835 (target_regsets): Define data structure.
14836
14837 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14838
14839 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14840 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14841 * config.in, configure: Regenerated.
14842 * inferiors.c (gdb_id_to_thread): New function.
14843 (gdb_id_to_thread_id): Use it.
14844 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14845 * linux-low.h (struct process_info): Add th member.
14846 (thread_db_get_tls_address): New prototype.
14847 * remote-utils.c (decode_address): Make non-static.
14848 * server.c (handle_query): Handle qGetTLSAddr.
14849 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14850 * target.h (struct target_ops): Add get_tls_address.
14851 * thread-db.c (maybe_attach_thread): Save the thread handle.
14852 (thread_db_get_tls_address): New.
14853
14854 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14855
14856 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14857 (linux_resume_one_process): Take a siginfo_t *. Update all
14858 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14859 (struct pending_signals): Add a siginfo_t.
14860 (linux_wait_for_process): Always set last_status.
14861 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14862 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14863 * linux-low.h (struct process_info): Add last_status.
14864
14865 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14866
14867 * remote-utils.c (try_rle): New function.
14868 (putpkt_binary): Use it.
14869
14870 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14871
14872 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14873 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14874 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14875 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14876 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14877 point registers.
14878
14879 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14880
14881 * server.c (terminal_fd): New variable.
14882 (old_foreground_pgrp): Likewise.
14883 (restore_old_foreground_pgrp): New function.
14884 (start_inferior): Record the terminal file descriptor in terminal_fd
14885 and its original foreground group in old_foreground_pgrp. Register
14886 restore_old_foreground_pgrp with atexit().
14887
14888 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14889
14890 * server.c (handle_query): Correct qPart to qXfer.
14891
14892 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14893
14894 * configure.ac: Check for more headers which are missing on
14895 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14896 * configure.srv: Add Cygwin and mingw32.
14897 * remote-utils.c: Don't include headers unconditionally which
14898 are missing on mingw32. Include <winsock.h> for mingw32.
14899 (remote_open): Adjust for mingw32 support. Flush
14900 standard error after writing to it.
14901 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14902 (unblock_async_io, enable_async_io, disable_async_io)
14903 (readchar, getpkt): Update for Winsock support.
14904 (prepare_resume_reply): Expect a protocol signal number.
14905 * server.c: Disable <sys/wait.h> on mingw32.
14906 (start_inferior): Adjust for mingw32 support. Flush
14907 standard error after writing to it.
14908 (attach_inferior): Likewise. Use protocol signal
14909 numbers.
14910 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14911 and names.
14912 * win32-i386-low.c: New file.
14913 * Makefile.in (XM_CLIBS): Set.
14914 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14915 (win32-i386-low.o): New dependency rule.
14916 * linux-low.c (linux_wait): Use target signal numbers.
14917 * target.h (struct target_ops): Doc fix.
14918 * server.h (target_signal_to_name): New prototype.
14919 * gdbreplay.c: Don't include headers unconditionally which
14920 are missing on mingw32. Include <winsock.h> for mingw32.
14921 (remote_close, remote_open): Adjust for Winsock support.
14922 * configure, config.in: Regenerated.
14923
14924 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14925
14926 * server.c (decode_xfer_read, write_qxfer_response): New.
14927 (handle_query): Take a packet length argument. Handle
14928 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14929 the qSupported response.
14930 (main): Update call to handle_query.
14931
14932 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14933
14934 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14935 (putpkt_binary): Renamed from putpkt and adjusted for binary
14936 data.
14937 (putpkt): New wrapper for putpkt_binary.
14938 (readchar): Don't mask off the high bit.
14939 (decode_X_packet): New function.
14940 * server.c (main): Call putpkt_binary if a handler sets the packet
14941 length. Save the length of the incoming packet. Handle 'X'.
14942 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14943
14944 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14945
14946 * server.c (handle_query): Handle qSupported.
14947
14948 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14949
14950 * remote-utils.c (all_symbols_looked_up): New variable.
14951 (look_up_one_symbol): Check it.
14952 * server.h (look_up_one_symbol): New declaration.
14953 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14954
14955 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14956
14957 * Makefile.in (linux-arm-low.o): Update dependencies.
14958 * linux-arm-low.c: Include "gdb_proc_service.h".
14959 (PTRACE_GET_THREAD_AREA): Define.
14960 (ps_get_thread_area): New function.
14961
14962 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14963
14964 * configure.srv (m68k*-*-uclinux*): New target.
14965 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14966 (linux_resume_one_process): Remove extraneous cast.
14967 (linux_read_offsets): New.
14968 (linux_target_op): Add linux_read_offsets on mmuless systems.
14969 * server.c (handle_query): Add qOffsets logic.
14970 * target.h (struct target_ops): Add read_offsets.
14971
14972 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14973
14974 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14975 (PTRACE_GET_THREAD_AREA): Define.
14976 (ps_get_thread_area): New function.
14977 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14978 (linux-x86-64-low.o): Update.
14979
14980 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14981
14982 * configure.ac: Remove checks for prfpregset_t.
14983 * gdb_proc_service.h: New file.
14984 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14985 new "gdb_proc_service.h".
14986 * proc-service.c: Likewise.
14987 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14988 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14989 * Makefile.in (gdb_proc_service_h): Updated.
14990 * configure, config.in: Regenerated.
14991
14992 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14993
14994 * remote-utils.c (prepare_resume_reply): Move declaration
14995 of gdb_id_from_wait to the top of the block.
14996
14997 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14998
14999 * linux-low.c (regsets_store_inferior_registers): Read the regset
15000 from the target before filling it.
15001
15002 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15003
15004 * server.c (attach_inferior): Return SIGTRAP for a successful
15005 attach.
15006
15007 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15008
15009 * Makefile.in (OBS): Add version.o.
15010 (STAGESTUFF): Delete.
15011 (version.o): Add dependencies.
15012 (version.c): Replace rule.
15013 (clean): Remove version.c.
15014 * server.c (gdbserver_version): New.
15015 (gdbserver_usage): Use printf.
15016 (main): Handle --version and --help.
15017 * server.h (version, host_name): Add declarations.
15018
15019 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15020
15021 * linux-arm-low.c:
15022 * linux-arm-low.c:
15023 * inferiors.c:
15024 * i387-fp.h:
15025 * i387-fp.c:
15026 * gdbreplay.c:
15027 * regcache.c:
15028 * proc-service.c:
15029 * mem-break.h:
15030 * mem-break.c:
15031 * linux-x86-64-low.c:
15032 * linux-sh-low.c:
15033 * linux-s390-low.c:
15034 * linux-ppc64-low.c:
15035 * linux-ppc-low.c:
15036 * linux-mips-low.c:
15037 * linux-m68k-low.c:
15038 * linux-m32r-low.c:
15039 * linux-low.h:
15040 * linux-low.c:
15041 * linux-ia64-low.c:
15042 * linux-i386-low.c:
15043 * linux-crisv32-low.c:
15044 * thread-db.c:
15045 * terminal.h:
15046 * target.h:
15047 * target.c:
15048 * server.h:
15049 * server.c:
15050 * remote-utils.c:
15051 * regcache.h:
15052 * utils.c:
15053 * Makefile.in:
15054 * configure.ac:
15055 * gdbserver.1: Add (C) after Copyright. Update the FSF
15056 address.
15057
15058 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15059
15060 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15061 (arm_breakpoint_at): Recognize both breakpoints.
15062 (the_low_target): Use the correct breakpoint instruction.
15063
15064 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15065
15066 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15067 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15068 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15069 (the_low_target): Update.
15070
15071 2005-10-25 Andreas Schwab <schwab@suse.de>
15072
15073 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15074
15075 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15076 (ia64_num_regs): Reduce to 462.
15077
15078 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15079
15080 * acinclude.m4: Correct quoting.
15081 * aclocal.m4: Regenerated.
15082
15083 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15084 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15085 (thread_db_init): Call thread_db_err_str.
15086 * configure.ac: Check for TD_VERSION.
15087 * config.in, configure: Regenerated.
15088
15089 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15090
15091 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15092
15093 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15094
15095 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15096 is not available. Define HAVE_PTRACE_GETREGS if it is.
15097 * config.in, configure: Regenerated.
15098 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15099 * linux-i386-low.c, linux-m68k-low.c: Update to use
15100 HAVE_PTRACE_GETREGS.
15101 * linux-low.c (regsets_fetch_inferior_registers)
15102 (regsets_store_inferior_registers): Only return 0 if we processed
15103 GENERAL_REGS.
15104 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15105 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15106
15107 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15108
15109 * inferiors.c (struct thread_info): Add gdb_id.
15110 (add_thread): Add gdb_id argument.
15111 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15112 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15113 calls to add_thread.
15114 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15115 * server.c (handle_query): Use thread_to_gdb_id.
15116 (handle_v_cont, main): Use gdb_id_to_thread_id.
15117 * server.h (add_thread): Update prototype.
15118 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15119 prototypes.
15120
15121 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15122
15123 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15124 left-padded registers.
15125 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15126 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15127
15128 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15129
15130 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15131 * configure: Regenerate.
15132 * config.in: Regenerate.
15133 * server.h (NEED_DECLARATION_STRERROR):
15134 Replace with !HAVE_DECL_STRERROR.
15135
15136 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15137
15138 * linux-low.c (linux_wait, linux_send_signal): Don't test
15139 an unsigned long variable for > 0 if it could be MAX_ULONG.
15140 * server.c (myresume): Likewise.
15141 * target.c (set_desired_inferior): Likewise.
15142
15143 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15144
15145 * configure.ac: Simplify and improve check for socklen_t.
15146 * configure, config.in: Regenerate.
15147
15148 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15149
15150 * acconfig.h: Remove.
15151 * configure.ac: Add a test for socklen_t. Use three-argument
15152 AC_DEFINE throughout.
15153 * config.in: Regenerated using autoheader 2.59.
15154 * configure: Regenerated.
15155
15156 * gdbreplay.c (socklen_t): Provide a default.
15157 (remote_open): Use socklen_t.
15158 * remote-utils.c (socklen_t): Provide a default.
15159 (remote_open): Use socklen_t.
15160 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15161 unsigned char.
15162
15163 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15164 char for buffers.
15165 * linux-low.c (linux_read_memory, linux_write_memory)
15166 (linux_read_auxv): Likewise.
15167 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15168 (check_mem_write): Likewise.
15169 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15170 Likewise.
15171 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15172 (registers_from_string, register_data): Likewise.
15173 * server.c (handle_query, main): Likewise.
15174 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15175 (decode_M_packet): Likewise.
15176 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15177 * target.h (struct target_ops): Update read_memory, write_memory,
15178 and read_auxv.
15179 (read_inferior_memory, write_inferior_memory): Update.
15180 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15181 to unsigned char *.
15182 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15183 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15184 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15185 linux-s390-low.c, linux-sh-low.c: Update for changes in
15186 read_inferior_memory and the_low_target->breakpoint.
15187
15188 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15189
15190 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15191 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15192 * configure.srv: Add powerpc64-*-linux*.
15193 * linux-ppc64-low.c: New file.
15194
15195 2005-05-23 Orjan Friberg <orjanf@axis.com>
15196
15197 * linux-cris-low.c: New file with support for CRIS.
15198 * linux-crisv32-low.c: Ditto for CRISv32.
15199 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15200 (clean): Add reg-cris.c and reg-crisv32.c.
15201 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15202 reg-crisv32.o, and reg-crisv32.c to make rules.
15203 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15204 recognized targets.
15205
15206 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15207
15208 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15209 of sizeof (PTRACE_XFER_TYPE).
15210 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15211
15212 2005-05-12 Orjan Friberg <orjanf@axis.com>
15213
15214 * target.h (struct target_ops): Add insert_watchpoint,
15215 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15216 pointers for hardware watchpoint support.
15217 * linux-low.h (struct linux_target_ops): Ditto.
15218 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15219 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15220 to linux_target_ops.
15221 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15222 reply packet.
15223 * server.c (main): Recognize 'Z' and 'z' packets.
15224
15225 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15226
15227 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15228 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15229 (the_low_target): Add new members.
15230
15231 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15232
15233 * proc-service.c (ps_lgetregs): Search all_processes instead of
15234 all_threads.
15235
15236 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15237
15238 * server.c (start_inferior): Change return type to int.
15239 (attach_inferior): Change sigptr to int *.
15240 (handle_v_cont, handle_v_requests): Change signal to int *.
15241 (main): Change signal to int.
15242
15243 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15244
15245 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15246 * configure.srv: Add m32r*-*-linux*.
15247 * linux-m32r-low.c: New file.
15248
15249 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15250
15251 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15252
15253 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15254
15255 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15256 Take unsigned long arguments for PIDs.
15257 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15258 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15259 (wait_for_sigstop, linux_resume_one_process)
15260 (regsets_fetch_inferior_registers, linux_send_signal)
15261 (linux_read_auxv): Likewise. Update the types of variables holding
15262 PIDs. Update format string specifiers.
15263 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15264 * remote-utils.c (prepare_resume_reply): Likewise.
15265 * server.c (cont_thread, general_thread, step_thread)
15266 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15267 unsigned long.
15268 (handle_query): Update format specifiers.
15269 (handle_v_cont, main): Use strtoul for thread IDs.
15270 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15271 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15272 (general_thread, step_thread, thread_from_wait)
15273 (old_thread_from_wait): Update.
15274 * target.h (struct thread_resume): Use unsigned long for THREAD.
15275 (struct target_ops): Use unsigned long for arguments to attach and
15276 thread_alive.
15277
15278 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15279
15280 * acinclude.m4: Include bfd/bfd.m4 directly.
15281 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15282 <agriffis@toolchain.org>.
15283 * aclocal.m4, configure: Regenerated.
15284
15285 2005-01-07 Andrew Cagney <cagney@gnu.org>
15286
15287 * configure.ac: Rename configure.in, require autoconf 2.59.
15288 * configure: Re-generate.
15289
15290 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15291
15292 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15293 LIBS when finished.
15294 * aclocal.m4: Regenerated.
15295 * configure: Regenerated.
15296
15297 2004-11-21 Andreas Schwab <schwab@suse.de>
15298
15299 * linux-m68k-low.c (m68k_num_gregs): Define.
15300 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15301 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15302 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15303 (m68k_breakpoint_at): New. Add to the_low_target.
15304
15305 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15306 srv_linux_thread_db to yes.
15307
15308 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15309
15310 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15311 (ARCH_SET_FS): Likewise.
15312 (ARCH_GET_FS): Likewise.
15313 (ARCH_GET_GS): Likewise.
15314
15315 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15316
15317 * linux-i386-low.c (ps_get_thread_area): New.
15318 * linux-x86-64-low.c (ps_get_thread_area): New.
15319 * linux-low.c: Include <sys/syscall.h>.
15320 (linux_kill_one_process): Don't kill the first thread here.
15321 (linux_kill): Kill the first thread here.
15322 (kill_lwp): New function.
15323 (send_sigstop, linux_send_signal): Use it.
15324 * proc-service.c: Clean up #ifdefs.
15325 (fpregset_info): Delete.
15326 (ps_lgetregs): Update and enable implementation.
15327 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15328 implementations.
15329 * remote-utils.c (struct sym_cache, symbol_cache): New.
15330 (input_interrupt): Print a clearer message.
15331 (async_io_enabled): New variable.
15332 (enable_async_io, disable_async_io): Use it. Update comments.
15333 (look_up_one_symbol): Use the symbol cache.
15334 * thread-db.c (thread_db_look_up_symbols): New function.
15335 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15336
15337 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15338
15339 * configure.in: Test for -rdynamic.
15340 * configure: Regenerated.
15341 * Makefile (INTERNAL_LDFLAGS): New.
15342 (gdbserver, gdbreplay): Use it.
15343
15344 2004-09-02 Andrew Cagney <cagney@gnu.org>
15345
15346 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15347
15348 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15349
15350 * linux-low.c (linux_wait): Clear all_processes list also.
15351
15352 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15353
15354 * linux-low.c: Include <errno.h>. Remove extern declaration of
15355 errno.
15356
15357 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15358
15359 * gdbreplay.c, server.h, utils.c: Update copyright years.
15360
15361 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15362
15363 * server.c (main): Print child status or termination signal from
15364 variable 'signal', not 'sig'.
15365
15366 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15367
15368 * linux-low.c (linux_read_memory): Change return type to
15369 int. Check for and return error from ptrace().
15370 * target.c (read_inferior_memory): Change return type to int. Pass
15371 back return status from the_target->read_memory().
15372 * target.h (struct target_ops): Adapt *read_memory() prototype.
15373 Update comment.
15374 (read_inferior_memory): Adapt prototype.
15375 * server.c (main): Return an error packet if
15376 read_inferior_memory() returns an error.
15377
15378 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15379
15380 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15381 Unify with other clean targets.
15382
15383 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15384
15385 * server.c (handle_v_cont): Call set_desired_inferior.
15386
15387 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15388
15389 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15390
15391 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15392
15393 * linux-low.c (linux_wait): Unblock async I/O.
15394 (linux_resume): Block and enable async I/O.
15395 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15396 * server.h (block_async_io, unblock_async_io): Add prototypes.
15397
15398 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15399
15400 * remote-utils.c (remote_open): Print a status notice after
15401 opening a TCP port.
15402 * server.c (attach_inferior): Print a status notice after
15403 attaching.
15404
15405 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15406
15407 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15408
15409 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15410
15411 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15412 error packet.
15413 * server.c, target.h: Update copyright years.
15414
15415 2004-02-25 Roland McGrath <roland@redhat.com>
15416
15417 * target.h (struct target_ops): New member `read_auxv'.
15418 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15419 * linux-low.c (linux_read_auxv): New function.
15420 (linux_target_ops): Initialize `read_auxv' member to that.
15421
15422 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15423
15424 Committed by Jim Blandy <jimb@redhat.com>.
15425
15426 * linux-s390-low.c (s390_num_regs): Update.
15427 (s390_regmap): Remove control registers. Use __s390x__ predefine
15428 instead of GPR_SIZE to distiguish s390 and s390x targets.
15429
15430 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15431
15432 * linux-low.c: Update copyright year.
15433 (check_removed_breakpoint): Clear pending_is_breakpoint.
15434 (linux_set_resume_request, linux_queue_one_thread)
15435 (resume_status_pending_p): New functions.
15436 (linux_continue_one_thread): Use process->resume.
15437 (linux_resume): Only resume threads if there are no pending events.
15438 * linux-low.h (struct process_info): Add resume request
15439 pointer.
15440
15441 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15442
15443 * regcache.c (new_register_cache): Clear the allocated register
15444 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15445
15446 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15447
15448 * linux-low.c (linux_resume): Take a struct thread_resume *
15449 argument.
15450 (linux_wait): Update call.
15451 (resume_ptr): New static variable.
15452 (linux_continue_one_thread): Renamed from
15453 linux_continue_one_process. Use resume_ptr.
15454 (linux_resume): Use linux_continue_one_thread.
15455 * server.c (handle_v_cont, handle_v_requests): New functions.
15456 (myresume): New function.
15457 (main): Handle 'v' case.
15458 * target.h (struct thread_resume): New type.
15459 (struct target_ops): Change argument of "resume" to struct
15460 thread_resume *.
15461 (myresume): Delete macro.
15462
15463 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15464
15465 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15466 (uninstall): Support DESTDIR.
15467
15468 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15469
15470 * configure.srv: Add xscale*linux copy of arm*linux entry.
15471
15472 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15473
15474 * linux-arm-low.c (arm_reinsert_addr): New function.
15475 (the_low_target): Add arm_reinsert_addr.
15476
15477 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15478
15479 * mem-break.c: Remove whitespace at end of file.
15480
15481 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15482
15483 * configure.in: Check whether we need to prototype strerror.
15484 * server.h: Optionally prototype strerror.
15485 * gdbreplay.c (perror_with_name): Use strerror.
15486 * linux-low.c (linux_attach_lwp): Use strerror.
15487 * utils.c (perror_with_name): Use strerror.
15488 * config.in, configure: Regenerated.
15489
15490 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15491
15492 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15493 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15494
15495 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15496
15497 * Makefile.in (SFILES): Update.
15498 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15499 low-sun3.c: Remove files.
15500
15501 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15502
15503 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15504 (linux_detach_one_process, linux_detach): New functions.
15505 (linux_target_ops): Add linux_detach.
15506 * server.c (main): Handle 'D' packet.
15507 * target.h (struct target_ops): Add "detach" member.
15508 (detach_inferior): Define.
15509
15510 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15511
15512 From Kelley Cook <kelleycook@wideopenwest.com>:
15513 * configure.srv: Accept i[34567]86 variants.
15514
15515 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15516
15517 * linux-low.c (linux_wait_for_event): Correct comment typos.
15518 (linux_resume_one_process): Call check_removed_breakpoint.
15519 (linux_send_signal): New function.
15520 (linux_target_ops): Add linux_send_signal.
15521 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15522 of kill.
15523 * target.h (struct target_ops): Add send_signal.
15524
15525 2003-05-29 Jim Blandy <jimb@redhat.com>
15526
15527 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15528 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15529 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15530 away part of the register's value.
15531
15532 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15533
15534 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15535 (linux_wait_for_event, linux_init_signals): Likewise.
15536
15537 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15538
15539 * configure.in: Check for stdlib.h.
15540 * configure: Regenerated.
15541 * config.in: Regenerated.
15542
15543 2003-01-04 Andreas Schwab <schwab@suse.de>
15544
15545 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15546
15547 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15548
15549 * Makefile.in: Remove obsolete code.
15550
15551 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15552
15553 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15554 defined(PT_FPR0_HI).
15555
15556 2002-11-17 Stuart Hughes <seh@zee2.com>
15557
15558 * linux-arm-low.c (arm_num_regs): Increase.
15559 (arm_regmap): Include status register.
15560
15561 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15562
15563 * linux-low.c (register_addr): Remove incorrect -1 check.
15564
15565 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15566
15567 * linux-low.c (linux_create_inferior): Call setpgid. Return
15568 the new PID.
15569 (unstopped_p, linux_signal_pid): Remove.
15570 (linux_target_ops): Remove linux_signal_pid.
15571 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15572 global instead of target method.
15573 * target.h (struct target_ops): Remove signal_pid. Update comment
15574 for create_inferior.
15575 * server.c (signal_pid): New variable.
15576 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15577 gdbserver. Set the child to be the foreground process group.
15578 (attach_inferior): Set signal_pid.
15579
15580 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15581
15582 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15583
15584 2002-08-20 Jim Blandy <jimb@redhat.com>
15585
15586 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15587 default for this.
15588
15589 2002-08-01 Andrew Cagney <cagney@redhat.com>
15590
15591 * Makefile.in: Make chill references obsolete.
15592
15593 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15594
15595 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15596 * configure: Regenerate.
15597 * config.in: Regenerate.
15598
15599 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15600
15601 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15602 (perror_with_name, remote_close, remote_open, expect, play): Static.
15603
15604 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15605
15606 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15607 byte offsets instead of an array of indexes.
15608 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15609
15610 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15611
15612 * regcache.c: Add comment.
15613
15614 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15615
15616 * thread-db.c: New file.
15617 * proc-service.c: New file.
15618 * acinclude.m4: New file.
15619 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15620 proc-service.o, and thread-db.o.
15621 (linux-low.o): Add USE_THREAD_DB.
15622 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15623 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15624 * aclocal.m4: Regenerated.
15625 * config.in: Regenerated.
15626 * configure: Regenerated.
15627 * configure.in: Check for proc_service.h, sys/procfs.h,
15628 thread_db.h, and linux/elf.h headrs.
15629 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15630 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15631 Check for -lthread_db and thread support.
15632 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15633 PowerPC, and SuperH.
15634 * i387-fp.c: Constify arguments.
15635 * i387-fp.h: Likewise.
15636 * inferiors.c: (struct thread_info): Renamed from
15637 `struct inferior_info'. Remove PID member. Use generic inferior
15638 list header. All uses updated.
15639 (inferiors, signal_pid): Removed.
15640 (all_threads): New variable.
15641 (get_thread): Define.
15642 (add_inferior_to_list): New function.
15643 (for_each_inferior): New function.
15644 (change_inferior_id): New function.
15645 (add_inferior): Removed.
15646 (remove_inferior): New function.
15647 (add_thread): New function.
15648 (free_one_thread): New function.
15649 (remove_thread): New function.
15650 (clear_inferiors): Use for_each_inferior and free_one_thread.
15651 (find_inferior): New function.
15652 (find_inferior_id): New function.
15653 (inferior_target_data): Update argument type.
15654 (set_inferior_target_data): Likewise.
15655 (inferior_regcache_data): Likewise.
15656 (set_inferior_regcache_data): Likewise.
15657 * linux-low.c (linux_bp_reinsert): Remove.
15658 (all_processes, stopping_threads, using_thrads)
15659 (struct pending_signals, debug_threads, pid_of): New.
15660 (inferior_pid): Replace with macro.
15661 (struct inferior_linux_data): Remove.
15662 (get_stop_pc, add_process): New functions.
15663 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15664 Use add_process and add_thread.
15665 (linux_attach_lwp): New function, based on old linux_attach. Use
15666 add_process and add_thread. Set stop_expected for new threads.
15667 (linux_attach): New function.
15668 (linux_kill_one_process): New function.
15669 (linux_kill): Kill all LWPs.
15670 (linux_thread_alive): Use find_inferior_id.
15671 (check_removed_breakpoints, status_pending_p): New functions.
15672 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15673 Update. Use WNOHANG. Wait for cloned processes also. Update process
15674 struct for the found process.
15675 (linux_wait_for_event): New function.
15676 (linux_wait): Use it. Support LWPs.
15677 (send_sigstop, wait_for_sigstop, stop_all_processes)
15678 (linux_resume_one_process, linux_continue_one_process): New functions.
15679 (linux_resume): Support LWPs.
15680 (REGISTER_RAW_SIZE): Remove.
15681 (fetch_register): Use register_size instead. Call supply_register.
15682 (usr_store_inferior_registers): Likewise. Call collect_register.
15683 Fix recursive case.
15684 (regsets_fetch_inferior_registers): Improve error message.
15685 (regsets_store_inferior_registers): Add debugging.
15686 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15687 (unstopped_p, linux_signal_pid): New functions.
15688 (linux_target_ops): Add linux_signal_pid.
15689 (linux_init_signals): New function.
15690 (initialize_low): Call it. Initialize using_threads.
15691 * regcache.c (inferior_regcache_data): Add valid
15692 flag.
15693 (get_regcache): Fetch registers lazily. Add fetch argument
15694 and update all callers.
15695 (regcache_invalidate_one, regcache_invalidate): New
15696 functions.
15697 (new_register_cache): Renamed from create_register_cache.
15698 Return the new regcache.
15699 (free_register_cache): Change argument to a void *.
15700 (registers_to_string, registers_from_string): Call get_regcache
15701 with fetch flag set.
15702 (register_data): Make static. Pass fetch flag to get_regcache.
15703 (supply_register): Call get_regcache with fetch flag clear.
15704 (collect_register): Call get_regcache with fetch flag set.
15705 (collect_register_as_string): New function.
15706 * regcache.h: Update.
15707 * remote-utils.c (putpkt): Flush after debug output and use
15708 stderr.
15709 Handle input interrupts while waiting for an ACK.
15710 (input_interrupt): Use signal_pid method.
15711 (getpkt): Flush after debug output and use stderr.
15712 (outreg): Use collect_register_as_string.
15713 (new_thread_notify, dead_thread_notify): New functions.
15714 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15715 and general_thread.
15716 (look_up_one_symbol): Flush after debug output.
15717 * server.c (step_thread, server_waiting): New variables.
15718 (start_inferior): Don't use signal_pid. Update call to mywait.
15719 (attach_inferior): Update call to mywait.
15720 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15721 (main): Don't fetch/store registers explicitly. Use
15722 set_desired_inferior. Support proposed ``Hs'' packet. Update
15723 calls to mywait.
15724 * server.h: Update.
15725 (struct inferior_list, struct_inferior_list_entry): New.
15726 * target.c (set_desired_inferior): New.
15727 (write_inferior_memory): Constify.
15728 (mywait): New function.
15729 * target.h: Update.
15730 (struct target_ops): New signal_pid method.
15731 (mywait): Removed macro, added prototype.
15732
15733 * linux-low.h (regset_func): Removed.
15734 (regset_fill_func, regset_store_func): New.
15735 (enum regset_type): New.
15736 (struct regset_info): Add type field. Use new operation types.
15737 (struct linux_target_ops): stop_pc renamed to get_pc.
15738 Add decr_pc_after_break and breakpoint_at.
15739 (get_process, get_thread_proess, get_process_thread)
15740 (strut process_info, all_processes, linux_attach_lwp)
15741 (thread_db_init): New.
15742
15743 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15744 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15745 (the_low_target): Add new members.
15746 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15747 (i386_store_fpxregset): Constify.
15748 (target_regsets): Add new kind identifier.
15749 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15750 (i386_set_pc): Add debugging.
15751 (i386_breakpoint_at): New function.
15752 (the_low_target): Add new members.
15753 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15754 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15755 (mips_breakpoint_at): New.
15756 (the_low_target): Add new members.
15757 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15758 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15759 (the_low_target): Add new members.
15760 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15761 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15762 (the_low_target): Add new members.
15763 * linux-x86-64-low.c (target_regsets): Add new kind
15764 identifier.
15765
15766 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15767
15768 From Martin Pool <mbp@samba.org>:
15769 * server.c (gdbserver_usage): New function.
15770 (main): Call it.
15771
15772 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15773
15774 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15775 stop_at -> stop_pc.
15776
15777 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15778
15779 * Makefile.in: Remove obsolete code.
15780
15781 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15782
15783 * linux-low.c (regsets_fetch_inferior_registers),
15784 (regsets_store_inferior_registers): Removed cast to int from
15785 ptrace() calls.
15786 * regcache.h: Added declaration of struct inferior_info.
15787
15788 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15789
15790 * inferiors.c (struct inferior_info): Add regcache_data.
15791 (add_inferior): Call create_register_cache.
15792 (clear_inferiors): Call free_register_cache.
15793 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15794 * regcache.c (struct inferior_regcache_data): New.
15795 (registers): Remove.
15796 (get_regcache): New function.
15797 (create_register_cache, free_register_cache): New functions.
15798 (set_register_cache): Don't initialize the register cache here.
15799 (registers_to_string, registers_from_string, register_data): Call
15800 get_regcache.
15801 * regcache.h: Add prototypes.
15802 * server.h: Likewise.
15803
15804 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15805
15806 * mem-break.c: New file.
15807 * mem-break.h: New file.
15808 * Makefile.in: Add mem-break.o rule; update server.h
15809 dependencies.
15810 * inferiors.c (struct inferior_info): Add target_data
15811 member.
15812 (clear_inferiors): Free target_data member if set.
15813 (inferior_target_data, set_inferior_target_data): New functions.
15814 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15815 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15816 * linux-low.c (linux_bp_reinsert): New variable.
15817 (struct inferior_linux_data): New.
15818 (linux_create_inferior): Use set_inferior_target_data.
15819 (linux_attach): Likewise. Call add_inferior.
15820 (linux_wait_for_one_inferior): New function.
15821 (linux_wait): Call it.
15822 (linux_write_memory): Add const.
15823 (initialize_low): Call set_breakpoint_data.
15824 * linux-low.h (struct linux_target_ops): Add breakpoint
15825 handling members.
15826 * server.c (attach_inferior): Remove extra add_inferior
15827 call.
15828 * server.h: Include mem-break.h. Update inferior.c
15829 prototypes.
15830 * target.c (read_inferior_memory)
15831 (write_inferior_memory): New functions.
15832 * target.h (read_inferior_memory)
15833 (write_inferior_memory): Change macros to prototypes.
15834 (struct target_ops): Update comments. Add const to write_memory
15835 definition.
15836
15837 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15838
15839 * linux-low.c (usr_store_inferior_registers): Support
15840 registers which are allowed to fail to store.
15841 * linux-low.h (linux_target_ops): Likewise.
15842 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15843 (ppc_cannot_store_register): FPSCR may not be storable.
15844
15845 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15846
15847 * server.h: Include <string.h> if HAVE_STRING_H.
15848 * ChangeLog: Correct paths in last ChangeLog entry.
15849
15850 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15851
15852 * linux-low.h: Remove obsolete prototypes.
15853 (struct linux_target_ops): New.
15854 (extern the_low_target): New.
15855 * linux-low.c (num_regs, regmap): Remove declarations.
15856 (register_addr): Use the_low_target explicitly.
15857 (fetch_register): Likewise.
15858 (usr_fetch_inferior_registers): Likewise.
15859 (usr_store_inferior_registers): Likewise.
15860 * linux-arm-low.c (num_regs): Remove.
15861 (arm_num_regs): Define.
15862 (arm_regmap): Renamed from regmap, made static.
15863 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15864 made static.
15865 (arm_cannot_store_register): Renamed from cannot_store_register,
15866 made static.
15867 (the_low_target): New.
15868 * linux-i386-low.c (num_regs): Remove.
15869 (i386_num_regs): Define.
15870 (i386_regmap): Renamed from regmap, made static.
15871 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15872 made static.
15873 (i386_cannot_store_register): Renamed from cannot_store_register,
15874 made static.
15875 (the_low_target): New.
15876 * linux-ia64-low.c (num_regs): Remove.
15877 (ia64_num_regs): Define.
15878 (ia64_regmap): Renamed from regmap, made static.
15879 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15880 made static.
15881 (ia64_cannot_store_register): Renamed from cannot_store_register,
15882 made static.
15883 (the_low_target): New.
15884 * linux-m68k-low.c (num_regs): Remove.
15885 (m68k_num_regs): Define.
15886 (m68k_regmap): Renamed from regmap, made static.
15887 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15888 made static.
15889 (m68k_cannot_store_register): Renamed from cannot_store_register,
15890 made static.
15891 (the_low_target): New.
15892 * linux-mips-low.c (num_regs): Remove.
15893 (mips_num_regs): Define.
15894 (mips_regmap): Renamed from regmap, made static.
15895 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15896 made static.
15897 (mips_cannot_store_register): Renamed from cannot_store_register,
15898 made static.
15899 (the_low_target): New.
15900 * linux-ppc-low.c (num_regs): Remove.
15901 (ppc_num_regs): Define.
15902 (ppc_regmap): Renamed from regmap, made static.
15903 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15904 made static.
15905 (ppc_cannot_store_register): Renamed from cannot_store_register,
15906 made static.
15907 (the_low_target): New.
15908 * linux-s390-low.c (num_regs): Remove.
15909 (s390_num_regs): Define.
15910 (s390_regmap): Renamed from regmap, made static.
15911 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15912 made static.
15913 (s390_cannot_store_register): Renamed from cannot_store_register,
15914 made static.
15915 (the_low_target): New.
15916 * linux-sh-low.c (num_regs): Remove.
15917 (sh_num_regs): Define.
15918 (sh_regmap): Renamed from regmap, made static.
15919 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15920 made static.
15921 (sh_cannot_store_register): Renamed from cannot_store_register,
15922 made static.
15923 (the_low_target): New.
15924 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15925 (the_low_target): New.
15926
15927 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15928
15929 * Makefile.in: Add stamp-h target.
15930 * configure.in: Create stamp-h.
15931 * configure: Regenerated.
15932
15933 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15934
15935 * inferiors.c: New file.
15936 * target.c: New file.
15937 * target.h: New file.
15938 * Makefile.in: Add target.o and inferiors.o. Update
15939 dependencies.
15940 * linux-low.c (inferior_pid): New static variable,
15941 moved from server.c.
15942 (linux_create_inferior): Renamed from create_inferior.
15943 Call add_inferior. Return 0 on success instead of a PID.
15944 (linux_attach): Renamed from myattach.
15945 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15946 (linux_thread_alive): Renamed from mythread_alive.
15947 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15948 child dies.
15949 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15950 (regsets_store_inferior_registers): Correct error message.
15951 Add missing ``return 0''.
15952 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15953 (linux_store_registers): Renamed from store_inferior_registers.
15954 (linux_read_memory): Renamed from read_inferior_memory.
15955 (linux_write_memory): Renamed from write_inferior_memory.
15956 (linux_target_ops): New structure.
15957 (initialize_low): Call set_target_ops ().
15958 * remote-utils.c (unhexify): New function.
15959 (hexify): New function.
15960 (input_interrupt): Send signals to ``signal_pid''.
15961 * server.c (inferior_pid): Remove.
15962 (start_inferior): Update create_inferior call.
15963 (attach_inferior): Call add_inferior.
15964 (handle_query): New function.
15965 (main): Call handle_query for `q' packets.
15966 * server.h: Include "target.h". Remove obsolete prototypes.
15967 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15968
15969 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15970
15971 * Makefile.in: Add WARN_CFLAGS. Update configury
15972 dependencies.
15973 * configure.in: Check for <string.h>
15974 * configure: Regenerate.
15975 * config.in: Regenerate.
15976 * gdbreplay.c: Include needed system headers.
15977 (remote_open): Remove strchr prototype.
15978 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15979 * regcache.c (supply_register): Change buf argument to const void *.
15980 (supply_register_by_name): Likewise.
15981 (collect_register): Change buf argument to void *.
15982 (collect_register_by_name): Likewise.
15983 * regcache.h: Add missing prototypes.
15984 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15985 * server.c (handle_query): New function.
15986 (attached): New static variable, moved out of main.
15987 (main): Quiet longjmp clobber warnings.
15988 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15989 * utils.c (error): Remove NORETURN.
15990 (fatal): Likewise.
This page took 0.344241 seconds and 3 git commands to generate.