Remove usages of find_inferior that call proceed_one_lwp
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * linux-low.c (proceed_one_lwp): Return void, change parameter
4 type.
5 (unsuspend_and_proceed_one_lwp): Likewise.
6 (proceed_all_lwps): Use for_each_thread.
7 (unstop_all_lwps): Likewise.
8
9 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
10
11 * linux-low.c (linux_resume_one_thread): Return void, take
12 parameter directly.
13 (linux_resume): Use for_each_thread.
14
15 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
16
17 * linux-low.c (send_sigstop_callback): Return void, change
18 parameter type. Rename to...
19 (send_sigstop): ... this.
20 (suspend_and_send_sigstop_callback): Return void, change parameter
21 type. Rename to...
22 (suspend_and_send_sigstop): ... this.
23 (stop_all_lwps): Use for_each_thread.
24
25 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
26
27 * linux-low.c (lwp_running): Return bool, remove unused
28 argument.
29 (linux_stabilize_threads): Use find_thread.
30
31 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
32
33 * linux-low.c (select_singlestep_lwp_callback): Remove.
34 (count_events_callback): Remove.
35 (select_event_lwp_callback): Remove.
36 (select_event_lwp): Use find_thread/for_each_thread.
37
38 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
39
40 * linux-low.c (not_stopped_callback): Return bool, take filter
41 argument directly.
42 (linux_wait_for_event_filtered): Use find_thread.
43 (linux_wait_1): Likewise.
44
45 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
46
47 * linux-low.c (same_lwp): Remove.
48 (find_lwp_pid): Use find_thread.
49
50 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
51
52 * linux-low.c (delete_lwp_callback): Remove.
53 (linux_mourn): Use for_each_thread.
54
55 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
56
57 * linux-low.c (linux_detach_lwp_callback): Return void, remove
58 args parameter, don't check for pid.
59 (linux_detach): Use for_each_thread.
60
61 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
62
63 * linux-low.c (struct counter): Remove.
64 (second_thread_of_pid_p): Remove.
65 (last_thread_of_process_p): Use find_thread.
66
67 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
68
69 * inferiors.c (find_inferior_in_random): Remove.
70 * inferiors.h (find_inferior_in_random): Remove.
71 * linux-low.c (status_pending_p_callback): Return bool, accept
72 parameter ptid directly.
73 (linux_wait_for_event_filtered): Use find_thread_in_random.
74 (linux_wait_1): Likewise.
75
76 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
77
78 * inferiors.c (find_inferior_id): Remove.
79 (find_thread_ptid): Move implemention from find_inferior_id to
80 here.
81 * inferiors.h (find_inferior_id): Remove.
82 * server.c (handle_status): Use find_thread_ptid.
83 (process_serial_event): Likewise.
84 * thread-db.c (find_one_thread): Likewise.
85 (thread_db_thread_handle): Likewise.
86 * win32-low.c (thread_rec): Likewise.
87 (child_delete_thread): Likewise.
88 (win32_thread_alive): Likewise.
89 (get_child_debug_event): Likewise.
90
91 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
92
93 * linux-mips-low.c (update_watch_registers_callback): Return
94 void, remove pid_p parameter, don't check for pid.
95 (mips_insert_point, mips_remove_point): Use for_each_thread.
96
97 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
98
99 * lynx.low (lynx_delete_thread_callback): Remove.
100 (lynx_mourn): Use for_each_thread.
101
102 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
103
104 * regcache.c (regcache_invalidate_one): Remove.
105 (regcache_invalidate_pid): use for_each_thread.
106
107 2017-11-26 Tom Tromey <tom@tromey.com>
108
109 * linux-low.c (linux_create_inferior): Update.
110
111 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
112
113 * spu-low.c (spu_create_inferior): Fix typo in argument name.
114
115 2017-11-24 Alan Hayward <alan.hayward@arm.com>
116
117 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
118 * linux-aarch64-low.c (initialize_low_arch): Call init func.
119 * linux-aarch64-tdesc-selftest.c: New file.
120 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
121
122 2017-11-24 Alan Hayward <alan.hayward@arm.com>
123
124 * configure.srv: Add new file.
125 * linux-aarch64-low.c (initialize_low_arch): Call init func.
126 * linux-aarch64-tdesc-selftest.c: New file.
127 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
128
129 2017-11-24 Alan Hayward <alan.hayward@arm.com>
130
131 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
132 * linux-aarch64-low.c (initialize_low_arch): Remove init.
133 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
134
135 2017-11-24 Alan Hayward <alan.hayward@arm.com>
136
137 * configure.srv: Add new files.
138 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
139 aarch64_linux_read_description.
140 * linux-aarch64-low.c (aarch64_linux_read_description):
141 Merge with aarch64_arch_setup.
142 (aarch64_arch_setup): Call aarch64_linux_read_description.
143 * linux-aarch64-tdesc.c: New file.
144 * linux-aarch64-tdesc.h: New file.
145
146 2017-11-24 Yao Qi <yao.qi@linaro.org>
147
148 * configure.srv: Set $srv_regobj for tic6x-linux.
149 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
150 (tic6x_read_description): Move some code to tic6x_arch_setup.
151 (tic6x_tdesc_test): New function.
152 (initialize_low_arch): Call selftests::register_test.
153
154 2017-11-22 Yao Qi <yao.qi@linaro.org>
155
156 * remote-utils.c (prepare_resume_reply): Use memcpy.
157
158 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
159
160 * linux-low.c (kill_one_lwp_callback): Return void, take
161 argument directly, don't filter on pid.
162 (linux_kill): Use for_each_thread.
163
164 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
165
166 * linux-low.c (need_step_over_p): Return bool, remove dummy
167 argument.
168 (linux_resume, proceed_all_lwps): Use find_thread.
169
170 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
171
172 * linux-low.c (resume_status_pending_p): Return bool, remove
173 flag_p argument.
174 (linux_resume): Use find_thread.
175
176 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
177
178 * linux-low.c (struct thread_resume_array): Remove.
179 (linux_set_resume_request): Return void, take arguments
180 directly.
181 (linux_resume): Use for_each_thread.
182
183 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
184
185 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
186 return bool, remove data argument.
187 (linux_stabilize_threads): Use find_thread.
188
189 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
190
191 * linux-low.c (unsuspend_one_lwp): Remove.
192 (unsuspend_all_lwps): Use for_each_thread, inline code from
193 unsuspend_one_lwp.
194
195 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
196
197 * gdbthread.h (find_thread): Add overload with ptid_t filter.
198 * linux-low.c (struct iterate_over_lwps_args): Remove.
199 (iterate_over_lwps_filter): Remove.
200 (iterate_over_lwps): Use find_thread.
201
202 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
203
204 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
205 (linux_handle_new_gdb_connection): Use for_each_thread, inline
206 code from reset_lwp_ptrace_options_callback.
207
208 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
209
210 * linux-arm-low.c (struct update_registers_data): Remove.
211 (update_registers_callback): Return void, take arguments
212 directly, don't check thread's pid.
213 (arm_insert_point, arm_remove_point): Use for_each_thread.
214
215 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
216
217 * win32-low.c (continue_one_thread): Return void, take argument
218 directly.
219 (child_continue): Use for_each_thread.
220
221 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
222
223 * win32-i386-low.c (update_debug_registers_callback): Rename
224 to ...
225 (update_debug_registers): ... this, return void, remove pid_p arg.
226 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
227
228 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
229
230 * inferiors.h (struct process_info): Add constructor, initialize
231 fields..
232 <syscalls_to_catch>: Change type to std::vector<int>.
233 * inferiors.c (add_process): Allocate process_info with new.
234 (remove_process): Free process_info with delete.
235 * linux-low.c (handle_extended_wait): Adjust.
236 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
237 * server.c (handle_general_set): Adjust.
238
239 2017-11-16 Pedro Alves <palves@redhat.com>
240
241 * remote-utils.c (remote_close): Block SIGIO signals instead of
242 uninstalling the SIGIO handler.
243
244 2017-11-16 Alan Hayward <alan.hayward@arm.com>
245
246 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
247
248 2017-11-16 Yao Qi <yao.qi@linaro.org>
249
250 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
251 (tic6x_store_gregset): Likewise.
252 (tic6x_usrregs_info): Move it up.
253
254 2017-11-15 Alan Hayward <alan.hayward@arm.com>
255
256 * Makefile.in: Update arch rules.
257 * configure.srv: Explicitly mark arch/ files.
258
259 2017-11-13 Andreas Schwab <schwab@suse.de>
260
261 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
262 function.
263 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
264
265 2017-11-06 Pedro Alves <palves@redhat.com>
266
267 * config.in, configure: Regenerate.
268
269 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
270
271 * target.c (struct thread_search): Remove.
272 (thread_search_callback): Remove.
273 (prepare_to_access_memory): Use for_each_thread instead of
274 find_inferior. Inline code from thread_search_callback.
275
276 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
277
278 * server.c (struct visit_actioned_threads_data): Remove.
279 (visit_actioned_threads): Change prototype to take arguments
280 directly.
281 (resume): Use find_thread instead of find_inferior.
282
283 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
284
285 * server.c (queue_stop_reply_callback): Change prototype, return
286 void.
287 (find_status_pending_thread_callback): Remove.
288 (handle_status): Replace find_inferior with find_thread and
289 for_each_thread.
290
291 2017-10-25 Alan Hayward <alan.hayward@arm.com>
292
293 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
294 with REGNO.
295 (aarch64_store_gregset): Likewise.
296 (aarch64_fill_fpregset): Likewise.
297 (aarch64_store_fpregset): Likewise.
298
299 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
300
301 * gdbthread.h (find_thread, for_each_thread): New functions.
302 * inferiors.c (thread_of_pid): Remove.
303 (find_any_thread_of_pid): Use find_thread.
304 * linux-low.c (num_lwps): Use for_each_thread.
305
306 2017-10-17 Yao Qi <yao.qi@linaro.org>
307
308 * Makefile.in: Remove one rule.
309 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
310
311 2017-10-17 Yao Qi <yao.qi@linaro.org>
312
313 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
314 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
315
316 2017-10-17 Yao Qi <yao.qi@linaro.org>
317
318 * configure.srv: Rename arm.o with arch/arm.o.
319
320 2017-10-17 Yao Qi <yao.qi@linaro.org>
321
322 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
323 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
324 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
325 (arch-i386.o, arch-amd64.o): Remove rules.
326 (arch/%.o): New rule.
327 Update POSTCOMPILE and COMPILE.pre.
328 * configure.ac: Invoke AC_CONFIG_COMMANDS.
329 * configure: Re-generated.
330 * configure.srv: Replace arch-i386.o with arch/i386.o.
331 Replace arch-amd64.o with arch/amd64.o.
332
333 2017-10-16 Yao Qi <yao.qi@linaro.org>
334
335 * configure: Regenerated.
336
337 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
338
339 * inferiors.h: (struct inferior_list): Remove.
340 (struct inferior_list_entry); Remove.
341 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
342 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
343 get_first_inferior): Remove.
344 (for_each_inferior, for_each_inferior_with_data, find_inferior,
345 find_inferior_id, find_inferior_in_random): Change signature.
346 * inferiors.c (all_threads): Change type to
347 std::list<thread_info *>.
348 (get_thread): Remove macro.
349 (find_inferior, find_inferior_id): Change signature, implement
350 using find_thread.
351 (find_inferior_in_random): Change signature, implement using
352 find_thread_in_random.
353 (for_each_inferior, for_each_inferior_with_data): Change
354 signature, implement using for_each_thread.
355 (add_inferior_to_list, remove_inferior): Remove.
356 (add_thread, get_first_thread, thread_of_pid,
357 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
358 (get_first_inferior, one_inferior_p, clear_inferior_list):
359 Remove.
360 (clear_inferiors, get_thread_process): Update.
361 * gdbthread.h: Include <list>.
362 (struct thread_info) <entry>: Remove field.
363 <id>: New field.
364 (all_threads): Change type to std::list<thread_info *>.
365 (get_first_inferior): Add doc.
366 (find_thread, for_each_thread, find_thread_in_random): New
367 functions.
368 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
369 * linux-arm-low.c (update_registers_callback): Update.
370 * linux-low.c (second_thread_of_pid_p): Update.
371 (kill_one_lwp_callback, linux_detach_lwp_callback,
372 delete_lwp_callback, status_pending_p_callback, same_lwp,
373 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
374 iterate_over_lwps, not_stopped_callback,
375 resume_stopped_resumed_lwps, count_events_callback,
376 select_singlestep_lwp_callback, select_event_lwp_callback,
377 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
378 suspend_and_send_sigstop_callback, wait_for_sigstop,
379 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
380 lwp_running, linux_set_resume_request, resume_status_pending_p,
381 need_step_over_p, start_step_over, linux_resume_one_thread,
382 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
383 reset_lwp_ptrace_options_callback): Update.
384 * linux-mips-low.c (update_watch_registers_callback): Update.
385 * regcache.c (regcache_invalidate_one, regcache_invalidate):
386 Update.
387 (free_register_cache_thread_one): Remove.
388 (regcache_release): Update.
389 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
390 handle_qxfer_threads_worker): Update.
391 (handle_query): Update, use list iterator.
392 (visit_actioned_threads, handle_pending_status,
393 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
394 clear_pending_status_callback, set_pending_status_callback,
395 find_status_pending_thread_callback, handle_status,
396 process_serial_event): Update.
397 * target.c (thread_search_callback): Update.
398 * thread-db.c (thread_db_get_tls_address): Update.
399 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
400 Update.
401 * win32-i386-low.c (update_debug_registers_callback): Update.
402 * win32-low.c (delete_thread_info, child_delete_thread,
403 continue_one_thread, suspend_one_thread,
404 get_child_debug_event): Adjust.
405
406 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
407
408 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
409 * inferiors.h: Include <list>.
410 (struct process_info) <entry>: Remove field.
411 <pid>: New field.
412 (pid_of): Change macro to function.
413 (ptid_of, lwpid_of): Remove macro.
414 (all_processes): Change type to std::list<process_info *>.
415 (ALL_PROCESSES): Remove macro.
416 (for_each_process, find_process): New function.
417 * inferiors.c (all_processes): Change type to
418 std::list<process_info *>.
419 (find_thread_process): Adjust.
420 (add_process): Likewise.
421 (remove_process): Likewise.
422 (find_process_pid): Likewise.
423 (get_first_process): Likewise.
424 (started_inferior_callback): Remove.
425 (have_started_inferiors_p): Adjust.
426 (attached_inferior_callback): Remove.
427 (have_attached_inferiors_p): Adjust.
428 * linux-low.c (check_zombie_leaders): Likewise.
429 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
430 (x86_linux_update_xmltarget): Adjust.
431 * server.c (handle_query): Likewise.
432 (gdb_reattached_process): Remove.
433 (handle_status): Adjust.
434 (kill_inferior_callback): Likewise.
435 (detach_or_kill_inferior): Remove.
436 (print_started_pid): Likewise.
437 (print_attached_pid): Likewise.
438 (detach_or_kill_for_exit): Update.
439 (process_serial_event): Likewise.
440 * linux-arm-low.c (arm_new_fork): Likewise.
441
442 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
443
444 * dll.h: Include <list>.
445 (struct dll_info): Add constructor.
446 <entry>: Remove field.
447 (all_dlls): Change type to std::list<dll_info>.
448 * dll.c: Include <algorithm>.
449 (get_dll): Remove macro.
450 (all_dlls): Change type to std::list<dll_info *>.
451 (free_one_dll): Remove.
452 (match_dll): Likewise.
453 (loaded_dll): Adjust.
454 (unloaded_dll): Adjust to all_dlls type change, use
455 std::find_if. Inline code from match_dll.
456 (clear_dlls): Adjust to all_dlls type change.
457 * server.c (emit_dll_description): Remove.
458 (handle_qxfer_libraries): Adjust to all_dlls type change,
459 integrate emit_dll_description's functionality.
460
461 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
462
463 * linux-low.h (struct linux_target_ops) <delete_process>: New
464 field.
465 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
466 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
467 (struct linux_target_ops): Add delete_process callback.
468 * linux-arm-low.c (arm_delete_process): New.
469 (struct linux_target_ops): Add delete_process callback.
470 * linux-bfin-low.c (struct linux_target_ops): Likewise.
471 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
472 * linux-m32r-low.c (struct linux_target_ops): Likewise.
473 * linux-mips-low.c (mips_linux_delete_process): New.
474 (struct linux_target_ops): Add delete_process callback.
475 * linux-ppc-low.c (struct linux_target_ops): Likewise.
476 * linux-s390-low.c (struct linux_target_ops): Likewise.
477 * linux-sh-low.c (struct linux_target_ops): Likewise.
478 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
479 * linux-tile-low.c (struct linux_target_ops): Likewise.
480 * linux-x86-low.c (x86_linux_delete_process): New.
481 (struct linux_target_ops): Add delete_process callback.
482 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
483
484 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
485
486 * linux-aarch64-low.c (the_low_target): Add thread delete
487 callback.
488 * linux-arm-low.c (arm_delete_thread): New function.
489 (the_low_target): Add thread delete callback.
490 * linux-bfin-low.c (the_low_target): Likewise.
491 * linux-crisv32-low.c (the_low_target): Likewise.
492 * linux-low.c (delete_lwp): Invoke delete_thread callback if
493 set.
494 * linux-low.h (struct linux_target_ops) <delete_thread>: New
495 field.
496 * linux-m32r-low.c (the_low_target): Add thread delete callback.
497 * linux-mips-low.c (mips_linux_delete_thread): New function.
498 (the_low_target): Add thread delete callback.
499 * linux-ppc-low.c (the_low_target): Likewise.
500 * linux-s390-low.c (the_low_target): Likewise.
501 * linux-sh-low.c (the_low_target): Likewise.
502 * linux-tic6x-low.c (the_low_target): Likewise.
503 * linux-tile-low.c (the_low_target): Likewise.
504 * linux-x86-low.c (the_low_target): Likewise.
505 * linux-xtensa-low.c (the_low_target): Likewise.
506
507 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
508
509 * win32-low.c: Include "common-inferior.h".
510
511 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
512
513 * inferiors.c (set_inferior_cwd): New function.
514 * server.c (handle_general_set): Handle QSetWorkingDir packet.
515 (handle_query): Inform that QSetWorkingDir is supported.
516 * win32-low.c (create_process): Pass the inferior's cwd to
517 CreateProcess.
518
519 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
520
521 * inferiors.c (current_inferior_cwd): New global variable.
522 (get_inferior_cwd): New function.
523 * inferiors.h (struct process_info) <cwd>: New field.
524
525 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
526
527 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
528 (OBS): Add gdb_tilde_expand.o.
529
530 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
531
532 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
533 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
534
535 2017-09-29 Pedro Alves <palves@redhat.com>
536
537 * ax.c (gdb_parse_agent_expr): Constify.
538 * ax.h (gdb_parse_agent_expr): Constify.
539 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
540 Constify.
541 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
542 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
543 * remote-utils.h (read_ptid): Constify.
544 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
545 (process_point_options, process_serial_event): Constify.
546 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
547 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
548 (cmd_qtbuffer): Constify.
549
550 2017-09-29 Pedro Alves <palves@redhat.com>
551
552 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
553 fails.
554
555 2017-09-29 Pedro Alves <palves@redhat.com>
556
557 * linux-low.c (handle_extended_wait): Pass parent thread instead
558 of process to thread_db_notice_clone.
559 * linux-low.h (thread_db_notice_clone): Replace parent process
560 parameter with parent thread parameter.
561 * thread-db.c (find_one_thread): Add comment.
562 (thread_db_notice_clone): Replace parent process parameter with
563 parent thread parameter. Temporarily switch to the parent thread.
564
565 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
566
567 * gdbthread.h: Include "common-gdbthread.h".
568 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
569 "if" when validating the ptid.
570 * remote-utils.c: Include "gdbthread.h".
571 (prepare_resume_reply): Use "switch_to_thread".
572 * target.c (done_accessing_memory): Likewise.
573
574 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
575
576 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
577 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
578 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
579 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
580 s390x-gs-linux64-ipa.o to ipa_obj.
581 * linux-s390-low.c (HWCAP_S390_GS): New define.
582 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
583 New functions.
584 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
585 (s390_arch_setup): Check for guarded-storage support and choose
586 appropriate tdesc.
587 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
588 init_registers_s390x_gs_linux64.
589 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
590 enum value.
591 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
592 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
593
594 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
595
596 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
597
598 2017-09-21 Kevin Buettner <kevinb@redhat.com>
599
600 * linux-low.h (struct lwp_info): Add new field, thread_handle.
601 (thread_db_thread_handle): Declare.
602 * linux-low.c (linux_target_ops): Initialize thread_handle.
603 * server.c (handle_qxfer_threads_worker): Add support for
604 "handle" attribute.
605 * target.h (struct target_ops): Add new function pointer,
606 thread_handle.
607 (target_thread_handle): Define.
608 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
609 field in lwp.
610 (thread_db_thread_handle): New function.
611
612 2017-09-21 Kevin Buettner <kevinb@redhat.com>
613
614 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
615 * linux-low.h (thread_db_notice_clone): Declare.
616 * thread-db.c (thread_db_notice_clone): New function.
617
618 2017-09-21 Pedro Alves <palves@redhat.com>
619
620 * server.c (gdb_read_memory, handle_status, process_serial_event)
621 (handle_serial_event, handle_target_event): Adjust to
622 set_desired_thread prototype change.
623 * target.c (set_desired_thread): Remove 'use_general' parameter
624 and adjust.
625 * target.h (set_desired_thread): Remove 'use_general' parameter.
626
627 2017-09-20 Tom Tromey <tom@tromey.com>
628
629 * target.c (target_terminal::terminal_state): Define.
630 (target_terminal::init): Rename from target_terminal_init.
631 (target_terminal::inferior): Rename from
632 target_terminal_inferior.
633 (target_terminal::ours): Rename from target_terminal_ours.
634 (target_terminal::ours_for_output, target_terminal::info): New.
635
636 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
637
638 * server.c (accumulate_file_name_length): Remove.
639 (emit_dll_description): Adjust to std::string change.
640 (handle_qxfer_libraries): Use std::string to hold document.
641
642 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
643
644 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
645 return type of xml_escape_text.
646 * server.c (emit_dll_description): Likewise.
647
648 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
649
650 * server.c (captured_main): Accept argument for --selftest.
651 Update run_tests call.
652 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
653 when registering selftests.
654
655 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
656
657 * regcache.c (get_thread_regcache): Update code to use "std::vector"
658 instead of "VEC" for "target_desc.reg_defs".
659 (regcache_cpy): Likewise.
660 (registers_to_string): Likewise.
661 (registers_from_string): Likewise.
662 (find_regno): Likewise.
663 (supply_regblock): Likewise.
664 (regcache_raw_read_unsigned): Likewise.
665 * tdesc.c (init_target_desc): Likewise.
666 (tdesc_create_reg): Likewise.
667 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
668 (struct target_desc) <reg_defs>: Convert to "std::vector".
669 (target_desc): Do not initialize "reg_defs".
670 (~target_desc): Update code to use "std::vector" instead of "VEC"
671 for "target_desc.reg_defs".
672 (operator==): Likewise.
673
674 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
675
676 * inferiors.h (thread_to_gdb_id): Remove.
677 * inferiors.c (thread_to_gdb_id): Remove.
678 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
679 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
680 lynx_store_registers, lynx_read_memory, lynx_write_memory):
681 Likewise.
682 * nto-low.c (nto_fetch_registers, nto_store_registers,
683 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
684
685 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
686
687 * inferiors.h (gdb_id_to_thread_id): Remove.
688 * inferiors.c (gdb_id_to_thread_id): Remove.
689 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
690 removal. Move pid declaration closer to where it's used.
691
692 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
693
694 * server.c (handle_detach): New function.
695 (process_serial_event): Move code out, call handle_detach.
696
697 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
698
699 * server.c (require_running): Rename to ...
700 (require_running_or_return): ... this ...
701 (require_running_or_break): ... and this.
702 (handle_query, process_serial_event): Adjust.
703
704 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
705
706 * linux-low.c (linux_set_resume_request): Remove unused
707 variables.
708
709 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
710
711 * server.c (first_thread_of): Remove.
712 (process_serial_event): Replace usage of first_thread_of with
713 find_any_thread_of_pid.
714 * tracepoint.c (same_process_p): Remove.
715 (gdb_agent_about_to_close): Replace usage of same_process_p with
716 find_any_thread_of_pid.
717 * linux-x86-low.c (same_process_callback): Remove.
718 (x86_arch_setup_process_callback): Replace usage of
719 same_process_callback with find_any_thread_of_pid.
720 * thread-db.c (any_thread_of): Remove.
721 (switch_to_process): Replace usage of any_thread_of with
722 find_any_thread_of_pid.
723 * inferiors.c (thread_pid_matches_callback): Remove.
724 (find_thread_process): Adjust to use find_any_thread_of_pid.
725
726 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
727
728 * regcache.c (get_thread_regcache): Guard calls to "memset"
729 with "!VEC_empty".
730
731 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
732
733 * linux-low.c (handle_extended_wait): Use
734 "allocate_target_description" instead of "XNEW".
735 * linux-x86-low.c (initialize_low_arch): Likewise.
736
737 2017-09-05 Yao Qi <yao.qi@linaro.org>
738
739 * configure.srv (srv_i386_regobj): Remove.
740 (srv_amd64_regobj): Remove.
741 (srv_regobj): Set it to "" for x86 non-linux targets.
742 * linux-x86-tdesc.c (i386_linux_read_description):
743 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
744 (init_registers_i386): Remove the declaration.
745 (tdesc_i386): Remove the declaration.
746 (lynx_i386_arch_setup): Call i386_create_target_description.
747 * nto-x86-low.c: Likewise.
748 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
749 [!__x86_64__]: include arch/i386.h.
750 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
751
752 2017-09-05 Yao Qi <yao.qi@linaro.org>
753
754 * configure.srv (srv_amd64_linux_xmlfiles): Remove
755 i386/amd64-XXX-linux from it.
756
757 2017-09-05 Yao Qi <yao.qi@linaro.org>
758
759 * configure.srv: Empty srv_amd64_linux_regobj if $development is
760 false.
761 (ipa_amd64_linux_regobj): Remove.
762 (ipa_x32_linux_regobj): Remove.
763
764 2017-09-05 Yao Qi <yao.qi@linaro.org>
765
766 * Makefile.in (arch-amd64.o): New rule.
767 * configure.srv: Append arch-amd64.o.
768 * linux-amd64-ipa.c: Include common/x86-xstate.h.
769 (get_ipa_tdesc): Call amd64_linux_read_description.
770 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
771 and init_registers_amd64_XXX.
772 * linux-x86-low.c (x86_linux_read_description): Call
773 amd64_linux_read_description.
774 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
775 (initialize_low_arch): Don't call init_registers_x32_XXX and
776 init_registers_amd64_XXX.
777 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
778 and tdesc_amd64_XXX.
779 [__x86_64__] (amd64_tdesc_test): New function.
780 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
781 and init_registers_amd64_XXX.
782 * linux-x86-tdesc.c: Include arch/amd64.h.
783 (xcr0_to_tdesc_idx): New function.
784 (i386_linux_read_description): New function.
785 (amd64_get_ipa_tdesc_idx): New function.
786 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
787 (amd64_get_ipa_tdesc): Declare.
788
789 2017-09-05 Yao Qi <yao.qi@linaro.org>
790
791 * configure.srv (srv_i386_linux_xmlfiles): Remove
792 i386/i386-XXX-linux.xml from it.
793
794 2017-09-05 Yao Qi <yao.qi@linaro.org>
795
796 * configure.srv: Set srv_i386_linux_regobj empty if $development
797 is false.
798 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
799 initialize_low_tdesc.
800 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
801 with #if initialize_low_tdesc.
802 * linux-x86-tdesc-selftest.c: New file.
803 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
804
805 2017-09-05 Yao Qi <yao.qi@linaro.org>
806
807 * Makefile.in (arch-i386.o): New rule.
808 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
809 (x86_64-*-linux*): Likewise.
810 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
811 include arch/i386.h.
812 (i386_linux_read_description): Remove code and call
813 i386_create_target_description.
814 * tdesc.c (allocate_target_description): New function.
815 * tdesc.h (set_tdesc_architecture): Remove declaration.
816 (set_tdesc_osabi): Likewise.
817
818 2017-09-05 Yao Qi <yao.qi@linaro.org>
819
820 * linux-x86-tdesc.c: Don't include <inttypes.h>.
821 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
822 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
823 .xmltarget.
824 * server.c (get_features_xml): Call tdesc_get_features_xml.
825 * tdesc.c (set_tdesc_architecture): New function.
826 (set_tdesc_osabi): New function.
827 (tdesc_get_features_xml): New function.
828 (tdesc_create_feature): Add an argument.
829 * tdesc.h (struct target_desc) <features>: New field.
830 <arch, osabi>: New field.
831 (~target_desc): xfree features, arch, and osabi.
832 (target_desc::oerator==): Don't compare .xmltarget.
833 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
834 (set_tdesc_osabi): Likewise.
835 (tdesc_get_features_xml): Likewise.
836
837 2017-09-05 Yao Qi <yao.qi@linaro.org>
838
839 * linux-x86-tdesc.c: Include selftest.h.
840 (i386_tdesc_test): New function.
841 (initialize_low_tdesc): Call selftests::register_test.
842 * tdesc.h: Include regdef.h.
843 (target_desc): Override operator == and !=.
844
845 2017-09-05 Yao Qi <yao.qi@linaro.org>
846
847 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
848 (ipa_obj): Likewise.
849 * linux-i386-ipa.c: Include common/x86-xstate.h
850 (get_ipa_tdesc): Call i386_linux_read_description.
851 (initialize_low_tracepoint): Don't call init_registers_XXX
852 functions, call initialize_low_tdesc instead.
853 * linux-x86-low.c (x86_linux_read_description): Call
854 i386_linux_read_description.
855 (initialize_low_arch): Don't call init_registers_i386_XXX
856 functions, call initialize_low_tdesc.
857 * linux-x86-tdesc.c: New file.
858 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
859 (i386_get_ipa_tdesc_idx): Declare.
860 (i386_get_ipa_tdesc): Declare.
861 (initialize_low_tdesc): Declare.
862
863 2017-09-05 Yao Qi <yao.qi@linaro.org>
864
865 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
866 instead of 0.
867
868 2017-09-05 Yao Qi <yao.qi@linaro.org>
869
870 * Makefile.in (IPA_OBJS): Add vec-ipa.o
871 * regcache.c (get_thread_regcache): Use VEC_length.
872 (init_register_cache): Likewise.
873 (regcache_cpy): Likewise.
874 (registers_to_string): Iterate reg_defs via VEC_iterate.
875 (find_regno): Likewise.
876 (find_register_by_number): Use VEC_index.
877 (register_size): Call find_register_by_number.
878 (register_data): Call find_register_by_number.
879 (supply_regblock): Use VEC_length.
880 (regcache_raw_read_unsigned): Likewise.
881 * tdesc.c (init_target_desc): Iterate reg_defs via
882 VEC_iterate.
883 (default_description): Update initializer.
884 (copy_target_description): Don't update field num_registers.
885 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
886 <num_registers>: Remove.
887
888 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
889
890 * Makefile.in (.SECONDARY): Define target.
891
892 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
893
894 * linux-low.c (linux_wait_1): Adjust.
895 * server.c (queue_stop_reply_callback): Adjust.
896
897 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
898
899 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
900 QEnvironmentUnset and QEnvironmentReset packets.
901 (handle_query): Inform remote that QEnvironmentHexEncoded,
902 QEnvironmentUnset and QEnvironmentReset are supported.
903
904 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
905
906 * inferiors.h (inferior_target_data): Rename to ...
907 (thread_target_data): ... this.
908 (inferior_regcache_data): Rename to ...
909 (thread_regcache_data): ... this.
910 (set_inferior_regcache_data): Rename to ...
911 (set_thread_regcache_data): ... this.
912 * inferiors.c (inferior_target_data): Rename to ...
913 (thread_target_data): ... this.
914 (inferior_regcache_data): Rename to ...
915 (thread_regcache_data): ... this.
916 (set_inferior_regcache_data): Rename to ...
917 (set_thread_regcache_data): ... this.
918 (free_one_thread): Update.
919 * linux-low.h (get_thread_lwp): Update.
920 * regcache.c (get_thread_regcache): Update.
921 (regcache_invalidate_thread): Update.
922 (free_register_cache_thread): Update.
923 * win32-i386-low.c (update_debug_registers_callback): Update.
924 (win32_get_current_dr): Update.
925 * win32-low.c (thread_rec): Update.
926 (delete_thread_info): Update.
927 (continue_one_thread): Update.
928 (suspend_one_thread): Update.
929
930 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
931
932 * inferiors.c (set_inferior_target_data): Remove.
933 * inferiors.h (set_inferior_target_data): Remove.
934
935 2017-08-18 Yao Qi <yao.qi@linaro.org>
936
937 * Makefile.in (OBS): Add selftest.o.
938 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
939 * configure, config.in: Re-generated.
940 * server.c: Include common/sefltest.h.
941 (captured_main): Handle option --selftest.
942
943 2017-08-09 Yao Qi <yao.qi@linaro.org>
944
945 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
946 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
947 i386-avx-mpx.o and i386-mmx.o.
948 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
949 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
950 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
951 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
952 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
953 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
954 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
955 i386/amd64-avx-mpx.xml.
956
957 2017-08-09 Yao Qi <yao.qi@linaro.org>
958
959 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
960 and x32-avx-avx512.o.
961 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
962 i386/x32-avx-avx512.xml.
963
964 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
965
966 * tracepoint.h (enum class fast_tpoint_collect_result): New
967 enumeration.
968 (fast_tracepoint_collecting): Change return type to
969 fast_tpoint_collect_result.
970 * tracepoint.c (fast_tracepoint_collecting): Likewise.
971 * linux-low.h: Include tracepoint.h.
972 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
973 fast_tpoint_collect_result.
974 * linux-low.c (handle_tracepoints): Adjust.
975 (linux_fast_tracepoint_collecting): Change return type to
976 fast_tpoint_collect_result.
977 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
978 linux_wait_1, stuck_in_jump_pad_callback,
979 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
980 proceed_one_lwp): Adjust to type change.
981
982 2017-07-10 Yao Qi <yao.qi@linaro.org>
983
984 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
985
986 2017-06-29 Yao Qi <yao.qi@linaro.org>
987
988 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
989 Remove.
990 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
991
992 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
993
994 * Makefile.in (IPA_OBJS): Sort and format one item per line.
995
996 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
997
998 * linux-low.c (linux_create_inferior): Adjust code to access the
999 environment information via 'gdb_environ' class.
1000 * lynx-low.c (lynx_create_inferior): Likewise.
1001 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1002 (get_environ): Return a pointer to 'our_environ'.
1003 (captured_main): Initialize 'our_environ'.
1004 * server.h (get_environ): Adjust prototype.
1005 * spu-low.c (spu_create_inferior): Adjust code to access the
1006 environment information via 'gdb_environ' class.
1007
1008 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1009
1010 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1011 usage of "register" keyword.
1012
1013 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1014
1015 * configure: Re-generate.
1016
1017 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1018
1019 * configure: Re-generate.
1020
1021 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1022
1023 * Makefile.in (COMPILE.pre): Add "-x c++".
1024
1025 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1026
1027 * fork-child.c: Conditionally include <signal.h>.
1028
1029 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1030
1031 * server.c (handle_general_set): Handle new packet
1032 "QStartupWithShell".
1033 (handle_query): Add "QStartupWithShell" to the list of supported
1034 packets.
1035 (gdbserver_usage): Add help text explaining the
1036 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1037 options.
1038 (captured_main): Recognize and act upon the presence of the new
1039 CLI options.
1040
1041 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1042 Pedro Alves <palves@redhat.com>
1043
1044 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1045 * configure: Regenerate.
1046 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1047 "fork-inferior.o".
1048 (i[34567]86-*-lynxos*): Likewise.
1049 (spu*-*-*): Likewise.
1050 * fork-child.c: New file.
1051 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1052 and "environ.h".
1053 (linux_ptrace_fun): New function.
1054 (linux_create_inferior): Adjust function prototype to reflect
1055 change on "target.h". Adjust function code to use
1056 "fork_inferior".
1057 (linux_request_interrupt): Delete "signal_pid".
1058 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1059 (lynx_ptrace_fun): New function.
1060 (lynx_create_inferior): Adjust function prototype to reflect
1061 change on "target.h". Adjust function code to use
1062 "fork_inferior".
1063 * nto-low.c (nto_create_inferior): Adjust function prototype and
1064 code to reflect change on "target.h". Update comments.
1065 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1066 "common-terminal.h" and "environ.h".
1067 (terminal_fd): Moved to fork-child.c.
1068 (old_foreground_pgrp): Likewise.
1069 (restore_old_foreground_pgrp): Likewise.
1070 (last_status): Make it global.
1071 (last_ptid): Likewise.
1072 (our_environ): New variable.
1073 (startup_with_shell): Likewise.
1074 (program_name): Likewise.
1075 (program_argv): Rename to...
1076 (program_args): ...this.
1077 (wrapper_argv): New variable.
1078 (start_inferior): Delete function.
1079 (get_exec_wrapper): New function.
1080 (get_exec_file): Likewise.
1081 (get_environ): Likewise.
1082 (prefork_hook): Likewise.
1083 (post_fork_inferior): Likewise.
1084 (postfork_hook): Likewise.
1085 (postfork_child_hook): Likewise.
1086 (handle_v_run): Update code to deal with arguments coming from the
1087 remote host. Update calls from "start_inferior" to
1088 "create_inferior".
1089 (captured_main): Likewise. Initialize environment variable. Call
1090 "have_job_control".
1091 * server.h (post_fork_inferior): New prototype.
1092 (get_environ): Likewise.
1093 (last_status): Declare.
1094 (last_ptid): Likewise.
1095 (signal_pid): Likewise.
1096 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1097 (spu_ptrace_fun): New function.
1098 (spu_create_inferior): Adjust function prototype to reflect change
1099 on "target.h". Adjust function code to use "fork_inferior".
1100 * target.c (target_terminal_init): New function.
1101 (target_terminal_inferior): Likewise.
1102 (target_terminal_ours): Likewise.
1103 * target.h: Include <vector>.
1104 (struct target_ops) <create_inferior>: Update prototype.
1105 (create_inferior): Update macro.
1106 * utils.c (gdb_flush_out_err): New function.
1107 * win32-low.c (win32_create_inferior): Adjust function prototype
1108 and code to reflect change on "target.h".
1109
1110 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1111
1112 * inferiors.c (switch_to_thread): New function.
1113
1114 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1115
1116 * Makefile.in (SFILE): Add "common/job-control.c".
1117 (OBS): Add "job-control.o".
1118
1119 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1120
1121 * Makefile: Remove "@host_makefile_frag@".
1122
1123 2017-05-05 Pedro Alves <palves@redhat.com>
1124
1125 * configure: Regenerate.
1126
1127 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1128
1129 * configure: Regenerate.
1130
1131 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1132
1133 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1134 software_single_step change of return type to
1135 std::vector<CORE_ADDR>.
1136 * linux-low.c (install_software_single_step_breakpoints):
1137 Likewise.
1138 * linux-low.h (install_software_single_step_breakpoints):
1139 Likewise.
1140
1141 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1142
1143 * remote-utils.c: Include "gdb_termios.h" instead of
1144 "terminal.h".
1145 * terminal.h: Delete file.
1146
1147 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1148
1149 * server.c: Include <vector>.
1150 <program_argv, wrapper_argv>: Convert to std::vector.
1151 (start_inferior): Rewrite function to use C++.
1152 (handle_v_run): Likewise. Update code that calculates the argv
1153 based on the vRun packet; use C++.
1154 (captured_main): Likewise.
1155
1156 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1157
1158 * server.c (handle_v_cont): Initialize thread_resume::thread
1159 with null_ptid.
1160
1161 2017-04-05 Pedro Alves <palves@redhat.com>
1162
1163 * configure: Regenerate.
1164
1165 2017-04-05 Pedro Alves <palves@redhat.com>
1166
1167 * gdbreplay.c (sync_error): Constify.
1168 * linux-x86-low.c (push_opcode): Constify.
1169
1170 2017-04-05 Pedro Alves <palves@redhat.com>
1171
1172 * win32-low.c (get_child_debug_event)
1173 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1174 Report TARGET_WAITKIND_SPURIOUS instead.
1175
1176 2017-04-05 Pedro Alves <palves@redhat.com>
1177
1178 * remote-utils.c (remote_prepare, remote_open): Constify.
1179 * remote-utils.h (remote_prepare, remote_open): Constify.
1180 * server.c (captured_main): Constify 'port' handling.
1181
1182 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1183
1184 * Makefile.in (clean): Clear .deps.
1185
1186 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1187
1188 * .gitignore: Remove generated files, replace with wildcard.
1189 * (clean): Replace removal of generated files with wildcard.
1190 (version.c): Replace with...
1191 (version-generated.c): ...this.
1192 (xml-builtin.c): Replace with...
1193 (xml-builtin-generated.c): ...this.
1194 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1195 (%.c: *regformats*): Replace with...
1196 (%-generated.c: *regformats*): ...this.
1197
1198 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1199
1200 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1201 (xtensa_fill_gregset): Call collect_register_by_name for
1202 threadptr register.
1203 (xtensa_store_gregset): Call supply_register_by_name for
1204 threadptr register.
1205
1206 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1207
1208 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1209 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1210 (xtensa_store_gregset): Call supply_register for all registers in
1211 a0_regnum..a0_regnum + C0_NREGS range.
1212
1213 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1214
1215 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1216 (ax-ipa.o: ax.c): Remove.
1217 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1218 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1219 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1220 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1221 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1222
1223 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1224
1225 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1226 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1227 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1228 (errors-ipa.o: ../common/errors.c): Remove.
1229 (format-ipa.o: ../common/format.c): Remove.
1230 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1231
1232 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1233
1234 * Makefile.in (%-ipa.o: %.c): New rule.
1235 (tracepoint-ipa.o: tracepoint.c): Remove.
1236 (utils-ipa.o: utils.c): Remove.
1237 (remote-utils-ipa.o: remote-utils.c): Remove.
1238 (regcache-ipa.o: regcache.c): Remove.
1239 (i386-linux-ipa.o: i386-linux.c): Remove.
1240 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1241 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1242 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1243 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1244 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1245 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1246 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1247 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1248 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1249 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1250 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1251 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1252 (aarch64-ipa.o: aarch64.c): Remove.
1253 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1254 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1255 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1256 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1257 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1258 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1259 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1260 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1261 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1262 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1263 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1264 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1265 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1266 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1267 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1268 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1269 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1270 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1271 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1272 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1273 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1274 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1275 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1276 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1277 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1278 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1279 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1280 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1281 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1282 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1283 (tdesc-ipa.o: tdesc.c): Remove.
1284 (x32-linux-ipa.o: x32-linux.c): Remove.
1285 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1286 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1287
1288 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1289
1290 * Makefile.in (%.o: ../arch/%.c): New rule.
1291 (arm.o: ../arch/arm.c): Remove.
1292 (arm-linux.o: ../arch/arm-linux.c): Remove.
1293 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1294 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1295
1296 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1297
1298 * Makefile.in (%.o: ../nat/%.c): New rule.
1299 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1300 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1301 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1302 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1303 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1304 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1305 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1306 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1307 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1308 (linux-personality.o: ../nat/linux-personality.c): Remove.
1309 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1310 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1311 (x86-linux.o: ../nat/x86-linux.c): Remove.
1312 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1313 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1314
1315 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1316
1317 * Makefile.in (%.o: ../common/%.c): New rule.
1318 (signals.o: ../common/signals.c): Remove.
1319 (print-utils.o: ../common/print-utils.c): Remove.
1320 (rsp-low.o: ../common/rsp-low.c): Remove.
1321 (common-utils.o: ../common/common-utils.c): Remove.
1322 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1323 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1324 (vec.o: ../common/vec.c): Remove.
1325 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1326 (xml-utils.o: ../common/xml-utils.c): Remove.
1327 (ptid.o: ../common/ptid.c): Remove.
1328 (buffer.o: ../common/buffer.c): Remove.
1329 (format.o: ../common/format.c): Remove.
1330 (filestuff.o: ../common/filestuff.c): Remove.
1331 (agent.o: ../common/agent.c): Remove.
1332 (errors.o: ../common/errors.c): Remove.
1333 (environ.o: ../common/environ.c): Remove.
1334 (common-debug.o: ../common/common-debug.c): Remove.
1335 (cleanups.o: ../common/cleanups.c): Remove.
1336 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1337 (fileio.o: ../common/fileio.c): Remove.
1338 (common-regcache.o: ../common/common-regcache.c): Remove.
1339 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1340 (new-op.o: ../common/new-op.c): Remove.
1341 (btrace-common.o: ../common/btrace-common.c): Remove.
1342
1343 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1344
1345 * Makefile.in (%.o: ../target/%.c): New rule.
1346 (waitstatus.o: ../target/waitstatus.c): Remove.
1347
1348 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1349
1350 * Makefile.in
1351 (%.c: ../regformats/%.dat,
1352 (%.c: ../regformats/arm/%.dat,
1353 (%.c: ../regformats/i386/%.dat,
1354 (%.c: ../regformats/rs6000/%.dat): New rules.
1355 (aarch64.c): Remove.
1356 (reg-arm.c): Remove.
1357 (arm-with-iwmmxt.c): Remove.
1358 (arm-with-vfpv2.c): Remove.
1359 (arm-with-vfpv3.c): Remove.
1360 (arm-with-neon.c): Remove.
1361 (reg-bfin.c): Remove.
1362 (reg-cris.c): Remove.
1363 (reg-crisv32.c): Remove.
1364 (i386.c): Remove.
1365 (i386-linux.c): Remove.
1366 (i386-avx.c): Remove.
1367 (i386-avx-linux.c): Remove.
1368 (i386-avx-avx512.c): Remove.
1369 (i386-avx-avx512-linux.c): Remove.
1370 (i386-mpx.c): Remove.
1371 (i386-mpx-linux.c): Remove.
1372 (i386-avx-mpx-avx512-pku.c): Remove.
1373 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1374 (i386-avx-mpx.c): Remove.
1375 (i386-avx-mpx-linux.c): Remove.
1376 (i386-mmx.c): Remove.
1377 (i386-mmx-linux.c): Remove.
1378 (reg-ia64.c): Remove.
1379 (reg-m32r.c): Remove.
1380 (reg-m68k.c): Remove.
1381 (reg-cf.c): Remove.
1382 (mips-linux.c): Remove.
1383 (mips-dsp-linux.c): Remove.
1384 (mips64-linux.c): Remove.
1385 (mips64-dsp-linux.c): Remove.
1386 (nios2-linux.c): Remove.
1387 (powerpc-32.c): Remove.
1388 (powerpc-32l.c): Remove.
1389 (powerpc-altivec32l.c): Remove.
1390 (powerpc-cell32l.c): Remove.
1391 (powerpc-vsx32l.c): Remove.
1392 (powerpc-isa205-32l.c): Remove.
1393 (powerpc-isa205-altivec32l.c): Remove.
1394 (powerpc-isa205-vsx32l.c): Remove.
1395 (powerpc-e500l.c): Remove.
1396 (powerpc-64l.c): Remove.
1397 (powerpc-altivec64l.c): Remove.
1398 (powerpc-cell64l.c): Remove.
1399 (powerpc-vsx64l.c): Remove.
1400 (powerpc-isa205-64l.c): Remove.
1401 (powerpc-isa205-altivec64l.c): Remove.
1402 (powerpc-isa205-vsx64l.c): Remove.
1403 (s390-linux32.c): Remove.
1404 (s390-linux32v1.c): Remove.
1405 (s390-linux32v2.c): Remove.
1406 (s390-linux64.c): Remove.
1407 (s390-linux64v1.c): Remove.
1408 (s390-linux64v2.c): Remove.
1409 (s390-te-linux64.c): Remove.
1410 (s390-vx-linux64.c): Remove.
1411 (s390-tevx-linux64.c): Remove.
1412 (s390x-linux64.c): Remove.
1413 (s390x-linux64v1.c): Remove.
1414 (s390x-linux64v2.c): Remove.
1415 (s390x-te-linux64.c): Remove.
1416 (s390x-vx-linux64.c): Remove.
1417 (s390x-tevx-linux64.c): Remove.
1418 (tic6x-c64xp-linux.c): Remove.
1419 (tic6x-c64x-linux.c): Remove.
1420 (tic6x-c62x-linux.c): Remove.
1421 (reg-sh.c): Remove.
1422 (reg-sparc64.c): Remove.
1423 (reg-spu.c): Remove.
1424 (amd64.c): Remove.
1425 (amd64-linux.c): Remove.
1426 (amd64-avx.c): Remove.
1427 (amd64-avx-linux.c): Remove.
1428 (amd64-avx-avx512.c): Remove.
1429 (amd64-avx-avx512-linux.c): Remove.
1430 (amd64-mpx.c): Remove.
1431 (amd64-mpx-linux.c): Remove.
1432 (amd64-avx-mpx-avx512-pku.c): Remove.
1433 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1434 (amd64-avx-mpx.c): Remove.
1435 (amd64-avx-mpx-linux.c): Remove.
1436 (x32.c): Remove.
1437 (x32-linux.c): Remove.
1438 (x32-avx.c): Remove.
1439 (x32-avx-linux.c): Remove.
1440 (x32-avx-avx512.c): Remove.
1441 (x32-avx-avx512-linux.c): Remove.
1442 (reg-xtensa.c): Remove.
1443 (reg-tilegx.c): Remove.
1444 (reg-tilegx32.c): Remove.
1445
1446 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1447
1448 * Makefile.in (SFILES): Add "common/environ.c".
1449 (OBJS): Add "common/environ.h".
1450
1451 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1452
1453 * configure.ac: Check if the fs_base and gs_base members of
1454 `struct user_regs_struct' exist.
1455 * config.in: Regenerated.
1456 * configure: Likewise.
1457
1458 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1459
1460 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1461 target_read_memory.
1462 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1463 (get_next_pcs_syscall_next_pc): Likewise.
1464
1465 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1466
1467 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1468 * nto-x86-low.c: Likewise.
1469
1470 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1471
1472 * Makefile.in: Include disable-implicit-rules.mk.
1473
1474 2016-11-23 Pedro Alves <palves@redhat.com>
1475
1476 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1477 (debug_vprintf): Use std::chrono::steady_clock instead of
1478 gettimeofday. Use '.' instead of ':'.
1479 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1480 (get_timestamp): Use std::chrono::steady_clock instead of
1481 gettimeofday.
1482
1483 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1484
1485 * Makefile.in: Fix whitespace formatting.
1486
1487 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1488
1489 * Makefile.in (SFILES, OBS): Flatten list and order
1490 alphabetically.
1491
1492 2016-11-23 Pedro Alves <palves@redhat.com>
1493
1494 * event-loop.c (handle_file_event): Use warning.
1495 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1496 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1497 Use warning.
1498
1499 2016-11-23 Pedro Alves <palves@redhat.com>
1500
1501 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1502 output.
1503 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1504 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1505 debug_printf and debug_flush for debug output.
1506 * server.c (handle_general_set): Likewise.
1507 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1508 output.
1509
1510 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1511
1512 * Makefile.in (.c.o): Replace rule with ...
1513 (%.o: %.c): ... this one.
1514
1515 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1516
1517 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1518 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1519 make.
1520 * configure.ac: Remove checks for the make program.
1521 * configure: Re-generate.
1522
1523 2016-10-28 Pedro Alves <palves@redhat.com>
1524
1525 * Makefile.in (CXX_DIALECT): Get from configure.
1526 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1527 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1528 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1529 * config.in: Regenerate.
1530 * configure: Regenerate.
1531
1532 2016-10-27 Yao Qi <yao.qi@linaro.org>
1533
1534 * linux-low.c (linux_supports_range_stepping): Return true if
1535 can_software_single_step return true.
1536
1537 2016-10-27 Yao Qi <yao.qi@linaro.org>
1538
1539 * inferiors.c (find_inferior_in_random): New function.
1540 * inferiors.h (find_inferior_in_random): Declare.
1541 * linux-low.c (linux_wait_for_event_filtered): Call
1542 find_inferior_in_random instead of find_inferior.
1543
1544 2016-10-27 Yao Qi <yao.qi@linaro.org>
1545
1546 * linux-low.c (linux_wait_1): If single-step breakpoints are
1547 inserted, remove them.
1548
1549 2016-10-26 Pedro Alves <palves@redhat.com>
1550
1551 * linux-low.c (handle_extended_wait): Link parent/child fork
1552 threads.
1553 (linux_wait_1): Unlink them.
1554 (linux_set_resume_request): Ignore resume requests for
1555 already-resumed and unhandled fork child threads.
1556 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1557 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1558 New functions.
1559 (handle_v_requests) <vCont>: Don't call require_running.
1560 * server.h (in_queued_stop_replies): New declaration.
1561
1562 2016-10-24 Yao Qi <yao.qi@linaro.org>
1563
1564 PR server/20733
1565 * linux-aarch64-low.c (append_insns): Cast the return value to
1566 'uint32_t *'.
1567
1568 2016-10-10 Yao Qi <yao.qi@linaro.org>
1569
1570 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1571
1572 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1573
1574 * target.c (target_supports_multi_process): New function, moved
1575 from...
1576 * target.h (target_supports_multi_process): ... here. Remove
1577 macro.
1578
1579 2016-10-05 Tom Tromey <tom@tromey.com>
1580
1581 PR remote/20655:
1582 * tracepoint.c (handle_tracepoint_bkpts): Check
1583 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1584
1585 2016-10-05 Yao Qi <yao.qi@linaro.org>
1586
1587 * configure.srv: Update the path of arm-*.xml files.
1588
1589 2016-10-05 Terry Guo <terry.guo@arm.com>
1590 Yao Qi <yao.qi@linaro.org>
1591
1592 * Makefile.in: Adjust the path of rules.
1593 * configure.srv: Update the path of xml files.
1594 * regformats/arm-with-iwmmxt.dat: Regenerated.
1595 * regformats/arm-with-neon.dat: Likewise.
1596 * regformats/arm-with-vfpv2.dat: Likewise.
1597 * regformats/arm-with-vfpv3.dat Likewise.
1598
1599 2016-09-30 Yao Qi <yao.qi@linaro.org>
1600
1601 PR gdbserver/20627
1602 * target.c (target_stop_and_wait): Don't call
1603 target_continue_no_signal, use resume_stop instead.
1604
1605 2016-09-26 Yao Qi <yao.qi@linaro.org>
1606
1607 * linux-low.c (linux_wait_1): Call debug_exit.
1608
1609 2016-09-23 Pedro Alves <palves@redhat.com>
1610
1611 * Makefile.in (SFILES): Add common/new-op.c.
1612 (OBS): Add common/new-op.o.
1613 (new-op.o): New rule.
1614
1615 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1616
1617 * .gitinore: Ignore more files.
1618
1619 2016-09-21 Yao Qi <yao.qi@linaro.org>
1620
1621 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1622 23.
1623
1624 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1625
1626 * server.c (start_inferior): Call target_mourn_inferior instead of
1627 mourn_inferior; pass ptid_t argument to it.
1628 (resume): Likewise.
1629 (handle_target_event): Likewise.
1630 * target.c (target_mourn_inferior): New function.
1631 * target.h (mourn_inferior): Delete macro.
1632
1633 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1634
1635 * linux-low.c (lwp_is_stepping): New function.
1636
1637 2016-09-06 Carl Love <cel@us.ibm.com>
1638
1639 * server.c (start_inferior): Fixed comment, requested comment change
1640 didn't get updated correctly. Removed reference to ptrace () call as
1641 it is only true on Linux systems.
1642
1643 2016-09-06 Carl Love <cel@us.ibm.com>
1644
1645 * server.c (start_inferior): Do not call
1646 function target_post_create_inferior () if the
1647 inferior process has already exited.
1648
1649 2016-09-05 Pedro Alves <palves@redhat.com>
1650
1651 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1652 (COMPILE.pre, CC_LD): Use CXX directly.
1653 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1654 * acinclude.m4: Don't include build-with-cxx.m4.
1655 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1656 * configure: Regenerate.
1657
1658 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1659
1660 PR gdb/19495
1661 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1662 call writing data to own_buf.
1663
1664 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1665
1666 * target.c (mywait): Call target_wait instead of
1667 the_target->wait.
1668 (target_wait): New function.
1669
1670 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1671
1672 * server.c (start_inferior): New variable 'ptid'. Replace calls
1673 to the_target->resume by target_continue{,_no_signal}, depending
1674 on the case.
1675 * target.c (target_stop_and_wait): Call target_continue_no_signal
1676 instead of the_target->resume.
1677 (target_continue): New function.
1678
1679 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1680
1681 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1682
1683 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1684
1685 PR server/20491
1686 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1687 ps_prochandle.
1688 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1689 * linux-arm-low.c (ps_get_thread_area): Likewise.
1690 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1691 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1692 * linux-mips-low.c (ps_get_thread_area): Likewise.
1693 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1694 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1695 * linux-x86-low.c (ps_get_thread_area): Likewise.
1696 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1697
1698 2016-08-19 Pedro Alves <palves@redhat.com>
1699
1700 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1701
1702 2016-08-19 Pedro Alves <palves@redhat.com>
1703
1704 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1705 comment. Use memcpy instead of casting through unsigned long.
1706
1707 2016-08-19 Pedro Alves <palves@redhat.com>
1708
1709 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1710 allocating around 0x80000000.
1711
1712 2016-08-19 Pedro Alves <palves@redhat.com>
1713
1714 PR gdb/20415
1715 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1716 (x32-avx512-linux-ipa.o): New rules.
1717 * configure.ac (x86_64-*-linux*): New x32 check.
1718 * configure.srv (ipa_x32_linux_regobj): New.
1719 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1720 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1721 descriptions.
1722 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1723 descriptions.
1724 * configure: Regenerate.
1725
1726 2016-08-09 Pedro Alves <palves@redhat.com>
1727
1728 PR gdb/18653
1729 * Makefile.in (OBS): Add signals-state-save-restore.o.
1730 (signals-state-save-restore.o): New rule.
1731 * config.in: Regenerate.
1732 * configure: Regenerate.
1733 * linux-low.c: Include "signals-state-save-restore.h".
1734 (linux_create_inferior): Call
1735 restore_original_signals_state.
1736 * server.c: Include "dispositions-save-restore.h".
1737 (captured_main): Call save_original_signals_state.
1738
1739 2016-08-05 Pedro Alves <palves@redhat.com>
1740
1741 * configure: Regenerate.
1742
1743 2016-08-04 Yao Qi <yao.qi@linaro.org>
1744
1745 * linux-low.c (regsets_fetch_inferior_registers): Check
1746 errno is ESRCH or not.
1747
1748 2016-08-02 Yao Qi <yao.qi@linaro.org>
1749
1750 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1751 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1752 (thread_db_load_search): Update.
1753 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1754 td_ta_set_event and td_ta_event_getmsg.
1755
1756 2016-07-26 Pedro Alves <palves@redhat.com>
1757
1758 PR server/20414
1759 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1760 of unsigned long for 64-bit registers and use uint32_t instead of
1761 unsigned int for 32-bit registers.
1762
1763 2016-07-26 Pedro Alves <palves@redhat.com>
1764
1765 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1766 to 'ptrace'.
1767
1768 2016-07-21 Tom Tromey <tom@tromey.com>
1769
1770 * configure: Rebuild.
1771
1772 2016-07-21 Yao Qi <yao.qi@linaro.org>
1773
1774 * mem-break.c (find_gdb_breakpoint): Cast bp to
1775 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1776
1777 2016-07-21 Yao Qi <yao.qi@linaro.org>
1778
1779 * server.c (handle_v_requests): Support s and S actions
1780 if target_supports_software_single_step return true.
1781
1782 2016-07-21 Yao Qi <yao.qi@linaro.org>
1783
1784 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1785 is resume_step, call maybe_hw_step.
1786 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1787 and unstop them.
1788 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1789 breakpoints or not.
1790 (proceed_one_lwp): If resume request is resume_step, install
1791 reinsert breakpoints and call maybe_hw_step.
1792
1793 2016-07-21 Yao Qi <yao.qi@linaro.org>
1794
1795 * linux-low.c (proceed_one_lwp): Declare.
1796 (linux_resume_one_thread): Remove local variable 'step'.
1797 Lift code enqueue signal. Call proceed_one_lwp instead of
1798 linux_resume_one_lwp.
1799
1800 2016-07-21 Yao Qi <yao.qi@linaro.org>
1801
1802 * linux-low.c (linux_resume_one_thread): Call
1803 enqueue_pending_signal.
1804
1805 2016-07-21 Yao Qi <yao.qi@linaro.org>
1806
1807 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1808 * inferiors.c (do_restore_current_thread_cleanup): New function.
1809 (make_cleanup_restore_current_thread): Likewise.
1810 * linux-low.c (install_software_single_step_breakpoints): Call
1811 make_cleanup_restore_current_thread. Switch current_thread to
1812 thread.
1813
1814 2016-07-21 Yao Qi <yao.qi@linaro.org>
1815
1816 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1817 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1818 (clone_one_breakpoint): Likewise.
1819 (delete_reinsert_breakpoints): Change parameter to thread.
1820 Callers updated.
1821 (has_reinsert_breakpoints): Likewise.
1822 (uninsert_reinsert_breakpoints): Likewise.
1823 (reinsert_reinsert_breakpoints): Likewise.
1824 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1825 (delete_reinsert_breakpoints): Likewise.
1826 (reinsert_reinsert_breakpoints): Likewise.
1827 (uninsert_reinsert_breakpoints): Likewise.
1828 (has_reinsert_breakpoints): Likewise.
1829
1830 2016-07-21 Yao Qi <yao.qi@linaro.org>
1831
1832 * inferiors.c (get_thread_process): Make parameter const.
1833 * inferiors.h (get_thread_process): Update declaration.
1834 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1835 Add new parameters child_thread and parent_thread. Callers
1836 updated.
1837 * mem-break.h (clone_all_breakpoints): Update declaration.
1838
1839 2016-07-21 Yao Qi <yao.qi@linaro.org>
1840
1841 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1842 <command_list, handler>: Remove.
1843 (struct gdb_breakpoint): New.
1844 (struct other_breakpoint): New.
1845 (struct reinsert_breakpoint): New.
1846 (is_gdb_breakpoint): New function.
1847 (any_persistent_commands): Update command_list if
1848 is_gdb_breakpoint returns true.
1849 (set_breakpoint): Create breakpoints according to their types.
1850 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1851 (set_gdb_breakpoint_1): Likewise.
1852 (set_gdb_breakpoint): Likewise.
1853 (clear_breakpoint_conditions): Change parameter type to
1854 'struct gdb_breakpoint *'.
1855 (clear_breakpoint_commands): Likewise.
1856 (clear_breakpoint_conditions_and_commands): Likewise.
1857 (add_condition_to_breakpoint): Likewise.
1858 (add_breakpoint_condition): Likewise.
1859 (add_commands_to_breakpoint): Likewise.
1860 (check_breakpoints): Check other_breakpoint.
1861 (clone_one_breakpoint): Clone breakpopint according to its type.
1862 * mem-break.h (struct gdb_breakpoint): Declare.
1863 (set_gdb_breakpoint): Update declaration.
1864 (clear_breakpoint_conditions_and_commands): Likewise.
1865 (add_breakpoint_condition): Likewise.
1866 (add_breakpoint_commands): Likewise.
1867 * server.c (process_point_options): Change parameter type to
1868 'struct gdb_breakpoint *'.
1869
1870 2016-07-21 Yao Qi <yao.qi@linaro.org>
1871
1872 * mem-break.c (set_breakpoint_at): Rename it to ...
1873 (set_breakpoint_type_at): ... it.
1874 (set_breakpoint_at): Call set_breakpoint_type_at.
1875 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1876 * mem-break.h (set_breakpoint_at): Update comments.
1877
1878 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1879
1880 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1881 to buf parameter.
1882 (nios2_store_gregset): Likewise.
1883
1884 2016-07-01 Pedro Alves <palves@redhat.com>
1885 Antoine Tremblay <antoine.tremblay@ericsson.com>
1886
1887 * linux-low.c: Change interface to take the target lwp_info
1888 pointer directly and return void. Handle detaching from a zombie
1889 thread.
1890 (linux_detach_lwp_callback): New function.
1891 (linux_detach): Detach from the leader thread after detaching from
1892 the clone threads.
1893
1894 2016-06-28 Yao Qi <yao.qi@linaro.org>
1895
1896 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1897 for variable new_offset.
1898 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1899 (aarch64_ftrace_insn_reloc_cb): Likewise.
1900 (aarch64_ftrace_insn_reloc_tb): Likewise.
1901 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1902 PRIx64 instead of PRIx32.
1903
1904 2016-06-28 Yao Qi <yao.qi@linaro.org>
1905
1906 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1907 (the_low_target): Install arm_get_syscall_trapinfo.
1908
1909 2016-06-28 Yao Qi <yao.qi@linaro.org>
1910
1911 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1912 function.
1913 (the_low_target): Install aarch64_get_syscall_trapinfo.
1914
1915 2016-06-28 Yao Qi <yao.qi@linaro.org>
1916
1917 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1918 Callers updated.
1919 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1920 Remove parameter sysno.
1921 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1922 sysret.
1923
1924 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1925
1926 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1927 (s390_emit_ne_goto): Likewise.
1928 (s390_emit_lt_goto): Likewise.
1929 (s390_emit_le_goto): Likewise.
1930 (s390_emit_gt_goto): Likewise.
1931 (s390_emit_ge_goto): Likewise.
1932 (s390x_emit_eq_goto): Likewise.
1933 (s390x_emit_ne_goto): Likewise.
1934 (s390x_emit_lt_goto): Likewise.
1935 (s390x_emit_le_goto): Likewise.
1936 (s390x_emit_gt_goto): Likewise.
1937 (s390x_emit_ge_goto): Likewise.
1938 (s390_emit_ops_impl): Mark variable static.
1939 (s390x_emit_ops): Likewise.
1940
1941 2016-06-17 Yao Qi <yao.qi@linaro.org>
1942
1943 * linux-low.c (handle_extended_wait): Call
1944 uninsert_reinsert_breakpoints for the parent process. Remove
1945 reinsert breakpoints from the child process. Reinsert them to
1946 the parent process when vfork is done.
1947 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1948 (reinsert_reinsert_breakpoints): New function.
1949 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1950 (reinsert_reinsert_breakpoints): Declare.
1951
1952 2016-06-17 Yao Qi <yao.qi@linaro.org>
1953
1954 * linux-low.c (handle_extended_wait): If the parent is doing
1955 step-over, remove the reinsert breakpoints from the forked child.
1956
1957 2016-06-17 Yao Qi <yao.qi@linaro.org>
1958
1959 * linux-low.c (unsuspend_all_lwps): Declare.
1960 (linux_low_filter_event): If thread exited, call finish_step_over.
1961 If step-over is finished, unsuspend other threads.
1962
1963 2016-06-17 Yao Qi <yao.qi@linaro.org>
1964
1965 * linux-low.c (linux_resume_one_lwp_throw): Assert
1966 has_reinsert_breakpoints returns false.
1967 * mem-break.c (delete_disabled_breakpoints): Assert
1968 bp type isn't reinsert_breakpoint.
1969
1970 2016-06-17 Yao Qi <yao.qi@linaro.org>
1971
1972 * linux-low.c (maybe_hw_step): New function.
1973 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1974 (finish_step_over): Switch current_thread to lwp temporarily,
1975 and assert has_reinsert_breakpoints returns true.
1976 (proceed_one_lwp): Call maybe_hw_step.
1977 * mem-break.c (has_reinsert_breakpoints): New function.
1978 * mem-break.h (has_reinsert_breakpoints): Declare.
1979
1980 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1981
1982 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1983
1984 2016-05-17 Yao Qi <yao.qi@linaro.org>
1985
1986 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1987 instead of find_inferior.
1988
1989 2016-05-05 Yao Qi <yao.qi@linaro.org>
1990
1991 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1992 Initialize res to zero.
1993
1994 2016-05-05 Yao Qi <yao.qi@linaro.org>
1995
1996 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1997 to uint32_t.
1998
1999 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2000
2001 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2002 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2003 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2004
2005 2016-04-28 Par Olsson <par.olsson@windriver.com>
2006 Simon Marchi <simon.marchi@ericsson.com>
2007
2008 * tracepoint.c (write_inferior_int8): New function.
2009 (cmd_qtenable_disable): Write enable flag using
2010 write_inferior_int8.
2011
2012 2016-04-25 Yao Qi <yao.qi@linaro.org>
2013
2014 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2015 (need_step_over_p): Return zero if the LWP has pending signals
2016 can be delivered on software single step target.
2017
2018 2016-04-25 Yao Qi <yao.qi@linaro.org>
2019
2020 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2021 return instead of error.
2022
2023 2016-04-22 Yao Qi <yao.qi@linaro.org>
2024
2025 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2026 to 23.
2027
2028 2016-04-22 Yao Qi <yao.qi@linaro.org>
2029
2030 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2031 signal when stepping over breakpoint with software single
2032 step.
2033
2034 2016-04-21 Pedro Alves <palves@redhat.com>
2035
2036 * linux-s390-low.c (s390_collect_ptrace_register)
2037 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2038 add casts.
2039 (s390_check_regset): Use void * instead of gdb_byte *.
2040
2041 2016-04-20 Pedro Alves <palves@redhat.com>
2042
2043 * configure: Renegerate.
2044
2045 2016-04-20 Yao Qi <yao.qi@linaro.org>
2046
2047 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2048 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2049 number 16.
2050 (arm_store_gregset): Likewise.
2051
2052 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2053
2054 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2055 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2056 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2057 (amd64-avx-mpx-linux.c): New rules.
2058 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2059 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2060 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2061 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2062 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2063 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2064 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2065 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2066 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2067 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2068 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2069 * linux-x86-low.c (x86_linux_read_description): Add case for
2070 X86_XSTATE_AVX_MPX_MASK.
2071 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2072 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2073 init_registers_i386_avx_mpx_linux.
2074 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2075 (initialize_low_tracepoint): Call
2076 init_registers_i386_avx_mpx_linux.
2077 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2078 (initialize_low_tracepoint): Call
2079 init_registers_amd64_avx_mpx_linux.
2080 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2081 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2082 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2083 declarations.
2084
2085 2016-04-18 Pedro Alves <palves@redhat.com>
2086
2087 * configure: Regenerate.
2088
2089 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2090
2091 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2092 (aarch64_emit_sub): Likewise.
2093
2094 2016-04-12 Pedro Alves <palves@redhat.com>
2095
2096 * utils.c (prepare_to_throw_exception): Delete.
2097
2098 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2099
2100 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2101
2102 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2103
2104 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2105
2106 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2107
2108 * linux-aarch64-ipa.c: Add <elf.h> include.
2109 * linux-ppc-ipa.c: Add <elf.h> include.
2110 * linux-s390-ipa.c: Add <elf.h> include.
2111
2112 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2113
2114 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2115 (get_raw_reg_ptr): Likewise.
2116 (get_trace_state_variable_value_ptr): Likewise.
2117 (set_trace_state_variable_value_ptr): Likewise.
2118 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2119 char *.
2120
2121 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2122 Marcin Kościelnicki <koriakin@0x04.net>
2123
2124 PR/17221
2125 * linux-ppc-low.c (emit_insns): New function.
2126 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2127 (ppc_emit_prologue): New function.
2128 (ppc_emit_epilogue): New function.
2129 (ppc_emit_add): New function.
2130 (ppc_emit_sub): New function.
2131 (ppc_emit_mul): New function.
2132 (ppc_emit_lsh): New function.
2133 (ppc_emit_rsh_signed): New function.
2134 (ppc_emit_rsh_unsigned): New function.
2135 (ppc_emit_ext): New function.
2136 (ppc_emit_zero_ext): New function.
2137 (ppc_emit_log_not): New function.
2138 (ppc_emit_bit_and): New function.
2139 (ppc_emit_bit_or): New function.
2140 (ppc_emit_bit_xor): New function.
2141 (ppc_emit_bit_not): New function.
2142 (ppc_emit_equal): New function.
2143 (ppc_emit_less_signed): New function.
2144 (ppc_emit_less_unsigned): New function.
2145 (ppc_emit_ref): New function.
2146 (ppc_emit_const): New function.
2147 (ppc_emit_reg): New function.
2148 (ppc_emit_pop): New function.
2149 (ppc_emit_stack_flush): New function.
2150 (ppc_emit_swap): New function.
2151 (ppc_emit_stack_adjust): New function.
2152 (ppc_emit_call): New function.
2153 (ppc_emit_int_call_1): New function.
2154 (ppc_emit_void_call_2): New function.
2155 (ppc_emit_if_goto): New function.
2156 (ppc_emit_goto): New function.
2157 (ppc_emit_eq_goto): New function.
2158 (ppc_emit_ne_goto): New function.
2159 (ppc_emit_lt_goto): New function.
2160 (ppc_emit_le_goto): New function.
2161 (ppc_emit_gt_goto): New function.
2162 (ppc_emit_ge_goto): New function.
2163 (ppc_write_goto_address): New function.
2164 (ppc_emit_ops_impl): New static variable.
2165 (ppc64v1_emit_prologue): New function.
2166 (ppc64v2_emit_prologue): New function.
2167 (ppc64_emit_epilogue): New function.
2168 (ppc64_emit_add): New function.
2169 (ppc64_emit_sub): New function.
2170 (ppc64_emit_mul): New function.
2171 (ppc64_emit_lsh): New function.
2172 (ppc64_emit_rsh_signed): New function.
2173 (ppc64_emit_rsh_unsigned): New function.
2174 (ppc64_emit_ext): New function.
2175 (ppc64_emit_zero_ext): New function.
2176 (ppc64_emit_log_not): New function.
2177 (ppc64_emit_bit_and): New function.
2178 (ppc64_emit_bit_or): New function.
2179 (ppc64_emit_bit_xor): New function.
2180 (ppc64_emit_bit_not): New function.
2181 (ppc64_emit_equal): New function.
2182 (ppc64_emit_less_signed): New function.
2183 (ppc64_emit_less_unsigned): New function.
2184 (ppc64_emit_ref): New function.
2185 (ppc64_emit_const): New function.
2186 (ppc64v1_emit_reg): New function.
2187 (ppc64v2_emit_reg): New function.
2188 (ppc64_emit_pop): New function.
2189 (ppc64_emit_stack_flush): New function.
2190 (ppc64_emit_swap): New function.
2191 (ppc64v1_emit_call): New function.
2192 (ppc64v2_emit_call): New function.
2193 (ppc64v1_emit_int_call_1): New function.
2194 (ppc64v2_emit_int_call_1): New function.
2195 (ppc64v1_emit_void_call_2): New function.
2196 (ppc64v2_emit_void_call_2): New function.
2197 (ppc64_emit_if_goto): New function.
2198 (ppc64_emit_eq_goto): New function.
2199 (ppc64_emit_ne_goto): New function.
2200 (ppc64_emit_lt_goto): New function.
2201 (ppc64_emit_le_goto): New function.
2202 (ppc64_emit_gt_goto): New function.
2203 (ppc64_emit_ge_goto): New function.
2204 (ppc64v1_emit_ops_impl): New static variable.
2205 (ppc64v2_emit_ops_impl): New static variable.
2206 (ppc_emit_ops): New function.
2207 (linux_low_target): Wire in ppc_emit_ops.
2208
2209 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2210 Marcin Kościelnicki <koriakin@0x04.net>
2211
2212 PR/17221
2213 * Makefile.in: Add powerpc-*-ipa.o
2214 * configure.srv: Add ipa_obj for powerpc*-linux.
2215 * linux-ppc-ipa.c: New file.
2216 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2217 includes.
2218 (PPC_FIELD): New macro.
2219 (PPC_SEXT): New macro.
2220 (PPC_OP6): New macro.
2221 (PPC_BO): New macro.
2222 (PPC_LI): New macro.
2223 (PPC_BD): New macro.
2224 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2225 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2226 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2227 (ppc_get_thread_area): New function.
2228 (is_elfv2_inferior): New function.
2229 (gen_ds_form): New function.
2230 (GEN_STD): New macro.
2231 (GEN_STDU): New macro.
2232 (GEN_LD): New macro.
2233 (GEN_LDU): New macro.
2234 (gen_d_form): New function.
2235 (GEN_ADDI): New macro.
2236 (GEN_ADDIS): New macro.
2237 (GEN_LI): New macro.
2238 (GEN_LIS): New macro.
2239 (GEN_ORI): New macro.
2240 (GEN_ORIS): New macro.
2241 (GEN_LWZ): New macro.
2242 (GEN_STW): New macro.
2243 (GEN_STWU): New macro.
2244 (gen_xfx_form): New function.
2245 (GEN_MFSPR): New macro.
2246 (GEN_MTSPR): New macro.
2247 (GEN_MFCR): New macro.
2248 (GEN_MTCR): New macro.
2249 (GEN_SYNC): New macro.
2250 (GEN_LWSYNC): New macro.
2251 (gen_x_form): New function.
2252 (GEN_OR): New macro.
2253 (GEN_MR): New macro.
2254 (GEN_LWARX): New macro.
2255 (GEN_STWCX): New macro.
2256 (GEN_CMPW): New macro.
2257 (gen_md_form): New function.
2258 (GEN_RLDICL): New macro.
2259 (GEN_RLDICR): New macro.
2260 (gen_i_form): New function.
2261 (GEN_B): New macro.
2262 (GEN_BL): New macro.
2263 (gen_b_form): New function.
2264 (GEN_BNE): New macro.
2265 (GEN_LOAD): New macro.
2266 (GEN_STORE): New macro.
2267 (gen_limm): New function.
2268 (gen_atomic_xchg): New function.
2269 (gen_call): New function.
2270 (ppc_relocate_instruction): New function.
2271 (ppc_install_fast_tracepoint_jump_pad): New function.
2272 (ppc_get_min_fast_tracepoint_insn_len): New function.
2273 (ppc_get_ipa_tdesc_idx): New function.
2274 (the_low_target): Wire in the new functions.
2275 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2276 tdescs.
2277 * linux-ppc-tdesc.h: New file.
2278
2279 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2280
2281 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2282 (alloc_jump_pad_buffer): New function.
2283 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2284 (alloc_jump_pad_buffer): New function.
2285 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2286 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2287 (alloc_jump_pad_buffer): New function.
2288 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2289 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2290 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2291 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2292
2293 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2294
2295 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2296 * linux-amd64-ipa.c: Likewise.
2297 * linux-i386-ipa.c: Likewise.
2298 * linux-s390-ipa.c: Likewise.
2299 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2300 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2301 set_trace_state_variable_value_ptr.
2302 (struct ipa_sym_addresses): Likewise.
2303 (symbol_list): Likewise.
2304 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2305 accessing gdb_collect directly.
2306 (gdb_collect_ptr_type): New typedef.
2307 (get_raw_reg_ptr_type): New typedef.
2308 (get_trace_state_variable_value_ptr_type): New typedef.
2309 (set_trace_state_variable_value_ptr_type): New typedef.
2310 (gdb_collect_ptr): New global.
2311 (get_raw_reg_ptr): New global.
2312 (get_trace_state_variable_value_ptr): New global.
2313 (set_trace_state_variable_value_ptr): New global.
2314 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2315 accessing get_raw_reg directly.
2316 (get_get_tsv_func_addr): Likewise for
2317 get_trace_state_variable_value_ptr.
2318 (get_set_tsv_func_addr): Likewise for
2319 set_trace_state_variable_value_ptr.
2320 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2321
2322 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2323
2324 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2325
2326 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2327
2328 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2329 packets.
2330 (relocate_instruction): Remove own_buf.
2331 * server.c (own_buf): Make global.
2332 (handle_v_requests): Make global.
2333 * server.h (own_buf): New declaration.
2334 (handle_v_requests): New prototype.
2335
2336 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2337
2338 PR 18377
2339 * linux-s390-low.c (add_insns): New function.
2340 (s390_emit_prologue): New function.
2341 (s390_emit_epilogue): New function.
2342 (s390_emit_add): New function.
2343 (s390_emit_sub): New function.
2344 (s390_emit_mul): New function.
2345 (s390_emit_lsh): New function.
2346 (s390_emit_rsh_signed): New function.
2347 (s390_emit_rsh_unsigned): New function.
2348 (s390_emit_ext): New function.
2349 (s390_emit_log_not): New function.
2350 (s390_emit_bit_and): New function.
2351 (s390_emit_bit_or): New function.
2352 (s390_emit_bit_xor): New function.
2353 (s390_emit_bit_not): New function.
2354 (s390_emit_equal): New function.
2355 (s390_emit_less_signed): New function.
2356 (s390_emit_less_unsigned): New function.
2357 (s390_emit_ref): New function.
2358 (s390_emit_if_goto): New function.
2359 (s390_emit_goto): New function.
2360 (s390_write_goto_address): New function.
2361 (s390_emit_litpool): New function.
2362 (s390_emit_const): New function.
2363 (s390_emit_call): New function.
2364 (s390_emit_reg): New function.
2365 (s390_emit_pop): New function.
2366 (s390_emit_stack_flush): New function.
2367 (s390_emit_zero_ext): New function.
2368 (s390_emit_swap): New function.
2369 (s390_emit_stack_adjust): New function.
2370 (s390_emit_set_r2): New function.
2371 (s390_emit_int_call_1): New function.
2372 (s390_emit_void_call_2): New function.
2373 (s390_emit_eq_goto): New function.
2374 (s390_emit_ne_goto): New function.
2375 (s390_emit_lt_goto): New function.
2376 (s390_emit_le_goto): New function.
2377 (s390_emit_gt_goto): New function.
2378 (s390_emit_ge_goto): New function.
2379 (s390x_emit_prologue): New function.
2380 (s390x_emit_epilogue): New function.
2381 (s390x_emit_add): New function.
2382 (s390x_emit_sub): New function.
2383 (s390x_emit_mul): New function.
2384 (s390x_emit_lsh): New function.
2385 (s390x_emit_rsh_signed): New function.
2386 (s390x_emit_rsh_unsigned): New function.
2387 (s390x_emit_ext): New function.
2388 (s390x_emit_log_not): New function.
2389 (s390x_emit_bit_and): New function.
2390 (s390x_emit_bit_or): New function.
2391 (s390x_emit_bit_xor): New function.
2392 (s390x_emit_bit_not): New function.
2393 (s390x_emit_equal): New function.
2394 (s390x_emit_less_signed): New function.
2395 (s390x_emit_less_unsigned): New function.
2396 (s390x_emit_ref): New function.
2397 (s390x_emit_if_goto): New function.
2398 (s390x_emit_const): New function.
2399 (s390x_emit_call): New function.
2400 (s390x_emit_reg): New function.
2401 (s390x_emit_pop): New function.
2402 (s390x_emit_stack_flush): New function.
2403 (s390x_emit_zero_ext): New function.
2404 (s390x_emit_swap): New function.
2405 (s390x_emit_stack_adjust): New function.
2406 (s390x_emit_int_call_1): New function.
2407 (s390x_emit_void_call_2): New function.
2408 (s390x_emit_eq_goto): New function.
2409 (s390x_emit_ne_goto): New function.
2410 (s390x_emit_lt_goto): New function.
2411 (s390x_emit_le_goto): New function.
2412 (s390x_emit_gt_goto): New function.
2413 (s390x_emit_ge_goto): New function.
2414 (s390_emit_ops): New function.
2415 (struct linux_target_ops): Fill in emit_ops hook.
2416
2417 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2418
2419 PR 18377
2420 * Makefile.in: Add s390 IPA files.
2421 * configure.srv: Build IPA for s390.
2422 * linux-s390-ipa.c: New file.
2423 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2424 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2425 (tdesc_s390_linux32): Likewise.
2426 (init_registers_s390_linux32v1): Likewise.
2427 (tdesc_s390_linux32v1): Likewise.
2428 (init_registers_s390_linux32v2): Likewise.
2429 (tdesc_s390_linux32v2): Likewise.
2430 (init_registers_s390_linux64): Likewise.
2431 (tdesc_s390_linux64): Likewise.
2432 (init_registers_s390_linux64v1): Likewise.
2433 (tdesc_s390_linux64v1): Likewise.
2434 (init_registers_s390_linux64v2): Likewise.
2435 (tdesc_s390_linux64v2): Likewise.
2436 (init_registers_s390_te_linux64): Likewise.
2437 (tdesc_s390_te_linux64): Likewise.
2438 (init_registers_s390_vx_linux64): Likewise.
2439 (tdesc_s390_vx_linux64): Likewise.
2440 (init_registers_s390_tevx_linux64): Likewise.
2441 (tdesc_s390_tevx_linux64): Likewise.
2442 (init_registers_s390x_linux64): Likewise.
2443 (tdesc_s390x_linux64): Likewise.
2444 (init_registers_s390x_linux64v1): Likewise.
2445 (tdesc_s390x_linux64v1): Likewise.
2446 (init_registers_s390x_linux64v2): Likewise.
2447 (tdesc_s390x_linux64v2): Likewise.
2448 (init_registers_s390x_te_linux64): Likewise.
2449 (tdesc_s390x_te_linux64): Likewise.
2450 (init_registers_s390x_vx_linux64): Likewise.
2451 (tdesc_s390x_vx_linux64): Likewise.
2452 (init_registers_s390x_tevx_linux64): Likewise.
2453 (tdesc_s390x_tevx_linux64): Likewise.
2454 (have_hwcap_s390_vx): New static variable.
2455 (s390_arch_setup): Fill have_hwcap_s390_vx.
2456 (s390_get_thread_area): New function.
2457 (s390_ft_entry_gpr_esa): New const.
2458 (s390_ft_entry_gpr_zarch): New const.
2459 (s390_ft_entry_misc): New const.
2460 (s390_ft_entry_fr): New const.
2461 (s390_ft_entry_vr): New const.
2462 (s390_ft_main_31): New const.
2463 (s390_ft_main_64): New const.
2464 (s390_ft_exit_fr): New const.
2465 (s390_ft_exit_vr): New const.
2466 (s390_ft_exit_misc): New const.
2467 (s390_ft_exit_gpr_esa): New const.
2468 (s390_ft_exit_gpr_zarch): New const.
2469 (append_insns): New function.
2470 (s390_relocate_instruction): New function.
2471 (s390_install_fast_tracepoint_jump_pad): New function.
2472 (s390_get_min_fast_tracepoint_insn_len): New function.
2473 (s390_get_ipa_tdesc_idx): New function.
2474 (struct linux_target_ops): Wire in the above functions.
2475 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2476 * linux-s390-tdesc.h: New file.
2477
2478 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2479
2480 * linux-s390-low.c (s390_supports_tracepoints): New function.
2481 (struct linux_target_ops): Fill supports_tracepoints hook.
2482
2483 2016-03-18 Yao Qi <yao.qi@linaro.org>
2484
2485 * linux-low.c (lwp_signal_can_be_delivered): New function.
2486 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2487
2488 2016-03-18 Yao Qi <yao.qi@linaro.org>
2489
2490 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2491 0 if signal is enqueued. Remove 'signal' from one debugging
2492 message. Move one debugging message to some lines below.
2493 Remove code setting 'signal' to 0.
2494
2495 2016-03-18 Yao Qi <yao.qi@linaro.org>
2496
2497 * linux-low.c (linux_low_filter_event): Remove redundant
2498 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2499
2500 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2501
2502 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2503 (struct linux_target_ops): Wire in the above.
2504
2505 2016-03-03 Yao Qi <yao.qi@linaro.org>
2506
2507 * linux-low.c: Update comments to start_step_over.
2508
2509 2016-03-03 Yao Qi <yao.qi@linaro.org>
2510
2511 PR server/19736
2512 * linux-low.c (handle_extended_wait): Set child suspended
2513 if event_lwp->bp_reinsert isn't zero.
2514
2515 2016-03-02 Yao Qi <yao.qi@linaro.org>
2516
2517 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2518 enqueue_pending_signal.
2519
2520 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2521
2522 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2523 is actually loaded.
2524
2525 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2526
2527 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2528 (s390_regmap_3264) [!__s390x__]: New global.
2529 (s390_collect_ptrace_register): Skip map entries containing -1.
2530 (s390_supply_ptrace_register): Ditto.
2531 (s390_fill_gprs_high): New function.
2532 (s390_store_gprs_high): New function.
2533 (s390_regsets): Add NT_S390_HIGH_GPRS.
2534 (s390_get_hwcap): Enable on 31-bit.
2535 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2536 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2537 Detect NT_S390_HIGH_GPRS.
2538 (s390_usrregs_info_3264): Enable on 31-bit.
2539 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2540 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2541
2542 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2543
2544 PR gdb/13808
2545 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2546 * configure.srv: Ditto.
2547 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2548 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2549 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2550 (init_registers_amd64_linux): Remove prototype.
2551 (tdesc_amd64_linux): Remove declaration.
2552 (get_ipa_tdesc): New function.
2553 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2554 initialize remaining tdescs.
2555 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2556 (init_registers_i386_linux): Remove prototype.
2557 (tdesc_i386_linux): Remove declaration.
2558 (get_ipa_tdesc): New function.
2559 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2560 initialize remaining tdescs.
2561 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2562 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2563 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2564 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2565 (x86_get_ipa_tdesc_idx): New function.
2566 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2567 * linux-x86-tdesc.h: New file.
2568 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2569 (target_get_ipa_tdesc_idx): New macro.
2570 * tracepoint.c (ipa_tdesc_idx): New macro.
2571 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2572 (symbol_list): Add ipa_tdesc_idx.
2573 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2574 (ipa_tdesc): Remove.
2575 (ipa_tdesc_idx): New variable.
2576 (get_context_regcache): Use get_ipa_tdesc.
2577 (gdb_collect): Ditto.
2578 (gdb_probe): Ditto.
2579 * tracepoint.h (get_ipa_tdesc): New prototype.
2580 (ipa_tdesc): Remove.
2581
2582 2016-02-24 Pedro Alves <palves@redhat.com>
2583
2584 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2585 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2586 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2587 Factor out common code between the USE_SIGTRAP_SIGINFO and
2588 !USE_SIGTRAP_SIGINFO blocks.
2589 (linux_low_filter_event): Call save_stop_reason instead of
2590 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2591 Update comments.
2592 (linux_wait_1): Update comments.
2593
2594 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2595
2596 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2597 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2598 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2599 ppc_insert_point, ppc_remove_point.
2600
2601 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2602
2603 * linux-s390-low.c (s390_supports_z_point_type): New function.
2604 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2605
2606 2016-02-16 Yao Qi <yao.qi@linaro.org>
2607
2608 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2609 PC. Get pc from regcache_read_pc.
2610
2611 2016-02-12 Yao Qi <yao.qi@linaro.org>
2612
2613 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2614 or linux_get_pc_32bit.
2615 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2616
2617 2016-02-12 Yao Qi <yao.qi@linaro.org>
2618
2619 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2620 arm_linux_get_next_pcs_fixup.
2621
2622 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2623
2624 * tracepoint.c (x_tracepoint_action_download): Change
2625 write_inferior_data_ptr to write_inferior_data_pointer.
2626 (cmd_qtstart): Likewise.
2627 (write_inferior_data_ptr): Remove.
2628 (download_agent_expr): Change write_inferior_data_ptr to
2629 write_inferior_data_pointer.
2630 (download_tracepoint_1): Likewise.
2631 (download_tracepoint): Likewise.
2632 (download_trace_state_variables): Likewise.
2633
2634 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2635 Marcin Kościelnicki <koriakin@0x04.net>
2636
2637 * tracepoint.c (struct tracepoint_action_ops): Remove.
2638 (struct tracepoint_action): Remove ops.
2639 (m_tracepoint_action_download, r_tracepoint_action_download)
2640 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2641 size and offset accordingly.
2642 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2643 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2644 (tracepoint_action_send, tracepoint_action_download): New functions.
2645 Helpers for trace action handlers.
2646 (add_tracepoint_action): Remove setup actions ops.
2647 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2648
2649 2016-02-10 Yao Qi <yao.qi@linaro.org>
2650
2651 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2652
2653 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2654
2655 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2656 to AC_OUTPUT.
2657 * configure: Regenerate.
2658
2659 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2660
2661 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2662 void * to gdb_byte *.
2663 * linux-low.c (siginfo_fixup): Likewise.
2664 (linux_xfer_siginfo): Likewise.
2665 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2666 Likewise.
2667 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2668
2669 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2670
2671 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2672 to srv_tgtobj.
2673 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2674 to srv_tgtobj.
2675 * linux-x86-low.c [__x86_64__]: Include
2676 "nat/amd64-linux-siginfo.h".
2677 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2678 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2679 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2680 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2681 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2682 (cpt_si_fd, si_timerid, si_overrun): Move from
2683 nat/amd64-linux-siginfo.c.
2684 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2685
2686 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2687
2688 * server.c (skip_to_semicolon): Remove.
2689 (process_point_options): Use strchrnul instead of
2690 skip_to_semicolon.
2691
2692 2016-01-26 Yao Qi <yao.qi@linaro.org>
2693
2694 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2695 * linux-low.c (install_software_single_step_breakpoints): Don't
2696 call regcache_read_pc.
2697 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2698 argument pc.
2699
2700 2016-01-26 Yao Qi <yao.qi@linaro.org>
2701
2702 * linux-low.c (install_software_single_step_breakpoints): Call
2703 regcache_read_pc instead of get_pc.
2704
2705 2016-01-26 Yao Qi <yao.qi@linaro.org>
2706
2707 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2708 (unblock_async_io): Rename to ...
2709 (block_unblock_async_io): ... it. New function.
2710 (enable_async_io): Don't install SIGIO handler. Unblock it
2711 instead.
2712 (disable_async_io): Don't ignore SIGIO. Block it instead.
2713 (initialize_async_io): Install SIGIO handler. Don't call
2714 unblock_async_io.
2715
2716 2016-01-26 Yao Qi <yao.qi@linaro.org>
2717
2718 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2719 first character is '\003', call *the_target->request_interrupt.
2720
2721 2016-01-25 Yao Qi <yao.qi@linaro.org>
2722
2723 * remote-utils.c (new_thread_notify): Remove.
2724 (dead_thread_notify): Likewise.
2725 * remote-utils.h (new_thread_notify): Remove declaration.
2726 (dead_thread_notify): Likewise.
2727
2728 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2729
2730 * gdb.trace/pending.exp: Fix expected message on continue.
2731
2732 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2733
2734 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2735 it works properly on big-endian machines where sizeof (CORE_ADDR)
2736 != sizeof (void *).
2737
2738 2016-01-21 Pedro Alves <palves@redhat.com>
2739
2740 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2741 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2742 * configure: Regenerate.
2743
2744 2016-01-21 Yao Qi <yao.qi@linaro.org>
2745
2746 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2747 is_thumb and set it according to CPSR saved on the stack.
2748 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2749 arm_sigreturn_next_pc.
2750
2751 2016-01-18 Yao Qi <yao.qi@linaro.org>
2752
2753 * linux-low.c (linux_set_pc_64bit): New function.
2754 (linux_get_pc_64bit): New function.
2755 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2756 Declare.
2757 * linux-sparc-low.c (debug_threads): Remove declaration.
2758 (sparc_get_pc): Remove.
2759 (the_low_target): Use linux_get_pc_64bit instead of
2760 sparc_get_pc.
2761 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2762 (the_low_target): Use linux_get_pc_64bit and
2763 linux_set_pc_64bit.
2764
2765 2016-01-18 Yao Qi <yao.qi@linaro.org>
2766
2767 * linux-arm-low.c (debug_threads): Remove declaration.
2768 (arm_get_pc, arm_set_pc): Remove.
2769 (the_low_target): Use linux_get_pc_32bit and
2770 linux_set_pc_32bit.
2771 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2772 (the_low_target): Use linux_get_pc_32bit and
2773 linux_set_pc_32bit.
2774 * linux-cris-low.c (debug_threads): Remove declaration.
2775 (cris_get_pc, cris_set_pc,): Remove.
2776 (the_low_target): Use linux_get_pc_32bit and
2777 linux_set_pc_32bit.
2778 * linux-crisv32-low.c (debug_threads): Remove declaration.
2779 (cris_get_pc, cris_set_pc): Remove.
2780 (the_low_target): Use linux_get_pc_32bit and
2781 linux_set_pc_32bit.
2782 * linux-low.c: Include inttypes.h.
2783 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2784 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2785 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2786 (the_low_target): Use linux_get_pc_32bit and
2787 linux_set_pc_32bit.
2788 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2789 (the_low_target): Use linux_get_pc_32bit and
2790 linux_set_pc_32bit.
2791 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2792 (the_low_target): Use linux_get_pc_32bit and
2793 linux_set_pc_32bit.
2794 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2795 (the_low_target): Use linux_get_pc_32bit and
2796 linux_set_pc_32bit.
2797 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2798 (the_low_target): Use linux_get_pc_32bit and
2799 linux_set_pc_32bit.
2800
2801 2016-01-18 Gary Benson <gbenson@redhat.com>
2802
2803 * configure.ac (AC_FUNC_FORK): New check.
2804 * config.in: Regenerate.
2805 * configure: Likewise.
2806
2807 2016-01-14 Yao Qi <yao.qi@linaro.org>
2808
2809 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2810 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2811 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2812 arm_get_next_pcs_ctor.
2813
2814 2016-01-12 Josh Stone <jistone@redhat.com>
2815 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2816
2817 * inferiors.h: Include "gdb_vecs.h".
2818 (struct process_info): Add syscalls_to_catch.
2819 * inferiors.c (remove_process): Free syscalls_to_catch.
2820 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2821 syscall_return stops.
2822 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2823 * server.c (handle_general_set): Handle QCatchSyscalls.
2824 (handle_query): Report support for QCatchSyscalls.
2825 * target.h (struct target_ops): Add supports_catch_syscall.
2826 (target_supports_catch_syscall): New macro.
2827 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2828 (struct lwp_info): Add syscall_state.
2829 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2830 Maintain syscall_state and syscalls_to_catch across exec.
2831 (get_syscall_trapinfo): New function, proxy to the_low_target.
2832 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2833 (linux_low_filter_event): Toggle syscall_state entry/return for
2834 syscall traps, and set it ignored for all others.
2835 (gdb_catching_syscalls_p): New function.
2836 (gdb_catch_this_syscall_p): New function.
2837 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2838 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2839 (linux_supports_catch_syscall): New function.
2840 (linux_target_ops): Install it.
2841 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2842 (the_low_target): Install it.
2843
2844 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2845
2846 * acinclude.m4: Include new ../warning.m4 file.
2847 * configure: Regenerated.
2848 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2849
2850 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2851
2852 * ax.c (is_goto_target): Mark static.
2853 * linux-low.c (register_addr): Likewise.
2854 (linux_fetch_registers, linux_store_registers): Likewise.
2855 * mem-break.c (any_persistent_commands): Fix old prototype.
2856 (add_commands_to_breakpoint): Mark static.
2857 * regcache.c (find_register_by_name): Delete unused func.
2858 * remote-utils.c (hex_or_minus_one): Mark static.
2859 * server.c (monitor_show_help): Mark static.
2860 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2861 handle_v_requests): Likewise.
2862
2863 2016-01-12 Pedro Alves <palves@redhat.com>
2864
2865 Remove use of the registered trademark symbol throughout.
2866
2867 2016-01-08 Yao Qi <yao.qi@linaro.org>
2868
2869 * remote-utils.c (getpkt): If c is '\003', call target hook
2870 request_interrupt.
2871
2872 2016-01-06 Yao Qi <yao.qi@linaro.org>
2873
2874 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2875 linux-aarch32-low.c.
2876 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2877 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2878 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2879 (thumb2_breakpoint): Declare.
2880 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2881 linux-aarch32-low.h.
2882 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2883 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2884 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2885
2886 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2887
2888 * gdbreplay.c (gdbreplay_version): Change copyright year in
2889 version message.
2890 * server.c (gdbserver_version): Likewise.
2891
2892 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2893
2894 * server.c (crc32_table): Delete.
2895 (crc32): Use libiberty's xcrc32 function.
2896
2897 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2898
2899 * lynx-low.c (lynx_delete_thread_callback): New function.
2900 (lynx_mourn): Properly delete our process and all of its
2901 threads. Remove call to clear_inferiors.
2902
2903 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2904
2905 * target.c (thread_search_callback): Add check that
2906 the thread_stopped target callback is not NULL before
2907 calling it.
2908
2909 2015-12-21 Yao Qi <yao.qi@linaro.org>
2910
2911 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2912 arm breakpoint.
2913
2914 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2915
2916 * server.c (handle_query): Call target_supports_software_single_step.
2917
2918 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2919
2920 * linux-low.c (single_step): New function.
2921 (linux_resume_one_lwp_throw): Call single_step.
2922 (start_step_over): Likewise.
2923
2924 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2925
2926 * Makefile.in (SFILES): Append arch/arm-linux.c,
2927 arch/arm-get-next-pcs.c.
2928 (arm-linux.o): New rule.
2929 (arm-get-next-pcs.o): New rule.
2930 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2931 arm-linux.o.
2932 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2933 to linux-aarch32-low.c.
2934 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2935 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2936 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2937 (thumb2_breakpoint_len): Likewise.
2938 (arm_is_thumb_mode): Make non-static.
2939 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2940 from linux-aarch32-low.c.
2941 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2942 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2943 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2944 (thumb2_breakpoint_len): Likewise.
2945 (arm_is_thumb_mode): New declaration.
2946 * linux-arm-low.c: Include arch/arm-linux.h
2947 aarch/arm-get-next-pcs.h, sys/syscall.h.
2948 (get_next_pcs_ops): New struct.
2949 (get_next_pcs_addr_bits_remove): New function.
2950 (get_next_pcs_is_thumb): New function.
2951 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2952 (arm_sigreturn_next_pc): Likewise.
2953 (get_next_pcs_syscall_next_pc): Likewise.
2954 (arm_gdbserver_get_next_pcs): Likewise.
2955 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2956 Initialize.
2957 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2958 * server.h: Include gdb_vecs.h.
2959
2960 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2961
2962 * Makefile.in (SFILES): Append common/common-regcache.c.
2963 (OBS): Append common-regcache.o.
2964 (common-regcache.o): New rule.
2965 * regcache.c (init_register_cache): Initialize cache to
2966 REG_UNAVAILABLE.
2967 (regcache_raw_read_unsigned): New function.
2968 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2969 register_status enum.
2970
2971 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2972
2973 * linux-aarch64-low.c (the_low_targets): Rename
2974 breakpoint_reinsert_addr to get_next_pcs.
2975 * linux-arm-low.c (the_low_targets): Likewise.
2976 * linux-bfin-low.c (the_low_targets): Likewise.
2977 * linux-cris-low.c (the_low_targets): Likewise.
2978 * linux-crisv32-low.c (the_low_targets): Likewise.
2979 * linux-low.c (can_software_single_step): Likewise.
2980 (install_software_single_step_breakpoints): New function.
2981 (start_step_over): Use install_software_single_step_breakpoints.
2982 * linux-low.h: New CORE_ADDR vector.
2983 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2984 get_next_pcs.
2985 * linux-mips-low.c (the_low_targets): Likewise.
2986 * linux-nios2-low.c (the_low_targets): Likewise.
2987 * linux-sparc-low.c (the_low_targets): Likewise.
2988
2989 2015-12-17 Pedro Alves <palves@redhat.com>
2990
2991 * linux-low.c (linux_kill_one_lwp): Remove references to
2992 LinuxThreads.
2993 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2994 to 'kill'.
2995 (linux_init_signals): Delete.
2996 (initialize_low): Adjust.
2997 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2998
2999 2015-12-16 Pedro Alves <palves@redhat.com>
3000
3001 * configure.ac (compiler warning flags): When testing a
3002 -Wno-foo option, check whether -Wfoo works instead.
3003 * configure: Regenerate.
3004
3005 2015-12-11 Don Breazeal <donb@codesourcery.com>
3006
3007 * server.c (process_serial_event): Don't exit from gdbserver
3008 in remote mode if there are still active inferiors.
3009
3010 2015-12-11 Yao Qi <yao.qi@linaro.org>
3011
3012 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3013 arm_breakpoint_at if the process is 32-bit.
3014
3015 2015-12-11 Yao Qi <yao.qi@linaro.org>
3016
3017 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3018 arm breakpoint.
3019
3020 2015-12-07 Yao Qi <yao.qi@linaro.org>
3021
3022 * configure.srv: Append arm.o to srv_tgtobj for
3023 aarch64*-*-linux* target.
3024 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3025 from linux-arm-low.c.
3026 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3027 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3028 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3029 (thumb2_breakpoint_len): Likewise.
3030 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3031 (arm_breakpoint_kinds): Likewise.
3032 (arm_breakpoint_kind_from_pc): Likewise.
3033 (arm_sw_breakpoint_from_kind): Likewise.
3034 (arm_breakpoint_kind_from_current_state): Likewise.
3035 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3036 (arm_sw_breakpoint_from_kind): Declare.
3037 (arm_breakpoint_kind_from_current_state): Declare.
3038 (arm_breakpoint_at): Declare.
3039 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3040 arm_sw_breakpoint_from_kind if process is 32-bit.
3041 (aarch64_breakpoint_kind_from_pc): New function.
3042 (aarch64_breakpoint_kind_from_current_state): New function.
3043 (the_low_target): Initialize fields breakpoint_kind_from_pc
3044 and breakpoint_kind_from_current_state.
3045 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3046 linux-aarch32-low.c.
3047 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3048 (arm_breakpoint, arm_breakpoint_len): Likewise.
3049 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3050 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3051 (arm_is_thumb_mode): Likewise.
3052 (arm_breakpoint_at): Likewise.
3053 (arm_breakpoint_kind_from_pc): Likewise.
3054 (arm_sw_breakpoint_from_kind): Likewise.
3055 (arm_breakpoint_kind_from_current_state): Likewise.
3056
3057 Revert:
3058 2015-08-04 Yao Qi <yao.qi@linaro.org>
3059
3060 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3061 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3062 * server.c (extended_protocol): Remove "static".
3063 * server.h (extended_protocol): Declare it.
3064
3065 2015-12-04 Josh Stone <jistone@redhat.com>
3066
3067 * target.h (struct target_ops) <arch_setup>: Rename to ...
3068 (struct target_ops) <post_create_inferior>: ... this.
3069 (target_arch_setup): Rename to ...
3070 (target_post_create_inferior): ... this, calling post_create_inferior.
3071 * server.c (start_inferior): Update target_arch_setup calls to
3072 target_post_create_inferior.
3073 * linux-low.c (linux_low_ptrace_options): Forward declare.
3074 (linux_arch_setup): Update its comment for general use.
3075 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3076 (struct linux_target_ops): Use linux_post_create_inferior.
3077 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3078 to post_create_inferior.
3079 * nto-low.c (struct nto_target_ops): Likewise.
3080 * spu-low.c (struct spu_target_ops): Likewise.
3081 * win32-low.c (struct win32_target_ops): Likewise.
3082
3083 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3084
3085 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3086
3087 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3088
3089 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3090 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3091 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3092 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3093 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3094 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3095 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3096 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3097 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3098 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3099 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3100 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3101
3102 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3103
3104 * linux-low.c (linux_look_up_symbols): Don't call
3105 linux_supports_traceclone.
3106 * linux-low.h (thread_db_init): Remove use_events argument.
3107 * thread-db.c (thread_db_use_event): Remove global variable.
3108 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3109 (struct thread_db) <td_create_bp>: Remove field.
3110 (thread_db_create_event): Remove function.
3111 (thread_db_enable_reporting): Likewise.
3112 (find_one_thread): Don't check for thread_db_use_events.
3113 (attach_thread): Likewise.
3114 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3115 (try_thread_db_load_1): Don't check for thread_db_use_events.
3116 (thread_db_init): Remove use_events argument and thread events
3117 handling.
3118 (remove_thread_event_breakpoints): Remove function.
3119 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3120
3121 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3122
3123 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3124 New function.
3125 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3126 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3127 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3128 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3129 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3130 Initialize.
3131 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3132 New function.
3133 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3134 * linux-low.c (can_hardware_single_step): Use
3135 supports_hardware_single_step.
3136 (can_software_single_step): New function.
3137 (start_step_over): Call can_software_single_step.
3138 (linux_supports_hardware_single_step): New function.
3139 (struct target_ops) <supports_software_single_step>: Initialize.
3140 * linux-low.h (struct linux_target_ops)
3141 <supports_hardware_single_step>: Initialize.
3142 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3143 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3144 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3145 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3146 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3147 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3148 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3149 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3150 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3151 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3152 Initialize.
3153 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3154 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3155 Initialize.
3156 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3157 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3158 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3159 New function.
3160 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3161 * target.h (struct target_ops): <supports_software_single_step>:
3162 New field.
3163 (target_supports_software_single_step): New macro.
3164
3165 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3166
3167 * linux-low.c (linux_wait_1): Fix pc advance condition.
3168 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3169 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3170
3171 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3172
3173 * linux-arm-low.c (arm_is_thumb_mode): New function.
3174 (arm_breakpoint_at): Use arm_is_thumb_mode.
3175 (arm_breakpoint_kind_from_current_state): New function.
3176 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3177 Initialize.
3178 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3179 (linux_breakpoint_kind_from_current_state): New function.
3180 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3181 * linux-low.h (struct linux_target_ops)
3182 <breakpoint_kind_from_current_state>: New field.
3183 * target.h (struct target_ops): Likewise.
3184 (target_breakpoint_kind_from_current_state): New macro.
3185
3186 2015-11-30 Pedro Alves <palves@redhat.com>
3187
3188 * linux-low.c (linux_resume): Wake up the event loop before
3189 returning.
3190
3191 2015-11-30 Pedro Alves <palves@redhat.com>
3192
3193 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3194 check.
3195 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3196 to -1.
3197 * target.c (struct thread_search): New structure.
3198 (thread_search_callback): New function.
3199 (prev_general_thread): New global.
3200 (prepare_to_access_memory, done_accessing_memory): New functions.
3201 * target.h (prepare_to_access_memory, done_accessing_memory):
3202 Replace macros with function declarations.
3203
3204 2015-11-30 Pedro Alves <palves@redhat.com>
3205
3206 PR 14618
3207 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3208 report TARGET_WAITKIND_NO_RESUMED.
3209 * remote-utils.c (prepare_resume_reply): Handle
3210 TARGET_WAITKIND_NO_RESUMED.
3211 * server.c (report_no_resumed): New global.
3212 (handle_query) <qSupported>: Handle "no-resumed+". Report
3213 "no-resumed+" support.
3214 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3215 return error if the client doesn't support no-resumed events.
3216 (push_stop_notification): New function.
3217 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3218 events if the client supports them.
3219
3220 2015-11-30 Pedro Alves <palves@redhat.com>
3221
3222 * linux-low.c (thread_still_has_status_pending_p): Don't check
3223 vCont;t here.
3224 (lwp_resumed): New function.
3225 (status_pending_p_callback): Return early if the LWP is not
3226 supposed to be resumed.
3227
3228 2015-11-30 Pedro Alves <palves@redhat.com>
3229
3230 * linux-low.c (handle_extended_wait): Assert that the LWP's
3231 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3232 thread create events, leave the new child's status pending.
3233 (linux_low_filter_event): If GDB wants to hear about thread exit
3234 events, leave the LWP marked dead and don't delete it.
3235 (linux_wait_for_event_filtered): Don't check for thread exit.
3236 (filter_exit_event): New function.
3237 (linux_wait_1): Use it, when returning an exit event.
3238 (linux_resume_one_lwp_throw): Assert that the LWP's
3239 waitstatus is TARGET_WAITKIND_IGNORE.
3240 * remote-utils.c (prepare_resume_reply): Handle
3241 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3242 * server.c (report_thread_events): New global.
3243 (handle_general_set): Handle QThreadEvents.
3244 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3245 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3246 TARGET_WAITKIND_THREAD_EXITED.
3247 * server.h (report_thread_events): Declare.
3248
3249 2015-11-30 Pedro Alves <palves@redhat.com>
3250
3251 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3252 the thread's last_resume_kind was resume_stop.
3253
3254 2015-11-30 Pedro Alves <palves@redhat.com>
3255
3256 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3257 before returning.
3258
3259 2015-11-30 Pedro Alves <palves@redhat.com>
3260
3261 * server.c (handle_v_requests): Handle vCtrlC.
3262
3263 2015-11-30 Pedro Alves <palves@redhat.com>
3264
3265 * gdbthread.h (find_any_thread_of_pid): Declare.
3266 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3267 functions.
3268 * server.c (handle_query): If current_thread is NULL, look for
3269 another thread of the selected process.
3270
3271 2015-11-26 Daniel Colascione <dancol@dancol.org>
3272 Simon Marchi <simon.marchi@ericsson.com>
3273
3274 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3275 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3276 name in reply.
3277 * target.h (struct target_ops) <thread_name>: New field.
3278 (target_thread_name): New macro.
3279
3280 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3281
3282 * regcache.h (regcache_invalidate_pid): Add declaration.
3283 * regcache.c (regcache_invalidate_pid): New function, extracted
3284 from regcache_invalidate.
3285 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3286 Add trivial documentation comment.
3287 * lynx-low.c: Use regcache_invalidate_pid instead of
3288 regcache_invalidate.
3289
3290 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3291
3292 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3293 and Elf64_auxv_t if the target is Android.
3294
3295 2015-11-22 Doug Evans <xdje42@gmail.com>
3296
3297 * target.h: #include <sys/types.h>.
3298
3299 2015-11-19 Pedro Alves <palves@redhat.com>
3300
3301 * linux-low.c (linux_process_qsupported): Change prototype.
3302 Adjust.
3303 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3304 Change prototype.
3305 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3306 and adjust to loop over all features.
3307 * server.c (handle_query) <qSupported>: Adjust to call
3308 target_process_qsupported once, passing it a vector of unprocessed
3309 features.
3310 * target.h (struct target_ops) <process_qsupported>: Change
3311 prototype.
3312 (target_process_qsupported): Adjust.
3313
3314 2015-11-19 Pedro Alves <palves@redhat.com>
3315
3316 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3317 mode.
3318 * configure: Regenerate.
3319
3320 2015-11-19 Pedro Alves <palves@redhat.com>
3321
3322 * configure: Regenerate.
3323
3324 2015-11-19 Yao Qi <yao.qi@linaro.org>
3325
3326 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3327 type to uint32_t.
3328
3329 2015-11-19 Yao Qi <yao.qi@linaro.org>
3330
3331 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3332 (struct aarch64_operand): Move enum out.
3333
3334 2015-11-19 Yao Qi <yao.qi@linaro.org>
3335
3336 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3337 struct user_fpsimd_state *.
3338 (aarch64_store_fpregset): Likewise.
3339
3340 2015-11-19 Yao Qi <yao.qi@linaro.org>
3341
3342 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3343 struct user_pt_regs *.
3344 (aarch64_store_gregset): Likewise.
3345
3346 2015-11-18 Pedro Alves <palves@redhat.com>
3347
3348 * Makefile.in (all_object_files): Add $IPA_OBJS.
3349
3350 2015-11-17 Pedro Alves <palves@redhat.com>
3351
3352 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3353 GDB_SIGNAL_0 and gdb_signal_to_string.
3354
3355 2015-11-17 Pedro Alves <palves@redhat.com>
3356
3357 * win32-low.c (handle_output_debug_string): Remove parameter.
3358 (win32_kill): Remove our_status local and adjust call to
3359 handle_output_debug_string.
3360 (get_child_debug_event): Adjust call to
3361 handle_output_debug_string.
3362
3363 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3364
3365 * linux-mips-low.c (mips_fill_gregset): Add cast.
3366 (mips_store_gregset): Likewise.
3367 (mips_fill_fpregset): Likewise.
3368 (mips_store_fpregset): Likewise.
3369
3370 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3371
3372 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3373 priv.
3374
3375 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3376
3377 * linux-mips-low.c (mips_linux_new_thread): Change type of
3378 watch_type to enum target_hw_bp_type.
3379
3380 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3381
3382 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3383 Change return type to arm_hwbp_type.
3384
3385 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3386
3387 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3388 (arm_store_gregset): Likewise.
3389 * linux-arm-low.c (arm_get_hwcap): Likewise.
3390 (arm_read_description): Likewise.
3391
3392 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3393
3394 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3395
3396 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3397
3398 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3399 (ppc_fill_vsxregset): Likewise.
3400 (ppc_store_vsxregset): Likewise.
3401 (ppc_fill_vrregset): Likewise.
3402 (ppc_store_vrregset): Likewise.
3403 (ppc_fill_evrregset): Likewise.
3404 (ppc_store_evrregset): Likewise.
3405
3406 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3407
3408 * linux-ppc-low.c (ppc_usrregs_info): Remove
3409 forward-declaration.
3410 (ppc_arch_setup): Move lower in file.
3411
3412 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3413
3414 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3415 (ps_pdwrite): Likewise.
3416
3417 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3418
3419 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3420 to after assert checks.
3421
3422 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3423
3424 * proc-service.c (ps_pdread): Add/adjust casts.
3425 (ps_pdwrite): Add/adjust casts.
3426
3427 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3428
3429 * server.c (handle_search_memory_1): Cast return value of
3430 memmem.
3431
3432 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3433
3434 * server.c (write_qxfer_response): Change type of data to
3435 gdb_byte *.
3436
3437 2015-10-29 Pedro Alves <palves@redhat.com>
3438
3439 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3440
3441 2015-10-29 Pedro Alves <palves@redhat.com>
3442
3443 * tracepoint.c (clear_installed_tracepoints): Add casts.
3444
3445 2015-10-29 Pedro Alves <palves@redhat.com>
3446
3447 * server.c (handle_v_cont, process_serial_event): Add enum
3448 gdb_signal casts to signal parsing code.
3449
3450 2015-10-29 Pedro Alves <palves@redhat.com>
3451
3452 * linux-low.h (NULL_REGSET): Define.
3453 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3454 * linux-arm-low.c (arm_regsets): Likewise.
3455 * linux-crisv32-low.c (cris_regsets): Likewise.
3456 * linux-m68k-low.c (m68k_regsets): Likewise.
3457 * linux-mips-low.c (mips_regsets): Likewise.
3458 * linux-nios2-low.c (nios2_regsets): Likewise.
3459 * linux-ppc-low.c (ppc_regsets): Likewise.
3460 * linux-s390-low.c (s390_regsets): Likewise.
3461 * linux-sh-low.c (sh_regsets): Likewise.
3462 * linux-sparc-low.c (sparc_regsets): Likewise.
3463 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3464 * linux-tile-low.c (tile_regsets): Likewise.
3465 * linux-x86-low.c (x86_regsets): Likewise.
3466 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3467
3468 2015-10-29 Pedro Alves <palves@redhat.com>
3469
3470 * linux-low.h (NULL_REGSET): Define.
3471 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3472 * linux-arm-low.c (arm_regsets): Likewise.
3473 * linux-crisv32-low.c (cris_regsets): Likewise.
3474 * linux-m68k-low.c (m68k_regsets): Likewise.
3475 * linux-mips-low.c (mips_regsets): Likewise.
3476 * linux-nios2-low.c (nios2_regsets): Likewise.
3477 * linux-ppc-low.c (ppc_regsets): Likewise.
3478 * linux-s390-low.c (s390_regsets): Likewise.
3479 * linux-sh-low.c (sh_regsets): Likewise.
3480 * linux-sparc-low.c (sparc_regsets): Likewise.
3481 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3482 * linux-tile-low.c (tile_regsets): Likewise.
3483 * linux-x86-low.c (x86_regsets): Likewise.
3484 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3485
3486 2015-10-26 Doug Evans <dje@google.com>
3487
3488 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3489
3490 2015-10-26 Doug Evans <dje@google.com>
3491
3492 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3493
3494 2015-10-26 Doug Evans <dje@google.com>
3495
3496 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3497 for debug_printf.
3498 (attach_thread, find_new_threads_callback): Ditto.
3499
3500 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3501
3502 * mem-break.h (set_breakpoint_data): Remove.
3503
3504 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3505
3506 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3507 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3508 (initialize_low): Remove set_breakpoint_data call.
3509 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3510 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3511 (initialize_low): Remove set_breakpoint_data call.
3512 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3513 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3514 (initialize_low): Remove set_breakpoint_data call.
3515
3516 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3517
3518 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3519 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3520 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3521 * target.h (target_breakpoint_kind_from_pc): New macro.
3522
3523 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3524
3525 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3526 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3527 the default breakpoint kind.
3528
3529 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3530
3531 * linux-arm-low.c (arm_supports_z_point_type): Add software
3532 breakpoint support.
3533
3534 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3535
3536 * linux-arm-low.c: Refactor breakpoint definitions.
3537 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3538 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3539
3540 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3541
3542 * Makefile.in: Add arm.c/o.
3543 * configure.srv: Likewise.
3544 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3545 (arm_breakpoint_kind_from_pc): New function.
3546 (arm_sw_breakpoint_from_kind): Return proper kind.
3547 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3548
3549 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3550
3551 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3552 removal.
3553 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3554 (struct raw_breakpoint) <size>: Remove.
3555 (struct raw_breakpoint) <kind>: Add.
3556 (bp_size): New function.
3557 (bp_opcode): Likewise.
3558 (find_raw_breakpoint_at): Adjust for kind.
3559 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3560 (remove_memory_breakpoint): Adjust for kind call bp_size.
3561 (set_raw_breakpoint_at): Adjust for kind.
3562 (set_breakpoint): Likewise.
3563 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3564 (delete_raw_breakpoint): Adjust for kind.
3565 (delete_breakpoint): Likewise.
3566 (find_gdb_breakpoint): Likewise.
3567 (set_gdb_breakpoint_1): Likewise.
3568 (set_gdb_breakpoint): Likewise.
3569 (delete_gdb_breakpoint_1): Likewise.
3570 (delete_gdb_breakpoint): Likewise.
3571 (uninsert_raw_breakpoint): Likewise.
3572 (reinsert_raw_breakpoint): Likewise.
3573 (set_breakpoint_data): Remove.
3574 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3575 (check_mem_read): Adjust for kind call bp_size.
3576 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3577 (clone_one_breakpoint): Adjust for kind.
3578 * mem-break.h (set_gdb_breakpoint): Likewise.
3579 (delete_gdb_breakpoint): Likewise.
3580 * server.c (process_serial_event): Likewise.
3581
3582 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3583
3584 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3585 (struct linux_target_ops) <breakpoint>: Remove.
3586 (struct linux_target_ops) <breakpoint_len>: Remove.
3587 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3588 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3589 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3590 (arm_sw_breakpoint_from_kind): New function.
3591 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3592 (struct linux_target_ops) <breakpoint>: Remove.
3593 (struct linux_target_ops) <breakpoint_len>: Remove.
3594 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3595 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3596 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3597 (struct linux_target_ops) <breakpoint>: Remove.
3598 (struct linux_target_ops) <breakpoint_len>: Remove.
3599 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3600 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3601 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3602 (struct linux_target_ops) <breakpoint>: Remove.
3603 (struct linux_target_ops) <breakpoint_len>: Remove.
3604 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3605 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3606 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3607 and sw_breakpoint_from_kind to increment the pc.
3608 (linux_breakpoint_kind_from_pc): New function.
3609 (linux_sw_breakpoint_from_kind): New function.
3610 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3611 (initialize_low): Call breakpoint_kind_from_pc and
3612 sw_breakpoint_from_kind to replace breakpoint_data/len.
3613 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3614 New field.
3615 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3616 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3617 (struct linux_target_ops) <breakpoint>: Remove.
3618 (struct linux_target_ops) <breakpoint_len>: Remove.
3619 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3620 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3621 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3622 (struct linux_target_ops) <breakpoint>: Remove.
3623 (struct linux_target_ops) <breakpoint_len>: Remove.
3624 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3625 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3626 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3627 (struct linux_target_ops) <breakpoint>: Remove.
3628 (struct linux_target_ops) <breakpoint_len>: Remove.
3629 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3630 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3631 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3632 (struct linux_target_ops) <breakpoint>: Remove.
3633 (struct linux_target_ops) <breakpoint_len>: Remove.
3634 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3635 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3636 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3637 (struct linux_target_ops) <breakpoint>: Remove.
3638 (struct linux_target_ops) <breakpoint_len>: Remove.
3639 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3640 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3641 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3642 (struct linux_target_ops) <breakpoint>: Remove.
3643 (struct linux_target_ops) <breakpoint_len>: Remove.
3644 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3645 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3646 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3647 (struct linux_target_ops) <breakpoint>: Remove.
3648 (struct linux_target_ops) <breakpoint_len>: Remove.
3649 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3650 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3651 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3652 (struct linux_target_ops) <breakpoint>: Remove.
3653 (struct linux_target_ops) <breakpoint_len>: Remove.
3654 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3655 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3656 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3657 (struct linux_target_ops) <breakpoint>: Remove.
3658 (struct linux_target_ops) <breakpoint_len>: Remove.
3659 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3660 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3661 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3662 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3663 (struct linux_target_ops) <breakpoint>: Remove.
3664 (struct linux_target_ops) <breakpoint_len>: Remove.
3665 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3666 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3667 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3668 (struct linux_target_ops) <breakpoint>: Remove.
3669 (struct linux_target_ops) <breakpoint_len>: Remove.
3670 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3671 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3672
3673 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3674
3675 * linux-cris-low.c (cris_get_pc): Remove void arg.
3676
3677 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3678
3679 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3680 variable name.
3681
3682 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3683
3684 * inferiors.c (thread_pid_matches_callback): New function.
3685 (find_thread_process): New function.
3686 (remove_thread): Reset current_thread.
3687 (remove_process): Assert threads have been removed first.
3688
3689 2015-10-15 Yao Qi <yao.qi@linaro.org>
3690
3691 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3692 if it is 3.
3693 (aarch64_remove_point): Likewise.
3694 * regcache.c (regcache_register_size): New function.
3695
3696 2015-10-12 Yao Qi <yao.qi@linaro.org>
3697
3698 * linux-aarch64-low.c: Update all callers as emit_load_store
3699 is renamed to aarch64_emit_load_store.
3700
3701 2015-10-12 Yao Qi <yao.qi@linaro.org>
3702
3703 * linux-aarch64-low.c: Update all callers of function renaming
3704 from emit_insn to aarch64_emit_insn.
3705
3706 2015-10-12 Yao Qi <yao.qi@linaro.org>
3707
3708 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3709 arch/aarch64-insn.h.
3710 (struct aarch64_memory_operand): Likewise.
3711 (ENCODE): Likewise.
3712 (emit_insn): Move to arch/aarch64-insn.c.
3713 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3714 (emit_load_store): Move to arch/aarch64-insn.c.
3715 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3716 (can_encode_int32): Remove.
3717
3718 2015-10-12 Yao Qi <yao.qi@linaro.org>
3719
3720 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3721 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3722 (aarch64_relocate_instruction): Likewise.
3723 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3724 (struct aarch64_insn_visitor): Likewise.
3725
3726 2015-10-12 Yao Qi <yao.qi@linaro.org>
3727
3728 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3729 (struct aarch64_insn_visitor): New.
3730 (struct aarch64_insn_relocation_data): New.
3731 (aarch64_ftrace_insn_reloc_b): New function.
3732 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3733 (aarch64_ftrace_insn_reloc_cb): Likewise.
3734 (aarch64_ftrace_insn_reloc_tb): Likewise.
3735 (aarch64_ftrace_insn_reloc_adr): Likewise.
3736 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3737 (aarch64_ftrace_insn_reloc_others): Likewise.
3738 (visitor): New.
3739 (aarch64_relocate_instruction): Use visitor.
3740
3741 2015-10-12 Yao Qi <yao.qi@linaro.org>
3742
3743 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3744 int. Add argument buf.
3745 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3746 aarch64_relocate_instruction.
3747
3748 2015-10-12 Yao Qi <yao.qi@linaro.org>
3749
3750 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3751 argument insn. Remove local variable insn. Don't call
3752 target_read_uint32.
3753 (aarch64_install_fast_tracepoint_jump_pad): Call
3754 target_read_uint32.
3755
3756 2015-09-30 Yao Qi <yao.qi@linaro.org>
3757
3758 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3759 (emit_load_store_pair): Likewise.
3760
3761 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3762
3763 * dll.c (match_dll): Add cast(s).
3764 (unloaded_dll): Likewise.
3765 * linux-low.c (second_thread_of_pid_p): Likewise.
3766 (delete_lwp_callback): Likewise.
3767 (count_events_callback): Likewise.
3768 (select_event_lwp_callback): Likewise.
3769 (linux_set_resume_request): Likewise.
3770 * server.c (accumulate_file_name_length): Likewise.
3771 (emit_dll_description): Likewise.
3772 (handle_qxfer_threads_worker): Likewise.
3773 (visit_actioned_threads): Likewise.
3774 * thread-db.c (any_thread_of): Likewise.
3775 * tracepoint.c (same_process_p): Likewise.
3776 (match_blocktype): Likewise.
3777 (build_traceframe_info_xml): Likewise.
3778
3779 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3780
3781 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3782 assignment.
3783 (gdb_unparse_agent_expr): Likewise.
3784 * hostio.c (require_data): Likewise.
3785 (handle_pread): Likewise.
3786 * linux-low.c (disable_regset): Likewise.
3787 (fetch_register): Likewise.
3788 (store_register): Likewise.
3789 (get_dynamic): Likewise.
3790 (linux_qxfer_libraries_svr4): Likewise.
3791 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3792 (set_fast_tracepoint_jump): Likewise.
3793 (uninsert_fast_tracepoint_jumps_at): Likewise.
3794 (reinsert_fast_tracepoint_jumps_at): Likewise.
3795 (validate_inserted_breakpoint): Likewise.
3796 (clone_agent_expr): Likewise.
3797 * regcache.c (init_register_cache): Likewise.
3798 * remote-utils.c (putpkt_binary_1): Likewise.
3799 (decode_M_packet): Likewise.
3800 (decode_X_packet): Likewise.
3801 (look_up_one_symbol): Likewise.
3802 (relocate_instruction): Likewise.
3803 (monitor_output): Likewise.
3804 * server.c (handle_search_memory): Likewise.
3805 (handle_qxfer_exec_file): Likewise.
3806 (handle_qxfer_libraries): Likewise.
3807 (handle_qxfer): Likewise.
3808 (handle_query): Likewise.
3809 (handle_v_cont): Likewise.
3810 (handle_v_run): Likewise.
3811 (captured_main): Likewise.
3812 * target.c (write_inferior_memory): Likewise.
3813 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3814 * tracepoint.c (init_trace_buffer): Likewise.
3815 (add_tracepoint_action): Likewise.
3816 (add_traceframe): Likewise.
3817 (add_traceframe_block): Likewise.
3818 (cmd_qtdpsrc): Likewise.
3819 (cmd_qtdv): Likewise.
3820 (cmd_qtstatus): Likewise.
3821 (response_source): Likewise.
3822 (response_tsv): Likewise.
3823 (cmd_qtnotes): Likewise.
3824 (gdb_collect): Likewise.
3825 (initialize_tracepoint): Likewise.
3826
3827 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3828
3829 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3830 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3831 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3832 <NOP>: New.
3833 (enum aarch64_condition_codes): New enum.
3834 (w0): New static global.
3835 (fp): Likewise.
3836 (lr): Likewise.
3837 (struct aarch64_memory_operand) <type>: New
3838 MEMORY_OPERAND_POSTINDEX type.
3839 (postindex_memory_operand): New helper function.
3840 (emit_ret): New function.
3841 (emit_load_store_pair): New function, factored out of emit_stp
3842 with support for MEMORY_OPERAND_POSTINDEX.
3843 (emit_stp): Rewrite using emit_load_store_pair.
3844 (emit_ldp): New function.
3845 (emit_load_store): Likewise.
3846 (emit_ldr): Mention post-index instruction in comment.
3847 (emit_ldrh): New function.
3848 (emit_ldrb): New function.
3849 (emit_ldrsw): Mention post-index instruction in comment.
3850 (emit_str): Likewise.
3851 (emit_subs): New function.
3852 (emit_cmp): Likewise.
3853 (emit_and): Likewise.
3854 (emit_orr): Likewise.
3855 (emit_orn): Likewise.
3856 (emit_eor): Likewise.
3857 (emit_mvn): Likewise.
3858 (emit_lslv): Likewise.
3859 (emit_lsrv): Likewise.
3860 (emit_asrv): Likewise.
3861 (emit_mul): Likewise.
3862 (emit_sbfm): Likewise.
3863 (emit_sbfx): Likewise.
3864 (emit_ubfm): Likewise.
3865 (emit_ubfx): Likewise.
3866 (emit_csinc): Likewise.
3867 (emit_cset): Likewise.
3868 (emit_nop): Likewise.
3869 (emit_ops_insns): New helper function.
3870 (emit_pop): Likewise.
3871 (emit_push): Likewise.
3872 (aarch64_emit_prologue): New function.
3873 (aarch64_emit_epilogue): Likewise.
3874 (aarch64_emit_add): Likewise.
3875 (aarch64_emit_sub): Likewise.
3876 (aarch64_emit_mul): Likewise.
3877 (aarch64_emit_lsh): Likewise.
3878 (aarch64_emit_rsh_signed): Likewise.
3879 (aarch64_emit_rsh_unsigned): Likewise.
3880 (aarch64_emit_ext): Likewise.
3881 (aarch64_emit_log_not): Likewise.
3882 (aarch64_emit_bit_and): Likewise.
3883 (aarch64_emit_bit_or): Likewise.
3884 (aarch64_emit_bit_xor): Likewise.
3885 (aarch64_emit_bit_not): Likewise.
3886 (aarch64_emit_equal): Likewise.
3887 (aarch64_emit_less_signed): Likewise.
3888 (aarch64_emit_less_unsigned): Likewise.
3889 (aarch64_emit_ref): Likewise.
3890 (aarch64_emit_if_goto): Likewise.
3891 (aarch64_emit_goto): Likewise.
3892 (aarch64_write_goto_address): Likewise.
3893 (aarch64_emit_const): Likewise.
3894 (aarch64_emit_call): Likewise.
3895 (aarch64_emit_reg): Likewise.
3896 (aarch64_emit_pop): Likewise.
3897 (aarch64_emit_stack_flush): Likewise.
3898 (aarch64_emit_zero_ext): Likewise.
3899 (aarch64_emit_swap): Likewise.
3900 (aarch64_emit_stack_adjust): Likewise.
3901 (aarch64_emit_int_call_1): Likewise.
3902 (aarch64_emit_void_call_2): Likewise.
3903 (aarch64_emit_eq_goto): Likewise.
3904 (aarch64_emit_ne_goto): Likewise.
3905 (aarch64_emit_lt_goto): Likewise.
3906 (aarch64_emit_le_goto): Likewise.
3907 (aarch64_emit_gt_goto): Likewise.
3908 (aarch64_emit_ge_got): Likewise.
3909 (aarch64_emit_ops_impl): New static global variable.
3910 (aarch64_emit_ops): New target function, return
3911 &aarch64_emit_ops_impl.
3912 (struct linux_target_ops): Install it.
3913
3914 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3915
3916 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3917 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3918 aarch64-ipa.o.
3919 * linux-aarch64-ipa.c: New file.
3920 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3921 and endian.h.
3922 (aarch64_get_thread_area): New target method.
3923 (extract_signed_bitfield): New helper function.
3924 (aarch64_decode_ldr_literal): New function.
3925 (enum aarch64_opcodes): New enum.
3926 (struct aarch64_register): New struct.
3927 (struct aarch64_operand): New struct.
3928 (x0): New static global.
3929 (x1): Likewise.
3930 (x2): Likewise.
3931 (x3): Likewise.
3932 (x4): Likewise.
3933 (w2): Likewise.
3934 (ip0): Likewise.
3935 (sp): Likewise.
3936 (xzr): Likewise.
3937 (aarch64_register): New helper function.
3938 (register_operand): Likewise.
3939 (immediate_operand): Likewise.
3940 (struct aarch64_memory_operand): New struct.
3941 (offset_memory_operand): New helper function.
3942 (preindex_memory_operand): Likewise.
3943 (enum aarch64_system_control_registers): New enum.
3944 (ENCODE): New macro.
3945 (emit_insn): New helper function.
3946 (emit_b): New function.
3947 (emit_bcond): Likewise.
3948 (emit_cb): Likewise.
3949 (emit_tb): Likewise.
3950 (emit_blr): Likewise.
3951 (emit_stp): Likewise.
3952 (emit_ldp_q_offset): Likewise.
3953 (emit_stp_q_offset): Likewise.
3954 (emit_load_store): Likewise.
3955 (emit_ldr): Likewise.
3956 (emit_ldrsw): Likewise.
3957 (emit_str): Likewise.
3958 (emit_ldaxr): Likewise.
3959 (emit_stxr): Likewise.
3960 (emit_stlr): Likewise.
3961 (emit_data_processing_reg): Likewise.
3962 (emit_data_processing): Likewise.
3963 (emit_add): Likewise.
3964 (emit_sub): Likewise.
3965 (emit_mov): Likewise.
3966 (emit_movk): Likewise.
3967 (emit_mov_addr): Likewise.
3968 (emit_mrs): Likewise.
3969 (emit_msr): Likewise.
3970 (emit_sevl): Likewise.
3971 (emit_wfe): Likewise.
3972 (append_insns): Likewise.
3973 (can_encode_int32_in): New helper function.
3974 (aarch64_relocate_instruction): New function.
3975 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3976 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3977 (struct linux_target_ops): Install aarch64_get_thread_area,
3978 aarch64_install_fast_tracepoint_jump_pad and
3979 aarch64_get_min_fast_tracepoint_insn_len.
3980
3981 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3982
3983 * Makefile.in (aarch64-insn.o): New rule.
3984 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3985
3986 2015-09-21 Yao Qi <yao.qi@linaro.org>
3987
3988 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3989
3990 2015-09-21 Yao Qi <yao.qi@linaro.org>
3991
3992 * tracepoint.c (max_jump_pad_size): Remove.
3993
3994 2015-09-18 Yao Qi <yao.qi@linaro.org>
3995
3996 * linux-aarch64-low.c: Don't include sys/uio.h.
3997 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3998
3999 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4000
4001 * tracepoint.c (eval_result_type): Change prototype.
4002 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4003
4004 2015-09-15 Pedro Alves <palves@redhat.com>
4005
4006 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4007 Check whether to report exec events instead of checking whether
4008 multiprocess is enabled.
4009
4010 2015-09-15 Pedro Alves <palves@redhat.com>
4011
4012 PR remote/18965
4013 * remote-utils.c (prepare_resume_reply): Merge
4014 TARGET_WAITKIND_VFORK_DONE switch case with the
4015 TARGET_WAITKIND_FORKED case.
4016
4017 2015-09-15 Yao Qi <yao.qi@linaro.org>
4018
4019 * server.c (handle_query): Check string comparison using
4020 "else if" instead of "if".
4021
4022 2015-09-15 Yao Qi <yao.qi@linaro.org>
4023
4024 * server.c (vCont_supported): New global variable.
4025 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4026 matches. Append ";vContSupported+" to own_buf.
4027 (handle_v_requests): Append ";s;S" to own_buf if target supports
4028 hardware single step or vCont_supported is false.
4029 (capture_main): Set vCont_supported to zero.
4030
4031 2015-09-15 Yao Qi <yao.qi@linaro.org>
4032
4033 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4034 it to ...
4035 (linux_supports_hardware_single_step): ... New function.
4036 (linux_target_ops): Update.
4037 * lynx-low.c (lynx_target_ops): Set field
4038 supports_hardware_single_step to target_can_do_hardware_single_step.
4039 * nto-low.c (nto_target_ops): Likewise.
4040 * spu-low.c (spu_target_ops): Likewise.
4041 * win32-low.c (win32_target_ops): Likewise.
4042 * target.c (target_can_do_hardware_single_step): New function.
4043 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4044 Remove. <supports_hardware_single_step>: New field.
4045 (target_supports_conditional_breakpoints): Remove.
4046 (target_supports_hardware_single_step): New macro.
4047 (target_can_do_hardware_single_step): Declare.
4048 * server.c (handle_query): Use target_supports_hardware_single_step
4049 instead of target_supports_conditional_breakpoints.
4050
4051 2015-09-15 Yao Qi <yao.qi@linaro.org>
4052
4053 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4054 function.
4055 (struct linux_target_ops the_low_target): Install
4056 aarch64_linux_siginfo_fixup.
4057
4058 2015-09-11 Don Breazeal <donb@codesourcery.com>
4059 Luis Machado <lgustavo@codesourcery.com>
4060
4061 * linux-low.c (linux_mourn): Static declaration.
4062 (linux_arch_setup): Move in front of
4063 handle_extended_wait.
4064 (linux_arch_setup_thread): New function.
4065 (handle_extended_wait): Handle exec events. Call
4066 linux_arch_setup_thread. Make event_lwp argument a
4067 pointer-to-a-pointer.
4068 (check_zombie_leaders): Do not check stopped threads.
4069 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4070 (linux_low_filter_event): Add lwp and thread for exec'ing
4071 non-leader thread if leader thread has been deleted.
4072 Refactor code into linux_arch_setup_thread and call it.
4073 Pass child lwp pointer by reference to handle_extended_wait.
4074 (linux_wait_for_event_filtered): Update comment.
4075 (linux_wait_1): Prevent clobbering exec event status.
4076 (linux_supports_exec_events): New function.
4077 (linux_target_ops) <supports_exec_events>: Initialize new member.
4078 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4079 new member.
4080 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4081 * server.c (report_exec_events): New global variable.
4082 (handle_query): Handle qSupported query for exec-events feature.
4083 (captured_main): Initialize report_exec_events.
4084 * server.h (report_exec_events): Declare new global variable.
4085 * target.h (struct target_ops) <supports_exec_events>: New
4086 member.
4087 (target_supports_exec_events): New macro.
4088 * win32-low.c (win32_target_ops) <supports_exec_events>:
4089 Initialize new member.
4090
4091 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4092
4093 * linux-low.c (linux_low_enable_btrace): Remove.
4094 (linux_target_ops): Replace linux_low_enable_btrace with
4095 linux_enable_btrace.
4096
4097 2015-09-03 Yao Qi <yao.qi@linaro.org>
4098
4099 * linux-aarch64-low.c (aarch64_insert_point): Call
4100 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4101 returns true.
4102
4103 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4104
4105 * linux-low.c (check_stopped_by_breakpoint): Use
4106 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4107
4108 2015-08-27 Pedro Alves <palves@redhat.com>
4109
4110 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4111
4112 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4113
4114 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4115 the XNEW-family equivalent.
4116 (compile_bytecodes): Likewise.
4117 * dll.c (loaded_dll): Likewise.
4118 * event-loop.c (append_callback_event): Likewise.
4119 (create_file_handler): Likewise.
4120 (create_file_event): Likewise.
4121 * hostio.c (handle_open): Likewise.
4122 * inferiors.c (add_thread): Likewise.
4123 (add_process): Likewise.
4124 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4125 * linux-arm-low.c (arm_new_process): Likewise.
4126 (arm_new_thread): Likewise.
4127 * linux-low.c (add_to_pid_list): Likewise.
4128 (linux_add_process): Likewise.
4129 (handle_extended_wait): Likewise.
4130 (add_lwp): Likewise.
4131 (enqueue_one_deferred_signal): Likewise.
4132 (enqueue_pending_signal): Likewise.
4133 (linux_resume_one_lwp_throw): Likewise.
4134 (linux_resume_one_thread): Likewise.
4135 (linux_read_memory): Likewise.
4136 (linux_write_memory): Likewise.
4137 * linux-mips-low.c (mips_linux_new_process): Likewise.
4138 (mips_linux_new_thread): Likewise.
4139 (mips_add_watchpoint): Likewise.
4140 * linux-x86-low.c (initialize_low_arch): Likewise.
4141 * lynx-low.c (lynx_add_process): Likewise.
4142 * mem-break.c (set_raw_breakpoint_at): Likewise.
4143 (set_breakpoint): Likewise.
4144 (add_condition_to_breakpoint): Likewise.
4145 (add_commands_to_breakpoint): Likewise.
4146 (clone_agent_expr): Likewise.
4147 (clone_one_breakpoint): Likewise.
4148 * regcache.c (new_register_cache): Likewise.
4149 * remote-utils.c (look_up_one_symbol): Likewise.
4150 * server.c (queue_stop_reply): Likewise.
4151 (start_inferior): Likewise.
4152 (queue_stop_reply_callback): Likewise.
4153 (handle_target_event): Likewise.
4154 * spu-low.c (fetch_ppc_memory): Likewise.
4155 (store_ppc_memory): Likewise.
4156 * target.c (set_target_ops): Likewise.
4157 * thread-db.c (thread_db_load_search): Likewise.
4158 (try_thread_db_load_1): Likewise.
4159 * tracepoint.c (add_tracepoint): Likewise.
4160 (add_tracepoint_action): Likewise.
4161 (create_trace_state_variable): Likewise.
4162 (cmd_qtdpsrc): Likewise.
4163 (cmd_qtro): Likewise.
4164 (add_while_stepping_state): Likewise.
4165 * win32-low.c (child_add_thread): Likewise.
4166 (get_image_name): Likewise.
4167
4168 2015-08-25 Yao Qi <yao.qi@linaro.org>
4169
4170 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4171
4172 2015-08-25 Yao Qi <yao.qi@linaro.org>
4173
4174 * Makefile.in (aarch64-linux.o): New rule.
4175 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4176 srv_tgtobj.
4177 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4178 (aarch64_init_debug_reg_state): Make it extern.
4179 (aarch64_linux_prepare_to_resume): Remove.
4180
4181 2015-08-25 Yao Qi <yao.qi@linaro.org>
4182
4183 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4184 lwp_arch_private_info and ptid_of_lwp.
4185
4186 2015-08-25 Yao Qi <yao.qi@linaro.org>
4187
4188 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4189 Find proc_info by find_process_pid. All callers updated.
4190
4191 2015-08-25 Yao Qi <yao.qi@linaro.org>
4192
4193 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4194 Remove.
4195 (debug_reg_change_callback): Remove.
4196 (aarch64_notify_debug_reg_change): Remove.
4197
4198 2015-08-25 Yao Qi <yao.qi@linaro.org>
4199
4200 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4201 Call current_lwp_ptid.
4202
4203 2015-08-25 Yao Qi <yao.qi@linaro.org>
4204
4205 * linux-aarch64-low.c (debug_reg_change_callback): Use
4206 debug_printf.
4207
4208 2015-08-25 Yao Qi <yao.qi@linaro.org>
4209
4210 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4211
4212 2015-08-25 Yao Qi <yao.qi@linaro.org>
4213
4214 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4215
4216 2015-08-25 Yao Qi <yao.qi@linaro.org>
4217
4218 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4219 the code.
4220
4221 2015-08-25 Yao Qi <yao.qi@linaro.org>
4222
4223 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4224 Remove.
4225 (debug_reg_change_callback): Remove argument entry and add argument
4226 lwp. Remove local variable thread. Don't print thread id in the
4227 debugging output. Don't check whether pid of thread equals to pid.
4228 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4229 iterate_over_lwps instead find_inferior.
4230
4231 2015-08-24 Pedro Alves <palves@redhat.com>
4232
4233 * inferiors.c (get_first_process): New function.
4234 * inferiors.h (get_first_process): New declaration.
4235 * remote-utils.c (read_ptid): Default to the first process in the
4236 list, instead of to the current thread's process.
4237
4238 2015-08-24 Pedro Alves <palves@redhat.com>
4239
4240 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4241 * event-loop.c: Likewise.
4242 * remote-utils.c: Likewise.
4243 * tracepoint.c: Likewise.
4244
4245 2015-08-24 Pedro Alves <palves@redhat.com>
4246
4247 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4248 ptid_get_lwp.
4249
4250 2015-08-21 Pedro Alves <palves@redhat.com>
4251
4252 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4253 instead of literal 1.
4254
4255 2015-08-21 Pedro Alves <palves@redhat.com>
4256
4257 * tdesc.c (default_description): Explicitly zero-initialize.
4258
4259 2015-08-21 Pedro Alves <palves@redhat.com>
4260
4261 PR gdb/18749
4262 * inferiors.c (remove_thread): Discard any pending stop reply for
4263 this thread.
4264 * server.c (remove_all_on_match_pid): Rename to ...
4265 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4266 instead of a pid.
4267 (discard_queued_stop_replies): Change parameter to a ptid. Now
4268 extern.
4269 (handle_v_kill, kill_inferior_callback, captured_main)
4270 (process_serial_event): Adjust.
4271 * server.h (discard_queued_stop_replies): Declare.
4272
4273 2015-08-21 Pedro Alves <palves@redhat.com>
4274
4275 * linux-low.c (wait_for_sigstop): Always switch to no thread
4276 selected if the previously current thread dies.
4277 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4278 process instead of the current thread's.
4279 * remote-utils.c (input_interrupt): Don't check if there's no
4280 current thread.
4281 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4282 current thread to the general thread fails, error out.
4283 (handle_qxfer_auxv, handle_qxfer_libraries)
4284 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4285 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4286 (handle_query): Check if there's a thread selected instead of
4287 checking whether there's any thread in the thread list.
4288 (handle_qxfer_threads, handle_qxfer_btrace)
4289 (handle_qxfer_btrace_conf): Don't error out early if there's no
4290 thread in the thread list.
4291 (handle_v_cont, myresume): Don't set the current thread to the
4292 continue thread.
4293 (process_serial_event) <Hg handling>: Also set thread_id if the
4294 previous general thread is still alive.
4295 (process_serial_event) <g/G handling>: If setting the current
4296 thread to the general thread fails, error out.
4297 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4298 thread's lwp instead of the current thread's.
4299 * target.c (set_desired_thread): If the desired thread was not
4300 found, leave the current thread pointing to NULL. Return an int
4301 (boolean) indicating success.
4302 * target.h (set_desired_thread): Change return type to int.
4303
4304 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4305
4306 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4307 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4308 #includes.
4309 (ps_get_thread_area): New function.
4310
4311 2015-08-19 Gary Benson <gbenson@redhat.com>
4312
4313 * hostio.c (handle_pread): Do not attempt to read more data
4314 than hostio_reply_with_data can fit in a packet.
4315
4316 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4317
4318 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4319
4320 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4321
4322 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4323
4324 2015-08-06 Pedro Alves <palves@redhat.com>
4325
4326 * tracepoint.c (expr_eval_result): Now an int.
4327
4328 2015-08-06 Pedro Alves <palves@redhat.com>
4329
4330 * gdbthread.h (struct regcache): Forward declare.
4331 (struct thread_info) <regcache_data>: Now a struct regcache
4332 pointer.
4333 * inferiors.c (inferior_regcache_data)
4334 (set_inferior_regcache_data): Now work with struct regcache
4335 pointers.
4336 * inferiors.h (struct regcache): Forward declare.
4337 (inferior_regcache_data, set_inferior_regcache_data): Now work
4338 with struct regcache pointers.
4339 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4340 (free_register_cache_thread): Remove struct regcache pointer
4341 casts.
4342
4343 2015-08-06 Pedro Alves <palves@redhat.com>
4344
4345 * server.c (captured_main): On error, print the exception message
4346 to stderr, and if run_once is set, throw a quit.
4347
4348 2015-08-06 Pedro Alves <palves@redhat.com>
4349
4350 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4351 the current thread.
4352
4353 2015-08-06 Pedro Alves <palves@redhat.com>
4354
4355 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4356 reading beyond the passed in buffer length.
4357
4358 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4359
4360 * tracepoint.c (symbol_list) <required>: Remove.
4361
4362 2015-08-06 Pedro Alves <palves@redhat.com>
4363
4364 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4365 count if stopping and suspending threads.
4366 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4367 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4368 (linux_detach): Complete an ongoing step-over.
4369 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4370 throughout.
4371 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4372 (linux_wait_1): If passing a signal to the inferior after
4373 finishing a step-over, unsuspend and re-resume all lwps. If we
4374 see a single-step event but the thread should be continuing, don't
4375 pass the trap to gdb.
4376 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4377 internal_error instead of gdb_assert.
4378 (enqueue_pending_signal): New function.
4379 (check_ptrace_stopped_lwp_gone): Add debug output.
4380 (start_step_over): Use internal_error instead of gdb_assert.
4381 (complete_ongoing_step_over): New function.
4382 (linux_resume_one_thread): Don't resume a suspended thread.
4383 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4384 it stepping.
4385
4386 2015-08-06 Pedro Alves <palves@redhat.com>
4387
4388 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4389 (linux_thread_alive): Use lwp_is_marked_dead.
4390 (extended_event_reported): Delete.
4391 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4392 instead of extended_event_reported.
4393 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4394 as well.
4395 (lwp_is_marked_dead): New function.
4396 (lwp_running): Use lwp_is_marked_dead.
4397 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4398 comment.
4399
4400 2015-08-06 Pedro Alves <palves@redhat.com>
4401
4402 * linux-low.c (linux_wait_1): Move fork event output out of the
4403 !report_to_gdb check. Pass event_child->waitstatus to
4404 target_waitstatus_to_string instead of ourstatus.
4405
4406 2015-08-04 Yao Qi <yao.qi@linaro.org>
4407
4408 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4409 if current_thread is 32 bit.
4410
4411 2015-08-04 Yao Qi <yao.qi@linaro.org>
4412
4413 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4414 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4415 * server.c (extended_protocol): Remove "static".
4416 * server.h (extended_protocol): Declare it.
4417
4418 2015-08-04 Yao Qi <yao.qi@linaro.org>
4419
4420 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4421 both aarch64 and aarch32.
4422 (aarch64_set_pc): Likewise.
4423
4424 2015-08-04 Yao Qi <yao.qi@linaro.org>
4425
4426 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4427 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4428 arm-with-neon.xml to srv_xmlfiles.
4429 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4430 (is_64bit_tdesc): New function.
4431 (aarch64_linux_read_description): New function.
4432 (aarch64_arch_setup): Call aarch64_linux_read_description.
4433 (regs_info): Rename to regs_info_aarch64.
4434 (aarch64_regs_info): Return right regs_info.
4435 (initialize_low_arch): Call initialize_low_arch_aarch32.
4436
4437 2015-08-04 Yao Qi <yao.qi@linaro.org>
4438
4439 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4440 * linux-aarch32-low.c: New file.
4441 * linux-aarch32-low.h: New file.
4442 * linux-arm-low.c (arm_fill_gregset): Move it to
4443 linux-aarch32-low.c.
4444 (arm_store_gregset): Likewise.
4445 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4446 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4447 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4448 (regs_info): Rename to regs_info_arm.
4449 (arm_regs_info): Return regs_info_aarch32 if
4450 have_ptrace_getregset is 1 and target description is
4451 arm_with_neon or arm_with_vfpv3.
4452 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4453 Call initialize_low_arch_aarch32 instead.
4454
4455 2015-08-04 Yao Qi <yao.qi@linaro.org>
4456
4457 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4458 * linux-low.c: ... here.
4459 * linux-low.h (have_ptrace_getregset): Declare it.
4460
4461 2015-08-04 Pedro Alves <palves@redhat.com>
4462
4463 * thread-db.c (struct thread_db): Use new typedefs.
4464 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4465 CHK calls.
4466 (disable_thread_event_reporting): Cast result of dlsym to
4467 destination function pointer type.
4468 (thread_db_mourn): Use td_ta_delete_ftype.
4469
4470 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4471
4472 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4473 arch variant.
4474 (CDX_BREAKPOINT): Define for R2.
4475 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4476 (the_low_target): Add comments.
4477
4478 2015-07-30 Yao Qi <yao.qi@linaro.org>
4479
4480 * linux-arm-low.c (arm_hwcap): Remove it.
4481 (arm_read_description): New local variable arm_hwcap. Don't
4482 set arm_hwcap to zero.
4483
4484 2015-07-30 Yao Qi <yao.qi@linaro.org>
4485
4486 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4487 Use regcache->tdesc instead.
4488 (arm_store_wmmxregset): Likewise.
4489 (arm_fill_vfpregset): Likewise.
4490 (arm_store_vfpregset): Likewise.
4491
4492 2015-07-30 Yao Qi <yao.qi@linaro.org>
4493
4494 * linux-arm-low.c: Include arch/arm.h.
4495 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4496 (arm_store_gregset): Likewise.
4497
4498 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4499
4500 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4501 ptrace's 4th parameter.
4502
4503 2015-07-27 Yao Qi <yao.qi@linaro.org>
4504
4505 * configure.srv (case aarch64*-*-linux*): Don't set
4506 srv_linux_usrregs.
4507
4508 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4509
4510 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4511 sys/ptrace.h.
4512 * linux-arm-low.c: Likewise.
4513 * linux-cris-low.c: Likewise.
4514 * linux-crisv32-low.c: Likewise.
4515 * linux-low.c: Likewise.
4516 * linux-m68k-low.c: Likewise.
4517 * linux-mips-low.c: Likewise.
4518 * linux-nios2-low.c: Likewise.
4519 * linux-s390-low.c: Likewise.
4520 * linux-sparc-low.c: Likewise.
4521 * linux-tic6x-low.c: Likewise.
4522 * linux-tile-low.c: Likewise.
4523 * linux-x86-low.c: Likewise.
4524
4525 2015-07-24 Pedro Alves <palves@redhat.com>
4526
4527 * config.in: Regenerate.
4528 * configure: Regenerate.
4529
4530 2015-07-24 Pedro Alves <palves@redhat.com>
4531
4532 * acinclude.m4: Include ../ptrace.m4.
4533 * configure.ac: Call GDB_AC_PTRACE.
4534 * config.in, configure: Regenerate.
4535
4536 2015-07-24 Yao Qi <yao.qi@linaro.org>
4537
4538 * linux-low.c (linux_create_inferior): Remove setting to
4539 proc->priv->new_inferior.
4540 (linux_attach): Likewise.
4541 (linux_low_filter_event): Likewise.
4542 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4543
4544 2015-07-24 Yao Qi <yao.qi@linaro.org>
4545
4546 * linux-low.c (linux_arch_setup): New function.
4547 (linux_low_filter_event): If proc->tdesc is NULL and
4548 proc->attached is true, call the_low_target.arch_setup.
4549 Otherwise, keep status pending, and return.
4550 (linux_resume_one_lwp_throw): Don't call get_pc if
4551 thread->while_stepping isn't NULL. Don't call
4552 get_thread_regcache if proc->tdesc is NULL.
4553 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4554 (linux_target_ops): Install arch_setup.
4555 * server.c (start_inferior): Call the_target->arch_setup.
4556 * target.h (struct target_ops) <arch_setup>: New field.
4557 (target_arch_setup): New marco.
4558 * lynx-low.c (lynx_target_ops): Update.
4559 * nto-low.c (nto_target_ops): Update.
4560 * spu-low.c (spu_target_ops): Update.
4561 * win32-low.c (win32_target_ops): Update.
4562
4563 2015-07-24 Yao Qi <yao.qi@linaro.org>
4564
4565 * linux-low.c (linux_add_process): Don't set
4566 proc->priv->new_inferior.
4567 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4568 (linux_attach): Likewise.
4569
4570 2015-07-24 Yao Qi <yao.qi@linaro.org>
4571
4572 * server.c (start_inferior): Code refactor.
4573
4574 2015-07-24 Yao Qi <yao.qi@linaro.org>
4575
4576 * server.c (process_serial_event): Set general_thread.
4577
4578 2015-07-21 Yao Qi <yao.qi@linaro.org>
4579
4580 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4581 aarch64_linux_get_debug_reg_capacity.
4582
4583 2015-07-17 Yao Qi <yao.qi@linaro.org>
4584
4585 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4586 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4587 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4588 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4589 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4590 (AARCH64_HWP_ALIGNMENT): Likewise.
4591 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4592 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4593 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4594 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4595 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4596 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4597 (struct aarch64_debug_reg_state): Likewise.
4598 (struct arch_lwp_info): Likewise.
4599 (aarch64_align_watchpoint): Likewise.
4600 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4601 (aarch64_watchpoint_length): Likewise.
4602 (aarch64_point_encode_ctrl_reg): Likewise
4603 (aarch64_point_is_aligned): Likewise.
4604 (aarch64_align_watchpoint): Likewise.
4605 (aarch64_linux_set_debug_regs):
4606 (aarch64_dr_state_insert_one_point): Likewise.
4607 (aarch64_dr_state_remove_one_point): Likewise.
4608 (aarch64_handle_breakpoint): Likewise.
4609 (aarch64_handle_aligned_watchpoint): Likewise.
4610 (aarch64_handle_unaligned_watchpoint): Likewise.
4611 (aarch64_handle_watchpoint): Likewise.
4612
4613 2015-07-17 Yao Qi <yao.qi@linaro.org>
4614
4615 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4616 and don't aarch64_get_debug_reg_state. All callers update.
4617 (aarch64_handle_aligned_watchpoint): Likewise.
4618 (aarch64_handle_unaligned_watchpoint): Likewise.
4619 (aarch64_handle_watchpoint): Likewise.
4620 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4621 (aarch64_remove_point): Likewise.
4622
4623 2015-07-17 Yao Qi <yao.qi@linaro.org>
4624
4625 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4626 debug_printf.
4627 (aarch64_handle_unaligned_watchpoint): Likewise.
4628
4629 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4630
4631 Revert the previous 3 commits:
4632 Move gdb_regex* to common/
4633 Move linux_find_memory_regions_full & co.
4634 gdbserver build-id attribute generator
4635
4636 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4637 Jan Kratochvil <jan.kratochvil@redhat.com>
4638
4639 gdbserver build-id attribute generator.
4640 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4641 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4642 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4643 (find_phdr): New.
4644 (get_dynamic): Use find_pdhr to traverse program headers.
4645 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4646 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4647 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4648 (get_hex_build_id): New.
4649 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4650 to reply XML document.
4651
4652 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4653 Jan Kratochvil <jan.kratochvil@redhat.com>
4654
4655 * target.c: Include target/target-utils.h and fcntl.h.
4656 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4657 (target_fileio_read_stralloc): New functions.
4658
4659 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4660
4661 * Makefile.in (OBS): Add gdb_regex.o.
4662 (gdb_regex.o): New.
4663 * config.in: Rebuilt.
4664 * configure: Rebuilt.
4665
4666 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4667 Jan Kratochvil <jan.kratochvil@redhat.com>
4668
4669 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4670 * Makefile.in (OBS): Add target-utils.o.
4671 (linux-maps.o, target-utils.o): New.
4672 * configure.srv (srv_linux_obj): Add linux-maps.o.
4673
4674 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4675
4676 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4677 function, return 1.
4678 (the_low_target): Install it.
4679
4680 2015-07-14 Pedro Alves <palves@redhat.com>
4681
4682 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4683 Instead, ignore ECHILD, and throw an error for other errnos.
4684
4685 2015-07-10 Pedro Alves <palves@redhat.com>
4686
4687 * event-loop.c (struct callback_event) <data>: Change type to
4688 gdb_client_data instance instead of gdb_client_data pointer.
4689 (append_callback_event): Adjust.
4690
4691 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4692
4693 * linux-aarch64-low.c: Add comments for each linux_target_ops
4694 method. Remove comments already covered in target_ops and
4695 linux_target_ops definitions.
4696 (the_low_target): Add comments for each unimplemented method.
4697
4698 2015-07-09 Yao Qi <yao.qi@linaro.org>
4699
4700 * linux-aarch64-low.c (aarch64_regmap): Remove.
4701 (aarch64_usrregs_info): Remove.
4702 (regs_info): Set field usrregs to NULL.
4703
4704 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4705
4706 * linux-low.c: Include "rsp-low.h"
4707 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4708 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4709 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4710 (handle_btrace_enable_pt): New.
4711 (handle_btrace_general_set): Support "pt".
4712 (handle_btrace_conf_general_set): Support "pt:size".
4713
4714 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4715
4716 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4717 Z_PACKET_SW_BP.
4718
4719 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4720
4721 * linux-aarch64-low.c: Remove comment about endianness.
4722 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4723 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4724 memcmp.
4725
4726 2015-06-24 Gary Benson <gbenson@redhat.com>
4727
4728 * linux-i386-ipa.c (stdint.h): Do not include.
4729 * lynx-i386-low.c (stdint.h): Likewise.
4730 * lynx-ppc-low.c (stdint.h): Likewise.
4731 * mem-break.c (stdint.h): Likewise.
4732 * thread-db.c (stdint.h): Likewise.
4733 * tracepoint.c (stdint.h): Likewise.
4734 * win32-low.c (stdint.h): Likewise.
4735
4736 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4737
4738 * server.c (write_qxfer_response): Update call to
4739 remote_escape_output.
4740
4741 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4742 Jan Kratochvil <jan.kratochvil@redhat.com>
4743
4744 Merge multiple hex conversions.
4745 * gdbreplay.c (tohex): Rename to 'fromhex'.
4746 (logchar): Use fromhex.
4747
4748 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4749
4750 * server.c (handle_qxfer_libraries): Set `version' attribute for
4751 <library-list>.
4752
4753 2015-06-10 Gary Benson <gbenson@redhat.com>
4754
4755 * target.h (struct target_ops) <multifs_open>: New field.
4756 <multifs_unlink>: Likewise.
4757 <multifs_readlink>: Likewise.
4758 * linux-low.c (nat/linux-namespaces.h): New include.
4759 (linux_target_ops): Initialize the_target->multifs_open,
4760 the_target->multifs_unlink and the_target->multifs_readlink.
4761 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4762 * hostio.c (hostio_fs_pid): New static variable.
4763 (hostio_handle_new_gdb_connection): New function.
4764 (handle_setfs): Likewise.
4765 (handle_open): Use the_target->multifs_open as appropriate.
4766 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4767 (handle_readlink): Use the_target->multifs_readlink as
4768 appropriate.
4769 (handle_vFile): Handle vFile:setfs packets.
4770 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4771 after target_handle_new_gdb_connection.
4772
4773 2015-06-10 Gary Benson <gbenson@redhat.com>
4774
4775 * configure.ac (AC_CHECK_FUNCS): Add setns.
4776 * config.in: Regenerate.
4777 * configure: Likewise.
4778 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4779 (linux-namespaces.o): New rule.
4780 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4781
4782 2015-06-09 Gary Benson <gbenson@redhat.com>
4783
4784 * hostio.c (handle_open): Process mode argument with
4785 fileio_to_host_mode.
4786
4787 2015-06-01 Yao Qi <yao.qi@linaro.org>
4788
4789 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4790 * linux-x86-low.c: Likewise.
4791
4792 2015-05-28 Don Breazeal <donb@codesourcery.com>
4793
4794 * linux-low.c (handle_extended_wait): Initialize
4795 thread_info.last_resume_kind for new fork children.
4796
4797 2015-05-15 Pedro Alves <palves@redhat.com>
4798
4799 * target.h (target_handle_new_gdb_connection): Rewrite using if
4800 wrapped in do/while.
4801
4802 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4803
4804 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4805 * configure, config.in: Regenerate.
4806 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4807 Declare typedef.
4808
4809 2015-05-12 Don Breazeal <donb@codesourcery.com>
4810
4811 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4812 PTRACE_EVENT_VFORK_DONE.
4813 (linux_low_ptrace_options, extended_event_reported): Add vfork
4814 events.
4815 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4816 and "vforkdone" for RSP 'T' Stop Reply Packet.
4817 * server.h (report_vfork_events): Declare
4818 global variable.
4819
4820 2015-05-12 Don Breazeal <donb@codesourcery.com>
4821
4822 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4823 (the_low_target) <new_fork>: Initialize new member.
4824 * linux-arm-low.c (arm_new_fork): New function.
4825 (the_low_target) <new_fork>: Initialize new member.
4826 * linux-low.c (handle_extended_wait): Call new target function
4827 new_fork.
4828 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4829 * linux-mips-low.c (mips_add_watchpoint): New function
4830 extracted from mips_insert_point.
4831 (the_low_target) <new_fork>: Initialize new member.
4832 (mips_linux_new_fork): New function.
4833 (mips_insert_point): Call mips_add_watchpoint.
4834 * linux-x86-low.c (x86_linux_new_fork): New function.
4835 (the_low_target) <new_fork>: Initialize new member.
4836
4837 2015-05-12 Don Breazeal <donb@codesourcery.com>
4838
4839 * linux-low.c (handle_extended_wait): Implement return value,
4840 rename argument 'event_child' to 'event_lwp', handle
4841 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4842 (linux_low_ptrace_options): New function.
4843 (linux_low_filter_event): Call linux_low_ptrace_options,
4844 use different argument fo linux_enable_event_reporting,
4845 use return value from handle_extended_wait.
4846 (extended_event_reported): New function.
4847 (linux_wait_1): Call extended_event_reported and set
4848 status to report fork events.
4849 (linux_write_memory): Add pid to debug message.
4850 (reset_lwp_ptrace_options_callback): New function.
4851 (linux_handle_new_gdb_connection): New function.
4852 (linux_target_ops): Initialize new structure member.
4853 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4854 * lynx-low.c: Initialize new structure member.
4855 * remote-utils.c (prepare_resume_reply): Implement stop reason
4856 "fork" for "T" stop message.
4857 * server.c (handle_query): Call handle_new_gdb_connection.
4858 * server.h (report_fork_events): Declare global flag.
4859 * target.h (struct target_ops) <handle_new_gdb_connection>:
4860 New member.
4861 (target_handle_new_gdb_connection): New macro.
4862 * win32-low.c: Initialize new structure member.
4863
4864 2015-05-12 Don Breazeal <donb@codesourcery.com>
4865
4866 * mem-break.c (APPEND_TO_LIST): Define macro.
4867 (clone_agent_expr): New function.
4868 (clone_one_breakpoint): New function.
4869 (clone_all_breakpoints): New function.
4870 * mem-break.h: Declare new functions.
4871
4872 2015-05-12 Don Breazeal <donb@codesourcery.com>
4873
4874 * linux-low.c (linux_supports_fork_events): New function.
4875 (linux_supports_vfork_events): New function.
4876 (linux_target_ops): Initialize new structure members.
4877 (initialize_low): Call linux_check_ptrace_features.
4878 * lynx-low.c (lynx_target_ops): Initialize new structure
4879 members.
4880 * server.c (report_fork_events, report_vfork_events):
4881 New global flags.
4882 (handle_query): Add new features to qSupported packet and
4883 response.
4884 (captured_main): Initialize new global variables.
4885 * target.h (struct target_ops) <supports_fork_events>:
4886 New member.
4887 <supports_vfork_events>: New member.
4888 (target_supports_fork_events): New macro.
4889 (target_supports_vfork_events): New macro.
4890 * win32-low.c (win32_target_ops): Initialize new structure
4891 members.
4892
4893 2015-05-12 Gary Benson <gbenson@redhat.com>
4894
4895 * server.c (handle_qxfer_exec_file): Use current process
4896 if annex is empty.
4897
4898 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4899
4900 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4901 Remove HAVE_PTRACE_GETREGS conditionals.
4902 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4903 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4904
4905 2015-05-08 Yao Qi <yao.qi@linaro.org>
4906
4907 * linux-low.c (linux_supports_conditional_breakpoints): New
4908 function.
4909 (linux_target_ops): Install new target method.
4910 * lynx-low.c (lynx_target_ops): Install NULL hook for
4911 supports_conditional_breakpoints.
4912 * nto-low.c (nto_target_ops): Likewise.
4913 * spu-low.c (spu_target_ops): Likewise.
4914 * win32-low.c (win32_target_ops): Likewise.
4915 * server.c (handle_query): Check
4916 target_supports_conditional_breakpoints.
4917 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4918 New field.
4919 (target_supports_conditional_breakpoints): New macro.
4920
4921 2015-05-06 Pedro Alves <palves@redhat.com>
4922
4923 PR server/18081
4924 * server.c (start_inferior): If the process exits, mourn it.
4925
4926 2015-04-21 Gary Benson <gbenson@redhat.com>
4927
4928 * hostio.c (fileio_open_flags_to_host): Factored out to
4929 fileio_to_host_openflags in common/fileio.c. Single use
4930 updated.
4931
4932 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4933
4934 * linux-xtensa-low.c (xtensa_fill_gregset)
4935 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4936 XCHAL_HAVE_LOOP.
4937
4938 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4939
4940 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4941 (regs_info): Replace usrregs pointer with NULL.
4942
4943 2015-04-17 Gary Benson <gbenson@redhat.com>
4944
4945 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4946 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4947 * server.c (handle_qxfer_exec_file): New function.
4948 (qxfer_packets): Add exec-file entry.
4949 (handle_query): Report qXfer:exec-file:read as supported packet.
4950
4951 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4952
4953 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4954
4955 2015-04-09 Gary Benson <gbenson@redhat.com>
4956
4957 * hostio-errno.c (errno_to_fileio_error): Remove function.
4958 Update caller to use remote_fileio_to_fio_error.
4959
4960 2015-04-09 Yao Qi <yao.qi@linaro.org>
4961
4962 * linux-low.c (linux_insert_point): Call
4963 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4964 (linux_remove_point): Call remove_memory_breakpoint if type is
4965 raw_bkpt_type_sw.
4966 * linux-x86-low.c (x86_insert_point): Don't call
4967 insert_memory_breakpoint.
4968 (x86_remove_point): Don't call remove_memory_breakpoint.
4969
4970 2015-04-01 Pedro Alves <palves@redhat.com>
4971 Cleber Rosa <crosa@redhat.com>
4972
4973 * server.c (gdbserver_usage): Reorganize and extend the usage
4974 message.
4975
4976 2015-03-24 Pedro Alves <palves@redhat.com>
4977
4978 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4979 output. Also dump TRAP_TRACE.
4980 (linux_low_filter_event): In debug output, distinguish a
4981 resume_stop SIGSTOP from a delayed SIGSTOP.
4982
4983 2015-03-24 Gary Benson <gbenson@redhat.com>
4984
4985 * linux-x86-low.c (x86_linux_new_thread): Moved to
4986 nat/x86-linux.c.
4987 (x86_linux_prepare_to_resume): Likewise.
4988
4989 2015-03-24 Gary Benson <gbenson@redhat.com>
4990
4991 * Makefile.in (x86-linux-dregs.o): New rule.
4992 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4993 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4994 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4995 (x86_linux_dr_get): Likewise.
4996 (x86_linux_dr_set): Likewise.
4997 (update_debug_registers_callback): Likewise.
4998 (x86_linux_dr_set_addr): Likewise.
4999 (x86_linux_dr_get_addr): Likewise.
5000 (x86_linux_dr_set_control): Likewise.
5001 (x86_linux_dr_get_control): Likewise.
5002 (x86_linux_dr_get_status): Likewise.
5003 (x86_linux_update_debug_registers): Likewise.
5004
5005 2015-03-24 Gary Benson <gbenson@redhat.com>
5006
5007 * linux-x86-low.c (x86_linux_update_debug_registers):
5008 New function, factored out from...
5009 (x86_linux_prepare_to_resume): ...this.
5010
5011 2015-03-24 Gary Benson <gbenson@redhat.com>
5012
5013 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5014 (x86_linux_dr_set): Likewise.
5015 (update_debug_registers_callback): Likewise.
5016 (x86_linux_dr_set_addr): Likewise.
5017 (x86_linux_dr_get_addr): Likewise.
5018 (x86_linux_dr_set_control): Likewise.
5019 (x86_linux_dr_get_control): Likewise.
5020 (x86_linux_dr_get_status): Likewise.
5021 (x86_linux_prepare_to_resume): Likewise.
5022
5023 2015-03-24 Gary Benson <gbenson@redhat.com>
5024
5025 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5026 Use perror_with_name. Pass string through gettext.
5027 (x86_linux_dr_set): Likewise.
5028
5029 2015-03-24 Gary Benson <gbenson@redhat.com>
5030
5031 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5032 (x86_linux_dr_set_addr): ...this.
5033 (x86_dr_low_get_addr): Rename to...
5034 (x86_linux_dr_get_addr): ...this.
5035 (x86_dr_low_set_control): Rename to...
5036 (x86_linux_dr_set_control): ...this.
5037 (x86_dr_low_get_control): Rename to...
5038 (x86_linux_dr_get_control): ...this.
5039 (x86_dr_low_get_status): Rename to...
5040 (x86_linux_dr_get_status): ...this.
5041 (x86_dr_low): Update with new function names.
5042
5043 2015-03-24 Gary Benson <gbenson@redhat.com>
5044
5045 * Makefile.in (x86-linux.o): New rule.
5046 * configure.srv: Add x86-linux.o to relevant targets.
5047 * linux-low.c (lwp_set_arch_private_info): New function.
5048 (lwp_arch_private_info): Likewise.
5049 * linux-x86-low.c: Include nat/x86-linux.h.
5050 (arch_lwp_info): Removed structure.
5051 (update_debug_registers_callback):
5052 Use lwp_set_debug_registers_changed.
5053 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5054 and lwp_set_debug_registers_changed.
5055 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5056
5057 2015-03-24 Gary Benson <gbenson@redhat.com>
5058
5059 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5060 * linux-arm-low.c (arm_new_thread): Likewise.
5061 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5062 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5063 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5064 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5065
5066 2015-03-24 Gary Benson <gbenson@redhat.com>
5067
5068 * linux-low.c (ptid_of_lwp): New function.
5069 (lwp_is_stopped): Likewise.
5070 (lwp_stop_reason): Likewise.
5071 * linux-x86-low.c (update_debug_registers_callback):
5072 Use lwp_is_stopped.
5073 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5074 lwp_stop_reason.
5075
5076 2015-03-24 Gary Benson <gbenson@redhat.com>
5077
5078 * linux-low.h (linux_stop_lwp): Remove declaration.
5079
5080 2015-03-24 Gary Benson <gbenson@redhat.com>
5081
5082 * linux-low.h: Include nat/linux-nat.h.
5083 * linux-low.c (iterate_over_lwps_args): New structure.
5084 (iterate_over_lwps_filter): New function.
5085 (iterate_over_lwps): Likewise.
5086 * linux-x86-low.c (update_debug_registers_callback):
5087 Update signature to what iterate_over_lwps expects.
5088 Remove PID check that iterate_over_lwps now performs.
5089 (x86_dr_low_set_addr): Use iterate_over_lwps.
5090 (x86_dr_low_set_control): Likewise.
5091
5092 2015-03-24 Gary Benson <gbenson@redhat.com>
5093
5094 * linux-x86-low.c (x86_debug_reg_state): New function.
5095 (x86_linux_prepare_to_resume): Use the above.
5096
5097 2015-03-24 Gary Benson <gbenson@redhat.com>
5098
5099 * linux-low.c (current_lwp_ptid): New function.
5100 * linux-x86-low.c: Include nat/linux-nat.h.
5101 (x86_dr_low_get_addr): Use current_lwp_ptid.
5102 (x86_dr_low_get_control): Likewise.
5103 (x86_dr_low_get_status): Likewise.
5104
5105 2015-03-20 Pedro Alves <palves@redhat.com>
5106
5107 * tracepoint.c (cmd_qtstatus): Make "str" const.
5108
5109 2015-03-20 Pedro Alves <palves@redhat.com>
5110
5111 * server.c (handle_general_set): Make "req_str" const.
5112
5113 2015-03-19 Pedro Alves <palves@redhat.com>
5114
5115 * linux-low.c (linux_resume_one_lwp): Rename to ...
5116 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5117 instead call perror_with_name.
5118 (check_ptrace_stopped_lwp_gone): New function.
5119 (linux_resume_one_lwp): Reimplement as wrapper around
5120 linux_resume_one_lwp_throw that swallows errors if the LWP is
5121 gone.
5122
5123 2015-03-19 Pedro Alves <palves@redhat.com>
5124
5125 * linux-low.c (count_events_callback, select_event_lwp_callback):
5126 No longer check whether the thread has resume_stop as last resume
5127 kind.
5128
5129 2015-03-19 Pedro Alves <palves@redhat.com>
5130
5131 * linux-low.c (count_events_callback, select_event_lwp_callback):
5132 Use the lwp's status_pending_p field, not the thread's.
5133
5134 2015-03-19 Pedro Alves <palves@redhat.com>
5135
5136 * linux-low.c (select_event_lwp_callback): Update comments to
5137 no longer mention SIGTRAP.
5138
5139 2015-03-18 Gary Benson <gbenson@redhat.com>
5140
5141 * server.c (handle_query): Do not report vFile:fstat as supported.
5142
5143 2015-03-11 Gary Benson <gbenson@redhat.com>
5144
5145 * hostio.c (sys/types.h): New include.
5146 (sys/stat.h): Likewise.
5147 (common-remote-fileio.h): Likewise.
5148 (handle_fstat): New function.
5149 (handle_vFile): Handle vFile:fstat packets.
5150
5151 2015-03-11 Gary Benson <gbenson@redhat.com>
5152
5153 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5154 struct stat.st_blocks and struct stat.st_blksize.
5155 * configure: Regenerate.
5156 * config.in: Likewise.
5157 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5158 (OBS): Add common-remote-fileio.o.
5159 (common-remote-fileio.o): New rule.
5160
5161 2015-03-09 Pedro Alves <palves@redhat.com>
5162
5163 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5164 'struct sockaddr' pointer in 'accept' call.
5165
5166 2015-03-09 Pedro Alves <palves@redhat.com>
5167
5168 Revert:
5169 2015-03-07 Pedro Alves <palves@redhat.com>
5170 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5171 or <winsock2.h> here. Instead include "gdb_socket.h".
5172 (remote_open): Use union gdb_sockaddr_u.
5173 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5174 or <winsock2.h> here. Instead include "gdb_socket.h".
5175 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5176 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5177 or <sys/un.h>.
5178 (init_named_socket, gdb_agent_helper_thread): Use union
5179 gdb_sockaddr_u.
5180
5181 2015-03-07 Pedro Alves <palves@redhat.com>
5182
5183 * configure.ac (build_warnings): Move
5184 -Wdeclaration-after-statement to the C-specific set.
5185 * configure: Regenerate.
5186
5187 2015-03-07 Pedro Alves <palves@redhat.com>
5188
5189 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5190 or <winsock2.h> here. Instead include "gdb_socket.h".
5191 (remote_open): Use union gdb_sockaddr_u.
5192 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5193 or <winsock2.h> here. Instead include "gdb_socket.h".
5194 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5195 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5196 or <sys/un.h>.
5197 (init_named_socket, gdb_agent_helper_thread): Use union
5198 gdb_sockaddr_u.
5199
5200 2015-03-07 Pedro Alves <palves@redhat.com>
5201
5202 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5203 instead.
5204
5205 2015-03-06 Yao Qi <yao.qi@linaro.org>
5206
5207 * linux-aarch64-low.c (aarch64_insert_point): Use
5208 show_debug_regs as a boolean.
5209 (aarch64_remove_point): Likewise.
5210
5211 2015-03-05 Pedro Alves <palves@redhat.com>
5212
5213 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5214 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5215 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5216 * nto-low.c (nto_target_ops): Likewise.
5217 * spu-low.c (spu_target_ops): Likewise.
5218 * win32-low.c (win32_target_ops): Likewise.
5219
5220 2015-03-04 Pedro Alves <palves@redhat.com>
5221
5222 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5223 Decide whether a breakpoint triggered based on the SIGTRAP's
5224 siginfo.si_code.
5225 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5226 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5227 (linux_low_filter_event): Check for breakpoints before checking
5228 watchpoints.
5229 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5230 siginfo.si_code.
5231 (linux_stopped_by_sw_breakpoint)
5232 (linux_supports_stopped_by_sw_breakpoint)
5233 (linux_stopped_by_hw_breakpoint)
5234 (linux_supports_stopped_by_hw_breakpoint): New functions.
5235 (linux_target_ops): Install new target methods.
5236
5237 2015-03-04 Pedro Alves <palves@redhat.com>
5238
5239 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5240 * server.c (swbreak_feature, hwbreak_feature): New globals.
5241 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5242 (captured_main): Clear swbreak_feature and hwbreak_feature.
5243 * server.h (swbreak_feature, hwbreak_feature): Declare.
5244 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5245 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5246 supports_stopped_by_hw_breakpoint>: New fields.
5247 (target_supports_stopped_by_sw_breakpoint)
5248 (target_stopped_by_sw_breakpoint)
5249 (target_supports_stopped_by_hw_breakpoint)
5250 (target_stopped_by_hw_breakpoint): Declare.
5251
5252 2015-03-04 Pedro Alves <palves@redhat.com>
5253
5254 enum lwp_stop_reason -> enum target_stop_reason
5255 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5256 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5257 (linux_wait_1, stuck_in_jump_pad_callback)
5258 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5259 (linux_stopped_by_watchpoint):
5260 * linux-low.h (enum lwp_stop_reason): Delete.
5261 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5262 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5263
5264 2015-03-04 Yao Qi <yao.qi@linaro.org>
5265
5266 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5267
5268 2015-03-03 Gary Benson <gbenson@redhat.com>
5269
5270 * hostio.c (handle_vFile): Fix prefix lengths.
5271
5272 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5273
5274 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5275 ptr_bits.
5276
5277 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5278
5279 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5280 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5281 (clean): Add "rm -f" for above C files.
5282 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5283 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5284 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5285 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5286 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5287 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5288 (init_registers_s390x_vx_linux64)
5289 (init_registers_s390x_tevx_linux64)
5290 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5291 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5292 declarations.
5293 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5294 (s390_store_vxrs_high): New functions.
5295 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5296 NT_S390_VXRS_HIGH.
5297 (s390_arch_setup): Add logic for selecting one of the new target
5298 descriptions. Activate the new vector regsets if applicable.
5299 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5300 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5301 and init_registers_s390x_tevx_linux64.
5302
5303 2015-03-01 Pedro Alves <palves@redhat.com>
5304
5305 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5306 parameter.
5307
5308 2015-02-27 Pedro Alves <palves@redhat.com>
5309
5310 * linux-x86-low.c (u_debugreg_offset): New function.
5311 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5312
5313 2015-02-27 Pedro Alves <palves@redhat.com>
5314
5315 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5316 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5317 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5318 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5319 (ps_lsetfpregs, ps_getpid)
5320 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5321 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5322 (ps_lsetxregs, ps_plog): Declare.
5323
5324 2015-02-27 Pedro Alves <palves@redhat.com>
5325
5326 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5327 IP_AGENT_EXPORT_FUNC.
5328 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5329 IP_AGENT_EXPORT_FUNC.
5330 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5331 (IP_AGENT_EXPORT): Delete.
5332 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5333 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5334 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5335 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5336 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5337 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5338 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5339 (traceframe_read_count, traceframe_write_count)
5340 (traceframes_created, trace_state_variables, get_raw_reg)
5341 (get_trace_state_variable_value, set_trace_state_variable_value)
5342 (ust_loaded, helper_thread_id, cmd_buf): Use
5343 IPA_SYM_EXPORTED_NAME.
5344 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5345 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5346 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5347 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5348 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5349 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5350 EXTERN_C_PUSH/EXTERN_C_POP.
5351 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5352 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5353 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5354 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5355 (traceframe_write_count, traceframe_read_count)
5356 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5357 (about_to_request_buffer_space, get_trace_state_variable_value)
5358 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5359 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5360 EXTERN_C_PUSH/EXTERN_C_POP.
5361 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5362 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5363 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5364 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5365 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5366 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5367 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5368 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5369 Define.
5370 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5371 (IP_AGENT_EXPORT_VAR_DECL): Define.
5372 (tracing): Declare.
5373 (gdb_agent_get_raw_reg): Declare.
5374
5375 2015-02-27 Tom Tromey <tromey@redhat.com>
5376 Pedro Alves <palves@redhat.com>
5377
5378 Rename symbols whose names are reserved C++ keywords throughout.
5379
5380 2015-02-27 Pedro Alves <palves@redhat.com>
5381
5382 * Makefile.in (COMPILER): New, get it from autoconf.
5383 (CXX): Get from autoconf instead.
5384 (COMPILE.pre): Use COMPILER.
5385 (CC-LD): Rename to ...
5386 (CC_LD): ... this. Use COMPILER.
5387 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5388 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5389 * acinclude.m4: Include build-with-cxx.m4.
5390 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5391 Disable -Werror by default if building in C++ mode.
5392 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5393 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5394 the C++ compiler. Save/restore CXXFLAGS too.
5395 * configure: Regenerate.
5396
5397 2015-02-27 Pedro Alves <palves@redhat.com>
5398
5399 * acinclude.m4: Include libiberty.m4.
5400 * configure.ac: Call libiberty_INIT.
5401 * config.in, configure: Regenerate.
5402
5403 2015-02-26 Pedro Alves <palves@redhat.com>
5404
5405 * linux-low.c (linux_wait_1): When incrementing the PC past a
5406 program breakpoint always use the_low_target.breakpoint_len as
5407 increment, rather than the maximum between that and
5408 the_low_target.decr_pc_after_break.
5409
5410 2015-02-23 Pedro Alves <palves@redhat.com>
5411
5412 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5413 thread was doing a step-over; always adjust the PC if
5414 we stepped over a permanent breakpoint.
5415 (linux_wait_1): If we stepped over breakpoint that was on top of a
5416 permanent breakpoint, manually advance the PC past it.
5417
5418 2015-02-23 Pedro Alves <palves@redhat.com>
5419
5420 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5421 modes.
5422 (x86_fill_gregset, x86_store_gregset): Use it when handling
5423 $orig_eax.
5424
5425 2015-02-20 Pedro Alves <palves@redhat.com>
5426
5427 * thread-db.c: Include "nat/linux-procfs.h".
5428 (thread_db_init): Skip listing new threads if the kernel supports
5429 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5430
5431 2015-02-20 Pedro Alves <palves@redhat.com>
5432
5433 * linux-low.c (status_pending_p_callback): Use ptid_match.
5434
5435 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5436
5437 PR breakpoints/16812
5438 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5439 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5440 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5441
5442 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5443
5444 PR breakpoints/15956
5445 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5446
5447 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5448
5449 * linux-low.c (linux_low_btrace_conf): Print size.
5450 * server.c (handle_btrace_conf_general_set): New.
5451 (hanle_general_set): Call handle_btrace_conf_general_set.
5452 (handle_query): Report Qbtrace-conf:bts:size as supported.
5453
5454 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5455
5456 * linux-low.c (linux_low_enable_btrace): Update parameters.
5457 (linux_low_btrace_conf): New.
5458 (linux_target_ops)<to_btrace_conf>: Initialize.
5459 * server.c (current_btrace_conf): New.
5460 (handle_btrace_enable): Rename to ...
5461 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5462 to target_enable_btrace. Update comment. Update users.
5463 (handle_qxfer_btrace_conf): New.
5464 (qxfer_packets): Add btrace-conf entry.
5465 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5466 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5467 (target_ops)<read_btrace_conf>: New.
5468 (target_enable_btrace): Update parameters.
5469 (target_read_btrace_conf): New.
5470
5471 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5472
5473 * server.c (handle_btrace_general_set): Remove call to
5474 target_supports_btrace.
5475 (supported_btrace_packets): New.
5476 (handle_query): Call supported_btrace_packets.
5477 * target.h: include btrace-common.h.
5478 (btrace_target_info): Removed.
5479 (supports_btrace, target_supports_btrace): Update parameters.
5480
5481 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5482
5483 * Makefile.in (SFILES): Add common/btrace-common.c.
5484 (OBS): Add common/btrace-common.o.
5485 (btrace-common.o): Add build rules.
5486 * linux-low: Include btrace-common.h.
5487 (linux_low_read_btrace): Use struct btrace_data. Call
5488 btrace_data_init and btrace_data_fini.
5489
5490 2015-02-06 Pedro Alves <palves@redhat.com>
5491
5492 * thread-db.c (find_new_threads_callback): Add debug output.
5493
5494 2015-02-04 Pedro Alves <palves@redhat.com>
5495
5496 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5497 (resume_stopped_resumed_lwps): New function.
5498 (linux_wait_for_event_filtered): Use it.
5499
5500 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5501
5502 * Makefile.in (SFILES): Add linux-personality.c.
5503 (linux-personality.o): New rule.
5504 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5505 list of objects to be built.
5506 * linux-low.c: Include nat/linux-personality.h.
5507 (linux_create_inferior): Remove code to disable address space
5508 randomization (moved to ../nat/linux-personality.c). Create
5509 cleanup to disable address space randomization.
5510
5511 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5512
5513 * Makefile.in (posix-strerror.o): New rule.
5514 (mingw-strerror.o): Likewise.
5515 * configure: Regenerated.
5516 * configure.ac: Source file ../common/common.host. Initialize new
5517 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5518
5519 2015-01-14 Yao Qi <yao@codesourcery.com>
5520
5521 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5522 (ppc-linux.o): New rule.
5523 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5524 * configure.ac: AC_CHECK_FUNCS(getauxval).
5525 * config.in: Re-generated.
5526 * configure: Re-generated.
5527 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5528 ppc64_64bit_inferior_p
5529
5530 2015-01-14 Yao Qi <yao@codesourcery.com>
5531
5532 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5533 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5534 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5535 (PT_ORIG_R3, PT_TRAP): Likewise.
5536 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5537 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5538 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5539
5540 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5541
5542 * i387-fp.c (i387_cache_to_xsave): In look over
5543 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5544 zmmh_low_space field by use of zmmh_high_space.
5545
5546 2015-01-09 Pedro Alves <palves@redhat.com>
5547
5548 * linux-low.c (step_over_bkpt): Move higher up in the file.
5549 (handle_extended_wait): Don't store the stop_pc here.
5550 (get_stop_pc): Adjust comments and rename to ...
5551 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5552 stopped for a software breakpoint or hardware breakpoint.
5553 (thread_still_has_status_pending_p): New function.
5554 (status_pending_p_callback): Use
5555 thread_still_has_status_pending_p. If the event is no longer
5556 interesting, resume the LWP.
5557 (handle_tracepoints): Add assert.
5558 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5559 (wstatus_maybe_breakpoint): New function.
5560 (cancel_breakpoint): Delete function.
5561 (check_stopped_by_watchpoint): New function, factored out from
5562 linux_low_filter_event.
5563 (lp_status_maybe_breakpoint): Delete function.
5564 (linux_low_filter_event): Remove filter_ptid argument.
5565 Leave thread group exits pending here. Store the LWP's stop PC.
5566 Always leave events pending.
5567 (linux_wait_for_event_filtered): Pull all events out of the
5568 kernel, and leave them all pending.
5569 (count_events_callback, select_event_lwp_callback): Consider all
5570 events.
5571 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5572 (select_event_lwp): Only give preference to the stepping LWP in
5573 all-stop mode. Adjust comments.
5574 (ignore_event): New function.
5575 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5576 references to cancel_breakpoints. Adjust to renames. Also give
5577 equal priority to all LWPs that have had events in non-stop mode.
5578 If reporting a software breakpoint event, unadjust the LWP's PC.
5579 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5580 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5581 Adjust.
5582 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5583 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5584 (linux_stopped_by_watchpoint): Adjust.
5585 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5586 * linux-low.h (enum lwp_stop_reason): New.
5587 (struct lwp_info) <stop_pc>: Adjust comment.
5588 <stopped_by_watchpoint>: Delete field.
5589 <stop_reason>: New field.
5590 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5591 * mem-break.c (software_breakpoint_inserted_here)
5592 (hardware_breakpoint_inserted_here): New function.
5593 * mem-break.h (software_breakpoint_inserted_here)
5594 (hardware_breakpoint_inserted_here): Declare.
5595 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5596 (cancel_breakpoints): Delete.
5597 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5598 (upload_fast_traceframes): Remove references to
5599 cancel_breakpoints.
5600
5601 2015-01-09 Pedro Alves <palves@redhat.com>
5602
5603 * thread-db.c (find_new_threads_callback): Ignore thread if the
5604 kernel thread ID is -1.
5605
5606 2015-01-09 Pedro Alves <palves@redhat.com>
5607
5608 * linux-low.c (linux_attach_fail_reason_string): Move to
5609 nat/linux-ptrace.c, and rename.
5610 (linux_attach_lwp): Update comment.
5611 (attach_proc_task_lwp_callback): New function.
5612 (linux_attach): Adjust to rename and use
5613 linux_proc_attach_tgid_threads.
5614 (linux_attach_fail_reason_string): Delete declaration.
5615
5616 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5617
5618 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5619 * server.c (gdbserver_version): Likewise.
5620
5621 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5622
5623 * remote-utils.c: Include ctype.h.
5624 (input_interrupt): Explicitly handle the case when the char
5625 received is the NUL byte. Improve the printing of non-ASCII
5626 characters.
5627
5628 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5629
5630 * linux-low.c (linux_low_filter_event): Update call to
5631 linux_enable_event_reporting following the addition of
5632 a new parameter to that function.
5633
5634 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5635
5636 PR server/17457
5637 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5638 (AARCH64_FPCR_REGNO): Likewise.
5639 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5640 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5641 (aarch64_store_fpregset): Likewise.
5642
5643 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5644
5645 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5646 Remove FIXME comment about assumption about N.
5647
5648 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5649
5650 * configure.ac: If large-file support is disabled in GDBserver,
5651 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5652 * configure: Regenerate.
5653
5654 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5655
5656 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5657 warning upon ENODATA from ptrace.
5658 * linux-s390-low.c (s390_store_tdb): New.
5659 (s390_regsets): Add regset for NT_S390_TDB.
5660
5661 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5662
5663 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5664 without a fill_function.
5665 * linux-s390-low.c (s390_fill_last_break): Remove.
5666 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5667 (s390_arch_setup): Use regset's size instead of fill_function for
5668 loop end condition.
5669
5670 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5671
5672 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5673 the regset's store function when ptrace returned an error.
5674 * regcache.c (get_thread_regcache): Invalidate register cache
5675 before fetching inferior's registers.
5676
5677 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5678
5679 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5680 while-loop as for-loop.
5681 (regsets_store_inferior_registers): Likewise.
5682
5683 2014-11-28 Yao Qi <yao@codesourcery.com>
5684
5685 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5686 * config.in, configure: Re-generate.
5687 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5688 is defined.
5689
5690 2014-11-21 Yao Qi <yao@codesourcery.com>
5691
5692 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5693 (AC_CHECK_HEADERS): Remove malloc.h.
5694 * configure: Re-generated.
5695 * config.in: Re-generated.
5696 * server.h: Don't include alloca.h and malloc.h.
5697 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5698 Don't include malloc.h.
5699
5700 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5701
5702 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5703 corresponding ERRNO check in same block.
5704
5705 2014-11-12 Pedro Alves <palves@redhat.com>
5706
5707 * server.c (cont_thread): Update comment.
5708 (start_inferior, attach_inferior): No longer clear cont_thread.
5709 (handle_v_cont): No longer set cont_thread.
5710 (captured_main): Clear cont_thread each time a GDB connects.
5711
5712 2014-11-12 Pedro Alves <palves@redhat.com>
5713
5714 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5715 thread, and don't resume all threads if the Hc thread has exited.
5716
5717 2014-11-12 Pedro Alves <palves@redhat.com>
5718
5719 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5720 the process group instead of to a specific LWP.
5721
5722 2014-10-15 Pedro Alves <palves@redhat.com>
5723
5724 PR server/17487
5725 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5726 parameter.
5727 (arm_set_thread_context): Delete.
5728 (the_low_target): Adjust.
5729 * win32-i386-low.c (debug_registers_changed)
5730 (debug_registers_used): Delete.
5731 (update_debug_registers_callback): New function.
5732 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5733 needing to update their debug registers.
5734 (win32_get_current_dr): New function.
5735 (x86_dr_low_get_addr, x86_dr_low_get_control)
5736 (x86_dr_low_get_status): Fetch the debug register from the thread
5737 record's context.
5738 (i386_initial_stuff): Adjust.
5739 (i386_get_thread_context): Remove current_event parameter. Don't
5740 clear debug_registers_changed nor copy DR values to
5741 debug_reg_state.
5742 (i386_set_thread_context): Delete.
5743 (i386_prepare_to_resume): New function.
5744 (i386_thread_added): Mark the thread as needing to update irs
5745 debug registers.
5746 (the_low_target): Remove i386_set_thread_context and install
5747 i386_prepare_to_resume.
5748 * win32-low.c (win32_get_thread_context): Adjust.
5749 (win32_set_thread_context): Use SetThreadContext
5750 directly.
5751 (win32_prepare_to_resume): New function.
5752 (win32_require_context): New function, factored out from ...
5753 (thread_rec): ... this.
5754 (continue_one_thread): Call win32_prepare_to_resume on each thread
5755 we're about to continue.
5756 (win32_resume): Call win32_prepare_to_resume on the event thread.
5757 * win32-low.h (struct win32_thread_info)
5758 <debug_registers_changed>: New field.
5759 (struct win32_target_ops): Change prototype of set_thread_context,
5760 delete set_thread_context and add prepare_to_resume.
5761 (win32_require_context): New declaration.
5762
5763 2014-10-08 Gary Benson <gbenson@redhat.com>
5764
5765 * server.h: Do not include common-exceptions.h.
5766
5767 2014-10-08 Gary Benson <gbenson@redhat.com>
5768
5769 * server.h: Do not include cleanups.h.
5770
5771 2014-09-30 James Hogan <james.hogan@imgtec.com>
5772
5773 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5774 mips64-dsp-linux.c.
5775
5776 2014-09-23 Yao Qi <yao@codesourcery.com>
5777
5778 * linux-low.c (lp_status_maybe_breakpoint): New function.
5779 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5780 (count_events_callback): Likewise.
5781 (select_event_lwp_callback): Likewise.
5782 (cancel_breakpoints_callback): Likewise.
5783
5784 2014-09-19 Don Breazeal <donb@codesourcery.com>
5785
5786 * linux-low.c (handle_extended_wait): Call
5787 linux_ptrace_get_extended_event.
5788 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5789 linux_is_extended_waitstatus.
5790
5791 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5792
5793 * Makefile.in (CPPFLAGS): Define.
5794 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5795 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5796
5797 2014-09-16 Gary Benson <gbenson@redhat.com>
5798
5799 * inferiors.h (current_inferior): Renamed as...
5800 (current_thread): New variable. All uses updated.
5801 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5802 (maybe_move_out_of_jump_pad): Likewise.
5803 (cancel_breakpoint): Likewise.
5804 (linux_low_filter_event): Likewise.
5805 (wait_for_sigstop): Likewise.
5806 (linux_resume_one_lwp): Likewise.
5807 (need_step_over_p): Likewise.
5808 (start_step_over): Likewise.
5809 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5810 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5811 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5812 and save_inferior as saved_thread.
5813 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5814 saved_thread.
5815 (regcache_invalidate_thread): Likewise.
5816 * remote-utils.c (prepare_resume_reply): Likewise.
5817 * thread-db.c (thread_db_get_tls_address): Likewise.
5818 (disable_thread_event_reporting): Likewise.
5819 (remove_thread_event_breakpoints): Likewise.
5820 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5821 as saved_thread.
5822 * target.h (set_desired_inferior): Renamed as...
5823 (set_desired_thread): New declaration. All uses updated.
5824 * server.c (myresume): Updated comment to reference thread instead
5825 of inferior.
5826 (handle_serial_event): Likewise.
5827 (handle_target_event): Likewise.
5828
5829 2014-09-12 Tom Tromey <tromey@redhat.com>
5830 Gary Benson <gbenson@redhat.com>
5831
5832 * regcache.h: Include common-regcache.h.
5833 (regcache_read_pc): Don't declare.
5834 * regcache.c (get_thread_regcache_for_ptid): New function.
5835
5836 2014-09-11 Tom Tromey <tromey@redhat.com>
5837 Gary Benson <gbenson@redhat.com>
5838
5839 * symbol.c: New file.
5840 * Makefile.in (SFILES): Add symbol.c.
5841 (OBS): Add symbol.o.
5842
5843 2014-09-11 Gary Benson <gbenson@redhat.com>
5844
5845 * target.c (target_stop_ptid, target_continue_ptid): New
5846 functions.
5847
5848 2014-09-11 Tom Tromey <tromey@redhat.com>
5849 Gary Benson <gbenson@redhat.com>
5850
5851 * target.h: Include target/target.h.
5852 * target.c (target_read_memory, target_read_uint32)
5853 (target_write_memory): New functions.
5854
5855 2014-09-11 Gary Benson <gbenson@redhat.com>
5856
5857 * server.h (debug_hw_points): Don't declare.
5858 * server.c (debug_hw_points): Don't define. Replace all uses
5859 with show_debug_regs.
5860 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5861 all uses with show_debug_regs.
5862
5863 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5864
5865 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5866 endianness into account.
5867 (ppc_supply_ptrace_register): Likewise.
5868
5869 2014-09-03 James Hogan <james.hogan@imgtec.com>
5870
5871 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5872 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5873
5874 2014-09-03 Gary Benson <gbenson@redhat.com>
5875
5876 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5877 ALL_DEBUG_ADDRESS_REGISTERS.
5878
5879 2014-09-02 Gary Benson <gbenson@redhat.com>
5880
5881 * i386-low.h: Renamed as...
5882 * x86-low.h: New file. All type, function and variable name
5883 prefixes changed from "i386_" to "x86_". All references updated.
5884 * i386-low.c: Renamed as...
5885 * x86-low.c: New file. All type, function and variable name
5886 prefixes changed from "i386_" to "x86_". All references updated.
5887
5888 2014-09-02 Gary Benson <gbenson@redhat.com>
5889
5890 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5891 (x86_linux_new_thread): Likewise.
5892
5893 2014-08-29 Gary Benson <gbenson@redhat.com>
5894
5895 * server.h (setjmp.h): Do not include.
5896 (toplevel): Do not declare.
5897 (common-exceptions.h): Include.
5898 (cleanups.h): Likewise.
5899 * server.c (toplevel): Do not define.
5900 (exit_code): New static global.
5901 (detach_or_kill_for_exit_cleanup): New function.
5902 (main): New function. Original main renamed to...
5903 (captured_main): New function.
5904 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5905
5906 2014-08-29 Gary Benson <gbenson@redhat.com>
5907
5908 * Makefile.in (SFILES): Add common/common-exceptions.c.
5909 (OBS): Add common-exceptions.o.
5910 (common-exceptions.o): New rule.
5911 * utils.c (prepare_to_throw_exception): New function.
5912
5913 2014-08-29 Gary Benson <gbenson@redhat.com>
5914
5915 * config.in: Regenerate.
5916 * configure: Likewise.
5917
5918 2014-08-29 Gary Benson <gbenson@redhat.com>
5919
5920 * Makefile.in (SFILES): Add common/cleanups.c.
5921 (OBS): cleanups.o.
5922 (cleanups.o): New rule.
5923
5924 2014-08-29 Gary Benson <gbenson@redhat.com>
5925
5926 * utils.c (internal_vwarning): New function.
5927
5928 2014-08-28 Gary Benson <gbenson@redhat.com>
5929
5930 * utils.h (fatal): Remove declaration.
5931 * utils.c (fatal): Remove function.
5932
5933 2014-08-28 Gary Benson <gbenson@redhat.com>
5934
5935 * tracepoint.c (gdb_agent_init): Replace fatal with
5936 perror_with_name.
5937 (initialize_tracepoint): Likewise.
5938
5939 2014-08-28 Gary Benson <gbenson@redhat.com>
5940
5941 * remote-utils.c (remote_prepare): Replace fatal with error.
5942
5943 2014-08-28 Gary Benson <gbenson@redhat.com>
5944
5945 * linux-low.c (linux_async): Replace fatal with warning.
5946 Tidy up and return.
5947 (linux_start_non_stop): Return -1 if linux_async failed.
5948
5949 2014-08-28 Gary Benson <gbenson@redhat.com>
5950
5951 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5952 gdb_assert.
5953 (i386_dr_low_get_addr): Remove vague comment.
5954 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5955 gdb_assert.
5956
5957 2014-08-28 Gary Benson <gbenson@redhat.com>
5958
5959 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5960 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5961 internal_error.
5962 (linux_resume_one_lwp): Likewise.
5963 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5964 gdb_assert.
5965 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5966 with internal_error.
5967 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5968 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5969 (find_register_by_name): Replace fatal with internal_error.
5970 (find_regno): Likewise.
5971 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5972 * thread-db.c (thread_db_create_event): Likewise.
5973 (thread_db_load_search): Likewise.
5974 (try_thread_db_load_1): Likewise.
5975 * tracepoint.c (get_jump_space_head): Replace fatal with
5976 internal_error.
5977 (claim_trampoline_space): Likewise.
5978 (have_fast_tracepoint_trampoline_buffer): Likewise.
5979 (cmd_qtstart): Likewise.
5980 (stop_tracing): Likewise.
5981 (fast_tracepoint_collecting): Likewise.
5982 (target_malloc): Likewise.
5983 (download_tracepoint): Likewise.
5984 (download_trace_state_variables): Replace check with gdb_assert.
5985 (upload_fast_traceframes): Replace fatal with internal_error.
5986
5987 2014-08-19 Tom Tromey <tromey@redhat.com>
5988 Gary Benson <gbenson@redhat.com>
5989
5990 * Makefile.in (SFILES): Add common/common-debug.c.
5991 (OBS): Add common-debug.o.
5992 (common-debug.o): New rule.
5993 * debug.h (debug_printf): Don't declare.
5994 * debug.c (debug_printf): Renamed and rewritten as...
5995 (debug_vprintf): New function.
5996
5997 2014-08-19 Gary Benson <gbenson@redhat.com>
5998
5999 * utils.h: Do not include print-utils.h.
6000
6001 2014-08-19 Tom Tromey <tromey@redhat.com>
6002 Gary Benson <gbenson@redhat.com>
6003
6004 * server.h: Add static assertion.
6005 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6006
6007 2014-08-19 Tom Tromey <tromey@redhat.com>
6008 Gary Benson <gbenson@redhat.com>
6009
6010 * Makefile.in (SFILES): Add common/errors.c.
6011 (OBS): Add errors.o.
6012 (IPA_OBS): Add errors-ipa.o.
6013 (errors.o): New rule.
6014 (errors-ipa.o): Likewise.
6015 * utils.h (perror_with_name, error, warning): Don't declare.
6016 * utils.c (warning): Renamed and rewritten as...
6017 (vwarning): New function.
6018 (error): Renamed and rewritten as...
6019 (verror): New function.
6020 (internal_error): Renamed and rewritten as...
6021 (internal_verror): New function.
6022
6023 2014-08-07 Gary Benson <gbenson@redhat.com>
6024
6025 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6026 * configure: Regenerate.
6027 * config.in: Likewise.
6028 * server.h: Do not include errno.h.
6029 * event-loop.c: Likewise.
6030 * hostio-errno.c: Likewise.
6031 * linux-low.c: Likewise.
6032 * remote-utils.c: Likewise.
6033 * spu-low.c: Likewise.
6034 * utils.c: Likewise.
6035 * gdbreplay.c: Unconditionally include errno.h.
6036
6037 2014-08-07 Gary Benson <gbenson@redhat.com>
6038
6039 * server.h: Do not include string.h.
6040 * event-loop.c: Likewise.
6041 * linux-low.c: Likewise.
6042 * regcache.c: Likewise.
6043 * remote-utils.c: Likewise.
6044 * spu-low.c: Likewise.
6045 * utils.c: Likewise.
6046
6047 2014-08-07 Gary Benson <gbenson@redhat.com>
6048
6049 * server.h: Do not include gdb_assert.h.
6050
6051 2014-08-07 Gary Benson <gbenson@redhat.com>
6052
6053 * server.h: Do not include common-utils.h.
6054
6055 2014-08-07 Gary Benson <gbenson@redhat.com>
6056
6057 * server.h: Do not include ptid.h.
6058 * notif.h: Likewise.
6059
6060 2014-08-07 Gary Benson <gbenson@redhat.com>
6061
6062 * server.h: Do not include gdb_locale.h.
6063
6064 2014-08-07 Gary Benson <gbenson@redhat.com>
6065
6066 * server.h: Do not include gdb/signals.h.
6067 * win32-low.c: Likewise.
6068
6069 2014-08-07 Gary Benson <gbenson@redhat.com>
6070
6071 * server.h: Do not include pathmax.h.
6072
6073 2014-08-07 Gary Benson <gbenson@redhat.com>
6074
6075 * server.h: Do not include libiberty.h.
6076 * linux-bfin-low.c: Likewise.
6077
6078 2014-08-07 Gary Benson <gbenson@redhat.com>
6079
6080 * server.h: Do not include ansidecl.h.
6081
6082 2014-08-07 Gary Benson <gbenson@redhat.com>
6083
6084 * linux-x86-low.c: Do not include stddef.h.
6085 * lynx-ppc-low.c: Likewise.
6086 * tracepoint.c: Likewise.
6087
6088 2014-08-07 Gary Benson <gbenson@redhat.com>
6089
6090 * server.h: Do not include stdarg.h.
6091 * nto-low.c: Likewise.
6092
6093 2014-08-07 Gary Benson <gbenson@redhat.com>
6094
6095 * server.h: Do not include stdlib.h.
6096 * inferiors.c: Likewise.
6097 * linux-low.c: Likewise.
6098 * regcache.c: Likewise.
6099 * spu-low.c: Likewise.
6100 * tracepoint.c: Likewise.
6101 * utils.c: Likewise.
6102
6103 2014-08-07 Gary Benson <gbenson@redhat.com>
6104
6105 * server.h: Do not include stdio.h.
6106 * linux-low.c: Likewise.
6107 * remote-utils.c: Likewise.
6108 * spu-low.c: Likewise.
6109 * utils.c: Likewise.
6110 * wincecompat.c: Likewise.
6111
6112 2014-08-06 Gary Benson <gbenson@redhat.com>
6113
6114 * regcache.c (init_register_cache): Move conditionals inside if.
6115
6116 2014-08-06 Gary Benson <gbenson@redhat.com>
6117
6118 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6119
6120 2014-07-31 Gary Benson <gbenson@redhat.com>
6121
6122 * ax.h: Do not include server.h.
6123 * gdbthread.h: Likewise.
6124 * lynx-low.h: Likewise.
6125 * notif.h: Likewise.
6126
6127 2014-07-30 Gary Benson <gbenson@redhat.com>
6128
6129 * server.h: Include common-defs.h.
6130 Do not include config.h or build-gnulib-gdbserver/config.h.
6131
6132 2014-07-30 Gary Benson <gbenson@redhat.com>
6133
6134 * hostio-errno.c: Move server.h to top of includes list.
6135 * inferiors.c: Likewise.
6136 * linux-x86-low.c: Likewise.
6137 * notif.c: Include server.h.
6138
6139 2014-07-24 Tom Tromey <tromey@redhat.com>
6140 Gary Benson <gbenson@redhat.com>
6141
6142 * server.h (CORE_ADDR): Now unsigned.
6143
6144 2014-07-16 Pedro Alves <palves@redhat.com>
6145
6146 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6147
6148 2014-07-15 Pedro Alves <palves@redhat.com>
6149
6150 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6151 copy.
6152
6153 2014-07-11 Pedro Alves <palves@redhat.com>
6154
6155 * linux-low.c (kill_wait_lwp): New function, based on
6156 kill_one_lwp_callback, but use my_waitpid directly.
6157 (kill_one_lwp_callback, linux_kill): Use it.
6158
6159 2014-06-23 Pedro Alves <palves@redhat.com>
6160
6161 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6162 before setting DR0..DR3.
6163
6164 2014-06-20 Gary Benson <gbenson@redhat.com>
6165
6166 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6167 * configure: Regenerated.
6168 * config.in: Likewise.
6169
6170 2014-06-20 Gary Benson <gbenson@redhat.com>
6171
6172 * Makefile.in (SFILES): Update locations for files moved
6173 from common to nat.
6174 (object file files): Reordered.
6175
6176 2014-06-20 Gary Benson <gbenson@redhat.com>
6177
6178 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6179 (i386_dr_low_set_addr): Likewise.
6180 (i386_dr_low_get_addr): Likewise.
6181 (i386_dr_low_can_set_control): Likewise.
6182 (i386_dr_low_set_control): Likewise.
6183 (i386_dr_low_get_control): Likewise.
6184 (i386_dr_low_get_status): Likewise.
6185 (i386_get_debug_register_length): Likewise.
6186 * linux-x86-low.c (i386_dr_low_set_addr):
6187 Changed signature. Made static.
6188 (i386_dr_low_get_addr): Likewise.
6189 (i386_dr_low_set_control): Likewise.
6190 (i386_dr_low_get_control): Likewise.
6191 (i386_dr_low_get_status): Likewise.
6192 (i386_dr_low): New global variable.
6193 * win32-i386-low.c (i386_dr_low_set_addr):
6194 Changed signature. Made static.
6195 (i386_dr_low_get_addr): Likewise.
6196 (i386_dr_low_set_control): Likewise.
6197 (i386_dr_low_get_control): Likewise.
6198 (i386_dr_low_get_status): Likewise.
6199 (i386_dr_low): New global variable.
6200
6201 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6202
6203 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6204 * Makefile.in (AR, AR_FLAGS): Define.
6205 * configure: Regenerate.
6206
6207 2014-06-19 Gary Benson <gbenson@redhat.com>
6208
6209 * Makefile.in (i386-dregs.o): New rule.
6210 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6211 * i386-low.c (target.h): Remove include.
6212 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6213 (DR_CONTROL_SHIFT): Likewise.
6214 (DR_CONTROL_SIZE): Likewise.
6215 (DR_RW_EXECUTE): Likewise.
6216 (DR_RW_WRITE): Likewise.
6217 (DR_RW_READ): Likewise.
6218 (DR_RW_IORW): Likewise.
6219 (DR_LEN_1): Likewise.
6220 (DR_LEN_2): Likewise.
6221 (DR_LEN_4): Likewise.
6222 (DR_LEN_8): Likewise.
6223 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6224 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6225 (DR_ENABLE_SIZE): Likewise.
6226 (DR_LOCAL_SLOWDOWN): Likewise.
6227 (DR_GLOBAL_SLOWDOWN): Likewise.
6228 (DR_CONTROL_RESERVED): Likewise.
6229 (I386_DR_CONTROL_MASK): Likewise.
6230 (I386_DR_VACANT): Likewise.
6231 (I386_DR_LOCAL_ENABLE): Likewise.
6232 (I386_DR_GLOBAL_ENABLE): Likewise.
6233 (I386_DR_DISABLE): Likewise.
6234 (I386_DR_SET_RW_LEN): Likewise.
6235 (I386_DR_GET_RW_LEN): Likewise.
6236 (I386_DR_WATCH_HIT): Likewise.
6237 (i386_wp_op_t): Likewise.
6238 (i386_show_dr): Likewise.
6239 (i386_length_and_rw_bits): Likewise.
6240 (i386_insert_aligned_watchpoint): Likewise.
6241 (i386_remove_aligned_watchpoint): Likewise.
6242 (i386_handle_nonaligned_watchpoint): Likewise.
6243 i386_update_inferior_debug_regs(): Likewise.
6244 (i386_dr_insert_watchpoint): Likewise.
6245 (i386_dr_remove_watchpoint): Likewise.
6246 (i386_dr_region_ok_for_watchpoint): Likewise.
6247 (i386_dr_stopped_data_address): Likewise.
6248 (i386_dr_stopped_by_watchpoint): Likewise.
6249
6250 2014-06-19 Gary Benson <gbenson@redhat.com>
6251
6252 * i386-low.c (i386_dr_show): Renamed to
6253 i386_show_dr and made static. All uses updated.
6254 (i386_dr_length_and_rw_bits): Renamed to
6255 i386_length_and_rw_bits and made static.
6256 All uses updated.
6257 (i386_dr_insert_aligned_watchpoint): Renamed to
6258 i386_insert_aligned_watchpoint and made static.
6259 All uses updated.
6260 (i386_dr_remove_aligned_watchpoint): Renamed to
6261 i386_remove_aligned_watchpoint and made static.
6262 All uses updated.
6263 (i386_dr_update_inferior_debug_regs): Renamed to
6264 i386_update_inferior_debug_regs and made static.
6265 All uses updated.
6266
6267 2014-06-18 Gary Benson <gbenson@redhat.com>
6268
6269 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6270 (i386_dr_low_can_set_control): Likewise.
6271 (i386_get_debug_register_length): Likewise.
6272 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6273 (i386_dr_low_can_set_control): Likewise.
6274 (i386_get_debug_register_length): Likewise.
6275
6276 2014-06-17 Gary Benson <gbenson@redhat.com>
6277
6278 * i386-low.h (i386-dregs.h): New include.
6279 (DR_FIRSTADDR): Now in i386-dregs.h.
6280 (DR_LASTADDR): Likewise.
6281 (DR_NADDR): Likewise.
6282 (DR_STATUS): Likewise.
6283 (DR_CONTROL): Likewise.
6284 (i386_debug_reg_state): Likewise.
6285 (i386_dr_insert_watchpoint): Likewise.
6286 (i386_dr_remove_watchpoint): Likewise.
6287 (i386_dr_region_ok_for_watchpoint): Likewise.
6288 (i386_dr_stopped_data_address): Likewise.
6289 (i386_dr_stopped_by_watchpoint): Likewise.
6290 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6291
6292 2014-06-18 Gary Benson <gbenson@redhat.com>
6293
6294 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6295 i386_dr_insert_watchpoint.
6296 (i386_low_remove_watchpoint): Renamed to
6297 i386_dr_remove_watchpoint.
6298 (i386_low_region_ok_for_watchpoint): Renamed to
6299 i386_dr_region_ok_for_watchpoint.
6300 (i386_low_stopped_data_address): Renamed to
6301 i386_dr_stopped_data_address.
6302 (i386_low_stopped_by_watchpoint): Renamed to
6303 i386_dr_stopped_by_watchpoint.
6304 * i386-low.c (i386_show_dr): Renamed to
6305 i386_dr_show and made nonstatic. All uses updated.
6306 (i386_length_and_rw_bits): Renamed to
6307 i386_dr_length_and_rw_bits and made nonstatic.
6308 All uses updated.
6309 (i386_insert_aligned_watchpoint): Renamed to
6310 i386_dr_insert_aligned_watchpoint and made nonstatic.
6311 All uses updated.
6312 (i386_remove_aligned_watchpoint): Renamed to
6313 i386_dr_remove_aligned_watchpoint and made nonstatic.
6314 All uses updated.
6315 (i386_update_inferior_debug_regs): Renamed to
6316 i386_dr_update_inferior_debug_regs and made nonstatic.
6317 All uses updated.
6318 (i386_low_insert_watchpoint): Renamed to
6319 i386_dr_insert_watchpoint. All uses updated.
6320 (i386_low_remove_watchpoint): Renamed to
6321 i386_dr_remove_watchpoint. All uses updated.
6322 (i386_low_region_ok_for_watchpoint): Renamed to
6323 i386_dr_region_ok_for_watchpoint. All uses updated.
6324 (i386_low_stopped_data_address): Renamed to
6325 i386_dr_stopped_data_address. All uses updated.
6326 (i386_low_stopped_by_watchpoint): Renamed to
6327 i386_dr_stopped_by_watchpoint. All uses updated.
6328
6329 2014-06-18 Gary Benson <gbenson@redhat.com>
6330
6331 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6332 (i386_dr_low_can_set_control): Likewise.
6333 (i386_insert_aligned_watchpoint): New check.
6334
6335 2014-06-18 Gary Benson <gbenson@redhat.com>
6336
6337 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6338 Renamed to state.
6339
6340 2014-06-18 Gary Benson <gbenson@redhat.com>
6341
6342 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6343 instead of fatal and error.
6344 (i386_handle_nonaligned_watchpoint): Likewise.
6345
6346 2014-06-18 Gary Benson <gbenson@redhat.com>
6347
6348 * i386-low.c (i386_get_debug_register_length): New macro.
6349 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6350 (i386_show_dr): Use debug_printf instead of fprintf. Use
6351 phex to format values.
6352
6353 2014-06-18 Gary Benson <gbenson@redhat.com>
6354
6355 * i386-low.h: Comment changes.
6356 * i386-low.c: Likewise.
6357
6358 2014-06-18 Gary Benson <gbenson@redhat.com>
6359
6360 * i386-low.c: Whitespace changes.
6361
6362 2014-06-12 Tom Tromey <tromey@redhat.com>
6363
6364 * utils.c (freeargv): Remove.
6365
6366 2014-06-12 Tom Tromey <tromey@redhat.com>
6367
6368 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6369 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6370 (parse_debug_format_options): Likewise.
6371 (gdbserver_usage): Likewise.
6372 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6373 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6374 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6375 against libiberty.
6376 ($(LIBGNU)): Depend on libiberty.
6377 (all-lib): Recurse into all subdirs.
6378 (install-only): Invoke "install" target in subdirs.
6379 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6380 targets.
6381 * configure: Rebuild.
6382 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6383 for vasprintf, vsnprintf, or gettimeofday.
6384 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6385 srv_tgtobj.
6386
6387 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6388
6389 * development.sh: Delete.
6390 * Makefile.in (config.status): Adjust dependency on development.sh.
6391 * configure.ac: Adjust development.sh source call.
6392 * configure: Regenerate.
6393
6394 2014-06-02 Pedro Alves <palves@redhat.com>
6395
6396 * ax.c (gdb_free_agent_expr): New function.
6397 * ax.h (gdb_free_agent_expr): New declaration.
6398 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6399 list.
6400 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6401 static.
6402 (clear_breakpoint_conditions_and_commands): New function.
6403 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6404 (clear_breakpoint_conditions_and_commands): New declaration.
6405
6406 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6407
6408 * linux-aarch64-low.c (asm/ptrace.h): Include.
6409
6410 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6411
6412 Fix TLS access for -static -pthread.
6413 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6414 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6415 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6416
6417 2014-05-20 Pedro Alves <palves@redhat.com>
6418
6419 * linux-aarch64-low.c (aarch64_insert_point)
6420 (aarch64_remove_point): No longer check whether the type is
6421 supported here. Adjust to new interface.
6422 (the_low_target): Install aarch64_supports_z_point_type as
6423 supports_z_point_type method.
6424 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6425 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6426 instead of a Z packet char. Adjust.
6427 (arm_supports_z_point_type): New function.
6428 (arm_insert_point, arm_remove_point): Adjust to new interface.
6429 (the_low_target): Install arm_supports_z_point_type.
6430 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6431 (cris_insert_point, cris_remove_point): Adjust to new interface.
6432 Don't check whether the type is supported here.
6433 (the_low_target): Install cris_supports_z_point_type.
6434 * linux-low.c (linux_supports_z_point_type): New function.
6435 (linux_insert_point, linux_remove_point): Adjust to new interface.
6436 * linux-low.h (struct linux_target_ops) <insert_point,
6437 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6438 raw_breakpoint pointer parameter.
6439 <supports_z_point_type>: New method.
6440 * linux-mips-low.c (mips_supports_z_point_type): New function.
6441 (mips_insert_point, mips_remove_point): Adjust to new interface.
6442 Use mips_supports_z_point_type.
6443 (the_low_target): Install mips_supports_z_point_type.
6444 * linux-ppc-low.c (the_low_target): Install NULL as
6445 supports_z_point_type method.
6446 * linux-s390-low.c (the_low_target): Install NULL as
6447 supports_z_point_type method.
6448 * linux-sparc-low.c (the_low_target): Install NULL as
6449 supports_z_point_type method.
6450 * linux-x86-low.c (x86_supports_z_point_type): New function.
6451 (x86_insert_point): Adjust to new insert_point interface. Use
6452 insert_memory_breakpoint. Adjust to new
6453 i386_low_insert_watchpoint interface.
6454 (x86_remove_point): Adjust to remove_point interface. Use
6455 remove_memory_breakpoint. Adjust to new
6456 i386_low_remove_watchpoint interface.
6457 (the_low_target): Install x86_supports_z_point_type.
6458 * lynx-low.c (lynx_target_ops): Install NULL as
6459 supports_z_point_type callback.
6460 * nto-low.c (nto_supports_z_point_type): New.
6461 (nto_insert_point, nto_remove_point): Adjust to new interface.
6462 (nto_target_ops): Install nto_supports_z_point_type.
6463 * mem-break.c: Adjust intro comment.
6464 (struct raw_breakpoint) <raw_type, size>: New fields.
6465 <inserted>: Update comment.
6466 <shlib_disabled>: Delete field.
6467 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6468 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6469 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6470 (raw_bkpt_type_to_target_hw_bp_type): New function.
6471 (find_enabled_raw_code_breakpoint_at): New function.
6472 (find_raw_breakpoint_at): New type and size parameters. Use them.
6473 (insert_memory_breakpoint): New function, based off
6474 set_raw_breakpoint_at.
6475 (remove_memory_breakpoint): New function.
6476 (set_raw_breakpoint_at): Reimplement.
6477 (set_breakpoint): New, based on set_breakpoint_at.
6478 (set_breakpoint_at): Reimplement.
6479 (delete_raw_breakpoint): Go through the_target->remove_point
6480 instead of assuming memory breakpoints.
6481 (find_gdb_breakpoint_at): Delete.
6482 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6483 (find_gdb_breakpoint): New function.
6484 (set_gdb_breakpoint_at): Delete.
6485 (z_type_supported): New function.
6486 (set_gdb_breakpoint_1): New function, loosely based off
6487 set_gdb_breakpoint_at.
6488 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6489 (delete_gdb_breakpoint_at): Delete.
6490 (delete_gdb_breakpoint_1): New function, loosely based off
6491 delete_gdb_breakpoint_at.
6492 (delete_gdb_breakpoint): New function.
6493 (clear_gdb_breakpoint_conditions): Rename to ...
6494 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6495 breakpoint.
6496 (add_condition_to_breakpoint): Make static.
6497 (add_breakpoint_condition): Take a struct breakpoint pointer
6498 instead of an address. Adjust.
6499 (gdb_condition_true_at_breakpoint): Rename to ...
6500 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6501 z_type parameter.
6502 (gdb_condition_true_at_breakpoint): Reimplement.
6503 (add_breakpoint_commands): Take a struct breakpoint pointer
6504 instead of an address. Adjust.
6505 (gdb_no_commands_at_breakpoint): Rename to ...
6506 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6507 parameter. Return true if no breakpoint was found. Change debug
6508 output.
6509 (gdb_no_commands_at_breakpoint): Reimplement.
6510 (run_breakpoint_commands): Rename to ...
6511 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6512 and change return type to boolean.
6513 (run_breakpoint_commands): New function.
6514 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6515 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6516 breakpoint. Go through the_target->remove_point instead of
6517 assuming memory breakpoint.
6518 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6519 software and hardware breakpoints.
6520 (reinsert_raw_breakpoint): Go through the_target->insert_point
6521 instead of assuming memory breakpoint.
6522 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6523 software and hardware breakpoints.
6524 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6525 Check both software and hardware breakpoints.
6526 (validate_inserted_breakpoint): Assert the breakpoint is a
6527 software breakpoint. Set the inserted flag to -1 instead of
6528 setting shlib_disabled.
6529 (delete_disabled_breakpoints): Adjust.
6530 (validate_breakpoints): Only validate software breakpoints.
6531 Adjust to inserted flag change.
6532 (check_mem_read, check_mem_write): Skip breakpoint types other
6533 than software breakpoints. Adjust to inserted flag change.
6534 * mem-break.h (enum raw_bkpt_type): New enum.
6535 (raw_breakpoint, struct process_info): Forward declare.
6536 (Z_packet_to_target_hw_bp_type): Delete declaration.
6537 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6538 (set_gdb_breakpoint, delete_gdb_breakpoint)
6539 (clear_breakpoint_conditions): New declarations.
6540 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6541 (breakpoint_inserted_here): Update comment.
6542 (add_breakpoint_condition, add_breakpoint_commands): Replace
6543 address parameter with a breakpoint pointer parameter.
6544 (gdb_breakpoint_here): Update comment.
6545 (delete_gdb_breakpoint_at): Delete.
6546 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6547 * server.c (process_point_options): Take a struct breakpoint
6548 pointer instead of an address. Adjust.
6549 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6550 delete_gdb_breakpoint.
6551 * spu-low.c (spu_target_ops): Install NULL as
6552 supports_z_point_type method.
6553 * target.h: Include mem-break.h.
6554 (struct target_ops) <prepare_to_access_memory>: Update comment.
6555 <supports_z_point_type>: New field.
6556 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6557 instead of a char. Also take a raw breakpoint pointer.
6558 * win32-arm-low.c (the_low_target): Install NULL as
6559 supports_z_point_type.
6560 * win32-i386-low.c (i386_supports_z_point_type): New function.
6561 (i386_insert_point, i386_remove_point): Adjust to new interface.
6562 (the_low_target): Install i386_supports_z_point_type.
6563 * win32-low.c (win32_supports_z_point_type): New function.
6564 (win32_insert_point, win32_remove_point): Adjust to new interface.
6565 (win32_target_ops): Install win32_supports_z_point_type.
6566 * win32-low.h (struct win32_target_ops):
6567 <supports_z_point_type>: New method.
6568 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6569 instead of a char. Also take a raw breakpoint pointer.
6570
6571 2014-05-20 Pedro Alves <palves@redhat.com>
6572
6573 * mem-break.h: Include break-common.h.
6574 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6575 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6576 (Z_packet_to_target_hw_bp_type): New declaration.
6577 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6578 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6579 (Z_PACKET_ACCESS_WP): Delete macros.
6580 (Z_packet_to_hw_type): Delete function.
6581 * i386-low.h: Don't include break-common.h here.
6582 (Z_packet_to_hw_type): Delete declaration.
6583 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6584 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6585 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6586 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6587 * linux-aarch64-low.c: Don't include break-common.h here.
6588 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6589 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6590 (Z_packet_to_target_hw_bp_type): Delete function.
6591 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6592 function.
6593 (mips_insert_point, mips_remove_point): Use
6594 Z_packet_to_target_hw_bp_type.
6595
6596 2014-05-20 Pedro Alves <palves@redhat.com>
6597
6598 * linux-aarch64-low.c: Include break-common.h.
6599 (enum target_point_type): Delete.
6600 (Z_packet_to_point_type): Rename to ...
6601 (Z_packet_to_target_hw_bp_type): ... this, and return a
6602 target_hw_bp_type instead.
6603 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6604 instead of an enum target_point_type.
6605 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6606 breakpoint type.
6607 (aarch64_dr_state_insert_one_point)
6608 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6609 (aarch64_handle_aligned_watchpoint)
6610 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6611 Take an enum target_hw_bp_type instead of an enum
6612 target_point_type.
6613 (aarch64_supports_z_point_type): New function.
6614 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6615 use Z_packet_to_target_hw_bp_type.
6616
6617 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6618
6619 * configure.ac: Only use -Werror by default when DEVELOPMENT
6620 is true.
6621 * configure: Regenerate.
6622
6623 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6624
6625 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6626 * linux-x86-low.c (X86_64_USER_REGS): New.
6627 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6628
6629 2014-04-28 Yao Qi <yao@codesourcery.com>
6630
6631 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6632 name.
6633
6634 2014-04-25 Pedro Alves <palves@redhat.com>
6635
6636 PR server/16255
6637 * linux-low.c (linux_attach_fail_reason_string): New function.
6638 (linux_attach_lwp): Delete.
6639 (linux_attach_lwp_1): Rename to ...
6640 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6641 argument. Remove "initial" parameter. Return int instead of
6642 void. Don't error or warn here.
6643 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6644 failure to attach to the tgid. Call warning when failing to
6645 attach to an lwp.
6646 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6647 argument. Remove "initial" parameter. Return int instead of
6648 void. Don't error or warn here.
6649 (linux_attach_fail_reason_string): New declaration.
6650 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6651 interface change. Use linux_attach_fail_reason_string.
6652
6653 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6654 Walfred Tedeschi <walfred.tedeschi@intel.com>
6655
6656 * Makefile.in: Added rules to handle new files
6657 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6658 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6659 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6660 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6661 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6662 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6663 x32-avx512-linux.o.
6664 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6665 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6666 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6667 i386/x32-avx512.xml.
6668 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6669 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6670 i386/x32-avx512-linux.xml.
6671 * i387-fp.c (num_avx512_k_registers): New constant for number
6672 of K registers.
6673 (num_avx512_zmmh_low_registers): New constant for number of
6674 lower ZMM registers (0-15).
6675 (num_avx512_zmmh_high_registers): New constant for number of
6676 higher ZMM registers (16-31).
6677 (num_avx512_ymmh_registers): New contant for number of higher
6678 YMM registers (ymm16-31 added by avx521 on x86_64).
6679 (num_avx512_xmm_registers): New constant for number of higher
6680 XMM registers (xmm16-31 added by AVX512 on x86_64).
6681 (struct i387_xsave): Add space for AVX512 registers.
6682 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6683 Add code to handle AVX512 registers.
6684 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6685 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6686 prototypei from generated file.
6687 (tdesc_amd64_avx512_linux): Likewise.
6688 (init_registers_x32_avx512_linux): Likewise.
6689 (tdesc_x32_avx512_linux): Likewise.
6690 (init_registers_i386_avx512_linux): Likewise.
6691 (tdesc_i386_avx512_linux): Likewise.
6692 (x86_64_regmap): Add AVX512 registers.
6693 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6694 mask.
6695 (initialize_low_arch): Add code to initialize AVX512 registers.
6696
6697 2014-04-23 Pedro Alves <palves@redhat.com>
6698
6699 * mem-break.c (find_gdb_breakpoint_at): Make static.
6700 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6701
6702 2014-04-23 Pedro Alves <palves@redhat.com>
6703
6704 * i386-low.c: Don't include break-common.h here.
6705 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6706 prototype to take target_hw_bp_type as argument instead of a Z
6707 packet char.
6708 * i386-low.h: Include break-common.h here.
6709 (Z_packet_to_hw_type): Declare.
6710 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6711 prototypes.
6712 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6713 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6714 (x86_remove_point): Convert the packet number to a
6715 target_hw_bp_type before calling i386_low_remove_watchpoint.
6716 * win32-i386-low.c (i386_insert_point): Convert the packet number
6717 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6718 (i386_remove_point): Convert the packet number to a
6719 target_hw_bp_type before calling i386_low_remove_watchpoint.
6720
6721 2014-04-23 Pedro Alves <palves@redhat.com>
6722
6723 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6724
6725 2014-04-10 Pedro Alves <palves@redhat.com>
6726
6727 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6728 Check if the condition or command is NULL before checking if the
6729 breakpoint is known. On success, return true.
6730 * mem-break.h (add_breakpoint_condition): Document return.
6731 (add_breakpoint_commands): Add describing comment.
6732 * server.c (skip_to_semicolon): New function.
6733 (process_point_options): Use it.
6734
6735 2014-04-09 Pedro Alves <palves@redhat.com>
6736
6737 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6738 to lwpid_of.
6739
6740 2014-02-27 Pedro Alves <palves@redhat.com>
6741
6742 PR 12702
6743 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6744 macros.
6745 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6746 output.
6747 (last_thread_of_process_p): Take a PID argument instead of a
6748 thread pointer.
6749 (linux_wait_for_lwp): Delete.
6750 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6751 functions.
6752 (linux_low_filter_event): New function, party factored out from
6753 linux_wait_for_event.
6754 (linux_wait_for_event): Rename to ...
6755 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6756 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6757 sigsuspend. Check for zombie leaders.
6758 (linux_wait_for_event): Reimplement as wrapper around
6759 linux_wait_for_event_filtered.
6760 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6761 a normal or signal exit is seen, it's the whole process exiting.
6762 (wait_for_sigstop): No longer a for_each_inferior callback.
6763 Rewrite on top of linux_wait_for_event_filtered.
6764 (stop_all_lwps): Call wait_for_sigstop directly.
6765 * server.c (resume, handle_target_event): Handle
6766 TARGET_WAITKIND_NO_RESUMED.
6767
6768 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6769
6770 * win32-low.c (psapi_get_dll_name,
6771 * win32_CreateToolhelp32Snapshot): Delete.
6772 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6773 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6774 Delete.
6775 (handle_load_dll): Add function description.
6776 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6777
6778 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6779
6780 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6781 Add comment.
6782 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6783 base address when calling win32_add_one_solib.
6784 (handle_load_dll): Delete local variable load_addr.
6785 Remove 0x1000 offset applied to DLL base address when calling
6786 win32_add_one_solib.
6787 (handle_unload_dll): Add comment.
6788
6789 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6790
6791 * win32-low.c (win32_add_all_dlls): Renames
6792 win32_ensure_ntdll_loaded. Rewrite function documentation.
6793 Adjust implementation to always load all DLLs.
6794 Add 0x1000 offset to DLL base address when calling
6795 win32_add_one_solib.
6796 (child_initialization_done): New static global.
6797 (do_initial_child_stuff): Set child_initialization_done to
6798 zero during child initialization, and 1 after. Replace call
6799 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6800 Add comment.
6801 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6802 (handle_unload_dll): Add function documentation.
6803 (get_child_debug_event): Ignore load and unload DLL events
6804 during child initialization.
6805
6806 2014-02-20 Doug Evans <dje@google.com>
6807
6808 Remove global all_lwps.
6809 * inferiors.h (ptid_of): Move here from linux-low.h.
6810 (pid_of, lwpid_of): Ditto.
6811 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6812 parameter is a struct thread_info * now.
6813 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6814 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6815 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6816 directly.
6817 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6818 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6819 * linux-arm-low.c (update_registers_callback): Update, "entry"
6820 parameter is a struct thread_info * now.
6821 Fetch lwpid from current_inferior directly.
6822 (arm_insert_point): Pass &all_threads to find_inferior instead of
6823 &all_lwps.
6824 (arm_remove_point): Ditto.
6825 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6826 (arm_prepare_to_resume): Fetch pid from thread.
6827 (arm_read_description): Fetch lwpid from current_inferior directly.
6828 * linux-low.c (all_lwps): Delete.
6829 (delete_lwp): Delete call to remove_inferior.
6830 (handle_extended_wait): Fetch lwpid from thread.
6831 (add_lwp): Don't set lwp->entry.id. Remove call to
6832 add_inferior_to_list.
6833 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6834 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6835 (kill_one_lwp_callback): Ditto.
6836 (linux_kill): Don't dereference NULL pointer.
6837 Fetch ptid,lwpid from thread.
6838 (get_detach_signal): Fetch ptid from thread.
6839 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6840 Simplify call to regcache_invalidate_thread.
6841 (delete_lwp_callback): Update, "entry" parameter is a
6842 struct thread_info * now. Fetch pid from thread.
6843 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6844 (status_pending_p_callback): Update, "entry" parameter is a
6845 struct thread_info * now. Fetch ptid from thread.
6846 (find_lwp_pid): Update, "entry" parameter is a
6847 struct thread_info * now.
6848 (linux_wait_for_lwp): Fetch pid from thread.
6849 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6850 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6851 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6852 (dequeue_one_deferred_signal): Ditto.
6853 (cancel_breakpoint): Fetch ptid from current_inferior.
6854 (linux_wait_for_event): Pass &all_threads to find_inferior,
6855 not &all_lwps. Fetch ptid, lwpid from thread.
6856 (count_events_callback): Update, "entry" parameter is a
6857 struct thread_info * now.
6858 (select_singlestep_lwp_callback): Ditto.
6859 (select_event_lwp_callback): Ditto.
6860 (cancel_breakpoints_callback): Ditto.
6861 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6862 not &all_lwps.
6863 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6864 (unsuspend_one_lwp): Update, "entry" parameter is a
6865 struct thread_info * now.
6866 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6867 not &all_lwps.
6868 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6869 Fetch lwpid from thread, not lwp.
6870 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6871 Pass &all_threads to find_inferior, not &all_lwps.
6872 (send_sigstop): Fetch lwpid from thread, not lwp.
6873 (send_sigstop_callback): Update, "entry" parameter is a
6874 struct thread_info * now.
6875 (suspend_and_send_sigstop_callback): Ditto.
6876 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6877 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6878 struct thread_info * now.
6879 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6880 from thread, lwp.
6881 (lwp_running): Update, "entry" parameter is a
6882 struct thread_info * now.
6883 (stop_all_lwps): Fetch ptid from thread.
6884 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6885 (linux_resume_one_lwp): Fetch lwpid from thread.
6886 (linux_set_resume_request): Update, "entry" parameter is a
6887 struct thread_info * now. Fetch pid, lwpid from thread.
6888 (resume_status_pending_p): Update, "entry" parameter is a
6889 struct thread_info * now.
6890 (need_step_over_p): Ditto. Fetch lwpid from thread.
6891 (start_step_over): Fetch lwpid from thread.
6892 (linux_resume_one_thread): Update, "entry" parameter is a
6893 struct thread_info * now. Fetch lwpid from thread.
6894 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6895 (proceed_one_lwp): Update, "entry" parameter is a
6896 struct thread_info * now. Fetch lwpid from thread.
6897 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6898 struct thread_info * now.
6899 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6900 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6901 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6902 directly.
6903 (regsets_store_inferior_registers): Ditto.
6904 (fetch_register, store_register): Ditto.
6905 (linux_read_memory, linux_write_memory): Ditto.
6906 (linux_request_interrupt): Ditto.
6907 (linux_read_auxv): Ditto.
6908 (linux_xfer_siginfo): Ditto.
6909 (linux_qxfer_spu): Ditto.
6910 (linux_qxfer_libraries_svr4): Ditto.
6911 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6912 moved to inferiors.h.
6913 (get_lwp): Delete.
6914 (get_thread_lwp): Update.
6915 (struct lwp_info): Delete member "entry". Simplify comment for
6916 member "thread".
6917 (all_lwps): Delete.
6918 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6919 current_inferior directly.
6920 (update_watch_registers_callback): Update, "entry" parameter is a
6921 struct thread_info * now. Fetch pid from thread.
6922 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6923 (mips_insert_point): Fetch lwpid from current_inferior.
6924 Pass &all_threads to find_inferior, not &all_lwps.
6925 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6926 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6927 directly.
6928 (mips_stopped_data_address): Ditto.
6929 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6930 directly.
6931 * linux-tile-low.c (tile_arch_setup): Ditto.
6932 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6933 (update_debug_registers_callback): Update, "entry" parameter is a
6934 struct thread_info * now. Fetch pid from thread.
6935 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6936 Pass &all_threads to find_inferior, not &all_lwps.
6937 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6938 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6939 Pass &all_threads to find_inferior, not &all_lwps.
6940 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6941 (i386_dr_low_get_status): Ditto.
6942 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6943 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6944 (x86_linux_read_description): Ditto.
6945 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6946
6947 2014-02-20 Doug Evans <dje@google.com>
6948
6949 * inferiors.c (get_first_inferior): Fix buglet.
6950
6951 2014-02-19 Doug Evans <dje@google.com>
6952
6953 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6954 * inferiors.c (add_thread): Change result type to struct thread_info *.
6955 All callers updated.
6956 (add_lwp): Call add_thread here instead of in callers.
6957 All callers updated.
6958 * linux-low.h (get_lwp_thread): Rewrite.
6959 (struct lwp_info): New member "thread".
6960
6961 2014-02-19 Doug Evans <dje@google.com>
6962
6963 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6964 All callers updated.
6965
6966 2014-02-19 Doug Evans <dje@google.com>
6967
6968 * inferiors.c (add_thread): Fix whitespace.
6969
6970 2014-02-19 Doug Evans <dje@google.com>
6971
6972 * dll.c (clear_dlls): Replace accessing list implemention details
6973 with API function.
6974 * gdbthread.h (get_first_thread): Declare.
6975 * inferiors.c (for_each_inferior_with_data): New function.
6976 (get_first_thread): New function.
6977 (find_thread_ptid): Simplify.
6978 (get_first_inferior): New function.
6979 (clear_list): Delete.
6980 (one_inferior_p): New function.
6981 (clear_inferior_list): New function.
6982 (clear_inferiors): Update.
6983 * inferiors.h (for_each_inferior_with_data): Declare.
6984 (clear_inferior_list): Declare.
6985 (one_inferior_p): Declare.
6986 (get_first_inferior): Declare.
6987 * linux-low.c (linux_wait_for_event): Replace accessing list
6988 implemention details with API function.
6989 * server.c (target_running): Ditto.
6990 (accumulate_file_name_length): New function.
6991 (emit_dll_description): New function.
6992 (handle_qxfer_libraries): Replace accessing list implemention
6993 details with API function.
6994 (handle_qxfer_threads_worker): New function.
6995 (handle_qxfer_threads_proper): Replace accessing list implemention
6996 details with API function.
6997 (handle_query): Ditto.
6998 (visit_actioned_threads_callback_ftype): New typedef.
6999 (visit_actioned_threads_data): New struct.
7000 (visit_actioned_threads): Rewrite to be find_inferior callback.
7001 (resume): Call find_inferior.
7002 (handle_status): Replace accessing list implemention
7003 details with API function.
7004 (process_serial_event): Replace accessing list implemention details
7005 with API function.
7006 * target.c (set_desired_inferior): Replace accessing list implemention
7007 details with API function.
7008 * tracepoint.c (same_process_p): New function.
7009 (gdb_agent_about_to_close): Replace accessing list implemention
7010 details with API function.
7011 * win32-low.c (child_delete_thread): Replace accessing list
7012 implemention details with API function.
7013 (match_dll_by_basename): New function.
7014 (dll_is_loaded_by_basename): New function.
7015 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7016 details call to dll_is_loaded_by_basename.
7017
7018 2014-02-19 Doug Evans <dje@google.com>
7019
7020 * dll.h (struct dll_info): Add comment.
7021 * gdbthread.h (struct thread_info): Add comment.
7022 (current_ptid): Simplify.
7023 * inferiors.c (add_process): Update.
7024 (remove_process): Update.
7025 * inferiors.h (struct process_info): Rename member "head" to "entry".
7026 * linux-low.c (delete_lwp): Update.
7027 (add_lwp): Update.
7028 (last_thread_of_process_p): Update.
7029 (kill_one_lwp_callback, linux_kill): Update.
7030 (status_pending_p_callback): Update.
7031 (wait_for_sigstop): Update. Simplify read of ptid.
7032 (start_step_over): Update.
7033 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7034 (get_lwp_thread): Update.
7035 (struct lwp_info): Rename member "head" to "entry".
7036 * regcache.h (inferior_list_entry): Delete.
7037 * server.c (kill_inferior_callback): Update.
7038 (detach_or_kill_inferior_callback): Update.
7039 (print_started_pid): Update.
7040 (print_attached_pid): Update.
7041 (process_serial_event): Simplify read of ptid.
7042 * thread-db.c (thread_db_create_event): Update.
7043 (thread_db_get_tls_address): Update.
7044 * win32-low.c (current_inferior_ptid): Simplify.
7045
7046 2014-02-19 Tom Tromey <tromey@redhat.com>
7047
7048 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7049 argument.
7050 (target_supports_btrace): Update.
7051
7052 2014-02-14 Yao Qi <yao@codesourcery.com>
7053
7054 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7055 (rsp-low-ipa.o): New target.
7056
7057 2014-02-12 Tom Tromey <tromey@redhat.com>
7058
7059 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7060 convert_ascii_to_int.
7061 * regcache.c (registers_to_string): Likewise.
7062 * remote-utils.c (decode_M_packet): Likewise.
7063 * server.c (process_serial_event): Likewise.
7064
7065 2014-02-12 Tom Tromey <tromey@redhat.com>
7066
7067 * server.c (handle_query, handle_v_run): Use hex2bin, not
7068 unhexify.
7069 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7070
7071 2014-02-12 Tom Tromey <tromey@redhat.com>
7072
7073 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7074 convert_int_to_ascii.
7075 * regcache.c (registers_to_string, collect_register_as_string):
7076 Likewise.
7077 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7078 Likewise.
7079 * server.c (process_serial_event): Likewise.
7080 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7081 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7082
7083 2014-02-12 Tom Tromey <tromey@redhat.com>
7084
7085 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7086 bin2hex, not hexify.
7087 * tracepoint.c (cmd_qtstatus): Likewise.
7088
7089 2014-02-12 Tom Tromey <tromey@redhat.com>
7090
7091 * remote-utils.c (monitor_output): Pass explicit length to
7092 hexify.
7093
7094 2014-02-12 Tom Tromey <tromey@redhat.com>
7095
7096 * tracepoint.c: Include rsp-low.h.
7097 * server.c: Include rsp-low.h.
7098 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7099 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7100 declare.
7101 * remote-utils.c: Include rsp-low.h.
7102 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7103 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7104 (convert_int_to_ascii, convert_ascii_to_int): Move to
7105 common/rsp-low.c.
7106 * regcache.c: Include rsp-low.h.
7107 * ax.c: Include rsp-low.h.
7108 * Makefile.in (SFILES): Add common/rsp-low.c.
7109 (OBS): Add rsp-low.o.
7110 (rsp-low.o): New target.
7111
7112 2014-02-12 Tom Tromey <tromey@redhat.com>
7113
7114 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7115 Include print-utils.h.
7116 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7117 (plongest, thirty_two, phex_nz): Remove.
7118 * Makefile.in (SFILES): Add common/print-utils.c.
7119 (OBS): Add print-utils.o.
7120 (print-utils-ipa.o): New target.
7121 (print-utils.o): New target.
7122 (IPA_OBJS): Add print-utils-ipa.o.
7123
7124 2014-02-06 Tom Tromey <tromey@redhat.com>
7125
7126 * Makefile.in (SFILES): Fix indentation.
7127
7128 2014-02-05 Doug Evans <dje@google.com>
7129
7130 * linux-low.c (linux_wait_for_event): Improve comment.
7131 (linux_wait_1): Keep current_inferior in sync with event_child.
7132
7133 2014-01-22 Doug Evans <dje@google.com>
7134
7135 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7136
7137 2014-01-22 Doug Evans <dje@google.com>
7138
7139 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7140 * configure: Regenerate.
7141 * config.in: Regenerate.
7142 * Makefile.in (SFILES): Add debug.c.
7143 (OBS): Add debug.o.
7144 * debug.c: New file.
7145 * debug.h: New file.
7146 * linux-aarch64-low.c (*): Update all debugging printfs to use
7147 debug_printf instead of fprintf.
7148 * linux-arm-low.c (*): Ditto.
7149 * linux-cris-low.c (*): Ditto.
7150 * linux-crisv32-low.c (*): Ditto.
7151 * linux-m32r-low.c (*): Ditto.
7152 * linux-sparc-low.c (*): Ditto.
7153 * linux-x86.c (*): Ditto.
7154 * linux-low.c (*): Ditto.
7155 (linux_wait_1): Add calls to debug_enter, debug_exit.
7156 (linux_wait): Remove redundant debugging printf.
7157 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7158 (linux_resume, unstop_all_lwps): Ditto.
7159 * mem-break.c (*): Update all debugging printfs to use
7160 debug_printf instead of fprintf.
7161 * remote-utils.c (*): Ditto.
7162 * thread-db.c (*): Ditto.
7163 * server.c #include <ctype.h>, "gdb_vecs.h".
7164 (debug_threads): Moved to debug.c.
7165 (*): Update all debugging printfs to use debug_printf instead of
7166 fprintf.
7167 (start_inferior): Replace call to fflush with call to debug_flush.
7168 (monitor_show_help): Mention set debug-format.
7169 (parse_debug_format_options): New function.
7170 (handle_monitor_command): Handle "monitor set debug-format".
7171 (gdbserver_usage): Mention --debug-format.
7172 (main): Parse --debug-format.
7173 * server.h (debug_threads): Declaration moved to debug.h.
7174 #include "debug.h".
7175 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7176 trace_debug_1 that uses debug_printf.
7177 (tracepoint_look_up_symbols): Update all debugging printfs to use
7178 debug_printf instead of fprintf.
7179
7180 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7181
7182 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7183 sys/ptrace.h.
7184
7185 2014-01-17 Pedro Alves <palves@redhat.com>
7186
7187 PR build/16445
7188 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7189 defined after including gdb_proc_service.h.
7190
7191 2014-01-16 Doug Evans <dje@google.com>
7192
7193 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7194 (match_dll): Use it.
7195
7196 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7197
7198 * target.h (target_ops) <read_btrace>: Change parameters and
7199 return type to allow error reporting.
7200 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7201 trace reading errors on.
7202 * linux-low.c (linux_low_read_btrace): Pass trace reading
7203 errors on.
7204 (linux_low_disable_btrace): New.
7205
7206 2014-01-15 Doug Evans <dje@google.com>
7207
7208 * inferiors.c (thread_id_to_gdb_id): Delete.
7209 * inferiors.h (thread_id_to_gdb_id): Delete.
7210
7211 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7212
7213 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7214 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7215 versions.
7216
7217 2014-01-08 Pedro Alves <palves@redhat.com>
7218
7219 * server.c (handle_status): Don't discard previous queued stop
7220 replies or thread's pending status here.
7221 (main) <disconnection>: Do it here instead.
7222
7223 2014-01-08 Pedro Alves <palves@redhat.com>
7224
7225 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7226 * server.c (visit_actioned_threads, handle_pending_status): New
7227 function.
7228 (handle_v_cont): Factor out parts to ...
7229 (resume): ... this new function. If in all-stop, and a thread
7230 being resumed has a pending status, report it without actually
7231 resuming.
7232 (myresume): Adjust to use the new 'resume' function.
7233 (clear_pending_status_callback, set_pending_status_callback)
7234 (find_status_pending_thread_callback): New functions.
7235 (handle_status): Handle the case of multiple threads having
7236 interesting statuses to report. Report threads' real last signal
7237 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7238 with an interesting thread to report the status for, instead of
7239 always reporting the status of the first thread.
7240
7241 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7242
7243 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7244 * gdbreplay.c (gdbreplay_version): Likewise.
7245
7246 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7247
7248 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7249 iov.iov_len with the real length in use.
7250
7251 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7252
7253 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7254 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7255 for all targets that use win32-low.c.
7256 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7257 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7258
7259 2013-12-13 Pedro Alves <palves@redhat.com>
7260
7261 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7262 if equal to TARGET_WAITKIND_LOADED.
7263 * win32-low.c (cached_status): New static global.
7264 (win32_wait): Add declaration.
7265 (do_initial_child_stuff): Flush all initial pending debug events
7266 up to the initial breakpoint.
7267 (win32_wait): If CACHED_STATUS was set, return that instead
7268 of doing a real wait. Remove the code resuming the execution
7269 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7270 during the initial phase. Also remove the code changing
7271 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7272 TARGET_WAITKIND_STOPPED.
7273
7274 2013-12-11 Yao Qi <yao@codesourcery.com>
7275
7276 * notif.c (handle_notif_ack): Return 0 if no notification
7277 matches.
7278
7279 2013-11-20 Doug Evans <dje@google.com>
7280
7281 * linux-low.c (linux_set_resume_request): Fix comment.
7282
7283 2013-11-20 Doug Evans <dje@google.com>
7284
7285 * linux-low.c (resume_status_pending_p): Tweak comment.
7286
7287 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7288
7289 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7290 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7291 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7292 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7293 (srv_amd64_regobj): Add amd64-mpx.o.
7294 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7295 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7296 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7297 * i387-fp.c (num_pl_bnd_register) Added constant.
7298 (num_pl_bnd_cfg_registers) Added constant.
7299 (struct i387_xsave) Added reserved area and MPX fields.
7300 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7301 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7302 function.
7303 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7304 (init_registers_amd64_mpx_linux): Declare new function.
7305 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7306 (x86_64_regmap): Add MPX registers.
7307 (x86_linux_read_description): Add MPX case.
7308 (initialize_low_arch): Initialize MPX targets.
7309
7310 2013-11-18 Tom Tromey <tromey@redhat.com>
7311
7312 * configure: Rebuild.
7313 * configure.ac: Don't check for stdlib.h.
7314 * gdbreplay.c: Unconditionally include stdlib.h.
7315
7316 2013-11-18 Tom Tromey <tromey@redhat.com>
7317
7318 * config.in: Rebuild.
7319 * configure: Rebuild.
7320 * configure.ac: Don't use AC_HEADER_DIRENT.
7321
7322 2013-11-18 Tom Tromey <tromey@redhat.com>
7323
7324 * server.h: Don't check HAVE_STRING_H.
7325 * gdbreplay.c: Don't check HAVE_STRING_H.
7326 * configure: Rebuild.
7327
7328 2013-11-18 Tom Tromey <tromey@redhat.com>
7329
7330 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7331 LIBGNU.
7332
7333 2013-11-08 Tom Tromey <tromey@redhat.com>
7334
7335 * configure, config.in: Rebuild.
7336 * configure.ac: Remove unused configury.
7337
7338 2013-11-08 Tom Tromey <tromey@redhat.com>
7339
7340 * acinclude.m4: Include common.m4, codeset.m4.
7341 * configure, config.in: Rebuild.
7342 * configure.ac: Use GDB_AC_COMMON.
7343
7344 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7345
7346 * linux-s390-low.c (HWCAP_S390_TE): New define.
7347 (s390_arch_setup): Consider the TE field in the HWCAP for
7348 determining 'have_regset_tdb'.
7349
7350 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7351
7352 PR gdb/16014
7353 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7354 call to sizeof.
7355
7356 2013-10-02 Pedro Alves <palves@redhat.com>
7357
7358 * server.c (process_serial_event): Don't output "GDBserver
7359 exiting" if GDB is connected through stdio.
7360 * target.c (mywait): Likewise, be silent if GDB is connected
7361 through stdio.
7362
7363 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7364
7365 * lynx-low.c (lynx_add_threads_after_attach): New function.
7366 (lynx_attach): Remove call to add_thread. Add call to
7367 lynx_add_threads_after_attach instead.
7368
7369 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7370
7371 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7372 * config.in, configure: Regenerated.
7373
7374 2013-09-18 Yao Qi <yao@codesourcery.com>
7375
7376 PR server/15959
7377 * server.c (start_inferior): Clear 'resume_info'.
7378
7379 2013-09-16 Jiong Wang <jiwang@tilera.com>
7380
7381 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7382 for each register.
7383
7384 2013-09-16 Jiong Wang <jiwang@tilera.com>
7385
7386 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7387 linux-tile-low.o to srv_tgtobj.
7388
7389 2013-09-16 Will Newton <will.newton@linaro.org>
7390
7391 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7392 out regs.
7393
7394 2013-09-06 Pedro Alves <palves@redhat.com>
7395
7396 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7397 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7398 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7399 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7400 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7401 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7402
7403 2013-09-06 Pedro Alves <palves@redhat.com>
7404
7405 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7406 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7407
7408 2013-09-06 Pedro Alves <palves@redhat.com>
7409
7410 * linux-amd64-ipa.c: Include tracepoint.h.
7411 * linux-i386-ipa.c: Include tracepoint.h.
7412
7413 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7414
7415 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7416 (ps_get_thread_area): New function.
7417
7418 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7419
7420 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7421 (initialize_low_arch): Call init_registers_crisv32 rather than
7422 init_register_crisv32.
7423
7424 2013-09-05 Pedro Alves <palves@redhat.com>
7425
7426 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7427 to ...
7428 * hostio.h: ... this new file.
7429 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7430 win32-low.c: Include hostio.h.
7431
7432 2013-09-05 Pedro Alves <palves@redhat.com>
7433
7434 * server.h (gdb_client_data, handler_func, callback_handler_func)
7435 (delete_file_handler, add_file_handler, append_callback_event)
7436 (delete_callback_event, start_event_loop, initialize_event_loop):
7437 Move to event-loop.h and include it.
7438 * event-loop.h: New file.
7439
7440 2013-09-05 Pedro Alves <palves@redhat.com>
7441
7442 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7443 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7444 (loaded_dll, unloaded_dll): Move to ...
7445 * dll.h: ... this new file.
7446 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7447
7448 2013-09-05 Pedro Alves <palves@redhat.com>
7449
7450 * server.h (current_process, get_thread_process, all_processes)
7451 (add_inferior_to_list, for_each_inferior, current_inferior)
7452 (remove_inferior, add_process, remove_process, find_process_pid)
7453 (have_started_inferiors_p, have_attached_inferiors_p)
7454 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7455 (clear_inferiors, find_inferior, find_inferior_id)
7456 (inferior_target_data, set_inferior_target_data)
7457 (inferior_regcache_data, set_inferior_regcache_data): Move to
7458 inferiors.h, and include it.
7459 * inferiors.h: New file.
7460
7461 2013-09-05 Pedro Alves <palves@redhat.com>
7462
7463 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7464 Move ...
7465 * ax.h: ... here.
7466
7467 2013-09-05 Pedro Alves <palves@redhat.com>
7468
7469 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7470 tracepoint.h.
7471 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7472 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7473 (handle_tracepoint_general_set, handle_tracepoint_query)
7474 (tracepoint_finished_step, tracepoint_was_hit)
7475 (release_while_stepping_state_list, current_traceframe)
7476 (in_readonly_region, traceframe_read_mem)
7477 (fetch_traceframe_registers, traceframe_read_sdata)
7478 (traceframe_read_info, struct fast_tpoint_collect_status)
7479 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7480 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7481 (supply_fast_tracepoint_registers)
7482 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7483 (ipa_tdesc, claim_trampoline_space)
7484 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7485 (agent_mem_read, agent_get_trace_state_variable_value)
7486 (agent_set_trace_state_variable_value, agent_tsv_read)
7487 (agent_mem_read_string, get_raw_reg_func_addr)
7488 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7489 * tracepoint.h: ... this new file.
7490
7491 2013-09-05 Pedro Alves <palves@redhat.com>
7492
7493 * server.h (perror_with_name, error, fatal, warning, paddress)
7494 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7495 include it.
7496 * utils.h: New file.
7497
7498 2013-09-05 Pedro Alves <palves@redhat.com>
7499
7500 * server.h (remote_debug, noack_mode, transport_is_reliable)
7501 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7502 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7503 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7504 (write_enn, initialize_async_io, enable_async_io)
7505 (disable_async_io, check_remote_input_interrupt_request)
7506 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7507 (dead_thread_notify, prepare_resume_reply)
7508 (decode_address_to_semicolon, decode_address, decode_m_packet)
7509 (decode_M_packet, decode_X_packet, decode_xfer_write)
7510 (decode_search_memory_packet, unhexify, hexify)
7511 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7512 (look_up_one_symbol, relocate_instruction)
7513 (monitor_output): Move to remote-utils.h, and include it.
7514 * remote-utils.h: New file.
7515
7516 2013-09-05 Pedro Alves <palves@redhat.com>
7517
7518 * server.h (_): Delete.
7519
7520 2013-09-02 Pedro Alves <palves@redhat.com>
7521
7522 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7523 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7524 allocated.
7525 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7526
7527 2013-09-02 Pierre Muller <muller@sourceware.org>
7528
7529 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7530 or WriteProcessMemory complete successfully and handle
7531 ERROR_PARTIAL_COPY error.
7532
7533 2013-09-02 Pedro Alves <palves@redhat.com>
7534
7535 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7536 error instead of EIO.
7537
7538 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7539
7540 PR server/15604
7541 * linux-low.c: Include filestuff.h.
7542 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7543 * lynx-low.c: Include filestuff.h.
7544 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7545 * server.c: Include filestuff.h.
7546 (main): Call notice_open_fds.
7547 * spu-low.c: Include filestuff.h.
7548 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7549
7550 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7551
7552 * Makefile.in: Explain why ../target and ../nat are not
7553 listed as include file search paths.
7554 (linux-waitpid.o): New object file rule.
7555 * configure.srv (srv_native_linux_obj): New variable.
7556 Replace all occurrences of linux native object files with
7557 $srv_native_linux_obj.
7558 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7559 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7560 (linux_enable_event_reporting): Remove declaration.
7561 (my_waitpid): Moved to common/linux-waitpid.c.
7562 (linux_wait_for_event): Pass ptid when calling
7563 linux_enable_event_reporting.
7564 (linux_supports_tracefork_flag): Remove.
7565 (linux_enable_event_reporting): Likewise.
7566 (linux_tracefork_grandchild): Remove.
7567 (STACK_SIZE): Moved to common/linux-ptrace.c.
7568 (linux_tracefork_child): Remove.
7569 (linux_test_for_tracefork): Remove.
7570 (linux_look_up_symbols): Call linux_supports_traceclone.
7571 (initialize_low): Remove call to linux_test_for_tracefork.
7572 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7573 common/linux-ptrace.h.
7574 (PTRACE_TYPE_ARG4): Likewise.
7575 Include linux-ptrace.h.
7576
7577 2013-08-21 Pedro Alves <palves@redhat.com>
7578
7579 * config.in: Renegerate.
7580
7581 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7582
7583 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7584 (SFILES): Remove $(srcdir)/common/target-common.c and
7585 add $(srcdir)/target/waitstatus.c.
7586 (OBS): Remove target-common.o and add waitstatus.o.
7587 (server_h): Remove $(srcdir)/../common/target-common.h and
7588 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7589 and $(srcdir)/../target/waitstatus.h.
7590 (target-common.o): Remove.
7591 (waitstatus.o): New target object file.
7592 * target.h: Do not include target-common.h and
7593 include target/resume.h, target/wait.h and
7594 target/waitstatus.h.
7595
7596 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7597
7598 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7599 to PTRACE_TYPE_ARG3.
7600 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7601 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7602 PTRACE_TYPE_ARG4.
7603 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7604 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7605
7606 2013-07-27 Jie Zhang <jie@codesourcery.com>
7607 Daniel Jacobowitz <dan@codesourcery.com>
7608 Yao Qi <yao@codesourcery.com>
7609
7610 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7611 (mips-linux-watch.o): New rule.
7612 (mips_linux_watch_h): New variable.
7613 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7614 srv_tgtobj.
7615 * linux-mips-low.c: Include mips-linux-watch.h.
7616 (struct arch_process_info, struct arch_lwp_info): New.
7617 (update_watch_registers_callback): New function.
7618 (mips_linux_new_process, mips_linux_new_thread) New functions.
7619 (mips_linux_prepare_to_resume, mips_insert_point): New
7620 functions.
7621 (mips_remove_point, mips_stopped_by_watchpoint): New
7622 functions.
7623 (rsp_bp_type_to_target_hw_bp_type): New function.
7624 (mips_stopped_data_address): New function.
7625 (the_low_target): Add watchpoint support functions.
7626
7627 2013-07-27 Yao Qi <yao@codesourcery.com>
7628
7629 * i386-low.c: Include break-common.h.
7630 (enum target_hw_bp_type): Remove.
7631
7632 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7633
7634 * Makefile.in (SFILES): /common/target-common.c.
7635 (OBS): Add target-common.o.
7636 (server_h): Add $(srcdir)/../common/target-common.h.
7637 (target-common.o): New target.
7638 * server.c (queue_stop_reply_callback): Free
7639 status string after use.
7640 * target.c (target_waitstatus_to_string): Remove.
7641 * target.h: Include target-common.h.
7642 (resume_kind): Likewise.
7643 (target_waitkind): Likewise.
7644 (target_waitstatus): Likewise.
7645 (TARGET_WNOHANG): Likewise.
7646
7647 2013-07-04 Yao Qi <yao@codesourcery.com>
7648
7649 * Makefile.in (host_alias): Use @host_noncanonical@.
7650 (target_alias): Use @target_noncanonical@.
7651 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7652 ACX_NONCANONICAL_HOST.
7653 * configure: Regenerated.
7654
7655 Revert:
7656 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7657
7658 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7659 * configure: Rebuild.
7660 * Makefile.in (version_host, version_target): Get from configure.
7661 (version.c): Use $(version_host) and $(version_target).
7662
7663 2013-07-03 Pedro Alves <palves@redhat.com>
7664
7665 * Makefile.in (config.status): Depend on development.sh.
7666 * acinclude.m4: Include libmcheck.m4.
7667 * configure: Regenerate.
7668
7669 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7670
7671 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7672 attribute inside the parentheses.
7673 (winapi_DebugSetProcessKillOnExit): Ditto.
7674 (winapi_DebugBreakProcess): Ditto.
7675 (winapi_GenerateConsoleCtrlEvent): Ditto.
7676
7677 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7678
7679 * notif.h (notif_event): Add a dummy member to avoid compiler
7680 errors.
7681
7682 2013-07-01 Pedro Alves <palves@redhat.com>
7683
7684 * hostio.c (HOSTIO_PATH_MAX): Define.
7685 (require_filename, handle_open, handle_unlink, handle_readlink):
7686 Use it.
7687
7688 2013-07-01 Pedro Alves <palves@redhat.com>
7689
7690 * server.h: Include "pathmax.h".
7691 * linux-low.c: Don't include sys/param.h.
7692 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7693 MAXPATHLEN.
7694 * win32-low.c: Don't include sys/param.h.
7695 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7696
7697 2013-07-01 Pedro Alves <palves@redhat.com>
7698
7699 * event-loop.c: Don't check HAVE_UNISTD_H before including
7700 <unistd.h>.
7701 * gdbreplay.c: Likewise.
7702 * remote-utils.c: Likewise.
7703 * server.c: Likewise.
7704 * configure.ac: Don't check for unistd.h.
7705 * configure: Regenerate.
7706
7707 2013-06-28 Tom Tromey <tromey@redhat.com>
7708
7709 * Makefile.in (version.c): Use version.in, not
7710 common/version.in.
7711
7712 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7713
7714 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7715 * configure: Rebuild.
7716 * Makefile.in (version_host, version_target): Get from configure.
7717 (version.c): Use $(version_host) and $(version_target).
7718
7719 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7720
7721 Fix trace-status to output user name without trailing colon.
7722 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7723
7724 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7725
7726 Fix trace-status to output proper start-time and stop-time.
7727 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7728 output start time and stop time in hex as gdb expects.
7729
7730 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7731
7732 * tracepoint.c (build_traceframe_info_xml): Output trace state
7733 variables present in the trace buffer.
7734
7735 2013-06-24 Tom Tromey <tromey@redhat.com>
7736
7737 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7738 create-version.sh.
7739 (version.o): Remove.
7740 * gdbreplay.c: Include version.h.
7741 (version, host_name): Don't declare.
7742 * server.h: Include version.h.
7743 (version, host_name): Don't declare.
7744
7745 2013-06-12 Pedro Alves <palves@redhat.com>
7746
7747 * linux-x86-low.c (linux_is_elf64): Delete global.
7748 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7749 with local linux_pid_exe_is_elf_64_file use.
7750
7751 2013-06-11 Pedro Alves <palves@redhat.com>
7752
7753 * linux-low.c (regset_disabled, disable_regset): New functions.
7754 (regsets_fetch_inferior_registers)
7755 (regsets_store_inferior_registers): Use them.
7756 (initialize_regsets_info); Don't allocate the disabled_regsets
7757 array here.
7758 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7759 comment.
7760
7761 2013-06-11 Pedro Alves <palves@redhat.com>
7762
7763 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7764 xmalloc.
7765
7766 2013-06-11 Pedro Alves <palves@redhat.com>
7767
7768 * linux-x86-low.c (initialize_low_arch): Call
7769 init_registers_x32_avx_linux.
7770
7771 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7772
7773 Fix compatibility with Android Bionic.
7774 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7775 it is not empty.
7776
7777 2013-06-07 Pedro Alves <palves@redhat.com>
7778
7779 PR server/14823
7780 * Makefile.in (OBS): Add tdesc.o.
7781 (IPA_OBJS): Add tdesc-ipa.o.
7782 (tdesc-ipa.o): New rule.
7783 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7784 interface.
7785 * linux-low.c (new_inferior): Delete.
7786 (disabled_regsets, num_regsets): Delete.
7787 (linux_add_process): Adjust to set the new per-process
7788 new_inferior flag.
7789 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7790 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7791 was a stop. When calling arch_setup, switch the current inferior
7792 to the thread that got an event.
7793 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7794 (regsets_fetch_inferior_registers)
7795 (regsets_store_inferior_registers): New regsets_info parameter.
7796 Adjust to use it.
7797 (linux_register_in_regsets): New regs_info parameter. Adjust to
7798 use it.
7799 (register_addr, fetch_register, store_register): New usrregs_info
7800 parameter. Adjust to use it.
7801 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7802 parameter regs_info. Adjust to use it.
7803 (linux_fetch_registers): Get the current inferior's regs_info, and
7804 adjust to use it.
7805 (linux_store_registers): Ditto.
7806 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7807 (initialize_low): Don't initialize the target_regsets here. Call
7808 initialize_low_arch.
7809 * linux-low.h (target_regsets): Delete declaration.
7810 (struct regsets_info): New.
7811 (struct usrregs_info): New.
7812 (struct regs_info): New.
7813 (struct process_info_private) <new_inferior>: New field.
7814 (struct linux_target_ops): Delete the num_regs, regmap, and
7815 regset_bitmap fields. New field regs_info.
7816 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7817 * i387-fp.c (num_xmm_registers): Delete.
7818 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7819 calls to new interface.
7820 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7821 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7822 Infer the number of xmm registers from the regcache's target
7823 description.
7824 * i387-fp.h (num_xmm_registers): Delete.
7825 * inferiors.c (add_thread): Don't install the thread's regcache
7826 here.
7827 * proc-service.c (gregset_info): Fetch the current inferior's
7828 regs_info. Adjust to use it.
7829 * regcache.c: Include tdesc.h.
7830 (register_bytes, reg_defs, num_registers)
7831 (gdbserver_expedite_regs): Delete.
7832 (get_thread_regcache): If the thread doesn't have a regcache yet,
7833 create one, instead of aborting gdbserver.
7834 (regcache_invalidate_one): Rename to ...
7835 (regcache_invalidate_thread): ... this.
7836 (regcache_invalidate_one): New.
7837 (regcache_invalidate): Only invalidate registers of the current
7838 process.
7839 (init_register_cache): Add target_desc parameter, and use it.
7840 (new_register_cache): Ditto. Assert the target description has a
7841 non zero registers_size.
7842 (regcache_cpy): Add assertions. Adjust.
7843 (realloc_register_cache, set_register_cache): Delete.
7844 (registers_to_string, registers_from_string): Adjust.
7845 (find_register_by_name, find_regno, find_register_by_number)
7846 (register_cache_size): Add target_desc parameter, and use it.
7847 (free_register_cache_thread, free_register_cache_thread_one)
7848 (regcache_release, register_cache_size): New.
7849 (register_size): Add target_desc parameter, and use it.
7850 (register_data, supply_register, supply_register_zeroed)
7851 (supply_regblock, supply_register_by_name, collect_register)
7852 (collect_register_as_string, collect_register_by_name): Adjust.
7853 * regcache.h (struct target_desc): Forward declare.
7854 (struct regcache) <tdesc>: New field.
7855 (init_register_cache, new_register_cache): Add target_desc
7856 parameter.
7857 (regcache_invalidate_thread): Declare.
7858 (regcache_invalidate_one): Delete declaration.
7859 (regcache_release): Declare.
7860 (find_register_by_number, register_cache_size, register_size)
7861 (find_regno): Add target_desc parameter.
7862 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7863 declarations.
7864 * remote-utils.c: Include tdesc.h.
7865 (outreg, prepare_resume_reply): Adjust.
7866 * server.c: Include tdesc.h.
7867 (gdbserver_xmltarget): Delete declaration.
7868 (get_features_xml, process_serial_event): Adjust.
7869 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7870 declare.
7871 (struct process_info) <tdesc>: New field.
7872 (ipa_tdesc): Declare.
7873 * tdesc.c: New file.
7874 * tdesc.h: New file.
7875 * tracepoint.c: Include tdesc.h.
7876 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7877 (get_context_regcache): Adjust to pass ipa_tdesc down.
7878 (do_action_at_tracepoint): Adjust to get the register cache size
7879 from the context regcache's description.
7880 (traceframe_walk_blocks): Adjust to get the register cache size
7881 from the current trace frame's description.
7882 (traceframe_get_pc): Adjust to get current trace frame's
7883 description and pass it down.
7884 (gdb_collect): Adjust to get the register cache size from the
7885 IPA's description.
7886 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7887 (gdbserver_xmltarget): Delete.
7888 (initialize_low_tracepoint): Set the ipa's target description.
7889 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7890 (initialize_low_tracepoint): Set the ipa's target description.
7891 * linux-x86-low.c: Include tdesc.h.
7892 [__x86_64__] (is_64bit_tdesc): New.
7893 (ps_get_thread_area, x86_get_thread_area): Use it.
7894 (i386_cannot_store_register): Rename to ...
7895 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7896 (i386_cannot_fetch_register): Rename to ...
7897 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7898 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7899 to new interface.
7900 (target_regsets): Rename to ...
7901 (x86_regsets): ... this.
7902 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7903 interface.
7904 (x86_siginfo_fixup): Use is_64bit_tdesc.
7905 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7906 (tdesc_x32_avx_linux, tdesc_x32_linux)
7907 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7908 Declare.
7909 (x86_linux_update_xmltarget): Delete.
7910 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7911 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7912 (AMD64_LINUX_USER64_CS): New.
7913 (x86_linux_read_description): New, based on
7914 x86_linux_update_xmltarget.
7915 (same_process_callback): New.
7916 (x86_arch_setup_process_callback): New.
7917 (x86_linux_update_xmltarget): New.
7918 (x86_regsets_info): New.
7919 (amd64_linux_regs_info): New.
7920 (i386_linux_usrregs_info): New.
7921 (i386_linux_regs_info): New.
7922 (x86_linux_regs_info): New.
7923 (x86_arch_setup): Reimplement.
7924 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7925 (x86_emit_ops): Ditto.
7926 (the_low_target): Adjust. Install x86_linux_regs_info,
7927 x86_cannot_fetch_register, and x86_cannot_store_register.
7928 (initialize_low_arch): New.
7929 * linux-ia64-low.c (tdesc_ia64): Declare.
7930 (ia64_fetch_register): Adjust.
7931 (ia64_usrregs_info, regs_info): New globals.
7932 (ia64_regs_info): New function.
7933 (the_low_target): Adjust.
7934 (initialize_low_arch): New function.
7935 * linux-sparc-low.c (tdesc_sparc64): Declare.
7936 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7937 Adjust.
7938 (sparc_arch_setup): New function.
7939 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7940 (the_low_target): Adjust.
7941 (initialize_low_arch): New function.
7942 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7943 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7944 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7945 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7946 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7947 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7948 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7949 (tdesc_powerpc_isa205_vsx64l): Declare.
7950 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7951 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7952 (ppc_set_pc, ppc_get_hwcap): Adjust.
7953 (ppc_usrregs_info): Forward declare.
7954 (!__powerpc64__) ppc_regmap_adjusted: New global.
7955 (ppc_arch_setup): Adjust to the current process'es target
7956 description.
7957 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7958 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7959 (ppc_store_evrregset): Adjust.
7960 (target_regsets): Rename to ...
7961 (ppc_regsets): ... this, and make static.
7962 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7963 (ppc_regs_info): New function.
7964 (the_low_target): Adjust.
7965 (initialize_low_arch): New function.
7966 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7967 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7968 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7969 (tdesc_s390x_linux64v2): Declare.
7970 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7971 (s390_fill_gregset, s390_store_last_break): Adjust.
7972 (target_regsets): Rename to ...
7973 (s390_regsets): ... this, and make static.
7974 (s390_get_pc, s390_set_pc): Adjust.
7975 (s390_get_hwcap): New target_desc parameter, and use it.
7976 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7977 (s390_arch_setup): Adjust to set the current process'es target
7978 description. Don't adjust the regmap.
7979 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7980 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7981 (regs_info_3264): New globals.
7982 (s390_regs_info): New function.
7983 (the_low_target): Adjust.
7984 (initialize_low_arch): New function.
7985 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7986 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7987 [__mips64] (init_registers_mips_linux)
7988 (init_registers_mips_dsp_linux): Delete defines.
7989 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7990 (have_dsp): New global.
7991 (mips_read_description): New, based on mips_arch_setup.
7992 (mips_arch_setup): Reimplement.
7993 (get_usrregs_info): New function.
7994 (mips_cannot_fetch_register, mips_cannot_store_register)
7995 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7996 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7997 (target_regsets): Rename to ...
7998 (mips_regsets): ... this, and make static.
7999 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8000 (dsp_regs_info, regs_info): New globals.
8001 (mips_regs_info): New function.
8002 (the_low_target): Adjust.
8003 (initialize_low_arch): New function.
8004 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8005 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8006 Declare.
8007 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8008 (arm_read_description): New, with bits factored from
8009 arm_arch_setup.
8010 (arm_arch_setup): Reimplement.
8011 (target_regsets): Rename to ...
8012 (arm_regsets): ... this, and make static.
8013 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8014 (arm_regs_info): New function.
8015 (the_low_target): Adjust.
8016 (initialize_low_arch): New function.
8017 * linux-m68k-low.c (tdesc_m68k): Declare.
8018 (target_regsets): Rename to ...
8019 (m68k_regsets): ... this, and make static.
8020 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8021 (m68k_regs_info): New function.
8022 (m68k_arch_setup): New function.
8023 (the_low_target): Adjust.
8024 (initialize_low_arch): New function.
8025 * linux-sh-low.c (tdesc_sharch): Declare.
8026 (target_regsets): Rename to ...
8027 (sh_regsets): ... this, and make static.
8028 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8029 (sh_regs_info, sh_arch_setup): New functions.
8030 (the_low_target): Adjust.
8031 (initialize_low_arch): New function.
8032 * linux-bfin-low.c (tdesc_bfin): Declare.
8033 (bfin_arch_setup): New function.
8034 (bfin_usrregs_info, regs_info): New globals.
8035 (bfin_regs_info): New function.
8036 (the_low_target): Adjust.
8037 (initialize_low_arch): New function.
8038 * linux-cris-low.c (tdesc_cris): Declare.
8039 (cris_arch_setup): New function.
8040 (cris_usrregs_info, regs_info): New globals.
8041 (cris_regs_info): New function.
8042 (the_low_target): Adjust.
8043 (initialize_low_arch): New function.
8044 * linux-cris-low.c (tdesc_crisv32): Declare.
8045 (cris_arch_setup): New function.
8046 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8047 (cris_regs_info): New function.
8048 (the_low_target): Adjust.
8049 (initialize_low_arch): New function.
8050 * linux-m32r-low.c (tdesc_m32r): Declare.
8051 (m32r_arch_setup): New function.
8052 (m32r_usrregs_info, regs_info): New globals.
8053 (m32r_regs_info): Adjust.
8054 (initialize_low_arch): New function.
8055 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8056 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8057 (tic6x_usrregs_info): Forward declare.
8058 (tic6x_read_description): New function, based on ...
8059 (tic6x_arch_setup): ... this. Reimplement.
8060 (target_regsets): Rename to ...
8061 (tic6x_regsets): ... this, and make static.
8062 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8063 (tic6x_regs_info): New function.
8064 (the_low_target): Adjust.
8065 (initialize_low_arch): New function.
8066 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8067 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8068 (target_regsets): Rename to ...
8069 (xtensa_regsets): ... this, and make static.
8070 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8071 globals.
8072 (xtensa_arch_setup, xtensa_regs_info): New functions.
8073 (the_low_target): Adjust.
8074 (initialize_low_arch): New function.
8075 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8076 (nios2_arch_setup): Set the current process'es tdesc.
8077 (target_regsets): Rename to ...
8078 (nios2_regsets): ... this.
8079 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8080 (nios2_regs_info): New function.
8081 (the_low_target): Adjust.
8082 (initialize_low_arch): New function.
8083 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8084 (aarch64_arch_setup): Set the current process'es tdesc.
8085 (target_regsets): Rename to ...
8086 (aarch64_regsets): ... this.
8087 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8088 (aarch64_regs_info): New function.
8089 (the_low_target): Adjust.
8090 (initialize_low_arch): New function.
8091 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8092 globals.
8093 (target_regsets): Rename to ...
8094 (tile_regsets): ... this.
8095 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8096 (tile_regs_info): New function.
8097 (tile_arch_setup): Set the current process'es tdesc.
8098 (the_low_target): Adjust.
8099 (initialize_low_arch): New function.
8100 * spu-low.c (tdesc_spu): Declare.
8101 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8102 * win32-arm-low.c (tdesc_arm): Declare.
8103 (arm_arch_setup): New function.
8104 (the_low_target): Install arm_arch_setup instead of
8105 init_registers_arm.
8106 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8107 (init_windows_x86): Rename to ...
8108 (i386_arch_setup): ... this. Set `win32_tdesc'.
8109 (the_low_target): Adjust.
8110 * win32-low.c (win32_tdesc): New global.
8111 (child_add_thread): Don't create the thread cache here.
8112 (do_initial_child_stuff): Set the new process'es tdesc.
8113 * win32-low.h (struct target_desc): Forward declare.
8114 (win32_tdesc): Declare.
8115 * lynx-i386-low.c (tdesc_i386): Declare global.
8116 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8117 * lynx-low.c (lynx_tdesc): New global.
8118 (lynx_add_process): Set the new process'es tdesc.
8119 * lynx-low.h (struct target_desc): Forward declare.
8120 (lynx_tdesc): Declare global.
8121 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8122 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8123 * nto-low.c (nto_tdesc): New global.
8124 (do_attach): Set the new process'es tdesc.
8125 * nto-low.h (struct target_desc): Forward declare.
8126 (nto_tdesc): Declare.
8127 * nto-x86-low.c (tdesc_i386): Declare.
8128 (nto_x86_arch_setup): Set `nto_tdesc'.
8129
8130 2013-06-04 Gary Benson <gbenson@redhat.com>
8131
8132 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8133 to qSupported response when appropriate.
8134 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8135 with nonzero-length annex.
8136 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8137 arguments supplied in annex.
8138
8139 2013-05-31 Doug Evans <dje@google.com>
8140
8141 PR server/15594
8142 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8143 64 bits in 64-cross-32 environment.
8144
8145 2013-05-28 Pedro Alves <palves@redhat.com>
8146
8147 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8148 (aarch64-without-fpu.c): Delete rule.
8149 * configure.srv (aarch64*-*-linux*): Remove references to
8150 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8151 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8152 declaration.
8153
8154 2013-05-24 Pedro Alves <palves@redhat.com>
8155
8156 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8157 instead of strchr/decode_address. Error if the range isn't split
8158 with a ','. Don't assume there's be a ':' in the action.
8159
8160 2013-05-23 Yao Qi <yao@codesourcery.com>
8161 Pedro Alves <palves@redhat.com>
8162
8163 * linux-low.c (lwp_in_step_range): New function.
8164 (linux_wait_1): If the thread was range stepping and stopped
8165 outside the stepping range, report the stop to GDB. Otherwise,
8166 continue stepping. Add range stepping debug output.
8167 (linux_set_resume_request): Copy the step range from the resume
8168 request to the lwp.
8169 (linux_supports_range_stepping): New.
8170 (linux_target_ops) <supports_range_stepping>: Set to
8171 linux_supports_range_stepping.
8172 * linux-low.h (struct linux_target_ops)
8173 <supports_range_stepping>: New field.
8174 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8175 * linux-x86-low.c (x86_supports_range_stepping): New.
8176 (the_low_target) <supports_range_stepping>: Set to
8177 x86_supports_range_stepping.
8178 * server.c (handle_v_cont): Handle 'r' action.
8179 (handle_v_requests): Append ";r" if the target supports range
8180 stepping.
8181 * target.h (struct thread_resume) <step_range_start,
8182 step_range_end>: New fields.
8183 (struct target_ops) <supports_range_stepping>:
8184 New field.
8185 (target_supports_range_stepping): New macro.
8186
8187 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8188
8189 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8190 confusion in comment.
8191
8192 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8193
8194 * lynx-low.c (struct process_info_private): New type.
8195 (lynx_add_process): New function.
8196 (lynx_create_inferior, lynx_attach): Replace calls to
8197 add_process by calls to lynx_add_process.
8198 (lynx_resume): If PTID is null, then try using
8199 current_process()->private->last_wait_event_ptid.
8200 Add comments.
8201 (lynx_clear_inferiors): Delete. The contents of that function
8202 has been inlined in lynx_mourn;
8203 (lynx_wait_1): Save the ptid in the process's private data.
8204 (lynx_mourn): Free the process' private data. Replace call
8205 to lynx_clear_inferiors by call to clear_inferiors.
8206
8207 2013-05-17 Yao Qi <yao@codesourcery.com>
8208
8209 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8210 the right place.
8211
8212 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8213
8214 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8215 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8216 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8217 PT_TEXT_END_ADDR guards. Update comments.
8218 (linux_target_op) <read_offsets>: Conditionally define to
8219 linux_read_offsets if the target is UCLIBC and if it defines
8220 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8221
8222 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8223 Andrew Jenner <andrew@codesourcery.com>
8224
8225 * Makefile.in (SFILES): Add linux-nios2-low.c.
8226 (clean): Add action to delete nios2-linux.c.
8227 (nios2-linux.c): New rule.
8228 * configure.srv: Add nios2*-*-linux*.
8229 * linux-nios2-low.c: New.
8230
8231 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8232
8233 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8234
8235 2013-04-25 Hui Zhu <hui@codesourcery.com>
8236
8237 PR gdb/15186
8238 * ax.c (ax_printf): Add fflush.
8239
8240 2013-04-22 Tom Tromey <tromey@redhat.com>
8241
8242 * Makefile.in (SFILES): Add filestuff.c.
8243 (OBS): Add filestuff.o.
8244 (filestuff.o): New target.
8245 * config.in, configure: Rebuild.
8246 * configure.ac: Check for fdwalk, pipe2.
8247
8248 2013-04-17 Pedro Alves <palves@redhat.com>
8249
8250 * configure.ac (USE_THREAD_DB): Delete variable.
8251 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8252 Don't AC_SUBST USE_THREAD_DB.
8253 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8254 * config.in, configure: Regenerate.
8255
8256 2013-04-16 Pedro Alves <palves@redhat.com>
8257
8258 * linux-low.h (struct lwp_info) <thread_known>: Move under
8259 the USE_THREAD_DB #ifdef.
8260
8261 2013-04-16 Pedro Alves <palves@redhat.com>
8262
8263 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8264 (linux-low.o): Delete rule.
8265 * linux-low.h: Always include "gdb_thread_db.h" instead of
8266 conditionally including thread_db.h.
8267 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8268 HAVE_THREAD_DB_H.
8269
8270 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8271
8272 * Makefile.in (install-only): Fix make install regression.
8273
8274 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8275
8276 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8277 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8278 installation.
8279 * gdbserver.1: Remove.
8280
8281 2013-03-22 Pedro Alves <palves@redhat.com>
8282
8283 * linux-low.c (handle_extended_wait): Don't call
8284 linux_enable_event_reporting.
8285
8286 2013-03-15 Tony Theodore <tonyt@logyst.com>
8287
8288 PR build/9098:
8289 * Makefile.in (SHELL): Use @SHELL@.
8290
8291 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8292
8293 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8294 compiler warning.
8295
8296 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8297
8298 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8299 Remove extraneous NULL element.
8300
8301 2013-03-13 Yao Qi <yao@codesourcery.com>
8302
8303 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8304 'V' block in trace frame.
8305
8306 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8307
8308 * target.h (struct target_ops): Add btrace ops.
8309 (target_supports_btrace): New macro.
8310 (target_enable_btrace): New macro.
8311 (target_disable_btrace): New macro.
8312 (target_read_btrace): New macro.
8313 * gdbthread.h (struct thread_info): Add btrace field.
8314 * server.c: Include btrace-common.h.
8315 (handle_btrace_general_set): New function.
8316 (handle_btrace_enable): New function.
8317 (handle_btrace_disable): New function.
8318 (handle_general_set): Call handle_btrace_general_set.
8319 (handle_qxfer_btrace): New function.
8320 (struct qxfer qxfer_packets[]): Add btrace entry.
8321 * inferiors.c (remove_thread): Disable btrace.
8322 * linux-low: Include linux-btrace.h.
8323 (linux_low_enable_btrace): New function.
8324 (linux_low_read_btrace): New function.
8325 (linux_target_ops): Add btrace ops.
8326 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8327 Add srv_linux_btrace=yes.
8328 (x86_64-*-linux*): Add linux-btrace.o.
8329 Add srv_linux_btrace=yes.
8330 * configure.ac: Define HAVE_LINUX_BTRACE.
8331 * config.in: Regenerated.
8332 * configure: Regenerated.
8333
8334 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8335
8336 * server.c (handle_qxfer): Preserve error message if -3 is
8337 returned.
8338 (qxfer): Document the -3 return value.
8339
8340 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8341
8342 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8343 (linux_btrace_h): New variable.
8344 (linux-btrace.o): New rule.
8345
8346 2013-03-08 Stan Shebs <stan@codesourcery.com>
8347 Hafiz Abid Qadeer <abidh@codesourcery.com>
8348
8349 * tracepoint.c (trace_buffer_size): New global.
8350 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8351 (init_trace_buffer): Change to one-argument function. Allocate
8352 trace buffer memory.
8353 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8354 handle QTBuffer:size packet.
8355 (cmd_bigqtbuffer_size): New function.
8356 (initialize_tracepoint): Call init_trace_buffer with
8357 DEFAULT_TRACE_BUFFER_SIZE.
8358 * server.c (handle_query): Add QTBuffer:size in the
8359 supported packets.
8360
8361 2013-03-07 Yao Qi <yao@codesourcery.com>
8362
8363 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8364 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8365 of -1.
8366 (cmd_qtsp): Adjust condition. Do post increment.
8367 Set cur_action and cur_step_action back to 0.
8368
8369 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8370
8371 PR server/15236
8372 * linux-low.c (linux_write_memory): Return early success if LEN is
8373 zero.
8374
8375 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8376
8377 * configure.srv: Add x86_64-*-cygwin* as target.
8378
8379 2013-02-28 Tom Tromey <tromey@redhat.com>
8380
8381 * configure.ac: Invoke AC_SYS_LARGEFILE.
8382 * configure, config.in: Rebuild.
8383
8384 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8385
8386 * win32-low.c: Throughout, fix format strings and casts of
8387 printf-like functions to avoid type related warnings on all
8388 platforms.
8389 (get_child_debug_event): Print dwDebugEventCode as hex since
8390 that's how it's usually documented.
8391
8392 2013-02-28 Yao Qi <yao@codesourcery.com>
8393
8394 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8395 pulongest.
8396
8397 2013-02-27 Jiong Wang <jiwang@tilera.com>
8398
8399 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8400 (reg-tilegx32.c): New rule.
8401 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8402 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8403 different register info initializer according to elf class.
8404 (init_registers_tilgx32): New function. The tilegx32 register info
8405 initializer.
8406 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8407 (tile_store_gregset): Likewise.
8408
8409 2013-02-27 Yao Qi <yao@codesourcery.com>
8410
8411 * server.c (process_point_options): Print debug message when
8412 debug_threads is true.
8413
8414 2013-02-26 Yao Qi <yao@codesourcery.com>
8415
8416 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8417
8418 2013-02-19 Pedro Alves <palves@redhat.com>
8419 Kai Tietz <ktietz@redhat.com>
8420
8421 PR gdb/15161
8422
8423 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8424 instead of strtoul to extract address from packet.
8425 (process_serial_event) <'z'>: Likewise.
8426
8427 2013-02-18 Yao Qi <yao@codesourcery.com>
8428
8429 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8430
8431 2013-02-14 Pedro Alves <palves@redhat.com>
8432
8433 Plug memory leak.
8434
8435 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8436 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8437
8438 2013-02-14 Pedro Alves <palves@redhat.com>
8439
8440 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8441
8442 2013-02-14 Pedro Alves <palves@redhat.com>
8443
8444 * tracepoint.c (save_string): Delete.
8445 (add_tracepoint_action): Use savestring instead of save_string.
8446
8447 2013-02-12 Pedro Alves <palves@redhat.com>
8448
8449 * linux-xtensa-low.c: Ditto.
8450 * xtensa-xtregs.c: Ditto.
8451
8452 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8453
8454 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8455 thread_db.
8456
8457 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8458
8459 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8460 aarch64_num_wp_regs and aarch64_num_bp_regs to
8461 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8462
8463 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8464
8465 * linux-aarch64-low.c (ps_get_thread_area): Replace
8466 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8467
8468 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8469 Marcus Shawcroft <marcus.shawcroft@arm.com>
8470 Nigel Stephens <nigel.stephens@arm.com>
8471 Yufeng Zhang <yufeng.zhang@arm.com>
8472
8473 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8474 (aarch64.c, aarch64-without-fpu.c): New targets.
8475 * configure.srv (aarch64*-*-linux*): New.
8476 * linux-aarch64-low.c: New file.
8477
8478 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8479
8480 * linux-low.c (handle_extended_wait, linux_create_inferior)
8481 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8482 (dequeue_one_deferred_signal, linux_resume_one_thread)
8483 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8484 (linux_tracefork_grandchild, linux_test_for_tracefork)
8485 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8486 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8487 where the argument is 0.
8488
8489 2013-01-25 Yao Qi <yao@codesourcery.com>
8490
8491 * event-loop.c: Include "queue.h".
8492 (gdb_event_p): New typedef.
8493 (struct gdb_event) <next_event>: Remove.
8494 (event_queue): Change to QUEUE(gdb_event_p).
8495 (async_queue_event): Remove.
8496 (gdb_event_xfree): New.
8497 (initialize_event_loop): New.
8498 (process_event): Use API from QUEUE.
8499 (wait_for_event): Likewise.
8500 * server.c (main): Call initialize_event_loop.
8501 * server.h (initialize_event_loop): Declare.
8502
8503 2013-01-18 Yao Qi <yao@codesourcery.com>
8504
8505 * ax.h (struct eval_agent_expr_context): New.
8506 (gdb_eval_agent_expr): Update declaration.
8507 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8508 TFRAME. Add new argument CTX.
8509 * server.h (struct eval_agent_expr_context): Declare.
8510 (agent_mem_read, agent_tsv_read): Update declaration.
8511 (agent_mem_read_string): Likewise.
8512 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8513 (add_traceframe_block): Add new argument TPOINT.
8514 Increase TPOINT->traceframe_usage.
8515 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8516 eval_tracepoint_agent_expr.
8517 (condition_true_at_tracepoint): Likewise.
8518 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8519 (agent_mem_read_string, agent_tsv_read): Likewise.
8520
8521 2013-01-16 Yao Qi <yao@codesourcery.com>
8522
8523 * linux-low.c (linux_resume_one_lwp): Don't check
8524 'lwp->bp_reinsert != 0'.
8525
8526 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8527 Pedro Alves <palves@redhat.com>
8528
8529 * lynx-low.c (ptrace_request_to_str): Define a temporary
8530 macro and use it to simplify this function's implementation.
8531
8532 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8533
8534 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8535 sets errno.
8536
8537 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8538
8539 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8540
8541 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8542
8543 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8544
8545 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8546
8547 * lynx-low.c (lynx_resume): Use the resume_info parameter
8548 to determine the ptid for the lynx_ptrace call, unless
8549 it is equal to minus_one_ptid, in which case we use the
8550 ptid of the current_inferior.
8551 (lynx_wait_1): After having received a thread create/exit
8552 event, resume the inferior's execution using the signaling
8553 thread's ptid, rather than the old ptid.
8554
8555 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8556
8557 * lynx-low.c (lynx_resume): Delete variable ret.
8558
8559 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8560
8561 * gdbreplay.c (gdbreplay_version): Update copyright year.
8562 * server.c (gdbserver_version): Likewise.
8563
8564 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8565
8566 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8567 new thread.
8568
8569 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8570
8571 * lynx-low.c (ptrace_request_to_str): Add handling for
8572 PTRACE_GETTRACESIG.
8573
8574 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8575
8576 * lynx-low.c (lynx_attach): Delete variable new_process.
8577
8578 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8579
8580 * lynx-low.c (lynx_create_inferior): Delete variable
8581 new_process.
8582
8583 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8584
8585 * lynx-low.c (ptrace_request_to_str): Do not handle
8586 PTRACE_GETTHREADLIST if this macro does not exist.
8587
8588 2012-12-15 Yao Qi <yao@codesourcery.com>
8589
8590 * Makefile.in (OBS): Add notif.o.
8591 * notif.c, notif.h: New.
8592 * server.c: Include "notif.h".
8593 (struct vstop_notif) <next>: Remove.
8594 <base>: New field.
8595 (queue_stop_reply): Update.
8596 (push_event, send_next_stop_reply): Remove.
8597 (discard_queued_stop_replies): Update.
8598 (notif_stop): New variable.
8599 (handle_v_stopped): Remove.
8600 (handle_v_requests): Don't call handle_v_stopped. Call
8601 handle_ack_notif instead.
8602 (queue_stop_reply_callback): Call notif_event_enque instead
8603 of queue_stop_reply.
8604 (handle_status): Don't call send_next_stop_reply, call
8605 notif_write_event instead.
8606 (kill_inferior_callback): Likewise.
8607 (detach_or_kill_inferior_callback): Likewise.
8608 (main): Call initialize_notif.
8609 (process_serial_event): Call QUEUE_is_empty.
8610 (handle_target_event): Call notif_push instead of push event.
8611 * server.h (push_event): Remove declaration.
8612
8613 2012-12-10 Tom Tromey <tromey@redhat.com>
8614
8615 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8616 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8617 macros.
8618 (.c.o): Rewrite.
8619 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8620 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8621 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8622 (amd64-linux-ipa.o, ax.o): Rewrite.
8623 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8624 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8625 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8626 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8627 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8628 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8629 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8630 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8631 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8632 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8633 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8634 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8635 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8636 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8637 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8638 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8639 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8640 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8641 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8642 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8643 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8644 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8645 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8646 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8647 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8648 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8649 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8650 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8651 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8652 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8653 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8654 (reg-tilegx.o): Remove.
8655 (all_object_files): New macro.
8656 Include .deps files.
8657 * aclocal.m4, configure: Rebuild.
8658 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8659 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8660 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8661
8662 2012-12-05 Tom Tromey <tromey@redhat.com>
8663
8664 PR gdb/14917:
8665 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8666
8667 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8668
8669 * configure.ac: Check for linux/perf_event.h.
8670 * config.in: Regenerated.
8671 * configure: Regenerated.
8672
8673 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8674
8675 * hostio.c (handle_readlink): Decrease buffer size
8676 parameter passed to readlink by one byte.
8677
8678 2012-11-26 Yao Qi <yao@codesourcery.com>
8679
8680 * configure.ac (build_warnings): Append '-Wempty-body'.
8681 * configure: Regenerated.
8682 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8683 body.
8684
8685 2012-11-15 Pierre Muller <muller@sourceware.org>
8686
8687 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8688 * config.in: Regenerate.
8689 * configure: Regenerate.
8690 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8691 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8692 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8693 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8694 header.
8695 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8696 instead of <sys/wait.h> header.
8697 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8698
8699 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8700
8701 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8702 (various make rules): Remove -DGDBSERVER
8703
8704 2012-11-09 Yao Qi <yao@codesourcery.com>
8705
8706 * spu-low.c (current_ptid): Move it to ..
8707 * gdbthread.h: ... here. New.
8708 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8709 * server.c (myresume, process_serial_event): Likewise.
8710 * thread-db.c (thread_db_find_new_threads): Likewise.
8711 * tracepoint.c (run_inferior_command): Likewise.
8712
8713 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8714
8715 * server.c (handle_search_memory_1): Include access length in
8716 warning message.
8717
8718 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8719
8720 * linux-crisv32-low.c: Fix compile errors.
8721
8722 2012-09-04 Yao Qi <yao@codesourcery.com>
8723
8724 * tracepoint.c (cmd_qtsv): Adjust debug message.
8725 Don't check CUR_TPOINT.
8726
8727 2012-08-28 Yao Qi <yao@codesourcery.com>
8728
8729 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8730 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8731 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8732 Remove declarations of xmalloc, xreallloc, xstrdup and
8733 freeargv.
8734 * Makefile.in (libiberty_h): New.
8735 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8736 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8737
8738 2012-08-23 Yao Qi <yao@codesourcery.com>
8739
8740 * server.h: Remove declaration of 'xsnprintf'.
8741
8742 2012-08-22 Keith Seitz <keiths@redhat.com>
8743
8744 * server.h: Include build-gnulib-gbserver/config.h.
8745 * gdbreplay.c: Likewise.
8746
8747 2012-08-08 Doug Evans <dje@google.com>
8748
8749 * Makefile.in (SFILES): Add gdb_vecs.c.
8750 (OBS): Add gdb_vecs.o.
8751 (gdb_vecs_h, host_defs_h): New variables.
8752 (thread-db.o): Add $(gdb_vecs_h) dependency.
8753 (gdb_vecs.o): New rule.
8754 * thread-db.c: #include "gdb_vecs.h".
8755 (thread_db_load_search): Use a vector to iterate over path elements.
8756 Handle text appearing after "$pdir".
8757
8758 * configure.ac: Add check for strstr.
8759 * config.in: Regenerate.
8760 * configure: Regenerate.
8761
8762 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8763
8764 * hostio.c (handle_pread): If pread fails, fall back to attempting
8765 lseek/read.
8766 (handle_pwrite): Likewise for pwrite.
8767
8768 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8769
8770 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8771 between unsupported TYPE and unimplementable ADDR/LEN combination.
8772 (arm_insert_point): Act on new return value.
8773
8774 2012-07-31 Pedro Alves <palves@redhat.com>
8775
8776 * server.c (process_point_options): Only skip tokens if we find
8777 one that is unrecognized. Don't treat 'X' specially while
8778 skipping unrecognized tokens.
8779
8780 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8781
8782 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8783 to 4-byte-align HW breakpoint addresses for Thumb.
8784
8785 2012-07-27 Yao Qi <yao@codesourcery.com>
8786
8787 PR remote/14161.
8788
8789 * server.h: Declare gdb_agent_about_to_close.
8790 * target.c (kill_inferior): Include "agent.h".
8791 New. Send command 'kill'.
8792 * target.h (kill_inferior): Removed macro.
8793 * tracepoint.c (gdb_agent_about_to_close): New.
8794 (gdb_agent_helper_thread): Handle command 'close'.
8795 Wait endlessly until the inferior stops.
8796 Install gdb_agent_remove_socket to atexit hook.
8797 (agent_socket_name): New static variable.
8798 (gdb_agent_socket_init): Replace local variable 'name' with
8799 'agent_socket_name'.
8800 (gdb_agent_remove_socket): New.
8801
8802 2012-07-27 Yao Qi <yao@codesourcery.com>
8803
8804 * server.c (process_point_options): Stop at 'X' when parsing.
8805
8806 2012-07-19 Michael Eager <eager@eagercon.com>
8807
8808 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8809 to hw_execute.
8810 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8811 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8812 hardware breakpoint.
8813
8814 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8815
8816 * gdbserver/linux-low.c (initialize_low): Call
8817 linux_ptrace_init_warnings.
8818
8819 2012-07-02 Doug Evans <dje@google.com>
8820
8821 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8822 pointer to int.
8823
8824 2012-07-02 Stan Shebs <stan@codesourcery.com>
8825
8826 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8827 (ax.o): Add it to build rule.
8828 (ax-ipa.o): Ditto.
8829 (OBS): Add format.o.
8830 (IPA_OBS): Add format.o.
8831 * server.c (handle_query): Claim support for breakpoint commands.
8832 (process_point_options): Add command case.
8833 (process_serial_event): Leave running if there are printfs in
8834 effect.
8835 * mem-break.h (any_persistent_commands): Declare.
8836 (add_breakpoint_commands): Declare.
8837 (gdb_no_commands_at_breakpoint): Declare.
8838 (run_breakpoint_commands): Declare.
8839 * mem-break.c (struct point_command_list): New struct.
8840 (struct breakpoint): New field command_list.
8841 (any_persistent_commands): New function.
8842 (add_commands_to_breakpoint): New function.
8843 (add_breakpoint_commands): New function.
8844 (gdb_no_commands_at_breakpoint): New function.
8845 (run_breakpoint_commands): New function.
8846 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8847 locally.
8848 * ax.c: Include format.h.
8849 (ax_printf): New function.
8850 (gdb_eval_agent_expr): Add printf opcode.
8851
8852 2012-06-13 Yao Qi <yao@codesourcery.com>
8853
8854 * server.c (start_inferior): Remove duplicated writes to fields
8855 'last_resume_kind' and 'last_status' of 'current_inferior'.
8856
8857 2012-06-12 Yao Qi <yao@codesourcery.com>
8858 Pedro Alves <palves@redhat.com>
8859
8860 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8861 comment.
8862 * server.c (handle_v_cont): Extend comment.
8863
8864 2012-06-11 Yao Qi <yao@codesourcery.com>
8865
8866 * linux-low.c (linux_attach): Add 'static'.
8867
8868 2012-06-06 Yao Qi <yao@codesourcery.com>
8869
8870 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8871
8872 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8873
8874 Fix gcc -flto compilation warning.
8875 * server.c (main): Make variable multi_mode and attach volatile.
8876
8877 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8878
8879 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8880 if the platform doesn't know about it.
8881
8882 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8883
8884 * Makefile.in (SFILES): Add linux-tile-low.c.
8885 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8886 * configure.srv: Handle tilegx-*-linux*.
8887 * linux-tile-low.c: New file.
8888
8889 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8890
8891 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8892
8893 2012-05-24 Pedro Alves <palves@redhat.com>
8894
8895 PR gdb/7205
8896
8897 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8898
8899 2012-05-24 Pedro Alves <palves@redhat.com>
8900
8901 PR gdb/7205
8902
8903 Replace target_signal with gdb_signal throughout.
8904
8905 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8906
8907 * linux-low.c (linux_store_registers): Avoid the copying sequence
8908 when no data has been retrieved by ptrace.
8909
8910 2012-05-22 Will Deacon <will.deacon@arm.com>
8911
8912 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8913 Include asm/ptrace.h.
8914 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8915 already defined.
8916
8917 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8918
8919 * linux-low.c (linux_store_registers): Don't re-retrieve data
8920 with ptrace that has already been obtained from /proc. Always
8921 copy any data retrieved with ptrace to the buffer supplied.
8922
8923 2012-05-11 Yao Qi <yao@codesourcery.com>
8924 Pedro Alves <palves@redhat.com>
8925
8926 * linux-low.c (enum stopping_threads_kind): New.
8927 (stopping_threads): Change type to `enum stopping_threads_kind'.
8928 (handle_extended_wait): If stopping and suspending threads, leave
8929 the new_lwp suspended too.
8930 (linux_wait_for_event): Adjust.
8931 (stop_all_lwps): Set `stopping_threads' to
8932 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8933 whether we're suspending threads or just stopping them. Assert no
8934 recursion happens.
8935
8936 2012-04-29 Yao Qi <yao@codesourcery.com>
8937
8938 * server.h: Move some code to ...
8939 * gdbthread.h: ... here. New.
8940 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8941 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8942 (nto-low.o, win32-low.o): Likewise.
8943 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8944 * regcache.c, remote-utils.c, server.c: Likewise.
8945 * target.c, tracepoint.c, win32-low.c: Likewise.
8946
8947 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8948
8949 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8950 (PTRACE_ARG4_TYPE): Likewise.
8951 (PTRACE_XFER_TYPE): Likewise.
8952 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8953 ptrace to PTRACE_ARG3_TYPE.
8954 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8955 (PTRACE_ARG4_TYPE): Likewise.
8956 (PTRACE_XFER_TYPE): Likewise.
8957 (linux_detach_one_lwp): Cast fourth argument of
8958 ptrace to long then PTRACE_ARG4_TYPE.
8959 (regsets_fetch_inferior_registers): Cast third argument of
8960 ptrace to long then PTRACE_ARG3_TYPE.
8961 (regsets_store_inferior_registers): Likewise.
8962
8963 2012-04-20 Pedro Alves <palves@redhat.com>
8964
8965 * configure: Regenerate.
8966
8967 2012-04-19 Pedro Alves <palves@redhat.com>
8968
8969 * Makefile.in (GNULIB_BUILDDIR): New.
8970 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8971 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8972 (all, install-only, uninstall, clean-info, all-lib, clean): No
8973 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8974 (maintainer-clean realclean distclean): Use subdir_do.
8975 (subdir_do): New.
8976 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8977 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8978 * acinclude.m4: Include acx_configure_dir.m4.
8979 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8980 calls. Call AC_PROG_RANLIB. Configure gnulib using
8981 ACX_CONFIGURE_DIR.
8982 (GNULIB): New.
8983 (GNULIB_STDINT_H): Adjust.
8984 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8985 * gdbreplay.c: Include build-gnulib/config.h.
8986 * server.h: Likewise.
8987 * aclocal.m4: Regenerate.
8988 * config.in: Regenerate.
8989 * configure: Regenerate.
8990
8991 2012-04-19 Pedro Alves <palves@redhat.com>
8992
8993 * Makefile.in (LIBGNU, INCGNU): Adjust.
8994 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8995 (all, install-only, uninstall, clean-info, all-lib, clean)
8996 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8997 * configure.ac: Adjust AC_OUTPUT output.
8998 * aclocal.m4: Regenerate.
8999 * configure: Regenerate.
9000
9001 2012-04-19 Pedro Alves <palves@redhat.com>
9002
9003 * Makefile.in (generated_files): New.
9004 (server_h): Remove the explicit dependency on config.h, and depend
9005 on $generated_files.
9006
9007 2012-04-19 Pedro Alves <palves@redhat.com>
9008
9009 * Makefile.in (INCGNU): Add -Ignulib.
9010
9011 2012-04-19 Pedro Alves <palves@redhat.com>
9012
9013 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9014 (INCGNU): ... this, and spell out -I here.
9015 (GNULIB_LIB): Rename to ...
9016 (LIBGNU): ... this.
9017 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9018
9019 2012-04-19 Pedro Alves <palves@redhat.com>
9020
9021 * config.in: Regenerate.
9022
9023 2012-04-19 Pedro Alves <palves@redhat.com>
9024
9025 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9026 * server.h (memmem): Remove declaration.
9027 * config.in: Regenerate.
9028 * configure: Regenerate.
9029
9030 2012-04-19 Yao Qi <yao@codesourcery.com>
9031
9032 * Makefile.in (SFILES): Add common/vec.c.
9033 (OBS): Add vec.o.
9034 (vec.o): New rule.
9035
9036 2012-04-19 Yao Qi <yao@codesourcery.com>
9037
9038 * remote-utils.c (prepare_resume_reply): Replace with macro
9039 target_core_of_thread.
9040 * server.c (handle_qxfer_threads_proper): Likewise.
9041 * target.h (traget_core_of_thread): New macro.
9042
9043 2012-04-18 Pedro Alves <palves@redhat.com>
9044
9045 * aclocal.m4: Regenerate.
9046 * configure: Regenerate.
9047
9048 2012-04-16 Yao Qi <yao@codesourcery.com>
9049
9050 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9051 duplicated on address.
9052
9053 2012-04-16 Yao Qi <yao@codesourcery.com>
9054
9055 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9056 (struct tracepoint_action_ops) <send>: New field.
9057 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9058 (agent_expr_send, x_tracepoint_action_send): New.
9059 (l_tracepoint_action_send): New.
9060 (cmd_qtdp): Download and install tracepoint
9061 according to `use_agent'.
9062 (run_inferior_command): Add one more parameter `len'.
9063 Update callers.
9064 (tracepoint_send_agent): New.
9065 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9066
9067 2012-04-16 Yao Qi <yao@codesourcery.com>
9068
9069 * tracepoint.c (download_tracepoints): Moved to ...
9070 (cmd_qtstart): ... here.
9071
9072 2012-04-14 Yao Qi <yao@codesourcery.com>
9073
9074 * tracepoint.c: Include inttypes.h.
9075 (struct collect_memory_action): Use sized types.
9076 (struct tracepoint): Likewise.
9077 (cmd_qtdp, stop_tracing): Update print specifiers.
9078 (cmd_qtp, response_tracepoint): Likewise.
9079 (collect_data_at_tracepoint): Likewise.
9080 (collect_data_at_step): Likewise.
9081
9082 2012-04-14 Yao Qi <yao@codesourcery.com>
9083
9084 Import gnulib module inttypes.
9085 * aclocal.m4, config.in, configure: Regenerated.
9086
9087 2012-04-14 Yao Qi <yao@codesourcery.com>
9088
9089 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9090 Makefile and config.status at last.
9091
9092 2012-04-13 Yao Qi <yao@codesourcery.com>
9093
9094 * tracepoint.c: Include stdint.h unconditionally.
9095
9096 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9097
9098 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9099 on BFD_HAVE_SYS_PROCFS_TYPE.
9100 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9101 * configure: Regenerate.
9102 * config.in: Likewise.
9103
9104 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9105
9106 * Makefile.in (clean): Also remove x32.c x32-linux.c
9107 x32-avx.c x32-avx-linux.c.
9108 (x32.o): New target.
9109 (x32.c): Likewise.
9110 (x32-linux.o): Likewise.
9111 (x32-linux.c): Likewise.
9112 (x32-avx.o): Likewise.
9113 (x32-avx.c): Likewise.
9114 (x32-avx-linux.o): Likewise.
9115 (x32-avx-linux.c): Likewise.
9116
9117 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9118 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9119 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9120 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9121 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9122 i386/x32-avx-linux.xml.
9123
9124 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9125 (init_registers_x32_avx_linux): Likwise.
9126 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9127 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9128
9129 2012-04-13 Pedro Alves <palves@redhat.com>
9130
9131 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9132 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9133 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9134 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9135 the sub-make.
9136
9137 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9138
9139 * linux-x86-low.c (compat_x32_clock_t): New.
9140 (compat_x32_siginfo_t): Likewise.
9141 (compat_x32_siginfo_from_siginfo): Likewise.
9142 (siginfo_from_compat_x32_siginfo): Likewise.
9143 (linux_is_elf64): Likewise.
9144 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9145 and siginfo_from_compat_x32_siginfo for x32.
9146 (x86_arch_setup): Set linux_is_elf64.
9147
9148 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9149
9150 PR gdb/13969
9151 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9152 e_machine field.
9153 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9154 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9155 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9156 compatible with process.
9157
9158 2012-04-12 Yao Qi <yao@codesourcery.com>
9159
9160 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9161 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9162 (install-only, install-info, clean): Handle sub dir gnulib.
9163 (all-lib, am--refresh): New targets.
9164 (memmem.o): Remove target.
9165 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9166 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9167 (AC_REPLACE_FUNCS): Remove memmem.
9168 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9169 (AC_OUTPUT): Generate Makefile in gnulib/.
9170 * aclocal.m4, config.in, configure: Regenerated.
9171
9172 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9173
9174 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9175
9176 2012-04-05 Pedro Alves <palves@redhat.com>
9177
9178 -Werror=strict-aliasing
9179
9180 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9181 pointer.
9182
9183 2012-04-04 Pedro Alves <palves@redhat.com>
9184
9185 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9186 (sparc_store_gregset_from_stack, sparc_store_gregset)
9187 (sparc_breakpoint_at): Fix formatting.
9188
9189 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9190
9191 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9192 are available.
9193 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9194 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9195 * config.in: Regenerate.
9196 * configure: Likewise.
9197
9198 2012-03-29 Pedro Alves <palves@redhat.com>
9199
9200 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9201 Correct ptrace arguments.
9202
9203 2012-03-28 Pedro Alves <palves@redhat.com>
9204
9205 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9206 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9207 (IA64_FR1_REGNUM): New defines.
9208 (ia64_fetch_register): New.
9209 (the_low_target): Install it.
9210 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9211 field.
9212 * linux-low.c (linux_fetch_registers): Try the
9213 the_low_target.fetch_register hook first.
9214
9215 * linux-arm-low.c (the_low_target): Adjust.
9216 * linux-bfin-low.c (the_low_target): Adjust.
9217 * linux-cris-low.c (the_low_target): Adjust.
9218 * linux-crisv32-low.c (the_low_target): Adjust.
9219 * linux-m32r-low.c (the_low_target): Adjust.
9220 * linux-m68k-low.c (the_low_target): Adjust.
9221 * linux-mips-low.c (the_low_target): Adjust.
9222 * linux-ppc-low.c (the_low_target): Adjust.
9223 * linux-s390-low.c (the_low_target): Adjust.
9224 * linux-sh-low.c (the_low_target): Adjust.
9225 * linux-sparc-low.c (the_low_target): Adjust.
9226 * linux-tic6x-low.c (the_low_target): Adjust.
9227 * linux-x86-low.c (the_low_target): Adjust.
9228 * linux-xtensa-low.c (the_low_target): Adjust.
9229
9230 2012-03-26 Pedro Alves <palves@redhat.com>
9231
9232 * server.c (handle_qxfer_libraries): Don't bail early if
9233 the_target->qxfer_libraries_svr4 is not NULL.
9234
9235 2012-03-26 Pedro Alves <palves@redhat.com>
9236
9237 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9238
9239 2012-03-23 Pedro Alves <palves@redhat.com>
9240
9241 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9242 "library-list-svr4" element's start tag when the the DSO list is
9243 empty.
9244
9245 2012-03-23 Pedro Alves <palves@redhat.com>
9246
9247 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9248 a variable whose type size is the same as the inferior's pointer
9249 size.
9250
9251 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9252
9253 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9254 struct siginfo.
9255 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9256 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9257 * linux-low.h: Include <signal.h>.
9258 (struct siginfo): Remove forward declaration.
9259 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9260 struct siginfo.
9261
9262 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9263
9264 * .gitignore: Ignore more files.
9265
9266 2012-03-19 Pedro Alves <palves@redhat.com>
9267 Jan Kratochvil <jan.kratochvil@redhat.com>
9268
9269 * server.c (cont_thread, general_thread): Add describing comments.
9270 (start_inferior): Clear `cont_thread'.
9271 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9272 of a process.
9273
9274 2012-03-15 Yao Qi <yao@codesourcery.com>
9275
9276 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9277 handling to ...
9278 (cmd_qtdp): ... here.
9279
9280 2012-03-15 Yao Qi <yao@codesourcery.com>
9281
9282 * tracepoint.c (struct tracepoint_action_ops): New.
9283 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9284 (m_tracepoint_action_download): New.
9285 (r_tracepoint_action_download): New.
9286 (x_tracepoint_action_download): New.
9287 (l_tracepoint_action_download): New.
9288 (add_tracepoint_action): Install `action->ops' according type.
9289 (download_tracepoint_1): Move code `download' function pointer
9290 of various tracepoint_action_ops.
9291
9292 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9293
9294 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9295 linux_ptrace_attach_warnings.
9296
9297 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9298
9299 * Makefile.in (linux-ptrace.o): New.
9300 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9301 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9302 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9303 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9304 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9305 of these targets.
9306 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9307
9308 2012-03-08 Yao Qi <yao@codesourcery.com>
9309 Pedro Alves <palves@redhat.com>
9310
9311 Fix PR server/13392.
9312 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9313 offset of JMP insn.
9314 * tracepoint.c (remove_tracepoint): New.
9315 (cmd_qtdp): Call remove_tracepoint when failed to install.
9316
9317 2012-03-07 Pedro Alves <palves@redhat.com>
9318
9319 * linux-low.c (get_detach_signal): New.
9320 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9321 Pass on pending signals to PTRACE_DETACH. Check the result of the
9322 ptrace call.
9323 * server.c (program_signals, program_signals_p): New.
9324 (handle_general_set): Handle QProgramSignals.
9325 * server.h (program_signals, program_signals_p): Declare.
9326
9327 2012-03-05 Pedro Alves <palves@redhat.com>
9328 Jan Kratochvil <jan.kratochvil@redhat.com>
9329
9330 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9331 New comment why.
9332
9333 2012-03-03 Yao Qi <yao@codesourcery.com>
9334
9335 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9336 agent_look_up_symbols.
9337
9338 2012-03-03 Yao Qi <yao@codesourcery.com>
9339
9340 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9341 (linux-x86-low.o): Likewise.
9342 * server.h: Remove in_process_agent_loaded.
9343 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9344 common/agent.c.
9345 Update callers.
9346
9347 2012-03-03 Yao Qi <yao@codesourcery.com>
9348
9349 * tracepoint.c (gdb_agent_capability): New global.
9350 (in_process_agent_loaded_ust): Renamed to
9351 `in_process_agent_supports_ust'.
9352 Update callers.
9353 (in_process_agent_supports_ust): Call agent_capability_check.
9354 (clear_installed_tracepoints): Assert that agent supports
9355 agent.
9356
9357 2012-03-03 Yao Qi <yao@codesourcery.com>
9358
9359 * linux-low.c (linux_supports_agent): New.
9360 (linux_target_ops): Initialize field `supports_agent' with
9361 linux_supports_agent.
9362 * target.h (struct target_ops) <supports_agent>: New.
9363 (target_supports_agent): New macro.
9364 * server.c (handle_general_set): Handle packet 'QAgent'.
9365 (handle_query): Send `QAgent+'.
9366 * Makefile.in (server.o): Depends on agent.h.
9367
9368 2012-03-03 Yao Qi <yao@codesourcery.com>
9369
9370 * Makefile.in (OBS): Add agent.o.
9371 Add new rule for agent.o.
9372 Track dependence of tracepoint.c on agent.h.
9373 * tracepoint.c (run_inferior_command_1):
9374 (run_inferior_command): Call agent_run_command.
9375 (gdb_ust_connect_sync_socket): Deleted. Move it to
9376 common/agent.c.
9377 (resume_thread, stop_thread): Likewise.
9378 (gdb_ust_socket_init): Renamed to ...
9379 (gdb_agent_socket_init): ... New.
9380 (gdb_ust_thread): Renamed to ...
9381 (gdb_agent_helper_thread): ... New.
9382 (gdb_ust_init): Move some code to ...
9383 (gdb_agent_init): ... here. New.
9384 [HAVE_UST]: Call gdb_ust_init.
9385 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9386 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9387 * config.in, configure: Regenerated.
9388
9389 2012-03-02 Pedro Alves <palves@redhat.com>
9390
9391 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9392 * linux-low.c (struct simple_pid_list): New.
9393 (stopped_pids): New a struct simple_pid_list pointer.
9394 (add_to_pid_list, pull_pid_from_list): New.
9395 (handle_extended_wait): Don't assume the first signal new children
9396 report is SIGSTOP. Adjust call to pull_pid_from_list.
9397 (linux_wait_for_lwp): Adjust.
9398
9399 2012-03-02 Yao Qi <yao@codesourcery.com>
9400
9401 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9402 debug log.
9403
9404 2012-03-02 Yao Qi <yao@codesourcery.com>
9405
9406 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9407 `stop_pc' and `tpoint'. Update caller.
9408
9409 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9410
9411 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9412 * linux-low.c (use_linux_regsets): New macro.
9413 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9414 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9415 (linux_register_in_regsets): New function.
9416 (usr_fetch_inferior_registers): Skip registers covered by
9417 regsets.
9418 (usr_store_inferior_registers): Likewise.
9419 (usr_fetch_inferior_registers): New macro.
9420 (usr_store_inferior_registers): Likewise.
9421 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9422 (linux_store_registers): Likewise.
9423 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9424 prototype.
9425 (init_registers_mips64_dsp_linux): Likewise.
9426 (init_registers_mips_linux): New macro.
9427 (init_registers_mips_dsp_linux): Likewise.
9428 (mips_dsp_num_regs): Likewise.
9429 (DSP_BASE, DSP_CONTROL): New fallback macros.
9430 (mips_base_regs): New macro.
9431 (mips_regmap): Use it. Fix the size.
9432 (mips_dsp_regmap): New variable.
9433 (mips_dsp_regset_bitmap): Likewise.
9434 (mips_arch_setup): New function.
9435 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9436 than mips_regmap.
9437 (mips_cannot_store_register): Likewise.
9438 (the_low_target): Update .arch_setup, .num_regs and .regmap
9439 initializers. Add .regset_bitmap initializer.
9440 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9441 initializer.
9442 * linux-bfin-low.c (the_low_target): Likewise.
9443 * linux-cris-low.c (the_low_target): Likewise.
9444 * linux-crisv32-low.c (the_low_target): Likewise.
9445 * linux-ia64-low.c (the_low_target): Likewise.
9446 * linux-m32r-low.c (the_low_target): Likewise.
9447 * linux-m68k-low.c (the_low_target): Likewise.
9448 * linux-ppc-low.c (the_low_target): Likewise.
9449 * linux-s390-low.c (the_low_target): Likewise.
9450 * linux-sh-low.c (the_low_target): Likewise.
9451 * linux-sparc-low.c (the_low_target): Likewise.
9452 * linux-tic6x-low.c (the_low_target): Likewise.
9453 * linux-x86-low.c (the_low_target): Likewise.
9454 * linux-xtensa-low.c (the_low_target): Likewise.
9455 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9456 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9457 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9458 srv_xmlfiles.
9459 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9460 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9461
9462 2012-02-29 Yao Qi <yao@codesourcery.com>
9463 Pedro Alves <palves@redhat.com>
9464
9465 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9466 `step_over_finished' is true.
9467
9468 2012-02-27 Pedro Alves <palves@redhat.com>
9469
9470 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9471 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9472
9473 2012-02-27 Pedro Alves <palves@redhat.com>
9474
9475 PR server/9684
9476 * linux-low.c (pid_is_stopped): New.
9477 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9478
9479 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9480
9481 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9482 of conditions.
9483
9484 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9485
9486 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9487
9488 2012-02-24 Luis Machado <lgustavo@codesourcery>
9489
9490 * server.c (handle_query): Advertise support for target-side
9491 breakpoint condition evaluation.
9492 (process_point_options): New function.
9493 (process_serial_event): When inserting a breakpoint, check for
9494 a target-side condition that should be evaluated.
9495
9496 * mem-break.c: Include regcache.h and ax.h.
9497 (point_cond_list_t): New data structure.
9498 (breakpoint) <cond_list>: New field.
9499 (find_gdb_breakpoint_at): Make non-static.
9500 (delete_gdb_breakpoint_at): Clear any target-side
9501 conditions.
9502 (clear_gdb_breakpoint_conditions): New function.
9503 (add_condition_to_breakpoint): Likewise.
9504 (add_breakpoint_condition): Likewise.
9505 (gdb_condition_true_at_breakpoint): Likewise.
9506 (gdb_breakpoint_here): Return result directly instead
9507 of going through a local variable.
9508
9509 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9510 (clear_gdb_breakpoint_conditions): Likewise.
9511 (add_breakpoint_condition): Likewise.
9512 (gdb_condition_true_at_breakpoint): Likewise.
9513
9514 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9515 (need_step_over_p): Take target-side breakpoint condition into
9516 consideration.
9517
9518 2012-02-24 Luis Machado <lgustavo@codesourcery>
9519
9520 * server.h: Include tracepoint.h.
9521 (agent_mem_read, agent_get_trace_state_variable_value,
9522 agent_set_trace_state_variable_value,
9523 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9524 get_set_tsv_func_addr): New prototypes.
9525
9526 * ax.h: New include file.
9527 * ax.c: New source file.
9528
9529 * tracepoint.c: Include ax.h.
9530 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9531 agent_expr, eval_result_type): Move to ax.h.
9532 (parse_agent_expr): Rename to ...
9533 (gdb_parse_agent_expr): ... this, make it non-static and move
9534 to ax.h.
9535 (unparse_agent_expr) Rename to ...
9536 (gdb_unparse_agent_expr): ... this, make it non-static and move
9537 to ax.h.
9538 (eval_agent_expr): Rename to ...
9539 (eval_tracepoint_agent_expr): ... this.
9540 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9541 forward declarations.
9542 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9543 (agent_get_trace_state_variable_value): New function.
9544 (agent_set_trace_state_variable_value): New function.
9545 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9546 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9547 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9548 (condition_true_at_tracepoint): Likewise.
9549 (parse_agent_expr): Rename to ...
9550 (gdb_parse_agent_expr): ... this and move to ax.c.
9551 (unparse_agent_expr): Rename to ...
9552 (gdb_unparse_agent_expr): ... this and move to ax.c.
9553 (gdb_agent_op_name): Move to ax.c.
9554 (eval_agent_expr): Rename to ...
9555 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9556 and move to ax.c.
9557 (eval_tracepoint_agent_expr): New function.
9558 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9559 non-static.
9560 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9561 ax.c.
9562 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9563 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9564 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9565 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9566 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9567 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9568 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9569 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9570 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9571 (compile_bytecodes): Remove forward declaration.
9572 (is_goto_target): Move to ax.c.
9573 (compile_bytecodes): Move to ax.c and call
9574 agent_get_trace_state_variable_value (...) and
9575 agent_set_trace_state_variable_value (...).
9576
9577 * Makefile.in: Update ax.c and IPA dependencies.
9578
9579 2012-02-24 Pedro Alves <palves@redhat.com>
9580
9581 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9582 (cmd_bigqtbuffer_circular): ... this. Only handle
9583 'QTBuffer:circular:'.
9584 (handle_tracepoint_general_set): Adjust.
9585
9586 2012-02-16 Yao Qi <yao@codesourcery.com>
9587
9588 * inferiors.c: Move code to ...
9589 * dll.c: .... here. New.
9590 * server.h: Declare clear_dlls.
9591 * Makefile.in (SFILES): Add dll.c.
9592 (OBS): Add dll.o
9593 (dll.o): New rule.
9594
9595 2012-02-11 Yao Qi <yao@codesourcery.com>
9596
9597 * server.c: (handle_monitor_command): Add a new parameter
9598 `own_buf'.
9599 (handle_query): Update caller.
9600
9601 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9602
9603 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9604 * configure, config.in: Regenerate.
9605 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9606 is not defined.
9607
9608 2012-02-02 Pedro Alves <palves@redhat.com>
9609
9610 Try SIGKILL first, then PTRACE_KILL.
9611 * linux-low.c (linux_kill_one_lwp): New.
9612 (linux_kill_one_lwp): Rename to ...
9613 (kill_one_lwp_callback): ... this. Use the new
9614 linux_kill_one_lwp.
9615
9616 2012-02-02 Pedro Alves <palves@redhat.com>
9617
9618 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9619 inferior.
9620
9621 2012-01-27 Pedro Alves <palves@redhat.com>
9622
9623 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9624 (elf_64_file_p): Make static.
9625 (linux_pid_exe_is_elf_64_file): New.
9626 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9627 Delete declarations.
9628 (linux_pid_exe_is_elf_64_file): Declare.
9629 * linux-x86-low.c (x86_arch_setup): Use
9630 linux_pid_exe_is_elf_64_file.
9631
9632 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9633
9634 * linux-low.c (linux_wait_for_event_1): Rename to ...
9635 (linux_wait_for_event): ... here and merge it with former
9636 linux_wait_for_event - new variable wait_ptid, use it.
9637 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9638
9639 2012-01-23 Pedro Alves <palves@redhat.com>
9640
9641 * server.c (main): Avoid yet another case of infinite loop while
9642 detaching/killing after a longjmp.
9643
9644 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9645
9646 Code cleanup.
9647 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9648
9649 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9650
9651 * hostio.c (handle_readlink): New function.
9652 (handle_vFile): Call it to handle "vFile:readlink" packets.
9653
9654 2012-01-20 Pedro Alves <palves@redhat.com>
9655 Ulrich Weigand <ulrich.weigand@linaro.org>
9656
9657 * server.c (handle_v_requests): Only support vAttach and vRun to
9658 start multiple processes when in extended protocol mode.
9659
9660 2012-01-17 Pedro Alves <palves@redhat.com>
9661
9662 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9663 memalign plus mprotect to allocate the scratch buffer.
9664
9665 2012-01-13 Pedro Alves <palves@redhat.com>
9666
9667 * server.c (attach_inferior): Clear `cont_thread'.
9668
9669 2012-01-13 Pedro Alves <palves@redhat.com>
9670
9671 * server.c (main): Avoid infinite loop while detaching/killing
9672 after a longjmp.
9673
9674 2012-01-09 Doug Evans <dje@google.com>
9675
9676 * server.c (start_inferior): Set last_ptid in --wrapper case.
9677
9678 2012-01-06 Yao Qi <yao@codesourcery.com>
9679
9680 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9681 defined.
9682 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9683
9684 2012-01-04 Yao Qi <yao@codesourcery.com>
9685
9686 * tracepoint.c (cmd_qtdp): Print debug message
9687 for static tracepoint.
9688
9689 2012-01-04 Yao Qi <yao@codesourcery.com>
9690
9691 * tracepoint.c (trace_vdebug): Differentiate debug message
9692 between gdbserver and IPA.
9693
9694 2012-01-03 Yao Qi <yao@codesourcery.com>
9695
9696 * tracepoint.c (tracepoint_was_hit): Don't collect for
9697 static tracepoint.
9698
9699 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9700
9701 * terminal.h: Reformat copyright header.
9702
9703 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9704
9705 * server.c (gdbserver_version): Update copyright year.
9706 * gdbreplay.c (gdbreplay_version): Likewise.
9707
9708 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9709
9710 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9711
9712 Revert:
9713 2011-12-18 Hui Zhu <teawater@gmail.com>
9714 * linux-low.c (linux_create_inferior): Save return value to ret.
9715
9716 2011-12-18 Hui Zhu <teawater@gmail.com>
9717
9718 * linux-low.c (linux_create_inferior): Save return value to ret.
9719
9720 2011-12-16 Doug Evans <dje@google.com>
9721
9722 * linux-low.c (linux_create_inferior): If stdio connection,
9723 redirect stdin from /dev/null, stdout to stderr.
9724 * remote-utils.c (remote_is_stdio): New static global.
9725 (remote_connection_is_stdio): New function.
9726 (remote_prepare): Handle stdio connection.
9727 (remote_open): Ditto.
9728 (remote_close): Don't close stdin for stdio connections.
9729 (read_prim,write_prim): New functions. Replace all calls to
9730 read/write to these.
9731 * server.c (main): Watch for "-" argument. Move call to
9732 remote_prepare before start_inferior.
9733 * server.h (STDIO_CONNECTION_NAME): New macro.
9734 (remote_connection_is_stdio): Declare.
9735
9736 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9737 in debugging output.
9738
9739 2011-12-15 Yao Qi <yao@codesourcery.com>
9740
9741 * tracepoint.c: Include sys/syscall.h.
9742 (gdb_ust_thread): Remove preprocessor conditional.
9743
9744 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9745
9746 * linux-low.c (linux_detach_one_lwp): Call
9747 the_low_target.prepare_to_resume before detaching.
9748
9749 2011-12-14 Yao Qi <yao@codesourcery.com>
9750
9751 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9752 of write.
9753
9754 2011-12-14 Yao Qi <yao@codesourcery.com>
9755
9756 * i386-low.c (i386_low_stopped_data_address): Initialize local
9757 variable `control'.
9758
9759 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9760
9761 PR remote/13492
9762
9763 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9764 DR_CONTROL unless necessary. Extend comments.
9765 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9766 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9767
9768 2011-12-13 Yao Qi <yao@codesourcery.com>
9769
9770 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9771 macros.
9772 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9773
9774 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9775
9776 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9777 Print new debug message for such case.
9778
9779 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9780
9781 Fix overlapping memcpy.
9782 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9783 the read_inferior_memory transfer.
9784 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9785 write_inferior_memory transfer.
9786 (set_fast_tracepoint_jump): New variable buf. Use it for the
9787 read_inferior_memory and write_inferior_memory transfers.
9788 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9789 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9790 Use it for the write_inferior_memory transfer.
9791 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9792 buffers.
9793
9794 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9795
9796 * linux-low.c (fetch_register, store_register): Make code
9797 consistent, fix formatting.
9798
9799 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9800
9801 * linux-low.c (usr_store_inferior_registers): Factor out code
9802 to handle individual registers into...
9803 (store_register): ... this new function.
9804
9805 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9806
9807 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9808 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9809 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9810 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9811 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9812 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9813 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9814 (srv_xmlfiles): Add new XML files.
9815
9816 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9817 and <sys/uio.h>.
9818 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9819 (init_registers_s390_linux32v1): Add prototype.
9820 (init_registers_s390_linux32v2): Likewise.
9821 (init_registers_s390_linux64v1): Likewise.
9822 (init_registers_s390_linux64v2): Likewise.
9823 (init_registers_s390x_linux64v1): Likewise.
9824 (init_registers_s390x_linux64v2): Likewise.
9825 (s390_num_regs): Increment to 52.
9826 (s390_regmap): Add orig_r2 register.
9827 (s390_num_regs_3264): Increment to 68.
9828 (s390_regmap_3264): Add orig_r2 register.
9829 (s390_collect_ptrace_register): Handle orig_r2 register.
9830 (s390_supply_ptrace_register): Likewise.
9831 (s390_fill_last_break): New function.
9832 (s390_store_last_break): Likewise.
9833 (s390_fill_system_call): New function.
9834 (s390_store_system_call): Likewise.
9835 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9836 register sets.
9837 (s390_check_regset): New function.
9838 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9839 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9840 Update target_regsets for available register sets.
9841
9842 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9843 Jan Kratochvil <jan.kratochvil@redhat.com>
9844
9845 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9846 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9847 New.
9848 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9849 * linux-low.h (struct process_info_private): New member r_debug.
9850 * server.c (handle_qxfer_libraries): Call
9851 the_target->qxfer_libraries_svr4.
9852 (handle_qxfer_libraries_svr4): New function.
9853 (qxfer_packets): New entry "libraries-svr4".
9854 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9855 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9856 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9857 PACKET_qXfer_libraries_svr4.
9858
9859 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9860
9861 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9862 PSW address/mask between 8-byte and 16-byte formats.
9863 (s390_supply_ptrace_register): Likewise.
9864 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9865 basic addressing mode bit.
9866
9867 2011-11-24 Stan Shebs <stan@codesourcery.com>
9868
9869 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9870
9871 2011-11-17 Stan Shebs <stan@codesourcery.com>
9872
9873 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9874 (tracing_start_time): New global.
9875 (tracing_stop_time): New global.
9876 (tracing_user_name): New global.
9877 (tracing_notes): New global.
9878 (tracing_stop_note): New global.
9879 (cmd_qtstart): Set traceframe_usage, start_time.
9880 (stop_tracing): Set stop_time.
9881 (cmd_qtstatus): Report additional status.
9882 (cmd_qtp): New function.
9883 (handle_tracepoint_query): Call it.
9884 (cmd_qtnotes): New function.
9885 (handle_tracepoint_general_set): Call it.
9886 (get_timestamp): Rename from tsv_get_timestamp.
9887
9888 2011-11-14 Stan Shebs <stan@codesourcery.com>
9889 Kwok Cheung Yeung <kcy@codesourcery.com>
9890
9891 * linux-x86-low.c (small_jump_insn): New.
9892 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9893 trampoline and error message, build a trampoline and issue a small
9894 jump instruction to it.
9895 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9896 trampoline and error message.
9897 (x86_get_min_fast_tracepoint_insn_len): New.
9898 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9899 * linux-low.h (struct linux_target_ops): Add arguments to
9900 install_fast_tracepoint_jump_pad operation, add new operation.
9901 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9902 arguments.
9903 (linux_get_min_fast_tracepoint_insn_len): New function.
9904 (linux_target_op): Add new operation.
9905 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9906 (gdb_trampoline_buffer_end): Ditto.
9907 (gdb_trampoline_buffer_error): Ditto.
9908 (struct ipa_sym_addresses): Add fields for new IPA variables.
9909 (symbol_list): Add entries for new IPA variables.
9910 (struct tracepoint): Add fields to hold the address range of the
9911 trampoline used by the tracepoint.
9912 (trampoline_buffer_head): New static variable.
9913 (trampoline_buffer_tail): Ditto.
9914 (claim_trampoline_space): New function.
9915 (have_fast_tracepoint_trampoline_buffer): New function.
9916 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9917 structure.
9918 (install_fast_tracepoint): Ditto, also add error buffer argument.
9919 (cmd_qtminftpilen): New function.
9920 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9921 (fast_tracepoint_from_trampoline_address): New function.
9922 (fast_tracepoint_collecting): Handle trampoline as part of jump
9923 pad space.
9924 (set_trampoline_buffer_space): New function.
9925 (initialize_tracepoint): Initialize new IPA variables.
9926 * target.h (struct target_ops): Add arguments to
9927 install_fast_tracepoint_jump_pad operation, add new
9928 get_min_fast_tracepoint_insn_len operation.
9929 (target_get_min_fast_tracepoint_insn_len): New.
9930 (install_fast_tracepoint_jump_pad): Add arguments.
9931 * server.h (IPA_BUFSIZ): Define.
9932 * linux-i386-ipa.c: Include extra header files.
9933 (initialize_fast_tracepoint_trampoline_buffer): New function.
9934 (initialize_low_tracepoint): Call it.
9935 * server.h (set_trampoline_buffer_space): Declare.
9936 (claim_trampoline_space): Ditto.
9937 (have_fast_tracepoint_trampoline_buffer): Ditto.
9938
9939 2011-11-14 Yao Qi <yao@codesourcery.com>
9940
9941 * server.c (handle_query): Handle InstallInTrace for qSupported.
9942 * tracepoint.c (add_tracepoint): Sort list.
9943 (install_tracepoint, download_tracepoint): New.
9944 (cmd_qtdp): Call them to install and download tracepoints.
9945 (sort_tracepoints): Removed.
9946 (cmd_qtstart): Update.
9947
9948 2011-11-14 Yao Qi <yao@codesourcery.com>
9949
9950 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9951 * mem-break.h: Declare.
9952 * tracepoint.c (cmd_qtstart): Move some code to ...
9953 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9954 New.
9955 (download_tracepoints): Move some code to ...
9956 (download_tracepoint_1): ... here. New.
9957
9958 2011-11-08 Yao Qi <yao@codesourcery.com>
9959
9960 * remote-utils.c (relocate_instruction): A comment fix.
9961
9962 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9963
9964 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9965 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9966 dr_status_mirror and dr_control_mirror from debug_reg_state.
9967 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9968 (i386_initial_stuff): Remove use of deleted globals.
9969 (i386_get_thread_context, i386_set_thread_context,
9970 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9971 from debug_reg_state.
9972
9973 2011-11-05 Yao Qi <yao@codesourcery.com>
9974
9975 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9976 address as TPOINT's.
9977
9978 2011-11-02 Stan Shebs <stan@codesourcery.com>
9979
9980 * tracepoint.c (agent_mem_read_string): New function.
9981 (eval_agent_expr): Call it for tracenz.
9982 * server.c (handle_query): Report support for tracenz.
9983
9984 2011-11-02 Yao Qi <yao@codesourcery.com>
9985
9986 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9987
9988 2011-11-02 Yao Qi <yao@codesourcery.com>
9989
9990 * target.h: Fix a typo in comment.
9991
9992 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9993
9994 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9995 clobber the breakpoints' shadows with fast tracepoint jumps.
9996 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9997 * target.c (write_inferior_memory): Also pass MYADDR down to
9998 check_mem_write.
9999
10000 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10001
10002 * configure.ac: Check support for personality routine.
10003 * configure: Regenerate.
10004 * config.in: Likewise.
10005 * linux-low.c: Include <sys/personality.h>.
10006 Define ADDR_NO_RANDOMIZE if necessary.
10007 (linux_create_inferior): Disable address space randomization when
10008 forking inferior, if requested.
10009 (linux_supports_disable_randomization): New function.
10010 (linux_target_ops): Install it.
10011 * server.h (disable_randomization): Declare.
10012 * server.c (disable_randomization): New global variable.
10013 (handle_general_set): Handle QDisableRandomization.
10014 (handle_query): Likewise for qSupported.
10015 (main): Support --disable-randomization and --no-disable-randomization
10016 command line arguments.
10017 * target.h (struct target_ops): Add supports_disable_randomization.
10018 (target_supports_disable_randomization): New macro.
10019
10020 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10021
10022 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10023 ifdef check.
10024 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10025 [!PT_GETDSBT] (target_loadmap): New definition.
10026 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10027 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10028 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10029 and PT_GETDSBT to LINUX_LOADMAP.
10030 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10031 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10032
10033 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10034
10035 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10036 (arm_linux_hwbp_cap): New static variable.
10037 (arm_linux_get_hwbp_cap): Replace by ...
10038 (arm_linux_init_hwbp_cap): ... this new function.
10039 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10040 (arm_linux_get_hw_watchpoint_count): Likewise.
10041 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10042 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10043 (arm_prepare_to_resume): Use perror_with_name instead of error.
10044
10045 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10046
10047 * linux-arm-low.c: Include <signal.h>.
10048 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10049 (struct arm_linux_hwbp_cap): New data type.
10050 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10051 (struct arm_linux_hw_breakpoint): New data type.
10052 (MAX_BPTS, MAX_WPTS): Define.
10053 (struct arch_process_info, struct arch_lwp_info): New data types.
10054 (arm_linux_get_hwbp_cap): New function.
10055 (arm_linux_get_hw_breakpoint_count): Likewise.
10056 (arm_linux_get_hw_watchpoint_count): Likewise.
10057 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10058 (arm_hwbp_control_initialize): Likewise.
10059 (arm_hwbp_control_is_enabled): Likewise.
10060 (arm_hwbp_control_is_initialized): Likewise.
10061 (arm_hwbp_control_disable): Likewise.
10062 (arm_linux_hw_breakpoint_equal): Likewise.
10063 (arm_linux_hw_point_initialize): Likewise.
10064 (struct update_registers_data): New data structure.
10065 (update_registers_callback: New function.
10066 (arm_insert_point): Likewise.
10067 (arm_remove_point): Likewise.
10068 (arm_stopped_by_watchpoint): Likewise.
10069 (arm_stopped_data_address): Likewise.
10070 (arm_new_process): Likewise.
10071 (arm_new_thread): Likewise.
10072 (arm_prepare_to_resume): Likewise.
10073 (the_low_target): Register arm_insert_point, arm_remove_point,
10074 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10075 arm_new_thread, and arm_prepare_to_resume.
10076
10077 2011-09-15 Stan Shebs <stan@codesourcery.com>
10078
10079 * server.h (struct emit_ops): Add compare-goto fields.
10080 * tracepoint.c (gdb_agent_op_sizes): New table.
10081 (emit_eq_goto): New function.
10082 (emit_ne_goto): New function.
10083 (emit_lt_goto): New function.
10084 (emit_le_goto): New function.
10085 (emit_gt_goto): New function.
10086 (emit_ge_goto): New function.
10087 (is_goto_target): New function.
10088 (compile_bytecodes): Recognize special cases of compare-goto
10089 combinations and call specialized emitters for them.
10090 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10091 (amd64_emit_ne_goto): New function.
10092 (amd64_emit_lt_goto): New function.
10093 (amd64_emit_le_goto): New function.
10094 (amd64_emit_gt_goto): New function.
10095 (amd64_emit_ge_goto): New function.
10096 (amd64_emit_ops): Add the new functions.
10097 (i386_emit_eq_goto): New function.
10098 (i386_emit_ne_goto): New function.
10099 (i386_emit_lt_goto): New function.
10100 (i386_emit_le_goto): New function.
10101 (i386_emit_gt_goto): New function.
10102 (i386_emit_ge_goto): New function.
10103 (i386_emit_ops): Add the new functions.
10104
10105 2011-09-08 Stan Shebs <stan@codesourcery.com>
10106
10107 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10108 (i386_emit_epilogue): Restore %ebx.
10109
10110 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10111
10112 * server.c (step_thread): Remove definition.
10113 (process_serial_event): Don't handle Hs.
10114 * server.h (step_thread): Remove declaration.
10115 * target.c (set_desired_inferior): Remove use of step_thread.
10116
10117 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10118
10119 * linux-low.c: Include linux-procfs.h.
10120 (linux_attach_lwp_1): Update comments.
10121 (linux_attach): Scan for existing threads when attaching to a
10122 process that is the tgid.
10123 * Makefile.in: Update dependencies.
10124
10125 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10126
10127 * configure.srv: Add linux-procfs.o dependencies.
10128
10129 2011-08-14 Yao Qi <yao@codesourcery.com>
10130
10131 * target.h (struct target_ops): Fix indent.
10132 * win32-low.c (win32_target_ops): Fix comment.
10133
10134 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10135 Yao Qi <yao@codesourcery.com>
10136
10137 * Makefile.in (clean): Remove tic6x-*.c files.
10138 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10139 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10140 (tic6x-c64xp-linux.c): Likewise.
10141 * configure.srv: Add support for tic6x-*-uclinux.
10142 * linux-tic6x-low.c: New.
10143 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10144
10145 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10146 Yao Qi <yao@codesourcery.com>
10147
10148 * target.h (struct target_ops): Add read_loadmap.
10149 * linux-low.c (struct target_loadseg): New type.
10150 (struct target_loadmap): New type.
10151 (linux_read_loadmap): New function.
10152 (linux_target_ops): Add linux_read_loadmap.
10153 * server.c (handle_query): Support qXfer:fdpic:read packet.
10154 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10155 to NULL.
10156
10157 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10158
10159 * win32-low.c: Include <stdint.h>.
10160
10161 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10162
10163 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10164 to the inferior here.
10165 (i386_remove_aligned_watchpoint): Ditto.
10166 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10167 fit part of the watchpoint in the debug registers.
10168 (i386_update_inferior_debug_regs): New.
10169 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10170 registers, and only update the inferior on success.
10171 (i386_low_remove_watchpoint): Ditto.
10172
10173 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10174
10175 * linux-low.c (compare_ints, unique, list_threads, show_process,
10176 linux_core_of_thread): Delete.
10177 (linux_target_ops): Change linux_core_of_thread to
10178 linux_common_core_of_thread.
10179 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10180 * utils.c (malloc_failure): Change type of argument.
10181 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10182 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10183 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10184 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10185 (IPA_OBJS): Add common-utils-ipa.o.
10186 (ptid_h, linux_osdata_h): New macros.
10187 (server_h): Add common/common-utils.h, common/xml-utils.h,
10188 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10189 common/ptid.h.
10190 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10191 ptid.o, buffer.o): New rules.
10192 (linux-low.o): Add common/linux-osdata.h as a dependency.
10193 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10194 * configure.ac: Add AC_HEADER_DIRENT check.
10195 * config.in: Regenerate.
10196 * configure: Regenerate.
10197 * remote-utils.c (xml_escape_text): Delete.
10198 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10199 buffer_xml_printf): Move to common/buffer.c.
10200 * server.c (main): Remove call to initialize_inferiors.
10201 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10202 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10203 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10204 internal_error, gdb_assert, gdb_assert_fail): Delete.
10205 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10206 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10207 common/buffer.h.
10208 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10209 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10210 initialize_inferiors): Delete.
10211
10212 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10213
10214 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10215 symbol error.
10216
10217 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10218
10219 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10220 assertion.
10221 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10222
10223 2011-05-26 Yao Qi <yao@codesourcery.com>
10224
10225 * Makefile.in (thread-db.o): Track dependence to
10226 common/gdb_thread_db.h.
10227 * thread-db.c: include gdb_thread_db.h from right place.
10228
10229 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10230
10231 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10232 __FILE__ and __LINE__ to internal_error.
10233
10234 2011-05-13 Doug Evans <dje@google.com>
10235
10236 * thread-db.c (try_thread_db_load_from_sdir): New function.
10237 (try_thread_db_load_from_dir): New function.
10238 (thread_db_load_search): Handle $sdir, ignore $pdir.
10239 Remove trying of system directories if search of
10240 libthread-db-search-path fails, that is now done via $sdir.
10241
10242 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10243
10244 * server.c (handle_query): Add EnableDisableTracepoints to the list
10245 of supported features.
10246 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10247 tracepoints.
10248 (cmd_qtenable_disable): New.
10249 (cmd_qtstart): Install tracepoints even if disabled.
10250 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10251 receiving a QTEnable or QTDisable packet.
10252 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10253 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10254 tracepoints.
10255 (gdb_probe): Skip data collection if static tracepoint is disabled.
10256
10257 2011-05-10 Doug Evans <dje@google.com>
10258
10259 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10260
10261 2011-05-04 Doug Evans <dje@google.com>
10262
10263 * linux-low.c (linux_join): Skip process lookup.
10264 * spu-low.c (spu_join): Ditto.
10265 * server.c (join_inferiors_callback): Delete.
10266 (process_serial_event): For 'D' packet (detach) call join_inferior
10267 directly.
10268
10269 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10270
10271 * README: Don't mention xscale*-*-linux*.
10272 * configure.srv (xscale*-*-linux*): Don't handle target.
10273
10274 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10275
10276 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10277 casting pointers.
10278 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10279 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10280 (i386_emit_void_call_2): Likewise.
10281
10282 2011-04-26 Yao Qi <yao@codesourcery.com>
10283
10284 * linux-low.c: Move common macros to linux-ptrace.h.
10285 Include linux-ptrace.h.
10286 * Makefile.in (linux_ptrace_h): New.
10287 (linux-low.o): Depends on linux-ptrace.h.
10288
10289 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10290
10291 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10292 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10293 (remote_prepare): New function with most of the TCP code from ...
10294 (remote_open): ... here. Detect PORT here unconditionally. Move also
10295 setting transport_is_reliable.
10296 * server.c (run_once): New variable.
10297 (gdbserver_usage): Document it.
10298 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10299 the first run if RUN_ONCE.
10300 * server.h (run_once, remote_prepare): New declarations.
10301
10302 2011-04-19 Tom Tromey <tromey@redhat.com>
10303
10304 * win32-low.c (handle_load_dll): Remove duplicate "the".
10305
10306 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10307
10308 Remove support for old Cygwin 1.5 versions.
10309 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10310 function to avoid warning.
10311 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10312 warning.
10313
10314 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10315
10316 * gdbserver/server.h (Macro _): Define it if not available.
10317
10318 2011-03-14 Michael Snyder <msnyder@vmware.com>
10319
10320 * hostio.c (handle_close): Remove unnecessary null test.
10321
10322 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10323
10324 * Makefile.in (maintainer-clean realclean distclean): Remove
10325 "make ... subdir_do" command.
10326
10327 2011-03-10 Michael Snyder <msnyder@vmware.com>
10328
10329 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10330
10331 * server.c (handle_v_run): Free alloced buffer on early return.
10332
10333 2011-03-09 Yao Qi <yao@codesourcery.com>
10334
10335 Revert:
10336 2011-03-04 Yao Qi <yao@codesourcery.com>
10337
10338 * Makefile.in: Remove GNU make feature --directory.
10339
10340 2011-03-05 Yao Qi <yao@codesourcery.com>
10341
10342 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10343 (subdir_do): New make target. Copied from gdb/Makefile.
10344 (maintainer-clean, realclean, distclean, clean): Call corresponding
10345 make targets in common/Makefile.
10346
10347 2011-02-11 Yao Qi <yao@codesourcery.com>
10348
10349 * configure.ac: Call AC_PROG_RANLIB.
10350 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10351 * configure: Regenerate.
10352
10353 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10354
10355 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10356
10357 2011-03-06 Yao Qi <yao@codesourcery.com>
10358
10359 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10360
10361 2011-03-05 Yao Qi <yao@codesourcery.com>
10362
10363 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10364 (subdir_do): New make target. Copied from gdb/Makefile.
10365 (maintainer-clean, realclean, distclean, clean): Call corresponding
10366 make targets in common/Makefile.
10367
10368 2011-03-04 Yao Qi <yao@codesourcery.com>
10369
10370 * Makefile.in: Remove GNU make feature --directory.
10371
10372 2011-03-04 Michael Snyder <msnyder@vmware.com>
10373
10374 * server.c (queue_stop_reply): Call xmalloc not malloc.
10375
10376 2011-03-02 Michael Snyder <msnyder@vmware.com>
10377
10378 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10379
10380 2011-02-28 Michael Snyder <msnyder@vmware.com>
10381
10382 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10383 (cmd_qtframe): Ditto.
10384 (cmd_qtbuffer): Ditto.
10385 (cmd_bigqtbuffer): Ditto.
10386
10387 * utils.c (decimal2str): Initialize 'width' to nine, then
10388 don't mess with it.
10389
10390 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10391
10392 * hostio.c (require_data): Free *data, not data.
10393
10394 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10395
10396 * hostio.c (require_data): Use free, not xfree.
10397
10398 2011-02-27 Michael Snyder <msnyder@vmware.com>
10399
10400 * server.c (handle_query): Discard unused value.
10401
10402 * hostio.c (require_data): Free malloc memory before returning
10403 error.
10404
10405 2011-02-26 Michael Snyder <msnyder@vmware.com>
10406
10407 * linux-low.c (list_threads): Call closedir for dirent.
10408
10409 2011-02-27 Michael Snyder <msnyder@vmware.com>
10410
10411 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10412 a case statement falls through.
10413
10414 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10415
10416 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10417 in comparison.
10418
10419 2011-02-26 Michael Snyder <msnyder@vmware.com>
10420
10421 * utils.c (decimal2str): Eliminate dead code and dead param.
10422 (pulongest): Drop dead param from call to decimal2str.
10423 (plongest): Ditto.
10424
10425 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10426
10427 Revert the following patch (not approved yet):
10428 2011-02-21 Hui Zhu <teawater@gmail.com>
10429 * tracepoint.c (tp_printf): New function.
10430 (eval_agent_expr): Handle gdb_agent_op_printf.
10431
10432 2011-02-21 Hui Zhu <teawater@gmail.com>
10433
10434 * tracepoint.c (tp_printf): New function.
10435 (eval_agent_expr): Handle gdb_agent_op_printf.
10436
10437 2011-02-18 Tom Tromey <tromey@redhat.com>
10438
10439 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10440 (tracepoint.o): Likewise.
10441 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10442 (gdb_agent_op_names): Likewise.
10443
10444 2011-02-18 Tom Tromey <tromey@redhat.com>
10445
10446 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10447 gdb_agent_op_rot>: New constants.
10448 (gdb_agent_op_names): Add pick and roll.
10449 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10450 cases.
10451
10452 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10453
10454 * aclocal.m4: Regenerated with aclocal-1.11.1.
10455
10456 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10457
10458 * server.c (handle_qxfer_traceframe_info): New.
10459 (qxfer_packets): Register "traceframe-info".
10460 (handle_query): Report support for qXfer:traceframe-info:read+.
10461 * tracepoint.c (match_blocktype): New.
10462 (traceframe_find_block_type): Rename to ...
10463 (traceframe_walk_blocks): ... this. Add callback filter argument,
10464 and use it.
10465 (traceframe_find_block_type): New, reimplemented on top of
10466 traceframe_walk_blocks.
10467 (build_traceframe_info_xml): New.
10468 (traceframe_read_info): New.
10469 * server.h (traceframe_read_info): Declare.
10470
10471 2011-02-11 Yao Qi <yao@codesourcery.com>
10472
10473 * configure.ac: Call AC_PROG_RANLIB.
10474 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10475 * configure: Regenerate.
10476
10477 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10478
10479 * server.c (gdb_read_memory): Change return semantics to allow
10480 partial transfers.
10481 (handle_search_memory_1): Adjust.
10482 (process_serial_event) <'m' packet>: Handle partial transfers.
10483 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10484
10485 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10486
10487 * regcache.c (init_register_cache): Initialize
10488 regcache->register_status.
10489 (free_register_cache): Release regcache->register_status.
10490 (regcache_cpy): Copy register_status.
10491 (registers_to_string): Print 'x's for unavailable registers.
10492 (supply_register): Mark the register's status valid or
10493 unavailable, depending on whether a buffer was passed in or not.
10494 (supply_register_zeroed): New.
10495 (supply_regblock): Mark the registers' status valid or
10496 unavailable, depending on whether a buffer was passed in or not.
10497 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10498 (struct regcache): New `register_status' field.
10499 (supply_register_zeroed): Declare.
10500 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10501 supply_register_zeroed, rather than passing a NULL buffer to
10502 supply_register.
10503 * tracepoint.c (fetch_traceframe_registers): Update comment.
10504
10505 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10506
10507 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10508 buffer explicit.
10509
10510 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10511
10512 * server.h (decode_xfer_write): Change prototype.
10513 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10514 and don't extract the annex here.
10515 * server.c (decode_xfer_read): Remove `annex' parameter,
10516 and don't extract the annex here.
10517 (decode_xfer): New.
10518 (struct qxfer): New.
10519 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10520 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10521 (handle_qxfer_statictrace): New functions, abstracted out from
10522 handle_query, and made to use the struct qxfer interface.
10523 (handle_threads_qxfer_proper): Rename to ...
10524 (handle_qxfer_threads_proper): ... this.
10525 (handle_threads_qxfer): Rename to ...
10526 (handle_qxfer_threads): ... this. Adjust.
10527 (qxfer_packets): New array.
10528 (handle_qxfer): New function.
10529 (handle_query): Use handle_qxfer.
10530
10531 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10532
10533 * gdbreplay.c: Shorten lines of >= 80 columns.
10534 * linux-low.c: Ditto.
10535 * linux-ppc-low.c: Ditto.
10536 * linux-s390-low.c: Ditto.
10537 * linux-sparc-low.c: Ditto.
10538 * linux-x86-low.c: Ditto.
10539 * linux-xtensa-low.c: Ditto.
10540 * mem-break.c: Ditto.
10541 * nto-low.c: Ditto.
10542 * regcache.h: Ditto.
10543 * remote-utils.c: Ditto.
10544 * server.c: Ditto.
10545 * server.h: Ditto.
10546 * thread-db.c: Ditto.
10547 * tracepoint.c: Ditto.
10548 * utils.c: Ditto.
10549 * win32-low.h: Ditto.
10550
10551 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10552
10553 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10554 update.
10555
10556 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10557
10558 * server.c (gdbserver_version): Update copyright year in version
10559 output.
10560 * gdbreplay.c (gdbreplay_version): Ditto.
10561
10562 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10563
10564 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10565 * linux-bfin-low.c: New file.
10566 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10567 PT_DATA_ADDR for BFIN targets.
10568 * Makefile.in (SFILES): Add linux-bfin-low.c.
10569 (clean): Remove reg-bfin.c.
10570 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10571 * README: Mention supported Blackfin targets.
10572
10573 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10574
10575 * .gitignore: New file.
10576
10577 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10578
10579 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10580
10581 2010-10-22 Jie Zhang <jie@codesourcery.com>
10582
10583 * Makefile.in: Add FLAGS_TO_PASS variable.
10584 (install): Remove dependency of install-only and recursively
10585 invoke make for install-only.
10586
10587 2010-10-04 Doug Evans <dje@google.com>
10588
10589 * Makefile.in (uninstall): Use $(DESTDIR).
10590
10591 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10592
10593 PR gdb/11842
10594
10595 * linux-x86-low.c (compat_siginfo_from_siginfo)
10596 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10597 si_code is < 0. Check for si_code == SI_TIMER before checking for
10598 si_code < 0.
10599
10600 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10601
10602 * lynx-i386-low.c: New file.
10603 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10604
10605 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10606
10607 * lynx-low.c (ptrace_request_to_str): Remove handling for
10608 request values that have been removed in LynxOS 5.x.
10609
10610 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10611
10612 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10613 <ptrace.h>
10614
10615 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10616
10617 * configure.ac: Add --enable-inprocess-agent option.
10618 * configure: Rebuilt.
10619
10620 2010-09-06 Yao Qi <yao@codesourcery.com>
10621
10622 * linux-low.c (linux_kill): Remove unused variable.
10623 (linux_stabilize_threads): Likewise.
10624 * server.c (start_inferior): Likewise.
10625 (queue_stop_reply_callback): Likewise.
10626 * tracepoint.c (do_action_at_tracepoint): Likewise.
10627
10628 2010-09-06 Yao Qi <yao@codesourcery.com>
10629
10630 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10631 on return.
10632
10633 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10634
10635 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10636
10637 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10638
10639 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10640 "$(IPA_DEPFILES)".
10641
10642 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10643
10644 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10645 gdbserver/lynx-ppc-low.c: New files.
10646 * Makefile.in (lynx_low_h): New variable.
10647 (lynx-low.o, lynx-ppc-low.o): New rules.
10648 * configure.ac: On LynxOS, link with -lnetinet.
10649 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10650 * configure: regenerate.
10651
10652 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10653
10654 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10655 * configure.ac: Add check for vasprintf and vsnprintf.
10656 * configure, config.in: Regenerate.
10657 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10658
10659 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10660
10661 * gdbreplay.c: Move include of alloca.h up, next to include of
10662 malloc.h.
10663 * server.h: Add include of malloc.h.
10664 * mem-break.c: Remove include of malloc.h.
10665 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10666
10667 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10668
10669 * Makefile.in (memmem.o): Build with -Wno-error.
10670
10671 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10672
10673 * utils.c (xsnprintf): Make non-static.
10674 * server.h: Add xsnprintf declaration.
10675 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10676 replace calls to snprintf by calls to xsnprintf throughout.
10677
10678 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10679
10680 * configure.ac: Add configure check for alloca.
10681 * configure, config.in: Regenerate.
10682 * server.h: Include alloca.h if it exists.
10683 * gdbreplay.c: Include alloca.h if it exists.
10684
10685 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10686
10687 * linux-low.c (__SIGRTMIN): Define if not already defined.
10688 (linux_create_inferior): Check for __ANDROID__ rather than
10689 __SIGRTMIN.
10690 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10691 are already deferred.
10692 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10693 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10694 stopped and already has a pending signal to report.
10695 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10696 a pending signal to report or is moving out of a jump pad.
10697 (linux_init_signals): Check for __ANDROID__ rather than
10698 __SIGRTMIN.
10699
10700 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10701
10702 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10703 debug_threads check. Avoid a linear search when not doing debug
10704 output.
10705
10706 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10707
10708 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10709 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10710 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10711 (process_event): Change local fd's type to gdb_fildes_t.
10712 (create_file_handler): Adjust prototype.
10713 (delete_file_handler): Adjust prototype.
10714 (handle_file_event): Adjust prototype. Use pfildes.
10715 (create_file_event): Adjsut prototype.
10716 * remote-utils.c (remote_desc, listen_desc): Change type to
10717 gdb_fildes_t.
10718 * server.h: New gdb_fildes_t typedef.
10719 [USE_WIN32API]: Include winsock2.h.
10720 (delete_file_handler, add_file_handler): Adjust prototypes.
10721 (pfildes): Declare.
10722 * utils.c (pfildes): New.
10723
10724 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10725
10726 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10727 * configure: Regenerate.
10728
10729 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10730
10731 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10732 (linux_done_accessing_memory): ... this.
10733 (linux_target_ops): Adjust.
10734 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10735 * nto-low.c (nto_target_ops): Adjust comment.
10736 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10737 * spu-low.c (spu_target_ops): Adjust comment.
10738 * target.h (target_ops): Rename unprepare_to_access_memory field
10739 to done_accessing_memory.
10740 (unprepare_to_access_memory): Rename to ...
10741 (done_accessing_memory): ... this.
10742
10743 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10744
10745 * linux-low.c (linux_prepare_to_access_memory): New.
10746 (linux_unprepare_to_access_memory): New.
10747 (linux_target_ops): Install them.
10748 * server.c (read_memory): Rename to ...
10749 (gdb_read_memory): ... this. Use
10750 prepare_to_access_memory/prepare_to_access_memory.
10751 (write_memory): Rename to ...
10752 (gdb_write_memory): ... this. Use
10753 prepare_to_access_memory/prepare_to_access_memory.
10754 (handle_search_memory_1): Adjust.
10755 (process_serial_event): Adjust.
10756 * target.h (struct target_ops): New fields
10757 prepare_to_access_memory and unprepare_to_access_memory.
10758 (prepare_to_access_memory, unprepare_to_access_memory): New.
10759 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10760 prepare_to_access_memory/prepare_to_access_memory.
10761 * nto-low.c (nto_target_ops): Adjust.
10762 * spu-low.c (spu_target_ops): Adjust.
10763 * win32-low.c (win32_target_ops): Adjust.
10764
10765 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10766
10767 * Makefile.in (WARN_CFLAGS): Get it from configure.
10768 (WERROR_CFLAGS): New.
10769 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10770 * configure.ac: Introduce --enable-werror, which adds -Werror to
10771 the compiler command line. Enabled by default. Disable with
10772 --disable-werror. Add -Wdeclaration-after-statement
10773 Wpointer-arith and -Wformat-nonliteral to warning flags.
10774 * configure: Regenerate.
10775
10776 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10777
10778 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10779
10780 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10781
10782 * gdbreplay.c (remote_error): New.
10783 (gdbchar): New.
10784 (expect): Use gdbchar. Check for error reading from GDB.
10785 Clarify sync error output.
10786 (play): Check for errors writing to GDB.
10787 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10788 * remote-utils.c (getpkt): Check for errors writing to the remote
10789 descriptor.
10790
10791 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10792
10793 * linux-low.c (linux_wait_1): Move non-debugging code out of
10794 `debug_threads' control.
10795
10796 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10797
10798 * linux-low.c (linux_wait_1): Don't set last_status here.
10799 * server.c (push_event, queue_stop_reply_callback): Assert we're
10800 not pushing a TARGET_WAITKIND_IGNORE event.
10801 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10802 (myresume, handle_target_event): Set the thread's last_resume_kind
10803 and last_status from the target returned status.
10804
10805 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10806
10807 PR threads/10729
10808
10809 * linux-x86-low.c (update_debug_registers_callback): New.
10810 (i386_dr_low_set_addr): Use it.
10811 (i386_dr_low_get_addr): New.
10812 (i386_dr_low_set_control): Use update_debug_registers_callback.
10813 (i386_dr_low_get_control): New.
10814 (i386_dr_low_get_status): Adjust.
10815 * linux-low.c (linux_stop_lwp): New.
10816 * linux-low.h (linux_stop_lwp): Declare.
10817
10818 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10819 argument instead of a i386_debug_reg_state.
10820 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10821 a i386_debug_reg_state.
10822 (i386_insert_aligned_watchpoint): Adjust.
10823 (i386_remove_aligned_watchpoint): Adjust.
10824 (i386_low_stopped_data_address): Read the debug registers from the
10825 inferior instead of from the mirrors.
10826 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10827 (i386_dr_low_get_addr): Declare.
10828 (i386_dr_low_get_control): Declare.
10829 (i386_dr_low_get_status): Change prototype.
10830
10831 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10832 (i386_dr_low_get_addr): New.
10833 (i386_dr_low_get_control): New.
10834 (i386_dr_low_get_status): Adjust prototype. Return
10835 dr_status_mirror.
10836 (i386_initial_stuff): Clear dr_status_mirror and
10837 dr_control_mirror.
10838 (i386_get_thread_context): Adjust.
10839 (i386_set_thread_context): Adjust.
10840 (i386_thread_added): Adjust.
10841
10842 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10843
10844 * linux-low.h (linux_thread_area): Delete declaration.
10845
10846 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10847
10848 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10849 after its termination.
10850
10851 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10852
10853 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10854 (gdb_wants_all_stopped): Delete.
10855 (linux_wait_1): Don't call them.
10856 * server.c (handle_v_cont): Tag all threads as want-stopped.
10857 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10858 stopped as "client-wants-stopped".
10859
10860 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10861
10862 * Makefile.in (signals_h): New.
10863 (server_h): Depend on it.
10864 (server.o): Don't depend on $(signals_def).
10865 (signals.o): Depend on $(signals_def).
10866
10867 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10868
10869 * Makefile.in (signals_def): New.
10870 (server_h): Append include/gdb/signals.h and signals_def.
10871 (server.o): Append signals_def.
10872
10873 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10874
10875 * server.c (handle_target_event): Use target_signal_to_host for
10876 resume_info.sig initialization.
10877 * target.h (struct thread_resume) <sig>: New comment.
10878
10879 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10880
10881 * server.c (handle_query): strcpy() the returned string from paddress()
10882 instead of sprintf().
10883 * utils.c (paddress): Return phex_nz().
10884
10885 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10886
10887 * server.c (handle_v_cont): Call mourn_inferior if process
10888 just exited.
10889 (myresume): Likewise.
10890
10891 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10892
10893 Static tracepoints, and integration with UST.
10894
10895 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10896 * mem-break.c (uninsert_all_breakpoints)
10897 (reinsert_all_breakpoints): New.
10898 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10899 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10900 (gdb_agent_ust_loaded, helper_thread_id)
10901 (gdb_agent_helper_thread_id): New macros.
10902 (struct ipa_sym_addresses): Add addr_ust_loaded,
10903 addr_helper_thread_id, addr_cmd_buf.
10904 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10905 (in_process_agent_loaded_ust): New.
10906 (write_e_ust_not_loaded): New.
10907 (maybe_write_ipa_ust_not_loaded): New.
10908 (struct collect_static_trace_data_action): New.
10909 (enum tracepoint_type) <static_tracepoint>: New.
10910 (struct tracepoint) <handle>: Mention static tracepoints.
10911 (struct static_tracepoint_ctx): New.
10912 (CMD_BUF_SIZE): New.
10913 (add_tracepoint_action): Handle static tracepoint actions.
10914 (unprobe_marker_at): New.
10915 (clear_installed_tracepoints): Handle static tracepoints.
10916 (cmd_qtdp): Handle static tracepoints.
10917 (probe_marker_at): New.
10918 (cmd_qtstart): Handle static tracepoints.
10919 (response_tracepoint): Handle static tracepoints.
10920 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10921 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10922 (get_context_regcache): Handle static tracepoints.
10923 (do_action_at_tracepoint): Handle static tracepoint actions.
10924 (traceframe_find_block_type): Handle static trace data blocks.
10925 (traceframe_read_sdata): New.
10926 (download_tracepoints): Download static tracepoint actions.
10927 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10928 (GDB_PROBE_NAME): New.
10929 (ust_ops): New.
10930 (GET_UST_SYM): New.
10931 (USTF): New.
10932 (dlsym_ust): New.
10933 (ust_marker_to_static_tracepoint): New.
10934 (gdb_probe): New.
10935 (collect_ust_data_at_tracepoint): New.
10936 (gdb_ust_probe): New.
10937 (UNIX_PATH_MAX, SOCK_DIR): New.
10938 (gdb_ust_connect_sync_socket): New.
10939 (resume_thread, stop_thread): New.
10940 (run_inferior_command): New.
10941 (init_named_socket): New.
10942 (gdb_ust_socket_init): New.
10943 (cstr_to_hexstr): New.
10944 (next_st): New.
10945 (first_marker, next_marker): New.
10946 (response_ust_marker): New.
10947 (cmd_qtfstm, cmd_qtsstm): New.
10948 (unprobe_marker_at, probe_marker_at): New.
10949 (cmd_qtstmat, gdb_ust_thread): New.
10950 (gdb_ust_init): New.
10951 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10952 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10953 (ST_REGENTRY): New.
10954 (x86_64_st_collect_regmap): New.
10955 (X86_64_NUM_ST_COLLECT_GREGS): New.
10956 (AMD64_RIP_REGNUM): New.
10957 (supply_static_tracepoint_registers): New.
10958 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10959 (ST_REGENTRY): New.
10960 (i386_st_collect_regmap): New.
10961 (i386_NUM_ST_COLLECT_GREGS): New.
10962 (supply_static_tracepoint_registers): New.
10963 * server.c (handle_query): Handle qXfer:statictrace:read.
10964 <qSupported>: Report support for StaticTracepoints, and
10965 qXfer:statictrace:read features.
10966 * server.h (traceframe_read_sdata)
10967 (supply_static_tracepoint_registers): Declare.
10968 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10969 (unpack_varlen_hex): Include in IPA build.
10970 * Makefile.in (ustlibs, ustinc): New.
10971 (IPA_OBJS): Add remote-utils-ipa.o.
10972 ($(IPA_LIB)): Link -ldl and -lpthread.
10973 (UST_CFLAGS): New.
10974 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10975 * config.in, configure: Regenerate.
10976
10977 2010-06-20 Ian Lance Taylor <iant@google.com>
10978 Pedro Alves <pedro@codesourcery.com>
10979
10980 * linux-x86-low.c (always_true): Delete.
10981 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10982 trying to fool the compiler with always_true.
10983
10984 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10985
10986 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10987 conditions in gdbserver.
10988
10989 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10990
10991 * spu-low.c (spu_read_memory): Wrap around local store limit.
10992 (spu_write_memory): Likewise.
10993
10994 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10995
10996 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10997 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10998 LONGEST uses.
10999 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11000 uses.
11001 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11002 uses with LONGEST uses.
11003
11004 2010-06-14 Stan Shebs <stan@codesourcery.com>
11005 Pedro Alves <pedro@codesourcery.com>
11006
11007 Bytecode compiler.
11008
11009 * linux-x86-low.c: Include limits.h.
11010 (add_insns): New.
11011 (always_true): New.
11012 (EMIT_ASM): New.
11013 (EMIT_ASM32): New.
11014 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11015 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11016 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11017 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11018 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11019 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11020 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11021 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11022 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11023 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11024 (amd64_emit_void_call_2): New.
11025 (amd64_emit_ops): New.
11026 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11027 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11028 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11029 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11030 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11031 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11032 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11033 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11034 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11035 (i386_emit_stack_adjust, i386_emit_int_call_1)
11036 (i386_emit_void_call_2): New.
11037 (i386_emit_ops): New.
11038 (x86_emit_ops): New.
11039 (the_low_target): Install x86_emit_ops.
11040 * server.h (struct emit_ops): New.
11041 (get_raw_reg_func_addr): Declare.
11042 (current_insn_ptr, emit_error): Declare.
11043 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11044 (set_trace_state_variable_value): New defines.
11045 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11046 addr_get_trace_state_variable_value and
11047 addr_set_trace_state_variable_value.
11048 (symbol_list): New fields for get_raw_reg,
11049 get_trace_state_variable_value and set_trace_state_variable_value.
11050 (condfn): New typedef.
11051 (struct tracepoint): New field `compiled_cond'.
11052 (do_action_at_tracepoint): Clear compiled_cond.
11053 (get_trace_state_variable_value, set_trace_state_variable_value):
11054 Export in the IPA.
11055 (condition_true_at_tracepoint): If there's a compiled condition,
11056 run that.
11057 (current_insn_ptr, emit_error): New globals.
11058 (struct bytecode_address): New.
11059 (get_raw_reg_func_addr): New.
11060 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11061 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11062 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11063 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11064 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11065 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11066 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11067 (compile_tracepoint_condition, compile_bytecodes): New.
11068 * target.h (emit_ops): Forward declare.
11069 (struct target_ops): New field emit_ops.
11070 (target_emit_ops): New.
11071 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11072 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11073 * linux-low.c (linux_emit_ops): New.
11074 (linux_target_ops): Install it.
11075 * linux-low.h (struct linux_target_ops): New field emit_ops.
11076
11077 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11078
11079 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11080 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11081
11082 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11083 Stan Shebs <stan@codesourcery.com>
11084
11085 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11086 (all): Depend on $(extra_libraries).
11087 (install-only): Install the IPA.
11088 (IPA_OBJS, IPA_LIB): New.
11089 (clean): Remove the IPA lib.
11090 (IPAGENT_CFLAGS): New.
11091 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11092 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11093 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11094 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11095 * configure.ac: Check for atomic builtins support in the compiler.
11096 (IPA_DEPFILES, extra_libraries): Define.
11097 * configure.srv (ipa_obj): Add description.
11098 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11099 (i[34567]86-*-linux*): Set ipa_obj.
11100 (x86_64-*-linux*): Set ipa_obj.
11101 * linux-low.c (stabilizing_threads): New.
11102 (supports_fast_tracepoints): New.
11103 (linux_detach): Stabilize threads before detaching.
11104 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11105 the lwp is either not stabilizing, or is moving out of a jump pad.
11106 (linux_fast_tracepoint_collecting): New.
11107 (maybe_move_out_of_jump_pad): New.
11108 (enqueue_one_deferred_signal): New.
11109 (dequeue_one_deferred_signal): New.
11110 (linux_wait_for_event_1): If moving out of a jump pad, defer
11111 pending signals to later.
11112 (linux_stabilize_threads): New.
11113 (linux_wait_1): Check if threads need moving out of jump pads, and
11114 do it if so.
11115 (stuck_in_jump_pad_callback): New.
11116 (move_out_of_jump_pad_callback): New.
11117 (lwp_running): New.
11118 (linux_resume_one_lwp): Handle moving out of jump pads.
11119 (linux_set_resume_request): Dequeue deferred signals.
11120 (need_step_over_p): Also step over fast tracepoint jumps.
11121 (start_step_over): Also uninsert fast tracepoint jumps.
11122 (finish_step_over): Also reinsert fast tracepoint jumps.
11123 (linux_install_fast_tracepoint_jump): New.
11124 (linux_target_ops): Install linux_stabilize_threads and
11125 linux_install_fast_tracepoint_jump_pad.
11126 * linux-low.h (linux_target_ops) <get_thread_area,
11127 install_fast_tracepoint_jump_pad>: New fields.
11128 (struct lwp_info) <collecting_fast_tracepoint,
11129 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11130 (linux_get_thread_area): Declare.
11131 * linux-x86-low.c (jump_insn): New.
11132 (x86_get_thread_area): New.
11133 (append_insns): New.
11134 (push_opcode): New.
11135 (amd64_install_fast_tracepoint_jump_pad): New.
11136 (i386_install_fast_tracepoint_jump_pad): New.
11137 (x86_install_fast_tracepoint_jump_pad): New.
11138 (the_low_target): Install x86_get_thread_area and
11139 x86_install_fast_tracepoint_jump_pad.
11140 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11141 (struct fast_tracepoint_jump): New.
11142 (fast_tracepoint_jump_insn): New.
11143 (fast_tracepoint_jump_shadow): New.
11144 (find_fast_tracepoint_jump_at): New.
11145 (fast_tracepoint_jump_here): New.
11146 (delete_fast_tracepoint_jump): New.
11147 (set_fast_tracepoint_jump): New.
11148 (uninsert_fast_tracepoint_jumps_at): New.
11149 (reinsert_fast_tracepoint_jumps_at): New.
11150 (set_breakpoint_at): Use write_inferior_memory.
11151 (uninsert_raw_breakpoint): Use write_inferior_memory.
11152 (check_mem_read): Mask out fast tracepoint jumps.
11153 (check_mem_write): Mask out fast tracepoint jumps.
11154 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11155 (set_fast_tracepoint_jump): Declare.
11156 (delete_fast_tracepoint_jump)
11157 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11158 (reinsert_fast_tracepoint_jumps_at): Declare.
11159 * regcache.c: Don't compile many functions when building the
11160 in-process agent library.
11161 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11162 the register buffer in the heap.
11163 (free_register_cache): If the register buffer isn't owned by the
11164 regcache, don't free it.
11165 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11166 pre-existing register caches.
11167 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11168 type.
11169 (convert_ascii_to_int): : Constify `from' parameter type.
11170 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11171 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11172 the needed buffer in-place.
11173 (relocate_instruction): New.
11174 * server.c (handle_query) <qSymbols>: If the target supports
11175 tracepoints, give it a chance of looking up symbols. Report
11176 support for fast tracepoints.
11177 (handle_status): Stabilize threads.
11178 (process_serial_event): Adjust.
11179 * server.h (struct fast_tracepoint_jump): Forward declare.
11180 (struct process_info) <fast_tracepoint_jumps>: New field.
11181 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11182 (decode_X_packet, decode_M_packet): Adjust.
11183 (relocate_instruction): Declare.
11184 (in_process_agent_loaded): Declare.
11185 (tracepoint_look_up_symbols): Declare.
11186 (struct fast_tpoint_collect_status): Declare.
11187 (fast_tracepoint_collecting): Declare.
11188 (force_unlock_trace_buffer): Declare.
11189 (handle_tracepoint_bkpts): Declare.
11190 (initialize_low_tracepoint)
11191 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11192 * target.h (struct target_ops) <stabilize_threads,
11193 install_fast_tracepoint_jump_pad>: New fields.
11194 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11195 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11196 [HAVE_STDINT_H]: Include stdint.h.
11197 (trace_debug_1): Rename to ...
11198 (trace_vdebug): ... this.
11199 (trace_debug): Rename to ...
11200 (trace_debug_1): ... this. Add `level' parameter.
11201 (trace_debug): New.
11202 (ATTR_USED, ATTR_NOINLINE): New.
11203 (IP_AGENT_EXPORT): New.
11204 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11205 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11206 (about_to_request_buffer_space, trace_buffer_is_full)
11207 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11208 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11209 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11210 (traceframe_write_count, traceframes_created)
11211 (trace_state_variables)
11212 New renaming defines.
11213 (struct ipa_sym_addresses): New.
11214 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11215 (symbol_list): New.
11216 (ipa_sym_addrs): New.
11217 (all_tracepoint_symbols_looked_up): New.
11218 (in_process_agent_loaded): New.
11219 (write_e_ipa_not_loaded): New.
11220 (maybe_write_ipa_not_loaded): New.
11221 (tracepoint_look_up_symbols): New.
11222 (debug_threads) [IN_PROCESS_AGENT]: New.
11223 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11224 (UNKNOWN_SIDE_EFFECTS): New.
11225 (stop_tracing): New.
11226 (flush_trace_buffer): New.
11227 (stop_tracing_bkpt): New.
11228 (flush_trace_buffer_bkpt): New.
11229 (read_inferior_integer): New.
11230 (read_inferior_uinteger): New.
11231 (read_inferior_data_pointer): New.
11232 (write_inferior_data_pointer): New.
11233 (write_inferior_integer): New.
11234 (write_inferior_uinteger): New.
11235 (struct collect_static_trace_data_action): Delete.
11236 (enum tracepoint_type): New.
11237 (struct tracepoint) <type>: New field `type'.
11238 <actions_str, step_actions, step_actions_str>: Only include in
11239 GDBserver.
11240 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11241 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11242 (tracepoints): Use IP_AGENT_EXPORT.
11243 (last_tracepoint): Don't include in the IPA.
11244 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11245 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11246 (alloced_trace_state_variables): New.
11247 (trace_state_variables): Use IP_AGENT_EXPORT.
11248 (traceframe_t): Delete unused variable.
11249 (circular_trace_buffer): Don't include in the IPA.
11250 (trace_buffer_start): Delete.
11251 (struct trace_buffer_control): New.
11252 (trace_buffer_free): Delete.
11253 (struct ipa_trace_buffer_control): New.
11254 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11255 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11256 New.
11257 (trace_buffer_ctrl): New.
11258 (TRACE_BUFFER_CTRL_CURR): New.
11259 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11260 Reimplement as macros.
11261 (trace_buffer_wrap): Delete.
11262 (traceframe_write_count, traceframe_read_count)
11263 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11264 (struct tracepoint_hit_ctx) <type>: New field.
11265 (struct fast_tracepoint_ctx): New.
11266 (memory_barrier): New.
11267 (cmpxchg): New.
11268 (record_tracepoint_error): Update atomically in the IPA.
11269 (clear_inferior_trace_buffer): New.
11270 (about_to_request_buffer_space): New.
11271 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11272 updating the same buffer.
11273 (add_tracepoint): Default the tracepoint's type to trap
11274 tracepoint, and orig_size to -1.
11275 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11276 internal variables.
11277 (create_trace_state_variable): New parameter `gdb'. Handle it.
11278 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11279 (cmd_qtdp): Handle fast tracepoints.
11280 (cmd_qtdv): Adjust.
11281 (max_jump_pad_size): New.
11282 (gdb_jump_pad_head): New.
11283 (get_jump_space_head): New.
11284 (claim_jump_space): New.
11285 (sort_tracepoints): New.
11286 (MAX_JUMP_SIZE): New.
11287 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11288 IPA.
11289 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11290 support. Upload fast traceframes, and delete internal IPA
11291 breakpoints.
11292 (stop_tracing_handler): New.
11293 (flush_trace_buffer_handler): New.
11294 (cmd_qtstop): Upload fast tracepoints.
11295 (response_tracepoint): Handle fast tracepoints.
11296 (tracepoint_finished_step): Upload fast traceframes. Set the
11297 tracepoint hit context's tracepoint type.
11298 (handle_tracepoint_bkpts): New.
11299 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11300 type. Add comment about fast tracepoints.
11301 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11302 non-existing action_str field.
11303 (get_context_regcache): Handle fast tracepoints.
11304 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11305 to the regcache.
11306 (fast_tracepoint_from_jump_pad_address): New.
11307 (fast_tracepoint_from_ipa_tpoint_address): New.
11308 (collecting_t): New.
11309 (force_unlock_trace_buffer): New.
11310 (fast_tracepoint_collecting): New.
11311 (collecting): New.
11312 (gdb_collect): New.
11313 (write_inferior_data_ptr): New.
11314 (target_tp_heap): New.
11315 (target_malloc): New.
11316 (download_agent_expr): New.
11317 (UALIGN): New.
11318 (download_tracepoints): New.
11319 (download_trace_state_variables): New.
11320 (upload_fast_traceframes): New.
11321 (IPA_FIRST_TRACEFRAME): New.
11322 (IPA_NEXT_TRACEFRAME_1): New.
11323 (IPA_NEXT_TRACEFRAME): New.
11324 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11325 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11326 (gdb_jump_pad_buffer_end): New.
11327 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11328 (initialize_tracepoint): Adjust.
11329 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11330 buffer. Initialize the low module.
11331 * utils.c (PREFIX, TOOLNAME): New.
11332 (malloc_failure): Use PREFIX.
11333 (error): In the IPA, an error causes an exit.
11334 (fatal, warning): Use PREFIX.
11335 (internal_error): Use TOOLNAME.
11336 (NUMCELLS): Increase to 10.
11337 * configure, config.in: Regenerate.
11338
11339 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11340
11341 * server.c (handle_query) <qSupported>: Do two passes over the
11342 qSupported string to avoid nesting strtok.
11343
11344 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11345
11346 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11347 (CDEPS): New.
11348 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11349 -Wl,--dynamic-list.
11350 * configure: Regenerate.
11351 * proc-service.list: New.
11352
11353 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11354
11355 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11356 New comment.
11357
11358 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11359
11360 * gdbreplay.c (remote_open): Check error return from socket() call by
11361 its equality to -1 not by it being negative.
11362 * remote-utils.c (remote_open): Likewise.
11363
11364 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11365
11366 * config.h: Regenerate.
11367
11368 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11369
11370 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11371 doesn't provide PTRACE_GET_THREAD_AREA.
11372
11373 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11374
11375 * linux-m68k-low.c: Include <asm/ptrace.h>
11376 (ps_get_thread_area): Implement.
11377
11378 2010-05-03 Doug Evans <dje@google.com>
11379
11380 * event-loop.c (struct callback_event): New struct.
11381 (callback_list): New global.
11382 (append_callback_event, delete_callback_event): New functions.
11383 (process_callback): New function.
11384 (start_event_loop): Call it.
11385 * remote-utils.c (NOT_SCHEDULED): Define.
11386 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11387 moved out of readchar.
11388 (readchar): Rewrite. Call reschedule before returning.
11389 (reset_readchar): New function.
11390 (remote_close): Call it.
11391 (process_remaining, reschedule): New functions.
11392 * server.h (callback_handler_func): New typedef.
11393 (append_callback_event, delete_callback_event): Declare.
11394
11395 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11396
11397 * proc-service.c (ps_pglobal_lookup): Use
11398 thread_db_look_up_one_symbol.
11399 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11400 parameter. Use it instead of all_symbols_looked_up.
11401 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11402 field.
11403 (all_symbols_looked_up): Don't declare.
11404 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11405 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11406 field.
11407 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11408 Set all_symbols_looked_up here.
11409 (thread_db_look_up_one_symbol): New.
11410 (thread_db_get_tls_address): Adjust.
11411 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11412 thread_db object on the heap, and tentatively set it in the
11413 process structure.
11414 (thread_db_init): Don't set all_symbols_looked_up here.
11415 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11416
11417 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11418
11419 * linux-low.c (linux_kill, linux_detach): Adjust.
11420 (status_pending_p_callback): Remove redundant statement. Check
11421 for !TARGET_WAITIKIND_IGNORE, instead of
11422 TARGET_WAITKIND_STOPPED.
11423 (handle_tracepoints): Make sure LWP is locked. Adjust.
11424 (linux_wait_for_event_1): Adjust.
11425 (linux_cancel_breakpoints): New.
11426 (unsuspend_one_lwp): New.
11427 (unsuspend_all_lwps): New.
11428 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11429 (send_sigstop_callback): Change return type to int, add new
11430 `except' parameter and handle it.
11431 (suspend_and_send_sigstop_callback): New.
11432 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11433 pass them down. If SUSPEND, also increment the lwp's suspend
11434 count.
11435 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11436 (need_step_over_p): Don't consider suspended LWPs.
11437 (start_step_over): Adjust.
11438 (proceed_one_lwp): Change return type to int, add new `except'
11439 parameter and handle it.
11440 (unsuspend_and_proceed_one_lwp): New.
11441 (proceed_all_lwps): Use find_inferior instead of
11442 for_each_inferior.
11443 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11444 also decrement the suspend count of LWPs. Pass `except' down,
11445 instead of hacking its suspend count.
11446 (linux_pause_all): Add `freeze' parameter. Adjust.
11447 (linux_unpause_all): New.
11448 (linux_target_ops): Install linux_unpause_all.
11449 * server.c (handle_status): Adjust.
11450 * target.h (struct target_ops): New fields `unpause_all' and
11451 `cancel_breakpoints'. Add new parameter to `pause_all'.
11452 (pause_all): Add new `freeze' parameter.
11453 (unpause_all): New.
11454 (cancel_breakpoints): New.
11455 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11456 cancel breakpoints.
11457 (cmd_qtstart): Pause threads.
11458 (stop_tracing): Pause threads, and cancel breakpoints.
11459 * win32-low.c (win32_target_ops): Adjust.
11460
11461 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11462
11463 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11464 the inferior right away from here...
11465 (linux_wait_1): ... to here, and adjust to check the thread's
11466 last_resume_kind instead of the lwp's step or stop_expected flags.
11467
11468 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11469
11470 * README: Use consistent `GDB' and `GDBserver' spellings.
11471
11472 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11473
11474 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11475 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11476 (linux_detach_one_lwp): Assume the lwp is stopped.
11477 (any_thread_of): Delete.
11478 (linux_detach): Stop all lwps here. Don't blindly delete all
11479 breakpoints.
11480 (delete_lwp_callback): New.
11481 (linux_mourn): Delete all lwps of the process that is gone.
11482 (linux_wait_1): Don't delete the last lwp of the process here.
11483 * mem-break.h (mark_breakpoints_out): Declare.
11484 * mem-break.c (mark_breakpoints_out): New.
11485 (free_all_breakpoints): Use it.
11486 * server.c (handle_target_event): If the process is gone, mark
11487 breakpoints out.
11488 * thread-db.c (struct thread_db) <create_bp>: New field.
11489 (thread_db_enable_reporting): Fix prototype. Store a thread event
11490 breakpoint reference in the thread_db struct.
11491 (thread_db_load_search): Clear the thread_db object.
11492 (try_thread_db_load_1): Ditto.
11493 (switch_to_process): New.
11494 (disable_thread_event_reporting): Use it.
11495 (remove_thread_event_breakpoints): New.
11496 (thread_db_detach, thread_db_mourn): Use it.
11497
11498 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11499
11500 * linux-low.c (linux_enable_event_reporting): New.
11501 (linux_wait_for_event_1, handle_extended_wait): Use it.
11502
11503 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11504
11505 * linux-low.c (linux_kill_one_lwp, linux_kill)
11506 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11507 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11508 SIGSTOP even if the LWP is stopped.
11509 (send_sigstop_callback): New.
11510 (stop_all_lwps): Use send_sigstop_callback instead.
11511 (linux_resume_one_thread): Adjust.
11512 (proceed_one_lwp): Still proceed an LWP that the client has
11513 requested to stop, if we haven't reported it as stopped yet. Make
11514 sure that LWPs the client want stopped, have a pending SIGSTOP.
11515
11516 2010-04-26 Doug Evans <dje@google.com>
11517
11518 * server.c (handle_general_set): Make static.
11519
11520 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11521 Print received char after testing for error/eof instead of before.
11522 (input_interrupt): Tweak comment.
11523
11524 2010-04-23 Doug Evans <dje@google.com>
11525
11526 * server.c (start_inferior): Print inferior argv if --debug.
11527
11528 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11529
11530 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11531 * nto-x86-low.c: Include server.h
11532
11533 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11534
11535 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11536 be consistent with other sources of this directory.
11537 (init_registers_amd64): Correct name of source file of this function
11538 in the comment.
11539
11540 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11541
11542 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11543 64-bit executables.
11544
11545 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11546
11547 * win32-i386-low.c: Add 64-bit support.
11548 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11549 (init_registers_amd64): Declare.
11550 (mappings): Add 64-bit version of array.
11551 (init_windows_x86): New function.
11552 (the_low_target): Change init_arch field to init_windows_x86.
11553
11554 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11555
11556 * win32-low.c: Adapt to support also 64-bit architecture.
11557 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11558 (get_image_name): Use SIZE_T type for local variable `done'.
11559 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11560 (toolhelp_get_dll_name): Idem.
11561 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11562 Use uintptr_t typecast to avoid warning.
11563 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11564 (handle_exception): Use phex_nz to avoid warning.
11565 (win32_wait): Remove unused local variable `process'.
11566
11567 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11568
11569 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11570 `amd64-avx.o'.
11571
11572 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11573
11574 * configure.ac: Use `ws2_32' library for srv_mingw.
11575 * configure: Regenerate.
11576 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11577 * remote-utils.c: Likewise.
11578
11579 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11580
11581 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11582 if __x86_64__ is defined.
11583
11584 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11585
11586 * configure: Regenerate.
11587
11588 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11589
11590 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11591 * target.h (target_ops): New get_tib_address field.
11592 * win32-low.h (win32_thread_info): Add thread_local_base field.
11593 * win32-low.c (child_add_thread): Add tlb argument.
11594 Set thread_local_base field to TLB.
11595 (get_child_debug_event): Adapt to child_add_thread change.
11596 (win32_get_tib_address): New function.
11597 (win32_target_ops): Set get_tib_address field to
11598 win32_get_tib_address.
11599 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11600
11601 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11602
11603 * linux-low.c (linux_mourn): Also remove the process.
11604 * server.c (handle_target_event): Don't remove the process here.
11605 * nto-low.c (nto_mourn): New.
11606 (nto_target_ops): Install it.
11607 * spu-low.c (spu_mourn): New.
11608 (spu_target_ops): Install it.
11609 * win32-low.c (win32_mourn): New.
11610 (win32_target_ops): Install it.
11611
11612 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11613
11614 * server.h (buffer_xml_printf): Remove redundant `;'.
11615
11616 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11617
11618 * regcache.c (set_register_cache): Invalidate regcaches before
11619 changing the register cache layout.
11620 (regcache_invalidate_one): Allow a NULL regcache.
11621 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11622 regcaches before changing the register cache layout or the target
11623 regsets.
11624
11625 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11626
11627 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11628 variable warning on Linux/x86-64.
11629
11630 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11631
11632 GDBserver disconnected tracing support.
11633
11634 * linux-low.c (linux_remove_process): Delete.
11635 (add_lwp): Don't set last_resume_kind here.
11636 (linux_kill): Use `mourn'.
11637 (linux_detach): Use `thread_db_detach', and `mourn'.
11638 (linux_mourn): New.
11639 (linux_attach_lwp_1): Adjust comment.
11640 (linux_attach): last_resume_kind moved the thread_info; adjust.
11641 (status_pending_p_callback): Adjust.
11642 (linux_wait_for_event_1): Adjust.
11643 (count_events_callback, select_singlestep_lwp_callback)
11644 (select_event_lwp_callback, cancel_breakpoints_callback)
11645 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11646 (proceed_one_lwp): Adjust.
11647 (linux_async): Add debug output.
11648 (linux_thread_stopped): New.
11649 (linux_pause_all): New.
11650 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11651 linux_pause_all.
11652 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11653 (thread_db_free): Delete declaration.
11654 (thread_db_detach, thread_db_mourn): Declare.
11655 * thread-db.c (thread_db_init): Use thread_db_mourn.
11656 (thread_db_free): Delete, split in two.
11657 (disable_thread_event_reporting): New.
11658 (thread_db_detach): New.
11659 (thread_db_mourn): New.
11660
11661 * server.h (struct thread_info) <last_resume_kind>: New field.
11662 <attached>: Add comment.
11663 <gdb_detached>: New field.
11664 (handler_func): Change return type to int.
11665 (handle_serial_event, handle_target_event): Ditto.
11666 (gdb_connected): Declare.
11667 (tracing): Delete.
11668 (disconnected_tracing): Declare.
11669 (stop_tracing): Declare.
11670
11671 * server.c (handle_query) <qSupported>: Report support for
11672 disconnected tracing.
11673 (queue_stop_reply_callback): Account for running threads.
11674 (gdb_wants_thread_stopped): New.
11675 (gdb_wants_all_threads_stopped): New.
11676 (gdb_reattached_process): New.
11677 (handle_status): Clear the `gdb_detached' flag of all processes.
11678 In all-stop, stop all threads.
11679 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11680 (process_serial_event): If the remote connection breaks, or if an
11681 exit was forced with "monitor exit", force an event loop exit.
11682 Handle disconnected tracing on detach.
11683 (handle_serial_event): Adjust.
11684 (handle_target_event): If GDB isn't connected, forward events back
11685 to the inferior, unless the last process exited, in which case,
11686 exit gdbserver. Adjust interface.
11687
11688 * remote-utils.c (remote_open): Don't block in accept. Instead
11689 register an event loop source on the listen socket file
11690 descriptor. Refactor bits into ...
11691 (listen_desc): ... this new global.
11692 (gdb_connected): ... this new function.
11693 (enable_async_notification): ... this new function.
11694 (handle_accept_event): ... this new function.
11695 (remote_close): Clear remote_desc.
11696
11697 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11698
11699 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11700 New fields.
11701 (mourn_inferior): Define.
11702 (target_process_qsupported): Avoid the dangling else problem.
11703 (thread_stopped): Define.
11704 (pause_all): Define.
11705 (target_waitstatus_to_string): Declare.
11706 * target.c (target_waitstatus_to_string): New.
11707
11708 * tracepoint.c (tracing): Make extern.
11709 (disconnected_tracing): New.
11710 (stop_tracing): Make extern. Handle tracing stops due to GDB
11711 disconnecting.
11712 (cmd_qtdisconnected): New.
11713 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11714 (handle_tracepoint_general_set): Handle QTDisconnected.
11715
11716 * event-loop.c (event_handler_func): Change return type to int.
11717 (process_event): Bail out if the event handler wants the event
11718 loop to stop.
11719 (handle_file_event): Ditto.
11720 (start_event_loop): Bail out if the event handler wants the event
11721 loop to stop.
11722
11723 * nto-low.c (nto_target_ops): Adjust.
11724 * spu-low.c (spu_wait): Don't remove the process here.
11725 (spu_target_ops): Adjust.
11726 * win32-low.c (win32_wait): Don't remove the process here.
11727 (win32_target_ops): Adjust.
11728
11729 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11730
11731 * regcache.c (realloc_register_cache): Invalidate inferior's
11732 regcache before recreating it.
11733
11734 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11735
11736 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11737
11738 2010-04-09 Stan Shebs <stan@codesourcery.com>
11739 Pedro Alves <pedro@codesourcery.com>
11740
11741 * server.h (LONGEST): New.
11742 (struct thread_info) <while_stepping>: New field.
11743 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11744 Declare.
11745 (initialize_tracepoint, handle_tracepoint_general_set)
11746 (handle_tracepoint_query, tracepoint_finished_step)
11747 (tracepoint_was_hit, release_while_stepping_state_list):
11748 (current_traceframe): Declare.
11749 * server.c (handle_general_set): Handle tracepoint packets.
11750 (read_memory): New.
11751 (write_memory): New.
11752 (handle_search_memory_1): Use read_memory.
11753 (handle_query): Report support for conditional tracepoints, trace
11754 state variables, and tracepoint sources. Handle tracepoint
11755 queries.
11756 (main): Initialize the tracepoints module.
11757 (process_serial_event): Handle traceframe reads/writes.
11758
11759 * linux-low.c (handle_tracepoints): New.
11760 (linux_wait_1): Call it.
11761 (linux_resume_one_lwp): Handle while-stepping.
11762 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11763 (linux_target_ops): Install them.
11764 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11765 New field.
11766 * linux-x86-low.c (x86_supports_tracepoints): New.
11767 (the_low_target). Install it.
11768
11769 * mem-break.h (delete_breakpoint): Declare.
11770 * mem-break.c (delete_breakpoint): Make external.
11771
11772 * target.h (struct target_ops): Add `supports_tracepoints',
11773 `read_pc', and `write_pc' fields.
11774 (target_supports_tracepoints): Define.
11775 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11776 (phex_nz): New.
11777
11778 * regcache.h (struct regcache) <registers_owned>: New field.
11779 (init_register_cache, regcache_cpy): Declare.
11780 (regcache_read_pc, regcache_write_pc): Declare.
11781 (register_cache_size): Declare.
11782 (supply_regblock): Declare.
11783 * regcache.c (init_register_cache): New.
11784 (new_register_cache): Use it.
11785 (regcache_cpy): New.
11786 (register_cache_size): New.
11787 (supply_regblock): New.
11788 (regcache_read_pc, regcache_write_pc): New.
11789
11790 * tracepoint.c: New.
11791
11792 * Makefile.in (OBS): Add tracepoint.o.
11793 (tracepoint.o): New rule.
11794
11795 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11796
11797 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11798 (i386-mmx.o): New.
11799 (i386-mmx.c): Likewise.
11800 (i386-mmx-linux.o): Likewise.
11801 (i386-mmx-linux.c): Likewise.
11802
11803 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11804 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11805 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11806 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11807
11808 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11809 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11810 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11811
11812 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11813
11814 * Makefile.in (clean): Updated.
11815 (i386-avx.o): New.
11816 (i386-avx.c): Likewise.
11817 (i386-avx-linux.o): Likewise.
11818 (i386-avx-linux.c): Likewise.
11819 (amd64-avx.o): Likewise.
11820 (amd64-avx.c): Likewise.
11821 (amd64-avx-linux.o): Likewise.
11822 (amd64-avx-linux.c): Likewise.
11823
11824 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11825 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11826 (srv_amd64_regobj): Add amd64-avx.o.
11827 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11828 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11829 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11830 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11831 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11832 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11833 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11834
11835 * i387-fp.c: Include "i386-xstate.h".
11836 (i387_xsave): New.
11837 (i387_cache_to_xsave): Likewise.
11838 (i387_xsave_to_cache): Likewise.
11839 (x86_xcr0): Likewise.
11840
11841 * i387-fp.h (i387_cache_to_xsave): Likewise.
11842 (i387_xsave_to_cache): Likewise.
11843 (x86_xcr0): Likewise.
11844
11845 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11846 * linux-crisv32-low.c (target_regsets): Likewise.
11847 * linux-m68k-low.c (target_regsets): Likewise.
11848 * linux-mips-low.c (target_regsets): Likewise.
11849 * linux-ppc-low.c (target_regsets): Likewise.
11850 * linux-s390-low.c (target_regsets): Likewise.
11851 * linux-sh-low.c (target_regsets): Likewise.
11852 * linux-sparc-low.c (target_regsets): Likewise.
11853 * linux-xtensa-low.c (target_regsets): Likewise.
11854
11855 * linux-low.c: Include <sys/uio.h>.
11856 (regsets_fetch_inferior_registers): Support nt_type.
11857 (regsets_store_inferior_registers): Likewise.
11858 (linux_process_qsupported): New.
11859 (linux_target_ops): Add linux_process_qsupported.
11860
11861 * linux-low.h (regset_info): Add nt_type.
11862 (linux_target_ops): Add process_qsupported.
11863
11864 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11865 and <sys/uio.h>.
11866 (init_registers_i386_avx_linux): New.
11867 (init_registers_amd64_avx_linux): Likewise.
11868 (xmltarget_i386_linux_no_xml): Likewise.
11869 (xmltarget_amd64_linux_no_xml): Likewise.
11870 (PTRACE_GETREGSET): Likewise.
11871 (PTRACE_SETREGSET): Likewise.
11872 (x86_fill_xstateregset): Likewise.
11873 (x86_store_xstateregset): Likewise.
11874 (use_xml): Likewise.
11875 (x86_linux_update_xmltarget): Likewise.
11876 (x86_linux_process_qsupported): Likewise.
11877 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11878 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11879 init_registers_i386_linux here. Call
11880 x86_linux_update_xmltarget.
11881 (the_low_target): Add x86_linux_process_qsupported.
11882
11883 * server.c (handle_query): Call target_process_qsupported.
11884
11885 * target.h (target_ops): Add process_qsupported.
11886 (target_process_qsupported): New.
11887
11888 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11889
11890 * inferiors.c (add_thread): Set last_status kind to
11891 TARGET_WAITKIND_IGNORE.
11892 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11893 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11894 (linux_wait_1): Move `thread' local definition to block that uses
11895 it. Don't NULL initialize `event_child'.
11896 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11897 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11898 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11899
11900 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11901
11902 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11903 an extended waitstatus, or by a watchpoint.
11904 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11905 thread was stepping or has been stopped by a watchpoint.
11906
11907 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11908
11909 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11910 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11911 of another, then delete the previous, and validate all
11912 breakpoints.
11913 (validate_inserted_breakpoint): New.
11914 (delete_disabled_breakpoints): New.
11915 (validate_breakpoints): New.
11916 (check_mem_read): Validate breakpoints before trusting their
11917 shadow. Delete disabled breakpoints.
11918 (check_mem_write): Validate breakpoints before trusting they
11919 should be inserted. Delete disabled breakpoints.
11920 * mem-break.h (validate_breakpoints):
11921 * server.c (handle_query): Validate breakpoints when we see a
11922 qSymbol query.
11923
11924 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11925
11926 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11927 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11928 if we could tell there's a GDB breakpoint at stop_pc.
11929 (need_step_over_p): Don't do a step over if we find a GDB
11930 breakpoint at the resume PC.
11931
11932 * mem-break.c (struct raw_breakpoint): New.
11933 (enum bkpt_type): New type `gdb_breakpoint'.
11934 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11935 fields. New field `raw'.
11936 (find_raw_breakpoint_at): New.
11937 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11938 breakpoint instead.
11939 (set_breakpoint_at): Adjust.
11940 (delete_raw_breakpoint): New.
11941 (release_breakpoint): New.
11942 (delete_breakpoint): Rename to...
11943 (delete_breakpoint_1): ... this. Add proc parameter. Use
11944 release_breakpoint. Return ENOENT.
11945 (delete_breakpoint): Reimplement.
11946 (find_breakpoint_at): Delete.
11947 (find_gdb_breakpoint_at): New.
11948 (delete_breakpoint_at): Delete.
11949 (set_gdb_breakpoint_at): New.
11950 (delete_gdb_breakpoint_at): New.
11951 (gdb_breakpoint_here): New.
11952 (set_reinsert_breakpoint): Use release_breakpoint.
11953 (uninsert_breakpoint): Rename to ...
11954 (uninsert_raw_breakpoint): ... this.
11955 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11956 (reinsert_raw_breakpoint): Change parameter type to
11957 raw_breakpoint.
11958 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11959 instead.
11960 (check_breakpoints): Adjust. Use release_breakpoint.
11961 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11962 (breakpoint_inserted_here): Ditto.
11963 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11964 Don't trust the breakpoint's shadow if it is not inserted.
11965 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11966 (delete_all_breakpoints): Adjust.
11967 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11968 use delete_breakpoint_1.
11969
11970 * mem-break.h (breakpoints_supported): Delete declaration.
11971 (set_gdb_breakpoint_at): Declare.
11972 (gdb_breakpoint_here): Declare.
11973 (delete_breakpoint_at): Delete.
11974 (delete_gdb_breakpoint_at): Declare.
11975
11976 * server.h (struct raw_breakpoint): Forward declare.
11977 (struct process_info): New field `raw_breakpoints'.
11978
11979 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11980 breakpoints.
11981
11982 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11983
11984 * linux-low.c (status_pending_p_callback): Fix comment.
11985 (linux_wait_for_event_1): Move most of the internal breakpoint
11986 handling from here...
11987 (linux_wait_1): ... to here.
11988 (count_events_callback): New.
11989 (select_singlestep_lwp_callback): New.
11990 (select_event_lwp_callback): New.
11991 (cancel_breakpoints_callback): New.
11992 (select_event_lwp): New.
11993 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11994 priority to all LWPs that have had events that should be reported
11995 to the client. Cancel breakpoints when about to reporting the
11996 event to the client, not while stopping lwps. No longer cancel
11997 finished single-steps here.
11998 (cancel_finished_single_step): Delete.
11999 (cancel_finished_single_steps): Delete.
12000
12001 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12002
12003 * mem-break.c (enum bkpt_type): New.
12004 (struct breakpoint): New field `type'.
12005 (set_breakpoint_at): Change return type to struct breakpoint
12006 pointer. Set type to `other_breakpoint' by default.
12007 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12008 in the breakpoint list.
12009 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12010 (reinsert_breakpoint): Rename to ...
12011 (reinsert_raw_breakpoint): ... this.
12012 (reinsert_breakpoints_at): Adjust.
12013 * mem-break.h (struct breakpoint): Declare.
12014 (set_breakpoint_at): Change return type to struct breakpoint
12015 pointer.
12016
12017 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12018
12019 * server.c (handle_query): Assign, not compare.
12020
12021 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12022
12023 Teach linux gdbserver to step-over-breakpoints.
12024
12025 * linux-low.c (can_hardware_single_step): New.
12026 (supports_breakpoints): New.
12027 (handle_extended_wait): If stopping threads, read the stop pc of
12028 the new cloned LWP.
12029 (get_pc): New.
12030 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12031 low target doesn't support retrieving the PC.
12032 (add_lwp): Set last_resume_kind to resume_continue.
12033 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12034 (linux_attach): Don't clear stop_expected. Set the lwp's
12035 last_resume_kind to resume_stop.
12036 (linux_detach_one_lwp): Don't check for removed breakpoints.
12037 (check_removed_breakpoint): Delete.
12038 (status_pending_p): Rename to ...
12039 (status_pending_p_callback): ... this. Don't check for removed
12040 breakpoints. Don't consider threads that are stopped from GDB's
12041 perspective.
12042 (linux_wait_for_lwp): Always read the stop_pc here.
12043 (cancel_breakpoint): New.
12044 (step_over_bkpt): New global.
12045 (linux_wait_for_event_1): Implement stepping over breakpoints.
12046 (gdb_wants_lwp_stopped): New.
12047 (gdb_wants_all_stopped): New.
12048 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12049 single-step traps here. Store the thread's last reported target
12050 wait status.
12051 (send_sigstop): Don't clear stop_expected. Always set it,
12052 instead.
12053 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12054 (cancel_finished_single_step): New.
12055 (cancel_finished_single_steps): New.
12056 (wait_for_sigstop): Don't cancel finished single-step traps here.
12057 (linux_resume_one_lwp): Don't check for removed breakpoints.
12058 Don't set `step' on non-hardware step archs.
12059 (linux_set_resume_request): Ignore resume_stop requests if already
12060 stopping or stopped. Set the lwp's last_resume_kind.
12061 (resume_status_pending_p): Don't check for removed breakpoints.
12062 (need_step_over_p): New.
12063 (start_step_over): New.
12064 (finish_step_over): New.
12065 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12066 requests. Clear the thread's last reported target waitstatus.
12067 Don't use the `suspended' flag. Don't consider pending breakpoints.
12068 (linux_resume): Start a step-over if necessary.
12069 (proceed_one_lwp): New.
12070 (proceed_all_lwps): New.
12071 (unstop_all_lwps): New.
12072 * linux-low.h (struct lwp_info): Rewrite comment for the
12073 `suspended' flag. Add the `stop_pc' field. Delete the
12074 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12075 Add `'last_resume_kind' and `need_step_over' fields.
12076 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12077 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12078 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12079 (set_raw_breakpoint_at): New.
12080 (set_breakpoint_at): Rewrite to use it.
12081 (reinsert_breakpoint_handler): Delete.
12082 (set_reinsert_breakpoint): New.
12083 (reinsert_breakpoint_by_bp): Delete.
12084 (delete_reinsert_breakpoints): New.
12085 (uninsert_breakpoint): Rewrite.
12086 (uninsert_breakpoints_at): New.
12087 (reinsert_breakpoint): Rewrite.
12088 (reinsert_breakpoints_at): New.
12089 (check_breakpoints): Rewrite.
12090 (breakpoint_here): New.
12091 (breakpoint_inserted_here): New.
12092 (check_mem_read): Adjust.
12093 * mem-break.h (breakpoints_supported, breakpoint_here)
12094 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12095 (reinsert_breakpoint_by_bp): Delete declaration.
12096 (delete_reinsert_breakpoints): Declare.
12097 (reinsert_breakpoint): Delete declaration.
12098 (reinsert_breakpoints_at): Declare.
12099 (uninsert_breakpoint): Delete declaration.
12100 (uninsert_breakpoints_at): Declare.
12101 (check_breakpoints): Adjust prototype.
12102 * server.h: Adjust include order.
12103 (struct thread_info): Declare here. Add a `last_status' field.
12104
12105 2010-03-23 Michael Snyder <msnyder@vmware.com>
12106
12107 * server.c (crc32): New function.
12108 (handle_query): Add handling for 'qCRC:' request.
12109
12110 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12111
12112 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12113 lwp had been stopped by a watchpoint.
12114
12115 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12116
12117 * server.h (internal_error): Declare.
12118 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12119 * utils.c (internal_error): New function.
12120
12121 2010-03-15 Andreas Schwab <schwab@redhat.com>
12122
12123 * configure.srv: Fix typo setting srv_regobj.
12124
12125 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12126
12127 * linux-low.c (fetch_register): Avoid passing a non string literal
12128 format to `error'.
12129 (usr_store_inferior_registers): Ditto.
12130
12131 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12132
12133 * linux-low.c (linux_write_memory): Bail out early if peeking
12134 memory failed.
12135
12136 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12137
12138 * linux-low.h (struct lwp_info): New fields
12139 `stopped_by_watchpoint' and `stopped_data_address'.
12140 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12141 here, and cache them in the lwp object.
12142 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12143 directly.
12144 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12145 field.
12146 (linux_stopped_by_watchpoint): Rewrite.
12147 (linux_stopped_data_address): Rewrite.
12148
12149 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12150
12151 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12152 switching the current inferior, not before.
12153
12154 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12155
12156 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12157 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12158 i386-linux.c and amd64-linux.c.
12159 (reg-i386.o): Removed.
12160 (reg-i386.c): Likewise.
12161 (reg-i386-linux.o): Likewise.
12162 (reg-i386-linux.c): Likewise.
12163 (reg-x86-64.o): Likewise.
12164 (reg-x86-64.c): Likewise.
12165 (reg-x86-64-linux.o): Likewise.
12166 (reg-x86-64-linux.c): Likewise.
12167 (i386.o): New.
12168 (i386.c): Likewise.
12169 (i386-linux.o): Likewise.
12170 (i386-linux.c): Likewise.
12171 (amd64.o): Likewise.
12172 (amd64.c): Likewise.
12173 (amd64-linux.o): Likewise.
12174 (amd64-linux.c): Likewise.
12175
12176 * configure.srv (srv_i386_regobj): New.
12177 (srv_i386_linux_regobj): Likewise.
12178 (srv_amd64_regobj): Likewise.
12179 (srv_amd64_linux_regobj): Likewise.
12180 (srv_i386_32bit_xmlfiles): Likewise.
12181 (srv_i386_64bit_xmlfiles): Likewise.
12182 (srv_i386_xmlfiles): Likewise.
12183 (srv_amd64_xmlfiles): Likewise.
12184 (srv_i386_linux_xmlfiles): Likewise.
12185 (srv_amd64_linux_xmlfiles): Likewise.
12186 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12187 srv_xmlfiles to $srv_i386_xmlfiles.
12188 (i[34567]86-*-mingw32ce*): Likewise.
12189 (i[34567]86-*-mingw*): Likewise.
12190 (i[34567]86-*-nto*): Likewise.
12191 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12192 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12193 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12194 (x86_64-*-linux*): Likewise.
12195
12196 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12197 (init_registers_amd64_linux): New.
12198 (x86_arch_setup): Replace init_registers_x86_64_linux with
12199 init_registers_amd64_linux.
12200
12201 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12202
12203 * configure.ac: Check for libdl. If it is not available link against
12204 static libthread_db.
12205 * configure: Regenerate.
12206
12207 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12208
12209 PR9605
12210
12211 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12212 handing a read watchpoint.
12213 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12214
12215 2010-02-12 Doug Evans <dje@google.com>
12216
12217 * linux-low.c (linux_supports_tracefork_flag): Document.
12218 (linux_look_up_symbols): Add comment.
12219
12220 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12221
12222 * regcache.c (supply_register): Clear regcache if buf is NULL.
12223
12224 2010-02-02 Nicolas Roche <roche@sourceware.org>
12225 Joel Brobecker <brobecker@adacore.com>
12226
12227 * inferiors.c (find_inferior): Add function documentation.
12228 (unloaded_dll): Handle the case where the unloaded dll has not
12229 been previously registered in the dll list.
12230
12231 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12232
12233 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12234 (thumb2_breakpoint): New.
12235 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12236
12237 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12238
12239 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12240 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12241 breakpoints.
12242
12243 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12244
12245 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12246
12247 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12248
12249 * linux-s390-low.c (s390_collect_ptrace_register)
12250 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12251
12252 2010-01-21 Doug Evans <dje@google.com>
12253
12254 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12255 (PTRACE_ARG4_TYPE): New macro.
12256 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12257 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12258 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12259 (usr_store_inferior_registers): Ditto.
12260 (linux_read_memory, linux_write_memory): Ditto.
12261 (linux_test_for_tracefork): Ditto.
12262
12263 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12264 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12265
12266 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12267
12268 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12269 target.
12270
12271 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12272
12273 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12274 prototype to take a regcache. Adjust.
12275
12276 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12277
12278 * regcache.h (struct thread_info): Forward declare.
12279 (struct regcache): New.
12280 (new_register_cache): Adjust prototype.
12281 (get_thread_regcache): Declare.
12282 (free_register_cache): Adjust prototype.
12283 (registers_to_string, registers_from_string): Ditto.
12284 (supply_register, supply_register_by_name, collect_register)
12285 (collect_register_as_string, collect_register_by_name): Ditto.
12286 * regcache.c (struct inferior_regcache_data): Delete.
12287 (get_regcache): Rename to ...
12288 (get_thread_regcache): ... this. Adjust. Switch inferior before
12289 fetching registers.
12290 (regcache_invalidate_one): Adjust.
12291 (regcache_invalidate): Fix prototype.
12292 (new_register_cache): Return the new register cache.
12293 (free_register_cache): Change prototype.
12294 (realloc_register_cache): Adjust.
12295 (registers_to_string): Change prototype to take a regcache. Adjust.
12296 (registers_from_string): Ditto.
12297 (register_data): Ditto.
12298 (supply_register): Ditto.
12299 (supply_register_by_name): Ditto.
12300 (collect_register): Ditto.
12301 (collect_register_as_string): Ditto.
12302 (collect_register_by_name): Ditto.
12303 * server.c (process_serial_event): Adjust.
12304 * linux-low.h (regset_fill_func, regset_store_func): Change
12305 prototype.
12306 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12307 Change prototype.
12308 * linux-low.c (get_stop_pc): Adjust.
12309 (check_removed_breakpoint): Adjust.
12310 (linux_wait_for_event): Adjust.
12311 (linux_resume_one_lwp): Adjust.
12312 (fetch_register): Add regcache parameter. Adjust.
12313 (usr_store_inferior_registers): Ditto.
12314 (regsets_fetch_inferior_registers): Ditto.
12315 (regsets_store_inferior_registers): Ditto.
12316 (linux_fetch_registers, linux_store_registers): Ditto.
12317 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12318 regcache. Adjust.
12319 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12320 Ditto.
12321 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12322 prototype to take a regcache.
12323 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12324 * remote-utils.c (convert_ascii_to_int, outreg)
12325 (prepare_resume_reply): Change prototype to take a regcache.
12326 Adjust.
12327 * target.h (struct target_ops) <fetch_registers, store_registers>:
12328 Change prototype to take a regcache.
12329 (fetch_inferior_registers, store_inferior_registers): Change
12330 prototype to take a regcache. Adjust.
12331 * proc-service.c (ps_lgetregs): Adjust.
12332 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12333 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12334 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12335 take a regcache. Adjust.
12336 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12337 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12338 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12339 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12340 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12341 (cris_cannot_fetch_register):
12342 (cris_breakpoint_at): Change prototype to take a regcache.
12343 Adjust.
12344 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12345 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12346 to take a regcache. Adjust.
12347 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12348 Adjust.
12349 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12350 take a regcache. Adjust.
12351 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12352 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12353 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12354 * linux-mips-low.c (mips_get_pc):
12355 (mips_set_pc): Change prototype to take a regcache. Adjust.
12356 (mips_reinsert_addr): Adjust.
12357 (mips_collect_register): Change prototype to take a regcache.
12358 Adjust.
12359 (mips_supply_register):
12360 (mips_collect_register_32bit, mips_supply_register_32bit)
12361 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12362 (mips_store_fpregset): Ditto.
12363 * linux-ppc-low.c (ppc_supply_ptrace_register)
12364 (ppc_supply_ptrace_register): Ditto.
12365 (parse_spufs_run): Adjust.
12366 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12367 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12368 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12369 take a regcache. Adjust.
12370 * linux-s390-low.c (s390_collect_ptrace_register)
12371 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12372 (s390_set_pc): Change prototype to take a regcache. Adjust.
12373 (s390_arch_setup): Adjust.
12374 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12375 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12376 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12377 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12378 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12379 regcache. Adjust.
12380 (sparc_breakpoint_at): Adjust.
12381 * linux-xtensa-low.c (xtensa_fill_gregset):
12382 (xtensa_store_gregset):
12383 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12384 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12385 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12386 prototype to take a regcache. Adjust.
12387 * win32-arm-low.c (arm_fetch_inferior_register)
12388 (arm_store_inferior_register): Change prototype to take a
12389 regcache. Adjust.
12390 * win32-i386-low.c (i386_fetch_inferior_register)
12391 (i386_store_inferior_register): Change prototype to take a
12392 regcache. Adjust.
12393 * win32-low.c (child_fetch_inferior_registers)
12394 (child_store_inferior_registers): Change prototype to take a
12395 regcache. Adjust.
12396 (win32_wait): Adjust.
12397 (win32_fetch_inferior_registers): Change prototype to take a
12398 regcache. Adjust.
12399 (win32_store_inferior_registers): Adjust.
12400 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12401 store_inferior_register>: Change prototype to take a regcache.
12402
12403 2010-01-20 Doug Evans <dje@google.com>
12404
12405 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12406 #ifdef.
12407 (linux_wait_for_event1, linux_init_signals): Ditto.
12408 (W_STOPCODE): Provide definition if missing.
12409
12410 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12411
12412 * linux-low.c (linux_core_of_thread): New.
12413 (compare_ints, show_process, list_threads): New.
12414 (linux_qxfer_osdata): Report threads and cores.
12415 (linux_target_op): Register linux_core_of_thread.
12416 * remote-utils.c (prepare_resume_reply): Report the core.
12417 (buffer_xml_printf): Support %d specifier.
12418 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12419 New.
12420 (handle_query): Handle qXfer:threads. Announce availability
12421 thereof.
12422 * target.h (struct target_ops): New field core_of_thread.
12423
12424 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12425
12426 * Makefile.in (clean): Remove new generated files.
12427 (reg-s390.o, reg-s390.c): Remove rules.
12428 (reg-s390x.o, reg-s390x.c): Likewise.
12429 (s390-linux32.o, s390-linux32.c): Add rules.
12430 (s390-linux64.o, s390-linux64.c): Likewise.
12431 (s390x-linux64.o, s390x-linux64.c): Likewise.
12432 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12433 * linux-s390-low.c: Include <elf.h>.
12434 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12435 (init_registers_s390): Remove prototype.
12436 (init_registers_s390x): Likewise.
12437 (init_registers_s390_linux32): Add prototype.
12438 (init_registers_s390_linux64): Likewise.
12439 (init_registers_s390x_linux64): Likewise.
12440 (s390_num_regs_3264): New define.
12441 (s390_regmap_3264): New global variable.
12442 (s390_cannot_fetch_register): Remove obsolete check.
12443 (s390_cannot_store_register): Likewise.
12444 (s390_collect_ptrace_register): Handle upper/lower register halves.
12445 (s390_supply_ptrace_register): Likewise.
12446 (s390_fill_gregset): Update to register number changes.
12447 (s390_get_hwcap): New routine.
12448 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12449 Install appropriate regmap and register set.
12450
12451 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12452
12453 * server.c (gdbserver_version): Update copyright year to 2010.
12454 * gdbreplay.c (gdbreplay_version): Likewise.
12455
12456 2009-12-28 Doug Evans <dje@google.com>
12457
12458 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12459 elf/external.h. Include <elf.h> instead but only if necessary.
12460
12461 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12462
12463 * linux-low.c (linux_remove_process): Remove `detaching'
12464 parameter. Don't release/detach from thread_db here.
12465 (linux_kill): Release/detach from thread_db here, ...
12466 (linux_detach): ... and here, before actually detaching.
12467 (linux_wait_1): ... and here, when a process exits.
12468 * thread-db.c (any_thread_of): New.
12469 (thread_db_free): Switch the current inferior to a thread of the
12470 passed in process.
12471
12472 2009-12-21 Doug Evans <dje@google.com>
12473
12474 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12475
12476 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12477 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12478 warning ifndef __NR_tkill. Move setting of errno there too.
12479 Delete unnecessary resetting of errno after syscall.
12480 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12481
12482 * configure.ac: Check for dladdr.
12483 * config.in: Regenerate.
12484 * configure: Regenerate.
12485 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12486 (try_thread_db_load): Update.
12487
12488 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12489
12490 2009-12-18 Doug Evans <dje@google.com>
12491
12492 * event-loop.c: Include unistd.h if it exists.
12493
12494 * linux-low.c (my_waitpid): Move definition away from being in
12495 between linux_tracefork_child/linux_test_for_tracefork.
12496
12497 * gdb_proc_service.h (psaddr_t): Fix type.
12498 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12499 signature to match glibc.
12500
12501 2009-12-16 Doug Evans <dje@google.com>
12502
12503 * linux-low.c (linux_read_memory): Fix argument to read.
12504
12505 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12506
12507 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12508 events, don't leave current_inferior pointing at null.
12509
12510 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12511
12512 * win32-low.c (LOG): Delete.
12513 (OUTMSG): Output to stderr.
12514 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12515 on compile time LOG macro.
12516 (win32_wait): Fix debug output.
12517
12518 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12519
12520 * win32-low.c (win32_add_one_solib): If the dll name is
12521 "ntdll.dll", prepend the system directory to the dll path.
12522
12523 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12524
12525 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12526
12527 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12528 Vladimir Prus <vladimir@codesourcery.com>
12529
12530 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12531 * configure.ac: Check for __mcoldfire__ and set
12532 gdb_cv_m68k_is_coldfire.
12533 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12534 reg-cf.o and reg-m68k.o.
12535 * configure: Regenerated.
12536
12537 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12538
12539 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12540 Pass it to thread_db_free.
12541 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12542 proper `detaching' argument to linux_remove_process.
12543 * linux-low.h (thread_db_free): Add `detaching' parameter.
12544 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12545 to thread_db_free.
12546 (thread_db_free): Add `detaching' parameter. Only
12547 call td_ta_clear_event if detaching from process.
12548
12549 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12550
12551 * thread-db.c (thread_db_free): Fix typo.
12552
12553 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12554
12555 PR gdb/10838
12556 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12557
12558 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12559
12560 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12561 with an i686 compiler.
12562 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12563 needed.
12564 * configure: Rebuilt.
12565
12566 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12567
12568 PR gdb/10783
12569
12570 * server.c (handle_search_memory_1): Correct read_addr initialization
12571 in loop for searching subsequent chunks.
12572
12573 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12574
12575 * configure.ac: New --with-libthread-db option.
12576 * thread-db.c: Allow direct dependence on libthread_db.
12577 (thread_db_free): Adjust.
12578 * config.in: Regenerate.
12579 * configure: Likewise.
12580
12581 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12582
12583 PR gdb/10757
12584 * thread-db.c (attach_thread): New function.
12585 (maybe_attach_thread): Return success/failure.
12586 (find_new_threads_callback): Adjust.
12587 (thread_db_find_new_threads): Loop until no new threads.
12588
12589 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12590
12591 * proc-service.c (ps_lgetregs): Formatting.
12592
12593 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12594
12595 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12596 * configure.ac: Adjust.
12597 * linux-low.h (struct process_info_private): Move members to struct
12598 thread_db.
12599 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12600 * linux-low.c (linux_remove_process): Adjust.
12601 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12602 * server.c (handle_query): Move code ...
12603 (handle_monitor_command): ... here. New function.
12604 * target.h (struct target_ops): New member.
12605 * thread-db.c (struct thread_db): New.
12606 (libthread_db_search_path): New variable.
12607 (thread_db_create_event, thread_db_enable_reporting)
12608 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12609 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12610 (try_thread_db_load_1, dladdr_to_soname): New functions.
12611 (try_thread_db_load, thread_db_load_search): New functions.
12612 (thread_db_init): Search for libthread_db.
12613 (thread_db_free): New function.
12614 (thread_db_handle_monitor_command): Likewise.
12615 * config.in: Regenerate.
12616 * configure: Regenerate.
12617
12618 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12619
12620 * spu-low.c (spu_kill): Wait for inferior to terminate.
12621 Call clear_inferiors.
12622 (spu_detach): Call clear_inferiors.
12623
12624 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12625
12626 * aclocal.m4: Regenerate.
12627 * config.in: Likewise.
12628 * configure: Likewise.
12629
12630 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12631
12632 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12633 (parse_spufs_run): New function.
12634 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12635 (ppc_breakpoint_at): Handle SPU breakpoints.
12636
12637 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12638
12639 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12640 (SPUFS_MAGIC): Define.
12641 (spu_enumerate_spu_ids): New function.
12642 (linux_qxfer_spu): New function.
12643 (linux_target_ops): Install linux_qxfer_spu.
12644
12645 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12646
12647 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12648 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12649 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12650 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12651 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12652 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12653 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12654 (init_registers_powerpc_cell32l): Add prototype.
12655 (init_registers_powerpc_cell64l): Likewise.
12656 (ppc_arch_setup): Detect Cell/B.E. architecture.
12657
12658 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12659
12660 * Makefile.in (datarootdir): New variable.
12661
12662 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12663
12664 * linux-low.c (linux_write_memory): Update debugging output.
12665 * Makefile.in (clean): Add new descriptions.
12666 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12667 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12668 * configure.srv: Add new files for arm*-*-linux*.
12669 * linux-arm-low.c: Add new declarations.
12670 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12671 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12672 (HWCAP_VFPv3D16): New.
12673 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12674 instead of __IWMMXT__.
12675 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12676 (arm_arch_setup): New.
12677 (target_regsets): Remove #ifdef. Add VFP regset.
12678 (the_low_target): Use arm_arch_setup.
12679
12680 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12681
12682 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12683 the main thread again.
12684
12685 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12686
12687 Adding Neutrino gdbserver.
12688 * configure: Regenerated.
12689 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12690 * configure.srv (i[34567]86-*-nto*): New target.
12691 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12692 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12693 (nto_comctrl) [__QNX__]: New function.
12694 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12695
12696 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12697
12698 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12699 srv_tgtobj.
12700
12701 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12702 Pedro Alves <pedro@codesourcery.com>
12703
12704 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12705 don't support CONTEXT_EXTENDED_REGISTERS.
12706 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12707 (the_low_target): Install them.
12708 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12709 failing with ERROR_PIPE_NOT_CONNECTED.
12710
12711 2009-06-30 Doug Evans <dje@google.com>
12712 Pierre Muller <muller@ics.u-strasbg.fr>
12713
12714 Add h/w watchpoint support to x86-linux, win32-i386.
12715 * Makefile.in (SFILES): Add i386-low.c
12716 (i386_low_h): Define.
12717 (i386-low.o): Add dependencies.
12718 (linux-x86-low.o): Add i386-low.h dependency.
12719 (win32-i386-low.o): Ditto.
12720 * i386-low.c: New file.
12721 * i386-low.h: New file.
12722 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12723 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12724 * linux-low.c (linux_add_process): Initialize arch_private.
12725 (linux_remove_process): Free arch_private.
12726 (add_lwp): Initialize arch_private.
12727 (delete_lwp): Free arch_private.
12728 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12729 provided.
12730 * linux-low.h (process_info_private): New member arch_private.
12731 (lwp_info): New member arch_private.
12732 (linux_target_ops): New members new_process, new_thread,
12733 prepare_to_resume.
12734 (ptid_of): New macro.
12735 * linux-x86-low.c: Include stddef.h, i386-low.h.
12736 (arch_process_info): New struct.
12737 (arch_lwp_info): New struct.
12738 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12739 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12740 (i386_dr_low_get_status): New function.
12741 (x86_insert_point, x86_remove_point): New functions.
12742 (x86_stopped_by_watchpoint): New function.
12743 (x86_stopped_data_address): New function.
12744 (x86_linux_new_process, x86_linux_new_thread): New functions.
12745 (x86_linux_prepare_to_resume): New function.
12746 (the_low_target): Add entries for insert_point, remove_point,
12747 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12748 prepare_to_resume.
12749 * server.c (debug_hw_points): New global.
12750 (monitor_show_help): Document set debug-hw-points.
12751 (handle_query): Process "set debug-hw-points".
12752 * server.h (debug_hw_points): Declare.
12753 (paddress): Declare.
12754 * utils.c (NUMCELLS, CELLSIZE): New macros.
12755 (get_sell, xsnprintf, paddress): New functions.
12756 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12757 remove_point, stopped_by_watchpoint, stopped_data_address.
12758 * win32-i386-low.c: Include i386-low.h.
12759 (debug_reg_state): Replaces dr.
12760 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12761 (i386_dr_low_get_status): New function.
12762 (i386_insert_point, i386_remove_point): New functions.
12763 (i386_stopped_by_watchpoint): New function.
12764 (i386_stopped_data_address): New function.
12765 (i386_initial_stuff): Update.
12766 (get_thread_context,set_thread_context,i386_thread_added): Update.
12767 (the_low_target): Add entries for insert_point,
12768 remove_point, stopped_by_watchpoint, stopped_data_address.
12769 * win32-low.c (win32_insert_watchpoint): New function.
12770 (win32_remove_watchpoint): New function.
12771 (win32_stopped_by_watchpoint): New function.
12772 (win32_stopped_data_address): New function.
12773 (win32_target_ops): Add entries for insert_watchpoint,
12774 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12775 * win32-low.h (win32_target_ops): New members insert_point,
12776 remove_point, stopped_by_watchpoint, stopped_data_address.
12777
12778 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12779
12780 * server.c (process_serial_event): Re-return unsupported, not
12781 error, if the type isn't recognized. Re-allow supporting only
12782 insert or remove packets. Also call require_running for
12783 breakpoints. Add missing break statement to default case. Tidy.
12784 * target.h (struct target_ops): Rename insert_watchpoint to
12785 insert_point, and remove_watchpoint to remove_point.
12786
12787 * linux-low.h (struct linux_target_ops): Likewise.
12788 * linux-low.c (linux_insert_watchpoint): Rename to ...
12789 (linux_insert_point): ... this. Adjust.
12790 (linux_remove_watchpoint): Rename to ...
12791 (linux_remove_point): ... this. Adjust.
12792 (linux_target_ops): Adjust.
12793 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12794 (cris_insert_point): ... this.
12795 (cris_remove_watchpoint): Rename to ...
12796 (cris_remove_point): ... this.
12797 (the_low_target): Adjust.
12798
12799 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12800
12801 * server.c (handle_v_kill): Pass signal_pid to
12802 kill_inferior if multi_process is zero.
12803
12804 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12805
12806 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12807 * target.h (target_ops): Comment for *_watchpoint to make it clear
12808 the functions can get types '0' and '1'.
12809
12810 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12811
12812 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12813 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12814 * regcache.c (get_regcache): Likewise.
12815 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12816 * win32-low.c (child_fetch_inferior_registers): Remove check for
12817 regno 0.
12818
12819 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12820 Pedro Alves <pedro@codesourcery.com>
12821
12822 * target.h (struct target_ops) <supports_multi_process>: New
12823 callback.
12824 (target_supports_multi_process): New.
12825 * server.c (handle_query): Even if GDB reports support, only
12826 enable multi-process if the target also supports it. Report
12827 multi-process support only if the target backend supports it.
12828 * linux-low.c (linux_supports_multi_process): New function.
12829 (linux_target_ops): Install it as target_supports_multi_process
12830 callback.
12831
12832 2009-05-24 Doug Evans <dje@google.com>
12833
12834 Global renaming of find_thread_pid to find_thread_ptid.
12835 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12836 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12837 All callers updated.
12838
12839 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12840 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12841 directly.
12842
12843 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12844 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12845 (linux_resume_one_lwp): Ditto.
12846
12847 2009-05-23 Doug Evans <dje@google.com>
12848
12849 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12850 from struct inferior_list_entry * to struct lwp_info *.
12851 All callers updated.
12852
12853 2009-05-13 Doug Evans <dje@google.com>
12854
12855 * linux-x86-low.c: Don't include assert.h.
12856 (x86_siginfo_fixup): Use fatal, not assert.
12857 (x86_arch_setup): Fix comment.
12858
12859 2009-05-12 Doug Evans <dje@google.com>
12860
12861 Biarch support for i386/amd64 gdbserver.
12862 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12863 Add linux-x86-low.c.
12864 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12865 (linux-x86-low.o): Add.
12866 * linux-x86-64-low.c: Delete.
12867 * linux-i386-low.c: Delete.
12868 * linux-x86-low.c: New file.
12869 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12870 linux-x86-low.o.
12871 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12872 linux-x86-low.o.
12873 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12874 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12875 (linux_child_pid_to_exec_file): New function.
12876 (elf_64_header_p, elf_64_file_p): New functions.
12877 (siginfo_fixup): New function.
12878 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12879 give target a chance to convert layout.
12880 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12881 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12882
12883 2009-05-07 Doug Evans <dje@google.com>
12884
12885 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12886 (regsets_store_inferior_registers): Ditto.
12887
12888 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12889
12890 PR server/10048
12891
12892 * linux-low.c (must_set_ptrace_flags): Delete.
12893 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12894 of the global.
12895 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12896 `lwp->must_set_ptrace_flags' instead.
12897 (linux_wait_for_event_1): Set ptrace options here.
12898 (linux_wait_1): ... not here.
12899
12900 2009-04-30 Doug Evans <dje@google.com>
12901
12902 * inferiors.c (started_inferior_callback): New function.
12903 (attached_inferior_callback): New function.
12904 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12905 * server.c (print_started_pid, print_attached_pid): New functions.
12906 (detach_or_kill_for_exit): New function.
12907 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12908 * server.h (have_started_inferiors_p): Declare.
12909 (have_attached_inferiors_p): Declare.
12910
12911 * inferiors.c (remove_process): Fix memory leak, free process.
12912 * linux-low.c (linux_remove_process): New function.
12913 (linux_kill): Call it instead of remove_process.
12914 (linux_detach, linux_wait_1): Ditto.
12915
12916 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12917
12918 * configure.srv: Add x86 Windows CE target.
12919
12920 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12921
12922 * inferiors.c (get_thread_process): Make global.
12923 * server.h (get_thread_process): Add prototype.
12924 * thread-db.c (find_one_thread): Use get_thread_process
12925 instead of current_process.
12926 (thread_db_get_tls_address): Do not crash if called when
12927 thread layer is not yet initialized.
12928
12929 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12930
12931 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12932 * spu-low.c (current_tid): Rename to ...
12933 (current_ptid): ... this.
12934 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12935 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12936 ptid_get_lwp (current_ptid) instead of current_tid.
12937 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12938 instead of current_tid. Use find_process_pid to verify pid
12939 argument is valid. Pass proper argument to remove_process.
12940 (spu_thread_alive): Compare current_ptid instead of current_tid.
12941 (spu_resume): Likewise.
12942
12943 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12944
12945 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12946 variable.
12947
12948 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12949
12950 Implement the multiprocess extensions, and add linux multiprocess
12951 support.
12952
12953 * server.h (ULONGEST): Declare.
12954 (struct ptid, ptid_t): New.
12955 (minus_one_ptid, null_ptid): Declare.
12956 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12957 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12958 (struct inferior_list_entry): Change `id' type from unsigned from
12959 to ptid_t.
12960 (struct sym_cache, struct breakpoint, struct
12961 process_info_private): Forward declare.
12962 (struct process_info): Declare.
12963 (current_process): Declare.
12964 (all_processes): Declare.
12965 (initialize_inferiors): Declare.
12966 (add_thread): Adjust to use ptid_t.
12967 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12968 (add_process, remove_process, find_thread_pid): Declare.
12969 (find_inferior_id): Adjust to use ptid_t.
12970 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12971 (multi_process): Declare.
12972 (push_event): Adjust to use ptid_t.
12973 (read_ptid, write_ptid): Declare.
12974 (prepare_resume_reply): Adjust to use ptid_t.
12975 (clear_symbol_cache): Declare.
12976 * inferiors.c (all_processes): New.
12977 (null_ptid, minus_one_ptid): New.
12978 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12979 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12980 (add_thread): Change unsigned long to ptid. Remove gdb_id
12981 parameter. Adjust.
12982 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12983 (gdb_id_to_thread): Rename to ...
12984 (find_thread_pid): ... this. Change unsigned long to ptid.
12985 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12986 (loaded_dll, pull_pid_from_list): Adjust.
12987 (add_process, remove_process, find_process_pid)
12988 (get_thread_process, current_process, initialize_inferiors): New.
12989 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12990 (struct target_waitstatus) <related_pid>: Ditto.
12991 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12992 return type to int.
12993 (struct target_ops) <join>: Add `pid' argument.
12994 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12995 (struct target_ops) <wait>: Add `ptid' field. Change return type
12996 to ptid.
12997 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12998 (mywait): Add `ptid' argument. Change return type to ptid_t.
12999 (target_pid_to_str): Declare.
13000 * target.c (set_desired_inferior): Adjust to use ptids.
13001 (mywait): Add new `ptid' argument. Adjust.
13002 (target_pid_to_str): New.
13003 * mem-break.h (free_all_breakpoints): Declare.
13004 * mem-break.c (breakpoints): Delelete.
13005 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13006 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13007 to use per-process breakpoint list.
13008 (free_all_breakpoints): New.
13009 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13010 (symbol_cache, all_symbols_looked_up): Delete.
13011 (hexchars): New.
13012 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13013 read_ptid): New.
13014 (prepare_resume_reply): Change ptid argument's type from unsigned
13015 long to ptid_t. Adjust. Implement W;process and X;process.
13016 (free_sym_cache, clear_symbol_cache): New.
13017 (look_up_one_symbol): Adjust to per-process symbol cache. *
13018 * server.c (cont_thread, general_thread, step_thread): Change type
13019 to ptid_t.
13020 (attached): Delete.
13021 (multi_process): New.
13022 (last_ptid): Change type to ptid_t.
13023 (struct vstop_notif) <ptid>: Change type to ptid_t.
13024 (queue_stop_reply, push_event): Change `ptid' argument's type to
13025 ptid_t.
13026 (discard_queued_stop_replies): Add `pid' argument.
13027 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13028 changes. Don't reference the `attached' global.
13029 (attach_inferior): Adjust to mywait interface changes.
13030 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13031 features. Handle and report "multiprocess+". Handle
13032 "qAttached:PID".
13033 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13034 changes.
13035 (handle_v_kill): New.
13036 (handle_v_stopped): Adjust to use target_pid_to_str.
13037 (handle_v_requests): Allow multiple attaches and runs when
13038 multiprocess extensions are in effect. Handle "vKill".
13039 (myresume): Adjust to use ptids.
13040 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13041 (handle_status): Adjust to discard_queued_stop_replies interface
13042 change.
13043 (first_thread_of, kill_inferior_callback)
13044 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13045 (main): Call initialize_inferiors. Adjust to use ptids, killing
13046 and detaching from all inferiors. Handle multiprocess packet
13047 variants.
13048 * linux-low.h: Include gdb_proc_service.h.
13049 (struct process_info_private): New.
13050 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13051 <lwpid_of>: Use ptid_get_lwp.
13052 (get_lwp_thread): Adjust.
13053 (struct lwp_info): Add `dead' member.
13054 (find_lwp_pid): Declare.
13055 * linux-low.c (thread_db_active): Delete.
13056 (new_inferior): Adjust comment.
13057 (inferior_pid): Delete.
13058 (linux_add_process): New.
13059 (handle_extended_wait): Adjust.
13060 (add_lwp): Change unsigned long to ptid.
13061 (linux_create_inferior): Add process to processes table. Adjust
13062 to use ptids. Don't set new_inferior here.
13063 (linux_attach_lwp): Rename to ...
13064 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13065 it. Adjust to use ptids.
13066 (linux_attach_lwp): New.
13067 (linux_attach): Add process to processes table. Don't set
13068 new_inferior here.
13069 (struct counter): New.
13070 (second_thread_of_pid_p, last_thread_of_process_p): New.
13071 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13072 multiple processes.
13073 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13074 processes. Remove process from process table.
13075 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13076 to multiple processes.
13077 (any_thread_of): New.
13078 (linux_detach): Add `pid' argument, and handle it. Remove process
13079 from processes table.
13080 (linux_join): Add `pid' argument. Handle it.
13081 (linux_thread_alive): Change unsighed long argument to ptid_t.
13082 Consider dead lwps as not being alive.
13083 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13084 threads we're not interested in.
13085 (same_lwp, find_lwp_pid): New.
13086 (linux_wait_for_lwp): Change `pid' argument's type from int to
13087 ptid_t. Adjust.
13088 (linux_wait_for_event): Rename to ...
13089 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13090 from int to ptid_t. Adjust.
13091 (linux_wait_for_event): New.
13092 (linux_wait_1): Add `ptid' argument. Change return type to
13093 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13094 that exit from the process table.
13095 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13096 Adjust.
13097 (mark_lwp_dead): New.
13098 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13099 stopping all threads, mark its main lwp as dead.
13100 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13101 ptids.
13102 (fetch_register, usr_store_inferior_registers)
13103 (regsets_fetch_inferior_registers)
13104 (regsets_store_inferior_registers, linux_read_memory)
13105 (linux_write_memory): Inline `inferior_pid'.
13106 (linux_look_up_symbols): Adjust to use per-process
13107 `thread_db_active'.
13108 (linux_request_interrupt): Adjust to use ptids.
13109 (linux_read_auxv): Inline `inferior_pid'.
13110 (initialize_low): Don't reference thread_db_active.
13111 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13112 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13113 (ps_getpid): Return the pid of the current inferior.
13114 * thread-db.c (proc_handle, thread_agent): Delete.
13115 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13116 per-process data.
13117 (find_one_thread): Change argument type to ptid_t. Adjust to
13118 per-process data.
13119 (maybe_attach_thread): Adjust to per-process data and ptids.
13120 (thread_db_find_new_threads): Ditto.
13121 (thread_db_init): Ditto.
13122 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13123 processes table. Adjust to use ptids.
13124 (spu_kill, spu_detach): Adjust interface. Remove process from
13125 processes table.
13126 (spu_join, spu_thread_alive): Adjust interface.
13127 (spu_wait): Adjust interface. Remove process from processes
13128 table. Adjust to use ptids.
13129 * win32-low.c (current_inferior_tid): Delete.
13130 (current_inferior_ptid): New.
13131 (debug_event_ptid): New.
13132 (thread_rec): Take a ptid. Adjust.
13133 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13134 (child_delete_thread): Ditto.
13135 (do_initial_child_stuff): Add `attached' argument. Add process to
13136 processes table.
13137 (child_fetch_inferior_registers, child_store_inferior_registers):
13138 Adjust.
13139 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13140 (win32_attach): Pass 1 to do_initial_child_stuff.
13141 (win32_kill): Adjust interface. Remove process from processes
13142 table.
13143 (win32_detach): Ditto.
13144 (win32_join): Adjust interface.
13145 (win32_thread_alive): Take a ptid.
13146 (win32_resume): Adjust to use ptids.
13147 (get_child_debug_event): Ditto.
13148 (win32_wait): Adjust interface. Remove exiting process from
13149 processes table.
13150
13151 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13152
13153 Non-stop mode support.
13154
13155 * server.h (non_stop): Declare.
13156 (gdb_client_data, handler_func): Declare.
13157 (delete_file_handler, add_file_handler, start_event_loop):
13158 Declare.
13159 (handle_serial_event, handle_target_event, push_event)
13160 (putpkt_notif): Declare.
13161 * target.h (enum resume_kind): New.
13162 (struct thread_resume): Replace `step' field by `kind' field.
13163 (TARGET_WNOHANG): Define.
13164 (struct target_ops) <wait>: Add `options' argument.
13165 <supports_non_stop, async, start_non_stop>: New fields.
13166 (target_supports_non_stop, target_async): New.
13167 (start_non_stop): Declare.
13168 (mywait): Add `options' argument.
13169 * target.c (mywait): Add `options' argument. Print child exit
13170 notifications here.
13171 (start_non_stop): New.
13172 * server.c (non_stop, own_buf, mem_buf): New globals.
13173 (struct vstop_notif): New.
13174 (notif_queue): New global.
13175 (queue_stop_reply, push_event, discard_queued_stop_replies)
13176 (send_next_stop_reply): New.
13177 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13178 interface changes.
13179 (attach_inferior): In non-stop mode, don't wait for the target
13180 here.
13181 (handle_general_set): Handle QNonStop.
13182 (handle_query): When handling qC, return the current general
13183 thread, instead of the first thread of the list.
13184 (handle_query): If the backend supports non-stop mode, include
13185 QNonStop+ in the qSupported query response.
13186 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13187 and non-stop mode.
13188 (handle_v_attach, handle_v_run): Handle non-stop mode.
13189 (handle_v_stopped): New.
13190 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13191 (myresume): Adjust to use resume_kind. Handle non-stop.
13192 (queue_stop_reply_callback): New.
13193 (handle_status): Handle non-stop mode.
13194 (main): Clear non_stop flag on reconnection. Use the event-loop.
13195 Refactor serial protocol handling from here ...
13196 (process_serial_event): ... to this new function. When GDB
13197 selects any thread, select one here. In non-stop mode, wait until
13198 GDB acks all pending events before exiting.
13199 (handle_serial_event, handle_target_event): New.
13200 * remote-utils.c (remote_open): Install remote_desc in the event
13201 loop.
13202 (remote_close): Remove remote_desc from the event loop.
13203 (putpkt_binary): Rename to...
13204 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13205 (putpkt_binary): New as wrapper around putpkt_binary_1.
13206 (putpkt_notif): New.
13207 (prepare_resume_reply): In non-stop mode, don't change the
13208 general_thread.
13209 * event-loop.c: New.
13210 * Makefile.in (OBJ): Add event-loop.o.
13211 (event-loop.o): New rule.
13212
13213 * linux-low.h (pid_of): Moved here.
13214 (lwpid_of): New.
13215 (get_lwp_thread): Use lwpid_of.
13216 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13217 * linux-low.c (pid_of): Delete.
13218 (inferior_pid): Use lwpid_of.
13219 (linux_event_pipe): New.
13220 (target_is_async_p): New.
13221 (delete_lwp): New.
13222 (handle_extended_wait): Use lwpid_of.
13223 (add_lwp): Don't set lwpid field.
13224 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13225 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13226 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13227 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13228 first. Adjust to linux_wait_for_event interface changes. Use
13229 lwpid_of.
13230 (linux_detach): Don't delete the main lwp here.
13231 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13232 (status_pending_p): Don't consider explicitly suspended lwps.
13233 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13234 pointer. Add OPTIONS argument. Change return type to int. Use
13235 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13236 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13237 pointer. Add status pointer argument. Return a pid instead of a
13238 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13239 changes. In non-stop mode, don't switch to a random thread.
13240 (linux_wait): Rename to...
13241 (linux_wait_1): ... this. Add target_options argument, and handle
13242 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13243 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13244 clean exit and signal exit code. Don't stop all threads in
13245 non-stop mode. In all-stop mode, only stop all threads when
13246 reporting a stop to GDB. Handle explicit thread stop requests.
13247 (async_file_flush, async_file_mark): New.
13248 (linux_wait): New.
13249 (send_sigstop): Use lwpid_of.
13250 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13251 interface changes. In non-stop mode, don't switch to a random
13252 thread.
13253 (linux_resume_one_lwp): Use lwpid_of.
13254 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13255 (linux_resume_one_thread): ... this. Handle resume_stop. In
13256 non-stop mode, don't look for pending flag in all threads.
13257 (resume_status_pending_p): Don't consider explicitly suspended
13258 threads.
13259 (my_waitpid): Reimplement. Emulate __WALL.
13260 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13261 Use lwpid_of.
13262 (sigchld_handler, linux_supports_non_stop, linux_async)
13263 (linux_start_non_stop): New.
13264 (linux_target_ops): Register linux_supports_non_stop, linux_async
13265 and linux_start_non_stop.
13266 (initialize_low): Install SIGCHLD handler.
13267 * thread-db.c (thread_db_create_event, find_one_thread)
13268 (thread_db_get_tls_address): Use lwpid_of.
13269 * win32-low.c (win32_detach): Adjust to use resume_kind.
13270 (win32_wait): Add `options' argument.
13271 * spu-low.c (spu_resume): Adjust to use resume_kind.
13272 (spu_wait): Add `options' argument.
13273
13274 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13275
13276 Decouple target code from remote protocol.
13277
13278 * target.h (enum target_waitkind): New.
13279 (struct target_waitstatus): New.
13280 (struct target_ops) <wait>: Return an unsigned long. Take a
13281 target_waitstatus pointer instead of a char pointer.
13282 (mywait): Likewise.
13283 * target.c (mywait): Change prototype to return an unsigned long.
13284 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13285 * server.h (thread_from_wait, old_thread_from_wait): Delete
13286 declarations.
13287 (prepare_resume_reply): Change prototype to take a
13288 target_waitstatus.
13289 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13290 (last_status, last_ptid): New.
13291 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13292 pid instead of a signal.
13293 (attach_inferior): Remove "status" and "signal" parameters.
13294 Adjust.
13295 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13296 not as an address.
13297 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13298 (handle_v_requests, myresume): Remove "status" and "signal"
13299 parameters. Adjust.
13300 (handle_status): New.
13301 (main): Delete local `status'. Adjust.
13302 * remote-utils.c: Include target.h.
13303 (prepare_resume_reply): Change prototype to take a
13304 target_waitstatus. Adjust.
13305
13306 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13307 interface.
13308 * spu-low.c (spu_wait): Adjust.
13309 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13310 Delete.
13311 (win32_wait): Adjust.
13312
13313 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13314
13315 * target.h (struct thread_resume): Delete leave_stopped member.
13316 (struct target_ops): Add a `n' argument to the `resume' callback.
13317 * server.c (start_inferior): Adjust.
13318 (handle_v_cont, myresume): Adjust.
13319 * linux-low.c (check_removed_breakpoint): Adjust to resume
13320 interface change, and to removed leave_stopped field.
13321 (resume_ptr): Delete.
13322 (struct thread_resume_array): New.
13323 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13324 resume interface change.
13325 (linux_continue_one_thread, linux_queue_one_thread)
13326 (resume_status_pending_p): Check if the resume field is NULL
13327 instead of checking the leave_stopped member.
13328 (linux_resume): Adjust to the target resume interface change.
13329 * spu-low.c (spu_resume): Adjust to the target resume interface
13330 change.
13331 * win32-low.c (win32_detach, win32_resume): Ditto.
13332
13333 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13334
13335 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13336 flag.
13337 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13338 pending.
13339 (linux_continue_one_thread): Only preserve the stepping flag if
13340 there's a pending breakpoint.
13341
13342 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13343
13344 * server.c (main): After the inferior having exited, call
13345 remote_close before exiting gdbserver.
13346
13347 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13348
13349 Fix size of FPSCR in Power 7 processors.
13350 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13351 (PPC_FEATURE_HAS_DFP): New #define.
13352 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13353 size of the FPSCR.
13354
13355 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13356
13357 * server.c (handle_query) Whitespace and formatting.
13358
13359 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13360
13361 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13362 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13363 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13364 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13365 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13366 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13367 Makefile.in, configure.ac: Fix whitespace throughout.
13368 * configure: Regenerate.
13369
13370 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13371
13372 * inferiors.c (find_inferior): Make it safe for the callback
13373 function to delete the currently iterated inferior.
13374
13375 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13376
13377 * Makefile.in (linuw_low_h): Move higher.
13378 (thread-db.o): Depend on $(linux_low_h).
13379
13380 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13381
13382 Rename "process" to "lwp" throughout.
13383
13384 * linux-low.c (all_processes): Rename to...
13385 (all_lwps): ... this.
13386 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13387 (add_process): Rename to ...
13388 (add_lwp): ... this. Adjust.
13389 (linux_create_inferior): Adjust.
13390 (linux_attach_lwp): Adjust.
13391 (linux_attach): Adjust.
13392 (linux_kill_one_process): Rename to ...
13393 (linux_kill_one_lwp): ... this. Adjust.
13394 (linux_kill): Adjust.
13395 (linux_detach_one_process): Rename to ...
13396 (linux_detach_one_lwp): ... this. Adjust.
13397 (linux_detach): Adjust.
13398 (check_removed_breakpoint): Adjust.
13399 (status_pending_p): Adjust.
13400 (linux_wait_for_process): Rename to ...
13401 (linux_wait_for_lwp): ... this. Adjust.
13402 (linux_wait_for_event): Adjust.
13403 (send_sigstop): Adjust.
13404 (wait_for_sigstop): Adjust.
13405 (stop_all_processes): Rename to ...
13406 (stop_all_lwps): ... this.
13407 (linux_resume_one_process): Rename to ...
13408 (linux_resume_one_lwp): ... this. Adjust.
13409 (linux_set_resume_request, linux_continue_one_thread)
13410 (linux_queue_one_thread, resume_status_pending_p)
13411 (usr_store_inferior_registers, regsets_store_inferior_registers)
13412 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13413 Adjust.
13414 * linux-low.h (get_process): Rename to ...
13415 (get_lwp): ... this. Adjust.
13416 (get_thread_process): Rename to ...
13417 (get_thread_lwp): ... this. Adjust.
13418 (get_process_thread): Rename to ...
13419 (get_lwp_thread): ... this. Adjust.
13420 (struct process_info): Rename to ...
13421 (struct lwp_info): ... this.
13422 (all_processes): Rename to ...
13423 (all_lwps): ... this.
13424 * proc-service.c (ps_lgetregs): Adjust.
13425 * thread-db.c (thread_db_create_event, find_one_thread)
13426 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13427
13428 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13429
13430 * server.c (handle_query): Handle "qAttached".
13431
13432 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13433
13434 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13435 GPLv3, update license URL.
13436
13437 2009-03-01 Doug Evans <dje@google.com>
13438
13439 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13440 (server_h): Add gdb_signals.h.
13441 (signals.o): Update.
13442 * server.h (target_signal_from_host,target_signal_to_host_p)
13443 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13444
13445 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13446
13447 * remote-utils.c (getpkt): Also generate remote-debug
13448 information if noack_mode is set.
13449
13450 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13451
13452 * server.c (handle_query): Report qXfer:siginfo:read and
13453 qXfer:siginfo:write as supported and handle them.
13454 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13455 * linux-low.c (linux_xfer_siginfo): New.
13456 (linux_target_ops): Set it.
13457
13458 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13459
13460 * server.c (gdbserver_usage): Mention --remote-debug.
13461 (main): Accept '--remote-debug' switch.
13462
13463 2009-01-18 Doug Evans <dje@google.com>
13464
13465 * regcache.c (new_register_cache): No need to check result of xcalloc.
13466 * server.c (handle_search_memory): Back out calls to xmalloc,
13467 result is checked and error is returned to user upon failure.
13468 (handle_query): Ditto. Add more checks for result of malloc.
13469 (handle_v_cont): Check result of malloc, report error back to
13470 user upon failure.
13471 (handle_v_run): Ditto. Call freeargv.
13472 * server.h (freeargv): Declare.
13473 * utils.c (freeargv): New fn.
13474
13475 2009-01-15 Doug Evans <dje@google.com>
13476
13477 * gdbreplay.c (perror_with_name): Make arg const char *.
13478 * server.h (target_signal_to_name): Make return type const char *.
13479 * thread-db.c (thread_db_err_str): Make return type const char *.
13480 * utils.c (perror_with_name): Make arg const char *.
13481
13482 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13483
13484 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13485 when handling a EXIT_PROCESS_DEBUG_EVENT.
13486
13487 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13488
13489 * gdbreplay.c (gdbreplay_version): Update copyright year.
13490 * server.c (gdbserver_version): Likewise.
13491
13492 2009-01-05 Doug Evans <dje@google.com>
13493
13494 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13495 (handle_extended_wait): Improve comment.
13496
13497 2008-12-13 Doug Evans <dje@google.com>
13498
13499 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13500 * server.h (ATTR_MALLOC): New macro.
13501 (xmalloc,xcalloc,xstrdup): Declare.
13502 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13503 * inferiors.c: Ditto.
13504 * linux-low.c: Ditto.
13505 * mem-break.c: Ditto.
13506 * regcache.c: Ditto.
13507 * remote-utils.c: Ditto.
13508 * server.c: Ditto.
13509 * target.c: Ditto.
13510 * win32-low.c: Ditto.
13511
13512 2008-12-12 Doug Evans <dje@google.com>
13513
13514 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13515 in debugging printf.
13516
13517 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13518
13519 2008-12-09 Doug Evans <dje@google.com>
13520
13521 * linux-low.h (struct process_info): Delete member tid, unused.
13522 * thread-db.c (find_one_thread): Update.
13523 (maybe_attach_thread): Update.
13524
13525 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13526
13527 * target.h (struct target_ops): Add qxfer_osdata member.
13528 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13529 and dirent.h.
13530 (linux_qxfer_osdata): New functions.
13531 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13532 callback.
13533 * server.c (handle_query): Handle "qXfer:osdata:read:".
13534 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13535 (buffer_xml_printf): New functions.
13536 * server.h (struct buffer): New.
13537 (buffer_grow_str, buffer_grow_str0): New macros.
13538 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13539 (buffer_xml_printf): Declare.
13540
13541 2008-11-24 Doug Evans <dje@google.com>
13542
13543 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13544
13545 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13546
13547 * server.c (handle_v_run): Always use the supplied argument list.
13548
13549 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13550
13551 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13552 (xtensa_regmap_table): Add entry for scompare1.
13553
13554 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13555
13556 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13557 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13558 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13559 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13560 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13561 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13562 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13563 XML target descriptions.
13564 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13565 when inferior is running on an ISA 2.05 or later processor. Add
13566 special case to return offset for full 64-bit slot of FPSCR when
13567 in 32-bits.
13568
13569 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13570
13571 * Makefile.in (SFILES, clean): Added sparc64 files.
13572 (reg-sparc64.o, reg-sparc64.c): New.
13573 * configure.srv (sparc*-*-linux*): New configuration.
13574 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13575 syscall arguments for SPARC.
13576 (regsets_store_inferior_registers): Likewise.
13577 * linux-sparc-low.c: New file.
13578
13579 2008-10-21 Doug Evans <dje@google.com>
13580
13581 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13582 (READLINE_DIR,READLINE_DEP): Delete.
13583 (INTERNAL_CFLAGS): Update.
13584 (LINTFLAGS): Update.
13585
13586 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13587
13588 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13589 whole argv from the last run, not just argv[0].
13590
13591 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13592
13593 * regcache.c (new_register_cache): Return NULL if the register
13594 cache size isn't known yet.
13595 (free_register_cache): Avoid dereferencing a NULL regcache.
13596
13597 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13598
13599 * configure.srv: Merge MIPS and MIPS64.
13600
13601 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13602
13603 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13604
13605 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13606
13607 * Makefile.in: Add required vsx dependencies.
13608
13609 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13610 Declare init_registers_powerpc_vsx32l.
13611 Declare init_registers_powerpc_vsx64l.
13612 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13613 (ppc_arch_setup): Check for VSX in hwcap.
13614 (ppc_fill_vsxregset): New function.
13615 (ppc_store_vsxregset): New function.
13616 Add new VSX entry in regset_info target_regsets.
13617
13618 * configure.srv: Add new VSX dependencies.
13619
13620 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13621
13622 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13623 (remote_open): Set or clear transport_is_reliable.
13624 (putpkt_binary): Don't expect acks in noack mode.
13625 (getpkt): Don't send ack/nac in noack mode.
13626 * server.c (handle_general_set): Handle QStartNoAckMode.
13627 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13628 qSupported.
13629 (main): Reset noack_mode on every connection.
13630 * server.h (noack_mode): Declare.
13631
13632 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13633
13634 * Makefile.in (GDBREPLAY_OBS): New variable.
13635 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13636
13637 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13638 Daniel Jacobowitz <dan@codesourcery.com>
13639
13640 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13641 (usr_store_inferior_registers): Likewise.
13642 (regsets_store_inferior_registers): Likewise.
13643
13644 2008-07-31 Rolf Jansen <rj@surtec.com>
13645 Pedro Alves <pedro@codesourcery.com>
13646
13647 * configure.ac: Check for memmem declaration.
13648 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13649 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13650 (disable_packet_qfThreadInfo): Unconditionally compile.
13651 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13652 * configure, config.in: Regenerate.
13653
13654 2008-07-28 Doug Kwan <dougkwan@google.com>
13655
13656 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13657 (linux_write_memory): Remove declaration of errno.
13658
13659 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13660
13661 * linux-low.c (handle_extended_wait): Do not use "status"
13662 variable uninitialized.
13663
13664 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13665
13666 * server.c (handle_v_attach): Inhibit reporting dll changes.
13667
13668 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13669
13670 * remote-utils.c (prepare_resume_reply): If requested, don't
13671 output "thread:TID" in the T stop reply.
13672
13673 * server.c (disable_packet_vCont, disable_packet_Tthread)
13674 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13675 (handle_query): If requested, disable support for qC, qfThreadInfo
13676 and qsThreadInfo.
13677 (handle_v_requests): If requested, disable support for vCont.
13678 (gdbserver_show_disableable): New.
13679 (main): Handle --disable-packet and --disable-packet=LIST.
13680
13681 * server.h (disable_packet_vCont, disable_packet_Tthread)
13682 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13683
13684 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13685
13686 * server.c (gdbserver_usage): Mention --version.
13687
13688 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13689
13690 * Makefile.in (gdbreplay.o): New rule.
13691
13692 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13693
13694 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13695 message, not gdbserver.
13696
13697 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13698 Nathan Sidwell <nathan@codesourcery.com>
13699 Joseph Myers <joseph@codesourcery.com>
13700
13701 * acinclude.m4: Include ../../config/acx.m4.
13702 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13703 * configure, config.in: Regenerate.
13704 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13705 * server.c (gdbserver_version): Print PKGVERSION.
13706 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13707 (main): Adjust gdbserver_usage calls.
13708 * gdbreplay.c (version, host_name): Add declarations.
13709 (gdbreplay_version, gdbreplay_usage): New.
13710 (main): Accept --version and --help options.
13711
13712 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13713
13714 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13715 (arm_breakpoint_at): Handle Thumb.
13716 (the_low_target): Add comment.
13717
13718 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13719
13720 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13721
13722 2008-05-09 Doug Evans <dje@google.com>
13723
13724 * server.h (decode_search_memory_packet): Declare.
13725 * remote-utils.c (decode_search_memory_packet): New fn.
13726 * server.c (handle_search_memory_1): New fn.
13727 (handle_search_memory): New fn.
13728 (handle_query): Process qSearch:memory packets.
13729
13730 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13731
13732 * regcache.c (registers_length): Remove.
13733 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13734 full register packet.
13735 * regcache.h (registers_length): Remove prototype.
13736 * server.h (PBUFSIZ): Define to 16384.
13737
13738 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13739
13740 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13741 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13742 powerpc-64l.o, and powerpc-altivec64l.o.
13743 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13744 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13745 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13746 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13747 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13748 to srv_xmlfiles.
13749
13750 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13751 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13752 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13753 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13754 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13755 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13756 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13757 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13758 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13759 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13760 (clean): Update.
13761
13762 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13763 (init_registers_powerpc_32l): ... this new prototype.
13764 (init_registers_powerpc_32): Remove, replace by ...
13765 (init_registers_powerpc_altivec32l): ... this new prototype.
13766 (init_registers_powerpc_e500): Remove, replace by ...
13767 (init_registers_powerpc_e500l): ... this new prototype.
13768 (init_registers_ppc64): Remove, replace by ...
13769 (init_registers_powerpc_64l): ... this new prototype.
13770 (init_registers_powerpc_64): Remove, replace by ...
13771 (init_registers_powerpc_altivec64l): ... this new prototype.
13772 (ppc_num_regs): Set to 73.
13773 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13774 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13775 (ppc_cannot_store_register): Handle orig_r3 and trap.
13776 (ppc_arch_setup): Update init_registers_... calls.
13777 (ppc_fill_gregset): Handle orig_r3 and trap.
13778
13779 * inferiors.c (clear_inferiors): Reset current_inferior.
13780
13781 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13782
13783 * acinclude.m4: Add override.m4.
13784 * configure: Regenerate.
13785
13786 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13787
13788 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13789 initial call to init_register_ppc64.
13790
13791 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13792
13793 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13794 single powerpc*-*-linux* case.
13795 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13796
13797 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13798
13799 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13800 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13801 from reg_xmlfiles.
13802 * linux-ppc-low.c: Include <elf.h>.
13803 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13804 (ppc_hwcap): New global variable.
13805 (ppc_regmap): Remove __SPE__ #ifdef sections.
13806 (ppc_regmap_e500): New global variable.
13807 (ppc_cannot_store_register): Update __SPE__ special case.
13808 (ppc_get_hwcap): New function.
13809 (ppc_arch_setup): Use it to determine whether inferior supports
13810 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13811 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13812 Do not access registers if target does not support AltiVec.
13813 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13814 Do not access registers if target does not support SPE.
13815 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13816
13817 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13818
13819 * linux-low.c (disabled_regsets, num_regsets): New.
13820 (use_regsets_p): Delete.
13821 (linux_wait_for_process): Clear disabled_regsets.
13822 (regsets_fetch_inferior_registers): Check and set it.
13823 (regsets_store_inferior_registers): Likewise.
13824 (linux_fetch_registers, linux_store_registers): Do not use
13825 use_regsets_p.
13826 (initialize_low): Allocate disabled_regsets.
13827
13828 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13829
13830 * Makefile.in (LIBOBJS): New.
13831 (OBS): Use LIBOBJS.
13832 (memmem.o): New rule.
13833 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13834 * configure: Regenerated.
13835
13836 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13837
13838 * server.c (handle_query): Never return "unsupported" for
13839 qXfer:features:read queries.
13840
13841 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13842
13843 * server.c (get_features_xml): Fix inverted condition.
13844 (handle_query): Always support qXfer:feature:read.
13845
13846 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13847
13848 * server.c (wrapper_argv): New.
13849 (start_inferior): Handle wrapper_argv. If set, expect an extra
13850 trap.
13851 (gdbserver_usage): Document --wrapper.
13852 (main): Parse --wrapper.
13853
13854 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13855
13856 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13857 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13858 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13859 (ppc_set_pc): Likewise.
13860 (ppc_arch_setup): New function.
13861 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13862 of collect_register.
13863 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13864
13865 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13866
13867 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13868 instead of linux-ppc64-low.o.
13869 * linux-ppc64-low.c: Remove file.
13870 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13871 (linux-ppc64-low.o): Remove rule.
13872
13873 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13874 (init_registers_powerpc_64): Likewise.
13875 (ppc_regmap): Conditionally define depending on __powerpc64__.
13876 (ppc_cannot_store_register): Do not special-case "fpscr" when
13877 compiled on __powerpc64__.
13878 (ppc_collect_ptrace_register): New function.
13879 (ppc_supply_ptrace_register): New function.
13880 (ppc_breakpoint): Change type to "unsigned int".
13881 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13882 (the_low_target): Conditionally provide initializers for the
13883 arch_setup member depending on __powerpc64__. Install
13884 collect_ptrace_register and supply_ptrace_register members.
13885
13886 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13887
13888 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13889 * server.c (gdbserver_xmltarget): Define.
13890 (get_features_xml): Use it to replace "target.xml" and arch_string.
13891
13892 * configure.srv: Remove srv_xmltarget. Add XML files that were
13893 mentioned there to srv_xmlfiles instead. Remove conditional tests
13894 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13895 srv_xmlfiles and srv_regobj to include all possible choices.
13896 * configure.ac (srv_xmltarget): Remove.
13897 (srv_xmlfiles): Do not add "target.xml".
13898 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13899 checks for supplementary target information.
13900 * configure: Regenerate.
13901 * Makefile.in (XML_TARGET): Remove.
13902 (target.xml): Remove rule.
13903 (clean): Do not clean up target.xml.
13904 (.PRECIOUS): Do not mention target.xml.
13905
13906 * target.h (struct target_ops): Remove arch_string member.
13907 * linux-low.c (linux_arch_string): Remove.
13908 (linux_target_ops): Remove arch_string initializer.
13909 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13910 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13911 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13912 * spu-low.c (spu_arch_string): Remove.
13913 (spu_target_ops): Remove arch_string initializer.
13914 * win32-low.c (win32_arch_string): Remove.
13915 (win32_target_ops): Remove arch_string initializer.
13916 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13917 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13918 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13919
13920 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13921
13922 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13923 by collect_ptrace_register and supply_ptrace_register hooks.
13924 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13925 instead of checking for the_low_target.left_pad_xfer.
13926 (usr_store_inferior_registers): Use collect_ptrace_register callback
13927 instead of checking for the_low_target.left_pad_xfer.
13928
13929 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13930 (s390_supply_ptrace_register): Likewise.
13931 (s390_fill_gregset): Call s390_collect_ptrace_register.
13932 (the_low_target): Update.
13933
13934 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13935 (ppc_supply_ptrace_register): Likewise.
13936 (the_low_target): Update.
13937
13938 * linux-i386-low.c (the_low_target): Update.
13939 * linux-x86-64-low.c (the_low_target): Update.
13940
13941 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13942
13943 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13944 reg-s390.o and reg-s390x.o.
13945
13946 * linux-low.c (new_inferior): New global variable.
13947 (linux_create_inferior, linux_attach): Set it.
13948 (linux_wait_for_process): Call the_low_target.arch_setup after the
13949 target has stopped for the first time.
13950 (initialize_low): Do not call the_low_target.arch_setup.
13951
13952 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13953 (s390_set_pc): Likewise.
13954 (s390_arch_setup): New function.
13955 (the_low_target): Use s390_arch_setup as arch_setup routine.
13956
13957 * regcache.c (realloc_register_cache): New function.
13958 (set_register_cache): Call it for each existing regcache.
13959
13960 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13961
13962 * server.h (init_registers): Remove prototype.
13963
13964 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13965 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13966 instead of init_registers ().
13967 * linux-arm-low.c (init_registers_arm): Add prototype.
13968 (init_registers_arm_with_iwmmxt): Likewise.
13969 (the_low_target): Add initializer for arch_setup field.
13970 * linux-cris-low.c (init_registers_cris): Add prototype.
13971 (the_low_target): Add initializer for arch_setup field.
13972 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13973 (the_low_target): Add initializer for arch_setup field.
13974 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13975 (the_low_target): Add initializer for arch_setup field.
13976 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13977 (the_low_target): Add initializer for arch_setup field.
13978 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13979 (the_low_target): Add initializer for arch_setup field.
13980 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13981 (the_low_target): Add initializer for arch_setup field.
13982 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13983 (init_registers_mips64_linux): Likewise.
13984 (the_low_target): Add initializer for arch_setup field.
13985 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13986 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13987 (the_low_target): Add initializer for arch_setup field.
13988 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13989 (init_registers_powerpc_64): Likewise.
13990 (the_low_target): Add initializer for arch_setup field.
13991 * linux-s390-low.c (init_registers_s390): Add prototype.
13992 (init_registers_s390x): Likewise.
13993 (the_low_target): Add initializer for arch_setup field.
13994 * linux-sh-low.c (init_registers_sh): Add prototype.
13995 (the_low_target): Add initializer for arch_setup field.
13996 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13997 (the_low_target): Add initializer for arch_setup field.
13998 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13999 (the_low_target): Add initializer for arch_setup field.
14000
14001 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14002 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14003 instead of init_registers ().
14004 * win32-arm-low.c (init_registers_arm): Add prototype.
14005 (the_low_target): Add initializer for arch_setup field.
14006 * win32-i386-low.c (init_registers_i386): Add prototype.
14007 (the_low_target): Add initializer for arch_setup field.
14008
14009 * spu-low.c (init_registers_spu): Add prototype.
14010 (initialize_low): Call initialie_registers_spu () instead of
14011 initialize_registers ().
14012
14013 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14014
14015 * server.c (handle_v_requests): When handling the vRun and vAttach
14016 packets, if already debugging a process, don't kill it. Return an
14017 error instead.
14018
14019 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14020
14021 * server.c (handle_query): Correct length check.
14022
14023 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14024
14025 * win32-low.c (do_initial_child_stuff): Add process handle
14026 parameter. Set current_process_handle and current_process_id from the
14027 parameters. Clear globals.
14028 (win32_create_inferior): Don't set current_process_handle and
14029 current_process_id here. Instead pass them on the call to
14030 do_initial_child_stuff.
14031 (win32_attach): Likewise.
14032 (win32_clear_inferiors): New.
14033 (win32_kill): Don't close the current process handle or the
14034 current thread handle here. Instead call win32_clear_inferiors.
14035 (win32_detach): Don't open a new handle to the process. Call
14036 win32_clear_inferiors.
14037 (win32_join): Don't rely on current_process_handle; open a new
14038 handle using the process id.
14039 (win32_wait): Call win32_clear_inferiors when the inferior process
14040 has exited.
14041
14042 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14043
14044 * server.c (monitor_show_help): Add "exit".
14045
14046 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14047
14048 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14049 (clean): Add reg-xtensa.c.
14050 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14051 * configure.srv (xtensa*-*-linux*) New target.
14052 * linux-xtensa-low.c: New.
14053 * xtensa-xtregs.c: New.
14054
14055 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14056
14057 * hostio.c: Don't include errno.h.
14058 (errno_to_fileio_errno): Move to hostio-errno.
14059 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14060 error number outputting to the target->hostio_last_error callback.
14061 (hostio_packet_error): Use FILEIO_EINVAL directly.
14062 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14063 calls to hostio_error.
14064 * hostio-errno.c: New.
14065 * server.h (hostio_last_error_from_errno): Declare.
14066 * target.h (target_ops): Add hostio_last_error member.
14067 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14068 as hostio_last_error handler.
14069 * spu-low.c (spu_target_ops): Likewise.
14070 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14071 (wince_hostio_last_error): New functions.
14072 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14073 as hostio_last_error handler.
14074 (win32_target_ops) [!_WIN32_WCE]: Register
14075 hostio_last_error_from_errno as hostio_last_error handler.
14076 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14077 (hostio-errno.o): New rule.
14078 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14079 * configure.srv (srv_hostio_err_objs): New variable. Default to
14080 hostio-errno.o.
14081 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14082 * configure: Regenerate.
14083
14084 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14085
14086 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14087 (linux_kill, linux_detach): Clean up the process list.
14088 * remote-utils.c (remote_open): Improve port number parsing.
14089 (putpkt_binary, input_interrupt): Only send interrupts if the target
14090 is running.
14091 * server.c (extended_protocol): Make static.
14092 (attached): Define earlier.
14093 (exit_requested, response_needed, program_argv): New variables.
14094 (target_running): New.
14095 (start_inferior): Clear attached here.
14096 (attach_inferior): Set attached here.
14097 (require_running): Define.
14098 (handle_query): Use require_running and target_running. Implement
14099 "monitor exit".
14100 (handle_v_attach, handle_v_run): New.
14101 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14102 (gdbserver_usage): Update.
14103 (main): Redo argument parsing. Handle --debug and --multi. Handle
14104 --attach along with other options or after the port. Save
14105 program_argv. Support no initial program. Resynchronize
14106 communication with GDB after an error. Handle "monitor exit".
14107 Use require_running and target_running. Always allow the extended
14108 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14109 restart in extended mode.
14110 * README: Refer to the GDB manual. Update --attach usage.
14111
14112 2007-12-20 Andreas Schwab <schwab@suse.de>
14113
14114 * linux-low.c (STACK_SIZE): Define.
14115 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14116 (linux_test_for_tracefork): Likewise.
14117
14118 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14119
14120 * linux-low.c (linux_wait_for_event): Update messages. Do not
14121 reinsert auto-delete breakpoints.
14122 * mem-break.c (struct breakpoint): Change return type of handler to
14123 int.
14124 (set_breakpoint_at): Update handler type.
14125 (reinsert_breakpoint_handler): Return 1 instead of calling
14126 delete_breakpoint.
14127 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14128 setting a new one.
14129 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14130 * mem-break.h (set_breakpoint_at): Update handler type.
14131 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14132 * win32-low.c (auto_delete_breakpoint): New.
14133 (get_child_debug_event): Use it.
14134
14135 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14136
14137 * configure.ac: Check for pread and pwrite.
14138 * hostio.c (handle_pread): Fall back to lseek and read.
14139 (handle_pwrite): Fall back to lseek and write.
14140 * config.in, configure: Regenerated.
14141
14142 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14143
14144 * server.c (myresume): Add own_buf argument.
14145 (main): Update calls.
14146
14147 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14148
14149 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14150 * remote-utils.c (remote_open): Do not call disable_async_io.
14151 (block_async_io): Delete.
14152 (unblock_async_io): Make static.
14153 (initialize_async_io): New.
14154 * server.c (handle_v_cont): Handle async I/O here.
14155 (myresume): Likewise. Move other common resume tasks here...
14156 (main): ... from here. Call initialize_async_io. Disable async
14157 I/O before the main loop.
14158 * server.h (initialize_async_io): Declare.
14159 (block_async_io, unblock_async_io): Delete prototypes.
14160 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14161
14162 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14163
14164 * remote-utils.c (readchar): Allow binary data in received messages.
14165
14166 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14167
14168 * win32-low.c (attaching): New global.
14169 (win32_create_inferior): Clear the `attaching' global.
14170 (win32_attach): Set the `attaching' global.
14171 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14172 attaching. Only set a breakpoint at the entry point if not
14173 attaching.
14174
14175 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14176
14177 * server.c (main): Don't report dll events on the initial
14178 connection on attaches.
14179
14180 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14181
14182 * server.c (main): Relax numerical bases supported for the pid of
14183 the --attach command line argument.
14184
14185 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14186
14187 * win32-low.c (win32_attach): Call OpenProcess before
14188 DebugActiveProcess, not after. Add last error output to error
14189 call.
14190
14191 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14192
14193 * win32-low.c (win32_get_thread_context)
14194 (win32_set_thread_context): New functions.
14195 (thread_rec): Use win32_get_thread_context.
14196 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14197 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14198 field.
14199
14200 2007-12-03 Leo Zayas
14201 Pedro Alves <pedro_alves@portugalmail.pt>
14202
14203 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14204 global variables.
14205 (child_add_thread): Minor cleanup.
14206 (child_continue): Resume artificially suspended threads before
14207 calling ContinueDebugEvent.
14208 (suspend_one_thread): New.
14209 (fake_breakpoint_event): New.
14210 (get_child_debug_event): Change return type to int. Check here if
14211 gdb sent an interrupt request. If a soft interrupt was requested,
14212 fake a breakpoint event. Return 0 if there is no event to handle,
14213 and 1 otherwise.
14214 (win32_wait): Don't check here if gdb sent an interrupt request.
14215 Ensure there is a valid event to handle.
14216 (win32_request_interrupt): Add soft interruption method as last
14217 resort.
14218
14219 2007-12-03 Leo Zayas
14220 Pedro Alves <pedro_alves@portugalmail.pt>
14221
14222 * win32-low.h (win32_thread_info): Add descriptions to the
14223 structure members. Replace `suspend_count' counter by a
14224 `suspended' flag.
14225 * win32-low.c (thread_rec): Update condition of when to get the
14226 context from the inferior. Rely on ContextFlags being set if it
14227 has already been retrieved. Only suspend the inferior thread if
14228 we haven't already. Warn if that fails.
14229 (continue_one_thread): s/suspend_count/suspended/. Only call
14230 ResumeThread once. Warn if that fails.
14231
14232 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14233
14234 * win32-low.c (win32_wait): Don't read from the inferior when it
14235 has already exited.
14236
14237 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14238
14239 * Makefile.in (win32_low_h): New variable.
14240 (win32-low.o): Add dependency on $(win32_low_h).
14241 (win32-arm-low.o, win32-i386-low.o): New rules.
14242
14243 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14244
14245 * hostio.c: Correct copyright year.
14246
14247 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14248
14249 * Makefile.in (OBS): Add hostio.o.
14250 (hostio.o): New rule.
14251 * server.h (handle_vFile): Declare.
14252 * hostio.c: New file.
14253 * server.c (handle_v_requests): Take packet_len and new_packet_len
14254 for binary packets. Call handle_vFile.
14255 (main): Update call to handle_v_requests.
14256
14257 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14258
14259 * linux-low.c: Include <sched.h>.
14260
14261 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14262
14263 * linux-low.c (linux_tracefork_grandchild): New.
14264 (linux_tracefork_child): Use clone.
14265 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14266
14267 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14268
14269 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14270
14271 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14272
14273 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14274
14275 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14276
14277 * inferiors.c (change_inferior_id): Delete.
14278 (add_pid_to_list, pull_pid_from_list): New.
14279 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14280 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14281 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14282 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14283 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14284 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14285 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14286 (using_threads): Always set to 1.
14287 (handle_extended_wait): New.
14288 (add_process): Do not set TID.
14289 (linux_create_inferior): Set must_set_ptrace_flags.
14290 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14291 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14292 (linux_thread_alive): Rename TID argument to LWPID.
14293 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14294 (linux_wait_for_event): Do not use TID or check using_threads. Update
14295 call to dead_thread_notify. Call handle_extended_wait.
14296 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14297 (send_sigstop): Delete sigstop_sent.
14298 (wait_for_sigstop): Avoid TID.
14299 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14300 (linux_test_for_tracefork): New.
14301 (linux_lookup_signals): Use thread_db_active and
14302 linux_supports_tracefork_flag.
14303 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14304 * linux-low.h (get_process_thread): Avoid TID.
14305 (struct process_ifo): Move thread_known and tid to the end. Remove
14306 sigstop_sent.
14307 (linux_attach_lwp, thread_db_init): Update prototypes.
14308 * server.h (change_inferior_id): Delete prototype.
14309 (add_pid_to_list, pull_pid_from_list): New prototypes.
14310 * thread-db.c (thread_db_use_events): New.
14311 (find_first_thread): Rename to...
14312 (find_one_thread): ...this. Update callers and messages. Do not
14313 call fatal. Check thread_db_use_events. Do not call
14314 change_inferior_id or new_thread_notify.
14315 (maybe_attach_thread): Update. Do not call new_thread_notify.
14316 (thread_db_init): Set thread_db_use_events. Check use_events.
14317 * utils.c (fatal, warning): Correct message prefix.
14318
14319 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14320
14321 * Makefile.in (clean): Remove new files.
14322 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14323 (powerpc-64.o, powerpc-64.c): New rules.
14324 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14325 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14326 with SPE.
14327 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14328 SPE targets.
14329 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14330 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14331 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14332 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14333 (target_regsets): Add AltiVec and SPE register sets.
14334 * configure.ac: Check for AltiVec and SPE.
14335 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14336 (ppc_fill_vrregset, ppc_store_vrregset): New.
14337 (target_regsets): Add AltiVec register set.
14338 * configure: Regenerated.
14339
14340 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14341
14342 * linux-low.c (O_LARGEFILE): Define.
14343 (linux_read_memory): Use /proc/PID/mem.
14344 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14345 * configure, config.in: Regenerated.
14346
14347 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14348
14349 * linux-low.c (linux_wait_for_event): Do not pass signals while
14350 single-stepping.
14351
14352 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14353
14354 * win32-low.c (create_process): New.
14355 (win32_create_inferior): Use create_process instead of
14356 CreateProcess. If create_process failed retry appending an ".exe"
14357 suffix. Store the GetLastError result immediatelly after
14358 create_process calls and use it on the call to error.
14359
14360 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14361
14362 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14363
14364 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14365
14366 * configure.ac: Switch license to GPLv3.
14367
14368 2007-08-01 Michael Snyder <msnyder@access-company.com>
14369
14370 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14371
14372 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14373
14374 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14375 typedef.
14376 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14377 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14378 CloseToolhelp32Snapshot.
14379 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14380 CloseToolhelp32Snapshot.
14381
14382 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14383
14384 * server.c (main): Check for inferior exit before main loop.
14385
14386 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14387
14388 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14389 instead of on tmp_desc.
14390
14391 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14392 Daniel Jacobowitz <dan@codesourcery.com>
14393
14394 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14395 (add_thread): Minor cleanups.
14396 (clear_inferiors): Move lower in the file. Clear the DLL
14397 list.
14398 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14399 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14400 (xml_escape_text): New.
14401 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14402 for qSupported.
14403 (handle_v_cont): Report errors.
14404 (gdbserver_version): Update.
14405 (main): Correct size of own_buf. Do not report initial DLL events.
14406 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14407 (unloaded_dll, xml_escape_text): New.
14408 * win32-low.c (enum target_waitkind): Update comments.
14409 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14410 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14411 (win32_EnumProcessModules, win32_GetModuleInformation)
14412 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14413 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14414 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14415 (win32_Module32First, win32_Module32Next, load_toolhelp)
14416 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14417 (get_child_debug_event): Handle DLL events.
14418 (win32_wait): Likewise.
14419
14420 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14421
14422 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14423 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14424
14425 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14426
14427 * win32-low.c (handle_output_debug_string): Ignore event if not
14428 waiting.
14429
14430 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14431
14432 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14433
14434 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14435
14436 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14437
14438 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14439
14440 * inferiors.c (change_inferior_id): Add comment.
14441 * linux-low.c (check_removed_breakpoint): Add an early
14442 prototype. Improve debug output.
14443 (linux_attach): Doc update.
14444 (linux_detach_one_process, linux_detach): Clean up before releasing
14445 each process.
14446 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14447 * linux-low.h (struct process_info): Doc improvement.
14448 * mem-break.c (delete_all_breakpoints): New.
14449 * mem-break.h (delete_all_breakpoints): New prototype.
14450 * thread-db.c (find_first_thread): New.
14451 (thread_db_create_event): Call it instead of
14452 thread_db_find_new_threads. Clean up unused variables.
14453 (maybe_attach_thread): Remove first thread handling.
14454 (thread_db_find_new_threads): Use find_first_thread.
14455 (thread_db_get_tls_address): Likewise.
14456
14457 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14458
14459 * thread-db.c (thread_db_find_new_threads): Add prototype.
14460 (thread_db_create_event): Check for the main thread before adding
14461 a new thread.
14462 (maybe_attach_thread): Only enable event reporting if TID == 0.
14463 (thread_db_get_tls_address): Check for new threads.
14464
14465 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14466
14467 * linux-low.c (linux_create_inferior): Try execv before execvp.
14468 * spu-low.c (spu_create_inferior): Likewise.
14469
14470 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14471
14472 * linux-low.c (linux_create_inferior): Change execv to execvp.
14473 * spu-low.c (spu_create_inferior): Likewies.
14474
14475 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14476
14477 * Makefile.in (clean): Clean new files instead of deleted ones.
14478 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14479 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14480 rules.
14481 * configure.srv: Specify XML files and new regformats for MIPS and
14482 MIPS64 GNU/Linux.
14483 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14484 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14485 an entry for the restart register.
14486 (mips_cannot_fetch_register, mips_cannot_store_register)
14487 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14488 register names to match the XML descriptions.
14489 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14490 restart register instead of $0.
14491
14492 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14493 Markus Deuling <deuling@de.ibm.com>
14494
14495 * remote-utils.c (decode_xfer_write): New function.
14496 * server.h (decode_xfer_write): Add prototype.
14497 * server.c (handle_query): Add PACKET_LEN argument. Support
14498 qXfer:spu:read and qXfer:spu:write packets.
14499 (main): Pass packet_len to handle_query.
14500 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14501 * target.h (target_ops): Add qxfer_spu.
14502
14503 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14504
14505 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14506 accessing non-seekable spufs files.
14507
14508 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14509
14510 * server.c (handle_query): Add reply for qC packet.
14511
14512 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14513 Leo Zayas <lerele@champenstudios@com>
14514
14515 * server.h (check_remote_input_interrupt_request): New function.
14516 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14517 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14518 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14519 (check_remote_input_interrupt_request): New function.
14520 * server.h (check_remote_input_interrupt_request): Declare.
14521 * win32-low.c (winapi_DebugBreakProcess,
14522 winapi_GenerateConsoleCtrlEvent): New typedefs.
14523 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14524 to 250 ms.
14525 (win32_wait): Check for remote interrupt request
14526 with check_remote_input_interrupt_request.
14527 (win32_request_interrupt): New function.
14528 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14529
14530 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14531
14532 * win32-low.c (debug_registers_changed,
14533 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14534 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14535 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14536 (thread_rec): Get context using the low target.
14537 (child_add_thread): Call thread_added on the low target,
14538 which does the same thing.
14539 (regptr): Delete.
14540 (do_initial_child_stuff): Remove debug registers references.
14541 Set context using the low target. Resume threads after
14542 setting the contexts.
14543 (child_continue): Remove dead variable. Remove debug
14544 registers references.
14545 (child_fetch_inferior_registers): Go through the low target.
14546 (do_child_store_inferior_registers): Remove.
14547 (child_store_inferior_registers): Go through the low target.
14548 (win32_resume): Remove debug registers references.
14549 Set context using the low target.
14550 (handle_exception): Change return type to void. Don't record
14551 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14552 first chance exception.
14553 (get_child_debug_event): Change return type to void. Remove
14554 goto loop. Always return after waiting for debug event.
14555 (win32_wait): Convert to switch statement. Handle spurious
14556 events.
14557
14558 * win32-i386-low.c (debug_registers_changed,
14559 debug_registers_used): New.
14560 (initial_stuff): Rename to ...
14561 (i386_initial_stuff): ... this. Clear debug registers
14562 state variables.
14563 (store_debug_registers): Delete.
14564 (i386_get_thread_context): New.
14565 (load_debug_registers): Delete.
14566 (i386_set_thread_context): New.
14567 (i386_thread_added): New.
14568 (single_step): Rename to ...
14569 (i386_single_step): ... this.
14570 (do_fetch_inferior_registers): Rename to ...
14571 (i386_fetch_inferior_register): ... this.
14572 (i386_store_inferior_register): New.
14573 (the_low_target): Adapt to new interface.
14574
14575 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14576 (arm_get_thread_context): New.
14577 (arm_set_thread_context): New.
14578 (regptr): New.
14579 (do_fetch_inferior_registers): Rename to ...
14580 (arm_fetch_inferior_register): ... this.
14581 (arm_store_inferior_register): New.
14582 (arm_wince_breakpoint): Reimplement as unsigned long.
14583 (arm_wince_breakpoint_len): Define.
14584 (the_low_target): Adapt to new interface.
14585
14586 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14587 load_debug_registers. Add get_thread_context, set_thread_context,
14588 thread_added and store_inferior_register. Rename
14589 fetch_inferior_registers to fetch_inferior_register.
14590 (regptr): Remove declaration.
14591
14592 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14593
14594 * linux-low.c (linux_detach): Change return type to int. Return 0.
14595 * spu-low.c (spu_detach): Likewise.
14596
14597 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14598
14599 * target.h (target_ops): Change return type of detach to int.
14600 Add join.
14601 (join_inferior): New.
14602 * server.c (main): Don't skip detach support on mingw32.
14603 If the inferior doesn't support detaching return error.
14604 Call join_inferior instead of using waitpid.
14605 * linux-low.c (linux_join): New.
14606 (linux_target_op): Add linux_join.
14607 * spu-low.c (spu_join): New.
14608 (spu_target_ops): Add spu_join.
14609 * win32-low.c (win32_detach): Adapt to new interface.
14610 Reopen current_process_handle before detaching. Issue a child
14611 resume before detaching.
14612 (win32_join): New.
14613 (win32_target_op): Add win32_join.
14614
14615 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14616
14617 * win32-low.c (win32-attach): Fix return value.
14618 * target.h (target_ops): Describe ATTACH return values.
14619
14620 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14621
14622 * win32-low.c (GETPROCADDRESS): Define.
14623 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14624 (winapi_DebugSetProcessKillOnExit): Likewise.
14625 (win32_create_inferior): Force usage of ansi CreateProcessA.
14626 (win32_attach): Use GETPROCADDRESS.
14627 (win32_detach): Likewise.
14628
14629 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14630
14631 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14632
14633 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14634
14635 * win32-low.c: Commit leftover changes from 2007-03-29.
14636
14637 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14638
14639 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14640 fields short instead of int. Add explicit padding.
14641 (i387_cache_to_fsave): Remove unnecessary casts.
14642 (i387_fsave_to_cache): Doc fix.
14643 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14644
14645 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14646
14647 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14648 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14649
14650 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14651
14652 * configure.srv (arm*-*-mingw32ce*): Move near the other
14653 arm targets.
14654
14655 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14656
14657 * configure.ac: Add errno checking.
14658 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14659 sys/file.h and malloc.h.
14660 (AC_CHECK_DECLS): Add perror.
14661 (srv_mingwce): Handle.
14662 * configure.srv (i[34567]86-*-cygwin*): Add
14663 win32-i386-low.o to srv_tgtobj.
14664 (i[34567]86-*-mingw*): Likewise.
14665 (arm*-*-mingw32ce*): Add case.
14666 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14667 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14668 [__MINGW32CE__] (strerror): New function.
14669 [__MINGW32CE__] (errno): Define to GetLastError.
14670 [__MINGW32CE__] (COUNTOF): New macro.
14671 (remote_open): Remove extra close call.
14672 * mem-break.c (delete_breakpoint_at): New function.
14673 * mem-break.h (delete_breakpoint_at): Declare.
14674 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14675 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14676 [USE_WIN32API] (read, write): Add char* casts.
14677 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14678 * server.h: Include wincecompat.h on Windows CE.
14679 [HAVE_ERRNO_H]: Check.
14680 (perror): Declare if not declared.
14681 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14682 (perror_with_name): Remove errno declaration.
14683 * wincecompat.h: New.
14684 * wincecompat.c: New.
14685 * win32-low.h: New.
14686 * win32-arm-low.c: New.
14687 * win32-i386-low.c: New.
14688 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14689 (OUTMSG2): Make it safe.
14690 (_T): New macro.
14691 (COUNTOF): New macro.
14692 (NUM_REGS): Get it from the low target.
14693 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14694 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14695 (thread_rec): Let low target handle debug registers.
14696 (child_add_thread): Likewise.
14697 (child_init_thread_list): Likewise.
14698 (continue_one_thread): Likewise.
14699 (regptr): New.
14700 (do_child_fetch_inferior_registers): Move to ...
14701 * win32-i386-low.c: ... here, and rename to ...
14702 (do_fetch_inferior_registers): ... this.
14703 * win32-low.c (child_fetch_inferior_registers):
14704 Go through the low target.
14705 (do_child_store_inferior_registers): Use regptr.
14706 (strwinerror): New function.
14707 (win32_create_inferior): Handle Windows CE.
14708 Use strwinerror instead of strerror on Windows error
14709 codes. Add program to the error output.
14710 Don't close the main thread handle on Windows CE.
14711 (win32_attach): Use coredll.dll on Windows CE.
14712 (win32_kill): Close current process and current
14713 thread handles.
14714 (win32_detach): Use coredll.dll on Windows CE.
14715 (win32_resume): Let low target handle debug registers, and
14716 step request.
14717 (handle_exception): Add/Remove initial breakpoint. Avoid
14718 non-existant WSTOPSIG on Windows CE.
14719 (win32_read_inferior_memory): Cast to remove warning.
14720 (win32_arch_string): Go through the low target.
14721 (initialize_low): Call set_breakpoint_data with the low
14722 target's breakpoint.
14723 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14724 FOP_REGNUM, mappings): Move to ...
14725 * win32-i386-low.c: ... here.
14726 * win32-low.c (win32_thread_info): Move to ...
14727 * win32-low.h: ... here.
14728 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14729 win32-arm-low.c and wincecompat.c.
14730 (all:): Add $EXEEXT.
14731 (install-only:): Likewise.
14732 (gdbserver:): Likewise.
14733 (gdbreplay:): Likewise.
14734 * config.in: Regenerate.
14735 * configure: Regenerate.
14736
14737 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14738
14739 * win32-low.c: Rename typedef thread_info to
14740 win32_thread_info throughout.
14741
14742 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14743
14744 * win32-i386-low.c: Rename to ...
14745 * win32-low.c: ... this.
14746 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14747 * Makefile.in: Likewise.
14748
14749 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14750
14751 * remote-utils.c (monitor_output): Constify msg parameter.
14752 * server.h (monitor_output): Likewise.
14753 * win32-i386-low.c (handle_output_debug_string): New.
14754 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14755 handle_output_debug_string.
14756 (get_child_debug_event): Likewise.
14757
14758 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14759
14760 * server.c (main): Correct strtoul check.
14761
14762 2007-03-27 Jon Ringle <jon@ringle.org>
14763
14764 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14765
14766 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14767
14768 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14769
14770 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14771
14772 * terminal.h: Check HAVE_SGTTY_H.
14773
14774 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14775
14776 * remote-utils.c (remote_open): Print out the assigned port number.
14777
14778 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14779
14780 * remote-utils.c (monitor_output): New function.
14781 * server.c (debug_threads): Define here.
14782 (monitor_show_help): New function.
14783 (handle_query): Handle qRcmd.
14784 (main): Do not handle 'd' packet.
14785 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14786 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14787 of debug_threads.
14788
14789 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14790
14791 * Makefile.in (EXEEXT): New.
14792 (clean): Use $(EXEEXT).
14793
14794 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14795
14796 * target.h (target_ops): Rename send_signal to request_interrupt,
14797 and remove enum target_signal parameter.
14798 * linux-low.c (linux_request_interrupt): Rename from
14799 linux_send_signal, and always send SIGINT.
14800 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14801 and always send SIGINT.
14802 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14803 of send_signal.
14804 (input_interrupt): Likewise.
14805
14806 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14807
14808 * server.c (get_features_xml): Check if target implemented
14809 arch_string.
14810 * win32-i386-low.c (win32_arch_string): New.
14811 (win32_target_ops): Add win32_arch_string as arch_string member.
14812
14813 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14814
14815 * spu-low.c (spu_arch_string): New.
14816 (spu_target_ops): Add spu_arch_string.
14817
14818 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14819
14820 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14821 * configure.ac: Do not check for terminal.h.
14822 * configure, config.in: Regenerated.
14823
14824 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14825
14826 * Makefile.in (OBS): Add $(XML_BUILTIN).
14827 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14828 (clean): Update.
14829 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14830 (arm-with-iwmmxt.c): New.
14831 * config.in, configure: Regenerate.
14832 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14833 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14834 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14835 (arm*-*-linux*): Add iWMMXt and regset support.
14836 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14837 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14838 (arm_store_wmmxregset, target_regsets): New.
14839 * server.c (get_features_xml): Take annex argument. Check builtin
14840 XML documents.
14841 (handle_query): Handle multiple annexes.
14842
14843 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14844
14845 * remote-utils.c [USE_WIN32API] (read, write): Define.
14846 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14847 write.
14848
14849 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14850
14851 * linux-i386-low.c (the_low_target): Set arch_string.
14852 * linux-x86-64-low.c (the_low_target): Likewise.
14853 * linux-low.c (linux_arch_string): New.
14854 (linux_target_ops): Add it.
14855 * linux-low.h (struct linux_target_ops): Add arch_string.
14856 * server.c (write_qxfer_response): Use const void * for DATA.
14857 (get_features_xml): New.
14858 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14859 * target.h (struct target_ops): Add arch_string method.
14860
14861 2007-01-03 Denis Pilat <denis.pilat@st.com>
14862 Daniel Jacobowitz <dan@codesourcery.com>
14863
14864 * linux-low.c (linux_kill): Handle being called with no threads.
14865 * win32-i386-low.c (win32_kill): Likewise.
14866 (get_child_debug_event): Clear current_process_handle.
14867
14868 2006-12-30 Denis PILAT <denis.pilat@st.com>
14869 Daniel Jacobowitz <dan@codesourcery.com>
14870
14871 * remote-utils.c (remote_open): Check the type of specified
14872 serial port devices before opening them.
14873 * server.c (main): Kill the inferior if an error occurs during
14874 the first remote_open.
14875
14876 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14877
14878 * README: Update supported targets.
14879
14880 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14881
14882 * Makefile.in (clean): Remove reg-mips64.c.
14883 (reg-mips64.c, reg-mips64.o): New rules.
14884 * configure.srv: Handle mips64. Include regset support for mips.
14885 * linux-mips-low.c (union mips_register): New.
14886 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14887 (mips_breakpoint, mips_breakpoint_at): Use int.
14888 (mips_collect_register, mips_supply_register)
14889 (mips_collect_register_32bit, mips_supply_register_32bit)
14890 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14891 (mips_store_fpregset, target_regsets): New.
14892 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14893
14894 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14895
14896 * configure.srv: Add target "spu*-*-*".
14897 * Makefile.in (clean): Remove reg-spu.c.
14898 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14899 * spu-low.c: New file.
14900
14901 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14902
14903 * configure.ac: Correct td_thr_tls_get_addr test.
14904 * configure: Regenerated.
14905
14906 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14907
14908 * linux-low.c (linux_wait_for_event): Reformat. Use the
14909 pass_signals array.
14910 * remote-utils.c (decode_address_to_semicolon): New.
14911 * server.c (pass_signals, handle_general_set): New.
14912 (handle_query): Mention QPassSignals for qSupported.
14913 (main): Call handle_general_set.
14914 * server.h (pass_signals, decode_address_to_semicolon): New.
14915
14916 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14917
14918 * server.c (handle_query): Correct error handling for read_auxv.
14919
14920 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14921
14922 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14923 and srv_linux_thread_db to yes.
14924 * linux-s390-low.c (s390_fill_gregset): New function.
14925 (target_regsets): Define data structure.
14926
14927 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14928
14929 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14930 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14931 * config.in, configure: Regenerated.
14932 * inferiors.c (gdb_id_to_thread): New function.
14933 (gdb_id_to_thread_id): Use it.
14934 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14935 * linux-low.h (struct process_info): Add th member.
14936 (thread_db_get_tls_address): New prototype.
14937 * remote-utils.c (decode_address): Make non-static.
14938 * server.c (handle_query): Handle qGetTLSAddr.
14939 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14940 * target.h (struct target_ops): Add get_tls_address.
14941 * thread-db.c (maybe_attach_thread): Save the thread handle.
14942 (thread_db_get_tls_address): New.
14943
14944 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14945
14946 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14947 (linux_resume_one_process): Take a siginfo_t *. Update all
14948 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14949 (struct pending_signals): Add a siginfo_t.
14950 (linux_wait_for_process): Always set last_status.
14951 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14952 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14953 * linux-low.h (struct process_info): Add last_status.
14954
14955 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14956
14957 * remote-utils.c (try_rle): New function.
14958 (putpkt_binary): Use it.
14959
14960 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14961
14962 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14963 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14964 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14965 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14966 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14967 point registers.
14968
14969 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14970
14971 * server.c (terminal_fd): New variable.
14972 (old_foreground_pgrp): Likewise.
14973 (restore_old_foreground_pgrp): New function.
14974 (start_inferior): Record the terminal file descriptor in terminal_fd
14975 and its original foreground group in old_foreground_pgrp. Register
14976 restore_old_foreground_pgrp with atexit().
14977
14978 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14979
14980 * server.c (handle_query): Correct qPart to qXfer.
14981
14982 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14983
14984 * configure.ac: Check for more headers which are missing on
14985 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14986 * configure.srv: Add Cygwin and mingw32.
14987 * remote-utils.c: Don't include headers unconditionally which
14988 are missing on mingw32. Include <winsock.h> for mingw32.
14989 (remote_open): Adjust for mingw32 support. Flush
14990 standard error after writing to it.
14991 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14992 (unblock_async_io, enable_async_io, disable_async_io)
14993 (readchar, getpkt): Update for Winsock support.
14994 (prepare_resume_reply): Expect a protocol signal number.
14995 * server.c: Disable <sys/wait.h> on mingw32.
14996 (start_inferior): Adjust for mingw32 support. Flush
14997 standard error after writing to it.
14998 (attach_inferior): Likewise. Use protocol signal
14999 numbers.
15000 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15001 and names.
15002 * win32-i386-low.c: New file.
15003 * Makefile.in (XM_CLIBS): Set.
15004 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15005 (win32-i386-low.o): New dependency rule.
15006 * linux-low.c (linux_wait): Use target signal numbers.
15007 * target.h (struct target_ops): Doc fix.
15008 * server.h (target_signal_to_name): New prototype.
15009 * gdbreplay.c: Don't include headers unconditionally which
15010 are missing on mingw32. Include <winsock.h> for mingw32.
15011 (remote_close, remote_open): Adjust for Winsock support.
15012 * configure, config.in: Regenerated.
15013
15014 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15015
15016 * server.c (decode_xfer_read, write_qxfer_response): New.
15017 (handle_query): Take a packet length argument. Handle
15018 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15019 the qSupported response.
15020 (main): Update call to handle_query.
15021
15022 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15023
15024 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15025 (putpkt_binary): Renamed from putpkt and adjusted for binary
15026 data.
15027 (putpkt): New wrapper for putpkt_binary.
15028 (readchar): Don't mask off the high bit.
15029 (decode_X_packet): New function.
15030 * server.c (main): Call putpkt_binary if a handler sets the packet
15031 length. Save the length of the incoming packet. Handle 'X'.
15032 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15033
15034 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15035
15036 * server.c (handle_query): Handle qSupported.
15037
15038 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15039
15040 * remote-utils.c (all_symbols_looked_up): New variable.
15041 (look_up_one_symbol): Check it.
15042 * server.h (look_up_one_symbol): New declaration.
15043 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15044
15045 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15046
15047 * Makefile.in (linux-arm-low.o): Update dependencies.
15048 * linux-arm-low.c: Include "gdb_proc_service.h".
15049 (PTRACE_GET_THREAD_AREA): Define.
15050 (ps_get_thread_area): New function.
15051
15052 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15053
15054 * configure.srv (m68k*-*-uclinux*): New target.
15055 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15056 (linux_resume_one_process): Remove extraneous cast.
15057 (linux_read_offsets): New.
15058 (linux_target_op): Add linux_read_offsets on mmuless systems.
15059 * server.c (handle_query): Add qOffsets logic.
15060 * target.h (struct target_ops): Add read_offsets.
15061
15062 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15063
15064 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15065 (PTRACE_GET_THREAD_AREA): Define.
15066 (ps_get_thread_area): New function.
15067 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15068 (linux-x86-64-low.o): Update.
15069
15070 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15071
15072 * configure.ac: Remove checks for prfpregset_t.
15073 * gdb_proc_service.h: New file.
15074 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15075 new "gdb_proc_service.h".
15076 * proc-service.c: Likewise.
15077 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15078 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15079 * Makefile.in (gdb_proc_service_h): Updated.
15080 * configure, config.in: Regenerated.
15081
15082 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15083
15084 * remote-utils.c (prepare_resume_reply): Move declaration
15085 of gdb_id_from_wait to the top of the block.
15086
15087 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15088
15089 * linux-low.c (regsets_store_inferior_registers): Read the regset
15090 from the target before filling it.
15091
15092 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15093
15094 * server.c (attach_inferior): Return SIGTRAP for a successful
15095 attach.
15096
15097 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15098
15099 * Makefile.in (OBS): Add version.o.
15100 (STAGESTUFF): Delete.
15101 (version.o): Add dependencies.
15102 (version.c): Replace rule.
15103 (clean): Remove version.c.
15104 * server.c (gdbserver_version): New.
15105 (gdbserver_usage): Use printf.
15106 (main): Handle --version and --help.
15107 * server.h (version, host_name): Add declarations.
15108
15109 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15110
15111 * linux-arm-low.c:
15112 * linux-arm-low.c:
15113 * inferiors.c:
15114 * i387-fp.h:
15115 * i387-fp.c:
15116 * gdbreplay.c:
15117 * regcache.c:
15118 * proc-service.c:
15119 * mem-break.h:
15120 * mem-break.c:
15121 * linux-x86-64-low.c:
15122 * linux-sh-low.c:
15123 * linux-s390-low.c:
15124 * linux-ppc64-low.c:
15125 * linux-ppc-low.c:
15126 * linux-mips-low.c:
15127 * linux-m68k-low.c:
15128 * linux-m32r-low.c:
15129 * linux-low.h:
15130 * linux-low.c:
15131 * linux-ia64-low.c:
15132 * linux-i386-low.c:
15133 * linux-crisv32-low.c:
15134 * thread-db.c:
15135 * terminal.h:
15136 * target.h:
15137 * target.c:
15138 * server.h:
15139 * server.c:
15140 * remote-utils.c:
15141 * regcache.h:
15142 * utils.c:
15143 * Makefile.in:
15144 * configure.ac:
15145 * gdbserver.1: Add (C) after Copyright. Update the FSF
15146 address.
15147
15148 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15149
15150 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15151 (arm_breakpoint_at): Recognize both breakpoints.
15152 (the_low_target): Use the correct breakpoint instruction.
15153
15154 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15155
15156 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15157 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15158 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15159 (the_low_target): Update.
15160
15161 2005-10-25 Andreas Schwab <schwab@suse.de>
15162
15163 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15164
15165 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15166 (ia64_num_regs): Reduce to 462.
15167
15168 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15169
15170 * acinclude.m4: Correct quoting.
15171 * aclocal.m4: Regenerated.
15172
15173 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15174 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15175 (thread_db_init): Call thread_db_err_str.
15176 * configure.ac: Check for TD_VERSION.
15177 * config.in, configure: Regenerated.
15178
15179 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15180
15181 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15182
15183 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15184
15185 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15186 is not available. Define HAVE_PTRACE_GETREGS if it is.
15187 * config.in, configure: Regenerated.
15188 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15189 * linux-i386-low.c, linux-m68k-low.c: Update to use
15190 HAVE_PTRACE_GETREGS.
15191 * linux-low.c (regsets_fetch_inferior_registers)
15192 (regsets_store_inferior_registers): Only return 0 if we processed
15193 GENERAL_REGS.
15194 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15195 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15196
15197 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15198
15199 * inferiors.c (struct thread_info): Add gdb_id.
15200 (add_thread): Add gdb_id argument.
15201 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15202 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15203 calls to add_thread.
15204 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15205 * server.c (handle_query): Use thread_to_gdb_id.
15206 (handle_v_cont, main): Use gdb_id_to_thread_id.
15207 * server.h (add_thread): Update prototype.
15208 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15209 prototypes.
15210
15211 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15212
15213 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15214 left-padded registers.
15215 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15216 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15217
15218 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15219
15220 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15221 * configure: Regenerate.
15222 * config.in: Regenerate.
15223 * server.h (NEED_DECLARATION_STRERROR):
15224 Replace with !HAVE_DECL_STRERROR.
15225
15226 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15227
15228 * linux-low.c (linux_wait, linux_send_signal): Don't test
15229 an unsigned long variable for > 0 if it could be MAX_ULONG.
15230 * server.c (myresume): Likewise.
15231 * target.c (set_desired_inferior): Likewise.
15232
15233 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15234
15235 * configure.ac: Simplify and improve check for socklen_t.
15236 * configure, config.in: Regenerate.
15237
15238 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15239
15240 * acconfig.h: Remove.
15241 * configure.ac: Add a test for socklen_t. Use three-argument
15242 AC_DEFINE throughout.
15243 * config.in: Regenerated using autoheader 2.59.
15244 * configure: Regenerated.
15245
15246 * gdbreplay.c (socklen_t): Provide a default.
15247 (remote_open): Use socklen_t.
15248 * remote-utils.c (socklen_t): Provide a default.
15249 (remote_open): Use socklen_t.
15250 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15251 unsigned char.
15252
15253 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15254 char for buffers.
15255 * linux-low.c (linux_read_memory, linux_write_memory)
15256 (linux_read_auxv): Likewise.
15257 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15258 (check_mem_write): Likewise.
15259 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15260 Likewise.
15261 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15262 (registers_from_string, register_data): Likewise.
15263 * server.c (handle_query, main): Likewise.
15264 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15265 (decode_M_packet): Likewise.
15266 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15267 * target.h (struct target_ops): Update read_memory, write_memory,
15268 and read_auxv.
15269 (read_inferior_memory, write_inferior_memory): Update.
15270 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15271 to unsigned char *.
15272 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15273 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15274 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15275 linux-s390-low.c, linux-sh-low.c: Update for changes in
15276 read_inferior_memory and the_low_target->breakpoint.
15277
15278 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15279
15280 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15281 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15282 * configure.srv: Add powerpc64-*-linux*.
15283 * linux-ppc64-low.c: New file.
15284
15285 2005-05-23 Orjan Friberg <orjanf@axis.com>
15286
15287 * linux-cris-low.c: New file with support for CRIS.
15288 * linux-crisv32-low.c: Ditto for CRISv32.
15289 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15290 (clean): Add reg-cris.c and reg-crisv32.c.
15291 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15292 reg-crisv32.o, and reg-crisv32.c to make rules.
15293 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15294 recognized targets.
15295
15296 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15297
15298 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15299 of sizeof (PTRACE_XFER_TYPE).
15300 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15301
15302 2005-05-12 Orjan Friberg <orjanf@axis.com>
15303
15304 * target.h (struct target_ops): Add insert_watchpoint,
15305 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15306 pointers for hardware watchpoint support.
15307 * linux-low.h (struct linux_target_ops): Ditto.
15308 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15309 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15310 to linux_target_ops.
15311 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15312 reply packet.
15313 * server.c (main): Recognize 'Z' and 'z' packets.
15314
15315 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15316
15317 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15318 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15319 (the_low_target): Add new members.
15320
15321 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15322
15323 * proc-service.c (ps_lgetregs): Search all_processes instead of
15324 all_threads.
15325
15326 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15327
15328 * server.c (start_inferior): Change return type to int.
15329 (attach_inferior): Change sigptr to int *.
15330 (handle_v_cont, handle_v_requests): Change signal to int *.
15331 (main): Change signal to int.
15332
15333 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15334
15335 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15336 * configure.srv: Add m32r*-*-linux*.
15337 * linux-m32r-low.c: New file.
15338
15339 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15340
15341 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15342
15343 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15344
15345 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15346 Take unsigned long arguments for PIDs.
15347 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15348 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15349 (wait_for_sigstop, linux_resume_one_process)
15350 (regsets_fetch_inferior_registers, linux_send_signal)
15351 (linux_read_auxv): Likewise. Update the types of variables holding
15352 PIDs. Update format string specifiers.
15353 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15354 * remote-utils.c (prepare_resume_reply): Likewise.
15355 * server.c (cont_thread, general_thread, step_thread)
15356 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15357 unsigned long.
15358 (handle_query): Update format specifiers.
15359 (handle_v_cont, main): Use strtoul for thread IDs.
15360 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15361 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15362 (general_thread, step_thread, thread_from_wait)
15363 (old_thread_from_wait): Update.
15364 * target.h (struct thread_resume): Use unsigned long for THREAD.
15365 (struct target_ops): Use unsigned long for arguments to attach and
15366 thread_alive.
15367
15368 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15369
15370 * acinclude.m4: Include bfd/bfd.m4 directly.
15371 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15372 <agriffis@toolchain.org>.
15373 * aclocal.m4, configure: Regenerated.
15374
15375 2005-01-07 Andrew Cagney <cagney@gnu.org>
15376
15377 * configure.ac: Rename configure.in, require autoconf 2.59.
15378 * configure: Re-generate.
15379
15380 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15381
15382 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15383 LIBS when finished.
15384 * aclocal.m4: Regenerated.
15385 * configure: Regenerated.
15386
15387 2004-11-21 Andreas Schwab <schwab@suse.de>
15388
15389 * linux-m68k-low.c (m68k_num_gregs): Define.
15390 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15391 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15392 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15393 (m68k_breakpoint_at): New. Add to the_low_target.
15394
15395 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15396 srv_linux_thread_db to yes.
15397
15398 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15399
15400 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15401 (ARCH_SET_FS): Likewise.
15402 (ARCH_GET_FS): Likewise.
15403 (ARCH_GET_GS): Likewise.
15404
15405 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15406
15407 * linux-i386-low.c (ps_get_thread_area): New.
15408 * linux-x86-64-low.c (ps_get_thread_area): New.
15409 * linux-low.c: Include <sys/syscall.h>.
15410 (linux_kill_one_process): Don't kill the first thread here.
15411 (linux_kill): Kill the first thread here.
15412 (kill_lwp): New function.
15413 (send_sigstop, linux_send_signal): Use it.
15414 * proc-service.c: Clean up #ifdefs.
15415 (fpregset_info): Delete.
15416 (ps_lgetregs): Update and enable implementation.
15417 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15418 implementations.
15419 * remote-utils.c (struct sym_cache, symbol_cache): New.
15420 (input_interrupt): Print a clearer message.
15421 (async_io_enabled): New variable.
15422 (enable_async_io, disable_async_io): Use it. Update comments.
15423 (look_up_one_symbol): Use the symbol cache.
15424 * thread-db.c (thread_db_look_up_symbols): New function.
15425 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15426
15427 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15428
15429 * configure.in: Test for -rdynamic.
15430 * configure: Regenerated.
15431 * Makefile (INTERNAL_LDFLAGS): New.
15432 (gdbserver, gdbreplay): Use it.
15433
15434 2004-09-02 Andrew Cagney <cagney@gnu.org>
15435
15436 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15437
15438 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15439
15440 * linux-low.c (linux_wait): Clear all_processes list also.
15441
15442 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15443
15444 * linux-low.c: Include <errno.h>. Remove extern declaration of
15445 errno.
15446
15447 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15448
15449 * gdbreplay.c, server.h, utils.c: Update copyright years.
15450
15451 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15452
15453 * server.c (main): Print child status or termination signal from
15454 variable 'signal', not 'sig'.
15455
15456 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15457
15458 * linux-low.c (linux_read_memory): Change return type to
15459 int. Check for and return error from ptrace().
15460 * target.c (read_inferior_memory): Change return type to int. Pass
15461 back return status from the_target->read_memory().
15462 * target.h (struct target_ops): Adapt *read_memory() prototype.
15463 Update comment.
15464 (read_inferior_memory): Adapt prototype.
15465 * server.c (main): Return an error packet if
15466 read_inferior_memory() returns an error.
15467
15468 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15469
15470 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15471 Unify with other clean targets.
15472
15473 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15474
15475 * server.c (handle_v_cont): Call set_desired_inferior.
15476
15477 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15478
15479 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15480
15481 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15482
15483 * linux-low.c (linux_wait): Unblock async I/O.
15484 (linux_resume): Block and enable async I/O.
15485 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15486 * server.h (block_async_io, unblock_async_io): Add prototypes.
15487
15488 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15489
15490 * remote-utils.c (remote_open): Print a status notice after
15491 opening a TCP port.
15492 * server.c (attach_inferior): Print a status notice after
15493 attaching.
15494
15495 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15496
15497 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15498
15499 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15500
15501 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15502 error packet.
15503 * server.c, target.h: Update copyright years.
15504
15505 2004-02-25 Roland McGrath <roland@redhat.com>
15506
15507 * target.h (struct target_ops): New member `read_auxv'.
15508 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15509 * linux-low.c (linux_read_auxv): New function.
15510 (linux_target_ops): Initialize `read_auxv' member to that.
15511
15512 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15513
15514 Committed by Jim Blandy <jimb@redhat.com>.
15515
15516 * linux-s390-low.c (s390_num_regs): Update.
15517 (s390_regmap): Remove control registers. Use __s390x__ predefine
15518 instead of GPR_SIZE to distiguish s390 and s390x targets.
15519
15520 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15521
15522 * linux-low.c: Update copyright year.
15523 (check_removed_breakpoint): Clear pending_is_breakpoint.
15524 (linux_set_resume_request, linux_queue_one_thread)
15525 (resume_status_pending_p): New functions.
15526 (linux_continue_one_thread): Use process->resume.
15527 (linux_resume): Only resume threads if there are no pending events.
15528 * linux-low.h (struct process_info): Add resume request
15529 pointer.
15530
15531 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15532
15533 * regcache.c (new_register_cache): Clear the allocated register
15534 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15535
15536 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15537
15538 * linux-low.c (linux_resume): Take a struct thread_resume *
15539 argument.
15540 (linux_wait): Update call.
15541 (resume_ptr): New static variable.
15542 (linux_continue_one_thread): Renamed from
15543 linux_continue_one_process. Use resume_ptr.
15544 (linux_resume): Use linux_continue_one_thread.
15545 * server.c (handle_v_cont, handle_v_requests): New functions.
15546 (myresume): New function.
15547 (main): Handle 'v' case.
15548 * target.h (struct thread_resume): New type.
15549 (struct target_ops): Change argument of "resume" to struct
15550 thread_resume *.
15551 (myresume): Delete macro.
15552
15553 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15554
15555 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15556 (uninstall): Support DESTDIR.
15557
15558 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15559
15560 * configure.srv: Add xscale*linux copy of arm*linux entry.
15561
15562 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15563
15564 * linux-arm-low.c (arm_reinsert_addr): New function.
15565 (the_low_target): Add arm_reinsert_addr.
15566
15567 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15568
15569 * mem-break.c: Remove whitespace at end of file.
15570
15571 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15572
15573 * configure.in: Check whether we need to prototype strerror.
15574 * server.h: Optionally prototype strerror.
15575 * gdbreplay.c (perror_with_name): Use strerror.
15576 * linux-low.c (linux_attach_lwp): Use strerror.
15577 * utils.c (perror_with_name): Use strerror.
15578 * config.in, configure: Regenerated.
15579
15580 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15581
15582 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15583 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15584
15585 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15586
15587 * Makefile.in (SFILES): Update.
15588 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15589 low-sun3.c: Remove files.
15590
15591 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15592
15593 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15594 (linux_detach_one_process, linux_detach): New functions.
15595 (linux_target_ops): Add linux_detach.
15596 * server.c (main): Handle 'D' packet.
15597 * target.h (struct target_ops): Add "detach" member.
15598 (detach_inferior): Define.
15599
15600 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15601
15602 From Kelley Cook <kelleycook@wideopenwest.com>:
15603 * configure.srv: Accept i[34567]86 variants.
15604
15605 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15606
15607 * linux-low.c (linux_wait_for_event): Correct comment typos.
15608 (linux_resume_one_process): Call check_removed_breakpoint.
15609 (linux_send_signal): New function.
15610 (linux_target_ops): Add linux_send_signal.
15611 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15612 of kill.
15613 * target.h (struct target_ops): Add send_signal.
15614
15615 2003-05-29 Jim Blandy <jimb@redhat.com>
15616
15617 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15618 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15619 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15620 away part of the register's value.
15621
15622 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15623
15624 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15625 (linux_wait_for_event, linux_init_signals): Likewise.
15626
15627 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15628
15629 * configure.in: Check for stdlib.h.
15630 * configure: Regenerated.
15631 * config.in: Regenerated.
15632
15633 2003-01-04 Andreas Schwab <schwab@suse.de>
15634
15635 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15636
15637 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15638
15639 * Makefile.in: Remove obsolete code.
15640
15641 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15642
15643 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15644 defined(PT_FPR0_HI).
15645
15646 2002-11-17 Stuart Hughes <seh@zee2.com>
15647
15648 * linux-arm-low.c (arm_num_regs): Increase.
15649 (arm_regmap): Include status register.
15650
15651 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15652
15653 * linux-low.c (register_addr): Remove incorrect -1 check.
15654
15655 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15656
15657 * linux-low.c (linux_create_inferior): Call setpgid. Return
15658 the new PID.
15659 (unstopped_p, linux_signal_pid): Remove.
15660 (linux_target_ops): Remove linux_signal_pid.
15661 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15662 global instead of target method.
15663 * target.h (struct target_ops): Remove signal_pid. Update comment
15664 for create_inferior.
15665 * server.c (signal_pid): New variable.
15666 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15667 gdbserver. Set the child to be the foreground process group.
15668 (attach_inferior): Set signal_pid.
15669
15670 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15671
15672 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15673
15674 2002-08-20 Jim Blandy <jimb@redhat.com>
15675
15676 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15677 default for this.
15678
15679 2002-08-01 Andrew Cagney <cagney@redhat.com>
15680
15681 * Makefile.in: Make chill references obsolete.
15682
15683 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15684
15685 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15686 * configure: Regenerate.
15687 * config.in: Regenerate.
15688
15689 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15690
15691 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15692 (perror_with_name, remote_close, remote_open, expect, play): Static.
15693
15694 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15695
15696 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15697 byte offsets instead of an array of indexes.
15698 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15699
15700 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15701
15702 * regcache.c: Add comment.
15703
15704 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15705
15706 * thread-db.c: New file.
15707 * proc-service.c: New file.
15708 * acinclude.m4: New file.
15709 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15710 proc-service.o, and thread-db.o.
15711 (linux-low.o): Add USE_THREAD_DB.
15712 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15713 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15714 * aclocal.m4: Regenerated.
15715 * config.in: Regenerated.
15716 * configure: Regenerated.
15717 * configure.in: Check for proc_service.h, sys/procfs.h,
15718 thread_db.h, and linux/elf.h headrs.
15719 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15720 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15721 Check for -lthread_db and thread support.
15722 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15723 PowerPC, and SuperH.
15724 * i387-fp.c: Constify arguments.
15725 * i387-fp.h: Likewise.
15726 * inferiors.c: (struct thread_info): Renamed from
15727 `struct inferior_info'. Remove PID member. Use generic inferior
15728 list header. All uses updated.
15729 (inferiors, signal_pid): Removed.
15730 (all_threads): New variable.
15731 (get_thread): Define.
15732 (add_inferior_to_list): New function.
15733 (for_each_inferior): New function.
15734 (change_inferior_id): New function.
15735 (add_inferior): Removed.
15736 (remove_inferior): New function.
15737 (add_thread): New function.
15738 (free_one_thread): New function.
15739 (remove_thread): New function.
15740 (clear_inferiors): Use for_each_inferior and free_one_thread.
15741 (find_inferior): New function.
15742 (find_inferior_id): New function.
15743 (inferior_target_data): Update argument type.
15744 (set_inferior_target_data): Likewise.
15745 (inferior_regcache_data): Likewise.
15746 (set_inferior_regcache_data): Likewise.
15747 * linux-low.c (linux_bp_reinsert): Remove.
15748 (all_processes, stopping_threads, using_thrads)
15749 (struct pending_signals, debug_threads, pid_of): New.
15750 (inferior_pid): Replace with macro.
15751 (struct inferior_linux_data): Remove.
15752 (get_stop_pc, add_process): New functions.
15753 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15754 Use add_process and add_thread.
15755 (linux_attach_lwp): New function, based on old linux_attach. Use
15756 add_process and add_thread. Set stop_expected for new threads.
15757 (linux_attach): New function.
15758 (linux_kill_one_process): New function.
15759 (linux_kill): Kill all LWPs.
15760 (linux_thread_alive): Use find_inferior_id.
15761 (check_removed_breakpoints, status_pending_p): New functions.
15762 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15763 Update. Use WNOHANG. Wait for cloned processes also. Update process
15764 struct for the found process.
15765 (linux_wait_for_event): New function.
15766 (linux_wait): Use it. Support LWPs.
15767 (send_sigstop, wait_for_sigstop, stop_all_processes)
15768 (linux_resume_one_process, linux_continue_one_process): New functions.
15769 (linux_resume): Support LWPs.
15770 (REGISTER_RAW_SIZE): Remove.
15771 (fetch_register): Use register_size instead. Call supply_register.
15772 (usr_store_inferior_registers): Likewise. Call collect_register.
15773 Fix recursive case.
15774 (regsets_fetch_inferior_registers): Improve error message.
15775 (regsets_store_inferior_registers): Add debugging.
15776 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15777 (unstopped_p, linux_signal_pid): New functions.
15778 (linux_target_ops): Add linux_signal_pid.
15779 (linux_init_signals): New function.
15780 (initialize_low): Call it. Initialize using_threads.
15781 * regcache.c (inferior_regcache_data): Add valid
15782 flag.
15783 (get_regcache): Fetch registers lazily. Add fetch argument
15784 and update all callers.
15785 (regcache_invalidate_one, regcache_invalidate): New
15786 functions.
15787 (new_register_cache): Renamed from create_register_cache.
15788 Return the new regcache.
15789 (free_register_cache): Change argument to a void *.
15790 (registers_to_string, registers_from_string): Call get_regcache
15791 with fetch flag set.
15792 (register_data): Make static. Pass fetch flag to get_regcache.
15793 (supply_register): Call get_regcache with fetch flag clear.
15794 (collect_register): Call get_regcache with fetch flag set.
15795 (collect_register_as_string): New function.
15796 * regcache.h: Update.
15797 * remote-utils.c (putpkt): Flush after debug output and use
15798 stderr.
15799 Handle input interrupts while waiting for an ACK.
15800 (input_interrupt): Use signal_pid method.
15801 (getpkt): Flush after debug output and use stderr.
15802 (outreg): Use collect_register_as_string.
15803 (new_thread_notify, dead_thread_notify): New functions.
15804 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15805 and general_thread.
15806 (look_up_one_symbol): Flush after debug output.
15807 * server.c (step_thread, server_waiting): New variables.
15808 (start_inferior): Don't use signal_pid. Update call to mywait.
15809 (attach_inferior): Update call to mywait.
15810 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15811 (main): Don't fetch/store registers explicitly. Use
15812 set_desired_inferior. Support proposed ``Hs'' packet. Update
15813 calls to mywait.
15814 * server.h: Update.
15815 (struct inferior_list, struct_inferior_list_entry): New.
15816 * target.c (set_desired_inferior): New.
15817 (write_inferior_memory): Constify.
15818 (mywait): New function.
15819 * target.h: Update.
15820 (struct target_ops): New signal_pid method.
15821 (mywait): Removed macro, added prototype.
15822
15823 * linux-low.h (regset_func): Removed.
15824 (regset_fill_func, regset_store_func): New.
15825 (enum regset_type): New.
15826 (struct regset_info): Add type field. Use new operation types.
15827 (struct linux_target_ops): stop_pc renamed to get_pc.
15828 Add decr_pc_after_break and breakpoint_at.
15829 (get_process, get_thread_proess, get_process_thread)
15830 (strut process_info, all_processes, linux_attach_lwp)
15831 (thread_db_init): New.
15832
15833 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15834 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15835 (the_low_target): Add new members.
15836 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15837 (i386_store_fpxregset): Constify.
15838 (target_regsets): Add new kind identifier.
15839 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15840 (i386_set_pc): Add debugging.
15841 (i386_breakpoint_at): New function.
15842 (the_low_target): Add new members.
15843 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15844 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15845 (mips_breakpoint_at): New.
15846 (the_low_target): Add new members.
15847 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15848 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15849 (the_low_target): Add new members.
15850 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15851 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15852 (the_low_target): Add new members.
15853 * linux-x86-64-low.c (target_regsets): Add new kind
15854 identifier.
15855
15856 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15857
15858 From Martin Pool <mbp@samba.org>:
15859 * server.c (gdbserver_usage): New function.
15860 (main): Call it.
15861
15862 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15863
15864 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15865 stop_at -> stop_pc.
15866
15867 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15868
15869 * Makefile.in: Remove obsolete code.
15870
15871 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15872
15873 * linux-low.c (regsets_fetch_inferior_registers),
15874 (regsets_store_inferior_registers): Removed cast to int from
15875 ptrace() calls.
15876 * regcache.h: Added declaration of struct inferior_info.
15877
15878 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15879
15880 * inferiors.c (struct inferior_info): Add regcache_data.
15881 (add_inferior): Call create_register_cache.
15882 (clear_inferiors): Call free_register_cache.
15883 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15884 * regcache.c (struct inferior_regcache_data): New.
15885 (registers): Remove.
15886 (get_regcache): New function.
15887 (create_register_cache, free_register_cache): New functions.
15888 (set_register_cache): Don't initialize the register cache here.
15889 (registers_to_string, registers_from_string, register_data): Call
15890 get_regcache.
15891 * regcache.h: Add prototypes.
15892 * server.h: Likewise.
15893
15894 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15895
15896 * mem-break.c: New file.
15897 * mem-break.h: New file.
15898 * Makefile.in: Add mem-break.o rule; update server.h
15899 dependencies.
15900 * inferiors.c (struct inferior_info): Add target_data
15901 member.
15902 (clear_inferiors): Free target_data member if set.
15903 (inferior_target_data, set_inferior_target_data): New functions.
15904 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15905 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15906 * linux-low.c (linux_bp_reinsert): New variable.
15907 (struct inferior_linux_data): New.
15908 (linux_create_inferior): Use set_inferior_target_data.
15909 (linux_attach): Likewise. Call add_inferior.
15910 (linux_wait_for_one_inferior): New function.
15911 (linux_wait): Call it.
15912 (linux_write_memory): Add const.
15913 (initialize_low): Call set_breakpoint_data.
15914 * linux-low.h (struct linux_target_ops): Add breakpoint
15915 handling members.
15916 * server.c (attach_inferior): Remove extra add_inferior
15917 call.
15918 * server.h: Include mem-break.h. Update inferior.c
15919 prototypes.
15920 * target.c (read_inferior_memory)
15921 (write_inferior_memory): New functions.
15922 * target.h (read_inferior_memory)
15923 (write_inferior_memory): Change macros to prototypes.
15924 (struct target_ops): Update comments. Add const to write_memory
15925 definition.
15926
15927 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15928
15929 * linux-low.c (usr_store_inferior_registers): Support
15930 registers which are allowed to fail to store.
15931 * linux-low.h (linux_target_ops): Likewise.
15932 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15933 (ppc_cannot_store_register): FPSCR may not be storable.
15934
15935 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15936
15937 * server.h: Include <string.h> if HAVE_STRING_H.
15938 * ChangeLog: Correct paths in last ChangeLog entry.
15939
15940 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15941
15942 * linux-low.h: Remove obsolete prototypes.
15943 (struct linux_target_ops): New.
15944 (extern the_low_target): New.
15945 * linux-low.c (num_regs, regmap): Remove declarations.
15946 (register_addr): Use the_low_target explicitly.
15947 (fetch_register): Likewise.
15948 (usr_fetch_inferior_registers): Likewise.
15949 (usr_store_inferior_registers): Likewise.
15950 * linux-arm-low.c (num_regs): Remove.
15951 (arm_num_regs): Define.
15952 (arm_regmap): Renamed from regmap, made static.
15953 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15954 made static.
15955 (arm_cannot_store_register): Renamed from cannot_store_register,
15956 made static.
15957 (the_low_target): New.
15958 * linux-i386-low.c (num_regs): Remove.
15959 (i386_num_regs): Define.
15960 (i386_regmap): Renamed from regmap, made static.
15961 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15962 made static.
15963 (i386_cannot_store_register): Renamed from cannot_store_register,
15964 made static.
15965 (the_low_target): New.
15966 * linux-ia64-low.c (num_regs): Remove.
15967 (ia64_num_regs): Define.
15968 (ia64_regmap): Renamed from regmap, made static.
15969 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15970 made static.
15971 (ia64_cannot_store_register): Renamed from cannot_store_register,
15972 made static.
15973 (the_low_target): New.
15974 * linux-m68k-low.c (num_regs): Remove.
15975 (m68k_num_regs): Define.
15976 (m68k_regmap): Renamed from regmap, made static.
15977 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15978 made static.
15979 (m68k_cannot_store_register): Renamed from cannot_store_register,
15980 made static.
15981 (the_low_target): New.
15982 * linux-mips-low.c (num_regs): Remove.
15983 (mips_num_regs): Define.
15984 (mips_regmap): Renamed from regmap, made static.
15985 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15986 made static.
15987 (mips_cannot_store_register): Renamed from cannot_store_register,
15988 made static.
15989 (the_low_target): New.
15990 * linux-ppc-low.c (num_regs): Remove.
15991 (ppc_num_regs): Define.
15992 (ppc_regmap): Renamed from regmap, made static.
15993 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15994 made static.
15995 (ppc_cannot_store_register): Renamed from cannot_store_register,
15996 made static.
15997 (the_low_target): New.
15998 * linux-s390-low.c (num_regs): Remove.
15999 (s390_num_regs): Define.
16000 (s390_regmap): Renamed from regmap, made static.
16001 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16002 made static.
16003 (s390_cannot_store_register): Renamed from cannot_store_register,
16004 made static.
16005 (the_low_target): New.
16006 * linux-sh-low.c (num_regs): Remove.
16007 (sh_num_regs): Define.
16008 (sh_regmap): Renamed from regmap, made static.
16009 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16010 made static.
16011 (sh_cannot_store_register): Renamed from cannot_store_register,
16012 made static.
16013 (the_low_target): New.
16014 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16015 (the_low_target): New.
16016
16017 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16018
16019 * Makefile.in: Add stamp-h target.
16020 * configure.in: Create stamp-h.
16021 * configure: Regenerated.
16022
16023 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16024
16025 * inferiors.c: New file.
16026 * target.c: New file.
16027 * target.h: New file.
16028 * Makefile.in: Add target.o and inferiors.o. Update
16029 dependencies.
16030 * linux-low.c (inferior_pid): New static variable,
16031 moved from server.c.
16032 (linux_create_inferior): Renamed from create_inferior.
16033 Call add_inferior. Return 0 on success instead of a PID.
16034 (linux_attach): Renamed from myattach.
16035 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16036 (linux_thread_alive): Renamed from mythread_alive.
16037 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16038 child dies.
16039 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16040 (regsets_store_inferior_registers): Correct error message.
16041 Add missing ``return 0''.
16042 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16043 (linux_store_registers): Renamed from store_inferior_registers.
16044 (linux_read_memory): Renamed from read_inferior_memory.
16045 (linux_write_memory): Renamed from write_inferior_memory.
16046 (linux_target_ops): New structure.
16047 (initialize_low): Call set_target_ops ().
16048 * remote-utils.c (unhexify): New function.
16049 (hexify): New function.
16050 (input_interrupt): Send signals to ``signal_pid''.
16051 * server.c (inferior_pid): Remove.
16052 (start_inferior): Update create_inferior call.
16053 (attach_inferior): Call add_inferior.
16054 (handle_query): New function.
16055 (main): Call handle_query for `q' packets.
16056 * server.h: Include "target.h". Remove obsolete prototypes.
16057 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16058
16059 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16060
16061 * Makefile.in: Add WARN_CFLAGS. Update configury
16062 dependencies.
16063 * configure.in: Check for <string.h>
16064 * configure: Regenerate.
16065 * config.in: Regenerate.
16066 * gdbreplay.c: Include needed system headers.
16067 (remote_open): Remove strchr prototype.
16068 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16069 * regcache.c (supply_register): Change buf argument to const void *.
16070 (supply_register_by_name): Likewise.
16071 (collect_register): Change buf argument to void *.
16072 (collect_register_by_name): Likewise.
16073 * regcache.h: Add missing prototypes.
16074 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16075 * server.c (handle_query): New function.
16076 (attached): New static variable, moved out of main.
16077 (main): Quiet longjmp clobber warnings.
16078 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16079 * utils.c (error): Remove NORETURN.
16080 (fatal): Likewise.
This page took 0.354062 seconds and 5 git commands to generate.