Add virtual destructor to selftest
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
d4a0e8b5
SM
12017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * tdesc.c (struct tdesc_type): Change return type.
4 (tdesc_add_flag): Change parameter type.
5 (tdesc_add_bitfield): Likewise.
6 (tdesc_add_field): Likewise.
7 (tdesc_set_struct_size): Likewise.
8
798a7429
SM
92017-12-05 Simon Marchi <simon.marchi@ericsson.com>
10
11 * regcache.c (registers_to_string): Remove unused variable.
12
c0e15c9b
SM
132017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
14
15 * inferiors.c (for_each_inferior_with_data): Remove.
16 * inferiors.h (for_each_inferior_with_data): Remove.
17 * server.c (handle_qxfer_threads_worker): Change parameter type.
18 (handle_qxfer_threads_proper): Use for_each_thread.
19
f0045347
SM
202017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
21
22 * inferiors.c (for_each_inferior): Remove.
23 (clear_inferiors): Use for_each_thread.
24 * inferiors.h (for_each_inferior): Remove.
25 * linux-low.c (linux_wait_for_event_filtered): Use
26 for_each_thread.
27 (linux_stabilize_threads): Likewise.
28 * regcache.c (regcache_release): Likewise.
29 * server.c (gdb_wants_all_threads_stopped): Likewise.
30 (clear_pending_status_callback): Remove.
31 (handle_status): Use for_each_thread.
32 (captured_main): Likewise.
33 * win32-low.c (child_init_thread_list): Likewise.
34 (win32_clear_inferiors): Likewise.
35 (fake_breakpoint_event): Likewise.
36
9521758b
SM
372017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
38
39 * inferiors.h (find_inferior): Remove.
40 * inferiors.c (find_inferior): Remove.
41
8f86d7aa
SM
422017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
43
44 * linux-low.c (resume_status_pending_p): Update comment.
45 (need_step_over_p): Update comment.
46
e2b44075
SM
472017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
48
49 * linux-low.c (proceed_one_lwp): Return void, change parameter
50 type.
51 (unsuspend_and_proceed_one_lwp): Likewise.
52 (proceed_all_lwps): Use for_each_thread.
53 (unstop_all_lwps): Likewise.
54
c80825ff
SM
552017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
56
57 * linux-low.c (linux_resume_one_thread): Return void, take
58 parameter directly.
59 (linux_resume): Use for_each_thread.
60
df3e4dbe
SM
612017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
62
63 * linux-low.c (send_sigstop_callback): Return void, change
64 parameter type. Rename to...
65 (send_sigstop): ... this.
66 (suspend_and_send_sigstop_callback): Return void, change parameter
67 type. Rename to...
68 (suspend_and_send_sigstop): ... this.
69 (stop_all_lwps): Use for_each_thread.
70
5a6b0a41
SM
712017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
72
73 * linux-low.c (lwp_running): Return bool, remove unused
74 argument.
75 (linux_stabilize_threads): Use find_thread.
76
39a64da5
SM
772017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
78
79 * linux-low.c (select_singlestep_lwp_callback): Remove.
80 (count_events_callback): Remove.
81 (select_event_lwp_callback): Remove.
82 (select_event_lwp): Use find_thread/for_each_thread.
83
a1385b7b
SM
842017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
85
86 * linux-low.c (not_stopped_callback): Return bool, take filter
87 argument directly.
88 (linux_wait_for_event_filtered): Use find_thread.
89 (linux_wait_1): Likewise.
90
454296a2
SM
912017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
92
93 * linux-low.c (same_lwp): Remove.
94 (find_lwp_pid): Use find_thread.
95
6b2a85da
SM
962017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
97
98 * linux-low.c (delete_lwp_callback): Remove.
99 (linux_mourn): Use for_each_thread.
100
798a38e8
SM
1012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
102
103 * linux-low.c (linux_detach_lwp_callback): Return void, remove
104 args parameter, don't check for pid.
105 (linux_detach): Use for_each_thread.
106
e4eb0dec
SM
1072017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
108
109 * linux-low.c (struct counter): Remove.
110 (second_thread_of_pid_p): Remove.
111 (last_thread_of_process_p): Use find_thread.
112
83e1b6c1
SM
1132017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
114
115 * inferiors.c (find_inferior_in_random): Remove.
116 * inferiors.h (find_inferior_in_random): Remove.
117 * linux-low.c (status_pending_p_callback): Return bool, accept
118 parameter ptid directly.
119 (linux_wait_for_event_filtered): Use find_thread_in_random.
120 (linux_wait_1): Likewise.
121
8dc7b443
SM
1222017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
123
124 * inferiors.c (find_inferior_id): Remove.
125 (find_thread_ptid): Move implemention from find_inferior_id to
126 here.
127 * inferiors.h (find_inferior_id): Remove.
128 * server.c (handle_status): Use find_thread_ptid.
129 (process_serial_event): Likewise.
130 * thread-db.c (find_one_thread): Likewise.
131 (thread_db_thread_handle): Likewise.
132 * win32-low.c (thread_rec): Likewise.
133 (child_delete_thread): Likewise.
134 (win32_thread_alive): Likewise.
135 (get_child_debug_event): Likewise.
136
da25033c
SM
1372017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
138
139 * linux-mips-low.c (update_watch_registers_callback): Return
140 void, remove pid_p parameter, don't check for pid.
141 (mips_insert_point, mips_remove_point): Use for_each_thread.
142
c91bb56b
SM
1432017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
144
145 * lynx.low (lynx_delete_thread_callback): Remove.
146 (lynx_mourn): Use for_each_thread.
147
634a3254
SM
1482017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
149
150 * regcache.c (regcache_invalidate_one): Remove.
151 (regcache_invalidate_pid): use for_each_thread.
152
41272101
TT
1532017-11-26 Tom Tromey <tom@tromey.com>
154
155 * linux-low.c (linux_create_inferior): Update.
156
f5291a6f
UW
1572017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
158
159 * spu-low.c (spu_create_inferior): Fix typo in argument name.
160
6654d750
AH
1612017-11-24 Alan Hayward <alan.hayward@arm.com>
162
163 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
164 * linux-aarch64-low.c (initialize_low_arch): Call init func.
165 * linux-aarch64-tdesc-selftest.c: New file.
166 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
167
1682017-11-24 Alan Hayward <alan.hayward@arm.com>
169
170 * configure.srv: Add new file.
171 * linux-aarch64-low.c (initialize_low_arch): Call init func.
172 * linux-aarch64-tdesc-selftest.c: New file.
173 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
174
49bdb7ee
AH
1752017-11-24 Alan Hayward <alan.hayward@arm.com>
176
177 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
178 * linux-aarch64-low.c (initialize_low_arch): Remove init.
179 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
180
d6d7ce56
AH
1812017-11-24 Alan Hayward <alan.hayward@arm.com>
182
183 * configure.srv: Add new files.
184 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
185 aarch64_linux_read_description.
186 * linux-aarch64-low.c (aarch64_linux_read_description):
187 Merge with aarch64_arch_setup.
188 (aarch64_arch_setup): Call aarch64_linux_read_description.
189 * linux-aarch64-tdesc.c: New file.
190 * linux-aarch64-tdesc.h: New file.
191
506fe5f4
YQ
1922017-11-24 Yao Qi <yao.qi@linaro.org>
193
194 * configure.srv: Set $srv_regobj for tic6x-linux.
195 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
196 (tic6x_read_description): Move some code to tic6x_arch_setup.
197 (tic6x_tdesc_test): New function.
198 (initialize_low_arch): Call selftests::register_test.
199
29f9a567
YQ
2002017-11-22 Yao Qi <yao.qi@linaro.org>
201
202 * remote-utils.c (prepare_resume_reply): Use memcpy.
203
578290ec
SM
2042017-11-19 Simon Marchi <simon.marchi@ericsson.com>
205
206 * linux-low.c (kill_one_lwp_callback): Return void, take
207 argument directly, don't filter on pid.
208 (linux_kill): Use for_each_thread.
209
eca55aec
SM
2102017-11-19 Simon Marchi <simon.marchi@ericsson.com>
211
212 * linux-low.c (need_step_over_p): Return bool, remove dummy
213 argument.
214 (linux_resume, proceed_all_lwps): Use find_thread.
215
25c28b4d
SM
2162017-11-19 Simon Marchi <simon.marchi@ericsson.com>
217
218 * linux-low.c (resume_status_pending_p): Return bool, remove
219 flag_p argument.
220 (linux_resume): Use find_thread.
221
5fdda392
SM
2222017-11-19 Simon Marchi <simon.marchi@ericsson.com>
223
224 * linux-low.c (struct thread_resume_array): Remove.
225 (linux_set_resume_request): Return void, take arguments
226 directly.
227 (linux_resume): Use for_each_thread.
228
fcb056a5
SM
2292017-11-19 Simon Marchi <simon.marchi@ericsson.com>
230
231 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
232 return bool, remove data argument.
233 (linux_stabilize_threads): Use find_thread.
234
139720c5
SM
2352017-11-19 Simon Marchi <simon.marchi@ericsson.com>
236
237 * linux-low.c (unsuspend_one_lwp): Remove.
238 (unsuspend_all_lwps): Use for_each_thread, inline code from
239 unsuspend_one_lwp.
240
6d1e5673
SM
2412017-11-19 Simon Marchi <simon.marchi@ericsson.com>
242
243 * gdbthread.h (find_thread): Add overload with ptid_t filter.
244 * linux-low.c (struct iterate_over_lwps_args): Remove.
245 (iterate_over_lwps_filter): Remove.
246 (iterate_over_lwps): Use find_thread.
247
bbf550d5
SM
2482017-11-19 Simon Marchi <simon.marchi@ericsson.com>
249
250 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
251 (linux_handle_new_gdb_connection): Use for_each_thread, inline
252 code from reset_lwp_ptrace_options_callback.
253
00192f77
SM
2542017-11-19 Simon Marchi <simon.marchi@ericsson.com>
255
256 * linux-arm-low.c (struct update_registers_data): Remove.
257 (update_registers_callback): Return void, take arguments
258 directly, don't check thread's pid.
259 (arm_insert_point, arm_remove_point): Use for_each_thread.
260
2bee2b6c
SM
2612017-11-19 Simon Marchi <simon.marchi@ericsson.com>
262
263 * win32-low.c (continue_one_thread): Return void, take argument
264 directly.
265 (child_continue): Use for_each_thread.
266
0b360f19
SM
2672017-11-19 Simon Marchi <simon.marchi@ericsson.com>
268
269 * win32-i386-low.c (update_debug_registers_callback): Rename
270 to ...
271 (update_debug_registers): ... this, return void, remove pid_p arg.
272 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
273
f27866ba
SM
2742017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
275
276 * inferiors.h (struct process_info): Add constructor, initialize
277 fields..
278 <syscalls_to_catch>: Change type to std::vector<int>.
279 * inferiors.c (add_process): Allocate process_info with new.
280 (remove_process): Free process_info with delete.
281 * linux-low.c (handle_extended_wait): Adjust.
282 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
283 * server.c (handle_general_set): Adjust.
284
e849ea89
PA
2852017-11-16 Pedro Alves <palves@redhat.com>
286
287 * remote-utils.c (remote_close): Block SIGIO signals instead of
288 uninstalling the SIGIO handler.
289
1d0aa65c
AH
2902017-11-16 Alan Hayward <alan.hayward@arm.com>
291
292 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
293
3491a34c
YQ
2942017-11-16 Yao Qi <yao.qi@linaro.org>
295
296 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
297 (tic6x_store_gregset): Likewise.
298 (tic6x_usrregs_info): Move it up.
299
a602f924
AH
3002017-11-15 Alan Hayward <alan.hayward@arm.com>
301
302 * Makefile.in: Update arch rules.
303 * configure.srv: Explicitly mark arch/ files.
304
5616b6c3
AS
3052017-11-13 Andreas Schwab <schwab@suse.de>
306
307 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
308 function.
309 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
310
d1928160
PA
3112017-11-06 Pedro Alves <palves@redhat.com>
312
313 * config.in, configure: Regenerate.
314
bac608e7
SM
3152017-10-27 Simon Marchi <simon.marchi@ericsson.com>
316
317 * target.c (struct thread_search): Remove.
318 (thread_search_callback): Remove.
319 (prepare_to_access_memory): Use for_each_thread instead of
320 find_inferior. Inline code from thread_search_callback.
321
eaddb425
SM
3222017-10-27 Simon Marchi <simon.marchi@ericsson.com>
323
324 * server.c (struct visit_actioned_threads_data): Remove.
325 (visit_actioned_threads): Change prototype to take arguments
326 directly.
327 (resume): Use find_thread instead of find_inferior.
328
99078d34
SM
3292017-10-27 Simon Marchi <simon.marchi@ericsson.com>
330
331 * server.c (queue_stop_reply_callback): Change prototype, return
332 void.
333 (find_status_pending_thread_callback): Remove.
334 (handle_status): Replace find_inferior with find_thread and
335 for_each_thread.
336
cc628f3d
AH
3372017-10-25 Alan Hayward <alan.hayward@arm.com>
338
339 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
340 with REGNO.
341 (aarch64_store_gregset): Likewise.
342 (aarch64_fill_fpregset): Likewise.
343 (aarch64_store_fpregset): Likewise.
344
4d3bb80e
SM
3452017-10-21 Simon Marchi <simon.marchi@ericsson.com>
346
347 * gdbthread.h (find_thread, for_each_thread): New functions.
348 * inferiors.c (thread_of_pid): Remove.
349 (find_any_thread_of_pid): Use find_thread.
350 * linux-low.c (num_lwps): Use for_each_thread.
351
7a7cdfa0
YQ
3522017-10-17 Yao Qi <yao.qi@linaro.org>
353
354 * Makefile.in: Remove one rule.
355 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
356
e675d170
YQ
3572017-10-17 Yao Qi <yao.qi@linaro.org>
358
359 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
360 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
361
7eb4e0f9
YQ
3622017-10-17 Yao Qi <yao.qi@linaro.org>
363
364 * configure.srv: Rename arm.o with arch/arm.o.
365
60d6cfc9
YQ
3662017-10-17 Yao Qi <yao.qi@linaro.org>
367
368 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
369 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
370 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
371 (arch-i386.o, arch-amd64.o): Remove rules.
372 (arch/%.o): New rule.
373 Update POSTCOMPILE and COMPILE.pre.
374 * configure.ac: Invoke AC_CONFIG_COMMANDS.
375 * configure: Re-generated.
376 * configure.srv: Replace arch-i386.o with arch/i386.o.
377 Replace arch-amd64.o with arch/amd64.o.
378
5bfda255
YQ
3792017-10-16 Yao Qi <yao.qi@linaro.org>
380
381 * configure: Regenerated.
382
9c80ecd6
SM
3832017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
384
385 * inferiors.h: (struct inferior_list): Remove.
386 (struct inferior_list_entry); Remove.
387 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
388 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
389 get_first_inferior): Remove.
390 (for_each_inferior, for_each_inferior_with_data, find_inferior,
391 find_inferior_id, find_inferior_in_random): Change signature.
392 * inferiors.c (all_threads): Change type to
393 std::list<thread_info *>.
394 (get_thread): Remove macro.
395 (find_inferior, find_inferior_id): Change signature, implement
396 using find_thread.
397 (find_inferior_in_random): Change signature, implement using
398 find_thread_in_random.
399 (for_each_inferior, for_each_inferior_with_data): Change
400 signature, implement using for_each_thread.
401 (add_inferior_to_list, remove_inferior): Remove.
402 (add_thread, get_first_thread, thread_of_pid,
403 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
404 (get_first_inferior, one_inferior_p, clear_inferior_list):
405 Remove.
406 (clear_inferiors, get_thread_process): Update.
407 * gdbthread.h: Include <list>.
408 (struct thread_info) <entry>: Remove field.
409 <id>: New field.
410 (all_threads): Change type to std::list<thread_info *>.
411 (get_first_inferior): Add doc.
412 (find_thread, for_each_thread, find_thread_in_random): New
413 functions.
414 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
415 * linux-arm-low.c (update_registers_callback): Update.
416 * linux-low.c (second_thread_of_pid_p): Update.
417 (kill_one_lwp_callback, linux_detach_lwp_callback,
418 delete_lwp_callback, status_pending_p_callback, same_lwp,
419 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
420 iterate_over_lwps, not_stopped_callback,
421 resume_stopped_resumed_lwps, count_events_callback,
422 select_singlestep_lwp_callback, select_event_lwp_callback,
423 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
424 suspend_and_send_sigstop_callback, wait_for_sigstop,
425 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
426 lwp_running, linux_set_resume_request, resume_status_pending_p,
427 need_step_over_p, start_step_over, linux_resume_one_thread,
428 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
429 reset_lwp_ptrace_options_callback): Update.
430 * linux-mips-low.c (update_watch_registers_callback): Update.
431 * regcache.c (regcache_invalidate_one, regcache_invalidate):
432 Update.
433 (free_register_cache_thread_one): Remove.
434 (regcache_release): Update.
435 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
436 handle_qxfer_threads_worker): Update.
437 (handle_query): Update, use list iterator.
438 (visit_actioned_threads, handle_pending_status,
439 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
440 clear_pending_status_callback, set_pending_status_callback,
441 find_status_pending_thread_callback, handle_status,
442 process_serial_event): Update.
443 * target.c (thread_search_callback): Update.
444 * thread-db.c (thread_db_get_tls_address): Update.
445 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
446 Update.
447 * win32-i386-low.c (update_debug_registers_callback): Update.
448 * win32-low.c (delete_thread_info, child_delete_thread,
449 continue_one_thread, suspend_one_thread,
450 get_child_debug_event): Adjust.
451
9179355e
SM
4522017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
453
454 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
455 * inferiors.h: Include <list>.
456 (struct process_info) <entry>: Remove field.
457 <pid>: New field.
458 (pid_of): Change macro to function.
459 (ptid_of, lwpid_of): Remove macro.
460 (all_processes): Change type to std::list<process_info *>.
461 (ALL_PROCESSES): Remove macro.
462 (for_each_process, find_process): New function.
463 * inferiors.c (all_processes): Change type to
464 std::list<process_info *>.
465 (find_thread_process): Adjust.
466 (add_process): Likewise.
467 (remove_process): Likewise.
468 (find_process_pid): Likewise.
469 (get_first_process): Likewise.
470 (started_inferior_callback): Remove.
471 (have_started_inferiors_p): Adjust.
472 (attached_inferior_callback): Remove.
473 (have_attached_inferiors_p): Adjust.
474 * linux-low.c (check_zombie_leaders): Likewise.
475 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
476 (x86_linux_update_xmltarget): Adjust.
477 * server.c (handle_query): Likewise.
478 (gdb_reattached_process): Remove.
479 (handle_status): Adjust.
480 (kill_inferior_callback): Likewise.
481 (detach_or_kill_inferior): Remove.
482 (print_started_pid): Likewise.
483 (print_attached_pid): Likewise.
484 (detach_or_kill_for_exit): Update.
485 (process_serial_event): Likewise.
486 * linux-arm-low.c (arm_new_fork): Likewise.
487
c9cb8905
SM
4882017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
489
490 * dll.h: Include <list>.
491 (struct dll_info): Add constructor.
492 <entry>: Remove field.
493 (all_dlls): Change type to std::list<dll_info>.
494 * dll.c: Include <algorithm>.
495 (get_dll): Remove macro.
496 (all_dlls): Change type to std::list<dll_info *>.
497 (free_one_dll): Remove.
498 (match_dll): Likewise.
499 (loaded_dll): Adjust.
500 (unloaded_dll): Adjust to all_dlls type change, use
501 std::find_if. Inline code from match_dll.
502 (clear_dlls): Adjust to all_dlls type change.
503 * server.c (emit_dll_description): Remove.
504 (handle_qxfer_libraries): Adjust to all_dlls type change,
505 integrate emit_dll_description's functionality.
506
04ec7890
SM
5072017-10-12 Simon Marchi <simon.marchi@ericsson.com>
508
509 * linux-low.h (struct linux_target_ops) <delete_process>: New
510 field.
511 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
512 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
513 (struct linux_target_ops): Add delete_process callback.
514 * linux-arm-low.c (arm_delete_process): New.
515 (struct linux_target_ops): Add delete_process callback.
516 * linux-bfin-low.c (struct linux_target_ops): Likewise.
517 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
518 * linux-m32r-low.c (struct linux_target_ops): Likewise.
519 * linux-mips-low.c (mips_linux_delete_process): New.
520 (struct linux_target_ops): Add delete_process callback.
521 * linux-ppc-low.c (struct linux_target_ops): Likewise.
522 * linux-s390-low.c (struct linux_target_ops): Likewise.
523 * linux-sh-low.c (struct linux_target_ops): Likewise.
524 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
525 * linux-tile-low.c (struct linux_target_ops): Likewise.
526 * linux-x86-low.c (x86_linux_delete_process): New.
527 (struct linux_target_ops): Add delete_process callback.
528 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
529
466eecee
SM
5302017-10-12 Simon Marchi <simon.marchi@ericsson.com>
531
532 * linux-aarch64-low.c (the_low_target): Add thread delete
533 callback.
534 * linux-arm-low.c (arm_delete_thread): New function.
535 (the_low_target): Add thread delete callback.
536 * linux-bfin-low.c (the_low_target): Likewise.
537 * linux-crisv32-low.c (the_low_target): Likewise.
538 * linux-low.c (delete_lwp): Invoke delete_thread callback if
539 set.
540 * linux-low.h (struct linux_target_ops) <delete_thread>: New
541 field.
542 * linux-m32r-low.c (the_low_target): Add thread delete callback.
543 * linux-mips-low.c (mips_linux_delete_thread): New function.
544 (the_low_target): Add thread delete callback.
545 * linux-ppc-low.c (the_low_target): Likewise.
546 * linux-s390-low.c (the_low_target): Likewise.
547 * linux-sh-low.c (the_low_target): Likewise.
548 * linux-tic6x-low.c (the_low_target): Likewise.
549 * linux-tile-low.c (the_low_target): Likewise.
550 * linux-x86-low.c (the_low_target): Likewise.
551 * linux-xtensa-low.c (the_low_target): Likewise.
552
b79f7801
YZ
5532017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
554
555 * win32-low.c: Include "common-inferior.h".
556
bc3b087d
SDJ
5572017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
558
559 * inferiors.c (set_inferior_cwd): New function.
560 * server.c (handle_general_set): Handle QSetWorkingDir packet.
561 (handle_query): Inform that QSetWorkingDir is supported.
562 * win32-low.c (create_process): Pass the inferior's cwd to
563 CreateProcess.
564
d092c5a2
SDJ
5652017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
566
567 * inferiors.c (current_inferior_cwd): New global variable.
568 (get_inferior_cwd): New function.
569 * inferiors.h (struct process_info) <cwd>: New field.
570
7da0a886
SDJ
5712017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
572
573 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
574 (OBS): Add gdb_tilde_expand.o.
575
289a6840
SM
5762017-10-02 Simon Marchi <simon.marchi@ericsson.com>
577
578 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
579 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
580
256642e8
PA
5812017-09-29 Pedro Alves <palves@redhat.com>
582
583 * ax.c (gdb_parse_agent_expr): Constify.
584 * ax.h (gdb_parse_agent_expr): Constify.
585 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
586 Constify.
587 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
588 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
589 * remote-utils.h (read_ptid): Constify.
590 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
591 (process_point_options, process_serial_event): Constify.
592 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
593 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
594 (cmd_qtbuffer): Constify.
595
5b9ca4d4
PA
5962017-09-29 Pedro Alves <palves@redhat.com>
597
598 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
599 fails.
600
94c207e0
PA
6012017-09-29 Pedro Alves <palves@redhat.com>
602
603 * linux-low.c (handle_extended_wait): Pass parent thread instead
604 of process to thread_db_notice_clone.
605 * linux-low.h (thread_db_notice_clone): Replace parent process
606 parameter with parent thread parameter.
607 * thread-db.c (find_one_thread): Add comment.
608 (thread_db_notice_clone): Replace parent process parameter with
609 parent thread parameter. Temporarily switch to the parent thread.
610
75352e28
SDJ
6112017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
612
613 * gdbthread.h: Include "common-gdbthread.h".
614 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
615 "if" when validating the ptid.
616 * remote-utils.c: Include "gdbthread.h".
617 (prepare_resume_reply): Use "switch_to_thread".
618 * target.c (done_accessing_memory): Likewise.
619
ad339634
AA
6202017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
621
622 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
623 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
624 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
625 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
626 s390x-gs-linux64-ipa.o to ipa_obj.
627 * linux-s390-low.c (HWCAP_S390_GS): New define.
628 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
629 New functions.
630 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
631 (s390_arch_setup): Check for guarded-storage support and choose
632 appropriate tdesc.
633 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
634 init_registers_s390x_gs_linux64.
635 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
636 enum value.
637 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
638 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
639
cc4d742f
SM
6402017-09-22 Simon Marchi <simon.marchi@ericsson.com>
641
642 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
643
f6327dcb
KB
6442017-09-21 Kevin Buettner <kevinb@redhat.com>
645
646 * linux-low.h (struct lwp_info): Add new field, thread_handle.
647 (thread_db_thread_handle): Declare.
648 * linux-low.c (linux_target_ops): Initialize thread_handle.
649 * server.c (handle_qxfer_threads_worker): Add support for
650 "handle" attribute.
651 * target.h (struct target_ops): Add new function pointer,
652 thread_handle.
653 (target_thread_handle): Define.
654 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
655 field in lwp.
656 (thread_db_thread_handle): New function.
657
86299109
KB
6582017-09-21 Kevin Buettner <kevinb@redhat.com>
659
660 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
661 * linux-low.h (thread_db_notice_clone): Declare.
662 * thread-db.c (thread_db_notice_clone): New function.
663
f557a88a
PA
6642017-09-21 Pedro Alves <palves@redhat.com>
665
666 * server.c (gdb_read_memory, handle_status, process_serial_event)
667 (handle_serial_event, handle_target_event): Adjust to
668 set_desired_thread prototype change.
669 * target.c (set_desired_thread): Remove 'use_general' parameter
670 and adjust.
671 * target.h (set_desired_thread): Remove 'use_general' parameter.
672
223ffa71
TT
6732017-09-20 Tom Tromey <tom@tromey.com>
674
675 * target.c (target_terminal::terminal_state): Define.
676 (target_terminal::init): Rename from target_terminal_init.
677 (target_terminal::inferior): Rename from
678 target_terminal_inferior.
679 (target_terminal::ours): Rename from target_terminal_ours.
680 (target_terminal::ours_for_output, target_terminal::info): New.
681
04fd3ba9
SM
6822017-09-16 Simon Marchi <simon.marchi@ericsson.com>
683
684 * server.c (accumulate_file_name_length): Remove.
685 (emit_dll_description): Adjust to std::string change.
686 (handle_qxfer_libraries): Use std::string to hold document.
687
5e187554
SM
6882017-09-16 Simon Marchi <simon.marchi@ericsson.com>
689
690 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
691 return type of xml_escape_text.
692 * server.c (emit_dll_description): Likewise.
693
1526853e
SM
6942017-09-16 Simon Marchi <simon.marchi@ericsson.com>
695
696 * server.c (captured_main): Accept argument for --selftest.
697 Update run_tests call.
698 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
699 when registering selftests.
700
c4dfafab
SDJ
7012017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
702
703 * regcache.c (get_thread_regcache): Update code to use "std::vector"
704 instead of "VEC" for "target_desc.reg_defs".
705 (regcache_cpy): Likewise.
706 (registers_to_string): Likewise.
707 (registers_from_string): Likewise.
708 (find_regno): Likewise.
709 (supply_regblock): Likewise.
710 (regcache_raw_read_unsigned): Likewise.
711 * tdesc.c (init_target_desc): Likewise.
712 (tdesc_create_reg): Likewise.
713 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
714 (struct target_desc) <reg_defs>: Convert to "std::vector".
715 (target_desc): Do not initialize "reg_defs".
716 (~target_desc): Update code to use "std::vector" instead of "VEC"
717 for "target_desc.reg_defs".
718 (operator==): Likewise.
719
124aceb4
SM
7202017-09-15 Simon Marchi <simon.marchi@ericsson.com>
721
722 * inferiors.h (thread_to_gdb_id): Remove.
723 * inferiors.c (thread_to_gdb_id): Remove.
724 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
725 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
726 lynx_store_registers, lynx_read_memory, lynx_write_memory):
727 Likewise.
728 * nto-low.c (nto_fetch_registers, nto_store_registers,
729 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
730
96cde54f
SM
7312017-09-15 Simon Marchi <simon.marchi@ericsson.com>
732
733 * inferiors.h (gdb_id_to_thread_id): Remove.
734 * inferiors.c (gdb_id_to_thread_id): Remove.
735 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
736 removal. Move pid declaration closer to where it's used.
737
e8ca139e
SM
7382017-09-15 Simon Marchi <simon.marchi@ericsson.com>
739
740 * server.c (handle_detach): New function.
741 (process_serial_event): Move code out, call handle_detach.
742
f8a4e119
SM
7432017-09-15 Simon Marchi <simon.marchi@ericsson.com>
744
745 * server.c (require_running): Rename to ...
746 (require_running_or_return): ... this ...
747 (require_running_or_break): ... and this.
748 (handle_query, process_serial_event): Adjust.
749
0eb0a407
SM
7502017-09-15 Simon Marchi <simon.marchi@ericsson.com>
751
752 * linux-low.c (linux_set_resume_request): Remove unused
753 variables.
754
785922a5
SM
7552017-09-15 Simon Marchi <simon.marchi@ericsson.com>
756
757 * server.c (first_thread_of): Remove.
758 (process_serial_event): Replace usage of first_thread_of with
759 find_any_thread_of_pid.
760 * tracepoint.c (same_process_p): Remove.
761 (gdb_agent_about_to_close): Replace usage of same_process_p with
762 find_any_thread_of_pid.
763 * linux-x86-low.c (same_process_callback): Remove.
764 (x86_arch_setup_process_callback): Replace usage of
765 same_process_callback with find_any_thread_of_pid.
766 * thread-db.c (any_thread_of): Remove.
767 (switch_to_process): Replace usage of any_thread_of with
768 find_any_thread_of_pid.
769 * inferiors.c (thread_pid_matches_callback): Remove.
770 (find_thread_process): Adjust to use find_any_thread_of_pid.
771
a059f00c
SDJ
7722017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
773
774 * regcache.c (get_thread_regcache): Guard calls to "memset"
775 with "!VEC_empty".
776
cc397f3a
SDJ
7772017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
778
779 * linux-low.c (handle_extended_wait): Use
780 "allocate_target_description" instead of "XNEW".
781 * linux-x86-low.c (initialize_low_arch): Likewise.
782
22916b07
YQ
7832017-09-05 Yao Qi <yao.qi@linaro.org>
784
785 * configure.srv (srv_i386_regobj): Remove.
786 (srv_amd64_regobj): Remove.
787 (srv_regobj): Set it to "" for x86 non-linux targets.
788 * linux-x86-tdesc.c (i386_linux_read_description):
789 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
790 (init_registers_i386): Remove the declaration.
791 (tdesc_i386): Remove the declaration.
792 (lynx_i386_arch_setup): Call i386_create_target_description.
793 * nto-x86-low.c: Likewise.
794 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
795 [!__x86_64__]: include arch/i386.h.
796 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
797
38602d55
YQ
7982017-09-05 Yao Qi <yao.qi@linaro.org>
799
800 * configure.srv (srv_amd64_linux_xmlfiles): Remove
801 i386/amd64-XXX-linux from it.
802
44b886ff
YQ
8032017-09-05 Yao Qi <yao.qi@linaro.org>
804
805 * configure.srv: Empty srv_amd64_linux_regobj if $development is
806 false.
807 (ipa_amd64_linux_regobj): Remove.
808 (ipa_x32_linux_regobj): Remove.
809
b4570e4b
YQ
8102017-09-05 Yao Qi <yao.qi@linaro.org>
811
812 * Makefile.in (arch-amd64.o): New rule.
813 * configure.srv: Append arch-amd64.o.
814 * linux-amd64-ipa.c: Include common/x86-xstate.h.
815 (get_ipa_tdesc): Call amd64_linux_read_description.
816 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
817 and init_registers_amd64_XXX.
818 * linux-x86-low.c (x86_linux_read_description): Call
819 amd64_linux_read_description.
820 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
821 (initialize_low_arch): Don't call init_registers_x32_XXX and
822 init_registers_amd64_XXX.
823 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
824 and tdesc_amd64_XXX.
825 [__x86_64__] (amd64_tdesc_test): New function.
826 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
827 and init_registers_amd64_XXX.
828 * linux-x86-tdesc.c: Include arch/amd64.h.
829 (xcr0_to_tdesc_idx): New function.
830 (i386_linux_read_description): New function.
831 (amd64_get_ipa_tdesc_idx): New function.
832 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
833 (amd64_get_ipa_tdesc): Declare.
834
d1f28ea2
YQ
8352017-09-05 Yao Qi <yao.qi@linaro.org>
836
837 * configure.srv (srv_i386_linux_xmlfiles): Remove
838 i386/i386-XXX-linux.xml from it.
839
25a93583
YQ
8402017-09-05 Yao Qi <yao.qi@linaro.org>
841
842 * configure.srv: Set srv_i386_linux_regobj empty if $development
843 is false.
844 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
845 initialize_low_tdesc.
846 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
847 with #if initialize_low_tdesc.
848 * linux-x86-tdesc-selftest.c: New file.
849 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
850
5f035c07
YQ
8512017-09-05 Yao Qi <yao.qi@linaro.org>
852
853 * Makefile.in (arch-i386.o): New rule.
854 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
855 (x86_64-*-linux*): Likewise.
856 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
857 include arch/i386.h.
858 (i386_linux_read_description): Remove code and call
859 i386_create_target_description.
860 * tdesc.c (allocate_target_description): New function.
861 * tdesc.h (set_tdesc_architecture): Remove declaration.
862 (set_tdesc_osabi): Likewise.
863
0abe8a89
YQ
8642017-09-05 Yao Qi <yao.qi@linaro.org>
865
866 * linux-x86-tdesc.c: Don't include <inttypes.h>.
867 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
868 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
869 .xmltarget.
870 * server.c (get_features_xml): Call tdesc_get_features_xml.
871 * tdesc.c (set_tdesc_architecture): New function.
872 (set_tdesc_osabi): New function.
873 (tdesc_get_features_xml): New function.
874 (tdesc_create_feature): Add an argument.
875 * tdesc.h (struct target_desc) <features>: New field.
876 <arch, osabi>: New field.
877 (~target_desc): xfree features, arch, and osabi.
878 (target_desc::oerator==): Don't compare .xmltarget.
879 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
880 (set_tdesc_osabi): Likewise.
881 (tdesc_get_features_xml): Likewise.
882
0a188386
YQ
8832017-09-05 Yao Qi <yao.qi@linaro.org>
884
885 * linux-x86-tdesc.c: Include selftest.h.
886 (i386_tdesc_test): New function.
887 (initialize_low_tdesc): Call selftests::register_test.
888 * tdesc.h: Include regdef.h.
889 (target_desc): Override operator == and !=.
890
f49ff000
YQ
8912017-09-05 Yao Qi <yao.qi@linaro.org>
892
893 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
894 (ipa_obj): Likewise.
895 * linux-i386-ipa.c: Include common/x86-xstate.h
896 (get_ipa_tdesc): Call i386_linux_read_description.
897 (initialize_low_tracepoint): Don't call init_registers_XXX
898 functions, call initialize_low_tdesc instead.
899 * linux-x86-low.c (x86_linux_read_description): Call
900 i386_linux_read_description.
901 (initialize_low_arch): Don't call init_registers_i386_XXX
902 functions, call initialize_low_tdesc.
903 * linux-x86-tdesc.c: New file.
904 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
905 (i386_get_ipa_tdesc_idx): Declare.
906 (i386_get_ipa_tdesc): Declare.
907 (initialize_low_tdesc): Declare.
908
2b68ef2f
YQ
9092017-09-05 Yao Qi <yao.qi@linaro.org>
910
911 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
912 instead of 0.
913
f7000548
YQ
9142017-09-05 Yao Qi <yao.qi@linaro.org>
915
916 * Makefile.in (IPA_OBJS): Add vec-ipa.o
917 * regcache.c (get_thread_regcache): Use VEC_length.
918 (init_register_cache): Likewise.
919 (regcache_cpy): Likewise.
920 (registers_to_string): Iterate reg_defs via VEC_iterate.
921 (find_regno): Likewise.
922 (find_register_by_number): Use VEC_index.
923 (register_size): Call find_register_by_number.
924 (register_data): Call find_register_by_number.
925 (supply_regblock): Use VEC_length.
926 (regcache_raw_read_unsigned): Likewise.
927 * tdesc.c (init_target_desc): Iterate reg_defs via
928 VEC_iterate.
929 (default_description): Update initializer.
930 (copy_target_description): Don't update field num_registers.
931 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
932 <num_registers>: Remove.
933
50a421ac
SM
9342017-09-04 Simon Marchi <simon.marchi@ericsson.com>
935
936 * Makefile.in (.SECONDARY): Define target.
937
23fdd69e
SM
9382017-09-03 Simon Marchi <simon.marchi@ericsson.com>
939
940 * linux-low.c (linux_wait_1): Adjust.
941 * server.c (queue_stop_reply_callback): Adjust.
942
0a2dde4a
SDJ
9432017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
944
945 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
946 QEnvironmentUnset and QEnvironmentReset packets.
947 (handle_query): Inform remote that QEnvironmentHexEncoded,
948 QEnvironmentUnset and QEnvironmentReset are supported.
949
6afd337d
SM
9502017-08-25 Simon Marchi <simon.marchi@ericsson.com>
951
952 * inferiors.h (inferior_target_data): Rename to ...
953 (thread_target_data): ... this.
954 (inferior_regcache_data): Rename to ...
955 (thread_regcache_data): ... this.
956 (set_inferior_regcache_data): Rename to ...
957 (set_thread_regcache_data): ... this.
958 * inferiors.c (inferior_target_data): Rename to ...
959 (thread_target_data): ... this.
960 (inferior_regcache_data): Rename to ...
961 (thread_regcache_data): ... this.
962 (set_inferior_regcache_data): Rename to ...
963 (set_thread_regcache_data): ... this.
964 (free_one_thread): Update.
965 * linux-low.h (get_thread_lwp): Update.
966 * regcache.c (get_thread_regcache): Update.
967 (regcache_invalidate_thread): Update.
968 (free_register_cache_thread): Update.
969 * win32-i386-low.c (update_debug_registers_callback): Update.
970 (win32_get_current_dr): Update.
971 * win32-low.c (thread_rec): Update.
972 (delete_thread_info): Update.
973 (continue_one_thread): Update.
974 (suspend_one_thread): Update.
975
a160cc46
SM
9762017-08-24 Simon Marchi <simon.marchi@ericsson.com>
977
978 * inferiors.c (set_inferior_target_data): Remove.
979 * inferiors.h (set_inferior_target_data): Remove.
980
6d580b63
YQ
9812017-08-18 Yao Qi <yao.qi@linaro.org>
982
983 * Makefile.in (OBS): Add selftest.o.
984 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
985 * configure, config.in: Re-generated.
986 * server.c: Include common/sefltest.h.
987 (captured_main): Handle option --selftest.
988
f5a29eb0
YQ
9892017-08-09 Yao Qi <yao.qi@linaro.org>
990
991 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
992 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
993 i386-avx-mpx.o and i386-mmx.o.
994 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
995 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
996 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
997 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
998 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
999 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1000 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1001 i386/amd64-avx-mpx.xml.
1002
57757c2f
YQ
10032017-08-09 Yao Qi <yao.qi@linaro.org>
1004
1005 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1006 and x32-avx-avx512.o.
1007 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1008 i386/x32-avx-avx512.xml.
1009
229d26fc
SM
10102017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1011
1012 * tracepoint.h (enum class fast_tpoint_collect_result): New
1013 enumeration.
1014 (fast_tracepoint_collecting): Change return type to
1015 fast_tpoint_collect_result.
1016 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1017 * linux-low.h: Include tracepoint.h.
1018 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1019 fast_tpoint_collect_result.
1020 * linux-low.c (handle_tracepoints): Adjust.
1021 (linux_fast_tracepoint_collecting): Change return type to
1022 fast_tpoint_collect_result.
1023 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1024 linux_wait_1, stuck_in_jump_pad_callback,
1025 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1026 proceed_one_lwp): Adjust to type change.
1027
2e1e43e1
YQ
10282017-07-10 Yao Qi <yao.qi@linaro.org>
1029
1030 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1031
adc764e7
YQ
10322017-06-29 Yao Qi <yao.qi@linaro.org>
1033
1034 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1035 Remove.
1036 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1037
a206891a
SM
10382017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1039
1040 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1041
9a6c7d9c
SDJ
10422017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1043
1044 * linux-low.c (linux_create_inferior): Adjust code to access the
1045 environment information via 'gdb_environ' class.
1046 * lynx-low.c (lynx_create_inferior): Likewise.
1047 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1048 (get_environ): Return a pointer to 'our_environ'.
1049 (captured_main): Initialize 'our_environ'.
1050 * server.h (get_environ): Adjust prototype.
1051 * spu-low.c (spu_create_inferior): Adjust code to access the
1052 environment information via 'gdb_environ' class.
1053
ae3e2ccf
SM
10542017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1055
1056 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1057 usage of "register" keyword.
1058
3e019bdc
SM
10592017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1060
1061 * configure: Re-generate.
1062
8465943a
SM
10632017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1064
1065 * configure: Re-generate.
1066
cf0dd6f0
SM
10672017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1068
1069 * Makefile.in (COMPILE.pre): Add "-x c++".
1070
9845682b
SDJ
10712017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1072
1073 * fork-child.c: Conditionally include <signal.h>.
1074
aefd8b33
SDJ
10752017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1076
1077 * server.c (handle_general_set): Handle new packet
1078 "QStartupWithShell".
1079 (handle_query): Add "QStartupWithShell" to the list of supported
1080 packets.
1081 (gdbserver_usage): Add help text explaining the
1082 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1083 options.
1084 (captured_main): Recognize and act upon the presence of the new
1085 CLI options.
1086
2090129c
SDJ
10872017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1088 Pedro Alves <palves@redhat.com>
1089
1090 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1091 * configure: Regenerate.
1092 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1093 "fork-inferior.o".
1094 (i[34567]86-*-lynxos*): Likewise.
1095 (spu*-*-*): Likewise.
1096 * fork-child.c: New file.
1097 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1098 and "environ.h".
1099 (linux_ptrace_fun): New function.
1100 (linux_create_inferior): Adjust function prototype to reflect
1101 change on "target.h". Adjust function code to use
1102 "fork_inferior".
1103 (linux_request_interrupt): Delete "signal_pid".
1104 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1105 (lynx_ptrace_fun): New function.
1106 (lynx_create_inferior): Adjust function prototype to reflect
1107 change on "target.h". Adjust function code to use
1108 "fork_inferior".
1109 * nto-low.c (nto_create_inferior): Adjust function prototype and
1110 code to reflect change on "target.h". Update comments.
1111 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1112 "common-terminal.h" and "environ.h".
1113 (terminal_fd): Moved to fork-child.c.
1114 (old_foreground_pgrp): Likewise.
1115 (restore_old_foreground_pgrp): Likewise.
1116 (last_status): Make it global.
1117 (last_ptid): Likewise.
1118 (our_environ): New variable.
1119 (startup_with_shell): Likewise.
1120 (program_name): Likewise.
1121 (program_argv): Rename to...
1122 (program_args): ...this.
1123 (wrapper_argv): New variable.
1124 (start_inferior): Delete function.
1125 (get_exec_wrapper): New function.
1126 (get_exec_file): Likewise.
1127 (get_environ): Likewise.
1128 (prefork_hook): Likewise.
1129 (post_fork_inferior): Likewise.
1130 (postfork_hook): Likewise.
1131 (postfork_child_hook): Likewise.
1132 (handle_v_run): Update code to deal with arguments coming from the
1133 remote host. Update calls from "start_inferior" to
1134 "create_inferior".
1135 (captured_main): Likewise. Initialize environment variable. Call
1136 "have_job_control".
1137 * server.h (post_fork_inferior): New prototype.
1138 (get_environ): Likewise.
1139 (last_status): Declare.
1140 (last_ptid): Likewise.
1141 (signal_pid): Likewise.
1142 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1143 (spu_ptrace_fun): New function.
1144 (spu_create_inferior): Adjust function prototype to reflect change
1145 on "target.h". Adjust function code to use "fork_inferior".
1146 * target.c (target_terminal_init): New function.
1147 (target_terminal_inferior): Likewise.
1148 (target_terminal_ours): Likewise.
1149 * target.h: Include <vector>.
1150 (struct target_ops) <create_inferior>: Update prototype.
1151 (create_inferior): Update macro.
1152 * utils.c (gdb_flush_out_err): New function.
1153 * win32-low.c (win32_create_inferior): Adjust function prototype
1154 and code to reflect change on "target.h".
1155
043a4934
SDJ
11562017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1157
1158 * inferiors.c (switch_to_thread): New function.
1159
15652511
SDJ
11602017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1161
1162 * Makefile.in (SFILE): Add "common/job-control.c".
1163 (OBS): Add "job-control.o".
1164
21ea5acd
SDJ
11652017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1166
1167 * Makefile: Remove "@host_makefile_frag@".
1168
e13cb306
PA
11692017-05-05 Pedro Alves <palves@redhat.com>
1170
1171 * configure: Regenerate.
1172
c94fee56
SDJ
11732017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1174
1175 * configure: Regenerate.
1176
a0ff9e1a
SM
11772017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1178
1179 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1180 software_single_step change of return type to
1181 std::vector<CORE_ADDR>.
1182 * linux-low.c (install_software_single_step_breakpoints):
1183 Likewise.
1184 * linux-low.h (install_software_single_step_breakpoints):
1185 Likewise.
1186
be628ab8
SDJ
11872017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1188
1189 * remote-utils.c: Include "gdb_termios.h" instead of
1190 "terminal.h".
1191 * terminal.h: Delete file.
1192
7c5ded6a
SDJ
11932017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1194
1195 * server.c: Include <vector>.
1196 <program_argv, wrapper_argv>: Convert to std::vector.
1197 (start_inferior): Rewrite function to use C++.
1198 (handle_v_run): Likewise. Update code that calculates the argv
1199 based on the vRun packet; use C++.
1200 (captured_main): Likewise.
1201
436252de
SM
12022017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1203
1204 * server.c (handle_v_cont): Initialize thread_resume::thread
1205 with null_ptid.
1206
9bf2a700
PA
12072017-04-05 Pedro Alves <palves@redhat.com>
1208
1209 * configure: Regenerate.
1210
a121b7c1
PA
12112017-04-05 Pedro Alves <palves@redhat.com>
1212
1213 * gdbreplay.c (sync_error): Constify.
1214 * linux-x86-low.c (push_opcode): Constify.
1215
21c8a587
PA
12162017-04-05 Pedro Alves <palves@redhat.com>
1217
1218 * win32-low.c (get_child_debug_event)
1219 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1220 Report TARGET_WAITKIND_SPURIOUS instead.
1221
fb32b4f7
PA
12222017-04-05 Pedro Alves <palves@redhat.com>
1223
1224 * remote-utils.c (remote_prepare, remote_open): Constify.
1225 * remote-utils.h (remote_prepare, remote_open): Constify.
1226 * server.c (captured_main): Constify 'port' handling.
1227
65dd1e59
SM
12282017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1229
1230 * Makefile.in (clean): Clear .deps.
1231
8fa5b777
SM
12322017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1233
1234 * .gitignore: Remove generated files, replace with wildcard.
1235 * (clean): Replace removal of generated files with wildcard.
1236 (version.c): Replace with...
1237 (version-generated.c): ...this.
1238 (xml-builtin.c): Replace with...
1239 (xml-builtin-generated.c): ...this.
1240 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1241 (%.c: *regformats*): Replace with...
1242 (%-generated.c: *regformats*): ...this.
1243
a12e714b
MF
12442017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1245
1246 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1247 (xtensa_fill_gregset): Call collect_register_by_name for
1248 threadptr register.
1249 (xtensa_store_gregset): Call supply_register_by_name for
1250 threadptr register.
1251
1a09b50a
MF
12522017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1253
1254 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1255 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1256 (xtensa_store_gregset): Call supply_register for all registers in
1257 a0_regnum..a0_regnum + C0_NREGS range.
1258
1a01e7c6
SM
12592017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1260
1261 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1262 (ax-ipa.o: ax.c): Remove.
1263 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1264 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1265 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1266 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1267 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1268
36bc18a8
SM
12692017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1270
1271 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1272 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1273 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1274 (errors-ipa.o: ../common/errors.c): Remove.
1275 (format-ipa.o: ../common/format.c): Remove.
1276 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1277
a8ebe3d5
SM
12782017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1279
1280 * Makefile.in (%-ipa.o: %.c): New rule.
1281 (tracepoint-ipa.o: tracepoint.c): Remove.
1282 (utils-ipa.o: utils.c): Remove.
1283 (remote-utils-ipa.o: remote-utils.c): Remove.
1284 (regcache-ipa.o: regcache.c): Remove.
1285 (i386-linux-ipa.o: i386-linux.c): Remove.
1286 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1287 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1288 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1289 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1290 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1291 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1292 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1293 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1294 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1295 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1296 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1297 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1298 (aarch64-ipa.o: aarch64.c): Remove.
1299 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1300 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1301 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1302 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1303 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1304 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1305 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1306 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1307 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1308 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1309 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1310 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1311 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1312 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1313 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1314 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1315 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1316 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1317 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1318 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1319 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1320 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1321 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1322 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1323 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1324 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1325 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1326 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1327 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1328 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1329 (tdesc-ipa.o: tdesc.c): Remove.
1330 (x32-linux-ipa.o: x32-linux.c): Remove.
1331 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1332 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1333
50cfacb7
SM
13342017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1335
1336 * Makefile.in (%.o: ../arch/%.c): New rule.
1337 (arm.o: ../arch/arm.c): Remove.
1338 (arm-linux.o: ../arch/arm-linux.c): Remove.
1339 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1340 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1341
c5a22423
SM
13422017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1343
1344 * Makefile.in (%.o: ../nat/%.c): New rule.
1345 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1346 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1347 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1348 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1349 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1350 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1351 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1352 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1353 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1354 (linux-personality.o: ../nat/linux-personality.c): Remove.
1355 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1356 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1357 (x86-linux.o: ../nat/x86-linux.c): Remove.
1358 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1359 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1360
6bda016b
SM
13612017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1362
1363 * Makefile.in (%.o: ../common/%.c): New rule.
1364 (signals.o: ../common/signals.c): Remove.
1365 (print-utils.o: ../common/print-utils.c): Remove.
1366 (rsp-low.o: ../common/rsp-low.c): Remove.
1367 (common-utils.o: ../common/common-utils.c): Remove.
1368 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1369 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1370 (vec.o: ../common/vec.c): Remove.
1371 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1372 (xml-utils.o: ../common/xml-utils.c): Remove.
1373 (ptid.o: ../common/ptid.c): Remove.
1374 (buffer.o: ../common/buffer.c): Remove.
1375 (format.o: ../common/format.c): Remove.
1376 (filestuff.o: ../common/filestuff.c): Remove.
1377 (agent.o: ../common/agent.c): Remove.
1378 (errors.o: ../common/errors.c): Remove.
1379 (environ.o: ../common/environ.c): Remove.
1380 (common-debug.o: ../common/common-debug.c): Remove.
1381 (cleanups.o: ../common/cleanups.c): Remove.
1382 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1383 (fileio.o: ../common/fileio.c): Remove.
1384 (common-regcache.o: ../common/common-regcache.c): Remove.
1385 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1386 (new-op.o: ../common/new-op.c): Remove.
1387 (btrace-common.o: ../common/btrace-common.c): Remove.
1388
21122961
SM
13892017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1390
1391 * Makefile.in (%.o: ../target/%.c): New rule.
1392 (waitstatus.o: ../target/waitstatus.c): Remove.
1393
c362e621
SM
13942017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1395
1396 * Makefile.in
1397 (%.c: ../regformats/%.dat,
1398 (%.c: ../regformats/arm/%.dat,
1399 (%.c: ../regformats/i386/%.dat,
1400 (%.c: ../regformats/rs6000/%.dat): New rules.
1401 (aarch64.c): Remove.
1402 (reg-arm.c): Remove.
1403 (arm-with-iwmmxt.c): Remove.
1404 (arm-with-vfpv2.c): Remove.
1405 (arm-with-vfpv3.c): Remove.
1406 (arm-with-neon.c): Remove.
1407 (reg-bfin.c): Remove.
1408 (reg-cris.c): Remove.
1409 (reg-crisv32.c): Remove.
1410 (i386.c): Remove.
1411 (i386-linux.c): Remove.
1412 (i386-avx.c): Remove.
1413 (i386-avx-linux.c): Remove.
1414 (i386-avx-avx512.c): Remove.
1415 (i386-avx-avx512-linux.c): Remove.
1416 (i386-mpx.c): Remove.
1417 (i386-mpx-linux.c): Remove.
1418 (i386-avx-mpx-avx512-pku.c): Remove.
1419 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1420 (i386-avx-mpx.c): Remove.
1421 (i386-avx-mpx-linux.c): Remove.
1422 (i386-mmx.c): Remove.
1423 (i386-mmx-linux.c): Remove.
1424 (reg-ia64.c): Remove.
1425 (reg-m32r.c): Remove.
1426 (reg-m68k.c): Remove.
1427 (reg-cf.c): Remove.
1428 (mips-linux.c): Remove.
1429 (mips-dsp-linux.c): Remove.
1430 (mips64-linux.c): Remove.
1431 (mips64-dsp-linux.c): Remove.
1432 (nios2-linux.c): Remove.
1433 (powerpc-32.c): Remove.
1434 (powerpc-32l.c): Remove.
1435 (powerpc-altivec32l.c): Remove.
1436 (powerpc-cell32l.c): Remove.
1437 (powerpc-vsx32l.c): Remove.
1438 (powerpc-isa205-32l.c): Remove.
1439 (powerpc-isa205-altivec32l.c): Remove.
1440 (powerpc-isa205-vsx32l.c): Remove.
1441 (powerpc-e500l.c): Remove.
1442 (powerpc-64l.c): Remove.
1443 (powerpc-altivec64l.c): Remove.
1444 (powerpc-cell64l.c): Remove.
1445 (powerpc-vsx64l.c): Remove.
1446 (powerpc-isa205-64l.c): Remove.
1447 (powerpc-isa205-altivec64l.c): Remove.
1448 (powerpc-isa205-vsx64l.c): Remove.
1449 (s390-linux32.c): Remove.
1450 (s390-linux32v1.c): Remove.
1451 (s390-linux32v2.c): Remove.
1452 (s390-linux64.c): Remove.
1453 (s390-linux64v1.c): Remove.
1454 (s390-linux64v2.c): Remove.
1455 (s390-te-linux64.c): Remove.
1456 (s390-vx-linux64.c): Remove.
1457 (s390-tevx-linux64.c): Remove.
1458 (s390x-linux64.c): Remove.
1459 (s390x-linux64v1.c): Remove.
1460 (s390x-linux64v2.c): Remove.
1461 (s390x-te-linux64.c): Remove.
1462 (s390x-vx-linux64.c): Remove.
1463 (s390x-tevx-linux64.c): Remove.
1464 (tic6x-c64xp-linux.c): Remove.
1465 (tic6x-c64x-linux.c): Remove.
1466 (tic6x-c62x-linux.c): Remove.
1467 (reg-sh.c): Remove.
1468 (reg-sparc64.c): Remove.
1469 (reg-spu.c): Remove.
1470 (amd64.c): Remove.
1471 (amd64-linux.c): Remove.
1472 (amd64-avx.c): Remove.
1473 (amd64-avx-linux.c): Remove.
1474 (amd64-avx-avx512.c): Remove.
1475 (amd64-avx-avx512-linux.c): Remove.
1476 (amd64-mpx.c): Remove.
1477 (amd64-mpx-linux.c): Remove.
1478 (amd64-avx-mpx-avx512-pku.c): Remove.
1479 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1480 (amd64-avx-mpx.c): Remove.
1481 (amd64-avx-mpx-linux.c): Remove.
1482 (x32.c): Remove.
1483 (x32-linux.c): Remove.
1484 (x32-avx.c): Remove.
1485 (x32-avx-linux.c): Remove.
1486 (x32-avx-avx512.c): Remove.
1487 (x32-avx-avx512-linux.c): Remove.
1488 (reg-xtensa.c): Remove.
1489 (reg-tilegx.c): Remove.
1490 (reg-tilegx32.c): Remove.
1491
1672e0d9
SDJ
14922017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1493
1494 * Makefile.in (SFILES): Add "common/environ.c".
1495 (OBJS): Add "common/environ.h".
1496
239b6d10
WT
14972017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1498
1499 * configure.ac: Check if the fs_base and gs_base members of
1500 `struct user_regs_struct' exist.
1501 * config.in: Regenerated.
1502 * configure: Likewise.
1503
694b382c
AT
15042017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1505
1506 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1507 target_read_memory.
1508 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1509 (get_next_pcs_syscall_next_pc): Likewise.
1510
7dc53023
LM
15112016-12-23 Luis Machado <lgustavo@codesourcery.com>
1512
1513 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1514 * nto-x86-low.c: Likewise.
1515
ad02e4fe
SM
15162016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1517
1518 * Makefile.in: Include disable-implicit-rules.mk.
1519
dcb07cfa
PA
15202016-11-23 Pedro Alves <palves@redhat.com>
1521
1522 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1523 (debug_vprintf): Use std::chrono::steady_clock instead of
1524 gettimeofday. Use '.' instead of ':'.
1525 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1526 (get_timestamp): Use std::chrono::steady_clock instead of
1527 gettimeofday.
1528
8629c02c
SM
15292016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1530
1531 * Makefile.in: Fix whitespace formatting.
1532
b593ecca
SM
15332016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1534
1535 * Makefile.in (SFILES, OBS): Flatten list and order
1536 alphabetically.
1537
9986ba08
PA
15382016-11-23 Pedro Alves <palves@redhat.com>
1539
1540 * event-loop.c (handle_file_event): Use warning.
1541 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1542 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1543 Use warning.
1544
4eefa7bc
PA
15452016-11-23 Pedro Alves <palves@redhat.com>
1546
1547 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1548 output.
1549 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1550 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1551 debug_printf and debug_flush for debug output.
1552 * server.c (handle_general_set): Likewise.
1553 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1554 output.
1555
5443506e
SM
15562016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1557
1558 * Makefile.in (.c.o): Replace rule with ...
1559 (%.o: %.c): ... this one.
1560
3b165252
SM
15612016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1562
1563 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1564 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1565 make.
1566 * configure.ac: Remove checks for the make program.
1567 * configure: Re-generate.
1568
0bcda685
PA
15692016-10-28 Pedro Alves <palves@redhat.com>
1570
1571 * Makefile.in (CXX_DIALECT): Get from configure.
1572 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1573 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1574 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1575 * config.in: Regenerate.
1576 * configure: Regenerate.
1577
c3805894
YQ
15782016-10-27 Yao Qi <yao.qi@linaro.org>
1579
1580 * linux-low.c (linux_supports_range_stepping): Return true if
1581 can_software_single_step return true.
1582
89342618
YQ
15832016-10-27 Yao Qi <yao.qi@linaro.org>
1584
1585 * inferiors.c (find_inferior_in_random): New function.
1586 * inferiors.h (find_inferior_in_random): Declare.
1587 * linux-low.c (linux_wait_for_event_filtered): Call
1588 find_inferior_in_random instead of find_inferior.
1589
e3652c84
YQ
15902016-10-27 Yao Qi <yao.qi@linaro.org>
1591
1592 * linux-low.c (linux_wait_1): If single-step breakpoints are
1593 inserted, remove them.
1594
5a04c4cf
PA
15952016-10-26 Pedro Alves <palves@redhat.com>
1596
1597 * linux-low.c (handle_extended_wait): Link parent/child fork
1598 threads.
1599 (linux_wait_1): Unlink them.
1600 (linux_set_resume_request): Ignore resume requests for
1601 already-resumed and unhandled fork child threads.
1602 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1603 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1604 New functions.
1605 (handle_v_requests) <vCont>: Don't call require_running.
1606 * server.h (in_queued_stop_replies): New declaration.
1607
cb93dc7f
YQ
16082016-10-24 Yao Qi <yao.qi@linaro.org>
1609
1610 PR server/20733
1611 * linux-aarch64-low.c (append_insns): Cast the return value to
1612 'uint32_t *'.
1613
a1078bea
YQ
16142016-10-10 Yao Qi <yao.qi@linaro.org>
1615
1616 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1617
1fb77080
SDJ
16182016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1619
1620 * target.c (target_supports_multi_process): New function, moved
1621 from...
1622 * target.h (target_supports_multi_process): ... here. Remove
1623 macro.
1624
39b5a3b9
TT
16252016-10-05 Tom Tromey <tom@tromey.com>
1626
1627 PR remote/20655:
1628 * tracepoint.c (handle_tracepoint_bkpts): Check
1629 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1630
c1d0b70a
YQ
16312016-10-05 Yao Qi <yao.qi@linaro.org>
1632
1633 * configure.srv: Update the path of arm-*.xml files.
1634
0a69eedb
YQ
16352016-10-05 Terry Guo <terry.guo@arm.com>
1636 Yao Qi <yao.qi@linaro.org>
1637
1638 * Makefile.in: Adjust the path of rules.
1639 * configure.srv: Update the path of xml files.
1640 * regformats/arm-with-iwmmxt.dat: Regenerated.
1641 * regformats/arm-with-neon.dat: Likewise.
1642 * regformats/arm-with-vfpv2.dat: Likewise.
1643 * regformats/arm-with-vfpv3.dat Likewise.
1644
17e16485
YQ
16452016-09-30 Yao Qi <yao.qi@linaro.org>
1646
1647 PR gdbserver/20627
1648 * target.c (target_stop_and_wait): Don't call
1649 target_continue_no_signal, use resume_stop instead.
1650
edeeb602
YQ
16512016-09-26 Yao Qi <yao.qi@linaro.org>
1652
1653 * linux-low.c (linux_wait_1): Call debug_exit.
1654
503b1c39
PA
16552016-09-23 Pedro Alves <palves@redhat.com>
1656
1657 * Makefile.in (SFILES): Add common/new-op.c.
1658 (OBS): Add common/new-op.o.
1659 (new-op.o): New rule.
1660
74172ecf
SM
16612016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1662
1663 * .gitinore: Ignore more files.
1664
fc6cda2e
YQ
16652016-09-21 Yao Qi <yao.qi@linaro.org>
1666
1667 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1668 23.
1669
bc1e6c81
SDJ
16702016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1671
1672 * server.c (start_inferior): Call target_mourn_inferior instead of
1673 mourn_inferior; pass ptid_t argument to it.
1674 (resume): Likewise.
1675 (handle_target_event): Likewise.
1676 * target.c (target_mourn_inferior): New function.
1677 * target.h (mourn_inferior): Delete macro.
1678
0e00e962
AA
16792016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1680
1681 * linux-low.c (lwp_is_stepping): New function.
1682
1d8cb77d
CL
16832016-09-06 Carl Love <cel@us.ibm.com>
1684
1685 * server.c (start_inferior): Fixed comment, requested comment change
1686 didn't get updated correctly. Removed reference to ptrace () call as
1687 it is only true on Linux systems.
1688
7313bced
CL
16892016-09-06 Carl Love <cel@us.ibm.com>
1690
1691 * server.c (start_inferior): Do not call
1692 function target_post_create_inferior () if the
1693 inferior process has already exited.
1694
cf6de44d
PA
16952016-09-05 Pedro Alves <palves@redhat.com>
1696
1697 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1698 (COMPILE.pre, CC_LD): Use CXX directly.
1699 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1700 * acinclude.m4: Don't include build-with-cxx.m4.
1701 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1702 * configure: Regenerate.
1703
c1da6748
AT
17042016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1705
1706 PR gdb/19495
1707 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1708 call writing data to own_buf.
1709
f2b9e3df
SDJ
17102016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1711
1712 * target.c (mywait): Call target_wait instead of
1713 the_target->wait.
1714 (target_wait): New function.
1715
049a8570
SDJ
17162016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1717
1718 * server.c (start_inferior): New variable 'ptid'. Replace calls
1719 to the_target->resume by target_continue{,_no_signal}, depending
1720 on the case.
1721 * target.c (target_stop_and_wait): Call target_continue_no_signal
1722 instead of the_target->resume.
1723 (target_continue): New function.
1724
3aa5cfa0
AT
17252016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1726
1727 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1728
754653a7
AZ
17292016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1730
1731 PR server/20491
1732 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1733 ps_prochandle.
1734 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1735 * linux-arm-low.c (ps_get_thread_area): Likewise.
1736 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1737 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1738 * linux-mips-low.c (ps_get_thread_area): Likewise.
1739 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1740 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1741 * linux-x86-low.c (ps_get_thread_area): Likewise.
1742 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1743
ed036b40
PA
17442016-08-19 Pedro Alves <palves@redhat.com>
1745
1746 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1747
c8ef42ee
PA
17482016-08-19 Pedro Alves <palves@redhat.com>
1749
1750 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1751 comment. Use memcpy instead of casting through unsigned long.
1752
9c235a72
PA
17532016-08-19 Pedro Alves <palves@redhat.com>
1754
1755 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1756 allocating around 0x80000000.
1757
201506da
PA
17582016-08-19 Pedro Alves <palves@redhat.com>
1759
1760 PR gdb/20415
1761 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1762 (x32-avx512-linux-ipa.o): New rules.
1763 * configure.ac (x86_64-*-linux*): New x32 check.
1764 * configure.srv (ipa_x32_linux_regobj): New.
1765 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1766 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1767 descriptions.
1768 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1769 descriptions.
1770 * configure: Regenerate.
1771
f348d89a
PA
17722016-08-09 Pedro Alves <palves@redhat.com>
1773
1774 PR gdb/18653
1775 * Makefile.in (OBS): Add signals-state-save-restore.o.
1776 (signals-state-save-restore.o): New rule.
1777 * config.in: Regenerate.
1778 * configure: Regenerate.
1779 * linux-low.c: Include "signals-state-save-restore.h".
1780 (linux_create_inferior): Call
1781 restore_original_signals_state.
1782 * server.c: Include "dispositions-save-restore.h".
1783 (captured_main): Call save_original_signals_state.
1784
1baf5149
PA
17852016-08-05 Pedro Alves <palves@redhat.com>
1786
1787 * configure: Regenerate.
1788
fcd4a73d
YQ
17892016-08-04 Yao Qi <yao.qi@linaro.org>
1790
1791 * linux-low.c (regsets_fetch_inferior_registers): Check
1792 errno is ESRCH or not.
1793
979659d0
YQ
17942016-08-02 Yao Qi <yao.qi@linaro.org>
1795
1796 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1797 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1798 (thread_db_load_search): Update.
1799 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1800 td_ta_set_event and td_ta_event_getmsg.
1801
6598661d
PA
18022016-07-26 Pedro Alves <palves@redhat.com>
1803
1804 PR server/20414
1805 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1806 of unsigned long for 64-bit registers and use uint32_t instead of
1807 unsigned int for 32-bit registers.
1808
9cf12d57
PA
18092016-07-26 Pedro Alves <palves@redhat.com>
1810
1811 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1812 to 'ptrace'.
1813
305450ed
TT
18142016-07-21 Tom Tromey <tom@tromey.com>
1815
1816 * configure: Rebuild.
1817
2583da7c
YQ
18182016-07-21 Yao Qi <yao.qi@linaro.org>
1819
1820 * mem-break.c (find_gdb_breakpoint): Cast bp to
1821 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1822
21536b36
YQ
18232016-07-21 Yao Qi <yao.qi@linaro.org>
1824
1825 * server.c (handle_v_requests): Support s and S actions
1826 if target_supports_software_single_step return true.
1827
8901d193
YQ
18282016-07-21 Yao Qi <yao.qi@linaro.org>
1829
1830 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1831 is resume_step, call maybe_hw_step.
1832 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1833 and unstop them.
1834 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1835 breakpoints or not.
1836 (proceed_one_lwp): If resume request is resume_step, install
1837 reinsert breakpoints and call maybe_hw_step.
1838
0e9a339e
YQ
18392016-07-21 Yao Qi <yao.qi@linaro.org>
1840
1841 * linux-low.c (proceed_one_lwp): Declare.
1842 (linux_resume_one_thread): Remove local variable 'step'.
1843 Lift code enqueue signal. Call proceed_one_lwp instead of
1844 linux_resume_one_lwp.
1845
4281b351
YQ
18462016-07-21 Yao Qi <yao.qi@linaro.org>
1847
1848 * linux-low.c (linux_resume_one_thread): Call
1849 enqueue_pending_signal.
1850
984a2c04
YQ
18512016-07-21 Yao Qi <yao.qi@linaro.org>
1852
1853 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1854 * inferiors.c (do_restore_current_thread_cleanup): New function.
1855 (make_cleanup_restore_current_thread): Likewise.
1856 * linux-low.c (install_software_single_step_breakpoints): Call
1857 make_cleanup_restore_current_thread. Switch current_thread to
1858 thread.
1859
bec903c9
YQ
18602016-07-21 Yao Qi <yao.qi@linaro.org>
1861
1862 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1863 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1864 (clone_one_breakpoint): Likewise.
1865 (delete_reinsert_breakpoints): Change parameter to thread.
1866 Callers updated.
1867 (has_reinsert_breakpoints): Likewise.
1868 (uninsert_reinsert_breakpoints): Likewise.
1869 (reinsert_reinsert_breakpoints): Likewise.
1870 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1871 (delete_reinsert_breakpoints): Likewise.
1872 (reinsert_reinsert_breakpoints): Likewise.
1873 (uninsert_reinsert_breakpoints): Likewise.
1874 (has_reinsert_breakpoints): Likewise.
1875
63c40ec7
YQ
18762016-07-21 Yao Qi <yao.qi@linaro.org>
1877
1878 * inferiors.c (get_thread_process): Make parameter const.
1879 * inferiors.h (get_thread_process): Update declaration.
1880 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1881 Add new parameters child_thread and parent_thread. Callers
1882 updated.
1883 * mem-break.h (clone_all_breakpoints): Update declaration.
1884
9aa76cd0
YQ
18852016-07-21 Yao Qi <yao.qi@linaro.org>
1886
1887 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1888 <command_list, handler>: Remove.
1889 (struct gdb_breakpoint): New.
1890 (struct other_breakpoint): New.
1891 (struct reinsert_breakpoint): New.
1892 (is_gdb_breakpoint): New function.
1893 (any_persistent_commands): Update command_list if
1894 is_gdb_breakpoint returns true.
1895 (set_breakpoint): Create breakpoints according to their types.
1896 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1897 (set_gdb_breakpoint_1): Likewise.
1898 (set_gdb_breakpoint): Likewise.
1899 (clear_breakpoint_conditions): Change parameter type to
1900 'struct gdb_breakpoint *'.
1901 (clear_breakpoint_commands): Likewise.
1902 (clear_breakpoint_conditions_and_commands): Likewise.
1903 (add_condition_to_breakpoint): Likewise.
1904 (add_breakpoint_condition): Likewise.
1905 (add_commands_to_breakpoint): Likewise.
1906 (check_breakpoints): Check other_breakpoint.
1907 (clone_one_breakpoint): Clone breakpopint according to its type.
1908 * mem-break.h (struct gdb_breakpoint): Declare.
1909 (set_gdb_breakpoint): Update declaration.
1910 (clear_breakpoint_conditions_and_commands): Likewise.
1911 (add_breakpoint_condition): Likewise.
1912 (add_breakpoint_commands): Likewise.
1913 * server.c (process_point_options): Change parameter type to
1914 'struct gdb_breakpoint *'.
1915
811f8301
YQ
19162016-07-21 Yao Qi <yao.qi@linaro.org>
1917
1918 * mem-break.c (set_breakpoint_at): Rename it to ...
1919 (set_breakpoint_type_at): ... it.
1920 (set_breakpoint_at): Call set_breakpoint_type_at.
1921 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1922 * mem-break.h (set_breakpoint_at): Update comments.
1923
b1c51e36
CLT
19242016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1925
1926 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1927 to buf parameter.
1928 (nios2_store_gregset): Likewise.
1929
ced2dffb
PA
19302016-07-01 Pedro Alves <palves@redhat.com>
1931 Antoine Tremblay <antoine.tremblay@ericsson.com>
1932
1933 * linux-low.c: Change interface to take the target lwp_info
1934 pointer directly and return void. Handle detaching from a zombie
1935 thread.
1936 (linux_detach_lwp_callback): New function.
1937 (linux_detach): Detach from the leader thread after detaching from
1938 the clone threads.
1939
2ac09a5b
YQ
19402016-06-28 Yao Qi <yao.qi@linaro.org>
1941
1942 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1943 for variable new_offset.
1944 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1945 (aarch64_ftrace_insn_reloc_cb): Likewise.
1946 (aarch64_ftrace_insn_reloc_tb): Likewise.
1947 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1948 PRIx64 instead of PRIx32.
1949
79e7fd4f
YQ
19502016-06-28 Yao Qi <yao.qi@linaro.org>
1951
1952 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1953 (the_low_target): Install arm_get_syscall_trapinfo.
1954
061fc021
YQ
19552016-06-28 Yao Qi <yao.qi@linaro.org>
1956
1957 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1958 function.
1959 (the_low_target): Install aarch64_get_syscall_trapinfo.
1960
4cc32bec
YQ
19612016-06-28 Yao Qi <yao.qi@linaro.org>
1962
1963 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1964 Callers updated.
1965 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1966 Remove parameter sysno.
1967 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1968 sysret.
1969
782c1122
AA
19702016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1971
1972 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1973 (s390_emit_ne_goto): Likewise.
1974 (s390_emit_lt_goto): Likewise.
1975 (s390_emit_le_goto): Likewise.
1976 (s390_emit_gt_goto): Likewise.
1977 (s390_emit_ge_goto): Likewise.
1978 (s390x_emit_eq_goto): Likewise.
1979 (s390x_emit_ne_goto): Likewise.
1980 (s390x_emit_lt_goto): Likewise.
1981 (s390x_emit_le_goto): Likewise.
1982 (s390x_emit_gt_goto): Likewise.
1983 (s390x_emit_ge_goto): Likewise.
1984 (s390_emit_ops_impl): Mark variable static.
1985 (s390x_emit_ops): Likewise.
1986
2e7b624b
YQ
19872016-06-17 Yao Qi <yao.qi@linaro.org>
1988
1989 * linux-low.c (handle_extended_wait): Call
1990 uninsert_reinsert_breakpoints for the parent process. Remove
1991 reinsert breakpoints from the child process. Reinsert them to
1992 the parent process when vfork is done.
1993 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1994 (reinsert_reinsert_breakpoints): New function.
1995 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1996 (reinsert_reinsert_breakpoints): Declare.
1997
8a81c5d7
YQ
19982016-06-17 Yao Qi <yao.qi@linaro.org>
1999
2000 * linux-low.c (handle_extended_wait): If the parent is doing
2001 step-over, remove the reinsert breakpoints from the forked child.
2002
f50bf8e5
YQ
20032016-06-17 Yao Qi <yao.qi@linaro.org>
2004
2005 * linux-low.c (unsuspend_all_lwps): Declare.
2006 (linux_low_filter_event): If thread exited, call finish_step_over.
2007 If step-over is finished, unsuspend other threads.
2008
8376a3cb
YQ
20092016-06-17 Yao Qi <yao.qi@linaro.org>
2010
2011 * linux-low.c (linux_resume_one_lwp_throw): Assert
2012 has_reinsert_breakpoints returns false.
2013 * mem-break.c (delete_disabled_breakpoints): Assert
2014 bp type isn't reinsert_breakpoint.
2015
f79b145d
YQ
20162016-06-17 Yao Qi <yao.qi@linaro.org>
2017
2018 * linux-low.c (maybe_hw_step): New function.
2019 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2020 (finish_step_over): Switch current_thread to lwp temporarily,
2021 and assert has_reinsert_breakpoints returns true.
2022 (proceed_one_lwp): Call maybe_hw_step.
2023 * mem-break.c (has_reinsert_breakpoints): New function.
2024 * mem-break.h (has_reinsert_breakpoints): Declare.
2025
0ae534d2
JT
20262016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2027
2028 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2029
fcdad592
YQ
20302016-05-17 Yao Qi <yao.qi@linaro.org>
2031
2032 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2033 instead of find_inferior.
2034
9e784964
YQ
20352016-05-05 Yao Qi <yao.qi@linaro.org>
2036
2037 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2038 Initialize res to zero.
2039
cf2ebb6e
YQ
20402016-05-05 Yao Qi <yao.qi@linaro.org>
2041
2042 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2043 to uint32_t.
2044
c1aebf87
UW
20452016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2046
2047 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2048 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2049 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2050
35fd2deb 20512016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2052 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2053
2054 * tracepoint.c (write_inferior_int8): New function.
2055 (cmd_qtenable_disable): Write enable flag using
2056 write_inferior_int8.
2057
484b3c32
YQ
20582016-04-25 Yao Qi <yao.qi@linaro.org>
2059
2060 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2061 (need_step_over_p): Return zero if the LWP has pending signals
2062 can be delivered on software single step target.
2063
85ba7d86
YQ
20642016-04-25 Yao Qi <yao.qi@linaro.org>
2065
2066 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2067 return instead of error.
2068
3539aa13
YQ
20692016-04-22 Yao Qi <yao.qi@linaro.org>
2070
2071 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2072 to 23.
2073
5b061e98
YQ
20742016-04-22 Yao Qi <yao.qi@linaro.org>
2075
2076 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2077 signal when stepping over breakpoint with software single
2078 step.
2079
3451269c
PA
20802016-04-21 Pedro Alves <palves@redhat.com>
2081
2082 * linux-s390-low.c (s390_collect_ptrace_register)
2083 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2084 add casts.
2085 (s390_check_regset): Use void * instead of gdb_byte *.
2086
a2358508
PA
20872016-04-20 Pedro Alves <palves@redhat.com>
2088
2089 * configure: Renegerate.
2090
6885166d
YQ
20912016-04-20 Yao Qi <yao.qi@linaro.org>
2092
2093 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2094 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2095 number 16.
2096 (arm_store_gregset): Likewise.
2097
2b863f51
WT
20982016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2099
2100 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2101 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2102 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2103 (amd64-avx-mpx-linux.c): New rules.
2104 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2105 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2106 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2107 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2108 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2109 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2110 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2111 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2112 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2113 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2114 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2115 * linux-x86-low.c (x86_linux_read_description): Add case for
2116 X86_XSTATE_AVX_MPX_MASK.
2117 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2118 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2119 init_registers_i386_avx_mpx_linux.
2120 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2121 (initialize_low_tracepoint): Call
2122 init_registers_i386_avx_mpx_linux.
2123 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2124 (initialize_low_tracepoint): Call
2125 init_registers_amd64_avx_mpx_linux.
2126 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2127 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2128 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2129 declarations.
2130
9b30624b
PA
21312016-04-18 Pedro Alves <palves@redhat.com>
2132
2133 * configure: Regenerate.
2134
45e3745e
AT
21352016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2136
2137 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2138 (aarch64_emit_sub): Likewise.
2139
2afc13ff
PA
21402016-04-12 Pedro Alves <palves@redhat.com>
2141
2142 * utils.c (prepare_to_throw_exception): Delete.
2143
6e774b13
SM
21442016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2145
2146 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2147
4dca19f8
MK
21482016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2149
2150 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2151
d0a9981f
MK
21522016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2153
2154 * linux-aarch64-ipa.c: Add <elf.h> include.
2155 * linux-ppc-ipa.c: Add <elf.h> include.
2156 * linux-s390-ipa.c: Add <elf.h> include.
2157
252db07e
MK
21582016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2159
2160 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2161 (get_raw_reg_ptr): Likewise.
2162 (get_trace_state_variable_value_ptr): Likewise.
2163 (set_trace_state_variable_value_ptr): Likewise.
2164 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2165 char *.
2166
14e2b6d9
MK
21672016-03-31 Wei-cheng Wang <cole945@gmail.com>
2168 Marcin Kościelnicki <koriakin@0x04.net>
2169
2170 PR/17221
2171 * linux-ppc-low.c (emit_insns): New function.
2172 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2173 (ppc_emit_prologue): New function.
2174 (ppc_emit_epilogue): New function.
2175 (ppc_emit_add): New function.
2176 (ppc_emit_sub): New function.
2177 (ppc_emit_mul): New function.
2178 (ppc_emit_lsh): New function.
2179 (ppc_emit_rsh_signed): New function.
2180 (ppc_emit_rsh_unsigned): New function.
2181 (ppc_emit_ext): New function.
2182 (ppc_emit_zero_ext): New function.
2183 (ppc_emit_log_not): New function.
2184 (ppc_emit_bit_and): New function.
2185 (ppc_emit_bit_or): New function.
2186 (ppc_emit_bit_xor): New function.
2187 (ppc_emit_bit_not): New function.
2188 (ppc_emit_equal): New function.
2189 (ppc_emit_less_signed): New function.
2190 (ppc_emit_less_unsigned): New function.
2191 (ppc_emit_ref): New function.
2192 (ppc_emit_const): New function.
2193 (ppc_emit_reg): New function.
2194 (ppc_emit_pop): New function.
2195 (ppc_emit_stack_flush): New function.
2196 (ppc_emit_swap): New function.
2197 (ppc_emit_stack_adjust): New function.
2198 (ppc_emit_call): New function.
2199 (ppc_emit_int_call_1): New function.
2200 (ppc_emit_void_call_2): New function.
2201 (ppc_emit_if_goto): New function.
2202 (ppc_emit_goto): New function.
2203 (ppc_emit_eq_goto): New function.
2204 (ppc_emit_ne_goto): New function.
2205 (ppc_emit_lt_goto): New function.
2206 (ppc_emit_le_goto): New function.
2207 (ppc_emit_gt_goto): New function.
2208 (ppc_emit_ge_goto): New function.
2209 (ppc_write_goto_address): New function.
2210 (ppc_emit_ops_impl): New static variable.
2211 (ppc64v1_emit_prologue): New function.
2212 (ppc64v2_emit_prologue): New function.
2213 (ppc64_emit_epilogue): New function.
2214 (ppc64_emit_add): New function.
2215 (ppc64_emit_sub): New function.
2216 (ppc64_emit_mul): New function.
2217 (ppc64_emit_lsh): New function.
2218 (ppc64_emit_rsh_signed): New function.
2219 (ppc64_emit_rsh_unsigned): New function.
2220 (ppc64_emit_ext): New function.
2221 (ppc64_emit_zero_ext): New function.
2222 (ppc64_emit_log_not): New function.
2223 (ppc64_emit_bit_and): New function.
2224 (ppc64_emit_bit_or): New function.
2225 (ppc64_emit_bit_xor): New function.
2226 (ppc64_emit_bit_not): New function.
2227 (ppc64_emit_equal): New function.
2228 (ppc64_emit_less_signed): New function.
2229 (ppc64_emit_less_unsigned): New function.
2230 (ppc64_emit_ref): New function.
2231 (ppc64_emit_const): New function.
2232 (ppc64v1_emit_reg): New function.
2233 (ppc64v2_emit_reg): New function.
2234 (ppc64_emit_pop): New function.
2235 (ppc64_emit_stack_flush): New function.
2236 (ppc64_emit_swap): New function.
2237 (ppc64v1_emit_call): New function.
2238 (ppc64v2_emit_call): New function.
2239 (ppc64v1_emit_int_call_1): New function.
2240 (ppc64v2_emit_int_call_1): New function.
2241 (ppc64v1_emit_void_call_2): New function.
2242 (ppc64v2_emit_void_call_2): New function.
2243 (ppc64_emit_if_goto): New function.
2244 (ppc64_emit_eq_goto): New function.
2245 (ppc64_emit_ne_goto): New function.
2246 (ppc64_emit_lt_goto): New function.
2247 (ppc64_emit_le_goto): New function.
2248 (ppc64_emit_gt_goto): New function.
2249 (ppc64_emit_ge_goto): New function.
2250 (ppc64v1_emit_ops_impl): New static variable.
2251 (ppc64v2_emit_ops_impl): New static variable.
2252 (ppc_emit_ops): New function.
2253 (linux_low_target): Wire in ppc_emit_ops.
2254
a2174ba4
MK
22552016-03-31 Wei-cheng Wang <cole945@gmail.com>
2256 Marcin Kościelnicki <koriakin@0x04.net>
2257
2258 PR/17221
2259 * Makefile.in: Add powerpc-*-ipa.o
2260 * configure.srv: Add ipa_obj for powerpc*-linux.
2261 * linux-ppc-ipa.c: New file.
2262 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2263 includes.
2264 (PPC_FIELD): New macro.
2265 (PPC_SEXT): New macro.
2266 (PPC_OP6): New macro.
2267 (PPC_BO): New macro.
2268 (PPC_LI): New macro.
2269 (PPC_BD): New macro.
2270 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2271 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2272 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2273 (ppc_get_thread_area): New function.
2274 (is_elfv2_inferior): New function.
2275 (gen_ds_form): New function.
2276 (GEN_STD): New macro.
2277 (GEN_STDU): New macro.
2278 (GEN_LD): New macro.
2279 (GEN_LDU): New macro.
2280 (gen_d_form): New function.
2281 (GEN_ADDI): New macro.
2282 (GEN_ADDIS): New macro.
2283 (GEN_LI): New macro.
2284 (GEN_LIS): New macro.
2285 (GEN_ORI): New macro.
2286 (GEN_ORIS): New macro.
2287 (GEN_LWZ): New macro.
2288 (GEN_STW): New macro.
2289 (GEN_STWU): New macro.
2290 (gen_xfx_form): New function.
2291 (GEN_MFSPR): New macro.
2292 (GEN_MTSPR): New macro.
2293 (GEN_MFCR): New macro.
2294 (GEN_MTCR): New macro.
2295 (GEN_SYNC): New macro.
2296 (GEN_LWSYNC): New macro.
2297 (gen_x_form): New function.
2298 (GEN_OR): New macro.
2299 (GEN_MR): New macro.
2300 (GEN_LWARX): New macro.
2301 (GEN_STWCX): New macro.
2302 (GEN_CMPW): New macro.
2303 (gen_md_form): New function.
2304 (GEN_RLDICL): New macro.
2305 (GEN_RLDICR): New macro.
2306 (gen_i_form): New function.
2307 (GEN_B): New macro.
2308 (GEN_BL): New macro.
2309 (gen_b_form): New function.
2310 (GEN_BNE): New macro.
2311 (GEN_LOAD): New macro.
2312 (GEN_STORE): New macro.
2313 (gen_limm): New function.
2314 (gen_atomic_xchg): New function.
2315 (gen_call): New function.
2316 (ppc_relocate_instruction): New function.
2317 (ppc_install_fast_tracepoint_jump_pad): New function.
2318 (ppc_get_min_fast_tracepoint_insn_len): New function.
2319 (ppc_get_ipa_tdesc_idx): New function.
2320 (the_low_target): Wire in the new functions.
2321 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2322 tdescs.
2323 * linux-ppc-tdesc.h: New file.
2324
a13c4696
MK
23252016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2326
2327 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2328 (alloc_jump_pad_buffer): New function.
2329 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2330 (alloc_jump_pad_buffer): New function.
2331 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2332 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2333 (alloc_jump_pad_buffer): New function.
2334 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2335 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2336 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2337 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2338
1cda1512
MK
23392016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2340
2341 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2342 * linux-amd64-ipa.c: Likewise.
2343 * linux-i386-ipa.c: Likewise.
2344 * linux-s390-ipa.c: Likewise.
2345 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2346 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2347 set_trace_state_variable_value_ptr.
2348 (struct ipa_sym_addresses): Likewise.
2349 (symbol_list): Likewise.
2350 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2351 accessing gdb_collect directly.
2352 (gdb_collect_ptr_type): New typedef.
2353 (get_raw_reg_ptr_type): New typedef.
2354 (get_trace_state_variable_value_ptr_type): New typedef.
2355 (set_trace_state_variable_value_ptr_type): New typedef.
2356 (gdb_collect_ptr): New global.
2357 (get_raw_reg_ptr): New global.
2358 (get_trace_state_variable_value_ptr): New global.
2359 (set_trace_state_variable_value_ptr): New global.
2360 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2361 accessing get_raw_reg directly.
2362 (get_get_tsv_func_addr): Likewise for
2363 get_trace_state_variable_value_ptr.
2364 (get_set_tsv_func_addr): Likewise for
2365 set_trace_state_variable_value_ptr.
2366 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2367
72fb5488
SM
23682016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2369
2370 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2371
28170b88
MK
23722016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2373
2374 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2375 packets.
2376 (relocate_instruction): Remove own_buf.
2377 * server.c (own_buf): Make global.
2378 (handle_v_requests): Make global.
2379 * server.h (own_buf): New declaration.
2380 (handle_v_requests): New prototype.
2381
f39e8743
MK
23822016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2383
2384 PR 18377
2385 * linux-s390-low.c (add_insns): New function.
2386 (s390_emit_prologue): New function.
2387 (s390_emit_epilogue): New function.
2388 (s390_emit_add): New function.
2389 (s390_emit_sub): New function.
2390 (s390_emit_mul): New function.
2391 (s390_emit_lsh): New function.
2392 (s390_emit_rsh_signed): New function.
2393 (s390_emit_rsh_unsigned): New function.
2394 (s390_emit_ext): New function.
2395 (s390_emit_log_not): New function.
2396 (s390_emit_bit_and): New function.
2397 (s390_emit_bit_or): New function.
2398 (s390_emit_bit_xor): New function.
2399 (s390_emit_bit_not): New function.
2400 (s390_emit_equal): New function.
2401 (s390_emit_less_signed): New function.
2402 (s390_emit_less_unsigned): New function.
2403 (s390_emit_ref): New function.
2404 (s390_emit_if_goto): New function.
2405 (s390_emit_goto): New function.
2406 (s390_write_goto_address): New function.
2407 (s390_emit_litpool): New function.
2408 (s390_emit_const): New function.
2409 (s390_emit_call): New function.
2410 (s390_emit_reg): New function.
2411 (s390_emit_pop): New function.
2412 (s390_emit_stack_flush): New function.
2413 (s390_emit_zero_ext): New function.
2414 (s390_emit_swap): New function.
2415 (s390_emit_stack_adjust): New function.
2416 (s390_emit_set_r2): New function.
2417 (s390_emit_int_call_1): New function.
2418 (s390_emit_void_call_2): New function.
2419 (s390_emit_eq_goto): New function.
2420 (s390_emit_ne_goto): New function.
2421 (s390_emit_lt_goto): New function.
2422 (s390_emit_le_goto): New function.
2423 (s390_emit_gt_goto): New function.
2424 (s390_emit_ge_goto): New function.
2425 (s390x_emit_prologue): New function.
2426 (s390x_emit_epilogue): New function.
2427 (s390x_emit_add): New function.
2428 (s390x_emit_sub): New function.
2429 (s390x_emit_mul): New function.
2430 (s390x_emit_lsh): New function.
2431 (s390x_emit_rsh_signed): New function.
2432 (s390x_emit_rsh_unsigned): New function.
2433 (s390x_emit_ext): New function.
2434 (s390x_emit_log_not): New function.
2435 (s390x_emit_bit_and): New function.
2436 (s390x_emit_bit_or): New function.
2437 (s390x_emit_bit_xor): New function.
2438 (s390x_emit_bit_not): New function.
2439 (s390x_emit_equal): New function.
2440 (s390x_emit_less_signed): New function.
2441 (s390x_emit_less_unsigned): New function.
2442 (s390x_emit_ref): New function.
2443 (s390x_emit_if_goto): New function.
2444 (s390x_emit_const): New function.
2445 (s390x_emit_call): New function.
2446 (s390x_emit_reg): New function.
2447 (s390x_emit_pop): New function.
2448 (s390x_emit_stack_flush): New function.
2449 (s390x_emit_zero_ext): New function.
2450 (s390x_emit_swap): New function.
2451 (s390x_emit_stack_adjust): New function.
2452 (s390x_emit_int_call_1): New function.
2453 (s390x_emit_void_call_2): New function.
2454 (s390x_emit_eq_goto): New function.
2455 (s390x_emit_ne_goto): New function.
2456 (s390x_emit_lt_goto): New function.
2457 (s390x_emit_le_goto): New function.
2458 (s390x_emit_gt_goto): New function.
2459 (s390x_emit_ge_goto): New function.
2460 (s390_emit_ops): New function.
2461 (struct linux_target_ops): Fill in emit_ops hook.
2462
abd9baf9
MK
24632016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2464
2465 PR 18377
2466 * Makefile.in: Add s390 IPA files.
2467 * configure.srv: Build IPA for s390.
2468 * linux-s390-ipa.c: New file.
2469 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2470 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2471 (tdesc_s390_linux32): Likewise.
2472 (init_registers_s390_linux32v1): Likewise.
2473 (tdesc_s390_linux32v1): Likewise.
2474 (init_registers_s390_linux32v2): Likewise.
2475 (tdesc_s390_linux32v2): Likewise.
2476 (init_registers_s390_linux64): Likewise.
2477 (tdesc_s390_linux64): Likewise.
2478 (init_registers_s390_linux64v1): Likewise.
2479 (tdesc_s390_linux64v1): Likewise.
2480 (init_registers_s390_linux64v2): Likewise.
2481 (tdesc_s390_linux64v2): Likewise.
2482 (init_registers_s390_te_linux64): Likewise.
2483 (tdesc_s390_te_linux64): Likewise.
2484 (init_registers_s390_vx_linux64): Likewise.
2485 (tdesc_s390_vx_linux64): Likewise.
2486 (init_registers_s390_tevx_linux64): Likewise.
2487 (tdesc_s390_tevx_linux64): Likewise.
2488 (init_registers_s390x_linux64): Likewise.
2489 (tdesc_s390x_linux64): Likewise.
2490 (init_registers_s390x_linux64v1): Likewise.
2491 (tdesc_s390x_linux64v1): Likewise.
2492 (init_registers_s390x_linux64v2): Likewise.
2493 (tdesc_s390x_linux64v2): Likewise.
2494 (init_registers_s390x_te_linux64): Likewise.
2495 (tdesc_s390x_te_linux64): Likewise.
2496 (init_registers_s390x_vx_linux64): Likewise.
2497 (tdesc_s390x_vx_linux64): Likewise.
2498 (init_registers_s390x_tevx_linux64): Likewise.
2499 (tdesc_s390x_tevx_linux64): Likewise.
2500 (have_hwcap_s390_vx): New static variable.
2501 (s390_arch_setup): Fill have_hwcap_s390_vx.
2502 (s390_get_thread_area): New function.
2503 (s390_ft_entry_gpr_esa): New const.
2504 (s390_ft_entry_gpr_zarch): New const.
2505 (s390_ft_entry_misc): New const.
2506 (s390_ft_entry_fr): New const.
2507 (s390_ft_entry_vr): New const.
2508 (s390_ft_main_31): New const.
2509 (s390_ft_main_64): New const.
2510 (s390_ft_exit_fr): New const.
2511 (s390_ft_exit_vr): New const.
2512 (s390_ft_exit_misc): New const.
2513 (s390_ft_exit_gpr_esa): New const.
2514 (s390_ft_exit_gpr_zarch): New const.
2515 (append_insns): New function.
2516 (s390_relocate_instruction): New function.
2517 (s390_install_fast_tracepoint_jump_pad): New function.
2518 (s390_get_min_fast_tracepoint_insn_len): New function.
2519 (s390_get_ipa_tdesc_idx): New function.
2520 (struct linux_target_ops): Wire in the above functions.
2521 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2522 * linux-s390-tdesc.h: New file.
2523
a4105d04
MK
25242016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2525
2526 * linux-s390-low.c (s390_supports_tracepoints): New function.
2527 (struct linux_target_ops): Fill supports_tracepoints hook.
2528
35ac8b3e
YQ
25292016-03-18 Yao Qi <yao.qi@linaro.org>
2530
2531 * linux-low.c (lwp_signal_can_be_delivered): New function.
2532 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2533
94610ec4
YQ
25342016-03-18 Yao Qi <yao.qi@linaro.org>
2535
2536 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2537 0 if signal is enqueued. Remove 'signal' from one debugging
2538 message. Move one debugging message to some lines below.
2539 Remove code setting 'signal' to 0.
2540
80aea927
YQ
25412016-03-18 Yao Qi <yao.qi@linaro.org>
2542
2543 * linux-low.c (linux_low_filter_event): Remove redundant
2544 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2545
b04fd3be
MK
25462016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2547
2548 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2549 (struct linux_target_ops): Wire in the above.
2550
c40c8d4b
YQ
25512016-03-03 Yao Qi <yao.qi@linaro.org>
2552
2553 * linux-low.c: Update comments to start_step_over.
2554
0f8288ae
YQ
25552016-03-03 Yao Qi <yao.qi@linaro.org>
2556
2557 PR server/19736
2558 * linux-low.c (handle_extended_wait): Set child suspended
2559 if event_lwp->bp_reinsert isn't zero.
2560
fdbd04a8
YQ
25612016-03-02 Yao Qi <yao.qi@linaro.org>
2562
2563 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2564 enqueue_pending_signal.
2565
6896a8fa
MK
25662016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2567
2568 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2569 is actually loaded.
2570
ab503087
MK
25712016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2572
2573 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2574 (s390_regmap_3264) [!__s390x__]: New global.
2575 (s390_collect_ptrace_register): Skip map entries containing -1.
2576 (s390_supply_ptrace_register): Ditto.
2577 (s390_fill_gprs_high): New function.
2578 (s390_store_gprs_high): New function.
2579 (s390_regsets): Add NT_S390_HIGH_GPRS.
2580 (s390_get_hwcap): Enable on 31-bit.
2581 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2582 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2583 Detect NT_S390_HIGH_GPRS.
2584 (s390_usrregs_info_3264): Enable on 31-bit.
2585 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2586 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2587
ae91f625
MK
25882016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2589
2590 PR gdb/13808
2591 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2592 * configure.srv: Ditto.
2593 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2594 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2595 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2596 (init_registers_amd64_linux): Remove prototype.
2597 (tdesc_amd64_linux): Remove declaration.
2598 (get_ipa_tdesc): New function.
2599 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2600 initialize remaining tdescs.
2601 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2602 (init_registers_i386_linux): Remove prototype.
2603 (tdesc_i386_linux): Remove declaration.
2604 (get_ipa_tdesc): New function.
2605 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2606 initialize remaining tdescs.
2607 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2608 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2609 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2610 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2611 (x86_get_ipa_tdesc_idx): New function.
2612 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2613 * linux-x86-tdesc.h: New file.
2614 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2615 (target_get_ipa_tdesc_idx): New macro.
2616 * tracepoint.c (ipa_tdesc_idx): New macro.
2617 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2618 (symbol_list): Add ipa_tdesc_idx.
2619 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2620 (ipa_tdesc): Remove.
2621 (ipa_tdesc_idx): New variable.
2622 (get_context_regcache): Use get_ipa_tdesc.
2623 (gdb_collect): Ditto.
2624 (gdb_probe): Ditto.
2625 * tracepoint.h (get_ipa_tdesc): New prototype.
2626 (ipa_tdesc): Remove.
2627
e7ad2f14
PA
26282016-02-24 Pedro Alves <palves@redhat.com>
2629
2630 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2631 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2632 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2633 Factor out common code between the USE_SIGTRAP_SIGINFO and
2634 !USE_SIGTRAP_SIGINFO blocks.
2635 (linux_low_filter_event): Call save_stop_reason instead of
2636 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2637 Update comments.
2638 (linux_wait_1): Update comments.
2639
657f9cde
WW
26402016-02-24 Wei-cheng Wang <cole945@gmail.com>
2641
2642 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2643 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2644 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2645 ppc_insert_point, ppc_remove_point.
2646
b00b61e1
MK
26472016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2648
2649 * linux-s390-low.c (s390_supports_z_point_type): New function.
2650 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2651
553cb527
YQ
26522016-02-16 Yao Qi <yao.qi@linaro.org>
2653
2654 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2655 PC. Get pc from regcache_read_pc.
2656
a5652c21
YQ
26572016-02-12 Yao Qi <yao.qi@linaro.org>
2658
2659 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2660 or linux_get_pc_32bit.
2661 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2662
ed443b61
YQ
26632016-02-12 Yao Qi <yao.qi@linaro.org>
2664
2665 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2666 arm_linux_get_next_pcs_fixup.
2667
020ecd38
MK
26682016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2669
2670 * tracepoint.c (x_tracepoint_action_download): Change
2671 write_inferior_data_ptr to write_inferior_data_pointer.
2672 (cmd_qtstart): Likewise.
2673 (write_inferior_data_ptr): Remove.
2674 (download_agent_expr): Change write_inferior_data_ptr to
2675 write_inferior_data_pointer.
2676 (download_tracepoint_1): Likewise.
2677 (download_tracepoint): Likewise.
2678 (download_trace_state_variables): Likewise.
2679
7cae9051
WW
26802016-02-11 Wei-cheng Wang <cole945@gmail.com>
2681 Marcin Kościelnicki <koriakin@0x04.net>
2682
2683 * tracepoint.c (struct tracepoint_action_ops): Remove.
2684 (struct tracepoint_action): Remove ops.
2685 (m_tracepoint_action_download, r_tracepoint_action_download)
2686 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2687 size and offset accordingly.
2688 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2689 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2690 (tracepoint_action_send, tracepoint_action_download): New functions.
2691 Helpers for trace action handlers.
2692 (add_tracepoint_action): Remove setup actions ops.
2693 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2694
9f6a71b4
YQ
26952016-02-10 Yao Qi <yao.qi@linaro.org>
2696
2697 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2698
1e94266c
SM
26992016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2700
2701 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2702 to AC_OUTPUT.
2703 * configure: Regenerate.
2704
8adce034
SM
27052016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2706
2707 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2708 void * to gdb_byte *.
2709 * linux-low.c (siginfo_fixup): Likewise.
2710 (linux_xfer_siginfo): Likewise.
2711 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2712 Likewise.
2713 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2714
93813b37
WT
27152016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2716
2717 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2718 to srv_tgtobj.
2719 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2720 to srv_tgtobj.
2721 * linux-x86-low.c [__x86_64__]: Include
2722 "nat/amd64-linux-siginfo.h".
2723 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2724 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2725 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2726 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2727 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2728 (cpt_si_fd, si_timerid, si_overrun): Move from
2729 nat/amd64-linux-siginfo.c.
2730 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2731
8424cc97
SM
27322016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2733
2734 * server.c (skip_to_semicolon): Remove.
2735 (process_point_options): Use strchrnul instead of
2736 skip_to_semicolon.
2737
4d18591b
YQ
27382016-01-26 Yao Qi <yao.qi@linaro.org>
2739
2740 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2741 * linux-low.c (install_software_single_step_breakpoints): Don't
2742 call regcache_read_pc.
2743 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2744 argument pc.
2745
d8020970
YQ
27462016-01-26 Yao Qi <yao.qi@linaro.org>
2747
2748 * linux-low.c (install_software_single_step_breakpoints): Call
2749 regcache_read_pc instead of get_pc.
2750
8b207339
YQ
27512016-01-26 Yao Qi <yao.qi@linaro.org>
2752
2753 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2754 (unblock_async_io): Rename to ...
2755 (block_unblock_async_io): ... it. New function.
2756 (enable_async_io): Don't install SIGIO handler. Unblock it
2757 instead.
2758 (disable_async_io): Don't ignore SIGIO. Block it instead.
2759 (initialize_async_io): Install SIGIO handler. Don't call
2760 unblock_async_io.
2761
18879fef
YQ
27622016-01-26 Yao Qi <yao.qi@linaro.org>
2763
2764 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2765 first character is '\003', call *the_target->request_interrupt.
2766
a0f8e08a
YQ
27672016-01-25 Yao Qi <yao.qi@linaro.org>
2768
2769 * remote-utils.c (new_thread_notify): Remove.
2770 (dead_thread_notify): Likewise.
2771 * remote-utils.h (new_thread_notify): Remove declaration.
2772 (dead_thread_notify): Likewise.
2773
cc5fd9ab
MK
27742016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2775
2776 * gdb.trace/pending.exp: Fix expected message on continue.
2777
99e8eb11
MK
27782016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2779
2780 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2781 it works properly on big-endian machines where sizeof (CORE_ADDR)
2782 != sizeof (void *).
2783
a994041d
PA
27842016-01-21 Pedro Alves <palves@redhat.com>
2785
2786 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2787 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2788 * configure: Regenerate.
2789
f7a6a40d
YQ
27902016-01-21 Yao Qi <yao.qi@linaro.org>
2791
2792 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2793 is_thumb and set it according to CPSR saved on the stack.
2794 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2795 arm_sigreturn_next_pc.
2796
6f69e520
YQ
27972016-01-18 Yao Qi <yao.qi@linaro.org>
2798
2799 * linux-low.c (linux_set_pc_64bit): New function.
2800 (linux_get_pc_64bit): New function.
2801 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2802 Declare.
2803 * linux-sparc-low.c (debug_threads): Remove declaration.
2804 (sparc_get_pc): Remove.
2805 (the_low_target): Use linux_get_pc_64bit instead of
2806 sparc_get_pc.
2807 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2808 (the_low_target): Use linux_get_pc_64bit and
2809 linux_set_pc_64bit.
2810
276d4552
YQ
28112016-01-18 Yao Qi <yao.qi@linaro.org>
2812
2813 * linux-arm-low.c (debug_threads): Remove declaration.
2814 (arm_get_pc, arm_set_pc): Remove.
2815 (the_low_target): Use linux_get_pc_32bit and
2816 linux_set_pc_32bit.
2817 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2818 (the_low_target): Use linux_get_pc_32bit and
2819 linux_set_pc_32bit.
2820 * linux-cris-low.c (debug_threads): Remove declaration.
2821 (cris_get_pc, cris_set_pc,): Remove.
2822 (the_low_target): Use linux_get_pc_32bit and
2823 linux_set_pc_32bit.
2824 * linux-crisv32-low.c (debug_threads): Remove declaration.
2825 (cris_get_pc, cris_set_pc): Remove.
2826 (the_low_target): Use linux_get_pc_32bit and
2827 linux_set_pc_32bit.
2828 * linux-low.c: Include inttypes.h.
2829 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2830 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2831 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2832 (the_low_target): Use linux_get_pc_32bit and
2833 linux_set_pc_32bit.
2834 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2835 (the_low_target): Use linux_get_pc_32bit and
2836 linux_set_pc_32bit.
2837 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2838 (the_low_target): Use linux_get_pc_32bit and
2839 linux_set_pc_32bit.
2840 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2841 (the_low_target): Use linux_get_pc_32bit and
2842 linux_set_pc_32bit.
2843 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2844 (the_low_target): Use linux_get_pc_32bit and
2845 linux_set_pc_32bit.
2846
eb0edac8
GB
28472016-01-18 Gary Benson <gbenson@redhat.com>
2848
2849 * configure.ac (AC_FUNC_FORK): New check.
2850 * config.in: Regenerate.
2851 * configure: Likewise.
2852
1b451dda
YQ
28532016-01-14 Yao Qi <yao.qi@linaro.org>
2854
2855 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2856 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2857 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2858 arm_get_next_pcs_ctor.
2859
82075af2
JS
28602016-01-12 Josh Stone <jistone@redhat.com>
2861 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2862
2863 * inferiors.h: Include "gdb_vecs.h".
2864 (struct process_info): Add syscalls_to_catch.
2865 * inferiors.c (remove_process): Free syscalls_to_catch.
2866 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2867 syscall_return stops.
2868 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2869 * server.c (handle_general_set): Handle QCatchSyscalls.
2870 (handle_query): Report support for QCatchSyscalls.
2871 * target.h (struct target_ops): Add supports_catch_syscall.
2872 (target_supports_catch_syscall): New macro.
2873 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2874 (struct lwp_info): Add syscall_state.
2875 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2876 Maintain syscall_state and syscalls_to_catch across exec.
2877 (get_syscall_trapinfo): New function, proxy to the_low_target.
2878 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2879 (linux_low_filter_event): Toggle syscall_state entry/return for
2880 syscall traps, and set it ignored for all others.
2881 (gdb_catching_syscalls_p): New function.
2882 (gdb_catch_this_syscall_p): New function.
2883 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2884 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2885 (linux_supports_catch_syscall): New function.
2886 (linux_target_ops): Install it.
2887 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2888 (the_low_target): Install it.
2889
8f13a3ce
MF
28902016-01-12 Mike Frysinger <vapier@gentoo.org>
2891
2892 * acinclude.m4: Include new ../warning.m4 file.
2893 * configure: Regenerated.
2894 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2895
5b3da067
MF
28962016-01-12 Mike Frysinger <vapier@gentoo.org>
2897
2898 * ax.c (is_goto_target): Mark static.
2899 * linux-low.c (register_addr): Likewise.
2900 (linux_fetch_registers, linux_store_registers): Likewise.
2901 * mem-break.c (any_persistent_commands): Fix old prototype.
2902 (add_commands_to_breakpoint): Mark static.
2903 * regcache.c (find_register_by_name): Delete unused func.
2904 * remote-utils.c (hex_or_minus_one): Mark static.
2905 * server.c (monitor_show_help): Mark static.
2906 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2907 handle_v_requests): Likewise.
2908
bc504a31
PA
29092016-01-12 Pedro Alves <palves@redhat.com>
2910
2911 Remove use of the registered trademark symbol throughout.
2912
5a0dd67a
YQ
29132016-01-08 Yao Qi <yao.qi@linaro.org>
2914
2915 * remote-utils.c (getpkt): If c is '\003', call target hook
2916 request_interrupt.
2917
b2ca446f
YQ
29182016-01-06 Yao Qi <yao.qi@linaro.org>
2919
2920 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2921 linux-aarch32-low.c.
2922 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2923 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2924 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2925 (thumb2_breakpoint): Declare.
2926 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2927 linux-aarch32-low.h.
2928 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2929 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2930 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2931
edd88788
JB
29322016-01-01 Joel Brobecker <brobecker@adacore.com>
2933
2934 * gdbreplay.c (gdbreplay_version): Change copyright year in
2935 version message.
2936 * server.c (gdbserver_version): Likewise.
2937
65da7f14
PP
29382015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2939
2940 * server.c (crc32_table): Delete.
2941 (crc32): Use libiberty's xcrc32 function.
2942
4abd5ed2
JB
29432015-12-22 Joel Brobecker <brobecker@adacore.com>
2944
2945 * lynx-low.c (lynx_delete_thread_callback): New function.
2946 (lynx_mourn): Properly delete our process and all of its
2947 threads. Remove call to clear_inferiors.
2948
0e50fe5c
JB
29492015-12-22 Joel Brobecker <brobecker@adacore.com>
2950
2951 * target.c (thread_search_callback): Add check that
2952 the thread_stopped target callback is not NULL before
2953 calling it.
2954
35adc03f
YQ
29552015-12-21 Yao Qi <yao.qi@linaro.org>
2956
2957 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2958 arm breakpoint.
2959
bd2b2909
AT
29602015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2961
2962 * server.c (handle_query): Call target_supports_software_single_step.
2963
7fe5e27e
AT
29642015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2965
2966 * linux-low.c (single_step): New function.
2967 (linux_resume_one_lwp_throw): Call single_step.
2968 (start_step_over): Likewise.
2969
d9311bfa
AT
29702015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2971
2972 * Makefile.in (SFILES): Append arch/arm-linux.c,
2973 arch/arm-get-next-pcs.c.
2974 (arm-linux.o): New rule.
2975 (arm-get-next-pcs.o): New rule.
2976 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2977 arm-linux.o.
2978 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2979 to linux-aarch32-low.c.
2980 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2981 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2982 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2983 (thumb2_breakpoint_len): Likewise.
2984 (arm_is_thumb_mode): Make non-static.
2985 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2986 from linux-aarch32-low.c.
2987 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2988 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2989 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2990 (thumb2_breakpoint_len): Likewise.
2991 (arm_is_thumb_mode): New declaration.
2992 * linux-arm-low.c: Include arch/arm-linux.h
2993 aarch/arm-get-next-pcs.h, sys/syscall.h.
2994 (get_next_pcs_ops): New struct.
2995 (get_next_pcs_addr_bits_remove): New function.
2996 (get_next_pcs_is_thumb): New function.
2997 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2998 (arm_sigreturn_next_pc): Likewise.
2999 (get_next_pcs_syscall_next_pc): Likewise.
3000 (arm_gdbserver_get_next_pcs): Likewise.
3001 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3002 Initialize.
3003 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3004 * server.h: Include gdb_vecs.h.
3005
68ce2059
AT
30062015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3007
3008 * Makefile.in (SFILES): Append common/common-regcache.c.
3009 (OBS): Append common-regcache.o.
3010 (common-regcache.o): New rule.
3011 * regcache.c (init_register_cache): Initialize cache to
3012 REG_UNAVAILABLE.
3013 (regcache_raw_read_unsigned): New function.
3014 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3015 register_status enum.
3016
fa5308bd
AT
30172015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3018
3019 * linux-aarch64-low.c (the_low_targets): Rename
3020 breakpoint_reinsert_addr to get_next_pcs.
3021 * linux-arm-low.c (the_low_targets): Likewise.
3022 * linux-bfin-low.c (the_low_targets): Likewise.
3023 * linux-cris-low.c (the_low_targets): Likewise.
3024 * linux-crisv32-low.c (the_low_targets): Likewise.
3025 * linux-low.c (can_software_single_step): Likewise.
3026 (install_software_single_step_breakpoints): New function.
3027 (start_step_over): Use install_software_single_step_breakpoints.
3028 * linux-low.h: New CORE_ADDR vector.
3029 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3030 get_next_pcs.
3031 * linux-mips-low.c (the_low_targets): Likewise.
3032 * linux-nios2-low.c (the_low_targets): Likewise.
3033 * linux-sparc-low.c (the_low_targets): Likewise.
3034
4a6ed09b
PA
30352015-12-17 Pedro Alves <palves@redhat.com>
3036
3037 * linux-low.c (linux_kill_one_lwp): Remove references to
3038 LinuxThreads.
3039 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3040 to 'kill'.
3041 (linux_init_signals): Delete.
3042 (initialize_low): Adjust.
3043 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3044
7544db95
PA
30452015-12-16 Pedro Alves <palves@redhat.com>
3046
3047 * configure.ac (compiler warning flags): When testing a
3048 -Wno-foo option, check whether -Wfoo works instead.
3049 * configure: Regenerate.
3050
8020350c
DB
30512015-12-11 Don Breazeal <donb@codesourcery.com>
3052
3053 * server.c (process_serial_event): Don't exit from gdbserver
3054 in remote mode if there are still active inferiors.
3055
db91f502
YQ
30562015-12-11 Yao Qi <yao.qi@linaro.org>
3057
3058 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3059 arm_breakpoint_at if the process is 32-bit.
3060
b37a6290
YQ
30612015-12-11 Yao Qi <yao.qi@linaro.org>
3062
3063 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3064 arm breakpoint.
3065
17b1509a
YQ
30662015-12-07 Yao Qi <yao.qi@linaro.org>
3067
3068 * configure.srv: Append arm.o to srv_tgtobj for
3069 aarch64*-*-linux* target.
3070 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3071 from linux-arm-low.c.
3072 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3073 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3074 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3075 (thumb2_breakpoint_len): Likewise.
3076 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3077 (arm_breakpoint_kinds): Likewise.
3078 (arm_breakpoint_kind_from_pc): Likewise.
3079 (arm_sw_breakpoint_from_kind): Likewise.
3080 (arm_breakpoint_kind_from_current_state): Likewise.
3081 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3082 (arm_sw_breakpoint_from_kind): Declare.
3083 (arm_breakpoint_kind_from_current_state): Declare.
3084 (arm_breakpoint_at): Declare.
3085 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3086 arm_sw_breakpoint_from_kind if process is 32-bit.
3087 (aarch64_breakpoint_kind_from_pc): New function.
3088 (aarch64_breakpoint_kind_from_current_state): New function.
3089 (the_low_target): Initialize fields breakpoint_kind_from_pc
3090 and breakpoint_kind_from_current_state.
3091 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3092 linux-aarch32-low.c.
3093 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3094 (arm_breakpoint, arm_breakpoint_len): Likewise.
3095 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3096 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3097 (arm_is_thumb_mode): Likewise.
3098 (arm_breakpoint_at): Likewise.
3099 (arm_breakpoint_kind_from_pc): Likewise.
3100 (arm_sw_breakpoint_from_kind): Likewise.
3101 (arm_breakpoint_kind_from_current_state): Likewise.
3102
3103 Revert:
3104 2015-08-04 Yao Qi <yao.qi@linaro.org>
3105
3106 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3107 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3108 * server.c (extended_protocol): Remove "static".
3109 * server.h (extended_protocol): Declare it.
3110
ece66d65
JS
31112015-12-04 Josh Stone <jistone@redhat.com>
3112
3113 * target.h (struct target_ops) <arch_setup>: Rename to ...
3114 (struct target_ops) <post_create_inferior>: ... this.
3115 (target_arch_setup): Rename to ...
3116 (target_post_create_inferior): ... this, calling post_create_inferior.
3117 * server.c (start_inferior): Update target_arch_setup calls to
3118 target_post_create_inferior.
3119 * linux-low.c (linux_low_ptrace_options): Forward declare.
3120 (linux_arch_setup): Update its comment for general use.
3121 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3122 (struct linux_target_ops): Use linux_post_create_inferior.
3123 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3124 to post_create_inferior.
3125 * nto-low.c (struct nto_target_ops): Likewise.
3126 * spu-low.c (struct spu_target_ops): Likewise.
3127 * win32-low.c (struct win32_target_ops): Likewise.
3128
e58c48b4
AT
31292015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3130
3131 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3132
fbec8956
AT
31332015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3134
3135 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3136 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3137 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3138 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3139 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3140 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3141 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3142 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3143 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3144 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3145 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3146 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3147
9b4c5f87
AT
31482015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3149
3150 * linux-low.c (linux_look_up_symbols): Don't call
3151 linux_supports_traceclone.
3152 * linux-low.h (thread_db_init): Remove use_events argument.
3153 * thread-db.c (thread_db_use_event): Remove global variable.
3154 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3155 (struct thread_db) <td_create_bp>: Remove field.
3156 (thread_db_create_event): Remove function.
3157 (thread_db_enable_reporting): Likewise.
3158 (find_one_thread): Don't check for thread_db_use_events.
3159 (attach_thread): Likewise.
3160 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3161 (try_thread_db_load_1): Don't check for thread_db_use_events.
3162 (thread_db_init): Remove use_events argument and thread events
3163 handling.
3164 (remove_thread_event_breakpoints): Remove function.
3165 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3166
7d00775e
AT
31672015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3168
3169 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3170 New function.
3171 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3172 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3173 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3174 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3175 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3176 Initialize.
3177 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3178 New function.
3179 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3180 * linux-low.c (can_hardware_single_step): Use
3181 supports_hardware_single_step.
3182 (can_software_single_step): New function.
3183 (start_step_over): Call can_software_single_step.
3184 (linux_supports_hardware_single_step): New function.
3185 (struct target_ops) <supports_software_single_step>: Initialize.
3186 * linux-low.h (struct linux_target_ops)
3187 <supports_hardware_single_step>: Initialize.
3188 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3189 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3190 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3191 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3192 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3193 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3194 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3195 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3196 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3197 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3198 Initialize.
3199 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3200 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3201 Initialize.
3202 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3203 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3204 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3205 New function.
3206 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3207 * target.h (struct target_ops): <supports_software_single_step>:
3208 New field.
3209 (target_supports_software_single_step): New macro.
3210
2d97cd35
AT
32112015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3212
3213 * linux-low.c (linux_wait_1): Fix pc advance condition.
3214 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3215 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3216
769ef81f
AT
32172015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3218
3219 * linux-arm-low.c (arm_is_thumb_mode): New function.
3220 (arm_breakpoint_at): Use arm_is_thumb_mode.
3221 (arm_breakpoint_kind_from_current_state): New function.
3222 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3223 Initialize.
3224 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3225 (linux_breakpoint_kind_from_current_state): New function.
3226 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3227 * linux-low.h (struct linux_target_ops)
3228 <breakpoint_kind_from_current_state>: New field.
3229 * target.h (struct target_ops): Likewise.
3230 (target_breakpoint_kind_from_current_state): New macro.
3231
1bebeeca
PA
32322015-11-30 Pedro Alves <palves@redhat.com>
3233
3234 * linux-low.c (linux_resume): Wake up the event loop before
3235 returning.
3236
a67a9fae
PA
32372015-11-30 Pedro Alves <palves@redhat.com>
3238
3239 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3240 check.
3241 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3242 to -1.
3243 * target.c (struct thread_search): New structure.
3244 (thread_search_callback): New function.
3245 (prev_general_thread): New global.
3246 (prepare_to_access_memory, done_accessing_memory): New functions.
3247 * target.h (prepare_to_access_memory, done_accessing_memory):
3248 Replace macros with function declarations.
3249
f2faf941
PA
32502015-11-30 Pedro Alves <palves@redhat.com>
3251
3252 PR 14618
3253 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3254 report TARGET_WAITKIND_NO_RESUMED.
3255 * remote-utils.c (prepare_resume_reply): Handle
3256 TARGET_WAITKIND_NO_RESUMED.
3257 * server.c (report_no_resumed): New global.
3258 (handle_query) <qSupported>: Handle "no-resumed+". Report
3259 "no-resumed+" support.
3260 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3261 return error if the client doesn't support no-resumed events.
3262 (push_stop_notification): New function.
3263 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3264 events if the client supports them.
3265
a681f9c9
PA
32662015-11-30 Pedro Alves <palves@redhat.com>
3267
3268 * linux-low.c (thread_still_has_status_pending_p): Don't check
3269 vCont;t here.
3270 (lwp_resumed): New function.
3271 (status_pending_p_callback): Return early if the LWP is not
3272 supposed to be resumed.
3273
65706a29
PA
32742015-11-30 Pedro Alves <palves@redhat.com>
3275
3276 * linux-low.c (handle_extended_wait): Assert that the LWP's
3277 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3278 thread create events, leave the new child's status pending.
3279 (linux_low_filter_event): If GDB wants to hear about thread exit
3280 events, leave the LWP marked dead and don't delete it.
3281 (linux_wait_for_event_filtered): Don't check for thread exit.
3282 (filter_exit_event): New function.
3283 (linux_wait_1): Use it, when returning an exit event.
3284 (linux_resume_one_lwp_throw): Assert that the LWP's
3285 waitstatus is TARGET_WAITKIND_IGNORE.
3286 * remote-utils.c (prepare_resume_reply): Handle
3287 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3288 * server.c (report_thread_events): New global.
3289 (handle_general_set): Handle QThreadEvents.
3290 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3291 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3292 TARGET_WAITKIND_THREAD_EXITED.
3293 * server.h (report_thread_events): Declare.
3294
56cf4bed
PA
32952015-11-30 Pedro Alves <palves@redhat.com>
3296
3297 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3298 the thread's last_resume_kind was resume_stop.
3299
500c1d85
PA
33002015-11-30 Pedro Alves <palves@redhat.com>
3301
3302 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3303 before returning.
3304
de979965
PA
33052015-11-30 Pedro Alves <palves@redhat.com>
3306
3307 * server.c (handle_v_requests): Handle vCtrlC.
3308
34c65914
PA
33092015-11-30 Pedro Alves <palves@redhat.com>
3310
3311 * gdbthread.h (find_any_thread_of_pid): Declare.
3312 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3313 functions.
3314 * server.c (handle_query): If current_thread is NULL, look for
3315 another thread of the selected process.
3316
79efa585 33172015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3318 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3319
3320 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3321 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3322 name in reply.
3323 * target.h (struct target_ops) <thread_name>: New field.
3324 (target_thread_name): New macro.
3325
80d82c19
JB
33262015-11-23 Joel Brobecker <brobecker@adacore.com>
3327
3328 * regcache.h (regcache_invalidate_pid): Add declaration.
3329 * regcache.c (regcache_invalidate_pid): New function, extracted
3330 from regcache_invalidate.
3331 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3332 Add trivial documentation comment.
3333 * lynx-low.c: Use regcache_invalidate_pid instead of
3334 regcache_invalidate.
3335
64da5dd5
JB
33362015-11-23 Joel Brobecker <brobecker@adacore.com>
3337
3338 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3339 and Elf64_auxv_t if the target is Android.
3340
37ce4055
DE
33412015-11-22 Doug Evans <xdje42@gmail.com>
3342
3343 * target.h: #include <sys/types.h>.
3344
06e03fff
PA
33452015-11-19 Pedro Alves <palves@redhat.com>
3346
3347 * linux-low.c (linux_process_qsupported): Change prototype.
3348 Adjust.
3349 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3350 Change prototype.
3351 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3352 and adjust to loop over all features.
3353 * server.c (handle_query) <qSupported>: Adjust to call
3354 target_process_qsupported once, passing it a vector of unprocessed
3355 features.
3356 * target.h (struct target_ops) <process_qsupported>: Change
3357 prototype.
3358 (target_process_qsupported): Adjust.
3359
9a084706
PA
33602015-11-19 Pedro Alves <palves@redhat.com>
3361
3362 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3363 mode.
3364 * configure: Regenerate.
3365
dad44a1f
PA
33662015-11-19 Pedro Alves <palves@redhat.com>
3367
3368 * configure: Regenerate.
3369
231c0592
YQ
33702015-11-19 Yao Qi <yao.qi@linaro.org>
3371
3372 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3373 type to uint32_t.
3374
6c1c9a8b
YQ
33752015-11-19 Yao Qi <yao.qi@linaro.org>
3376
3377 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3378 (struct aarch64_operand): Move enum out.
3379
9caa3311
YQ
33802015-11-19 Yao Qi <yao.qi@linaro.org>
3381
3382 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3383 struct user_fpsimd_state *.
3384 (aarch64_store_fpregset): Likewise.
3385
6a69a054
YQ
33862015-11-19 Yao Qi <yao.qi@linaro.org>
3387
3388 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3389 struct user_pt_regs *.
3390 (aarch64_store_gregset): Likewise.
3391
1798301e
PA
33922015-11-18 Pedro Alves <palves@redhat.com>
3393
3394 * Makefile.in (all_object_files): Add $IPA_OBJS.
3395
ce7715e2
PA
33962015-11-17 Pedro Alves <palves@redhat.com>
3397
3398 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3399 GDB_SIGNAL_0 and gdb_signal_to_string.
3400
c0879059
PA
34012015-11-17 Pedro Alves <palves@redhat.com>
3402
3403 * win32-low.c (handle_output_debug_string): Remove parameter.
3404 (win32_kill): Remove our_status local and adjust call to
3405 handle_output_debug_string.
3406 (get_child_debug_event): Adjust call to
3407 handle_output_debug_string.
3408
1996e237
SM
34092015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3410
3411 * linux-mips-low.c (mips_fill_gregset): Add cast.
3412 (mips_store_gregset): Likewise.
3413 (mips_fill_fpregset): Likewise.
3414 (mips_store_fpregset): Likewise.
3415
cbec665b
SM
34162015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3417
3418 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3419 priv.
3420
eb3e3c67
SM
34212015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3422
3423 * linux-mips-low.c (mips_linux_new_thread): Change type of
3424 watch_type to enum target_hw_bp_type.
3425
171de4b8
SM
34262015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3427
3428 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3429 Change return type to arm_hwbp_type.
3430
04248ead
SM
34312015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3432
3433 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3434 (arm_store_gregset): Likewise.
3435 * linux-arm-low.c (arm_get_hwcap): Likewise.
3436 (arm_read_description): Likewise.
3437
04b3479c
SM
34382015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3439
3440 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3441
2bc84e8a
SM
34422015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3443
3444 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3445 (ppc_fill_vsxregset): Likewise.
3446 (ppc_store_vsxregset): Likewise.
3447 (ppc_fill_vrregset): Likewise.
3448 (ppc_store_vrregset): Likewise.
3449 (ppc_fill_evrregset): Likewise.
3450 (ppc_store_evrregset): Likewise.
3451
e6c5bb05
SM
34522015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3453
3454 * linux-ppc-low.c (ppc_usrregs_info): Remove
3455 forward-declaration.
3456 (ppc_arch_setup): Move lower in file.
3457
7ea45d72
SM
34582015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3459
3460 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3461 (ps_pdwrite): Likewise.
3462
69291610
HW
34632015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3464
3465 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3466 to after assert checks.
3467
b42945fd
SM
34682015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3469
3470 * proc-service.c (ps_pdread): Add/adjust casts.
3471 (ps_pdwrite): Add/adjust casts.
3472
d6f85c84
SM
34732015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3474
3475 * server.c (handle_search_memory_1): Cast return value of
3476 memmem.
3477
f98cd059
SM
34782015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3479
3480 * server.c (write_qxfer_response): Change type of data to
3481 gdb_byte *.
3482
d2412fa5
PA
34832015-10-29 Pedro Alves <palves@redhat.com>
3484
3485 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3486
c17414a2
PA
34872015-10-29 Pedro Alves <palves@redhat.com>
3488
3489 * tracepoint.c (clear_installed_tracepoints): Add casts.
3490
e053fbc4
PA
34912015-10-29 Pedro Alves <palves@redhat.com>
3492
3493 * server.c (handle_v_cont, process_serial_event): Add enum
3494 gdb_signal casts to signal parsing code.
3495
add67df8
PA
34962015-10-29 Pedro Alves <palves@redhat.com>
3497
3498 * linux-low.h (NULL_REGSET): Define.
3499 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3500 * linux-arm-low.c (arm_regsets): Likewise.
3501 * linux-crisv32-low.c (cris_regsets): Likewise.
3502 * linux-m68k-low.c (m68k_regsets): Likewise.
3503 * linux-mips-low.c (mips_regsets): Likewise.
3504 * linux-nios2-low.c (nios2_regsets): Likewise.
3505 * linux-ppc-low.c (ppc_regsets): Likewise.
3506 * linux-s390-low.c (s390_regsets): Likewise.
3507 * linux-sh-low.c (sh_regsets): Likewise.
3508 * linux-sparc-low.c (sparc_regsets): Likewise.
3509 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3510 * linux-tile-low.c (tile_regsets): Likewise.
3511 * linux-x86-low.c (x86_regsets): Likewise.
3512 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3513
50bc912a
PA
35142015-10-29 Pedro Alves <palves@redhat.com>
3515
3516 * linux-low.h (NULL_REGSET): Define.
3517 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3518 * linux-arm-low.c (arm_regsets): Likewise.
3519 * linux-crisv32-low.c (cris_regsets): Likewise.
3520 * linux-m68k-low.c (m68k_regsets): Likewise.
3521 * linux-mips-low.c (mips_regsets): Likewise.
3522 * linux-nios2-low.c (nios2_regsets): Likewise.
3523 * linux-ppc-low.c (ppc_regsets): Likewise.
3524 * linux-s390-low.c (s390_regsets): Likewise.
3525 * linux-sh-low.c (sh_regsets): Likewise.
3526 * linux-sparc-low.c (sparc_regsets): Likewise.
3527 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3528 * linux-tile-low.c (tile_regsets): Likewise.
3529 * linux-x86-low.c (x86_regsets): Likewise.
3530 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3531
682b2546
DE
35322015-10-26 Doug Evans <dje@google.com>
3533
3534 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3535
963843d4
DE
35362015-10-26 Doug Evans <dje@google.com>
3537
3538 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3539
d41401ac
DE
35402015-10-26 Doug Evans <dje@google.com>
3541
3542 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3543 for debug_printf.
3544 (attach_thread, find_new_threads_callback): Ditto.
3545
3db28855
AT
35462015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3547
3548 * mem-break.h (set_breakpoint_data): Remove.
3549
fb78e89c
AT
35502015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3551
3552 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3553 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3554 (initialize_low): Remove set_breakpoint_data call.
3555 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3556 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3557 (initialize_low): Remove set_breakpoint_data call.
3558 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3559 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3560 (initialize_low): Remove set_breakpoint_data call.
3561
2e6ee069
AT
35622015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3563
3564 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3565 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3566 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3567 * target.h (target_breakpoint_kind_from_pc): New macro.
3568
1652a986
AT
35692015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3570
3571 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3572 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3573 the default breakpoint kind.
3574
abeead09
AT
35752015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3576
3577 * linux-arm-low.c (arm_supports_z_point_type): Add software
3578 breakpoint support.
3579
b0b4b501
AT
35802015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3581
3582 * linux-arm-low.c: Refactor breakpoint definitions.
3583 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3584 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3585
8689682c
AT
35862015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3587
3588 * Makefile.in: Add arm.c/o.
3589 * configure.srv: Likewise.
3590 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3591 (arm_breakpoint_kind_from_pc): New function.
3592 (arm_sw_breakpoint_from_kind): Return proper kind.
3593 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3594
27165294
AT
35952015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3596
3597 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3598 removal.
3599 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3600 (struct raw_breakpoint) <size>: Remove.
3601 (struct raw_breakpoint) <kind>: Add.
3602 (bp_size): New function.
3603 (bp_opcode): Likewise.
3604 (find_raw_breakpoint_at): Adjust for kind.
3605 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3606 (remove_memory_breakpoint): Adjust for kind call bp_size.
3607 (set_raw_breakpoint_at): Adjust for kind.
3608 (set_breakpoint): Likewise.
3609 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3610 (delete_raw_breakpoint): Adjust for kind.
3611 (delete_breakpoint): Likewise.
3612 (find_gdb_breakpoint): Likewise.
3613 (set_gdb_breakpoint_1): Likewise.
3614 (set_gdb_breakpoint): Likewise.
3615 (delete_gdb_breakpoint_1): Likewise.
3616 (delete_gdb_breakpoint): Likewise.
3617 (uninsert_raw_breakpoint): Likewise.
3618 (reinsert_raw_breakpoint): Likewise.
3619 (set_breakpoint_data): Remove.
3620 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3621 (check_mem_read): Adjust for kind call bp_size.
3622 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3623 (clone_one_breakpoint): Adjust for kind.
3624 * mem-break.h (set_gdb_breakpoint): Likewise.
3625 (delete_gdb_breakpoint): Likewise.
3626 * server.c (process_serial_event): Likewise.
3627
dd373349
AT
36282015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3629
3630 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3631 (struct linux_target_ops) <breakpoint>: Remove.
3632 (struct linux_target_ops) <breakpoint_len>: Remove.
3633 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3634 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3635 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3636 (arm_sw_breakpoint_from_kind): New function.
3637 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3638 (struct linux_target_ops) <breakpoint>: Remove.
3639 (struct linux_target_ops) <breakpoint_len>: Remove.
3640 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3641 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3642 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3643 (struct linux_target_ops) <breakpoint>: Remove.
3644 (struct linux_target_ops) <breakpoint_len>: Remove.
3645 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3646 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3647 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3648 (struct linux_target_ops) <breakpoint>: Remove.
3649 (struct linux_target_ops) <breakpoint_len>: Remove.
3650 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3651 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3652 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3653 and sw_breakpoint_from_kind to increment the pc.
3654 (linux_breakpoint_kind_from_pc): New function.
3655 (linux_sw_breakpoint_from_kind): New function.
3656 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3657 (initialize_low): Call breakpoint_kind_from_pc and
3658 sw_breakpoint_from_kind to replace breakpoint_data/len.
3659 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3660 New field.
3661 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3662 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3673 (struct linux_target_ops) <breakpoint>: Remove.
3674 (struct linux_target_ops) <breakpoint_len>: Remove.
3675 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3676 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3677 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3678 (struct linux_target_ops) <breakpoint>: Remove.
3679 (struct linux_target_ops) <breakpoint_len>: Remove.
3680 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3681 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3682 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3683 (struct linux_target_ops) <breakpoint>: Remove.
3684 (struct linux_target_ops) <breakpoint_len>: Remove.
3685 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3686 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3687 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3688 (struct linux_target_ops) <breakpoint>: Remove.
3689 (struct linux_target_ops) <breakpoint_len>: Remove.
3690 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3691 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3692 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3693 (struct linux_target_ops) <breakpoint>: Remove.
3694 (struct linux_target_ops) <breakpoint_len>: Remove.
3695 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3696 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3697 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3698 (struct linux_target_ops) <breakpoint>: Remove.
3699 (struct linux_target_ops) <breakpoint_len>: Remove.
3700 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3701 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3702 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3703 (struct linux_target_ops) <breakpoint>: Remove.
3704 (struct linux_target_ops) <breakpoint_len>: Remove.
3705 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3706 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3707 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3708 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3709 (struct linux_target_ops) <breakpoint>: Remove.
3710 (struct linux_target_ops) <breakpoint_len>: Remove.
3711 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3712 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3713 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3714 (struct linux_target_ops) <breakpoint>: Remove.
3715 (struct linux_target_ops) <breakpoint_len>: Remove.
3716 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3717 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3718
4cd98a19
AT
37192015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3720
3721 * linux-cris-low.c (cris_get_pc): Remove void arg.
3722
774ee6d2
AR
37232015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3724
3725 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3726 variable name.
3727
833dcd29
AR
37282015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3729
3730 * inferiors.c (thread_pid_matches_callback): New function.
3731 (find_thread_process): New function.
3732 (remove_thread): Reset current_thread.
3733 (remove_process): Assert threads have been removed first.
3734
8d689ee5
YQ
37352015-10-15 Yao Qi <yao.qi@linaro.org>
3736
3737 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3738 if it is 3.
3739 (aarch64_remove_point): Likewise.
3740 * regcache.c (regcache_register_size): New function.
3741
1c2e1515
YQ
37422015-10-12 Yao Qi <yao.qi@linaro.org>
3743
3744 * linux-aarch64-low.c: Update all callers as emit_load_store
3745 is renamed to aarch64_emit_load_store.
3746
e1c587c3
YQ
37472015-10-12 Yao Qi <yao.qi@linaro.org>
3748
3749 * linux-aarch64-low.c: Update all callers of function renaming
3750 from emit_insn to aarch64_emit_insn.
3751
b6542f81
YQ
37522015-10-12 Yao Qi <yao.qi@linaro.org>
3753
3754 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3755 arch/aarch64-insn.h.
3756 (struct aarch64_memory_operand): Likewise.
3757 (ENCODE): Likewise.
3758 (emit_insn): Move to arch/aarch64-insn.c.
3759 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3760 (emit_load_store): Move to arch/aarch64-insn.c.
3761 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3762 (can_encode_int32): Remove.
3763
246994ce
YQ
37642015-10-12 Yao Qi <yao.qi@linaro.org>
3765
3766 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3767 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3768 (aarch64_relocate_instruction): Likewise.
3769 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3770 (struct aarch64_insn_visitor): Likewise.
3771
0badd99f
YQ
37722015-10-12 Yao Qi <yao.qi@linaro.org>
3773
3774 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3775 (struct aarch64_insn_visitor): New.
3776 (struct aarch64_insn_relocation_data): New.
3777 (aarch64_ftrace_insn_reloc_b): New function.
3778 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3779 (aarch64_ftrace_insn_reloc_cb): Likewise.
3780 (aarch64_ftrace_insn_reloc_tb): Likewise.
3781 (aarch64_ftrace_insn_reloc_adr): Likewise.
3782 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3783 (aarch64_ftrace_insn_reloc_others): Likewise.
3784 (visitor): New.
3785 (aarch64_relocate_instruction): Use visitor.
3786
dfaffe9d
YQ
37872015-10-12 Yao Qi <yao.qi@linaro.org>
3788
3789 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3790 int. Add argument buf.
3791 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3792 aarch64_relocate_instruction.
3793
70b439f0
YQ
37942015-10-12 Yao Qi <yao.qi@linaro.org>
3795
3796 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3797 argument insn. Remove local variable insn. Don't call
3798 target_read_uint32.
3799 (aarch64_install_fast_tracepoint_jump_pad): Call
3800 target_read_uint32.
3801
7781c06f
YQ
38022015-09-30 Yao Qi <yao.qi@linaro.org>
3803
3804 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3805 (emit_load_store_pair): Likewise.
3806
9a3c8263
SM
38072015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3808
3809 * dll.c (match_dll): Add cast(s).
3810 (unloaded_dll): Likewise.
3811 * linux-low.c (second_thread_of_pid_p): Likewise.
3812 (delete_lwp_callback): Likewise.
3813 (count_events_callback): Likewise.
3814 (select_event_lwp_callback): Likewise.
3815 (linux_set_resume_request): Likewise.
3816 * server.c (accumulate_file_name_length): Likewise.
3817 (emit_dll_description): Likewise.
3818 (handle_qxfer_threads_worker): Likewise.
3819 (visit_actioned_threads): Likewise.
3820 * thread-db.c (any_thread_of): Likewise.
3821 * tracepoint.c (same_process_p): Likewise.
3822 (match_blocktype): Likewise.
3823 (build_traceframe_info_xml): Likewise.
3824
224c3ddb
SM
38252015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3826
3827 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3828 assignment.
3829 (gdb_unparse_agent_expr): Likewise.
3830 * hostio.c (require_data): Likewise.
3831 (handle_pread): Likewise.
3832 * linux-low.c (disable_regset): Likewise.
3833 (fetch_register): Likewise.
3834 (store_register): Likewise.
3835 (get_dynamic): Likewise.
3836 (linux_qxfer_libraries_svr4): Likewise.
3837 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3838 (set_fast_tracepoint_jump): Likewise.
3839 (uninsert_fast_tracepoint_jumps_at): Likewise.
3840 (reinsert_fast_tracepoint_jumps_at): Likewise.
3841 (validate_inserted_breakpoint): Likewise.
3842 (clone_agent_expr): Likewise.
3843 * regcache.c (init_register_cache): Likewise.
3844 * remote-utils.c (putpkt_binary_1): Likewise.
3845 (decode_M_packet): Likewise.
3846 (decode_X_packet): Likewise.
3847 (look_up_one_symbol): Likewise.
3848 (relocate_instruction): Likewise.
3849 (monitor_output): Likewise.
3850 * server.c (handle_search_memory): Likewise.
3851 (handle_qxfer_exec_file): Likewise.
3852 (handle_qxfer_libraries): Likewise.
3853 (handle_qxfer): Likewise.
3854 (handle_query): Likewise.
3855 (handle_v_cont): Likewise.
3856 (handle_v_run): Likewise.
3857 (captured_main): Likewise.
3858 * target.c (write_inferior_memory): Likewise.
3859 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3860 * tracepoint.c (init_trace_buffer): Likewise.
3861 (add_tracepoint_action): Likewise.
3862 (add_traceframe): Likewise.
3863 (add_traceframe_block): Likewise.
3864 (cmd_qtdpsrc): Likewise.
3865 (cmd_qtdv): Likewise.
3866 (cmd_qtstatus): Likewise.
3867 (response_source): Likewise.
3868 (response_tsv): Likewise.
3869 (cmd_qtnotes): Likewise.
3870 (gdb_collect): Likewise.
3871 (initialize_tracepoint): Likewise.
3872
afbe19f8
PL
38732015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3874
3875 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3876 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3877 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3878 <NOP>: New.
3879 (enum aarch64_condition_codes): New enum.
3880 (w0): New static global.
3881 (fp): Likewise.
3882 (lr): Likewise.
3883 (struct aarch64_memory_operand) <type>: New
3884 MEMORY_OPERAND_POSTINDEX type.
3885 (postindex_memory_operand): New helper function.
3886 (emit_ret): New function.
3887 (emit_load_store_pair): New function, factored out of emit_stp
3888 with support for MEMORY_OPERAND_POSTINDEX.
3889 (emit_stp): Rewrite using emit_load_store_pair.
3890 (emit_ldp): New function.
3891 (emit_load_store): Likewise.
3892 (emit_ldr): Mention post-index instruction in comment.
3893 (emit_ldrh): New function.
3894 (emit_ldrb): New function.
3895 (emit_ldrsw): Mention post-index instruction in comment.
3896 (emit_str): Likewise.
3897 (emit_subs): New function.
3898 (emit_cmp): Likewise.
3899 (emit_and): Likewise.
3900 (emit_orr): Likewise.
3901 (emit_orn): Likewise.
3902 (emit_eor): Likewise.
3903 (emit_mvn): Likewise.
3904 (emit_lslv): Likewise.
3905 (emit_lsrv): Likewise.
3906 (emit_asrv): Likewise.
3907 (emit_mul): Likewise.
3908 (emit_sbfm): Likewise.
3909 (emit_sbfx): Likewise.
3910 (emit_ubfm): Likewise.
3911 (emit_ubfx): Likewise.
3912 (emit_csinc): Likewise.
3913 (emit_cset): Likewise.
3914 (emit_nop): Likewise.
3915 (emit_ops_insns): New helper function.
3916 (emit_pop): Likewise.
3917 (emit_push): Likewise.
3918 (aarch64_emit_prologue): New function.
3919 (aarch64_emit_epilogue): Likewise.
3920 (aarch64_emit_add): Likewise.
3921 (aarch64_emit_sub): Likewise.
3922 (aarch64_emit_mul): Likewise.
3923 (aarch64_emit_lsh): Likewise.
3924 (aarch64_emit_rsh_signed): Likewise.
3925 (aarch64_emit_rsh_unsigned): Likewise.
3926 (aarch64_emit_ext): Likewise.
3927 (aarch64_emit_log_not): Likewise.
3928 (aarch64_emit_bit_and): Likewise.
3929 (aarch64_emit_bit_or): Likewise.
3930 (aarch64_emit_bit_xor): Likewise.
3931 (aarch64_emit_bit_not): Likewise.
3932 (aarch64_emit_equal): Likewise.
3933 (aarch64_emit_less_signed): Likewise.
3934 (aarch64_emit_less_unsigned): Likewise.
3935 (aarch64_emit_ref): Likewise.
3936 (aarch64_emit_if_goto): Likewise.
3937 (aarch64_emit_goto): Likewise.
3938 (aarch64_write_goto_address): Likewise.
3939 (aarch64_emit_const): Likewise.
3940 (aarch64_emit_call): Likewise.
3941 (aarch64_emit_reg): Likewise.
3942 (aarch64_emit_pop): Likewise.
3943 (aarch64_emit_stack_flush): Likewise.
3944 (aarch64_emit_zero_ext): Likewise.
3945 (aarch64_emit_swap): Likewise.
3946 (aarch64_emit_stack_adjust): Likewise.
3947 (aarch64_emit_int_call_1): Likewise.
3948 (aarch64_emit_void_call_2): Likewise.
3949 (aarch64_emit_eq_goto): Likewise.
3950 (aarch64_emit_ne_goto): Likewise.
3951 (aarch64_emit_lt_goto): Likewise.
3952 (aarch64_emit_le_goto): Likewise.
3953 (aarch64_emit_gt_goto): Likewise.
3954 (aarch64_emit_ge_got): Likewise.
3955 (aarch64_emit_ops_impl): New static global variable.
3956 (aarch64_emit_ops): New target function, return
3957 &aarch64_emit_ops_impl.
3958 (struct linux_target_ops): Install it.
3959
bb903df0
PL
39602015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3961
3962 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3963 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3964 aarch64-ipa.o.
3965 * linux-aarch64-ipa.c: New file.
3966 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3967 and endian.h.
3968 (aarch64_get_thread_area): New target method.
3969 (extract_signed_bitfield): New helper function.
3970 (aarch64_decode_ldr_literal): New function.
3971 (enum aarch64_opcodes): New enum.
3972 (struct aarch64_register): New struct.
3973 (struct aarch64_operand): New struct.
3974 (x0): New static global.
3975 (x1): Likewise.
3976 (x2): Likewise.
3977 (x3): Likewise.
3978 (x4): Likewise.
3979 (w2): Likewise.
3980 (ip0): Likewise.
3981 (sp): Likewise.
3982 (xzr): Likewise.
3983 (aarch64_register): New helper function.
3984 (register_operand): Likewise.
3985 (immediate_operand): Likewise.
3986 (struct aarch64_memory_operand): New struct.
3987 (offset_memory_operand): New helper function.
3988 (preindex_memory_operand): Likewise.
3989 (enum aarch64_system_control_registers): New enum.
3990 (ENCODE): New macro.
3991 (emit_insn): New helper function.
3992 (emit_b): New function.
3993 (emit_bcond): Likewise.
3994 (emit_cb): Likewise.
3995 (emit_tb): Likewise.
3996 (emit_blr): Likewise.
3997 (emit_stp): Likewise.
3998 (emit_ldp_q_offset): Likewise.
3999 (emit_stp_q_offset): Likewise.
4000 (emit_load_store): Likewise.
4001 (emit_ldr): Likewise.
4002 (emit_ldrsw): Likewise.
4003 (emit_str): Likewise.
4004 (emit_ldaxr): Likewise.
4005 (emit_stxr): Likewise.
4006 (emit_stlr): Likewise.
4007 (emit_data_processing_reg): Likewise.
4008 (emit_data_processing): Likewise.
4009 (emit_add): Likewise.
4010 (emit_sub): Likewise.
4011 (emit_mov): Likewise.
4012 (emit_movk): Likewise.
4013 (emit_mov_addr): Likewise.
4014 (emit_mrs): Likewise.
4015 (emit_msr): Likewise.
4016 (emit_sevl): Likewise.
4017 (emit_wfe): Likewise.
4018 (append_insns): Likewise.
4019 (can_encode_int32_in): New helper function.
4020 (aarch64_relocate_instruction): New function.
4021 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4022 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4023 (struct linux_target_ops): Install aarch64_get_thread_area,
4024 aarch64_install_fast_tracepoint_jump_pad and
4025 aarch64_get_min_fast_tracepoint_insn_len.
4026
787749ea
PL
40272015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4028
4029 * Makefile.in (aarch64-insn.o): New rule.
4030 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4031
9812b2e6
YQ
40322015-09-21 Yao Qi <yao.qi@linaro.org>
4033
4034 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4035
18fe412b
YQ
40362015-09-21 Yao Qi <yao.qi@linaro.org>
4037
4038 * tracepoint.c (max_jump_pad_size): Remove.
4039
a0cc84cd
YQ
40402015-09-18 Yao Qi <yao.qi@linaro.org>
4041
4042 * linux-aarch64-low.c: Don't include sys/uio.h.
4043 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4044
d78908cf
WW
40452015-09-16 Wei-cheng Wang <cole945@gmail.com>
4046
4047 * tracepoint.c (eval_result_type): Change prototype.
4048 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4049
d57e0d50
PA
40502015-09-15 Pedro Alves <palves@redhat.com>
4051
4052 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4053 Check whether to report exec events instead of checking whether
4054 multiprocess is enabled.
4055
5a676acc
PA
40562015-09-15 Pedro Alves <palves@redhat.com>
4057
4058 PR remote/18965
4059 * remote-utils.c (prepare_resume_reply): Merge
4060 TARGET_WAITKIND_VFORK_DONE switch case with the
4061 TARGET_WAITKIND_FORKED case.
4062
7c5d0fad
YQ
40632015-09-15 Yao Qi <yao.qi@linaro.org>
4064
4065 * server.c (handle_query): Check string comparison using
4066 "else if" instead of "if".
4067
750ce8d1
YQ
40682015-09-15 Yao Qi <yao.qi@linaro.org>
4069
4070 * server.c (vCont_supported): New global variable.
4071 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4072 matches. Append ";vContSupported+" to own_buf.
4073 (handle_v_requests): Append ";s;S" to own_buf if target supports
4074 hardware single step or vCont_supported is false.
4075 (capture_main): Set vCont_supported to zero.
4076
70b90b91
YQ
40772015-09-15 Yao Qi <yao.qi@linaro.org>
4078
4079 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4080 it to ...
4081 (linux_supports_hardware_single_step): ... New function.
4082 (linux_target_ops): Update.
4083 * lynx-low.c (lynx_target_ops): Set field
4084 supports_hardware_single_step to target_can_do_hardware_single_step.
4085 * nto-low.c (nto_target_ops): Likewise.
4086 * spu-low.c (spu_target_ops): Likewise.
4087 * win32-low.c (win32_target_ops): Likewise.
4088 * target.c (target_can_do_hardware_single_step): New function.
4089 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4090 Remove. <supports_hardware_single_step>: New field.
4091 (target_supports_conditional_breakpoints): Remove.
4092 (target_supports_hardware_single_step): New macro.
4093 (target_can_do_hardware_single_step): Declare.
4094 * server.c (handle_query): Use target_supports_hardware_single_step
4095 instead of target_supports_conditional_breakpoints.
4096
ade90bde
YQ
40972015-09-15 Yao Qi <yao.qi@linaro.org>
4098
4099 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4100 function.
4101 (struct linux_target_ops the_low_target): Install
4102 aarch64_linux_siginfo_fixup.
4103
94585166
DB
41042015-09-11 Don Breazeal <donb@codesourcery.com>
4105 Luis Machado <lgustavo@codesourcery.com>
4106
4107 * linux-low.c (linux_mourn): Static declaration.
4108 (linux_arch_setup): Move in front of
4109 handle_extended_wait.
4110 (linux_arch_setup_thread): New function.
4111 (handle_extended_wait): Handle exec events. Call
4112 linux_arch_setup_thread. Make event_lwp argument a
4113 pointer-to-a-pointer.
4114 (check_zombie_leaders): Do not check stopped threads.
4115 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4116 (linux_low_filter_event): Add lwp and thread for exec'ing
4117 non-leader thread if leader thread has been deleted.
4118 Refactor code into linux_arch_setup_thread and call it.
4119 Pass child lwp pointer by reference to handle_extended_wait.
4120 (linux_wait_for_event_filtered): Update comment.
4121 (linux_wait_1): Prevent clobbering exec event status.
4122 (linux_supports_exec_events): New function.
4123 (linux_target_ops) <supports_exec_events>: Initialize new member.
4124 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4125 new member.
4126 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4127 * server.c (report_exec_events): New global variable.
4128 (handle_query): Handle qSupported query for exec-events feature.
4129 (captured_main): Initialize report_exec_events.
4130 * server.h (report_exec_events): Declare new global variable.
4131 * target.h (struct target_ops) <supports_exec_events>: New
4132 member.
4133 (target_supports_exec_events): New macro.
4134 * win32-low.c (win32_target_ops) <supports_exec_events>:
4135 Initialize new member.
4136
0568462b
MM
41372015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4138
4139 * linux-low.c (linux_low_enable_btrace): Remove.
4140 (linux_target_ops): Replace linux_low_enable_btrace with
4141 linux_enable_btrace.
4142
39edd165
YQ
41432015-09-03 Yao Qi <yao.qi@linaro.org>
4144
4145 * linux-aarch64-low.c (aarch64_insert_point): Call
4146 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4147 returns true.
4148
1db33b5a
UW
41492015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4150
4151 * linux-low.c (check_stopped_by_breakpoint): Use
4152 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4153
ab290430
PA
41542015-08-27 Pedro Alves <palves@redhat.com>
4155
4156 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4157
8d749320
SM
41582015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4159
6711b7f8
SM
4160 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4161 the XNEW-family equivalent.
8d749320
SM
4162 (compile_bytecodes): Likewise.
4163 * dll.c (loaded_dll): Likewise.
4164 * event-loop.c (append_callback_event): Likewise.
4165 (create_file_handler): Likewise.
4166 (create_file_event): Likewise.
4167 * hostio.c (handle_open): Likewise.
4168 * inferiors.c (add_thread): Likewise.
4169 (add_process): Likewise.
4170 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4171 * linux-arm-low.c (arm_new_process): Likewise.
4172 (arm_new_thread): Likewise.
4173 * linux-low.c (add_to_pid_list): Likewise.
4174 (linux_add_process): Likewise.
4175 (handle_extended_wait): Likewise.
4176 (add_lwp): Likewise.
4177 (enqueue_one_deferred_signal): Likewise.
4178 (enqueue_pending_signal): Likewise.
4179 (linux_resume_one_lwp_throw): Likewise.
4180 (linux_resume_one_thread): Likewise.
4181 (linux_read_memory): Likewise.
4182 (linux_write_memory): Likewise.
4183 * linux-mips-low.c (mips_linux_new_process): Likewise.
4184 (mips_linux_new_thread): Likewise.
4185 (mips_add_watchpoint): Likewise.
4186 * linux-x86-low.c (initialize_low_arch): Likewise.
4187 * lynx-low.c (lynx_add_process): Likewise.
4188 * mem-break.c (set_raw_breakpoint_at): Likewise.
4189 (set_breakpoint): Likewise.
4190 (add_condition_to_breakpoint): Likewise.
4191 (add_commands_to_breakpoint): Likewise.
4192 (clone_agent_expr): Likewise.
4193 (clone_one_breakpoint): Likewise.
4194 * regcache.c (new_register_cache): Likewise.
4195 * remote-utils.c (look_up_one_symbol): Likewise.
4196 * server.c (queue_stop_reply): Likewise.
4197 (start_inferior): Likewise.
4198 (queue_stop_reply_callback): Likewise.
4199 (handle_target_event): Likewise.
4200 * spu-low.c (fetch_ppc_memory): Likewise.
4201 (store_ppc_memory): Likewise.
4202 * target.c (set_target_ops): Likewise.
4203 * thread-db.c (thread_db_load_search): Likewise.
4204 (try_thread_db_load_1): Likewise.
4205 * tracepoint.c (add_tracepoint): Likewise.
4206 (add_tracepoint_action): Likewise.
4207 (create_trace_state_variable): Likewise.
4208 (cmd_qtdpsrc): Likewise.
4209 (cmd_qtro): Likewise.
4210 (add_while_stepping_state): Likewise.
4211 * win32-low.c (child_add_thread): Likewise.
4212 (get_image_name): Likewise.
4213
ed8b7b42
YQ
42142015-08-25 Yao Qi <yao.qi@linaro.org>
4215
4216 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4217
db3cb7cb
YQ
42182015-08-25 Yao Qi <yao.qi@linaro.org>
4219
4220 * Makefile.in (aarch64-linux.o): New rule.
4221 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4222 srv_tgtobj.
4223 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4224 (aarch64_init_debug_reg_state): Make it extern.
4225 (aarch64_linux_prepare_to_resume): Remove.
4226
f6011a1c
YQ
42272015-08-25 Yao Qi <yao.qi@linaro.org>
4228
4229 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4230 lwp_arch_private_info and ptid_of_lwp.
4231
88e2cf7e
YQ
42322015-08-25 Yao Qi <yao.qi@linaro.org>
4233
4234 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4235 Find proc_info by find_process_pid. All callers updated.
4236
5e35436e
YQ
42372015-08-25 Yao Qi <yao.qi@linaro.org>
4238
4239 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4240 Remove.
4241 (debug_reg_change_callback): Remove.
4242 (aarch64_notify_debug_reg_change): Remove.
4243
4a8a7965
YQ
42442015-08-25 Yao Qi <yao.qi@linaro.org>
4245
4246 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4247 Call current_lwp_ptid.
4248
32a271ee
YQ
42492015-08-25 Yao Qi <yao.qi@linaro.org>
4250
4251 * linux-aarch64-low.c (debug_reg_change_callback): Use
4252 debug_printf.
4253
0d51c8d7
YQ
42542015-08-25 Yao Qi <yao.qi@linaro.org>
4255
4256 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4257
31a43dd5
YQ
42582015-08-25 Yao Qi <yao.qi@linaro.org>
4259
4260 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4261
8ee52567
YQ
42622015-08-25 Yao Qi <yao.qi@linaro.org>
4263
4264 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4265 the code.
4266
ff3f0f45
YQ
42672015-08-25 Yao Qi <yao.qi@linaro.org>
4268
4269 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4270 Remove.
4271 (debug_reg_change_callback): Remove argument entry and add argument
4272 lwp. Remove local variable thread. Don't print thread id in the
4273 debugging output. Don't check whether pid of thread equals to pid.
4274 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4275 iterate_over_lwps instead find_inferior.
4276
3d40fbb5
PA
42772015-08-24 Pedro Alves <palves@redhat.com>
4278
4279 * inferiors.c (get_first_process): New function.
4280 * inferiors.h (get_first_process): New declaration.
4281 * remote-utils.c (read_ptid): Default to the first process in the
4282 list, instead of to the current thread's process.
4283
438e1e42
PA
42842015-08-24 Pedro Alves <palves@redhat.com>
4285
4286 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4287 * event-loop.c: Likewise.
4288 * remote-utils.c: Likewise.
4289 * tracepoint.c: Likewise.
4290
a8c6d4fc
PA
42912015-08-24 Pedro Alves <palves@redhat.com>
4292
4293 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4294 ptid_get_lwp.
4295
99b0bb12
PA
42962015-08-21 Pedro Alves <palves@redhat.com>
4297
4298 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4299 instead of literal 1.
4300
f8904751
PA
43012015-08-21 Pedro Alves <palves@redhat.com>
4302
4303 * tdesc.c (default_description): Explicitly zero-initialize.
4304
465a859e
PA
43052015-08-21 Pedro Alves <palves@redhat.com>
4306
4307 PR gdb/18749
4308 * inferiors.c (remove_thread): Discard any pending stop reply for
4309 this thread.
4310 * server.c (remove_all_on_match_pid): Rename to ...
4311 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4312 instead of a pid.
4313 (discard_queued_stop_replies): Change parameter to a ptid. Now
4314 extern.
4315 (handle_v_kill, kill_inferior_callback, captured_main)
4316 (process_serial_event): Adjust.
4317 * server.h (discard_queued_stop_replies): Declare.
4318
f0db101d
PA
43192015-08-21 Pedro Alves <palves@redhat.com>
4320
4321 * linux-low.c (wait_for_sigstop): Always switch to no thread
4322 selected if the previously current thread dies.
4323 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4324 process instead of the current thread's.
4325 * remote-utils.c (input_interrupt): Don't check if there's no
4326 current thread.
4327 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4328 current thread to the general thread fails, error out.
4329 (handle_qxfer_auxv, handle_qxfer_libraries)
4330 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4331 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4332 (handle_query): Check if there's a thread selected instead of
4333 checking whether there's any thread in the thread list.
4334 (handle_qxfer_threads, handle_qxfer_btrace)
4335 (handle_qxfer_btrace_conf): Don't error out early if there's no
4336 thread in the thread list.
4337 (handle_v_cont, myresume): Don't set the current thread to the
4338 continue thread.
4339 (process_serial_event) <Hg handling>: Also set thread_id if the
4340 previous general thread is still alive.
4341 (process_serial_event) <g/G handling>: If setting the current
4342 thread to the general thread fails, error out.
4343 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4344 thread's lwp instead of the current thread's.
4345 * target.c (set_desired_thread): If the desired thread was not
4346 found, leave the current thread pointing to NULL. Return an int
4347 (boolean) indicating success.
4348 * target.h (set_desired_thread): Change return type to int.
4349
40045d91
MF
43502015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4351
4352 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4353 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4354 #includes.
4355 (ps_get_thread_area): New function.
4356
45face3b
GB
43572015-08-19 Gary Benson <gbenson@redhat.com>
4358
4359 * hostio.c (handle_pread): Do not attempt to read more data
4360 than hostio_reply_with_data can fit in a packet.
4361
16d5f642
JB
43622015-08-18 Joel Brobecker <brobecker@adacore.com>
4363
4364 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4365
a738da3a
MF
43662015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4367
4368 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4369
33ebda9d
PA
43702015-08-06 Pedro Alves <palves@redhat.com>
4371
4372 * tracepoint.c (expr_eval_result): Now an int.
4373
a44892be
PA
43742015-08-06 Pedro Alves <palves@redhat.com>
4375
4376 * gdbthread.h (struct regcache): Forward declare.
4377 (struct thread_info) <regcache_data>: Now a struct regcache
4378 pointer.
4379 * inferiors.c (inferior_regcache_data)
4380 (set_inferior_regcache_data): Now work with struct regcache
4381 pointers.
4382 * inferiors.h (struct regcache): Forward declare.
4383 (inferior_regcache_data, set_inferior_regcache_data): Now work
4384 with struct regcache pointers.
4385 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4386 (free_register_cache_thread): Remove struct regcache pointer
4387 casts.
4388
608a1e46
PA
43892015-08-06 Pedro Alves <palves@redhat.com>
4390
4391 * server.c (captured_main): On error, print the exception message
4392 to stderr, and if run_once is set, throw a quit.
4393
f0ce0d3a
PA
43942015-08-06 Pedro Alves <palves@redhat.com>
4395
4396 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4397 the current thread.
4398
bf47e248
PA
43992015-08-06 Pedro Alves <palves@redhat.com>
4400
4401 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4402 reading beyond the passed in buffer length.
4403
b6b9ffcc
PL
44042015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4405
4406 * tracepoint.c (symbol_list) <required>: Remove.
4407
863d01bd
PA
44082015-08-06 Pedro Alves <palves@redhat.com>
4409
4410 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4411 count if stopping and suspending threads.
4412 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4413 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4414 (linux_detach): Complete an ongoing step-over.
4415 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4416 throughout.
4417 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4418 (linux_wait_1): If passing a signal to the inferior after
4419 finishing a step-over, unsuspend and re-resume all lwps. If we
4420 see a single-step event but the thread should be continuing, don't
4421 pass the trap to gdb.
4422 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4423 internal_error instead of gdb_assert.
4424 (enqueue_pending_signal): New function.
4425 (check_ptrace_stopped_lwp_gone): Add debug output.
4426 (start_step_over): Use internal_error instead of gdb_assert.
4427 (complete_ongoing_step_over): New function.
4428 (linux_resume_one_thread): Don't resume a suspended thread.
4429 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4430 it stepping.
4431
00db26fa
PA
44322015-08-06 Pedro Alves <palves@redhat.com>
4433
4434 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4435 (linux_thread_alive): Use lwp_is_marked_dead.
4436 (extended_event_reported): Delete.
4437 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4438 instead of extended_event_reported.
4439 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4440 as well.
4441 (lwp_is_marked_dead): New function.
4442 (lwp_running): Use lwp_is_marked_dead.
4443 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4444 comment.
4445
ad071a30
PA
44462015-08-06 Pedro Alves <palves@redhat.com>
4447
4448 * linux-low.c (linux_wait_1): Move fork event output out of the
4449 !report_to_gdb check. Pass event_child->waitstatus to
4450 target_waitstatus_to_string instead of ourstatus.
4451
524b57e6
YQ
44522015-08-04 Yao Qi <yao.qi@linaro.org>
4453
4454 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4455 if current_thread is 32 bit.
4456
6085d6f6
YQ
44572015-08-04 Yao Qi <yao.qi@linaro.org>
4458
4459 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4460 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4461 * server.c (extended_protocol): Remove "static".
4462 * server.h (extended_protocol): Declare it.
4463
8a7e4587
YQ
44642015-08-04 Yao Qi <yao.qi@linaro.org>
4465
4466 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4467 both aarch64 and aarch32.
4468 (aarch64_set_pc): Likewise.
4469
3b53ae99
YQ
44702015-08-04 Yao Qi <yao.qi@linaro.org>
4471
4472 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4473 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4474 arm-with-neon.xml to srv_xmlfiles.
4475 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4476 (is_64bit_tdesc): New function.
4477 (aarch64_linux_read_description): New function.
4478 (aarch64_arch_setup): Call aarch64_linux_read_description.
4479 (regs_info): Rename to regs_info_aarch64.
4480 (aarch64_regs_info): Return right regs_info.
4481 (initialize_low_arch): Call initialize_low_arch_aarch32.
4482
bd9e6534
YQ
44832015-08-04 Yao Qi <yao.qi@linaro.org>
4484
4485 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4486 * linux-aarch32-low.c: New file.
4487 * linux-aarch32-low.h: New file.
4488 * linux-arm-low.c (arm_fill_gregset): Move it to
4489 linux-aarch32-low.c.
4490 (arm_store_gregset): Likewise.
4491 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4492 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4493 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4494 (regs_info): Rename to regs_info_arm.
4495 (arm_regs_info): Return regs_info_aarch32 if
4496 have_ptrace_getregset is 1 and target description is
4497 arm_with_neon or arm_with_vfpv3.
4498 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4499 Call initialize_low_arch_aarch32 instead.
4500
ded48a5e
YQ
45012015-08-04 Yao Qi <yao.qi@linaro.org>
4502
4503 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4504 * linux-low.c: ... here.
4505 * linux-low.h (have_ptrace_getregset): Declare it.
4506
96e9210f
PA
45072015-08-04 Pedro Alves <palves@redhat.com>
4508
4509 * thread-db.c (struct thread_db): Use new typedefs.
4510 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4511 CHK calls.
4512 (disable_thread_event_reporting): Cast result of dlsym to
4513 destination function pointer type.
4514 (thread_db_mourn): Use td_ta_delete_ftype.
4515
af60a1ef
SL
45162015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4517
4518 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4519 arch variant.
4520 (CDX_BREAKPOINT): Define for R2.
4521 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4522 (the_low_target): Add comments.
4523
e8b41681
YQ
45242015-07-30 Yao Qi <yao.qi@linaro.org>
4525
4526 * linux-arm-low.c (arm_hwcap): Remove it.
4527 (arm_read_description): New local variable arm_hwcap. Don't
4528 set arm_hwcap to zero.
4529
89abb039
YQ
45302015-07-30 Yao Qi <yao.qi@linaro.org>
4531
4532 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4533 Use regcache->tdesc instead.
4534 (arm_store_wmmxregset): Likewise.
4535 (arm_fill_vfpregset): Likewise.
4536 (arm_store_vfpregset): Likewise.
4537
deca266c
YQ
45382015-07-30 Yao Qi <yao.qi@linaro.org>
4539
4540 * linux-arm-low.c: Include arch/arm.h.
4541 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4542 (arm_store_gregset): Likewise.
4543
aa58a496
SM
45442015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4545
4546 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4547 ptrace's 4th parameter.
4548
50904b25
YQ
45492015-07-27 Yao Qi <yao.qi@linaro.org>
4550
4551 * configure.srv (case aarch64*-*-linux*): Don't set
4552 srv_linux_usrregs.
4553
5826e159
PA
45542015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4555
4556 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4557 sys/ptrace.h.
4558 * linux-arm-low.c: Likewise.
4559 * linux-cris-low.c: Likewise.
4560 * linux-crisv32-low.c: Likewise.
4561 * linux-low.c: Likewise.
4562 * linux-m68k-low.c: Likewise.
4563 * linux-mips-low.c: Likewise.
4564 * linux-nios2-low.c: Likewise.
4565 * linux-s390-low.c: Likewise.
4566 * linux-sparc-low.c: Likewise.
4567 * linux-tic6x-low.c: Likewise.
4568 * linux-tile-low.c: Likewise.
4569 * linux-x86-low.c: Likewise.
4570
54019719
PA
45712015-07-24 Pedro Alves <palves@redhat.com>
4572
4573 * config.in: Regenerate.
4574 * configure: Regenerate.
4575
eb7aa561
PA
45762015-07-24 Pedro Alves <palves@redhat.com>
4577
4578 * acinclude.m4: Include ../ptrace.m4.
4579 * configure.ac: Call GDB_AC_PTRACE.
4580 * config.in, configure: Regenerate.
4581
55d7b841
YQ
45822015-07-24 Yao Qi <yao.qi@linaro.org>
4583
4584 * linux-low.c (linux_create_inferior): Remove setting to
4585 proc->priv->new_inferior.
4586 (linux_attach): Likewise.
4587 (linux_low_filter_event): Likewise.
4588 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4589
c06cbd92
YQ
45902015-07-24 Yao Qi <yao.qi@linaro.org>
4591
4592 * linux-low.c (linux_arch_setup): New function.
4593 (linux_low_filter_event): If proc->tdesc is NULL and
4594 proc->attached is true, call the_low_target.arch_setup.
4595 Otherwise, keep status pending, and return.
4596 (linux_resume_one_lwp_throw): Don't call get_pc if
4597 thread->while_stepping isn't NULL. Don't call
4598 get_thread_regcache if proc->tdesc is NULL.
4599 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4600 (linux_target_ops): Install arch_setup.
4601 * server.c (start_inferior): Call the_target->arch_setup.
4602 * target.h (struct target_ops) <arch_setup>: New field.
4603 (target_arch_setup): New marco.
4604 * lynx-low.c (lynx_target_ops): Update.
4605 * nto-low.c (nto_target_ops): Update.
4606 * spu-low.c (spu_target_ops): Update.
4607 * win32-low.c (win32_target_ops): Update.
4608
5ae3ebba
YQ
46092015-07-24 Yao Qi <yao.qi@linaro.org>
4610
4611 * linux-low.c (linux_add_process): Don't set
4612 proc->priv->new_inferior.
4613 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4614 (linux_attach): Likewise.
4615
eb97750b
YQ
46162015-07-24 Yao Qi <yao.qi@linaro.org>
4617
4618 * server.c (start_inferior): Code refactor.
4619
51aee833
YQ
46202015-07-24 Yao Qi <yao.qi@linaro.org>
4621
4622 * server.c (process_serial_event): Set general_thread.
4623
af1b22f3
YQ
46242015-07-21 Yao Qi <yao.qi@linaro.org>
4625
4626 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4627 aarch64_linux_get_debug_reg_capacity.
4628
554717a3
YQ
46292015-07-17 Yao Qi <yao.qi@linaro.org>
4630
4631 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4632 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4633 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4634 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4635 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4636 (AARCH64_HWP_ALIGNMENT): Likewise.
4637 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4638 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4639 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4640 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4641 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4642 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4643 (struct aarch64_debug_reg_state): Likewise.
4644 (struct arch_lwp_info): Likewise.
4645 (aarch64_align_watchpoint): Likewise.
4646 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4647 (aarch64_watchpoint_length): Likewise.
4648 (aarch64_point_encode_ctrl_reg): Likewise
4649 (aarch64_point_is_aligned): Likewise.
4650 (aarch64_align_watchpoint): Likewise.
4651 (aarch64_linux_set_debug_regs):
4652 (aarch64_dr_state_insert_one_point): Likewise.
4653 (aarch64_dr_state_remove_one_point): Likewise.
4654 (aarch64_handle_breakpoint): Likewise.
4655 (aarch64_handle_aligned_watchpoint): Likewise.
4656 (aarch64_handle_unaligned_watchpoint): Likewise.
4657 (aarch64_handle_watchpoint): Likewise.
4658
c67ca4de
YQ
46592015-07-17 Yao Qi <yao.qi@linaro.org>
4660
4661 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4662 and don't aarch64_get_debug_reg_state. All callers update.
4663 (aarch64_handle_aligned_watchpoint): Likewise.
4664 (aarch64_handle_unaligned_watchpoint): Likewise.
4665 (aarch64_handle_watchpoint): Likewise.
4666 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4667 (aarch64_remove_point): Likewise.
4668
25abf979
YQ
46692015-07-17 Yao Qi <yao.qi@linaro.org>
4670
4671 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4672 debug_printf.
4673 (aarch64_handle_unaligned_watchpoint): Likewise.
4674
db1ff28b
JK
46752015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4676
4677 Revert the previous 3 commits:
4678 Move gdb_regex* to common/
4679 Move linux_find_memory_regions_full & co.
4680 gdbserver build-id attribute generator
4681
700ca40f
JK
46822015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4683 Jan Kratochvil <jan.kratochvil@redhat.com>
4684
4685 gdbserver build-id attribute generator.
4686 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4687 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4688 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4689 (find_phdr): New.
4690 (get_dynamic): Use find_pdhr to traverse program headers.
4691 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4692 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4693 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4694 (get_hex_build_id): New.
4695 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4696 to reply XML document.
4697
9904185c
JK
46982015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4699 Jan Kratochvil <jan.kratochvil@redhat.com>
4700
4701 * target.c: Include target/target-utils.h and fcntl.h.
4702 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4703 (target_fileio_read_stralloc): New functions.
4704
6e5b4429
JK
47052015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4706
4707 * Makefile.in (OBS): Add gdb_regex.o.
4708 (gdb_regex.o): New.
4709 * config.in: Rebuilt.
4710 * configure: Rebuilt.
4711
ddc98fbf
JK
47122015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4713 Jan Kratochvil <jan.kratochvil@redhat.com>
4714
4715 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4716 * Makefile.in (OBS): Add target-utils.o.
4717 (linux-maps.o, target-utils.o): New.
4718 * configure.srv (srv_linux_obj): Add linux-maps.o.
4719
e57bb7a0
PL
47202015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4721
4722 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4723 function, return 1.
4724 (the_low_target): Install it.
4725
586b02a9
PA
47262015-07-14 Pedro Alves <palves@redhat.com>
4727
4728 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4729 Instead, ignore ECHILD, and throw an error for other errnos.
4730
58c1b36c
PA
47312015-07-10 Pedro Alves <palves@redhat.com>
4732
4733 * event-loop.c (struct callback_event) <data>: Change type to
4734 gdb_client_data instance instead of gdb_client_data pointer.
4735 (append_callback_event): Adjust.
4736
421530db
PL
47372015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4738
4739 * linux-aarch64-low.c: Add comments for each linux_target_ops
4740 method. Remove comments already covered in target_ops and
4741 linux_target_ops definitions.
4742 (the_low_target): Add comments for each unimplemented method.
4743
c2d65f38
YQ
47442015-07-09 Yao Qi <yao.qi@linaro.org>
4745
4746 * linux-aarch64-low.c (aarch64_regmap): Remove.
4747 (aarch64_usrregs_info): Remove.
4748 (regs_info): Set field usrregs to NULL.
4749
b20a6524
MM
47502015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4751
4752 * linux-low.c: Include "rsp-low.h"
4753 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4754 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4755 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4756 (handle_btrace_enable_pt): New.
4757 (handle_btrace_general_set): Support "pt".
4758 (handle_btrace_conf_general_set): Support "pt:size".
4759
96c97461
PL
47602015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4761
4762 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4763 Z_PACKET_SW_BP.
4764
37d66942
PL
47652015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4766
4767 * linux-aarch64-low.c: Remove comment about endianness.
4768 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4769 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4770 memcmp.
4771
dc06243f
GB
47722015-06-24 Gary Benson <gbenson@redhat.com>
4773
4774 * linux-i386-ipa.c (stdint.h): Do not include.
4775 * lynx-i386-low.c (stdint.h): Likewise.
4776 * lynx-ppc-low.c (stdint.h): Likewise.
4777 * mem-break.c (stdint.h): Likewise.
4778 * thread-db.c (stdint.h): Likewise.
4779 * tracepoint.c (stdint.h): Likewise.
4780 * win32-low.c (stdint.h): Likewise.
4781
124e13d9
SM
47822015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4783
4784 * server.c (write_qxfer_response): Update call to
4785 remote_escape_output.
4786
909c2cda
JK
47872015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4788 Jan Kratochvil <jan.kratochvil@redhat.com>
4789
4790 Merge multiple hex conversions.
4791 * gdbreplay.c (tohex): Rename to 'fromhex'.
4792 (logchar): Use fromhex.
4793
24c05f46
JK
47942015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4795
4796 * server.c (handle_qxfer_libraries): Set `version' attribute for
4797 <library-list>.
4798
14d2069a
GB
47992015-06-10 Gary Benson <gbenson@redhat.com>
4800
4801 * target.h (struct target_ops) <multifs_open>: New field.
4802 <multifs_unlink>: Likewise.
4803 <multifs_readlink>: Likewise.
4804 * linux-low.c (nat/linux-namespaces.h): New include.
4805 (linux_target_ops): Initialize the_target->multifs_open,
4806 the_target->multifs_unlink and the_target->multifs_readlink.
4807 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4808 * hostio.c (hostio_fs_pid): New static variable.
4809 (hostio_handle_new_gdb_connection): New function.
4810 (handle_setfs): Likewise.
4811 (handle_open): Use the_target->multifs_open as appropriate.
4812 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4813 (handle_readlink): Use the_target->multifs_readlink as
4814 appropriate.
4815 (handle_vFile): Handle vFile:setfs packets.
4816 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4817 after target_handle_new_gdb_connection.
4818
4b8b5e72
GB
48192015-06-10 Gary Benson <gbenson@redhat.com>
4820
4821 * configure.ac (AC_CHECK_FUNCS): Add setns.
4822 * config.in: Regenerate.
4823 * configure: Likewise.
4824 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4825 (linux-namespaces.o): New rule.
4826 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4827
3ac2e371
GB
48282015-06-09 Gary Benson <gbenson@redhat.com>
4829
4830 * hostio.c (handle_open): Process mode argument with
4831 fileio_to_host_mode.
4832
ca9b78ce
YQ
48332015-06-01 Yao Qi <yao.qi@linaro.org>
4834
4835 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4836 * linux-x86-low.c: Likewise.
4837
bfacd19d
DB
48382015-05-28 Don Breazeal <donb@codesourcery.com>
4839
4840 * linux-low.c (handle_extended_wait): Initialize
4841 thread_info.last_resume_kind for new fork children.
4842
452003ef
PA
48432015-05-15 Pedro Alves <palves@redhat.com>
4844
4845 * target.h (target_handle_new_gdb_connection): Rewrite using if
4846 wrapped in do/while.
4847
1041a03c
JB
48482015-05-14 Joel Brobecker <brobecker@adacore.com>
4849
4850 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4851 * configure, config.in: Regenerate.
4852 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4853 Declare typedef.
4854
c269dbdb
DB
48552015-05-12 Don Breazeal <donb@codesourcery.com>
4856
4857 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4858 PTRACE_EVENT_VFORK_DONE.
4859 (linux_low_ptrace_options, extended_event_reported): Add vfork
4860 events.
4861 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4862 and "vforkdone" for RSP 'T' Stop Reply Packet.
4863 * server.h (report_vfork_events): Declare
4864 global variable.
4865
3a8a0396
DB
48662015-05-12 Don Breazeal <donb@codesourcery.com>
4867
4868 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4869 (the_low_target) <new_fork>: Initialize new member.
4870 * linux-arm-low.c (arm_new_fork): New function.
4871 (the_low_target) <new_fork>: Initialize new member.
4872 * linux-low.c (handle_extended_wait): Call new target function
4873 new_fork.
4874 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4875 * linux-mips-low.c (mips_add_watchpoint): New function
4876 extracted from mips_insert_point.
4877 (the_low_target) <new_fork>: Initialize new member.
4878 (mips_linux_new_fork): New function.
4879 (mips_insert_point): Call mips_add_watchpoint.
4880 * linux-x86-low.c (x86_linux_new_fork): New function.
4881 (the_low_target) <new_fork>: Initialize new member.
4882
de0d863e
DB
48832015-05-12 Don Breazeal <donb@codesourcery.com>
4884
4885 * linux-low.c (handle_extended_wait): Implement return value,
4886 rename argument 'event_child' to 'event_lwp', handle
4887 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4888 (linux_low_ptrace_options): New function.
4889 (linux_low_filter_event): Call linux_low_ptrace_options,
4890 use different argument fo linux_enable_event_reporting,
4891 use return value from handle_extended_wait.
4892 (extended_event_reported): New function.
4893 (linux_wait_1): Call extended_event_reported and set
4894 status to report fork events.
4895 (linux_write_memory): Add pid to debug message.
4896 (reset_lwp_ptrace_options_callback): New function.
4897 (linux_handle_new_gdb_connection): New function.
4898 (linux_target_ops): Initialize new structure member.
4899 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4900 * lynx-low.c: Initialize new structure member.
4901 * remote-utils.c (prepare_resume_reply): Implement stop reason
4902 "fork" for "T" stop message.
4903 * server.c (handle_query): Call handle_new_gdb_connection.
4904 * server.h (report_fork_events): Declare global flag.
4905 * target.h (struct target_ops) <handle_new_gdb_connection>:
4906 New member.
4907 (target_handle_new_gdb_connection): New macro.
4908 * win32-low.c: Initialize new structure member.
4909
ddcbc397
DB
49102015-05-12 Don Breazeal <donb@codesourcery.com>
4911
4912 * mem-break.c (APPEND_TO_LIST): Define macro.
4913 (clone_agent_expr): New function.
4914 (clone_one_breakpoint): New function.
4915 (clone_all_breakpoints): New function.
4916 * mem-break.h: Declare new functions.
4917
89245bc0
DB
49182015-05-12 Don Breazeal <donb@codesourcery.com>
4919
4920 * linux-low.c (linux_supports_fork_events): New function.
4921 (linux_supports_vfork_events): New function.
4922 (linux_target_ops): Initialize new structure members.
4923 (initialize_low): Call linux_check_ptrace_features.
4924 * lynx-low.c (lynx_target_ops): Initialize new structure
4925 members.
4926 * server.c (report_fork_events, report_vfork_events):
4927 New global flags.
4928 (handle_query): Add new features to qSupported packet and
4929 response.
4930 (captured_main): Initialize new global variables.
4931 * target.h (struct target_ops) <supports_fork_events>:
4932 New member.
4933 <supports_vfork_events>: New member.
4934 (target_supports_fork_events): New macro.
4935 (target_supports_vfork_events): New macro.
4936 * win32-low.c (win32_target_ops): Initialize new structure
4937 members.
4938
835205d0
GB
49392015-05-12 Gary Benson <gbenson@redhat.com>
4940
4941 * server.c (handle_qxfer_exec_file): Use current process
4942 if annex is empty.
4943
21e94bd9
SL
49442015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4945
4946 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4947 Remove HAVE_PTRACE_GETREGS conditionals.
4948 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4949 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4950
45614f15
YQ
49512015-05-08 Yao Qi <yao.qi@linaro.org>
4952
4953 * linux-low.c (linux_supports_conditional_breakpoints): New
4954 function.
4955 (linux_target_ops): Install new target method.
4956 * lynx-low.c (lynx_target_ops): Install NULL hook for
4957 supports_conditional_breakpoints.
4958 * nto-low.c (nto_target_ops): Likewise.
4959 * spu-low.c (spu_target_ops): Likewise.
4960 * win32-low.c (win32_target_ops): Likewise.
4961 * server.c (handle_query): Check
4962 target_supports_conditional_breakpoints.
4963 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4964 New field.
4965 (target_supports_conditional_breakpoints): New macro.
4966
80ad801e
PA
49672015-05-06 Pedro Alves <palves@redhat.com>
4968
4969 PR server/18081
4970 * server.c (start_inferior): If the process exits, mourn it.
4971
819843c7
GB
49722015-04-21 Gary Benson <gbenson@redhat.com>
4973
4974 * hostio.c (fileio_open_flags_to_host): Factored out to
4975 fileio_to_host_openflags in common/fileio.c. Single use
4976 updated.
4977
a2d5a9d7
MF
49782015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4979
4980 * linux-xtensa-low.c (xtensa_fill_gregset)
4981 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4982 XCHAL_HAVE_LOOP.
4983
deb44829
MF
49842015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4985
4986 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4987 (regs_info): Replace usrregs pointer with NULL.
4988
e57f1de3
GB
49892015-04-17 Gary Benson <gbenson@redhat.com>
4990
4991 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4992 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4993 * server.c (handle_qxfer_exec_file): New function.
4994 (qxfer_packets): Add exec-file entry.
4995 (handle_query): Report qXfer:exec-file:read as supported packet.
4996
62828379
RN
49972015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4998
4999 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5000
b88bb450
GB
50012015-04-09 Gary Benson <gbenson@redhat.com>
5002
5003 * hostio-errno.c (errno_to_fileio_error): Remove function.
5004 Update caller to use remote_fileio_to_fio_error.
5005
c8f4bfdd
YQ
50062015-04-09 Yao Qi <yao.qi@linaro.org>
5007
5008 * linux-low.c (linux_insert_point): Call
5009 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5010 (linux_remove_point): Call remove_memory_breakpoint if type is
5011 raw_bkpt_type_sw.
5012 * linux-x86-low.c (x86_insert_point): Don't call
5013 insert_memory_breakpoint.
5014 (x86_remove_point): Don't call remove_memory_breakpoint.
5015
41f98f02
PA
50162015-04-01 Pedro Alves <palves@redhat.com>
5017 Cleber Rosa <crosa@redhat.com>
5018
5019 * server.c (gdbserver_usage): Reorganize and extend the usage
5020 message.
5021
2bf6fb9d
PA
50222015-03-24 Pedro Alves <palves@redhat.com>
5023
5024 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5025 output. Also dump TRAP_TRACE.
5026 (linux_low_filter_event): In debug output, distinguish a
5027 resume_stop SIGSTOP from a delayed SIGSTOP.
5028
369f6daa
GB
50292015-03-24 Gary Benson <gbenson@redhat.com>
5030
5031 * linux-x86-low.c (x86_linux_new_thread): Moved to
5032 nat/x86-linux.c.
5033 (x86_linux_prepare_to_resume): Likewise.
5034
8e5d4070
GB
50352015-03-24 Gary Benson <gbenson@redhat.com>
5036
5037 * Makefile.in (x86-linux-dregs.o): New rule.
5038 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5039 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5040 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5041 (x86_linux_dr_get): Likewise.
5042 (x86_linux_dr_set): Likewise.
5043 (update_debug_registers_callback): Likewise.
5044 (x86_linux_dr_set_addr): Likewise.
5045 (x86_linux_dr_get_addr): Likewise.
5046 (x86_linux_dr_set_control): Likewise.
5047 (x86_linux_dr_get_control): Likewise.
5048 (x86_linux_dr_get_status): Likewise.
5049 (x86_linux_update_debug_registers): Likewise.
5050
2b95d440
GB
50512015-03-24 Gary Benson <gbenson@redhat.com>
5052
5053 * linux-x86-low.c (x86_linux_update_debug_registers):
5054 New function, factored out from...
5055 (x86_linux_prepare_to_resume): ...this.
5056
14b0bc68
GB
50572015-03-24 Gary Benson <gbenson@redhat.com>
5058
5059 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5060 (x86_linux_dr_set): Likewise.
5061 (update_debug_registers_callback): Likewise.
5062 (x86_linux_dr_set_addr): Likewise.
5063 (x86_linux_dr_get_addr): Likewise.
5064 (x86_linux_dr_set_control): Likewise.
5065 (x86_linux_dr_get_control): Likewise.
5066 (x86_linux_dr_get_status): Likewise.
5067 (x86_linux_prepare_to_resume): Likewise.
5068
5dfe6ca8
GB
50692015-03-24 Gary Benson <gbenson@redhat.com>
5070
5071 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5072 Use perror_with_name. Pass string through gettext.
5073 (x86_linux_dr_set): Likewise.
5074
d33472ad
GB
50752015-03-24 Gary Benson <gbenson@redhat.com>
5076
5077 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5078 (x86_linux_dr_set_addr): ...this.
5079 (x86_dr_low_get_addr): Rename to...
5080 (x86_linux_dr_get_addr): ...this.
5081 (x86_dr_low_set_control): Rename to...
5082 (x86_linux_dr_set_control): ...this.
5083 (x86_dr_low_get_control): Rename to...
5084 (x86_linux_dr_get_control): ...this.
5085 (x86_dr_low_get_status): Rename to...
5086 (x86_linux_dr_get_status): ...this.
5087 (x86_dr_low): Update with new function names.
5088
4b134ca1
GB
50892015-03-24 Gary Benson <gbenson@redhat.com>
5090
5091 * Makefile.in (x86-linux.o): New rule.
5092 * configure.srv: Add x86-linux.o to relevant targets.
5093 * linux-low.c (lwp_set_arch_private_info): New function.
5094 (lwp_arch_private_info): Likewise.
5095 * linux-x86-low.c: Include nat/x86-linux.h.
5096 (arch_lwp_info): Removed structure.
5097 (update_debug_registers_callback):
5098 Use lwp_set_debug_registers_changed.
5099 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5100 and lwp_set_debug_registers_changed.
5101 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5102
34c703da
GB
51032015-03-24 Gary Benson <gbenson@redhat.com>
5104
5105 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5106 * linux-arm-low.c (arm_new_thread): Likewise.
5107 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5108 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5109 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5110 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5111
cff068da
GB
51122015-03-24 Gary Benson <gbenson@redhat.com>
5113
5114 * linux-low.c (ptid_of_lwp): New function.
5115 (lwp_is_stopped): Likewise.
5116 (lwp_stop_reason): Likewise.
5117 * linux-x86-low.c (update_debug_registers_callback):
5118 Use lwp_is_stopped.
5119 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5120 lwp_stop_reason.
5121
b2f7c7e8
GB
51222015-03-24 Gary Benson <gbenson@redhat.com>
5123
5124 * linux-low.h (linux_stop_lwp): Remove declaration.
5125
6d4ee8c6
GB
51262015-03-24 Gary Benson <gbenson@redhat.com>
5127
5128 * linux-low.h: Include nat/linux-nat.h.
5129 * linux-low.c (iterate_over_lwps_args): New structure.
5130 (iterate_over_lwps_filter): New function.
5131 (iterate_over_lwps): Likewise.
5132 * linux-x86-low.c (update_debug_registers_callback):
5133 Update signature to what iterate_over_lwps expects.
5134 Remove PID check that iterate_over_lwps now performs.
5135 (x86_dr_low_set_addr): Use iterate_over_lwps.
5136 (x86_dr_low_set_control): Likewise.
5137
70a0bb6b
GB
51382015-03-24 Gary Benson <gbenson@redhat.com>
5139
5140 * linux-x86-low.c (x86_debug_reg_state): New function.
5141 (x86_linux_prepare_to_resume): Use the above.
5142
7b669087
GB
51432015-03-24 Gary Benson <gbenson@redhat.com>
5144
5145 * linux-low.c (current_lwp_ptid): New function.
5146 * linux-x86-low.c: Include nat/linux-nat.h.
5147 (x86_dr_low_get_addr): Use current_lwp_ptid.
5148 (x86_dr_low_get_control): Likewise.
5149 (x86_dr_low_get_status): Likewise.
5150
eef49a3d
PA
51512015-03-20 Pedro Alves <palves@redhat.com>
5152
5153 * tracepoint.c (cmd_qtstatus): Make "str" const.
5154
b2333d22
PA
51552015-03-20 Pedro Alves <palves@redhat.com>
5156
5157 * server.c (handle_general_set): Make "req_str" const.
5158
23f238d3
PA
51592015-03-19 Pedro Alves <palves@redhat.com>
5160
5161 * linux-low.c (linux_resume_one_lwp): Rename to ...
5162 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5163 instead call perror_with_name.
5164 (check_ptrace_stopped_lwp_gone): New function.
5165 (linux_resume_one_lwp): Reimplement as wrapper around
5166 linux_resume_one_lwp_throw that swallows errors if the LWP is
5167 gone.
5168
91baf43f
PA
51692015-03-19 Pedro Alves <palves@redhat.com>
5170
5171 * linux-low.c (count_events_callback, select_event_lwp_callback):
5172 No longer check whether the thread has resume_stop as last resume
5173 kind.
5174
8bf3b159
PA
51752015-03-19 Pedro Alves <palves@redhat.com>
5176
5177 * linux-low.c (count_events_callback, select_event_lwp_callback):
5178 Use the lwp's status_pending_p field, not the thread's.
5179
b90fc188
PA
51802015-03-19 Pedro Alves <palves@redhat.com>
5181
5182 * linux-low.c (select_event_lwp_callback): Update comments to
5183 no longer mention SIGTRAP.
5184
464b0089
GB
51852015-03-18 Gary Benson <gbenson@redhat.com>
5186
5187 * server.c (handle_query): Do not report vFile:fstat as supported.
5188
aa9e327f
GB
51892015-03-11 Gary Benson <gbenson@redhat.com>
5190
5191 * hostio.c (sys/types.h): New include.
5192 (sys/stat.h): Likewise.
5193 (common-remote-fileio.h): Likewise.
5194 (handle_fstat): New function.
5195 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5196
791c0056
GB
51972015-03-11 Gary Benson <gbenson@redhat.com>
5198
5199 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5200 struct stat.st_blocks and struct stat.st_blksize.
5201 * configure: Regenerate.
5202 * config.in: Likewise.
5203 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5204 (OBS): Add common-remote-fileio.o.
5205 (common-remote-fileio.o): New rule.
5206
9a9df970
PA
52072015-03-09 Pedro Alves <palves@redhat.com>
5208
5209 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5210 'struct sockaddr' pointer in 'accept' call.
5211
9eb1356e
PA
52122015-03-09 Pedro Alves <palves@redhat.com>
5213
5214 Revert:
5215 2015-03-07 Pedro Alves <palves@redhat.com>
5216 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5217 or <winsock2.h> here. Instead include "gdb_socket.h".
5218 (remote_open): Use union gdb_sockaddr_u.
5219 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5220 or <winsock2.h> here. Instead include "gdb_socket.h".
5221 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5222 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5223 or <sys/un.h>.
5224 (init_named_socket, gdb_agent_helper_thread): Use union
5225 gdb_sockaddr_u.
5226
aac331e4
PA
52272015-03-07 Pedro Alves <palves@redhat.com>
5228
5229 * configure.ac (build_warnings): Move
5230 -Wdeclaration-after-statement to the C-specific set.
5231 * configure: Regenerate.
5232
366c75fc
PA
52332015-03-07 Pedro Alves <palves@redhat.com>
5234
5235 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5236 or <winsock2.h> here. Instead include "gdb_socket.h".
5237 (remote_open): Use union gdb_sockaddr_u.
5238 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5239 or <winsock2.h> here. Instead include "gdb_socket.h".
5240 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5241 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5242 or <sys/un.h>.
5243 (init_named_socket, gdb_agent_helper_thread): Use union
5244 gdb_sockaddr_u.
5245
492d29ea
PA
52462015-03-07 Pedro Alves <palves@redhat.com>
5247
5248 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5249 instead.
5250
60a191ed
YQ
52512015-03-06 Yao Qi <yao.qi@linaro.org>
5252
5253 * linux-aarch64-low.c (aarch64_insert_point): Use
5254 show_debug_regs as a boolean.
5255 (aarch64_remove_point): Likewise.
5256
f5771b1d
PA
52572015-03-05 Pedro Alves <palves@redhat.com>
5258
5259 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5260 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5261 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5262 * nto-low.c (nto_target_ops): Likewise.
5263 * spu-low.c (spu_target_ops): Likewise.
5264 * win32-low.c (win32_target_ops): Likewise.
5265
3e572f71
PA
52662015-03-04 Pedro Alves <palves@redhat.com>
5267
72f4393d 5268 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5269 Decide whether a breakpoint triggered based on the SIGTRAP's
5270 siginfo.si_code.
72f4393d
L
5271 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5272 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5273 (linux_low_filter_event): Check for breakpoints before checking
5274 watchpoints.
5275 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5276 siginfo.si_code.
72f4393d
L
5277 (linux_stopped_by_sw_breakpoint)
5278 (linux_supports_stopped_by_sw_breakpoint)
5279 (linux_stopped_by_hw_breakpoint)
5280 (linux_supports_stopped_by_hw_breakpoint): New functions.
5281 (linux_target_ops): Install new target methods.
3e572f71 5282
1ec68e26
PA
52832015-03-04 Pedro Alves <palves@redhat.com>
5284
5285 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5286 * server.c (swbreak_feature, hwbreak_feature): New globals.
5287 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5288 (captured_main): Clear swbreak_feature and hwbreak_feature.
5289 * server.h (swbreak_feature, hwbreak_feature): Declare.
5290 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5291 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5292 supports_stopped_by_hw_breakpoint>: New fields.
5293 (target_supports_stopped_by_sw_breakpoint)
5294 (target_stopped_by_sw_breakpoint)
5295 (target_supports_stopped_by_hw_breakpoint)
5296 (target_stopped_by_hw_breakpoint): Declare.
5297
15c66dd6
PA
52982015-03-04 Pedro Alves <palves@redhat.com>
5299
5300 enum lwp_stop_reason -> enum target_stop_reason
5301 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5302 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5303 (linux_wait_1, stuck_in_jump_pad_callback)
5304 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5305 (linux_stopped_by_watchpoint):
5306 * linux-low.h (enum lwp_stop_reason): Delete.
5307 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5308 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5309
98fc70d6
YQ
53102015-03-04 Yao Qi <yao.qi@linaro.org>
5311
5312 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5313
dd2ac174
GB
53142015-03-03 Gary Benson <gbenson@redhat.com>
5315
5316 * hostio.c (handle_vFile): Fix prefix lengths.
5317
d68e53f4
MM
53182015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5319
5320 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5321 ptr_bits.
5322
bf2d68ab
AA
53232015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5324
5325 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5326 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5327 (clean): Add "rm -f" for above C files.
5328 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5329 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5330 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5331 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5332 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5333 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5334 (init_registers_s390x_vx_linux64)
5335 (init_registers_s390x_tevx_linux64)
5336 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5337 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5338 declarations.
5339 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5340 (s390_store_vxrs_high): New functions.
5341 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5342 NT_S390_VXRS_HIGH.
5343 (s390_arch_setup): Add logic for selecting one of the new target
5344 descriptions. Activate the new vector regsets if applicable.
5345 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5346 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5347 and init_registers_s390x_tevx_linux64.
5348
c966a859
PA
53492015-03-01 Pedro Alves <palves@redhat.com>
5350
5351 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5352 parameter.
5353
4180215b
PA
53542015-02-27 Pedro Alves <palves@redhat.com>
5355
5356 * linux-x86-low.c (u_debugreg_offset): New function.
5357 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5358
749bab01
PA
53592015-02-27 Pedro Alves <palves@redhat.com>
5360
5361 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5362 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5363 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5364 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5365 (ps_lsetfpregs, ps_getpid)
5366 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5367 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5368 (ps_lsetxregs, ps_plog): Declare.
5369
3c14e5a3
PA
53702015-02-27 Pedro Alves <palves@redhat.com>
5371
5372 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5373 IP_AGENT_EXPORT_FUNC.
5374 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5375 IP_AGENT_EXPORT_FUNC.
5376 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5377 (IP_AGENT_EXPORT): Delete.
5378 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5379 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5380 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5381 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5382 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5383 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5384 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5385 (traceframe_read_count, traceframe_write_count)
5386 (traceframes_created, trace_state_variables, get_raw_reg)
5387 (get_trace_state_variable_value, set_trace_state_variable_value)
5388 (ust_loaded, helper_thread_id, cmd_buf): Use
5389 IPA_SYM_EXPORTED_NAME.
5390 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5391 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5392 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5393 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5394 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5395 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5396 EXTERN_C_PUSH/EXTERN_C_POP.
5397 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5398 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5399 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5400 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5401 (traceframe_write_count, traceframe_read_count)
5402 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5403 (about_to_request_buffer_space, get_trace_state_variable_value)
5404 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5405 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5406 EXTERN_C_PUSH/EXTERN_C_POP.
5407 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5408 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5409 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5410 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5411 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5412 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5413 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5414 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5415 Define.
5416 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5417 (IP_AGENT_EXPORT_VAR_DECL): Define.
5418 (tracing): Declare.
5419 (gdb_agent_get_raw_reg): Declare.
5420
fe978cb0
PA
54212015-02-27 Tom Tromey <tromey@redhat.com>
5422 Pedro Alves <palves@redhat.com>
5423
5424 Rename symbols whose names are reserved C++ keywords throughout.
5425
3bc3d82a
PA
54262015-02-27 Pedro Alves <palves@redhat.com>
5427
5428 * Makefile.in (COMPILER): New, get it from autoconf.
5429 (CXX): Get from autoconf instead.
5430 (COMPILE.pre): Use COMPILER.
5431 (CC-LD): Rename to ...
5432 (CC_LD): ... this. Use COMPILER.
5433 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5434 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5435 * acinclude.m4: Include build-with-cxx.m4.
5436 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5437 Disable -Werror by default if building in C++ mode.
5438 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5439 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5440 the C++ compiler. Save/restore CXXFLAGS too.
5441 * configure: Regenerate.
5442
07697489
PA
54432015-02-27 Pedro Alves <palves@redhat.com>
5444
5445 * acinclude.m4: Include libiberty.m4.
5446 * configure.ac: Call libiberty_INIT.
5447 * config.in, configure: Regenerate.
5448
9beb7c4e
PA
54492015-02-26 Pedro Alves <palves@redhat.com>
5450
5451 * linux-low.c (linux_wait_1): When incrementing the PC past a
5452 program breakpoint always use the_low_target.breakpoint_len as
5453 increment, rather than the maximum between that and
5454 the_low_target.decr_pc_after_break.
5455
8090aef2
PA
54562015-02-23 Pedro Alves <palves@redhat.com>
5457
5458 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5459 thread was doing a step-over; always adjust the PC if
5460 we stepped over a permanent breakpoint.
5461 (linux_wait_1): If we stepped over breakpoint that was on top of a
5462 permanent breakpoint, manually advance the PC past it.
5463
bc9540e8
PA
54642015-02-23 Pedro Alves <palves@redhat.com>
5465
5466 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5467 modes.
5468 (x86_fill_gregset, x86_store_gregset): Use it when handling
5469 $orig_eax.
5470
2db9a427
PA
54712015-02-20 Pedro Alves <palves@redhat.com>
5472
5473 * thread-db.c: Include "nat/linux-procfs.h".
5474 (thread_db_init): Skip listing new threads if the kernel supports
5475 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5476
afa8d396
PA
54772015-02-20 Pedro Alves <palves@redhat.com>
5478
5479 * linux-low.c (status_pending_p_callback): Use ptid_match.
5480
c9587f88
AT
54812015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5482
5483 PR breakpoints/16812
5484 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5485 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5486 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5487
b05ec7a5
AT
54882015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5489
5490 PR breakpoints/15956
5491 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5492
d33501a5
MM
54932015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5494
5495 * linux-low.c (linux_low_btrace_conf): Print size.
5496 * server.c (handle_btrace_conf_general_set): New.
5497 (hanle_general_set): Call handle_btrace_conf_general_set.
5498 (handle_query): Report Qbtrace-conf:bts:size as supported.
5499
f4abbc16
MM
55002015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5501
5502 * linux-low.c (linux_low_enable_btrace): Update parameters.
5503 (linux_low_btrace_conf): New.
5504 (linux_target_ops)<to_btrace_conf>: Initialize.
5505 * server.c (current_btrace_conf): New.
5506 (handle_btrace_enable): Rename to ...
5507 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5508 to target_enable_btrace. Update comment. Update users.
5509 (handle_qxfer_btrace_conf): New.
5510 (qxfer_packets): Add btrace-conf entry.
5511 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5512 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5513 (target_ops)<read_btrace_conf>: New.
5514 (target_enable_btrace): Update parameters.
5515 (target_read_btrace_conf): New.
5516
043c3577
MM
55172015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5518
5519 * server.c (handle_btrace_general_set): Remove call to
5520 target_supports_btrace.
5521 (supported_btrace_packets): New.
5522 (handle_query): Call supported_btrace_packets.
5523 * target.h: include btrace-common.h.
5524 (btrace_target_info): Removed.
5525 (supports_btrace, target_supports_btrace): Update parameters.
5526
734b0e4b
MM
55272015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5528
5529 * Makefile.in (SFILES): Add common/btrace-common.c.
5530 (OBS): Add common/btrace-common.o.
5531 (btrace-common.o): Add build rules.
5532 * linux-low: Include btrace-common.h.
5533 (linux_low_read_btrace): Use struct btrace_data. Call
5534 btrace_data_init and btrace_data_fini.
5535
d6c146e9
PA
55362015-02-06 Pedro Alves <palves@redhat.com>
5537
5538 * thread-db.c (find_new_threads_callback): Add debug output.
5539
20ba1ce6
PA
55402015-02-04 Pedro Alves <palves@redhat.com>
5541
5542 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5543 (resume_stopped_resumed_lwps): New function.
5544 (linux_wait_for_event_filtered): Use it.
5545
8cc73a39
SDJ
55462015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5547
5548 * Makefile.in (SFILES): Add linux-personality.c.
5549 (linux-personality.o): New rule.
5550 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5551 list of objects to be built.
5552 * linux-low.c: Include nat/linux-personality.h.
5553 (linux_create_inferior): Remove code to disable address space
5554 randomization (moved to ../nat/linux-personality.c). Create
5555 cleanup to disable address space randomization.
5556
fb23d554
SDJ
55572015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5558
5559 * Makefile.in (posix-strerror.o): New rule.
5560 (mingw-strerror.o): Likewise.
5561 * configure: Regenerated.
5562 * configure.ac: Source file ../common/common.host. Initialize new
5563 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5564
cdf43629
YQ
55652015-01-14 Yao Qi <yao@codesourcery.com>
5566
5567 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5568 (ppc-linux.o): New rule.
5569 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5570 * configure.ac: AC_CHECK_FUNCS(getauxval).
5571 * config.in: Re-generated.
5572 * configure: Re-generated.
5573 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5574 ppc64_64bit_inferior_p
5575
514c5338
YQ
55762015-01-14 Yao Qi <yao@codesourcery.com>
5577
5578 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5579 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5580 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5581 (PT_ORIG_R3, PT_TRAP): Likewise.
5582 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5583 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5584 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5585
3368c1e5
JB
55862015-01-10 Joel Brobecker <brobecker@adacore.com>
5587
5588 * i387-fp.c (i387_cache_to_xsave): In look over
5589 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5590 zmmh_low_space field by use of zmmh_high_space.
5591
582511be
PA
55922015-01-09 Pedro Alves <palves@redhat.com>
5593
5594 * linux-low.c (step_over_bkpt): Move higher up in the file.
5595 (handle_extended_wait): Don't store the stop_pc here.
5596 (get_stop_pc): Adjust comments and rename to ...
5597 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5598 stopped for a software breakpoint or hardware breakpoint.
5599 (thread_still_has_status_pending_p): New function.
5600 (status_pending_p_callback): Use
5601 thread_still_has_status_pending_p. If the event is no longer
5602 interesting, resume the LWP.
5603 (handle_tracepoints): Add assert.
5604 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5605 (wstatus_maybe_breakpoint): New function.
5606 (cancel_breakpoint): Delete function.
5607 (check_stopped_by_watchpoint): New function, factored out from
5608 linux_low_filter_event.
5609 (lp_status_maybe_breakpoint): Delete function.
5610 (linux_low_filter_event): Remove filter_ptid argument.
5611 Leave thread group exits pending here. Store the LWP's stop PC.
5612 Always leave events pending.
5613 (linux_wait_for_event_filtered): Pull all events out of the
5614 kernel, and leave them all pending.
5615 (count_events_callback, select_event_lwp_callback): Consider all
5616 events.
5617 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5618 (select_event_lwp): Only give preference to the stepping LWP in
5619 all-stop mode. Adjust comments.
5620 (ignore_event): New function.
5621 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5622 references to cancel_breakpoints. Adjust to renames. Also give
5623 equal priority to all LWPs that have had events in non-stop mode.
5624 If reporting a software breakpoint event, unadjust the LWP's PC.
5625 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5626 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5627 Adjust.
5628 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5629 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5630 (linux_stopped_by_watchpoint): Adjust.
5631 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5632 * linux-low.h (enum lwp_stop_reason): New.
5633 (struct lwp_info) <stop_pc>: Adjust comment.
5634 <stopped_by_watchpoint>: Delete field.
5635 <stop_reason>: New field.
5636 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5637 * mem-break.c (software_breakpoint_inserted_here)
5638 (hardware_breakpoint_inserted_here): New function.
5639 * mem-break.h (software_breakpoint_inserted_here)
5640 (hardware_breakpoint_inserted_here): Declare.
5641 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5642 (cancel_breakpoints): Delete.
5643 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5644 (upload_fast_traceframes): Remove references to
5645 cancel_breakpoints.
5646
a33e3959
PA
56472015-01-09 Pedro Alves <palves@redhat.com>
5648
5649 * thread-db.c (find_new_threads_callback): Ignore thread if the
5650 kernel thread ID is -1.
5651
8784d563
PA
56522015-01-09 Pedro Alves <palves@redhat.com>
5653
5654 * linux-low.c (linux_attach_fail_reason_string): Move to
5655 nat/linux-ptrace.c, and rename.
5656 (linux_attach_lwp): Update comment.
5657 (attach_proc_task_lwp_callback): New function.
5658 (linux_attach): Adjust to rename and use
5659 linux_proc_attach_tgid_threads.
5660 (linux_attach_fail_reason_string): Delete declaration.
5661
76f2b779
JB
56622015-01-01 Joel Brobecker <brobecker@adacore.com>
5663
5664 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5665 * server.c (gdbserver_version): Likewise.
5666
fafcc06a
SDJ
56672014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5668
5669 * remote-utils.c: Include ctype.h.
5670 (input_interrupt): Explicitly handle the case when the char
5671 received is the NUL byte. Improve the printing of non-ASCII
5672 characters.
5673
beed38b8
JB
56742014-12-16 Joel Brobecker <brobecker@adacore.com>
5675
5676 * linux-low.c (linux_low_filter_event): Update call to
5677 linux_enable_event_reporting following the addition of
5678 a new parameter to that function.
5679
bf330350
CU
56802014-12-16 Catalin Udma <catalin.udma@freescale.com>
5681
5682 PR server/17457
5683 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5684 (AARCH64_FPCR_REGNO): Likewise.
5685 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5686 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5687 (aarch64_store_fpregset): Likewise.
5688
5227d625
JB
56892014-12-15 Joel Brobecker <brobecker@adacore.com>
5690
5691 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5692 Remove FIXME comment about assumption about N.
5693
f93b65a0
JB
56942014-12-13 Joel Brobecker <brobecker@adacore.com>
5695
5696 * configure.ac: If large-file support is disabled in GDBserver,
5697 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5698 * configure: Regenerate.
5699
e5a9158d
AA
57002014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5701
5702 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5703 warning upon ENODATA from ptrace.
5704 * linux-s390-low.c (s390_store_tdb): New.
5705 (s390_regsets): Add regset for NT_S390_TDB.
5706
feea5f36
AA
57072014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5708
5709 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5710 without a fill_function.
5711 * linux-s390-low.c (s390_fill_last_break): Remove.
5712 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5713 (s390_arch_setup): Use regset's size instead of fill_function for
5714 loop end condition.
5715
098dbe61
AA
57162014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5717
5718 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5719 the regset's store function when ptrace returned an error.
5720 * regcache.c (get_thread_regcache): Invalidate register cache
5721 before fetching inferior's registers.
5722
28eef672
AA
57232014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5724
5725 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5726 while-loop as for-loop.
5727 (regsets_store_inferior_registers): Likewise.
5728
bdca27a2
YQ
57292014-11-28 Yao Qi <yao@codesourcery.com>
5730
5731 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5732 * config.in, configure: Re-generate.
5733 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5734 is defined.
5735
9c232dda
YQ
57362014-11-21 Yao Qi <yao@codesourcery.com>
5737
5738 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5739 (AC_CHECK_HEADERS): Remove malloc.h.
5740 * configure: Re-generated.
5741 * config.in: Re-generated.
5742 * server.h: Don't include alloca.h and malloc.h.
5743 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5744 Don't include malloc.h.
5745
43968415
JB
57462014-11-17 Joel Brobecker <brobecker@adacore.com>
5747
5748 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5749 corresponding ERRNO check in same block.
5750
40e91bc7
PA
57512014-11-12 Pedro Alves <palves@redhat.com>
5752
5753 * server.c (cont_thread): Update comment.
5754 (start_inferior, attach_inferior): No longer clear cont_thread.
5755 (handle_v_cont): No longer set cont_thread.
5756 (captured_main): Clear cont_thread each time a GDB connects.
5757
c2c118cf
PA
57582014-11-12 Pedro Alves <palves@redhat.com>
5759
5760 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5761 thread, and don't resume all threads if the Hc thread has exited.
5762
78708b7c
PA
57632014-11-12 Pedro Alves <palves@redhat.com>
5764
5765 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5766 the process group instead of to a specific LWP.
5767
a2abc7de
PA
57682014-10-15 Pedro Alves <palves@redhat.com>
5769
5770 PR server/17487
5771 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5772 parameter.
5773 (arm_set_thread_context): Delete.
5774 (the_low_target): Adjust.
5775 * win32-i386-low.c (debug_registers_changed)
5776 (debug_registers_used): Delete.
5777 (update_debug_registers_callback): New function.
5778 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5779 needing to update their debug registers.
5780 (win32_get_current_dr): New function.
5781 (x86_dr_low_get_addr, x86_dr_low_get_control)
5782 (x86_dr_low_get_status): Fetch the debug register from the thread
5783 record's context.
5784 (i386_initial_stuff): Adjust.
5785 (i386_get_thread_context): Remove current_event parameter. Don't
5786 clear debug_registers_changed nor copy DR values to
5787 debug_reg_state.
5788 (i386_set_thread_context): Delete.
5789 (i386_prepare_to_resume): New function.
5790 (i386_thread_added): Mark the thread as needing to update irs
5791 debug registers.
5792 (the_low_target): Remove i386_set_thread_context and install
5793 i386_prepare_to_resume.
5794 * win32-low.c (win32_get_thread_context): Adjust.
5795 (win32_set_thread_context): Use SetThreadContext
5796 directly.
5797 (win32_prepare_to_resume): New function.
5798 (win32_require_context): New function, factored out from ...
5799 (thread_rec): ... this.
5800 (continue_one_thread): Call win32_prepare_to_resume on each thread
5801 we're about to continue.
5802 (win32_resume): Call win32_prepare_to_resume on the event thread.
5803 * win32-low.h (struct win32_thread_info)
5804 <debug_registers_changed>: New field.
5805 (struct win32_target_ops): Change prototype of set_thread_context,
5806 delete set_thread_context and add prepare_to_resume.
5807 (win32_require_context): New declaration.
5808
a442d071
GB
58092014-10-08 Gary Benson <gbenson@redhat.com>
5810
5811 * server.h: Do not include common-exceptions.h.
5812
6f1947e8
GB
58132014-10-08 Gary Benson <gbenson@redhat.com>
5814
5815 * server.h: Do not include cleanups.h.
5816
63b434a4
JH
58172014-09-30 James Hogan <james.hogan@imgtec.com>
5818
5819 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5820 mips64-dsp-linux.c.
5821
c4d9ceb6
YQ
58222014-09-23 Yao Qi <yao@codesourcery.com>
5823
5824 * linux-low.c (lp_status_maybe_breakpoint): New function.
5825 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5826 (count_events_callback): Likewise.
5827 (select_event_lwp_callback): Likewise.
5828 (cancel_breakpoints_callback): Likewise.
5829
89a5711c
DB
58302014-09-19 Don Breazeal <donb@codesourcery.com>
5831
5832 * linux-low.c (handle_extended_wait): Call
5833 linux_ptrace_get_extended_event.
5834 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5835 linux_is_extended_waitstatus.
5836
bffc0964
JB
58372014-09-16 Joel Brobecker <brobecker@adacore.com>
5838
5839 * Makefile.in (CPPFLAGS): Define.
5840 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5841 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5842
0bfdf32f
GB
58432014-09-16 Gary Benson <gbenson@redhat.com>
5844
5845 * inferiors.h (current_inferior): Renamed as...
5846 (current_thread): New variable. All uses updated.
5847 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5848 (maybe_move_out_of_jump_pad): Likewise.
5849 (cancel_breakpoint): Likewise.
5850 (linux_low_filter_event): Likewise.
5851 (wait_for_sigstop): Likewise.
5852 (linux_resume_one_lwp): Likewise.
5853 (need_step_over_p): Likewise.
5854 (start_step_over): Likewise.
5855 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5856 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5857 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5858 and save_inferior as saved_thread.
5859 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5860 saved_thread.
5861 (regcache_invalidate_thread): Likewise.
5862 * remote-utils.c (prepare_resume_reply): Likewise.
5863 * thread-db.c (thread_db_get_tls_address): Likewise.
5864 (disable_thread_event_reporting): Likewise.
5865 (remove_thread_event_breakpoints): Likewise.
5866 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5867 as saved_thread.
5868 * target.h (set_desired_inferior): Renamed as...
5869 (set_desired_thread): New declaration. All uses updated.
5870 * server.c (myresume): Updated comment to reference thread instead
5871 of inferior.
5872 (handle_serial_event): Likewise.
5873 (handle_target_event): Likewise.
5874
361c8ade
GB
58752014-09-12 Tom Tromey <tromey@redhat.com>
5876 Gary Benson <gbenson@redhat.com>
5877
5878 * regcache.h: Include common-regcache.h.
5879 (regcache_read_pc): Don't declare.
5880 * regcache.c (get_thread_regcache_for_ptid): New function.
5881
bd9269f7
GB
58822014-09-11 Tom Tromey <tromey@redhat.com>
5883 Gary Benson <gbenson@redhat.com>
5884
5885 * symbol.c: New file.
5886 * Makefile.in (SFILES): Add symbol.c.
5887 (OBS): Add symbol.o.
5888
f8c1d06b
GB
58892014-09-11 Gary Benson <gbenson@redhat.com>
5890
5891 * target.c (target_stop_ptid, target_continue_ptid): New
5892 functions.
5893
721ec300
GB
58942014-09-11 Tom Tromey <tromey@redhat.com>
5895 Gary Benson <gbenson@redhat.com>
5896
5897 * target.h: Include target/target.h.
5898 * target.c (target_read_memory, target_read_uint32)
5899 (target_write_memory): New functions.
5900
c5e92cca
GB
59012014-09-11 Gary Benson <gbenson@redhat.com>
5902
5903 * server.h (debug_hw_points): Don't declare.
5904 * server.c (debug_hw_points): Don't define. Replace all uses
5905 with show_debug_regs.
5906 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5907 all uses with show_debug_regs.
5908
2e4bb98a
EBM
59092014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5910
5911 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5912 endianness into account.
5913 (ppc_supply_ptrace_register): Likewise.
5914
ac740bc7
JH
59152014-09-03 James Hogan <james.hogan@imgtec.com>
5916
5917 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5918 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5919
97ea6506
GB
59202014-09-03 Gary Benson <gbenson@redhat.com>
5921
5922 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5923 ALL_DEBUG_ADDRESS_REGISTERS.
5924
df7e5265
GB
59252014-09-02 Gary Benson <gbenson@redhat.com>
5926
5927 * i386-low.h: Renamed as...
5928 * x86-low.h: New file. All type, function and variable name
5929 prefixes changed from "i386_" to "x86_". All references updated.
5930 * i386-low.c: Renamed as...
5931 * x86-low.c: New file. All type, function and variable name
5932 prefixes changed from "i386_" to "x86_". All references updated.
5933
ed859da7
GB
59342014-09-02 Gary Benson <gbenson@redhat.com>
5935
5936 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5937 (x86_linux_new_thread): Likewise.
5938
860789c7
GB
59392014-08-29 Gary Benson <gbenson@redhat.com>
5940
5941 * server.h (setjmp.h): Do not include.
5942 (toplevel): Do not declare.
5943 (common-exceptions.h): Include.
5944 (cleanups.h): Likewise.
5945 * server.c (toplevel): Do not define.
5946 (exit_code): New static global.
5947 (detach_or_kill_for_exit_cleanup): New function.
5948 (main): New function. Original main renamed to...
5949 (captured_main): New function.
5950 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5951
ff55e1b5
GB
59522014-08-29 Gary Benson <gbenson@redhat.com>
5953
5954 * Makefile.in (SFILES): Add common/common-exceptions.c.
5955 (OBS): Add common-exceptions.o.
5956 (common-exceptions.o): New rule.
5957 * utils.c (prepare_to_throw_exception): New function.
5958
e9bcb658
GB
59592014-08-29 Gary Benson <gbenson@redhat.com>
5960
5961 * config.in: Regenerate.
5962 * configure: Likewise.
5963
e3180625
GB
59642014-08-29 Gary Benson <gbenson@redhat.com>
5965
5966 * Makefile.in (SFILES): Add common/cleanups.c.
5967 (OBS): cleanups.o.
5968 (cleanups.o): New rule.
5969
e3d6ba5d
GB
59702014-08-29 Gary Benson <gbenson@redhat.com>
5971
5972 * utils.c (internal_vwarning): New function.
5973
7096e886
GB
59742014-08-28 Gary Benson <gbenson@redhat.com>
5975
5976 * utils.h (fatal): Remove declaration.
5977 * utils.c (fatal): Remove function.
5978
14ce3192
GB
59792014-08-28 Gary Benson <gbenson@redhat.com>
5980
5981 * tracepoint.c (gdb_agent_init): Replace fatal with
5982 perror_with_name.
5983 (initialize_tracepoint): Likewise.
5984
50278d59
GB
59852014-08-28 Gary Benson <gbenson@redhat.com>
5986
5987 * remote-utils.c (remote_prepare): Replace fatal with error.
5988
aa96c426
GB
59892014-08-28 Gary Benson <gbenson@redhat.com>
5990
5991 * linux-low.c (linux_async): Replace fatal with warning.
5992 Tidy up and return.
5993 (linux_start_non_stop): Return -1 if linux_async failed.
5994
f7160e97
GB
59952014-08-28 Gary Benson <gbenson@redhat.com>
5996
5997 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5998 gdb_assert.
5999 (i386_dr_low_get_addr): Remove vague comment.
6000 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6001 gdb_assert.
6002
38e08fca
GB
60032014-08-28 Gary Benson <gbenson@redhat.com>
6004
6005 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6006 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6007 internal_error.
6008 (linux_resume_one_lwp): Likewise.
6009 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6010 gdb_assert.
6011 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6012 with internal_error.
6013 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6014 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6015 (find_register_by_name): Replace fatal with internal_error.
6016 (find_regno): Likewise.
6017 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6018 * thread-db.c (thread_db_create_event): Likewise.
6019 (thread_db_load_search): Likewise.
6020 (try_thread_db_load_1): Likewise.
6021 * tracepoint.c (get_jump_space_head): Replace fatal with
6022 internal_error.
6023 (claim_trampoline_space): Likewise.
6024 (have_fast_tracepoint_trampoline_buffer): Likewise.
6025 (cmd_qtstart): Likewise.
6026 (stop_tracing): Likewise.
6027 (fast_tracepoint_collecting): Likewise.
6028 (target_malloc): Likewise.
6029 (download_tracepoint): Likewise.
6030 (download_trace_state_variables): Replace check with gdb_assert.
6031 (upload_fast_traceframes): Replace fatal with internal_error.
6032
34abf635
GB
60332014-08-19 Tom Tromey <tromey@redhat.com>
6034 Gary Benson <gbenson@redhat.com>
6035
6036 * Makefile.in (SFILES): Add common/common-debug.c.
6037 (OBS): Add common-debug.o.
6038 (common-debug.o): New rule.
6039 * debug.h (debug_printf): Don't declare.
6040 * debug.c (debug_printf): Renamed and rewritten as...
6041 (debug_vprintf): New function.
6042
f6e94d78
GB
60432014-08-19 Gary Benson <gbenson@redhat.com>
6044
6045 * utils.h: Do not include print-utils.h.
6046
9239eeab
GB
60472014-08-19 Tom Tromey <tromey@redhat.com>
6048 Gary Benson <gbenson@redhat.com>
6049
6050 * server.h: Add static assertion.
6051 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6052
ef87c8bb
GB
60532014-08-19 Tom Tromey <tromey@redhat.com>
6054 Gary Benson <gbenson@redhat.com>
6055
6056 * Makefile.in (SFILES): Add common/errors.c.
6057 (OBS): Add errors.o.
6058 (IPA_OBS): Add errors-ipa.o.
6059 (errors.o): New rule.
6060 (errors-ipa.o): Likewise.
6061 * utils.h (perror_with_name, error, warning): Don't declare.
6062 * utils.c (warning): Renamed and rewritten as...
6063 (vwarning): New function.
6064 (error): Renamed and rewritten as...
6065 (verror): New function.
6066 (internal_error): Renamed and rewritten as...
6067 (internal_verror): New function.
6068
bb974a24
GB
60692014-08-07 Gary Benson <gbenson@redhat.com>
6070
6071 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6072 * configure: Regenerate.
6073 * config.in: Likewise.
6074 * server.h: Do not include errno.h.
6075 * event-loop.c: Likewise.
6076 * hostio-errno.c: Likewise.
6077 * linux-low.c: Likewise.
6078 * remote-utils.c: Likewise.
6079 * spu-low.c: Likewise.
6080 * utils.c: Likewise.
6081 * gdbreplay.c: Unconditionally include errno.h.
6082
6d3d12eb
GB
60832014-08-07 Gary Benson <gbenson@redhat.com>
6084
6085 * server.h: Do not include string.h.
6086 * event-loop.c: Likewise.
6087 * linux-low.c: Likewise.
6088 * regcache.c: Likewise.
6089 * remote-utils.c: Likewise.
6090 * spu-low.c: Likewise.
6091 * utils.c: Likewise.
6092
dccbb609
GB
60932014-08-07 Gary Benson <gbenson@redhat.com>
6094
6095 * server.h: Do not include gdb_assert.h.
6096
e76df0d0
GB
60972014-08-07 Gary Benson <gbenson@redhat.com>
6098
6099 * server.h: Do not include common-utils.h.
6100
4cb9c816
GB
61012014-08-07 Gary Benson <gbenson@redhat.com>
6102
6103 * server.h: Do not include ptid.h.
6104 * notif.h: Likewise.
6105
3995eeee
GB
61062014-08-07 Gary Benson <gbenson@redhat.com>
6107
6108 * server.h: Do not include gdb_locale.h.
6109
cb9f1a9b
GB
61102014-08-07 Gary Benson <gbenson@redhat.com>
6111
6112 * server.h: Do not include gdb/signals.h.
6113 * win32-low.c: Likewise.
6114
a5fceff8
GB
61152014-08-07 Gary Benson <gbenson@redhat.com>
6116
6117 * server.h: Do not include pathmax.h.
6118
b9391142
GB
61192014-08-07 Gary Benson <gbenson@redhat.com>
6120
6121 * server.h: Do not include libiberty.h.
6122 * linux-bfin-low.c: Likewise.
6123
0e443c87
GB
61242014-08-07 Gary Benson <gbenson@redhat.com>
6125
6126 * server.h: Do not include ansidecl.h.
6127
8ebb3f56
GB
61282014-08-07 Gary Benson <gbenson@redhat.com>
6129
6130 * linux-x86-low.c: Do not include stddef.h.
6131 * lynx-ppc-low.c: Likewise.
6132 * tracepoint.c: Likewise.
6133
8980bdf6
GB
61342014-08-07 Gary Benson <gbenson@redhat.com>
6135
6136 * server.h: Do not include stdarg.h.
6137 * nto-low.c: Likewise.
6138
d7096f71
GB
61392014-08-07 Gary Benson <gbenson@redhat.com>
6140
6141 * server.h: Do not include stdlib.h.
6142 * inferiors.c: Likewise.
6143 * linux-low.c: Likewise.
6144 * regcache.c: Likewise.
6145 * spu-low.c: Likewise.
6146 * tracepoint.c: Likewise.
6147 * utils.c: Likewise.
6148
d02f550d
GB
61492014-08-07 Gary Benson <gbenson@redhat.com>
6150
6151 * server.h: Do not include stdio.h.
6152 * linux-low.c: Likewise.
6153 * remote-utils.c: Likewise.
6154 * spu-low.c: Likewise.
6155 * utils.c: Likewise.
6156 * wincecompat.c: Likewise.
6157
87f6c4e3
GB
61582014-08-06 Gary Benson <gbenson@redhat.com>
6159
6160 * regcache.c (init_register_cache): Move conditionals inside if.
6161
7089dca4
GB
61622014-08-06 Gary Benson <gbenson@redhat.com>
6163
6164 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6165
462f517e
GB
61662014-07-31 Gary Benson <gbenson@redhat.com>
6167
6168 * ax.h: Do not include server.h.
6169 * gdbthread.h: Likewise.
6170 * lynx-low.h: Likewise.
6171 * notif.h: Likewise.
6172
976411d6
GB
61732014-07-30 Gary Benson <gbenson@redhat.com>
6174
6175 * server.h: Include common-defs.h.
6176 Do not include config.h or build-gnulib-gdbserver/config.h.
6177
d41f6d8e
GB
61782014-07-30 Gary Benson <gbenson@redhat.com>
6179
6180 * hostio-errno.c: Move server.h to top of includes list.
6181 * inferiors.c: Likewise.
6182 * linux-x86-low.c: Likewise.
6183 * notif.c: Include server.h.
6184
314c6a35
TT
61852014-07-24 Tom Tromey <tromey@redhat.com>
6186 Gary Benson <gbenson@redhat.com>
6187
6188 * server.h (CORE_ADDR): Now unsigned.
6189
69ff6be5
PA
61902014-07-16 Pedro Alves <palves@redhat.com>
6191
6192 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6193
ce9e3fe7
PA
61942014-07-15 Pedro Alves <palves@redhat.com>
6195
6196 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6197 copy.
6198
e76126e8
PA
61992014-07-11 Pedro Alves <palves@redhat.com>
6200
6201 * linux-low.c (kill_wait_lwp): New function, based on
6202 kill_one_lwp_callback, but use my_waitpid directly.
6203 (kill_one_lwp_callback, linux_kill): Use it.
6204
8e9db26e
PA
62052014-06-23 Pedro Alves <palves@redhat.com>
6206
6207 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6208 before setting DR0..DR3.
6209
698b3e08
GB
62102014-06-20 Gary Benson <gbenson@redhat.com>
6211
6212 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6213 * configure: Regenerated.
6214 * config.in: Likewise.
6215
125f8a3d
GB
62162014-06-20 Gary Benson <gbenson@redhat.com>
6217
6218 * Makefile.in (SFILES): Update locations for files moved
6219 from common to nat.
6220 (object file files): Reordered.
6221
42995dbd
GB
62222014-06-20 Gary Benson <gbenson@redhat.com>
6223
6224 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6225 (i386_dr_low_set_addr): Likewise.
6226 (i386_dr_low_get_addr): Likewise.
6227 (i386_dr_low_can_set_control): Likewise.
6228 (i386_dr_low_set_control): Likewise.
6229 (i386_dr_low_get_control): Likewise.
6230 (i386_dr_low_get_status): Likewise.
6231 (i386_get_debug_register_length): Likewise.
6232 * linux-x86-low.c (i386_dr_low_set_addr):
6233 Changed signature. Made static.
6234 (i386_dr_low_get_addr): Likewise.
6235 (i386_dr_low_set_control): Likewise.
6236 (i386_dr_low_get_control): Likewise.
6237 (i386_dr_low_get_status): Likewise.
6238 (i386_dr_low): New global variable.
6239 * win32-i386-low.c (i386_dr_low_set_addr):
6240 Changed signature. Made static.
6241 (i386_dr_low_get_addr): Likewise.
6242 (i386_dr_low_set_control): Likewise.
6243 (i386_dr_low_get_control): Likewise.
6244 (i386_dr_low_get_status): Likewise.
6245 (i386_dr_low): New global variable.
6246
e1d2394b
MS
62472014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6248
6249 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6250 * Makefile.in (AR, AR_FLAGS): Define.
6251 * configure: Regenerate.
6252
3a8ee006
GB
62532014-06-19 Gary Benson <gbenson@redhat.com>
6254
6255 * Makefile.in (i386-dregs.o): New rule.
6256 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6257 * i386-low.c (target.h): Remove include.
6258 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6259 (DR_CONTROL_SHIFT): Likewise.
6260 (DR_CONTROL_SIZE): Likewise.
6261 (DR_RW_EXECUTE): Likewise.
6262 (DR_RW_WRITE): Likewise.
6263 (DR_RW_READ): Likewise.
6264 (DR_RW_IORW): Likewise.
6265 (DR_LEN_1): Likewise.
6266 (DR_LEN_2): Likewise.
6267 (DR_LEN_4): Likewise.
6268 (DR_LEN_8): Likewise.
6269 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6270 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6271 (DR_ENABLE_SIZE): Likewise.
6272 (DR_LOCAL_SLOWDOWN): Likewise.
6273 (DR_GLOBAL_SLOWDOWN): Likewise.
6274 (DR_CONTROL_RESERVED): Likewise.
6275 (I386_DR_CONTROL_MASK): Likewise.
6276 (I386_DR_VACANT): Likewise.
6277 (I386_DR_LOCAL_ENABLE): Likewise.
6278 (I386_DR_GLOBAL_ENABLE): Likewise.
6279 (I386_DR_DISABLE): Likewise.
6280 (I386_DR_SET_RW_LEN): Likewise.
6281 (I386_DR_GET_RW_LEN): Likewise.
6282 (I386_DR_WATCH_HIT): Likewise.
6283 (i386_wp_op_t): Likewise.
6284 (i386_show_dr): Likewise.
6285 (i386_length_and_rw_bits): Likewise.
6286 (i386_insert_aligned_watchpoint): Likewise.
6287 (i386_remove_aligned_watchpoint): Likewise.
6288 (i386_handle_nonaligned_watchpoint): Likewise.
6289 i386_update_inferior_debug_regs(): Likewise.
6290 (i386_dr_insert_watchpoint): Likewise.
6291 (i386_dr_remove_watchpoint): Likewise.
6292 (i386_dr_region_ok_for_watchpoint): Likewise.
6293 (i386_dr_stopped_data_address): Likewise.
6294 (i386_dr_stopped_by_watchpoint): Likewise.
6295
8f26655c
GB
62962014-06-19 Gary Benson <gbenson@redhat.com>
6297
6298 * i386-low.c (i386_dr_show): Renamed to
6299 i386_show_dr and made static. All uses updated.
6300 (i386_dr_length_and_rw_bits): Renamed to
6301 i386_length_and_rw_bits and made static.
6302 All uses updated.
6303 (i386_dr_insert_aligned_watchpoint): Renamed to
6304 i386_insert_aligned_watchpoint and made static.
6305 All uses updated.
6306 (i386_dr_remove_aligned_watchpoint): Renamed to
6307 i386_remove_aligned_watchpoint and made static.
6308 All uses updated.
6309 (i386_dr_update_inferior_debug_regs): Renamed to
6310 i386_update_inferior_debug_regs and made static.
6311 All uses updated.
6312
b9228891
GB
63132014-06-18 Gary Benson <gbenson@redhat.com>
6314
5171def3
GB
6315 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6316 (i386_dr_low_can_set_control): Likewise.
6317 (i386_get_debug_register_length): Likewise.
6318 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6319 (i386_dr_low_can_set_control): Likewise.
6320 (i386_get_debug_register_length): Likewise.
6321
63222014-06-17 Gary Benson <gbenson@redhat.com>
6323
b9228891
GB
6324 * i386-low.h (i386-dregs.h): New include.
6325 (DR_FIRSTADDR): Now in i386-dregs.h.
6326 (DR_LASTADDR): Likewise.
6327 (DR_NADDR): Likewise.
6328 (DR_STATUS): Likewise.
6329 (DR_CONTROL): Likewise.
6330 (i386_debug_reg_state): Likewise.
6331 (i386_dr_insert_watchpoint): Likewise.
6332 (i386_dr_remove_watchpoint): Likewise.
6333 (i386_dr_region_ok_for_watchpoint): Likewise.
6334 (i386_dr_stopped_data_address): Likewise.
6335 (i386_dr_stopped_by_watchpoint): Likewise.
6336 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6337
4be83cc2
GB
63382014-06-18 Gary Benson <gbenson@redhat.com>
6339
6340 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6341 i386_dr_insert_watchpoint.
6342 (i386_low_remove_watchpoint): Renamed to
6343 i386_dr_remove_watchpoint.
6344 (i386_low_region_ok_for_watchpoint): Renamed to
6345 i386_dr_region_ok_for_watchpoint.
6346 (i386_low_stopped_data_address): Renamed to
6347 i386_dr_stopped_data_address.
6348 (i386_low_stopped_by_watchpoint): Renamed to
6349 i386_dr_stopped_by_watchpoint.
6350 * i386-low.c (i386_show_dr): Renamed to
6351 i386_dr_show and made nonstatic. All uses updated.
6352 (i386_length_and_rw_bits): Renamed to
6353 i386_dr_length_and_rw_bits and made nonstatic.
6354 All uses updated.
6355 (i386_insert_aligned_watchpoint): Renamed to
6356 i386_dr_insert_aligned_watchpoint and made nonstatic.
6357 All uses updated.
6358 (i386_remove_aligned_watchpoint): Renamed to
6359 i386_dr_remove_aligned_watchpoint and made nonstatic.
6360 All uses updated.
6361 (i386_update_inferior_debug_regs): Renamed to
6362 i386_dr_update_inferior_debug_regs and made nonstatic.
6363 All uses updated.
6364 (i386_low_insert_watchpoint): Renamed to
6365 i386_dr_insert_watchpoint. All uses updated.
6366 (i386_low_remove_watchpoint): Renamed to
6367 i386_dr_remove_watchpoint. All uses updated.
6368 (i386_low_region_ok_for_watchpoint): Renamed to
6369 i386_dr_region_ok_for_watchpoint. All uses updated.
6370 (i386_low_stopped_data_address): Renamed to
6371 i386_dr_stopped_data_address. All uses updated.
6372 (i386_low_stopped_by_watchpoint): Renamed to
6373 i386_dr_stopped_by_watchpoint. All uses updated.
6374
131aa0d4
GB
63752014-06-18 Gary Benson <gbenson@redhat.com>
6376
6377 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6378 (i386_dr_low_can_set_control): Likewise.
6379 (i386_insert_aligned_watchpoint): New check.
6380
d9305f7f
GB
63812014-06-18 Gary Benson <gbenson@redhat.com>
6382
6383 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6384 Renamed to state.
6385
e927c9fc
GB
63862014-06-18 Gary Benson <gbenson@redhat.com>
6387
6388 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6389 instead of fatal and error.
6390 (i386_handle_nonaligned_watchpoint): Likewise.
6391
1b6d4134
GB
63922014-06-18 Gary Benson <gbenson@redhat.com>
6393
6394 * i386-low.c (i386_get_debug_register_length): New macro.
6395 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6396 (i386_show_dr): Use debug_printf instead of fprintf. Use
6397 phex to format values.
6398
6e62758f
GB
63992014-06-18 Gary Benson <gbenson@redhat.com>
6400
6401 * i386-low.h: Comment changes.
6402 * i386-low.c: Likewise.
6403
fc6e2f03
GB
64042014-06-18 Gary Benson <gbenson@redhat.com>
6405
6406 * i386-low.c: Whitespace changes.
6407
f9d1eeed
TT
64082014-06-12 Tom Tromey <tromey@redhat.com>
6409
6410 * utils.c (freeargv): Remove.
6411
0b04e523
TT
64122014-06-12 Tom Tromey <tromey@redhat.com>
6413
6414 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6415 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6416 (parse_debug_format_options): Likewise.
6417 (gdbserver_usage): Likewise.
6418 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6419 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6420 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6421 against libiberty.
6422 ($(LIBGNU)): Depend on libiberty.
6423 (all-lib): Recurse into all subdirs.
6424 (install-only): Invoke "install" target in subdirs.
6425 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6426 targets.
6427 * configure: Rebuild.
6428 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6429 for vasprintf, vsnprintf, or gettimeofday.
6430 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6431 srv_tgtobj.
6432
270c9937
JB
64332014-06-05 Joel Brobecker <brobecker@adacore.com>
6434
6435 * development.sh: Delete.
6436 * Makefile.in (config.status): Adjust dependency on development.sh.
6437 * configure.ac: Adjust development.sh source call.
6438 * configure: Regenerate.
6439
0a261ed8
PA
64402014-06-02 Pedro Alves <palves@redhat.com>
6441
6442 * ax.c (gdb_free_agent_expr): New function.
6443 * ax.h (gdb_free_agent_expr): New declaration.
6444 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6445 list.
6446 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6447 static.
6448 (clear_breakpoint_conditions_and_commands): New function.
6449 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6450 (clear_breakpoint_conditions_and_commands): New declaration.
6451
e9dae05e
RR
64522014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6453
6454 * linux-aarch64-low.c (asm/ptrace.h): Include.
6455
5876f503
JK
64562014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6457
6458 Fix TLS access for -static -pthread.
6459 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6460 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6461 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6462
802e8e6d
PA
64632014-05-20 Pedro Alves <palves@redhat.com>
6464
6465 * linux-aarch64-low.c (aarch64_insert_point)
6466 (aarch64_remove_point): No longer check whether the type is
6467 supported here. Adjust to new interface.
6468 (the_low_target): Install aarch64_supports_z_point_type as
6469 supports_z_point_type method.
6470 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6471 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6472 instead of a Z packet char. Adjust.
6473 (arm_supports_z_point_type): New function.
6474 (arm_insert_point, arm_remove_point): Adjust to new interface.
6475 (the_low_target): Install arm_supports_z_point_type.
6476 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6477 (cris_insert_point, cris_remove_point): Adjust to new interface.
6478 Don't check whether the type is supported here.
6479 (the_low_target): Install cris_supports_z_point_type.
6480 * linux-low.c (linux_supports_z_point_type): New function.
6481 (linux_insert_point, linux_remove_point): Adjust to new interface.
6482 * linux-low.h (struct linux_target_ops) <insert_point,
6483 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6484 raw_breakpoint pointer parameter.
6485 <supports_z_point_type>: New method.
6486 * linux-mips-low.c (mips_supports_z_point_type): New function.
6487 (mips_insert_point, mips_remove_point): Adjust to new interface.
6488 Use mips_supports_z_point_type.
6489 (the_low_target): Install mips_supports_z_point_type.
6490 * linux-ppc-low.c (the_low_target): Install NULL as
6491 supports_z_point_type method.
6492 * linux-s390-low.c (the_low_target): Install NULL as
6493 supports_z_point_type method.
6494 * linux-sparc-low.c (the_low_target): Install NULL as
6495 supports_z_point_type method.
6496 * linux-x86-low.c (x86_supports_z_point_type): New function.
6497 (x86_insert_point): Adjust to new insert_point interface. Use
6498 insert_memory_breakpoint. Adjust to new
6499 i386_low_insert_watchpoint interface.
6500 (x86_remove_point): Adjust to remove_point interface. Use
6501 remove_memory_breakpoint. Adjust to new
6502 i386_low_remove_watchpoint interface.
6503 (the_low_target): Install x86_supports_z_point_type.
6504 * lynx-low.c (lynx_target_ops): Install NULL as
6505 supports_z_point_type callback.
6506 * nto-low.c (nto_supports_z_point_type): New.
6507 (nto_insert_point, nto_remove_point): Adjust to new interface.
6508 (nto_target_ops): Install nto_supports_z_point_type.
6509 * mem-break.c: Adjust intro comment.
6510 (struct raw_breakpoint) <raw_type, size>: New fields.
6511 <inserted>: Update comment.
6512 <shlib_disabled>: Delete field.
6513 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6514 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6515 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6516 (raw_bkpt_type_to_target_hw_bp_type): New function.
6517 (find_enabled_raw_code_breakpoint_at): New function.
6518 (find_raw_breakpoint_at): New type and size parameters. Use them.
6519 (insert_memory_breakpoint): New function, based off
6520 set_raw_breakpoint_at.
6521 (remove_memory_breakpoint): New function.
6522 (set_raw_breakpoint_at): Reimplement.
6523 (set_breakpoint): New, based on set_breakpoint_at.
6524 (set_breakpoint_at): Reimplement.
6525 (delete_raw_breakpoint): Go through the_target->remove_point
6526 instead of assuming memory breakpoints.
6527 (find_gdb_breakpoint_at): Delete.
6528 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6529 (find_gdb_breakpoint): New function.
6530 (set_gdb_breakpoint_at): Delete.
6531 (z_type_supported): New function.
6532 (set_gdb_breakpoint_1): New function, loosely based off
6533 set_gdb_breakpoint_at.
6534 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6535 (delete_gdb_breakpoint_at): Delete.
6536 (delete_gdb_breakpoint_1): New function, loosely based off
6537 delete_gdb_breakpoint_at.
6538 (delete_gdb_breakpoint): New function.
6539 (clear_gdb_breakpoint_conditions): Rename to ...
6540 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6541 breakpoint.
6542 (add_condition_to_breakpoint): Make static.
6543 (add_breakpoint_condition): Take a struct breakpoint pointer
6544 instead of an address. Adjust.
6545 (gdb_condition_true_at_breakpoint): Rename to ...
6546 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6547 z_type parameter.
6548 (gdb_condition_true_at_breakpoint): Reimplement.
6549 (add_breakpoint_commands): Take a struct breakpoint pointer
6550 instead of an address. Adjust.
6551 (gdb_no_commands_at_breakpoint): Rename to ...
6552 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6553 parameter. Return true if no breakpoint was found. Change debug
6554 output.
6555 (gdb_no_commands_at_breakpoint): Reimplement.
6556 (run_breakpoint_commands): Rename to ...
6557 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6558 and change return type to boolean.
6559 (run_breakpoint_commands): New function.
6560 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6561 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6562 breakpoint. Go through the_target->remove_point instead of
6563 assuming memory breakpoint.
6564 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6565 software and hardware breakpoints.
6566 (reinsert_raw_breakpoint): Go through the_target->insert_point
6567 instead of assuming memory breakpoint.
6568 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6569 software and hardware breakpoints.
6570 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6571 Check both software and hardware breakpoints.
6572 (validate_inserted_breakpoint): Assert the breakpoint is a
6573 software breakpoint. Set the inserted flag to -1 instead of
6574 setting shlib_disabled.
6575 (delete_disabled_breakpoints): Adjust.
6576 (validate_breakpoints): Only validate software breakpoints.
6577 Adjust to inserted flag change.
6578 (check_mem_read, check_mem_write): Skip breakpoint types other
6579 than software breakpoints. Adjust to inserted flag change.
6580 * mem-break.h (enum raw_bkpt_type): New enum.
6581 (raw_breakpoint, struct process_info): Forward declare.
6582 (Z_packet_to_target_hw_bp_type): Delete declaration.
6583 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6584 (set_gdb_breakpoint, delete_gdb_breakpoint)
6585 (clear_breakpoint_conditions): New declarations.
6586 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6587 (breakpoint_inserted_here): Update comment.
6588 (add_breakpoint_condition, add_breakpoint_commands): Replace
6589 address parameter with a breakpoint pointer parameter.
6590 (gdb_breakpoint_here): Update comment.
6591 (delete_gdb_breakpoint_at): Delete.
6592 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6593 * server.c (process_point_options): Take a struct breakpoint
6594 pointer instead of an address. Adjust.
6595 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6596 delete_gdb_breakpoint.
6597 * spu-low.c (spu_target_ops): Install NULL as
6598 supports_z_point_type method.
6599 * target.h: Include mem-break.h.
6600 (struct target_ops) <prepare_to_access_memory>: Update comment.
6601 <supports_z_point_type>: New field.
6602 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6603 instead of a char. Also take a raw breakpoint pointer.
6604 * win32-arm-low.c (the_low_target): Install NULL as
6605 supports_z_point_type.
6606 * win32-i386-low.c (i386_supports_z_point_type): New function.
6607 (i386_insert_point, i386_remove_point): Adjust to new interface.
6608 (the_low_target): Install i386_supports_z_point_type.
6609 * win32-low.c (win32_supports_z_point_type): New function.
6610 (win32_insert_point, win32_remove_point): Adjust to new interface.
6611 (win32_target_ops): Install win32_supports_z_point_type.
6612 * win32-low.h (struct win32_target_ops):
6613 <supports_z_point_type>: New method.
6614 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6615 instead of a char. Also take a raw breakpoint pointer.
6616
932539e3
PA
66172014-05-20 Pedro Alves <palves@redhat.com>
6618
6619 * mem-break.h: Include break-common.h.
6620 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6621 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6622 (Z_packet_to_target_hw_bp_type): New declaration.
6623 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6624 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6625 (Z_PACKET_ACCESS_WP): Delete macros.
6626 (Z_packet_to_hw_type): Delete function.
6627 * i386-low.h: Don't include break-common.h here.
6628 (Z_packet_to_hw_type): Delete declaration.
6629 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6630 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6631 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6632 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6633 * linux-aarch64-low.c: Don't include break-common.h here.
6634 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6635 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6636 (Z_packet_to_target_hw_bp_type): Delete function.
6637 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6638 function.
6639 (mips_insert_point, mips_remove_point): Use
6640 Z_packet_to_target_hw_bp_type.
6641
4ff0d3d8
PA
66422014-05-20 Pedro Alves <palves@redhat.com>
6643
6644 * linux-aarch64-low.c: Include break-common.h.
6645 (enum target_point_type): Delete.
6646 (Z_packet_to_point_type): Rename to ...
6647 (Z_packet_to_target_hw_bp_type): ... this, and return a
6648 target_hw_bp_type instead.
6649 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6650 instead of an enum target_point_type.
6651 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6652 breakpoint type.
6653 (aarch64_dr_state_insert_one_point)
6654 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6655 (aarch64_handle_aligned_watchpoint)
6656 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6657 Take an enum target_hw_bp_type instead of an enum
6658 target_point_type.
6659 (aarch64_supports_z_point_type): New function.
6660 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6661 use Z_packet_to_target_hw_bp_type.
6662
786dc519
JB
66632014-05-20 Joel Brobecker <brobecker@adacore.com>
6664
6665 * configure.ac: Only use -Werror by default when DEVELOPMENT
6666 is true.
6667 * configure: Regenerate.
6668
9e0aa64f
JK
66692014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6670
6671 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6672 * linux-x86-low.c (X86_64_USER_REGS): New.
6673 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6674
2b577b92
YQ
66752014-04-28 Yao Qi <yao@codesourcery.com>
6676
6677 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6678 name.
6679
94611da2
PA
66802014-04-25 Pedro Alves <palves@redhat.com>
6681
6682 PR server/16255
6683 * linux-low.c (linux_attach_fail_reason_string): New function.
6684 (linux_attach_lwp): Delete.
6685 (linux_attach_lwp_1): Rename to ...
6686 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6687 argument. Remove "initial" parameter. Return int instead of
6688 void. Don't error or warn here.
6689 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6690 failure to attach to the tgid. Call warning when failing to
6691 attach to an lwp.
6692 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6693 argument. Remove "initial" parameter. Return int instead of
6694 void. Don't error or warn here.
6695 (linux_attach_fail_reason_string): New declaration.
6696 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6697 interface change. Use linux_attach_fail_reason_string.
6698
01f9f808
MS
66992014-04-24 Michael Sturm <michael.sturm@mintel.com>
6700 Walfred Tedeschi <walfred.tedeschi@intel.com>
6701
6702 * Makefile.in: Added rules to handle new files
6703 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6704 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6705 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6706 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6707 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6708 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6709 x32-avx512-linux.o.
6710 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6711 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6712 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6713 i386/x32-avx512.xml.
6714 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6715 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6716 i386/x32-avx512-linux.xml.
6717 * i387-fp.c (num_avx512_k_registers): New constant for number
6718 of K registers.
6719 (num_avx512_zmmh_low_registers): New constant for number of
6720 lower ZMM registers (0-15).
6721 (num_avx512_zmmh_high_registers): New constant for number of
6722 higher ZMM registers (16-31).
6723 (num_avx512_ymmh_registers): New contant for number of higher
6724 YMM registers (ymm16-31 added by avx521 on x86_64).
6725 (num_avx512_xmm_registers): New constant for number of higher
6726 XMM registers (xmm16-31 added by AVX512 on x86_64).
6727 (struct i387_xsave): Add space for AVX512 registers.
6728 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6729 Add code to handle AVX512 registers.
6730 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6731 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6732 prototypei from generated file.
6733 (tdesc_amd64_avx512_linux): Likewise.
6734 (init_registers_x32_avx512_linux): Likewise.
6735 (tdesc_x32_avx512_linux): Likewise.
6736 (init_registers_i386_avx512_linux): Likewise.
6737 (tdesc_i386_avx512_linux): Likewise.
6738 (x86_64_regmap): Add AVX512 registers.
6739 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6740 mask.
6741 (initialize_low_arch): Add code to initialize AVX512 registers.
6742
51aa91f9
PA
67432014-04-23 Pedro Alves <palves@redhat.com>
6744
6745 * mem-break.c (find_gdb_breakpoint_at): Make static.
6746 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6747
a4165e94
PA
67482014-04-23 Pedro Alves <palves@redhat.com>
6749
6750 * i386-low.c: Don't include break-common.h here.
6751 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6752 prototype to take target_hw_bp_type as argument instead of a Z
6753 packet char.
6754 * i386-low.h: Include break-common.h here.
6755 (Z_packet_to_hw_type): Declare.
6756 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6757 prototypes.
6758 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6759 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6760 (x86_remove_point): Convert the packet number to a
6761 target_hw_bp_type before calling i386_low_remove_watchpoint.
6762 * win32-i386-low.c (i386_insert_point): Convert the packet number
6763 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6764 (i386_remove_point): Convert the packet number to a
6765 target_hw_bp_type before calling i386_low_remove_watchpoint.
6766
b8acf843
PA
67672014-04-23 Pedro Alves <palves@redhat.com>
6768
6769 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6770
d708bcd1
PA
67712014-04-10 Pedro Alves <palves@redhat.com>
6772
6773 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6774 Check if the condition or command is NULL before checking if the
6775 breakpoint is known. On success, return true.
6776 * mem-break.h (add_breakpoint_condition): Document return.
6777 (add_breakpoint_commands): Add describing comment.
6778 * server.c (skip_to_semicolon): New function.
6779 (process_point_options): Use it.
6780
2eec7d5b
PA
67812014-04-09 Pedro Alves <palves@redhat.com>
6782
6783 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6784 to lwpid_of.
6785
fa96cb38
PA
67862014-02-27 Pedro Alves <palves@redhat.com>
6787
6788 PR 12702
6789 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6790 macros.
6791 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6792 output.
6793 (last_thread_of_process_p): Take a PID argument instead of a
6794 thread pointer.
6795 (linux_wait_for_lwp): Delete.
6796 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6797 functions.
6798 (linux_low_filter_event): New function, party factored out from
6799 linux_wait_for_event.
6800 (linux_wait_for_event): Rename to ...
6801 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6802 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6803 sigsuspend. Check for zombie leaders.
6804 (linux_wait_for_event): Reimplement as wrapper around
6805 linux_wait_for_event_filtered.
6806 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6807 a normal or signal exit is seen, it's the whole process exiting.
6808 (wait_for_sigstop): No longer a for_each_inferior callback.
6809 Rewrite on top of linux_wait_for_event_filtered.
6810 (stop_all_lwps): Call wait_for_sigstop directly.
6811 * server.c (resume, handle_target_event): Handle
6812 TARGET_WAITKIND_NO_RESUMED.
6813
d763de10
JB
68142014-02-26 Joel Brobecker <brobecker@adacore.com>
6815
6816 * win32-low.c (psapi_get_dll_name,
6817 * win32_CreateToolhelp32Snapshot): Delete.
6818 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6819 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6820 Delete.
6821 (handle_load_dll): Add function description.
6822 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6823
850a0f76
JB
68242014-02-26 Joel Brobecker <brobecker@adacore.com>
6825
6826 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6827 Add comment.
6828 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6829 base address when calling win32_add_one_solib.
6830 (handle_load_dll): Delete local variable load_addr.
6831 Remove 0x1000 offset applied to DLL base address when calling
6832 win32_add_one_solib.
6833 (handle_unload_dll): Add comment.
6834
f25b3fc3
JB
68352014-02-26 Joel Brobecker <brobecker@adacore.com>
6836
6837 * win32-low.c (win32_add_all_dlls): Renames
6838 win32_ensure_ntdll_loaded. Rewrite function documentation.
6839 Adjust implementation to always load all DLLs.
6840 Add 0x1000 offset to DLL base address when calling
6841 win32_add_one_solib.
6842 (child_initialization_done): New static global.
6843 (do_initial_child_stuff): Set child_initialization_done to
6844 zero during child initialization, and 1 after. Replace call
6845 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6846 Add comment.
6847 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6848 (handle_unload_dll): Add function documentation.
6849 (get_child_debug_event): Ignore load and unload DLL events
6850 during child initialization.
6851
d86d4aaf
DE
68522014-02-20 Doug Evans <dje@google.com>
6853
3bc32da3 6854 Remove global all_lwps.
d86d4aaf
DE
6855 * inferiors.h (ptid_of): Move here from linux-low.h.
6856 (pid_of, lwpid_of): Ditto.
6857 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6858 parameter is a struct thread_info * now.
6859 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6860 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6861 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6862 directly.
6863 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6864 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6865 * linux-arm-low.c (update_registers_callback): Update, "entry"
6866 parameter is a struct thread_info * now.
6867 Fetch lwpid from current_inferior directly.
6868 (arm_insert_point): Pass &all_threads to find_inferior instead of
6869 &all_lwps.
6870 (arm_remove_point): Ditto.
6871 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6872 (arm_prepare_to_resume): Fetch pid from thread.
6873 (arm_read_description): Fetch lwpid from current_inferior directly.
6874 * linux-low.c (all_lwps): Delete.
6875 (delete_lwp): Delete call to remove_inferior.
6876 (handle_extended_wait): Fetch lwpid from thread.
6877 (add_lwp): Don't set lwp->entry.id. Remove call to
6878 add_inferior_to_list.
6879 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6880 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6881 (kill_one_lwp_callback): Ditto.
6882 (linux_kill): Don't dereference NULL pointer.
6883 Fetch ptid,lwpid from thread.
6884 (get_detach_signal): Fetch ptid from thread.
6885 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6886 Simplify call to regcache_invalidate_thread.
6887 (delete_lwp_callback): Update, "entry" parameter is a
6888 struct thread_info * now. Fetch pid from thread.
6889 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6890 (status_pending_p_callback): Update, "entry" parameter is a
6891 struct thread_info * now. Fetch ptid from thread.
6892 (find_lwp_pid): Update, "entry" parameter is a
6893 struct thread_info * now.
6894 (linux_wait_for_lwp): Fetch pid from thread.
6895 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6896 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6897 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6898 (dequeue_one_deferred_signal): Ditto.
6899 (cancel_breakpoint): Fetch ptid from current_inferior.
6900 (linux_wait_for_event): Pass &all_threads to find_inferior,
6901 not &all_lwps. Fetch ptid, lwpid from thread.
6902 (count_events_callback): Update, "entry" parameter is a
6903 struct thread_info * now.
6904 (select_singlestep_lwp_callback): Ditto.
6905 (select_event_lwp_callback): Ditto.
6906 (cancel_breakpoints_callback): Ditto.
6907 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6908 not &all_lwps.
6909 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6910 (unsuspend_one_lwp): Update, "entry" parameter is a
6911 struct thread_info * now.
6912 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6913 not &all_lwps.
6914 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6915 Fetch lwpid from thread, not lwp.
6916 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6917 Pass &all_threads to find_inferior, not &all_lwps.
6918 (send_sigstop): Fetch lwpid from thread, not lwp.
6919 (send_sigstop_callback): Update, "entry" parameter is a
6920 struct thread_info * now.
6921 (suspend_and_send_sigstop_callback): Ditto.
6922 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6923 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6924 struct thread_info * now.
6925 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6926 from thread, lwp.
6927 (lwp_running): Update, "entry" parameter is a
6928 struct thread_info * now.
6929 (stop_all_lwps): Fetch ptid from thread.
6930 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6931 (linux_resume_one_lwp): Fetch lwpid from thread.
6932 (linux_set_resume_request): Update, "entry" parameter is a
6933 struct thread_info * now. Fetch pid, lwpid from thread.
6934 (resume_status_pending_p): Update, "entry" parameter is a
6935 struct thread_info * now.
6936 (need_step_over_p): Ditto. Fetch lwpid from thread.
6937 (start_step_over): Fetch lwpid from thread.
6938 (linux_resume_one_thread): Update, "entry" parameter is a
6939 struct thread_info * now. Fetch lwpid from thread.
6940 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6941 (proceed_one_lwp): Update, "entry" parameter is a
6942 struct thread_info * now. Fetch lwpid from thread.
6943 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6944 struct thread_info * now.
6945 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6946 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6947 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6948 directly.
6949 (regsets_store_inferior_registers): Ditto.
6950 (fetch_register, store_register): Ditto.
6951 (linux_read_memory, linux_write_memory): Ditto.
6952 (linux_request_interrupt): Ditto.
6953 (linux_read_auxv): Ditto.
6954 (linux_xfer_siginfo): Ditto.
6955 (linux_qxfer_spu): Ditto.
6956 (linux_qxfer_libraries_svr4): Ditto.
6957 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6958 moved to inferiors.h.
6959 (get_lwp): Delete.
6960 (get_thread_lwp): Update.
6961 (struct lwp_info): Delete member "entry". Simplify comment for
6962 member "thread".
6963 (all_lwps): Delete.
6964 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6965 current_inferior directly.
6966 (update_watch_registers_callback): Update, "entry" parameter is a
6967 struct thread_info * now. Fetch pid from thread.
6968 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6969 (mips_insert_point): Fetch lwpid from current_inferior.
6970 Pass &all_threads to find_inferior, not &all_lwps.
6971 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6972 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6973 directly.
6974 (mips_stopped_data_address): Ditto.
6975 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6976 directly.
6977 * linux-tile-low.c (tile_arch_setup): Ditto.
6978 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6979 (update_debug_registers_callback): Update, "entry" parameter is a
6980 struct thread_info * now. Fetch pid from thread.
6981 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6982 Pass &all_threads to find_inferior, not &all_lwps.
6983 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6984 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6985 Pass &all_threads to find_inferior, not &all_lwps.
6986 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6987 (i386_dr_low_get_status): Ditto.
6988 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6989 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6990 (x86_linux_read_description): Ditto.
6991 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6992
3b8361aa
DE
69932014-02-20 Doug Evans <dje@google.com>
6994
6995 * inferiors.c (get_first_inferior): Fix buglet.
6996
f7667f0d
DE
69972014-02-19 Doug Evans <dje@google.com>
6998
6999 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7000 * inferiors.c (add_thread): Change result type to struct thread_info *.
7001 All callers updated.
7002 (add_lwp): Call add_thread here instead of in callers.
7003 All callers updated.
7004 * linux-low.h (get_lwp_thread): Rewrite.
7005 (struct lwp_info): New member "thread".
7006
b3312d80
DE
70072014-02-19 Doug Evans <dje@google.com>
7008
7009 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7010 All callers updated.
7011
ecc6f45c
DE
70122014-02-19 Doug Evans <dje@google.com>
7013
7014 * inferiors.c (add_thread): Fix whitespace.
7015
649ebbca
DE
70162014-02-19 Doug Evans <dje@google.com>
7017
7018 * dll.c (clear_dlls): Replace accessing list implemention details
7019 with API function.
7020 * gdbthread.h (get_first_thread): Declare.
7021 * inferiors.c (for_each_inferior_with_data): New function.
7022 (get_first_thread): New function.
7023 (find_thread_ptid): Simplify.
7024 (get_first_inferior): New function.
7025 (clear_list): Delete.
7026 (one_inferior_p): New function.
7027 (clear_inferior_list): New function.
7028 (clear_inferiors): Update.
7029 * inferiors.h (for_each_inferior_with_data): Declare.
7030 (clear_inferior_list): Declare.
7031 (one_inferior_p): Declare.
7032 (get_first_inferior): Declare.
7033 * linux-low.c (linux_wait_for_event): Replace accessing list
7034 implemention details with API function.
7035 * server.c (target_running): Ditto.
7036 (accumulate_file_name_length): New function.
7037 (emit_dll_description): New function.
7038 (handle_qxfer_libraries): Replace accessing list implemention
7039 details with API function.
7040 (handle_qxfer_threads_worker): New function.
7041 (handle_qxfer_threads_proper): Replace accessing list implemention
7042 details with API function.
7043 (handle_query): Ditto.
7044 (visit_actioned_threads_callback_ftype): New typedef.
7045 (visit_actioned_threads_data): New struct.
7046 (visit_actioned_threads): Rewrite to be find_inferior callback.
7047 (resume): Call find_inferior.
7048 (handle_status): Replace accessing list implemention
7049 details with API function.
7050 (process_serial_event): Replace accessing list implemention details
7051 with API function.
7052 * target.c (set_desired_inferior): Replace accessing list implemention
7053 details with API function.
7054 * tracepoint.c (same_process_p): New function.
7055 (gdb_agent_about_to_close): Replace accessing list implemention
7056 details with API function.
7057 * win32-low.c (child_delete_thread): Replace accessing list
7058 implemention details with API function.
7059 (match_dll_by_basename): New function.
7060 (dll_is_loaded_by_basename): New function.
7061 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7062 details call to dll_is_loaded_by_basename.
7063
80894984
DE
70642014-02-19 Doug Evans <dje@google.com>
7065
7066 * dll.h (struct dll_info): Add comment.
7067 * gdbthread.h (struct thread_info): Add comment.
7068 (current_ptid): Simplify.
7069 * inferiors.c (add_process): Update.
7070 (remove_process): Update.
7071 * inferiors.h (struct process_info): Rename member "head" to "entry".
7072 * linux-low.c (delete_lwp): Update.
7073 (add_lwp): Update.
7074 (last_thread_of_process_p): Update.
7075 (kill_one_lwp_callback, linux_kill): Update.
7076 (status_pending_p_callback): Update.
7077 (wait_for_sigstop): Update. Simplify read of ptid.
7078 (start_step_over): Update.
7079 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7080 (get_lwp_thread): Update.
7081 (struct lwp_info): Rename member "head" to "entry".
7082 * regcache.h (inferior_list_entry): Delete.
7083 * server.c (kill_inferior_callback): Update.
7084 (detach_or_kill_inferior_callback): Update.
7085 (print_started_pid): Update.
7086 (print_attached_pid): Update.
7087 (process_serial_event): Simplify read of ptid.
7088 * thread-db.c (thread_db_create_event): Update.
7089 (thread_db_get_tls_address): Update.
7090 * win32-low.c (current_inferior_ptid): Simplify.
7091
46917d26
TT
70922014-02-19 Tom Tromey <tromey@redhat.com>
7093
7094 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7095 argument.
7096 (target_supports_btrace): Update.
7097
0759a81e
YQ
70982014-02-14 Yao Qi <yao@codesourcery.com>
7099
7100 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7101 (rsp-low-ipa.o): New target.
7102
a7191e8b
TT
71032014-02-12 Tom Tromey <tromey@redhat.com>
7104
7105 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7106 convert_ascii_to_int.
7107 * regcache.c (registers_to_string): Likewise.
7108 * remote-utils.c (decode_M_packet): Likewise.
7109 * server.c (process_serial_event): Likewise.
7110
ff0e980e
TT
71112014-02-12 Tom Tromey <tromey@redhat.com>
7112
7113 * server.c (handle_query, handle_v_run): Use hex2bin, not
7114 unhexify.
7115 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7116
e9371aff
TT
71172014-02-12 Tom Tromey <tromey@redhat.com>
7118
7119 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7120 convert_int_to_ascii.
7121 * regcache.c (registers_to_string, collect_register_as_string):
7122 Likewise.
7123 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7124 Likewise.
7125 * server.c (process_serial_event): Likewise.
7126 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7127 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7128
971dc0b8
TT
71292014-02-12 Tom Tromey <tromey@redhat.com>
7130
7131 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7132 bin2hex, not hexify.
7133 * tracepoint.c (cmd_qtstatus): Likewise.
7134
0a822afb
TT
71352014-02-12 Tom Tromey <tromey@redhat.com>
7136
7137 * remote-utils.c (monitor_output): Pass explicit length to
7138 hexify.
7139
9c3d6531
TT
71402014-02-12 Tom Tromey <tromey@redhat.com>
7141
7142 * tracepoint.c: Include rsp-low.h.
7143 * server.c: Include rsp-low.h.
7144 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7145 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7146 declare.
7147 * remote-utils.c: Include rsp-low.h.
7148 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7149 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7150 (convert_int_to_ascii, convert_ascii_to_int): Move to
7151 common/rsp-low.c.
7152 * regcache.c: Include rsp-low.h.
7153 * ax.c: Include rsp-low.h.
7154 * Makefile.in (SFILES): Add common/rsp-low.c.
7155 (OBS): Add rsp-low.o.
7156 (rsp-low.o): New target.
7157
01fd3ea5
TT
71582014-02-12 Tom Tromey <tromey@redhat.com>
7159
7160 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7161 Include print-utils.h.
7162 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7163 (plongest, thirty_two, phex_nz): Remove.
7164 * Makefile.in (SFILES): Add common/print-utils.c.
7165 (OBS): Add print-utils.o.
7166 (print-utils-ipa.o): New target.
7167 (print-utils.o): New target.
7168 (IPA_OBJS): Add print-utils-ipa.o.
7169
e99dc820
TT
71702014-02-06 Tom Tromey <tromey@redhat.com>
7171
7172 * Makefile.in (SFILES): Fix indentation.
7173
ee1e2d4f
DE
71742014-02-05 Doug Evans <dje@google.com>
7175
7176 * linux-low.c (linux_wait_for_event): Improve comment.
7177 (linux_wait_1): Keep current_inferior in sync with event_child.
7178
f5a02773
DE
71792014-01-22 Doug Evans <dje@google.com>
7180
7181 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7182
87ce2a04
DE
71832014-01-22 Doug Evans <dje@google.com>
7184
7185 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7186 * configure: Regenerate.
7187 * config.in: Regenerate.
7188 * Makefile.in (SFILES): Add debug.c.
7189 (OBS): Add debug.o.
7190 * debug.c: New file.
7191 * debug.h: New file.
7192 * linux-aarch64-low.c (*): Update all debugging printfs to use
7193 debug_printf instead of fprintf.
7194 * linux-arm-low.c (*): Ditto.
7195 * linux-cris-low.c (*): Ditto.
7196 * linux-crisv32-low.c (*): Ditto.
7197 * linux-m32r-low.c (*): Ditto.
7198 * linux-sparc-low.c (*): Ditto.
7199 * linux-x86.c (*): Ditto.
7200 * linux-low.c (*): Ditto.
7201 (linux_wait_1): Add calls to debug_enter, debug_exit.
7202 (linux_wait): Remove redundant debugging printf.
7203 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7204 (linux_resume, unstop_all_lwps): Ditto.
7205 * mem-break.c (*): Update all debugging printfs to use
7206 debug_printf instead of fprintf.
7207 * remote-utils.c (*): Ditto.
7208 * thread-db.c (*): Ditto.
7209 * server.c #include <ctype.h>, "gdb_vecs.h".
7210 (debug_threads): Moved to debug.c.
7211 (*): Update all debugging printfs to use debug_printf instead of
7212 fprintf.
7213 (start_inferior): Replace call to fflush with call to debug_flush.
7214 (monitor_show_help): Mention set debug-format.
7215 (parse_debug_format_options): New function.
7216 (handle_monitor_command): Handle "monitor set debug-format".
7217 (gdbserver_usage): Mention --debug-format.
7218 (main): Parse --debug-format.
7219 * server.h (debug_threads): Declaration moved to debug.h.
7220 #include "debug.h".
7221 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7222 trace_debug_1 that uses debug_printf.
7223 (tracepoint_look_up_symbols): Update all debugging printfs to use
7224 debug_printf instead of fprintf.
7225
e671835b
BS
72262014-01-20 Baruch Siach <baruch@tkos.co.il>
7227
7228 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7229 sys/ptrace.h.
7230
b5737fa9
PA
72312014-01-17 Pedro Alves <palves@redhat.com>
7232
ea38d2a9 7233 PR build/16445
c7faa97a
PA
7234 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7235 defined after including gdb_proc_service.h.
b5737fa9 7236
40ed484e
DE
72372014-01-16 Doug Evans <dje@google.com>
7238
7239 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7240 (match_dll): Use it.
7241
969c39fb
MM
72422014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7243
7244 * target.h (target_ops) <read_btrace>: Change parameters and
7245 return type to allow error reporting.
7246 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7247 trace reading errors on.
7248 * linux-low.c (linux_low_read_btrace): Pass trace reading
7249 errors on.
7250 (linux_low_disable_btrace): New.
7251
ab7f45ba
DE
72522014-01-15 Doug Evans <dje@google.com>
7253
7254 * inferiors.c (thread_id_to_gdb_id): Delete.
7255 * inferiors.h (thread_id_to_gdb_id): Delete.
7256
66af0f44
EZ
72572014-01-13 Eli Zaretskii <eliz@gnu.org>
7258
7259 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7260 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7261 versions.
7262
9939e131
PA
72632014-01-08 Pedro Alves <palves@redhat.com>
7264
7265 * server.c (handle_status): Don't discard previous queued stop
7266 replies or thread's pending status here.
7267 (main) <disconnection>: Do it here instead.
7268
b7ea362b
PA
72692014-01-08 Pedro Alves <palves@redhat.com>
7270
7271 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7272 * server.c (visit_actioned_threads, handle_pending_status): New
7273 function.
7274 (handle_v_cont): Factor out parts to ...
7275 (resume): ... this new function. If in all-stop, and a thread
7276 being resumed has a pending status, report it without actually
7277 resuming.
7278 (myresume): Adjust to use the new 'resume' function.
7279 (clear_pending_status_callback, set_pending_status_callback)
7280 (find_status_pending_thread_callback): New functions.
7281 (handle_status): Handle the case of multiple threads having
7282 interesting statuses to report. Report threads' real last signal
7283 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7284 with an interesting thread to report the status for, instead of
7285 always reporting the status of the first thread.
7286
28498c42
JB
72872014-01-01 Joel Brobecker <brobecker@adacore.com>
7288
7289 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7290 * gdbreplay.c (gdbreplay_version): Likewise.
7291
f45c82da
YZ
72922013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7293
7294 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7295 iov.iov_len with the real length in use.
7296
379a5e2d
JB
72972013-12-13 Joel Brobecker <brobecker@adacore.com>
7298
7299 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7300 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7301 for all targets that use win32-low.c.
7302 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7303 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7304
4210d83e
PA
73052013-12-13 Pedro Alves <palves@redhat.com>
7306
7307 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7308 if equal to TARGET_WAITKIND_LOADED.
7309 * win32-low.c (cached_status): New static global.
7310 (win32_wait): Add declaration.
7311 (do_initial_child_stuff): Flush all initial pending debug events
7312 up to the initial breakpoint.
7313 (win32_wait): If CACHED_STATUS was set, return that instead
7314 of doing a real wait. Remove the code resuming the execution
7315 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7316 during the initial phase. Also remove the code changing
7317 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7318 TARGET_WAITKIND_STOPPED.
7319
e7f0d979
YQ
73202013-12-11 Yao Qi <yao@codesourcery.com>
7321
7322 * notif.c (handle_notif_ack): Return 0 if no notification
7323 matches.
7324
ebcf782c
DE
73252013-11-20 Doug Evans <dje@google.com>
7326
7327 * linux-low.c (linux_set_resume_request): Fix comment.
7328
20ad9378
DE
73292013-11-20 Doug Evans <dje@google.com>
7330
7331 * linux-low.c (resume_status_pending_p): Tweak comment.
7332
a196ebeb
WT
73332013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7334
7335 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7336 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7337 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7338 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7339 (srv_amd64_regobj): Add amd64-mpx.o.
7340 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7341 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7342 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7343 * i387-fp.c (num_pl_bnd_register) Added constant.
7344 (num_pl_bnd_cfg_registers) Added constant.
7345 (struct i387_xsave) Added reserved area and MPX fields.
7346 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7347 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7348 function.
7349 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7350 (init_registers_amd64_mpx_linux): Declare new function.
7351 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7352 (x86_64_regmap): Add MPX registers.
7353 (x86_linux_read_description): Add MPX case.
7354 (initialize_low_arch): Initialize MPX targets.
7355
0080a2f6
TT
73562013-11-18 Tom Tromey <tromey@redhat.com>
7357
7358 * configure: Rebuild.
7359 * configure.ac: Don't check for stdlib.h.
7360 * gdbreplay.c: Unconditionally include stdlib.h.
7361
2978b111
TT
73622013-11-18 Tom Tromey <tromey@redhat.com>
7363
7364 * config.in: Rebuild.
7365 * configure: Rebuild.
7366 * configure.ac: Don't use AC_HEADER_DIRENT.
7367
a3d08894
TT
73682013-11-18 Tom Tromey <tromey@redhat.com>
7369
7370 * server.h: Don't check HAVE_STRING_H.
7371 * gdbreplay.c: Don't check HAVE_STRING_H.
7372 * configure: Rebuild.
7373
0a5dd17d
TT
73742013-11-18 Tom Tromey <tromey@redhat.com>
7375
7376 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7377 LIBGNU.
7378
1bd2f0ba
TT
73792013-11-08 Tom Tromey <tromey@redhat.com>
7380
7381 * configure, config.in: Rebuild.
7382 * configure.ac: Remove unused configury.
7383
3266f10b
TT
73842013-11-08 Tom Tromey <tromey@redhat.com>
7385
7386 * acinclude.m4: Include common.m4, codeset.m4.
7387 * configure, config.in: Rebuild.
7388 * configure.ac: Use GDB_AC_COMMON.
7389
6682d959
AA
73902013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7391
7392 * linux-s390-low.c (HWCAP_S390_TE): New define.
7393 (s390_arch_setup): Consider the TE field in the HWCAP for
7394 determining 'have_regset_tdb'.
7395
fd0a4d76
SDJ
73962013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7397
7398 PR gdb/16014
7399 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7400 call to sizeof.
7401
1a3d890b
PA
74022013-10-02 Pedro Alves <palves@redhat.com>
7403
7404 * server.c (process_serial_event): Don't output "GDBserver
7405 exiting" if GDB is connected through stdio.
7406 * target.c (mywait): Likewise, be silent if GDB is connected
7407 through stdio.
7408
97ad4581
JB
74092013-10-01 Joel Brobecker <brobecker@adacore.com>
7410
7411 * lynx-low.c (lynx_add_threads_after_attach): New function.
7412 (lynx_attach): Remove call to add_thread. Add call to
7413 lynx_add_threads_after_attach instead.
7414
5b4e221c
MF
74152013-09-28 Mike Frysinger <vapier@gentoo.org>
7416
7417 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7418 * config.in, configure: Regenerated.
7419
ee47b2f8
YQ
74202013-09-18 Yao Qi <yao@codesourcery.com>
7421
7422 PR server/15959
7423 * server.c (start_inferior): Clear 'resume_info'.
7424
d6707650 74252013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7426
d6707650
JW
7427 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7428 for each register.
7429
9243dd0e 74302013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7431
9243dd0e
JW
7432 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7433 linux-tile-low.o to srv_tgtobj.
7434
c623a6ef
WN
74352013-09-16 Will Newton <will.newton@linaro.org>
7436
7437 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7438 out regs.
7439
fb71d39e
PA
74402013-09-06 Pedro Alves <palves@redhat.com>
7441
7442 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7443 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7444 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7445 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7446 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7447 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7448
8e7e9910
PA
74492013-09-06 Pedro Alves <palves@redhat.com>
7450
7451 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7452 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7453
7c3a12ca
PA
74542013-09-06 Pedro Alves <palves@redhat.com>
7455
7456 * linux-amd64-ipa.c: Include tracepoint.h.
7457 * linux-i386-ipa.c: Include tracepoint.h.
7458
8eb3d7b6
RW
74592013-09-06 Ricard Wanderlof <ricardw@axis.com>
7460
7461 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7462 (ps_get_thread_area): New function.
7463
eddddb9d
RW
74642013-09-06 Ricard Wanderlof <ricardw@axis.com>
7465
7466 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7467 (initialize_low_arch): Call init_registers_crisv32 rather than
7468 init_register_crisv32.
7469
533b0600
PA
74702013-09-05 Pedro Alves <palves@redhat.com>
7471
7472 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7473 to ...
7474 * hostio.h: ... this new file.
7475 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7476 win32-low.c: Include hostio.h.
7477
0ce3d3b5
PA
74782013-09-05 Pedro Alves <palves@redhat.com>
7479
7480 * server.h (gdb_client_data, handler_func, callback_handler_func)
7481 (delete_file_handler, add_file_handler, append_callback_event)
7482 (delete_callback_event, start_event_loop, initialize_event_loop):
7483 Move to event-loop.h and include it.
7484 * event-loop.h: New file.
7485
799cdc37
PA
74862013-09-05 Pedro Alves <palves@redhat.com>
7487
7488 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7489 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7490 (loaded_dll, unloaded_dll): Move to ...
7491 * dll.h: ... this new file.
7492 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7493
6a6bbd9d
PA
74942013-09-05 Pedro Alves <palves@redhat.com>
7495
7496 * server.h (current_process, get_thread_process, all_processes)
7497 (add_inferior_to_list, for_each_inferior, current_inferior)
7498 (remove_inferior, add_process, remove_process, find_process_pid)
7499 (have_started_inferiors_p, have_attached_inferiors_p)
7500 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7501 (clear_inferiors, find_inferior, find_inferior_id)
7502 (inferior_target_data, set_inferior_target_data)
7503 (inferior_regcache_data, set_inferior_regcache_data): Move to
7504 inferiors.h, and include it.
7505 * inferiors.h: New file.
7506
f699aaba
PA
75072013-09-05 Pedro Alves <palves@redhat.com>
7508
7509 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7510 Move ...
72f4393d 7511 * ax.h: ... here.
f699aaba 7512
c144c7a0
PA
75132013-09-05 Pedro Alves <palves@redhat.com>
7514
7515 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7516 tracepoint.h.
7517 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7518 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7519 (handle_tracepoint_general_set, handle_tracepoint_query)
7520 (tracepoint_finished_step, tracepoint_was_hit)
7521 (release_while_stepping_state_list, current_traceframe)
7522 (in_readonly_region, traceframe_read_mem)
7523 (fetch_traceframe_registers, traceframe_read_sdata)
7524 (traceframe_read_info, struct fast_tpoint_collect_status)
7525 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7526 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7527 (supply_fast_tracepoint_registers)
7528 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7529 (ipa_tdesc, claim_trampoline_space)
7530 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7531 (agent_mem_read, agent_get_trace_state_variable_value)
7532 (agent_set_trace_state_variable_value, agent_tsv_read)
7533 (agent_mem_read_string, get_raw_reg_func_addr)
7534 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7535 * tracepoint.h: ... this new file.
7536
ff42e6ab
PA
75372013-09-05 Pedro Alves <palves@redhat.com>
7538
7539 * server.h (perror_with_name, error, fatal, warning, paddress)
7540 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7541 include it.
7542 * utils.h: New file.
7543
541af0f4
PA
75442013-09-05 Pedro Alves <palves@redhat.com>
7545
7546 * server.h (remote_debug, noack_mode, transport_is_reliable)
7547 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7548 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7549 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7550 (write_enn, initialize_async_io, enable_async_io)
7551 (disable_async_io, check_remote_input_interrupt_request)
7552 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7553 (dead_thread_notify, prepare_resume_reply)
7554 (decode_address_to_semicolon, decode_address, decode_m_packet)
7555 (decode_M_packet, decode_X_packet, decode_xfer_write)
7556 (decode_search_memory_packet, unhexify, hexify)
7557 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7558 (look_up_one_symbol, relocate_instruction)
7559 (monitor_output): Move to remote-utils.h, and include it.
7560 * remote-utils.h: New file.
7561
eebdf26b
PA
75622013-09-05 Pedro Alves <palves@redhat.com>
7563
7564 * server.h (_): Delete.
7565
3aafd2ff
PA
75662013-09-02 Pedro Alves <palves@redhat.com>
7567
7568 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7569 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7570 allocated.
7571 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7572
cee83bcb
PM
75732013-09-02 Pierre Muller <muller@sourceware.org>
7574
7575 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7576 or WriteProcessMemory complete successfully and handle
7577 ERROR_PARTIAL_COPY error.
7578
9a13b2fa
PA
75792013-09-02 Pedro Alves <palves@redhat.com>
7580
7581 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7582 error instead of EIO.
7583
602e3198
JK
75842013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7585
7586 PR server/15604
7587 * linux-low.c: Include filestuff.h.
7588 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7589 * lynx-low.c: Include filestuff.h.
7590 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7591 * server.c: Include filestuff.h.
7592 (main): Call notice_open_fds.
7593 * spu-low.c: Include filestuff.h.
7594 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7595
96d7229d
LM
75962013-08-22 Luis Machado <lgustavo@codesourcery.com>
7597
7598 * Makefile.in: Explain why ../target and ../nat are not
7599 listed as include file search paths.
7600 (linux-waitpid.o): New object file rule.
7601 * configure.srv (srv_native_linux_obj): New variable.
7602 Replace all occurrences of linux native object files with
7603 $srv_native_linux_obj.
7604 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7605 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7606 (linux_enable_event_reporting): Remove declaration.
7607 (my_waitpid): Moved to common/linux-waitpid.c.
7608 (linux_wait_for_event): Pass ptid when calling
7609 linux_enable_event_reporting.
7610 (linux_supports_tracefork_flag): Remove.
7611 (linux_enable_event_reporting): Likewise.
7612 (linux_tracefork_grandchild): Remove.
7613 (STACK_SIZE): Moved to common/linux-ptrace.c.
7614 (linux_tracefork_child): Remove.
7615 (linux_test_for_tracefork): Remove.
7616 (linux_look_up_symbols): Call linux_supports_traceclone.
7617 (initialize_low): Remove call to linux_test_for_tracefork.
7618 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7619 common/linux-ptrace.h.
7620 (PTRACE_TYPE_ARG4): Likewise.
7621 Include linux-ptrace.h.
7622
32940073
PA
76232013-08-21 Pedro Alves <palves@redhat.com>
7624
7625 * config.in: Renegerate.
7626
33b60d58 76272013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7628
33b60d58
LM
7629 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7630 (SFILES): Remove $(srcdir)/common/target-common.c and
7631 add $(srcdir)/target/waitstatus.c.
7632 (OBS): Remove target-common.o and add waitstatus.o.
7633 (server_h): Remove $(srcdir)/../common/target-common.h and
7634 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7635 and $(srcdir)/../target/waitstatus.h.
7636 (target-common.o): Remove.
7637 (waitstatus.o): New target object file.
7638 * target.h: Do not include target-common.h and
7639 include target/resume.h, target/wait.h and
7640 target/waitstatus.h.
7641
b8e1b30e
LM
76422013-08-13 Luis Machado <lgustavo@codesourcery.com>
7643
7644 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7645 to PTRACE_TYPE_ARG3.
7646 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7647 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7648 PTRACE_TYPE_ARG4.
7649 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7650 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7651
7a60ad40
YQ
76522013-07-27 Jie Zhang <jie@codesourcery.com>
7653 Daniel Jacobowitz <dan@codesourcery.com>
7654 Yao Qi <yao@codesourcery.com>
7655
7656 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7657 (mips-linux-watch.o): New rule.
7658 (mips_linux_watch_h): New variable.
7659 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7660 srv_tgtobj.
7661 * linux-mips-low.c: Include mips-linux-watch.h.
7662 (struct arch_process_info, struct arch_lwp_info): New.
7663 (update_watch_registers_callback): New function.
7664 (mips_linux_new_process, mips_linux_new_thread) New functions.
7665 (mips_linux_prepare_to_resume, mips_insert_point): New
7666 functions.
7667 (mips_remove_point, mips_stopped_by_watchpoint): New
7668 functions.
7669 (rsp_bp_type_to_target_hw_bp_type): New function.
7670 (mips_stopped_data_address): New function.
7671 (the_low_target): Add watchpoint support functions.
7672
de6f69ad
YQ
76732013-07-27 Yao Qi <yao@codesourcery.com>
7674
7675 * i386-low.c: Include break-common.h.
7676 (enum target_hw_bp_type): Remove.
7677
3360c0bf
LM
76782013-07-24 Luis Machado <lgustavo@codesourcery.com>
7679
7680 * Makefile.in (SFILES): /common/target-common.c.
7681 (OBS): Add target-common.o.
7682 (server_h): Add $(srcdir)/../common/target-common.h.
7683 (target-common.o): New target.
7684 * server.c (queue_stop_reply_callback): Free
7685 status string after use.
7686 * target.c (target_waitstatus_to_string): Remove.
7687 * target.h: Include target-common.h.
7688 (resume_kind): Likewise.
7689 (target_waitkind): Likewise.
7690 (target_waitstatus): Likewise.
7691 (TARGET_WNOHANG): Likewise.
7692
bd885420
YQ
76932013-07-04 Yao Qi <yao@codesourcery.com>
7694
7695 * Makefile.in (host_alias): Use @host_noncanonical@.
7696 (target_alias): Use @target_noncanonical@.
7697 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7698 ACX_NONCANONICAL_HOST.
7699 * configure: Regenerated.
7700
7701 Revert:
7702 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7703
7704 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7705 * configure: Rebuild.
7706 * Makefile.in (version_host, version_target): Get from configure.
7707 (version.c): Use $(version_host) and $(version_target).
7708
17ef446e
PA
77092013-07-03 Pedro Alves <palves@redhat.com>
7710
7711 * Makefile.in (config.status): Depend on development.sh.
7712 * acinclude.m4: Include libmcheck.m4.
7713 * configure: Regenerate.
7714
7a9a7487
MG
77152013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7716
7717 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7718 attribute inside the parentheses.
7719 (winapi_DebugSetProcessKillOnExit): Ditto.
7720 (winapi_DebugBreakProcess): Ditto.
7721 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7722
49b64de6
MG
77232013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7724
7725 * notif.h (notif_event): Add a dummy member to avoid compiler
7726 errors.
7727
d5749ee7
PA
77282013-07-01 Pedro Alves <palves@redhat.com>
7729
7730 * hostio.c (HOSTIO_PATH_MAX): Define.
7731 (require_filename, handle_open, handle_unlink, handle_readlink):
7732 Use it.
7733
d8d2a3ee
PA
77342013-07-01 Pedro Alves <palves@redhat.com>
7735
7736 * server.h: Include "pathmax.h".
7737 * linux-low.c: Don't include sys/param.h.
7738 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7739 MAXPATHLEN.
7740 * win32-low.c: Don't include sys/param.h.
7741 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7742
bc7dea8d
PA
77432013-07-01 Pedro Alves <palves@redhat.com>
7744
7745 * event-loop.c: Don't check HAVE_UNISTD_H before including
7746 <unistd.h>.
7747 * gdbreplay.c: Likewise.
7748 * remote-utils.c: Likewise.
7749 * server.c: Likewise.
7750 * configure.ac: Don't check for unistd.h.
7751 * configure: Regenerate.
7752
d6c2da54
TT
77532013-06-28 Tom Tromey <tromey@redhat.com>
7754
7755 * Makefile.in (version.c): Use version.in, not
7756 common/version.in.
7757
257b6bec
MG
77582013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7759
7760 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7761 * configure: Rebuild.
7762 * Makefile.in (version_host, version_target): Get from configure.
7763 (version.c): Use $(version_host) and $(version_target).
7764
86ebe149
DK
77652013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7766
7767 Fix trace-status to output user name without trailing colon.
7768 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7769
f30aa5af
DK
77702013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7771
7772 Fix trace-status to output proper start-time and stop-time.
7773 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7774 output start time and stop time in hex as gdb expects.
7775
28a93511
YQ
77762013-06-26 Pedro Alves <pedro@codesourcery.com>
7777
7778 * tracepoint.c (build_traceframe_info_xml): Output trace state
7779 variables present in the trace buffer.
7780
01208463
TT
77812013-06-24 Tom Tromey <tromey@redhat.com>
7782
7783 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7784 create-version.sh.
7785 (version.o): Remove.
7786 * gdbreplay.c: Include version.h.
7787 (version, host_name): Don't declare.
7788 * server.h: Include version.h.
7789 (version, host_name): Don't declare.
7790
760256f9
PA
77912013-06-12 Pedro Alves <palves@redhat.com>
7792
7793 * linux-x86-low.c (linux_is_elf64): Delete global.
7794 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7795 with local linux_pid_exe_is_elf_64_file use.
7796
030031ee
PA
77972013-06-11 Pedro Alves <palves@redhat.com>
7798
7799 * linux-low.c (regset_disabled, disable_regset): New functions.
7800 (regsets_fetch_inferior_registers)
7801 (regsets_store_inferior_registers): Use them.
7802 (initialize_regsets_info); Don't allocate the disabled_regsets
7803 array here.
7804 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7805 comment.
7806
5da6eb0a
PA
78072013-06-11 Pedro Alves <palves@redhat.com>
7808
7809 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7810 xmalloc.
7811
7e5aaa09
PA
78122013-06-11 Pedro Alves <palves@redhat.com>
7813
7814 * linux-x86-low.c (initialize_low_arch): Call
7815 init_registers_x32_avx_linux.
7816
d878444c
JK
78172013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7818
7819 Fix compatibility with Android Bionic.
7820 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7821 it is not empty.
7822
3aee8918
PA
78232013-06-07 Pedro Alves <palves@redhat.com>
7824
5f2b57b5 7825 PR server/14823
3aee8918
PA
7826 * Makefile.in (OBS): Add tdesc.o.
7827 (IPA_OBJS): Add tdesc-ipa.o.
7828 (tdesc-ipa.o): New rule.
7829 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7830 interface.
7831 * linux-low.c (new_inferior): Delete.
7832 (disabled_regsets, num_regsets): Delete.
7833 (linux_add_process): Adjust to set the new per-process
7834 new_inferior flag.
7835 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7836 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7837 was a stop. When calling arch_setup, switch the current inferior
7838 to the thread that got an event.
7839 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7840 (regsets_fetch_inferior_registers)
7841 (regsets_store_inferior_registers): New regsets_info parameter.
7842 Adjust to use it.
7843 (linux_register_in_regsets): New regs_info parameter. Adjust to
7844 use it.
7845 (register_addr, fetch_register, store_register): New usrregs_info
7846 parameter. Adjust to use it.
7847 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7848 parameter regs_info. Adjust to use it.
7849 (linux_fetch_registers): Get the current inferior's regs_info, and
7850 adjust to use it.
7851 (linux_store_registers): Ditto.
7852 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7853 (initialize_low): Don't initialize the target_regsets here. Call
7854 initialize_low_arch.
7855 * linux-low.h (target_regsets): Delete declaration.
7856 (struct regsets_info): New.
7857 (struct usrregs_info): New.
7858 (struct regs_info): New.
7859 (struct process_info_private) <new_inferior>: New field.
7860 (struct linux_target_ops): Delete the num_regs, regmap, and
7861 regset_bitmap fields. New field regs_info.
7862 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7863 * i387-fp.c (num_xmm_registers): Delete.
7864 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7865 calls to new interface.
7866 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7867 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7868 Infer the number of xmm registers from the regcache's target
7869 description.
7870 * i387-fp.h (num_xmm_registers): Delete.
7871 * inferiors.c (add_thread): Don't install the thread's regcache
7872 here.
7873 * proc-service.c (gregset_info): Fetch the current inferior's
7874 regs_info. Adjust to use it.
7875 * regcache.c: Include tdesc.h.
7876 (register_bytes, reg_defs, num_registers)
7877 (gdbserver_expedite_regs): Delete.
7878 (get_thread_regcache): If the thread doesn't have a regcache yet,
7879 create one, instead of aborting gdbserver.
7880 (regcache_invalidate_one): Rename to ...
7881 (regcache_invalidate_thread): ... this.
7882 (regcache_invalidate_one): New.
7883 (regcache_invalidate): Only invalidate registers of the current
7884 process.
7885 (init_register_cache): Add target_desc parameter, and use it.
7886 (new_register_cache): Ditto. Assert the target description has a
7887 non zero registers_size.
7888 (regcache_cpy): Add assertions. Adjust.
7889 (realloc_register_cache, set_register_cache): Delete.
7890 (registers_to_string, registers_from_string): Adjust.
7891 (find_register_by_name, find_regno, find_register_by_number)
7892 (register_cache_size): Add target_desc parameter, and use it.
7893 (free_register_cache_thread, free_register_cache_thread_one)
7894 (regcache_release, register_cache_size): New.
7895 (register_size): Add target_desc parameter, and use it.
7896 (register_data, supply_register, supply_register_zeroed)
7897 (supply_regblock, supply_register_by_name, collect_register)
7898 (collect_register_as_string, collect_register_by_name): Adjust.
7899 * regcache.h (struct target_desc): Forward declare.
7900 (struct regcache) <tdesc>: New field.
7901 (init_register_cache, new_register_cache): Add target_desc
7902 parameter.
7903 (regcache_invalidate_thread): Declare.
7904 (regcache_invalidate_one): Delete declaration.
7905 (regcache_release): Declare.
7906 (find_register_by_number, register_cache_size, register_size)
7907 (find_regno): Add target_desc parameter.
7908 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7909 declarations.
7910 * remote-utils.c: Include tdesc.h.
7911 (outreg, prepare_resume_reply): Adjust.
7912 * server.c: Include tdesc.h.
7913 (gdbserver_xmltarget): Delete declaration.
7914 (get_features_xml, process_serial_event): Adjust.
7915 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7916 declare.
7917 (struct process_info) <tdesc>: New field.
7918 (ipa_tdesc): Declare.
7919 * tdesc.c: New file.
7920 * tdesc.h: New file.
7921 * tracepoint.c: Include tdesc.h.
7922 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7923 (get_context_regcache): Adjust to pass ipa_tdesc down.
7924 (do_action_at_tracepoint): Adjust to get the register cache size
7925 from the context regcache's description.
7926 (traceframe_walk_blocks): Adjust to get the register cache size
7927 from the current trace frame's description.
7928 (traceframe_get_pc): Adjust to get current trace frame's
7929 description and pass it down.
7930 (gdb_collect): Adjust to get the register cache size from the
7931 IPA's description.
7932 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7933 (gdbserver_xmltarget): Delete.
7934 (initialize_low_tracepoint): Set the ipa's target description.
7935 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7936 (initialize_low_tracepoint): Set the ipa's target description.
7937 * linux-x86-low.c: Include tdesc.h.
7938 [__x86_64__] (is_64bit_tdesc): New.
7939 (ps_get_thread_area, x86_get_thread_area): Use it.
7940 (i386_cannot_store_register): Rename to ...
7941 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7942 (i386_cannot_fetch_register): Rename to ...
7943 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7944 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7945 to new interface.
7946 (target_regsets): Rename to ...
7947 (x86_regsets): ... this.
7948 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7949 interface.
7950 (x86_siginfo_fixup): Use is_64bit_tdesc.
7951 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7952 (tdesc_x32_avx_linux, tdesc_x32_linux)
7953 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7954 Declare.
7955 (x86_linux_update_xmltarget): Delete.
7956 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7957 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7958 (AMD64_LINUX_USER64_CS): New.
7959 (x86_linux_read_description): New, based on
7960 x86_linux_update_xmltarget.
7961 (same_process_callback): New.
7962 (x86_arch_setup_process_callback): New.
7963 (x86_linux_update_xmltarget): New.
7964 (x86_regsets_info): New.
7965 (amd64_linux_regs_info): New.
7966 (i386_linux_usrregs_info): New.
7967 (i386_linux_regs_info): New.
7968 (x86_linux_regs_info): New.
7969 (x86_arch_setup): Reimplement.
7970 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7971 (x86_emit_ops): Ditto.
7972 (the_low_target): Adjust. Install x86_linux_regs_info,
7973 x86_cannot_fetch_register, and x86_cannot_store_register.
7974 (initialize_low_arch): New.
7975 * linux-ia64-low.c (tdesc_ia64): Declare.
7976 (ia64_fetch_register): Adjust.
7977 (ia64_usrregs_info, regs_info): New globals.
7978 (ia64_regs_info): New function.
7979 (the_low_target): Adjust.
7980 (initialize_low_arch): New function.
7981 * linux-sparc-low.c (tdesc_sparc64): Declare.
7982 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7983 Adjust.
7984 (sparc_arch_setup): New function.
7985 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7986 (the_low_target): Adjust.
7987 (initialize_low_arch): New function.
7988 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7989 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7990 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7991 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7992 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7993 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7994 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7995 (tdesc_powerpc_isa205_vsx64l): Declare.
7996 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7997 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7998 (ppc_set_pc, ppc_get_hwcap): Adjust.
7999 (ppc_usrregs_info): Forward declare.
8000 (!__powerpc64__) ppc_regmap_adjusted: New global.
8001 (ppc_arch_setup): Adjust to the current process'es target
8002 description.
8003 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8004 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8005 (ppc_store_evrregset): Adjust.
8006 (target_regsets): Rename to ...
8007 (ppc_regsets): ... this, and make static.
8008 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8009 (ppc_regs_info): New function.
8010 (the_low_target): Adjust.
8011 (initialize_low_arch): New function.
8012 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8013 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8014 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8015 (tdesc_s390x_linux64v2): Declare.
8016 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8017 (s390_fill_gregset, s390_store_last_break): Adjust.
8018 (target_regsets): Rename to ...
8019 (s390_regsets): ... this, and make static.
8020 (s390_get_pc, s390_set_pc): Adjust.
8021 (s390_get_hwcap): New target_desc parameter, and use it.
8022 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8023 (s390_arch_setup): Adjust to set the current process'es target
8024 description. Don't adjust the regmap.
8025 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8026 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8027 (regs_info_3264): New globals.
8028 (s390_regs_info): New function.
8029 (the_low_target): Adjust.
8030 (initialize_low_arch): New function.
8031 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8032 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8033 [__mips64] (init_registers_mips_linux)
8034 (init_registers_mips_dsp_linux): Delete defines.
8035 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8036 (have_dsp): New global.
8037 (mips_read_description): New, based on mips_arch_setup.
8038 (mips_arch_setup): Reimplement.
8039 (get_usrregs_info): New function.
8040 (mips_cannot_fetch_register, mips_cannot_store_register)
8041 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8042 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8043 (target_regsets): Rename to ...
8044 (mips_regsets): ... this, and make static.
8045 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8046 (dsp_regs_info, regs_info): New globals.
8047 (mips_regs_info): New function.
8048 (the_low_target): Adjust.
8049 (initialize_low_arch): New function.
8050 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8051 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8052 Declare.
8053 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8054 (arm_read_description): New, with bits factored from
8055 arm_arch_setup.
8056 (arm_arch_setup): Reimplement.
8057 (target_regsets): Rename to ...
8058 (arm_regsets): ... this, and make static.
8059 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8060 (arm_regs_info): New function.
8061 (the_low_target): Adjust.
8062 (initialize_low_arch): New function.
8063 * linux-m68k-low.c (tdesc_m68k): Declare.
8064 (target_regsets): Rename to ...
8065 (m68k_regsets): ... this, and make static.
8066 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8067 (m68k_regs_info): New function.
8068 (m68k_arch_setup): New function.
8069 (the_low_target): Adjust.
8070 (initialize_low_arch): New function.
8071 * linux-sh-low.c (tdesc_sharch): Declare.
8072 (target_regsets): Rename to ...
8073 (sh_regsets): ... this, and make static.
8074 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8075 (sh_regs_info, sh_arch_setup): New functions.
8076 (the_low_target): Adjust.
8077 (initialize_low_arch): New function.
8078 * linux-bfin-low.c (tdesc_bfin): Declare.
8079 (bfin_arch_setup): New function.
8080 (bfin_usrregs_info, regs_info): New globals.
8081 (bfin_regs_info): New function.
8082 (the_low_target): Adjust.
8083 (initialize_low_arch): New function.
8084 * linux-cris-low.c (tdesc_cris): Declare.
8085 (cris_arch_setup): New function.
8086 (cris_usrregs_info, regs_info): New globals.
8087 (cris_regs_info): New function.
8088 (the_low_target): Adjust.
8089 (initialize_low_arch): New function.
8090 * linux-cris-low.c (tdesc_crisv32): Declare.
8091 (cris_arch_setup): New function.
8092 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8093 (cris_regs_info): New function.
8094 (the_low_target): Adjust.
8095 (initialize_low_arch): New function.
8096 * linux-m32r-low.c (tdesc_m32r): Declare.
8097 (m32r_arch_setup): New function.
8098 (m32r_usrregs_info, regs_info): New globals.
8099 (m32r_regs_info): Adjust.
8100 (initialize_low_arch): New function.
8101 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8102 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8103 (tic6x_usrregs_info): Forward declare.
8104 (tic6x_read_description): New function, based on ...
8105 (tic6x_arch_setup): ... this. Reimplement.
8106 (target_regsets): Rename to ...
8107 (tic6x_regsets): ... this, and make static.
8108 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8109 (tic6x_regs_info): New function.
8110 (the_low_target): Adjust.
8111 (initialize_low_arch): New function.
8112 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8113 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8114 (target_regsets): Rename to ...
8115 (xtensa_regsets): ... this, and make static.
8116 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8117 globals.
8118 (xtensa_arch_setup, xtensa_regs_info): New functions.
8119 (the_low_target): Adjust.
8120 (initialize_low_arch): New function.
8121 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8122 (nios2_arch_setup): Set the current process'es tdesc.
8123 (target_regsets): Rename to ...
8124 (nios2_regsets): ... this.
8125 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8126 (nios2_regs_info): New function.
8127 (the_low_target): Adjust.
8128 (initialize_low_arch): New function.
a261b8f5
PA
8129 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8130 (aarch64_arch_setup): Set the current process'es tdesc.
8131 (target_regsets): Rename to ...
8132 (aarch64_regsets): ... this.
8133 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8134 (aarch64_regs_info): New function.
8135 (the_low_target): Adjust.
8136 (initialize_low_arch): New function.
3aee8918
PA
8137 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8138 globals.
8139 (target_regsets): Rename to ...
8140 (tile_regsets): ... this.
8141 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8142 (tile_regs_info): New function.
8143 (tile_arch_setup): Set the current process'es tdesc.
8144 (the_low_target): Adjust.
8145 (initialize_low_arch): New function.
8146 * spu-low.c (tdesc_spu): Declare.
8147 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8148 * win32-arm-low.c (tdesc_arm): Declare.
8149 (arm_arch_setup): New function.
8150 (the_low_target): Install arm_arch_setup instead of
8151 init_registers_arm.
8152 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8153 (init_windows_x86): Rename to ...
8154 (i386_arch_setup): ... this. Set `win32_tdesc'.
8155 (the_low_target): Adjust.
8156 * win32-low.c (win32_tdesc): New global.
8157 (child_add_thread): Don't create the thread cache here.
8158 (do_initial_child_stuff): Set the new process'es tdesc.
8159 * win32-low.h (struct target_desc): Forward declare.
8160 (win32_tdesc): Declare.
8161 * lynx-i386-low.c (tdesc_i386): Declare global.
8162 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8163 * lynx-low.c (lynx_tdesc): New global.
8164 (lynx_add_process): Set the new process'es tdesc.
8165 * lynx-low.h (struct target_desc): Forward declare.
8166 (lynx_tdesc): Declare global.
8167 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8168 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8169 * nto-low.c (nto_tdesc): New global.
8170 (do_attach): Set the new process'es tdesc.
8171 * nto-low.h (struct target_desc): Forward declare.
8172 (nto_tdesc): Declare.
8173 * nto-x86-low.c (tdesc_i386): Declare.
8174 (nto_x86_arch_setup): Set `nto_tdesc'.
8175
b1fbec62
GB
81762013-06-04 Gary Benson <gbenson@redhat.com>
8177
8178 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8179 to qSupported response when appropriate.
8180 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8181 with nonzero-length annex.
8182 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8183 arguments supplied in annex.
8184
d1ec4ce7
DE
81852013-05-31 Doug Evans <dje@google.com>
8186
ac44adcb 8187 PR server/15594
d1ec4ce7
DE
8188 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8189 64 bits in 64-cross-32 environment.
8190
9b25f2d3
PA
81912013-05-28 Pedro Alves <palves@redhat.com>
8192
8193 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8194 (aarch64-without-fpu.c): Delete rule.
8195 * configure.srv (aarch64*-*-linux*): Remove references to
8196 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8197 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8198 declaration.
8199
6740dc9c
PA
82002013-05-24 Pedro Alves <palves@redhat.com>
8201
8202 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8203 instead of strchr/decode_address. Error if the range isn't split
8204 with a ','. Don't assume there's be a ':' in the action.
8205
c2d6af84
PA
82062013-05-23 Yao Qi <yao@codesourcery.com>
8207 Pedro Alves <palves@redhat.com>
8208
8209 * linux-low.c (lwp_in_step_range): New function.
8210 (linux_wait_1): If the thread was range stepping and stopped
8211 outside the stepping range, report the stop to GDB. Otherwise,
8212 continue stepping. Add range stepping debug output.
8213 (linux_set_resume_request): Copy the step range from the resume
8214 request to the lwp.
8215 (linux_supports_range_stepping): New.
8216 (linux_target_ops) <supports_range_stepping>: Set to
8217 linux_supports_range_stepping.
8218 * linux-low.h (struct linux_target_ops)
8219 <supports_range_stepping>: New field.
8220 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8221 * linux-x86-low.c (x86_supports_range_stepping): New.
8222 (the_low_target) <supports_range_stepping>: Set to
8223 x86_supports_range_stepping.
8224 * server.c (handle_v_cont): Handle 'r' action.
8225 (handle_v_requests): Append ";r" if the target supports range
8226 stepping.
8227 * target.h (struct thread_resume) <step_range_start,
8228 step_range_end>: New fields.
8229 (struct target_ops) <supports_range_stepping>:
8230 New field.
8231 (target_supports_range_stepping): New macro.
8232
58794e1a
JB
82332013-05-17 Joel Brobecker <brobecker@adacore.com>
8234
8235 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8236 confusion in comment.
8237
d631c5a7
JB
82382013-05-17 Joel Brobecker <brobecker@adacore.com>
8239
8240 * lynx-low.c (struct process_info_private): New type.
8241 (lynx_add_process): New function.
8242 (lynx_create_inferior, lynx_attach): Replace calls to
8243 add_process by calls to lynx_add_process.
8244 (lynx_resume): If PTID is null, then try using
8245 current_process()->private->last_wait_event_ptid.
8246 Add comments.
8247 (lynx_clear_inferiors): Delete. The contents of that function
8248 has been inlined in lynx_mourn;
8249 (lynx_wait_1): Save the ptid in the process's private data.
8250 (lynx_mourn): Free the process' private data. Replace call
8251 to lynx_clear_inferiors by call to clear_inferiors.
8252
96f7a20f
YQ
82532013-05-17 Yao Qi <yao@codesourcery.com>
8254
8255 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8256 the right place.
8257
db0dfaa0
LM
82582013-05-16 Luis Machado <lgustavo@codesourcery.com>
8259
8260 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8261 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8262 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8263 PT_TEXT_END_ADDR guards. Update comments.
8264 (linux_target_op) <read_offsets>: Conditionally define to
8265 linux_read_offsets if the target is UCLIBC and if it defines
8266 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8267
68f5f838
SL
82682013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8269 Andrew Jenner <andrew@codesourcery.com>
8270
8271 * Makefile.in (SFILES): Add linux-nios2-low.c.
8272 (clean): Add action to delete nios2-linux.c.
8273 (nios2-linux.c): New rule.
8274 * configure.srv: Add nios2*-*-linux*.
8275 * linux-nios2-low.c: New.
8276
1ebff1fd
HAQ
82772013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8278
8279 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8280
f6150862
HZ
82812013-04-25 Hui Zhu <hui@codesourcery.com>
8282
8283 PR gdb/15186
f6150862
HZ
8284 * ax.c (ax_printf): Add fflush.
8285
614c279d
TT
82862013-04-22 Tom Tromey <tromey@redhat.com>
8287
8288 * Makefile.in (SFILES): Add filestuff.c.
8289 (OBS): Add filestuff.o.
8290 (filestuff.o): New target.
8291 * config.in, configure: Rebuild.
8292 * configure.ac: Check for fdwalk, pipe2.
8293
7d4e5717
PA
82942013-04-17 Pedro Alves <palves@redhat.com>
8295
8296 * configure.ac (USE_THREAD_DB): Delete variable.
8297 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8298 Don't AC_SUBST USE_THREAD_DB.
8299 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8300 * config.in, configure: Regenerate.
8301
d5c93e41
PA
83022013-04-16 Pedro Alves <palves@redhat.com>
8303
8304 * linux-low.h (struct lwp_info) <thread_known>: Move under
8305 the USE_THREAD_DB #ifdef.
8306
04f5fe89
PA
83072013-04-16 Pedro Alves <palves@redhat.com>
8308
8309 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8310 (linux-low.o): Delete rule.
8311 * linux-low.h: Always include "gdb_thread_db.h" instead of
8312 conditionally including thread_db.h.
8313 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8314 HAVE_THREAD_DB_H.
8315
480b27bf
JK
83162013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8317
8318 * Makefile.in (install-only): Fix make install regression.
8319
43662968
JK
83202013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8321
8322 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8323 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8324 installation.
8325 * gdbserver.1: Remove.
8326
3e74e146
PA
83272013-03-22 Pedro Alves <palves@redhat.com>
8328
8329 * linux-low.c (handle_extended_wait): Don't call
8330 linux_enable_event_reporting.
8331
a8347a2a
TT
83322013-03-15 Tony Theodore <tonyt@logyst.com>
8333
8334 PR build/9098:
8335 * Makefile.in (SHELL): Use @SHELL@.
8336
eeb56fa7
SDJ
83372013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8338
8339 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8340 compiler warning.
8341
4fa7e2ff
JB
83422013-03-13 Joel Brobecker <brobecker@adacore.com>
8343
8344 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8345 Remove extraneous NULL element.
8346
8ddb1965
YQ
83472013-03-13 Yao Qi <yao@codesourcery.com>
8348
8349 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8350 'V' block in trace frame.
8351
9accd112
MM
83522013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8353
8354 * target.h (struct target_ops): Add btrace ops.
8355 (target_supports_btrace): New macro.
8356 (target_enable_btrace): New macro.
8357 (target_disable_btrace): New macro.
8358 (target_read_btrace): New macro.
8359 * gdbthread.h (struct thread_info): Add btrace field.
8360 * server.c: Include btrace-common.h.
8361 (handle_btrace_general_set): New function.
8362 (handle_btrace_enable): New function.
8363 (handle_btrace_disable): New function.
8364 (handle_general_set): Call handle_btrace_general_set.
8365 (handle_qxfer_btrace): New function.
8366 (struct qxfer qxfer_packets[]): Add btrace entry.
8367 * inferiors.c (remove_thread): Disable btrace.
8368 * linux-low: Include linux-btrace.h.
8369 (linux_low_enable_btrace): New function.
8370 (linux_low_read_btrace): New function.
8371 (linux_target_ops): Add btrace ops.
8372 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8373 Add srv_linux_btrace=yes.
8374 (x86_64-*-linux*): Add linux-btrace.o.
8375 Add srv_linux_btrace=yes.
8376 * configure.ac: Define HAVE_LINUX_BTRACE.
8377 * config.in: Regenerated.
8378 * configure: Regenerated.
8379
5cc22e4c
MM
83802013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8381
8382 * server.c (handle_qxfer): Preserve error message if -3 is
8383 returned.
8384 (qxfer): Document the -3 return value.
8385
7c97f91e
MM
83862013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8387
8388 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8389 (linux_btrace_h): New variable.
8390 (linux-btrace.o): New rule.
8391
be9a119c 83922013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8393 Hafiz Abid Qadeer <abidh@codesourcery.com>
8394
8395 * tracepoint.c (trace_buffer_size): New global.
8396 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8397 (init_trace_buffer): Change to one-argument function. Allocate
8398 trace buffer memory.
8399 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8400 handle QTBuffer:size packet.
8401 (cmd_bigqtbuffer_size): New function.
8402 (initialize_tracepoint): Call init_trace_buffer with
8403 DEFAULT_TRACE_BUFFER_SIZE.
8404 * server.c (handle_query): Add QTBuffer:size in the
8405 supported packets.
8406
e64f7499
YQ
84072013-03-07 Yao Qi <yao@codesourcery.com>
8408
8409 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8410 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8411 of -1.
8412 (cmd_qtsp): Adjust condition. Do post increment.
8413 Set cur_action and cur_step_action back to 0.
8414
f0ae6fc3
PA
84152013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8416
8417 PR server/15236
8418 * linux-low.c (linux_write_memory): Return early success if LEN is
8419 zero.
8420
b5b0b0af
CV
84212013-03-05 Corinna Vinschen <vinschen@redhat.de>
8422
334ad4a8 8423 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8424
589bc927
TT
84252013-02-28 Tom Tromey <tromey@redhat.com>
8426
8427 * configure.ac: Invoke AC_SYS_LARGEFILE.
8428 * configure, config.in: Rebuild.
8429
dfe07582
CV
84302013-02-28 Corinna Vinschen <vinschen@redhat.com>
8431
8432 * win32-low.c: Throughout, fix format strings and casts of
8433 printf-like functions to avoid type related warnings on all
8434 platforms.
8435 (get_child_debug_event): Print dwDebugEventCode as hex since
8436 that's how it's usually documented.
8437
736cd585
YQ
84382013-02-28 Yao Qi <yao@codesourcery.com>
8439
8440 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8441 pulongest.
8442
e1f58301
JW
84432013-02-27 Jiong Wang <jiwang@tilera.com>
8444
8445 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8446 (reg-tilegx32.c): New rule.
8447 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8448 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8449 different register info initializer according to elf class.
8450 (init_registers_tilgx32): New function. The tilegx32 register info
8451 initializer.
8452 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8453 (tile_store_gregset): Likewise.
8454
d171ca78
YQ
84552013-02-27 Yao Qi <yao@codesourcery.com>
8456
8457 * server.c (process_point_options): Print debug message when
8458 debug_threads is true.
8459
282bbdf3
YQ
84602013-02-26 Yao Qi <yao@codesourcery.com>
8461
8462 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8463
aca22551
PA
84642013-02-19 Pedro Alves <palves@redhat.com>
8465 Kai Tietz <ktietz@redhat.com>
8466
8467 PR gdb/15161
8468
8469 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8470 instead of strtoul to extract address from packet.
8471 (process_serial_event) <'z'>: Likewise.
8472
4f3cee1c
YQ
84732013-02-18 Yao Qi <yao@codesourcery.com>
8474
8475 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8476
8e1d55a3
PA
84772013-02-14 Pedro Alves <palves@redhat.com>
8478
8479 Plug memory leak.
8480
8481 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8482 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8483
458820da
PA
84842013-02-14 Pedro Alves <palves@redhat.com>
8485
8486 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8487
baea0dae
PA
84882013-02-14 Pedro Alves <palves@redhat.com>
8489
8490 * tracepoint.c (save_string): Delete.
8491 (add_tracepoint_action): Use savestring instead of save_string.
8492
0b1afbb3
PA
84932013-02-12 Pedro Alves <palves@redhat.com>
8494
8495 * linux-xtensa-low.c: Ditto.
8496 * xtensa-xtregs.c: Ditto.
8497
8a4ac37e
PA
84982013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8499
8500 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8501 thread_db.
8502
148de6bb
MS
85032013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8504
8505 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8506 aarch64_num_wp_regs and aarch64_num_bp_regs to
8507 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8508
55fac6e0
MS
85092013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8510
8511 * linux-aarch64-low.c (ps_get_thread_area): Replace
8512 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8513
176eb98c
MS
85142013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8515 Marcus Shawcroft <marcus.shawcroft@arm.com>
8516 Nigel Stephens <nigel.stephens@arm.com>
8517 Yufeng Zhang <yufeng.zhang@arm.com>
8518
8519 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8520 (aarch64.c, aarch64-without-fpu.c): New targets.
8521 * configure.srv (aarch64*-*-linux*): New.
8522 * linux-aarch64-low.c: New file.
8523
56f7af9c
MS
85242013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8525
43aaf8b6 8526 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8527 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8528 (dequeue_one_deferred_signal, linux_resume_one_thread)
8529 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8530 (linux_tracefork_grandchild, linux_test_for_tracefork)
8531 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8532 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8533 where the argument is 0.
8534
60f662b0
YQ
85352013-01-25 Yao Qi <yao@codesourcery.com>
8536
8537 * event-loop.c: Include "queue.h".
8538 (gdb_event_p): New typedef.
8539 (struct gdb_event) <next_event>: Remove.
8540 (event_queue): Change to QUEUE(gdb_event_p).
8541 (async_queue_event): Remove.
8542 (gdb_event_xfree): New.
8543 (initialize_event_loop): New.
8544 (process_event): Use API from QUEUE.
8545 (wait_for_event): Likewise.
8546 * server.c (main): Call initialize_event_loop.
8547 * server.h (initialize_event_loop): Declare.
8548
5ae4861a
YQ
85492013-01-18 Yao Qi <yao@codesourcery.com>
8550
8551 * ax.h (struct eval_agent_expr_context): New.
8552 (gdb_eval_agent_expr): Update declaration.
8553 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8554 TFRAME. Add new argument CTX.
8555 * server.h (struct eval_agent_expr_context): Declare.
8556 (agent_mem_read, agent_tsv_read): Update declaration.
8557 (agent_mem_read_string): Likewise.
8558 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8559 (add_traceframe_block): Add new argument TPOINT.
8560 Increase TPOINT->traceframe_usage.
8561 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8562 eval_tracepoint_agent_expr.
8563 (condition_true_at_tracepoint): Likewise.
8564 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8565 (agent_mem_read_string, agent_tsv_read): Likewise.
8566
85e00e85
YQ
85672013-01-16 Yao Qi <yao@codesourcery.com>
8568
8569 * linux-low.c (linux_resume_one_lwp): Don't check
8570 'lwp->bp_reinsert != 0'.
8571
4039cf45
JB
85722013-01-07 Joel Brobecker <brobecker@adacore.com>
8573 Pedro Alves <palves@redhat.com>
8574
8575 * lynx-low.c (ptrace_request_to_str): Define a temporary
8576 macro and use it to simplify this function's implementation.
8577
9044dee2
JB
85782013-01-07 Joel Brobecker <brobecker@adacore.com>
8579
8580 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8581 sets errno.
8582
e6352c8f
JB
85832013-01-07 Joel Brobecker <brobecker@adacore.com>
8584
8585 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8586
50681a27
JB
85872013-01-07 Joel Brobecker <brobecker@adacore.com>
8588
8589 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8590
3f6e77ef
JB
85912013-01-07 Joel Brobecker <brobecker@adacore.com>
8592
8593 * lynx-low.c (lynx_resume): Use the resume_info parameter
8594 to determine the ptid for the lynx_ptrace call, unless
8595 it is equal to minus_one_ptid, in which case we use the
8596 ptid of the current_inferior.
8597 (lynx_wait_1): After having received a thread create/exit
8598 event, resume the inferior's execution using the signaling
8599 thread's ptid, rather than the old ptid.
8600
7fda33ae
JB
86012013-01-07 Joel Brobecker <brobecker@adacore.com>
8602
8603 * lynx-low.c (lynx_resume): Delete variable ret.
8604
b9786c74
JB
86052013-01-01 Joel Brobecker <brobecker@adacore.com>
8606
8607 * gdbreplay.c (gdbreplay_version): Update copyright year.
8608 * server.c (gdbserver_version): Likewise.
8609
8b93d60f
JB
86102012-12-17 Joel Brobecker <brobecker@adacore.com>
8611
8612 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8613 new thread.
8614
037335a7
JB
86152012-12-17 Joel Brobecker <brobecker@adacore.com>
8616
8617 * lynx-low.c (ptrace_request_to_str): Add handling for
8618 PTRACE_GETTRACESIG.
8619
52d4cbd8
JB
86202012-12-17 Joel Brobecker <brobecker@adacore.com>
8621
8622 * lynx-low.c (lynx_attach): Delete variable new_process.
8623
ab8f6ca9
JB
86242012-12-17 Joel Brobecker <brobecker@adacore.com>
8625
8626 * lynx-low.c (lynx_create_inferior): Delete variable
8627 new_process.
8628
78cbc024
JB
86292012-12-17 Joel Brobecker <brobecker@adacore.com>
8630
8631 * lynx-low.c (ptrace_request_to_str): Do not handle
8632 PTRACE_GETTHREADLIST if this macro does not exist.
8633
14a00470
YQ
86342012-12-15 Yao Qi <yao@codesourcery.com>
8635
8636 * Makefile.in (OBS): Add notif.o.
8637 * notif.c, notif.h: New.
8638 * server.c: Include "notif.h".
8639 (struct vstop_notif) <next>: Remove.
8640 <base>: New field.
8641 (queue_stop_reply): Update.
8642 (push_event, send_next_stop_reply): Remove.
8643 (discard_queued_stop_replies): Update.
8644 (notif_stop): New variable.
8645 (handle_v_stopped): Remove.
8646 (handle_v_requests): Don't call handle_v_stopped. Call
8647 handle_ack_notif instead.
8648 (queue_stop_reply_callback): Call notif_event_enque instead
8649 of queue_stop_reply.
8650 (handle_status): Don't call send_next_stop_reply, call
8651 notif_write_event instead.
8652 (kill_inferior_callback): Likewise.
8653 (detach_or_kill_inferior_callback): Likewise.
8654 (main): Call initialize_notif.
8655 (process_serial_event): Call QUEUE_is_empty.
8656 (handle_target_event): Call notif_push instead of push event.
8657 * server.h (push_event): Remove declaration.
8658
61c125b9
TT
86592012-12-10 Tom Tromey <tromey@redhat.com>
8660
8661 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8662 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8663 macros.
8664 (.c.o): Rewrite.
8665 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8666 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8667 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8668 (amd64-linux-ipa.o, ax.o): Rewrite.
8669 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8670 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8671 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8672 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8673 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8674 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8675 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8676 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8677 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8678 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8679 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8680 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8681 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8682 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8683 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8684 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8685 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8686 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8687 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8688 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8689 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8690 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8691 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8692 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8693 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8694 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8695 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8696 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8697 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8698 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8699 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8700 (reg-tilegx.o): Remove.
8701 (all_object_files): New macro.
8702 Include .deps files.
8703 * aclocal.m4, configure: Rebuild.
8704 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8705 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8706 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8707
e90e9ad9
TT
87082012-12-05 Tom Tromey <tromey@redhat.com>
8709
8710 PR gdb/14917:
8711 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8712
02d403bf 87132012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8714
8715 * configure.ac: Check for linux/perf_event.h.
8716 * config.in: Regenerated.
8717 * configure: Regenerated.
8718
0270a750
PA
87192012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8720
8721 * hostio.c (handle_readlink): Decrease buffer size
8722 parameter passed to readlink by one byte.
8723
8c29b58e
YQ
87242012-11-26 Yao Qi <yao@codesourcery.com>
8725
8726 * configure.ac (build_warnings): Append '-Wempty-body'.
8727 * configure: Regenerated.
8728 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8729 body.
8730
8bdce1ff
PM
87312012-11-15 Pierre Muller <muller@sourceware.org>
8732
8733 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8734 * config.in: Regenerate.
8735 * configure: Regenerate.
8736 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8737 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8738 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8739 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8740 header.
8741 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8742 instead of <sys/wait.h> header.
8743 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8744
02d403bf 87452012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8746
8747 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8748 (various make rules): Remove -DGDBSERVER
8749
fbd5db48
YQ
87502012-11-09 Yao Qi <yao@codesourcery.com>
8751
8752 * spu-low.c (current_ptid): Move it to ..
8753 * gdbthread.h: ... here. New.
8754 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8755 * server.c (myresume, process_serial_event): Likewise.
8756 * thread-db.c (thread_db_find_new_threads): Likewise.
8757 * tracepoint.c (run_inferior_command): Likewise.
8758
b3dc46ff
AB
87592012-10-01 Andrew Burgess <aburgess@broadcom.com>
8760
8761 * server.c (handle_search_memory_1): Include access length in
8762 warning message.
8763
07c04788
HPN
87642012-09-05 Michael Brandt <michael.brandt@axis.com>
8765
8766 * linux-crisv32-low.c: Fix compile errors.
8767
918d227b
YQ
87682012-09-04 Yao Qi <yao@codesourcery.com>
8769
8770 * tracepoint.c (cmd_qtsv): Adjust debug message.
8771 Don't check CUR_TPOINT.
8772
18c1b81a
YQ
87732012-08-28 Yao Qi <yao@codesourcery.com>
8774
8775 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8776 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8777 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8778 Remove declarations of xmalloc, xreallloc, xstrdup and
8779 freeargv.
8780 * Makefile.in (libiberty_h): New.
8781 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8782 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8783
dc82f37b
YQ
87842012-08-23 Yao Qi <yao@codesourcery.com>
8785
8786 * server.h: Remove declaration of 'xsnprintf'.
8787
406b1477
KS
87882012-08-22 Keith Seitz <keiths@redhat.com>
8789
8790 * server.h: Include build-gnulib-gbserver/config.h.
8791 * gdbreplay.c: Likewise.
8792
e6712ff1
DE
87932012-08-08 Doug Evans <dje@google.com>
8794
8795 * Makefile.in (SFILES): Add gdb_vecs.c.
8796 (OBS): Add gdb_vecs.o.
8797 (gdb_vecs_h, host_defs_h): New variables.
8798 (thread-db.o): Add $(gdb_vecs_h) dependency.
8799 (gdb_vecs.o): New rule.
8800 * thread-db.c: #include "gdb_vecs.h".
8801 (thread_db_load_search): Use a vector to iterate over path elements.
8802 Handle text appearing after "$pdir".
8803
8804 * configure.ac: Add check for strstr.
8805 * config.in: Regenerate.
8806 * configure: Regenerate.
8807
7c3270ae
UW
88082012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8809
8810 * hostio.c (handle_pread): If pread fails, fall back to attempting
8811 lseek/read.
8812 (handle_pwrite): Likewise for pwrite.
8813
b62e2b27
UW
88142012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8815
8816 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8817 between unsupported TYPE and unimplementable ADDR/LEN combination.
8818 (arm_insert_point): Act on new return value.
8819
78a99e91
PA
88202012-07-31 Pedro Alves <palves@redhat.com>
8821
8822 * server.c (process_point_options): Only skip tokens if we find
8823 one that is unrecognized. Don't treat 'X' specially while
8824 skipping unrecognized tokens.
8825
fcf303ab
UW
88262012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8827
8828 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8829 to 4-byte-align HW breakpoint addresses for Thumb.
8830
7255706c
YQ
88312012-07-27 Yao Qi <yao@codesourcery.com>
8832
8833 PR remote/14161.
8834
8835 * server.h: Declare gdb_agent_about_to_close.
8836 * target.c (kill_inferior): Include "agent.h".
8837 New. Send command 'kill'.
8838 * target.h (kill_inferior): Removed macro.
8839 * tracepoint.c (gdb_agent_about_to_close): New.
8840 (gdb_agent_helper_thread): Handle command 'close'.
8841 Wait endlessly until the inferior stops.
8842 Install gdb_agent_remove_socket to atexit hook.
8843 (agent_socket_name): New static variable.
8844 (gdb_agent_socket_init): Replace local variable 'name' with
8845 'agent_socket_name'.
8846 (gdb_agent_remove_socket): New.
8847
5a3f286f
YQ
88482012-07-27 Yao Qi <yao@codesourcery.com>
8849
8850 * server.c (process_point_options): Stop at 'X' when parsing.
8851
961bd387
ME
88522012-07-19 Michael Eager <eager@eagercon.com>
8853
a261b8f5 8854 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8855 to hw_execute.
8856 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8857 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8858 hardware breakpoint.
8859
aa7c7447
JK
88602012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8861
8862 * gdbserver/linux-low.c (initialize_low): Call
8863 linux_ptrace_init_warnings.
8864
7f216e7c
DE
88652012-07-02 Doug Evans <dje@google.com>
8866
8867 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8868 pointer to int.
8869
d3ce09f5
SS
88702012-07-02 Stan Shebs <stan@codesourcery.com>
8871
8872 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8873 (ax.o): Add it to build rule.
8874 (ax-ipa.o): Ditto.
8875 (OBS): Add format.o.
8876 (IPA_OBS): Add format.o.
8877 * server.c (handle_query): Claim support for breakpoint commands.
8878 (process_point_options): Add command case.
8879 (process_serial_event): Leave running if there are printfs in
8880 effect.
8881 * mem-break.h (any_persistent_commands): Declare.
8882 (add_breakpoint_commands): Declare.
8883 (gdb_no_commands_at_breakpoint): Declare.
8884 (run_breakpoint_commands): Declare.
8885 * mem-break.c (struct point_command_list): New struct.
8886 (struct breakpoint): New field command_list.
8887 (any_persistent_commands): New function.
8888 (add_commands_to_breakpoint): New function.
8889 (add_breakpoint_commands): New function.
8890 (gdb_no_commands_at_breakpoint): New function.
8891 (run_breakpoint_commands): New function.
8892 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8893 locally.
8894 * ax.c: Include format.h.
8895 (ax_printf): New function.
8896 (gdb_eval_agent_expr): Add printf opcode.
8897
2f8f6aed
YQ
88982012-06-13 Yao Qi <yao@codesourcery.com>
8899
8900 * server.c (start_inferior): Remove duplicated writes to fields
8901 'last_resume_kind' and 'last_status' of 'current_inferior'.
8902
0c9070b3
YQ
89032012-06-12 Yao Qi <yao@codesourcery.com>
8904 Pedro Alves <palves@redhat.com>
8905
8906 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8907 comment.
8908 * server.c (handle_v_cont): Extend comment.
8909
c52daf70
YQ
89102012-06-11 Yao Qi <yao@codesourcery.com>
8911
8912 * linux-low.c (linux_attach): Add 'static'.
8913
d38bbb0a
YQ
89142012-06-06 Yao Qi <yao@codesourcery.com>
8915
8916 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8917
89dc0afd
JK
89182012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8919
8920 Fix gcc -flto compilation warning.
8921 * server.c (main): Make variable multi_mode and attach volatile.
8922
75f62ce7
TJB
89232012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8924
8925 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8926 if the platform doesn't know about it.
8927
65f479b6
PA
89282012-05-30 Jeff Kenton <jkenton@tilera.com>
8929
8930 * Makefile.in (SFILES): Add linux-tile-low.c.
8931 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8932 * configure.srv: Handle tilegx-*-linux*.
8933 * linux-tile-low.c: New file.
8934
0c5bf5a9
JK
89352012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8936
8937 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8938
a493e3e2
PA
89392012-05-24 Pedro Alves <palves@redhat.com>
8940
8941 PR gdb/7205
8942
43aaf8b6 8943 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8944
2ea28649
PA
89452012-05-24 Pedro Alves <palves@redhat.com>
8946
8947 PR gdb/7205
8948
8949 Replace target_signal with gdb_signal throughout.
8950
8d409d16
MR
89512012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8952
8953 * linux-low.c (linux_store_registers): Avoid the copying sequence
8954 when no data has been retrieved by ptrace.
8955
23512c01
MGD
89562012-05-22 Will Deacon <will.deacon@arm.com>
8957
8958 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8959 Include asm/ptrace.h.
8960 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8961 already defined.
8962
4934b29e
MR
89632012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8964
8965 * linux-low.c (linux_store_registers): Don't re-retrieve data
8966 with ptrace that has already been obtained from /proc. Always
8967 copy any data retrieved with ptrace to the buffer supplied.
8968
bde24c0a
PA
89692012-05-11 Yao Qi <yao@codesourcery.com>
8970 Pedro Alves <palves@redhat.com>
8971
8972 * linux-low.c (enum stopping_threads_kind): New.
8973 (stopping_threads): Change type to `enum stopping_threads_kind'.
8974 (handle_extended_wait): If stopping and suspending threads, leave
8975 the new_lwp suspended too.
8976 (linux_wait_for_event): Adjust.
8977 (stop_all_lwps): Set `stopping_threads' to
8978 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8979 whether we're suspending threads or just stopping them. Assert no
8980 recursion happens.
8981
623b6bdf
YQ
89822012-04-29 Yao Qi <yao@codesourcery.com>
8983
8984 * server.h: Move some code to ...
8985 * gdbthread.h: ... here. New.
8986 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8987 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8988 (nto-low.o, win32-low.o): Likewise.
8989 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8990 * regcache.c, remote-utils.c, server.c: Likewise.
8991 * target.c, tracepoint.c, win32-low.c: Likewise.
8992
f15f9948
TJB
89932012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8994
8995 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8996 (PTRACE_ARG4_TYPE): Likewise.
8997 (PTRACE_XFER_TYPE): Likewise.
8998 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8999 ptrace to PTRACE_ARG3_TYPE.
9000 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9001 (PTRACE_ARG4_TYPE): Likewise.
9002 (PTRACE_XFER_TYPE): Likewise.
9003 (linux_detach_one_lwp): Cast fourth argument of
9004 ptrace to long then PTRACE_ARG4_TYPE.
9005 (regsets_fetch_inferior_registers): Cast third argument of
9006 ptrace to long then PTRACE_ARG3_TYPE.
9007 (regsets_store_inferior_registers): Likewise.
9008
38ea300a
PA
90092012-04-20 Pedro Alves <palves@redhat.com>
9010
9011 * configure: Regenerate.
9012
c971b7fa
PA
90132012-04-19 Pedro Alves <palves@redhat.com>
9014
43aaf8b6 9015 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9016 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9017 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9018 (all, install-only, uninstall, clean-info, all-lib, clean): No
9019 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9020 (maintainer-clean realclean distclean): Use subdir_do.
9021 (subdir_do): New.
9022 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9023 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9024 * acinclude.m4: Include acx_configure_dir.m4.
9025 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9026 calls. Call AC_PROG_RANLIB. Configure gnulib using
9027 ACX_CONFIGURE_DIR.
9028 (GNULIB): New.
9029 (GNULIB_STDINT_H): Adjust.
9030 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9031 * gdbreplay.c: Include build-gnulib/config.h.
9032 * server.h: Likewise.
9033 * aclocal.m4: Regenerate.
9034 * config.in: Regenerate.
9035 * configure: Regenerate.
c971b7fa 9036
809277f8
PA
90372012-04-19 Pedro Alves <palves@redhat.com>
9038
9039 * Makefile.in (LIBGNU, INCGNU): Adjust.
9040 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9041 (all, install-only, uninstall, clean-info, all-lib, clean)
9042 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9043 * configure.ac: Adjust AC_OUTPUT output.
9044 * aclocal.m4: Regenerate.
9045 * configure: Regenerate.
9046
fd9bb8b8
PA
90472012-04-19 Pedro Alves <palves@redhat.com>
9048
9049 * Makefile.in (generated_files): New.
9050 (server_h): Remove the explicit dependency on config.h, and depend
9051 on $generated_files.
9052
1c298c66
PA
90532012-04-19 Pedro Alves <palves@redhat.com>
9054
9055 * Makefile.in (INCGNU): Add -Ignulib.
9056
57c4b50b
PA
90572012-04-19 Pedro Alves <palves@redhat.com>
9058
9059 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9060 (INCGNU): ... this, and spell out -I here.
9061 (GNULIB_LIB): Rename to ...
9062 (LIBGNU): ... this.
9063 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9064
1030e047
PA
90652012-04-19 Pedro Alves <palves@redhat.com>
9066
9067 * config.in: Regenerate.
9068
447d4319
PA
90692012-04-19 Pedro Alves <palves@redhat.com>
9070
9071 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9072 * server.h (memmem): Remove declaration.
9073 * config.in: Regenerate.
9074 * configure: Regenerate.
9075
aad9eab9
YQ
90762012-04-19 Yao Qi <yao@codesourcery.com>
9077
9078 * Makefile.in (SFILES): Add common/vec.c.
9079 (OBS): Add vec.o.
9080 (vec.o): New rule.
9081
3e10640f
YQ
90822012-04-19 Yao Qi <yao@codesourcery.com>
9083
9084 * remote-utils.c (prepare_resume_reply): Replace with macro
9085 target_core_of_thread.
9086 * server.c (handle_qxfer_threads_proper): Likewise.
9087 * target.h (traget_core_of_thread): New macro.
9088
71622373
PA
90892012-04-18 Pedro Alves <palves@redhat.com>
9090
9091 * aclocal.m4: Regenerate.
9092 * configure: Regenerate.
9093
80d26939
YQ
90942012-04-16 Yao Qi <yao@codesourcery.com>
9095
9096 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9097 duplicated on address.
9098
42476b70
YQ
90992012-04-16 Yao Qi <yao@codesourcery.com>
9100
9101 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9102 (struct tracepoint_action_ops) <send>: New field.
9103 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9104 (agent_expr_send, x_tracepoint_action_send): New.
9105 (l_tracepoint_action_send): New.
9106 (cmd_qtdp): Download and install tracepoint
9107 according to `use_agent'.
9108 (run_inferior_command): Add one more parameter `len'.
9109 Update callers.
9110 (tracepoint_send_agent): New.
9111 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9112
7bc83639
YQ
91132012-04-16 Yao Qi <yao@codesourcery.com>
9114
9115 * tracepoint.c (download_tracepoints): Moved to ...
9116 (cmd_qtstart): ... here.
9117
5f18041e
YQ
91182012-04-14 Yao Qi <yao@codesourcery.com>
9119
9120 * tracepoint.c: Include inttypes.h.
9121 (struct collect_memory_action): Use sized types.
9122 (struct tracepoint): Likewise.
9123 (cmd_qtdp, stop_tracing): Update print specifiers.
9124 (cmd_qtp, response_tracepoint): Likewise.
9125 (collect_data_at_tracepoint): Likewise.
9126 (collect_data_at_step): Likewise.
9127
55a8c076
YQ
91282012-04-14 Yao Qi <yao@codesourcery.com>
9129
9130 Import gnulib module inttypes.
9131 * aclocal.m4, config.in, configure: Regenerated.
9132
dc750257
YQ
91332012-04-14 Yao Qi <yao@codesourcery.com>
9134
9135 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9136 Makefile and config.status at last.
9137
0ab5faf9
YQ
91382012-04-13 Yao Qi <yao@codesourcery.com>
9139
9140 * tracepoint.c: Include stdint.h unconditionally.
9141
18f5fd81
TJB
91422012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9143
9144 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9145 on BFD_HAVE_SYS_PROCFS_TYPE.
9146 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9147 * configure: Regenerate.
9148 * config.in: Likewise.
9149
4d47af5c
L
91502012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9151
9152 * Makefile.in (clean): Also remove x32.c x32-linux.c
9153 x32-avx.c x32-avx-linux.c.
9154 (x32.o): New target.
9155 (x32.c): Likewise.
9156 (x32-linux.o): Likewise.
9157 (x32-linux.c): Likewise.
9158 (x32-avx.o): Likewise.
9159 (x32-avx.c): Likewise.
9160 (x32-avx-linux.o): Likewise.
9161 (x32-avx-linux.c): Likewise.
9162
9163 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9164 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9165 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9166 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9167 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9168 i386/x32-avx-linux.xml.
9169
9170 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9171 (init_registers_x32_avx_linux): Likwise.
9172 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9173 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9174
ecedbe58
PA
91752012-04-13 Pedro Alves <palves@redhat.com>
9176
9177 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9178 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9179 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9180 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9181 the sub-make.
9182
c92b5177
L
91832012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9184
9185 * linux-x86-low.c (compat_x32_clock_t): New.
9186 (compat_x32_siginfo_t): Likewise.
9187 (compat_x32_siginfo_from_siginfo): Likewise.
9188 (siginfo_from_compat_x32_siginfo): Likewise.
9189 (linux_is_elf64): Likewise.
9190 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9191 and siginfo_from_compat_x32_siginfo for x32.
9192 (x86_arch_setup): Set linux_is_elf64.
9193
214d508e
L
91942012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9195
9196 PR gdb/13969
9197 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9198 e_machine field.
9199 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9200 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9201 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9202 compatible with process.
9203
c9a1864a
YQ
92042012-04-12 Yao Qi <yao@codesourcery.com>
9205
9206 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9207 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9208 (install-only, install-info, clean): Handle sub dir gnulib.
9209 (all-lib, am--refresh): New targets.
9210 (memmem.o): Remove target.
9211 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9212 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9213 (AC_REPLACE_FUNCS): Remove memmem.
9214 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9215 (AC_OUTPUT): Generate Makefile in gnulib/.
9216 * aclocal.m4, config.in, configure: Regenerated.
9217
367ba2c2
MR
92182012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9219
9220 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9221
9d236627
PA
92222012-04-05 Pedro Alves <palves@redhat.com>
9223
9224 -Werror=strict-aliasing
9225
9226 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9227 pointer.
9228
111217b3
PA
92292012-04-04 Pedro Alves <palves@redhat.com>
9230
9231 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9232 (sparc_store_gregset_from_stack, sparc_store_gregset)
9233 (sparc_breakpoint_at): Fix formatting.
9234
8365dcf5
TJB
92352012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9236
9237 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9238 are available.
9239 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9240 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9241 * config.in: Regenerate.
9242 * configure: Likewise.
9243
689cc2ae
PA
92442012-03-29 Pedro Alves <palves@redhat.com>
9245
9246 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9247 Correct ptrace arguments.
9248
c14dfd32
PA
92492012-03-28 Pedro Alves <palves@redhat.com>
9250
9251 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9252 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9253 (IA64_FR1_REGNUM): New defines.
9254 (ia64_fetch_register): New.
9255 (the_low_target): Install it.
9256 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9257 field.
9258 * linux-low.c (linux_fetch_registers): Try the
9259 the_low_target.fetch_register hook first.
9260
9261 * linux-arm-low.c (the_low_target): Adjust.
9262 * linux-bfin-low.c (the_low_target): Adjust.
9263 * linux-cris-low.c (the_low_target): Adjust.
9264 * linux-crisv32-low.c (the_low_target): Adjust.
9265 * linux-m32r-low.c (the_low_target): Adjust.
9266 * linux-m68k-low.c (the_low_target): Adjust.
9267 * linux-mips-low.c (the_low_target): Adjust.
9268 * linux-ppc-low.c (the_low_target): Adjust.
9269 * linux-s390-low.c (the_low_target): Adjust.
9270 * linux-sh-low.c (the_low_target): Adjust.
9271 * linux-sparc-low.c (the_low_target): Adjust.
9272 * linux-tic6x-low.c (the_low_target): Adjust.
9273 * linux-x86-low.c (the_low_target): Adjust.
9274 * linux-xtensa-low.c (the_low_target): Adjust.
9275
63c88e13
PA
92762012-03-26 Pedro Alves <palves@redhat.com>
9277
9278 * server.c (handle_qxfer_libraries): Don't bail early if
9279 the_target->qxfer_libraries_svr4 is not NULL.
9280
fb723180
PA
92812012-03-26 Pedro Alves <palves@redhat.com>
9282
9283 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9284
0afae3cf
PA
92852012-03-23 Pedro Alves <palves@redhat.com>
9286
9287 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9288 "library-list-svr4" element's start tag when the the DSO list is
9289 empty.
9290
485f1ee4
PA
92912012-03-23 Pedro Alves <palves@redhat.com>
9292
9293 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9294 a variable whose type size is the same as the inferior's pointer
9295 size.
9296
a5362b9a
TS
92972012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9298
9299 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9300 struct siginfo.
9301 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9302 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9303 * linux-low.h: Include <signal.h>.
9304 (struct siginfo): Remove forward declaration.
9305 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9306 struct siginfo.
9307
d226c142
MF
93082012-03-21 Mike Frysinger <vapier@gentoo.org>
9309
9310 * .gitignore: Ignore more files.
9311
122f36ef
PA
93122012-03-19 Pedro Alves <palves@redhat.com>
9313 Jan Kratochvil <jan.kratochvil@redhat.com>
9314
9315 * server.c (cont_thread, general_thread): Add describing comments.
9316 (start_inferior): Clear `cont_thread'.
9317 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9318 of a process.
9319
fc3e5175
YQ
93202012-03-15 Yao Qi <yao@codesourcery.com>
9321
9322 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9323 handling to ...
9324 (cmd_qtdp): ... here.
9325
8d0d92cd
YQ
93262012-03-15 Yao Qi <yao@codesourcery.com>
9327
9328 * tracepoint.c (struct tracepoint_action_ops): New.
9329 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9330 (m_tracepoint_action_download): New.
9331 (r_tracepoint_action_download): New.
9332 (x_tracepoint_action_download): New.
9333 (l_tracepoint_action_download): New.
9334 (add_tracepoint_action): Install `action->ops' according type.
9335 (download_tracepoint_1): Move code `download' function pointer
9336 of various tracepoint_action_ops.
9337
87b0bb13
JK
93382012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9339
9340 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9341 linux_ptrace_attach_warnings.
9342
5f572dec
JK
93432012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9344
9345 * Makefile.in (linux-ptrace.o): New.
9346 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9347 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9348 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9349 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9350 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9351 of these targets.
9352 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9353
f4647387
YQ
93542012-03-08 Yao Qi <yao@codesourcery.com>
9355 Pedro Alves <palves@redhat.com>
9356
9357 Fix PR server/13392.
9358 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9359 offset of JMP insn.
9360 * tracepoint.c (remove_tracepoint): New.
9361 (cmd_qtdp): Call remove_tracepoint when failed to install.
9362
9b224c5e
PA
93632012-03-07 Pedro Alves <palves@redhat.com>
9364
9365 * linux-low.c (get_detach_signal): New.
9366 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9367 Pass on pending signals to PTRACE_DETACH. Check the result of the
9368 ptrace call.
9369 * server.c (program_signals, program_signals_p): New.
9370 (handle_general_set): Handle QProgramSignals.
9371 * server.h (program_signals, program_signals_p): Declare.
9372
e237a7e2
JK
93732012-03-05 Pedro Alves <palves@redhat.com>
9374 Jan Kratochvil <jan.kratochvil@redhat.com>
9375
9376 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9377 New comment why.
9378
5808517f
YQ
93792012-03-03 Yao Qi <yao@codesourcery.com>
9380
9381 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9382 agent_look_up_symbols.
9383
58b4daa5
YQ
93842012-03-03 Yao Qi <yao@codesourcery.com>
9385
9386 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9387 (linux-x86-low.o): Likewise.
9388 * server.h: Remove in_process_agent_loaded.
9389 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9390 common/agent.c.
9391 Update callers.
9392
8ffcbaaf
YQ
93932012-03-03 Yao Qi <yao@codesourcery.com>
9394
9395 * tracepoint.c (gdb_agent_capability): New global.
9396 (in_process_agent_loaded_ust): Renamed to
9397 `in_process_agent_supports_ust'.
9398 Update callers.
9399 (in_process_agent_supports_ust): Call agent_capability_check.
9400 (clear_installed_tracepoints): Assert that agent supports
9401 agent.
9402
d1feda86
YQ
94032012-03-03 Yao Qi <yao@codesourcery.com>
9404
9405 * linux-low.c (linux_supports_agent): New.
9406 (linux_target_ops): Initialize field `supports_agent' with
9407 linux_supports_agent.
9408 * target.h (struct target_ops) <supports_agent>: New.
9409 (target_supports_agent): New macro.
9410 * server.c (handle_general_set): Handle packet 'QAgent'.
9411 (handle_query): Send `QAgent+'.
9412 * Makefile.in (server.o): Depends on agent.h.
9413
2fa291ac
YQ
94142012-03-03 Yao Qi <yao@codesourcery.com>
9415
9416 * Makefile.in (OBS): Add agent.o.
9417 Add new rule for agent.o.
9418 Track dependence of tracepoint.c on agent.h.
9419 * tracepoint.c (run_inferior_command_1):
9420 (run_inferior_command): Call agent_run_command.
9421 (gdb_ust_connect_sync_socket): Deleted. Move it to
9422 common/agent.c.
9423 (resume_thread, stop_thread): Likewise.
9424 (gdb_ust_socket_init): Renamed to ...
9425 (gdb_agent_socket_init): ... New.
9426 (gdb_ust_thread): Renamed to ...
9427 (gdb_agent_helper_thread): ... New.
9428 (gdb_ust_init): Move some code to ...
9429 (gdb_agent_init): ... here. New.
9430 [HAVE_UST]: Call gdb_ust_init.
9431 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9432 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9433 * config.in, configure: Regenerated.
9434
05044653
PA
94352012-03-02 Pedro Alves <palves@redhat.com>
9436
9437 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9438 * linux-low.c (struct simple_pid_list): New.
9439 (stopped_pids): New a struct simple_pid_list pointer.
9440 (add_to_pid_list, pull_pid_from_list): New.
9441 (handle_extended_wait): Don't assume the first signal new children
9442 report is SIGSTOP. Adjust call to pull_pid_from_list.
9443 (linux_wait_for_lwp): Adjust.
9444
8d00225b
YQ
94452012-03-02 Yao Qi <yao@codesourcery.com>
9446
9447 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9448 debug log.
9449
19560ba5
YQ
94502012-03-02 Yao Qi <yao@codesourcery.com>
9451
9452 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9453 `stop_pc' and `tpoint'. Update caller.
9454
1faeff08
MR
94552012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9456
9457 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9458 * linux-low.c (use_linux_regsets): New macro.
9459 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9460 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9461 (linux_register_in_regsets): New function.
9462 (usr_fetch_inferior_registers): Skip registers covered by
9463 regsets.
9464 (usr_store_inferior_registers): Likewise.
9465 (usr_fetch_inferior_registers): New macro.
9466 (usr_store_inferior_registers): Likewise.
9467 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9468 (linux_store_registers): Likewise.
9469 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9470 prototype.
9471 (init_registers_mips64_dsp_linux): Likewise.
9472 (init_registers_mips_linux): New macro.
9473 (init_registers_mips_dsp_linux): Likewise.
9474 (mips_dsp_num_regs): Likewise.
9475 (DSP_BASE, DSP_CONTROL): New fallback macros.
9476 (mips_base_regs): New macro.
9477 (mips_regmap): Use it. Fix the size.
9478 (mips_dsp_regmap): New variable.
9479 (mips_dsp_regset_bitmap): Likewise.
9480 (mips_arch_setup): New function.
9481 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9482 than mips_regmap.
9483 (mips_cannot_store_register): Likewise.
9484 (the_low_target): Update .arch_setup, .num_regs and .regmap
9485 initializers. Add .regset_bitmap initializer.
9486 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9487 initializer.
9488 * linux-bfin-low.c (the_low_target): Likewise.
9489 * linux-cris-low.c (the_low_target): Likewise.
9490 * linux-crisv32-low.c (the_low_target): Likewise.
9491 * linux-ia64-low.c (the_low_target): Likewise.
9492 * linux-m32r-low.c (the_low_target): Likewise.
9493 * linux-m68k-low.c (the_low_target): Likewise.
9494 * linux-ppc-low.c (the_low_target): Likewise.
9495 * linux-s390-low.c (the_low_target): Likewise.
9496 * linux-sh-low.c (the_low_target): Likewise.
9497 * linux-sparc-low.c (the_low_target): Likewise.
9498 * linux-tic6x-low.c (the_low_target): Likewise.
9499 * linux-x86-low.c (the_low_target): Likewise.
9500 * linux-xtensa-low.c (the_low_target): Likewise.
9501 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9502 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9503 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9504 srv_xmlfiles.
9505 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9506 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9507
c03e6ccc
YQ
95082012-02-29 Yao Qi <yao@codesourcery.com>
9509 Pedro Alves <palves@redhat.com>
9510
9511 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9512 `step_over_finished' is true.
9513
644cebc9
PA
95142012-02-27 Pedro Alves <palves@redhat.com>
9515
9516 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9517 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9518
c14d7ab2
PA
95192012-02-27 Pedro Alves <palves@redhat.com>
9520
9521 PR server/9684
9522 * linux-low.c (pid_is_stopped): New.
9523 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9524
412c89dd
LM
95252012-02-25 Luis Machado <lgustavo@codesourcery.com>
9526
9527 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9528 of conditions.
9529
b745defe
MR
95302012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9531
9532 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9533
9f3a5c85
LM
95342012-02-24 Luis Machado <lgustavo@codesourcery>
9535
9536 * server.c (handle_query): Advertise support for target-side
9537 breakpoint condition evaluation.
9538 (process_point_options): New function.
9539 (process_serial_event): When inserting a breakpoint, check for
9540 a target-side condition that should be evaluated.
9541
9542 * mem-break.c: Include regcache.h and ax.h.
9543 (point_cond_list_t): New data structure.
9544 (breakpoint) <cond_list>: New field.
9545 (find_gdb_breakpoint_at): Make non-static.
9546 (delete_gdb_breakpoint_at): Clear any target-side
9547 conditions.
9548 (clear_gdb_breakpoint_conditions): New function.
9549 (add_condition_to_breakpoint): Likewise.
9550 (add_breakpoint_condition): Likewise.
9551 (gdb_condition_true_at_breakpoint): Likewise.
9552 (gdb_breakpoint_here): Return result directly instead
9553 of going through a local variable.
9554
9555 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9556 (clear_gdb_breakpoint_conditions): Likewise.
9557 (add_breakpoint_condition): Likewise.
9558 (gdb_condition_true_at_breakpoint): Likewise.
9559
9560 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9561 (need_step_over_p): Take target-side breakpoint condition into
9562 consideration.
9563
5e1dc496
LM
95642012-02-24 Luis Machado <lgustavo@codesourcery>
9565
9566 * server.h: Include tracepoint.h.
9567 (agent_mem_read, agent_get_trace_state_variable_value,
9568 agent_set_trace_state_variable_value,
9569 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9570 get_set_tsv_func_addr): New prototypes.
9571
9572 * ax.h: New include file.
9573 * ax.c: New source file.
9574
9575 * tracepoint.c: Include ax.h.
9576 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9577 agent_expr, eval_result_type): Move to ax.h.
9578 (parse_agent_expr): Rename to ...
9579 (gdb_parse_agent_expr): ... this, make it non-static and move
9580 to ax.h.
9581 (unparse_agent_expr) Rename to ...
9582 (gdb_unparse_agent_expr): ... this, make it non-static and move
9583 to ax.h.
9584 (eval_agent_expr): Rename to ...
9585 (eval_tracepoint_agent_expr): ... this.
9586 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9587 forward declarations.
9588 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9589 (agent_get_trace_state_variable_value): New function.
9590 (agent_set_trace_state_variable_value): New function.
9591 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9592 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9593 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9594 (condition_true_at_tracepoint): Likewise.
9595 (parse_agent_expr): Rename to ...
9596 (gdb_parse_agent_expr): ... this and move to ax.c.
9597 (unparse_agent_expr): Rename to ...
9598 (gdb_unparse_agent_expr): ... this and move to ax.c.
9599 (gdb_agent_op_name): Move to ax.c.
9600 (eval_agent_expr): Rename to ...
9601 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9602 and move to ax.c.
9603 (eval_tracepoint_agent_expr): New function.
9604 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9605 non-static.
5e1dc496
LM
9606 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9607 ax.c.
9608 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9609 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9610 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9611 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9612 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9613 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9614 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9615 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9616 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9617 (compile_bytecodes): Remove forward declaration.
9618 (is_goto_target): Move to ax.c.
9619 (compile_bytecodes): Move to ax.c and call
9620 agent_get_trace_state_variable_value (...) and
9621 agent_set_trace_state_variable_value (...).
9622
9623 * Makefile.in: Update ax.c and IPA dependencies.
9624
277e4e52
PA
96252012-02-24 Pedro Alves <palves@redhat.com>
9626
9627 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9628 (cmd_bigqtbuffer_circular): ... this. Only handle
9629 'QTBuffer:circular:'.
9630 (handle_tracepoint_general_set): Adjust.
9631
bf4c19f7
YQ
96322012-02-16 Yao Qi <yao@codesourcery.com>
9633
9634 * inferiors.c: Move code to ...
9635 * dll.c: .... here. New.
9636 * server.h: Declare clear_dlls.
9637 * Makefile.in (SFILES): Add dll.c.
9638 (OBS): Add dll.o
9639 (dll.o): New rule.
9640
d73f2619
YQ
96412012-02-11 Yao Qi <yao@codesourcery.com>
9642
9643 * server.c: (handle_monitor_command): Add a new parameter
9644 `own_buf'.
9645 (handle_query): Update caller.
9646
f8255c2a
JB
96472012-02-09 Joel Brobecker <brobecker@adacore.com>
9648
9649 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9650 * configure, config.in: Regenerate.
9651 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9652 is not defined.
9653
da84f473
PA
96542012-02-02 Pedro Alves <palves@redhat.com>
9655
9656 Try SIGKILL first, then PTRACE_KILL.
9657 * linux-low.c (linux_kill_one_lwp): New.
9658 (linux_kill_one_lwp): Rename to ...
9659 (kill_one_lwp_callback): ... this. Use the new
9660 linux_kill_one_lwp.
9661
e886a173
PA
96622012-02-02 Pedro Alves <palves@redhat.com>
9663
9664 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9665 inferior.
9666
be07f1a2
PA
96672012-01-27 Pedro Alves <palves@redhat.com>
9668
9669 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9670 (elf_64_file_p): Make static.
9671 (linux_pid_exe_is_elf_64_file): New.
9672 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9673 Delete declarations.
9674 (linux_pid_exe_is_elf_64_file): Declare.
9675 * linux-x86-low.c (x86_arch_setup): Use
9676 linux_pid_exe_is_elf_64_file.
9677
d8301ad1
JK
96782012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9679
9680 * linux-low.c (linux_wait_for_event_1): Rename to ...
9681 (linux_wait_for_event): ... here and merge it with former
9682 linux_wait_for_event - new variable wait_ptid, use it.
9683 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9684
01b17894
PA
96852012-01-23 Pedro Alves <palves@redhat.com>
9686
9687 * server.c (main): Avoid yet another case of infinite loop while
9688 detaching/killing after a longjmp.
9689
e825046f
JK
96902012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9691
9692 Code cleanup.
9693 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9694
b9e7b9c3
UW
96952012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9696
9697 * hostio.c (handle_readlink): New function.
9698 (handle_vFile): Call it to handle "vFile:readlink" packets.
9699
901f9912
UW
97002012-01-20 Pedro Alves <palves@redhat.com>
9701 Ulrich Weigand <ulrich.weigand@linaro.org>
9702
9703 * server.c (handle_v_requests): Only support vAttach and vRun to
9704 start multiple processes when in extended protocol mode.
9705
fc1ab1a0
PA
97062012-01-17 Pedro Alves <palves@redhat.com>
9707
9708 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9709 memalign plus mprotect to allocate the scratch buffer.
9710
7d5d4e98
PA
97112012-01-13 Pedro Alves <palves@redhat.com>
9712
9713 * server.c (attach_inferior): Clear `cont_thread'.
9714
f128d5e9
PA
97152012-01-13 Pedro Alves <palves@redhat.com>
9716
9717 * server.c (main): Avoid infinite loop while detaching/killing
9718 after a longjmp.
9719
06db92f0
DE
97202012-01-09 Doug Evans <dje@google.com>
9721
9722 * server.c (start_inferior): Set last_ptid in --wrapper case.
9723
32d92999
YQ
97242012-01-06 Yao Qi <yao@codesourcery.com>
9725
9726 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9727 defined.
9728 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9729
5e0a92a9
YQ
97302012-01-04 Yao Qi <yao@codesourcery.com>
9731
9732 * tracepoint.c (cmd_qtdp): Print debug message
9733 for static tracepoint.
9734
ae639e8c
YQ
97352012-01-04 Yao Qi <yao@codesourcery.com>
9736
9737 * tracepoint.c (trace_vdebug): Differentiate debug message
9738 between gdbserver and IPA.
9739
f72429c5
YQ
97402012-01-03 Yao Qi <yao@codesourcery.com>
9741
9742 * tracepoint.c (tracepoint_was_hit): Don't collect for
9743 static tracepoint.
9744
12c3e59c
JB
97452012-01-02 Joel Brobecker <brobecker@adacore.com>
9746
9747 * terminal.h: Reformat copyright header.
9748
67827812
JB
97492012-01-02 Joel Brobecker <brobecker@adacore.com>
9750
9751 * server.c (gdbserver_version): Update copyright year.
9752 * gdbreplay.c (gdbreplay_version): Likewise.
9753
3e52c33d
JK
97542011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9755
9756 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9757
9758 Revert:
9759 2011-12-18 Hui Zhu <teawater@gmail.com>
9760 * linux-low.c (linux_create_inferior): Save return value to ret.
9761
66f1260e
HZ
97622011-12-18 Hui Zhu <teawater@gmail.com>
9763
9764 * linux-low.c (linux_create_inferior): Save return value to ret.
9765
e77616d7
DE
97662011-12-16 Doug Evans <dje@google.com>
9767
e7b06c57
DE
9768 * linux-low.c (linux_create_inferior): If stdio connection,
9769 redirect stdin from /dev/null, stdout to stderr.
9770 * remote-utils.c (remote_is_stdio): New static global.
9771 (remote_connection_is_stdio): New function.
9772 (remote_prepare): Handle stdio connection.
9773 (remote_open): Ditto.
9774 (remote_close): Don't close stdin for stdio connections.
9775 (read_prim,write_prim): New functions. Replace all calls to
9776 read/write to these.
9777 * server.c (main): Watch for "-" argument. Move call to
9778 remote_prepare before start_inferior.
9779 * server.h (STDIO_CONNECTION_NAME): New macro.
9780 (remote_connection_is_stdio): Declare.
9781
e77616d7
DE
9782 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9783 in debugging output.
9784
82067193
YQ
97852011-12-15 Yao Qi <yao@codesourcery.com>
9786
9787 * tracepoint.c: Include sys/syscall.h.
9788 (gdb_ust_thread): Remove preprocessor conditional.
9789
82bfbe7e
PA
97902011-12-14 Pedro Alves <pedro@codesourcery.com>
9791
9792 * linux-low.c (linux_detach_one_lwp): Call
9793 the_low_target.prepare_to_resume before detaching.
9794
712c6575
YQ
97952011-12-14 Yao Qi <yao@codesourcery.com>
9796
9797 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9798 of write.
9799
d54d1edf
YQ
98002011-12-14 Yao Qi <yao@codesourcery.com>
9801
9802 * i386-low.c (i386_low_stopped_data_address): Initialize local
9803 variable `control'.
9804
6210a125
PA
98052011-12-13 Pedro Alves <pedro@codesourcery.com>
9806
9807 PR remote/13492
9808
9809 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9810 DR_CONTROL unless necessary. Extend comments.
9811 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9812 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9813
2ece8244
YQ
98142011-12-13 Yao Qi <yao@codesourcery.com>
9815
9816 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9817 macros.
9818 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9819
784867a5
JK
98202011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9821
9822 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9823 Print new debug message for such case.
9824
6bf36717
JK
98252011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9826
9827 Fix overlapping memcpy.
9828 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9829 the read_inferior_memory transfer.
9830 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9831 write_inferior_memory transfer.
9832 (set_fast_tracepoint_jump): New variable buf. Use it for the
9833 read_inferior_memory and write_inferior_memory transfers.
9834 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9835 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9836 Use it for the write_inferior_memory transfer.
9837 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9838 buffers.
9839
50275556
MR
98402011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9841
9842 * linux-low.c (fetch_register, store_register): Make code
9843 consistent, fix formatting.
9844
7325beb4
MR
98452011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9846
9847 * linux-low.c (usr_store_inferior_registers): Factor out code
9848 to handle individual registers into...
9849 (store_register): ... this new function.
9850
c642a434
UW
98512011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9852
9853 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9854 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9855 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9856 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9857 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9858 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9859 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9860 (srv_xmlfiles): Add new XML files.
9861
9862 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9863 and <sys/uio.h>.
9864 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9865 (init_registers_s390_linux32v1): Add prototype.
9866 (init_registers_s390_linux32v2): Likewise.
9867 (init_registers_s390_linux64v1): Likewise.
9868 (init_registers_s390_linux64v2): Likewise.
9869 (init_registers_s390x_linux64v1): Likewise.
9870 (init_registers_s390x_linux64v2): Likewise.
9871 (s390_num_regs): Increment to 52.
9872 (s390_regmap): Add orig_r2 register.
9873 (s390_num_regs_3264): Increment to 68.
9874 (s390_regmap_3264): Add orig_r2 register.
9875 (s390_collect_ptrace_register): Handle orig_r2 register.
9876 (s390_supply_ptrace_register): Likewise.
9877 (s390_fill_last_break): New function.
9878 (s390_store_last_break): Likewise.
9879 (s390_fill_system_call): New function.
9880 (s390_store_system_call): Likewise.
9881 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9882 register sets.
9883 (s390_check_regset): New function.
9884 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9885 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9886 Update target_regsets for available register sets.
9887
2268b414
JK
98882011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9889 Jan Kratochvil <jan.kratochvil@redhat.com>
9890
9891 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9892 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9893 New.
9894 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9895 * linux-low.h (struct process_info_private): New member r_debug.
9896 * server.c (handle_qxfer_libraries): Call
9897 the_target->qxfer_libraries_svr4.
9898 (handle_qxfer_libraries_svr4): New function.
9899 (qxfer_packets): New entry "libraries-svr4".
9900 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9901 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9902 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9903 PACKET_qXfer_libraries_svr4.
9904
d6db1fab
UW
99052011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9906
9907 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9908 PSW address/mask between 8-byte and 16-byte formats.
9909 (s390_supply_ptrace_register): Likewise.
9910 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9911 basic addressing mode bit.
9912
242f5f1c
SS
99132011-11-24 Stan Shebs <stan@codesourcery.com>
9914
9915 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9916
f196051f
SS
99172011-11-17 Stan Shebs <stan@codesourcery.com>
9918
9919 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9920 (tracing_start_time): New global.
9921 (tracing_stop_time): New global.
9922 (tracing_user_name): New global.
9923 (tracing_notes): New global.
9924 (tracing_stop_note): New global.
9925 (cmd_qtstart): Set traceframe_usage, start_time.
9926 (stop_tracing): Set stop_time.
9927 (cmd_qtstatus): Report additional status.
9928 (cmd_qtp): New function.
9929 (handle_tracepoint_query): Call it.
9930 (cmd_qtnotes): New function.
9931 (handle_tracepoint_general_set): Call it.
9932 (get_timestamp): Rename from tsv_get_timestamp.
9933
405f8e94
SS
99342011-11-14 Stan Shebs <stan@codesourcery.com>
9935 Kwok Cheung Yeung <kcy@codesourcery.com>
9936
9937 * linux-x86-low.c (small_jump_insn): New.
9938 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9939 trampoline and error message, build a trampoline and issue a small
9940 jump instruction to it.
9941 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9942 trampoline and error message.
9943 (x86_get_min_fast_tracepoint_insn_len): New.
9944 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9945 * linux-low.h (struct linux_target_ops): Add arguments to
9946 install_fast_tracepoint_jump_pad operation, add new operation.
9947 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9948 arguments.
9949 (linux_get_min_fast_tracepoint_insn_len): New function.
9950 (linux_target_op): Add new operation.
9951 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9952 (gdb_trampoline_buffer_end): Ditto.
9953 (gdb_trampoline_buffer_error): Ditto.
9954 (struct ipa_sym_addresses): Add fields for new IPA variables.
9955 (symbol_list): Add entries for new IPA variables.
9956 (struct tracepoint): Add fields to hold the address range of the
9957 trampoline used by the tracepoint.
9958 (trampoline_buffer_head): New static variable.
9959 (trampoline_buffer_tail): Ditto.
9960 (claim_trampoline_space): New function.
9961 (have_fast_tracepoint_trampoline_buffer): New function.
9962 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9963 structure.
9964 (install_fast_tracepoint): Ditto, also add error buffer argument.
9965 (cmd_qtminftpilen): New function.
9966 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9967 (fast_tracepoint_from_trampoline_address): New function.
9968 (fast_tracepoint_collecting): Handle trampoline as part of jump
9969 pad space.
9970 (set_trampoline_buffer_space): New function.
9971 (initialize_tracepoint): Initialize new IPA variables.
9972 * target.h (struct target_ops): Add arguments to
9973 install_fast_tracepoint_jump_pad operation, add new
9974 get_min_fast_tracepoint_insn_len operation.
9975 (target_get_min_fast_tracepoint_insn_len): New.
9976 (install_fast_tracepoint_jump_pad): Add arguments.
9977 * server.h (IPA_BUFSIZ): Define.
9978 * linux-i386-ipa.c: Include extra header files.
9979 (initialize_fast_tracepoint_trampoline_buffer): New function.
9980 (initialize_low_tracepoint): Call it.
9981 * server.h (set_trampoline_buffer_space): Declare.
9982 (claim_trampoline_space): Ditto.
9983 (have_fast_tracepoint_trampoline_buffer): Ditto.
9984
1e4d1764
YQ
99852011-11-14 Yao Qi <yao@codesourcery.com>
9986
9987 * server.c (handle_query): Handle InstallInTrace for qSupported.
9988 * tracepoint.c (add_tracepoint): Sort list.
9989 (install_tracepoint, download_tracepoint): New.
9990 (cmd_qtdp): Call them to install and download tracepoints.
9991 (sort_tracepoints): Removed.
9992 (cmd_qtstart): Update.
9993
5c73ff4e
YQ
99942011-11-14 Yao Qi <yao@codesourcery.com>
9995
9996 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9997 * mem-break.h: Declare.
9998 * tracepoint.c (cmd_qtstart): Move some code to ...
9999 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10000 New.
10001 (download_tracepoints): Move some code to ...
10002 (download_tracepoint_1): ... here. New.
10003
86a30030
YQ
100042011-11-08 Yao Qi <yao@codesourcery.com>
10005
10006 * remote-utils.c (relocate_instruction): A comment fix.
10007
8d26e50c
JB
100082011-11-07 Joel Brobecker <brobecker@adacore.com>
10009
10010 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10011 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10012 dr_status_mirror and dr_control_mirror from debug_reg_state.
10013 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10014 (i386_initial_stuff): Remove use of deleted globals.
10015 (i386_get_thread_context, i386_set_thread_context,
10016 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10017 from debug_reg_state.
10018
a59306a3
YQ
100192011-11-05 Yao Qi <yao@codesourcery.com>
10020
10021 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10022 address as TPOINT's.
10023
3065dfb6
SS
100242011-11-02 Stan Shebs <stan@codesourcery.com>
10025
10026 * tracepoint.c (agent_mem_read_string): New function.
10027 (eval_agent_expr): Call it for tracenz.
10028 * server.c (handle_query): Report support for tracenz.
10029
fd0d8c7c
YQ
100302011-11-02 Yao Qi <yao@codesourcery.com>
10031
10032 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10033
609086b1
YQ
100342011-11-02 Yao Qi <yao@codesourcery.com>
10035
10036 * target.h: Fix a typo in comment.
10037
b9fd1791
PA
100382011-10-31 Pedro Alves <pedro@codesourcery.com>
10039
10040 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10041 clobber the breakpoints' shadows with fast tracepoint jumps.
10042 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10043 * target.c (write_inferior_memory): Also pass MYADDR down to
10044 check_mem_write.
10045
03583c20
UW
100462011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10047
10048 * configure.ac: Check support for personality routine.
10049 * configure: Regenerate.
10050 * config.in: Likewise.
10051 * linux-low.c: Include <sys/personality.h>.
10052 Define ADDR_NO_RANDOMIZE if necessary.
10053 (linux_create_inferior): Disable address space randomization when
10054 forking inferior, if requested.
10055 (linux_supports_disable_randomization): New function.
10056 (linux_target_ops): Install it.
10057 * server.h (disable_randomization): Declare.
10058 * server.c (disable_randomization): New global variable.
10059 (handle_general_set): Handle QDisableRandomization.
10060 (handle_query): Likewise for qSupported.
10061 (main): Support --disable-randomization and --no-disable-randomization
10062 command line arguments.
10063 * target.h (struct target_ops): Add supports_disable_randomization.
10064 (target_supports_disable_randomization): New macro.
10065
723b724b
MF
100662011-09-29 Mike Frysinger <vapier@gentoo.org>
10067
10068 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10069 ifdef check.
10070 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10071 [!PT_GETDSBT] (target_loadmap): New definition.
10072 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10073 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10074 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10075 and PT_GETDSBT to LINUX_LOADMAP.
10076 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10077 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10078
55329a5c 100792011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10080
10081 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10082 (arm_linux_hwbp_cap): New static variable.
10083 (arm_linux_get_hwbp_cap): Replace by ...
10084 (arm_linux_init_hwbp_cap): ... this new function.
10085 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10086 (arm_linux_get_hw_watchpoint_count): Likewise.
10087 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10088 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10089 (arm_prepare_to_resume): Use perror_with_name instead of error.
10090
55329a5c 100912011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10092
10093 * linux-arm-low.c: Include <signal.h>.
10094 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10095 (struct arm_linux_hwbp_cap): New data type.
10096 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10097 (struct arm_linux_hw_breakpoint): New data type.
10098 (MAX_BPTS, MAX_WPTS): Define.
10099 (struct arch_process_info, struct arch_lwp_info): New data types.
10100 (arm_linux_get_hwbp_cap): New function.
10101 (arm_linux_get_hw_breakpoint_count): Likewise.
10102 (arm_linux_get_hw_watchpoint_count): Likewise.
10103 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10104 (arm_hwbp_control_initialize): Likewise.
10105 (arm_hwbp_control_is_enabled): Likewise.
10106 (arm_hwbp_control_is_initialized): Likewise.
10107 (arm_hwbp_control_disable): Likewise.
10108 (arm_linux_hw_breakpoint_equal): Likewise.
10109 (arm_linux_hw_point_initialize): Likewise.
10110 (struct update_registers_data): New data structure.
10111 (update_registers_callback: New function.
10112 (arm_insert_point): Likewise.
10113 (arm_remove_point): Likewise.
10114 (arm_stopped_by_watchpoint): Likewise.
10115 (arm_stopped_data_address): Likewise.
10116 (arm_new_process): Likewise.
10117 (arm_new_thread): Likewise.
10118 (arm_prepare_to_resume): Likewise.
10119 (the_low_target): Register arm_insert_point, arm_remove_point,
10120 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10121 arm_new_thread, and arm_prepare_to_resume.
10122
6b9801d4
SS
101232011-09-15 Stan Shebs <stan@codesourcery.com>
10124
10125 * server.h (struct emit_ops): Add compare-goto fields.
10126 * tracepoint.c (gdb_agent_op_sizes): New table.
10127 (emit_eq_goto): New function.
10128 (emit_ne_goto): New function.
10129 (emit_lt_goto): New function.
10130 (emit_le_goto): New function.
10131 (emit_gt_goto): New function.
10132 (emit_ge_goto): New function.
10133 (is_goto_target): New function.
10134 (compile_bytecodes): Recognize special cases of compare-goto
10135 combinations and call specialized emitters for them.
10136 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10137 (amd64_emit_ne_goto): New function.
10138 (amd64_emit_lt_goto): New function.
10139 (amd64_emit_le_goto): New function.
10140 (amd64_emit_gt_goto): New function.
10141 (amd64_emit_ge_goto): New function.
10142 (amd64_emit_ops): Add the new functions.
10143 (i386_emit_eq_goto): New function.
10144 (i386_emit_ne_goto): New function.
10145 (i386_emit_lt_goto): New function.
10146 (i386_emit_le_goto): New function.
10147 (i386_emit_gt_goto): New function.
10148 (i386_emit_ge_goto): New function.
10149 (i386_emit_ops): Add the new functions.
10150
bf15cbda
SS
101512011-09-08 Stan Shebs <stan@codesourcery.com>
10152
10153 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10154 (i386_emit_epilogue): Restore %ebx.
10155
943ca1dd
JZ
101562011-08-31 Jie Zhang <jzhang918@gmail.com>
10157
10158 * server.c (step_thread): Remove definition.
10159 (process_serial_event): Don't handle Hs.
10160 * server.h (step_thread): Remove declaration.
10161 * target.c (set_desired_inferior): Remove use of step_thread.
10162
e3deef73
LM
101632011-08-24 Luis Machado <lgustavo@codesourcery.com>
10164
10165 * linux-low.c: Include linux-procfs.h.
10166 (linux_attach_lwp_1): Update comments.
10167 (linux_attach): Scan for existing threads when attaching to a
10168 process that is the tgid.
10169 * Makefile.in: Update dependencies.
10170
13da1c97
LM
101712011-08-24 Luis Machado <lgustavo@codesourcery.com>
10172
10173 * configure.srv: Add linux-procfs.o dependencies.
10174
881127c9
YQ
101752011-08-14 Yao Qi <yao@codesourcery.com>
10176
10177 * target.h (struct target_ops): Fix indent.
10178 * win32-low.c (win32_target_ops): Fix comment.
10179
58dbd541
YQ
101802011-08-14 Andrew Jenner <andrew@codesourcery.com>
10181 Yao Qi <yao@codesourcery.com>
10182
10183 * Makefile.in (clean): Remove tic6x-*.c files.
10184 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10185 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10186 (tic6x-c64xp-linux.c): Likewise.
10187 * configure.srv: Add support for tic6x-*-uclinux.
10188 * linux-tic6x-low.c: New.
10189 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10190
78d85199
YQ
101912011-08-14 Andrew Stubbs <ams@codesourcery.com>
10192 Yao Qi <yao@codesourcery.com>
10193
10194 * target.h (struct target_ops): Add read_loadmap.
10195 * linux-low.c (struct target_loadseg): New type.
10196 (struct target_loadmap): New type.
10197 (linux_read_loadmap): New function.
10198 (linux_target_ops): Add linux_read_loadmap.
10199 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10200 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10201 to NULL.
78d85199 10202
a959a88d
EZ
102032011-08-05 Eli Zaretskii <eliz@gnu.org>
10204
10205 * win32-low.c: Include <stdint.h>.
10206
1ced966e
PA
102072011-07-22 Pedro Alves <pedro@codesourcery.com>
10208
10209 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10210 to the inferior here.
10211 (i386_remove_aligned_watchpoint): Ditto.
10212 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10213 fit part of the watchpoint in the debug registers.
10214 (i386_update_inferior_debug_regs): New.
10215 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10216 registers, and only update the inferior on success.
10217 (i386_low_remove_watchpoint): Ditto.
10218
d26e3629
KY
102192011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10220
10221 * linux-low.c (compare_ints, unique, list_threads, show_process,
10222 linux_core_of_thread): Delete.
10223 (linux_target_ops): Change linux_core_of_thread to
10224 linux_common_core_of_thread.
10225 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10226 * utils.c (malloc_failure): Change type of argument.
10227 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10228 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10229 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10230 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10231 (IPA_OBJS): Add common-utils-ipa.o.
10232 (ptid_h, linux_osdata_h): New macros.
10233 (server_h): Add common/common-utils.h, common/xml-utils.h,
10234 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10235 common/ptid.h.
10236 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10237 ptid.o, buffer.o): New rules.
10238 (linux-low.o): Add common/linux-osdata.h as a dependency.
10239 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10240 * configure.ac: Add AC_HEADER_DIRENT check.
10241 * config.in: Regenerate.
10242 * configure: Regenerate.
10243 * remote-utils.c (xml_escape_text): Delete.
10244 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10245 buffer_xml_printf): Move to common/buffer.c.
10246 * server.c (main): Remove call to initialize_inferiors.
10247 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10248 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10249 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10250 internal_error, gdb_assert, gdb_assert_fail): Delete.
10251 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10252 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10253 common/buffer.h.
10254 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10255 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10256 initialize_inferiors): Delete.
10257
2275a1a7
PA
102582011-07-20 Pedro Alves <pedro@codesourcery.com>
10259
10260 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10261 symbol error.
10262
0a5b1e09
PA
102632011-05-31 Pedro Alves <pedro@codesourcery.com>
10264
10265 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10266 assertion.
10267 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10268
6938fd34
YQ
102692011-05-26 Yao Qi <yao@codesourcery.com>
10270
10271 * Makefile.in (thread-db.o): Track dependence to
10272 common/gdb_thread_db.h.
10273 * thread-db.c: include gdb_thread_db.h from right place.
10274
b481f9e0
TT
102752011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10276
10277 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10278 __FILE__ and __LINE__ to internal_error.
10279
98a5dd13
DE
102802011-05-13 Doug Evans <dje@google.com>
10281
10282 * thread-db.c (try_thread_db_load_from_sdir): New function.
10283 (try_thread_db_load_from_dir): New function.
10284 (thread_db_load_search): Handle $sdir, ignore $pdir.
10285 Remove trying of system directories if search of
10286 libthread-db-search-path fails, that is now done via $sdir.
10287
d248b706
KY
102882011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10289
10290 * server.c (handle_query): Add EnableDisableTracepoints to the list
10291 of supported features.
43aaf8b6 10292 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10293 tracepoints.
43aaf8b6
PA
10294 (cmd_qtenable_disable): New.
10295 (cmd_qtstart): Install tracepoints even if disabled.
10296 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10297 receiving a QTEnable or QTDisable packet.
10298 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10299 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10300 tracepoints.
10301 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10302
84e578fb
DE
103032011-05-10 Doug Evans <dje@google.com>
10304
10305 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10306
71f55dd8
DE
103072011-05-04 Doug Evans <dje@google.com>
10308
10309 * linux-low.c (linux_join): Skip process lookup.
10310 * spu-low.c (spu_join): Ditto.
10311 * server.c (join_inferiors_callback): Delete.
10312 (process_serial_event): For 'D' packet (detach) call join_inferior
10313 directly.
10314
4d393d60
JM
103152011-05-04 Joseph Myers <joseph@codesourcery.com>
10316
10317 * README: Don't mention xscale*-*-linux*.
10318 * configure.srv (xscale*-*-linux*): Don't handle target.
10319
b00ad6ff
NF
103202011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10321
10322 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10323 casting pointers.
10324 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10325 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10326 (i386_emit_void_call_2): Likewise.
10327
af96c192
YQ
103282011-04-26 Yao Qi <yao@codesourcery.com>
10329
43aaf8b6
PA
10330 * linux-low.c: Move common macros to linux-ptrace.h.
10331 Include linux-ptrace.h.
af96c192
YQ
10332 * Makefile.in (linux_ptrace_h): New.
10333 (linux-low.o): Depends on linux-ptrace.h.
10334
03f2bd59
JK
103352011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10336
10337 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10338 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10339 (remote_prepare): New function with most of the TCP code from ...
10340 (remote_open): ... here. Detect PORT here unconditionally. Move also
10341 setting transport_is_reliable.
10342 * server.c (run_once): New variable.
10343 (gdbserver_usage): Document it.
10344 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10345 the first run if RUN_ONCE.
10346 * server.h (run_once, remote_prepare): New declarations.
10347
7a9dd1b2
TT
103482011-04-19 Tom Tromey <tromey@redhat.com>
10349
10350 * win32-low.c (handle_load_dll): Remove duplicate "the".
10351
81239425
PM
103522011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10353
10354 Remove support for old Cygwin 1.5 versions.
10355 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10356 function to avoid warning.
10357 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10358 warning.
10359
9e0627f1
PM
103602011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10361
10362 * gdbserver/server.h (Macro _): Define it if not available.
10363
588eebee
MS
103642011-03-14 Michael Snyder <msnyder@vmware.com>
10365
348af9f7 10366 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10367
43f70d4c
JB
103682011-03-10 Joel Brobecker <brobecker@adacore.com>
10369
10370 * Makefile.in (maintainer-clean realclean distclean): Remove
10371 "make ... subdir_do" command.
10372
348af9f7
MS
103732011-03-10 Michael Snyder <msnyder@vmware.com>
10374
10375 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10376
10377 * server.c (handle_v_run): Free alloced buffer on early return.
10378
e637a4f5
YQ
103792011-03-09 Yao Qi <yao@codesourcery.com>
10380
10381 Revert:
10382 2011-03-04 Yao Qi <yao@codesourcery.com>
10383
10384 * Makefile.in: Remove GNU make feature --directory.
10385
10386 2011-03-05 Yao Qi <yao@codesourcery.com>
10387
10388 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10389 (subdir_do): New make target. Copied from gdb/Makefile.
10390 (maintainer-clean, realclean, distclean, clean): Call corresponding
10391 make targets in common/Makefile.
10392
10393 2011-02-11 Yao Qi <yao@codesourcery.com>
10394
10395 * configure.ac: Call AC_PROG_RANLIB.
10396 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10397 * configure: Regenerate.
10398
e6edda56
JK
103992011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10400
10401 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10402
e5141119
JB
104032011-03-06 Yao Qi <yao@codesourcery.com>
10404
10405 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10406
64794aa4
JB
104072011-03-05 Yao Qi <yao@codesourcery.com>
10408
10409 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10410 (subdir_do): New make target. Copied from gdb/Makefile.
10411 (maintainer-clean, realclean, distclean, clean): Call corresponding
10412 make targets in common/Makefile.
10413
7a762829
YQ
104142011-03-04 Yao Qi <yao@codesourcery.com>
10415
10416 * Makefile.in: Remove GNU make feature --directory.
10417
348af9f7
MS
104182011-03-04 Michael Snyder <msnyder@vmware.com>
10419
10420 * server.c (queue_stop_reply): Call xmalloc not malloc.
10421
104222011-03-02 Michael Snyder <msnyder@vmware.com>
10423
10424 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10425
9f72fee2
MS
104262011-02-28 Michael Snyder <msnyder@vmware.com>
10427
588eebee
MS
10428 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10429 (cmd_qtframe): Ditto.
10430 (cmd_qtbuffer): Ditto.
10431 (cmd_bigqtbuffer): Ditto.
10432
9f72fee2
MS
10433 * utils.c (decimal2str): Initialize 'width' to nine, then
10434 don't mess with it.
10435
8040bd49
UW
104362011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10437
10438 * hostio.c (require_data): Free *data, not data.
10439
7e52cbd0
JK
104402011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10441
10442 * hostio.c (require_data): Use free, not xfree.
10443
9130f83e
MS
104442011-02-27 Michael Snyder <msnyder@vmware.com>
10445
4b812f4e
MS
10446 * server.c (handle_query): Discard unused value.
10447
9130f83e
MS
10448 * hostio.c (require_data): Free malloc memory before returning
10449 error.
10450
69d37113
MS
104512011-02-26 Michael Snyder <msnyder@vmware.com>
10452
10453 * linux-low.c (list_threads): Call closedir for dirent.
10454
35f5825a
MS
104552011-02-27 Michael Snyder <msnyder@vmware.com>
10456
2a589cef
MS
10457 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10458 a case statement falls through.
10459
0adea5f7
MS
10460 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10461
35f5825a
MS
10462 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10463 in comparison.
10464
238f1c74
MS
104652011-02-26 Michael Snyder <msnyder@vmware.com>
10466
10467 * utils.c (decimal2str): Eliminate dead code and dead param.
10468 (pulongest): Drop dead param from call to decimal2str.
10469 (plongest): Ditto.
10470
633ff500
JB
104712011-02-24 Joel Brobecker <brobecker@adacore.com>
10472
10473 Revert the following patch (not approved yet):
10474 2011-02-21 Hui Zhu <teawater@gmail.com>
10475 * tracepoint.c (tp_printf): New function.
10476 (eval_agent_expr): Handle gdb_agent_op_printf.
10477
f9c6ff72
HZ
104782011-02-21 Hui Zhu <teawater@gmail.com>
10479
10480 * tracepoint.c (tp_printf): New function.
10481 (eval_agent_expr): Handle gdb_agent_op_printf.
10482
94d5e490
TT
104832011-02-18 Tom Tromey <tromey@redhat.com>
10484
10485 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10486 (tracepoint.o): Likewise.
10487 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10488 (gdb_agent_op_names): Likewise.
10489
c7f96d2b
TT
104902011-02-18 Tom Tromey <tromey@redhat.com>
10491
10492 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10493 gdb_agent_op_rot>: New constants.
10494 (gdb_agent_op_names): Add pick and roll.
10495 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10496 cases.
10497
0feedb2c
JK
104982011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10499
10500 * aclocal.m4: Regenerated with aclocal-1.11.1.
10501
b3b9301e
PA
105022011-02-14 Pedro Alves <pedro@codesourcery.com>
10503
10504 * server.c (handle_qxfer_traceframe_info): New.
10505 (qxfer_packets): Register "traceframe-info".
10506 (handle_query): Report support for qXfer:traceframe-info:read+.
10507 * tracepoint.c (match_blocktype): New.
10508 (traceframe_find_block_type): Rename to ...
10509 (traceframe_walk_blocks): ... this. Add callback filter argument,
10510 and use it.
10511 (traceframe_find_block_type): New, reimplemented on top of
10512 traceframe_walk_blocks.
10513 (build_traceframe_info_xml): New.
10514 (traceframe_read_info): New.
10515 * server.h (traceframe_read_info): Declare.
10516
4f3e6fb7
YQ
105172011-02-11 Yao Qi <yao@codesourcery.com>
10518
10519 * configure.ac: Call AC_PROG_RANLIB.
10520 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10521 * configure: Regenerate.
10522
764880b7
PA
105232011-02-07 Pedro Alves <pedro@codesourcery.com>
10524
10525 * server.c (gdb_read_memory): Change return semantics to allow
10526 partial transfers.
10527 (handle_search_memory_1): Adjust.
10528 (process_serial_event) <'m' packet>: Handle partial transfers.
10529 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10530
1c79eb8a
PA
105312011-01-28 Pedro Alves <pedro@codesourcery.com>
10532
10533 * regcache.c (init_register_cache): Initialize
10534 regcache->register_status.
10535 (free_register_cache): Release regcache->register_status.
10536 (regcache_cpy): Copy register_status.
10537 (registers_to_string): Print 'x's for unavailable registers.
10538 (supply_register): Mark the register's status valid or
10539 unavailable, depending on whether a buffer was passed in or not.
10540 (supply_register_zeroed): New.
10541 (supply_regblock): Mark the registers' status valid or
10542 unavailable, depending on whether a buffer was passed in or not.
10543 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10544 (struct regcache): New `register_status' field.
10545 (supply_register_zeroed): Declare.
10546 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10547 supply_register_zeroed, rather than passing a NULL buffer to
10548 supply_register.
10549 * tracepoint.c (fetch_traceframe_registers): Update comment.
10550
85724a0e
PA
105512011-01-28 Pedro Alves <pedro@codesourcery.com>
10552
10553 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10554 buffer explicit.
10555
d08aafef
PA
105562011-01-25 Pedro Alves <pedro@codesourcery.com>
10557
10558 * server.h (decode_xfer_write): Change prototype.
10559 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10560 and don't extract the annex here.
10561 * server.c (decode_xfer_read): Remove `annex' parameter,
10562 and don't extract the annex here.
10563 (decode_xfer): New.
10564 (struct qxfer): New.
10565 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10566 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10567 (handle_qxfer_statictrace): New functions, abstracted out from
10568 handle_query, and made to use the struct qxfer interface.
10569 (handle_threads_qxfer_proper): Rename to ...
10570 (handle_qxfer_threads_proper): ... this.
10571 (handle_threads_qxfer): Rename to ...
10572 (handle_qxfer_threads): ... this. Adjust.
10573 (qxfer_packets): New array.
10574 (handle_qxfer): New function.
10575 (handle_query): Use handle_qxfer.
10576
493e2a69
MS
105772011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10578
10579 * gdbreplay.c: Shorten lines of >= 80 columns.
10580 * linux-low.c: Ditto.
10581 * linux-ppc-low.c: Ditto.
10582 * linux-s390-low.c: Ditto.
10583 * linux-sparc-low.c: Ditto.
10584 * linux-x86-low.c: Ditto.
10585 * linux-xtensa-low.c: Ditto.
10586 * mem-break.c: Ditto.
10587 * nto-low.c: Ditto.
10588 * regcache.h: Ditto.
10589 * remote-utils.c: Ditto.
10590 * server.c: Ditto.
10591 * server.h: Ditto.
10592 * thread-db.c: Ditto.
10593 * tracepoint.c: Ditto.
10594 * utils.c: Ditto.
10595 * win32-low.h: Ditto.
10596
44944448
JB
105972011-01-05 Joel Brobecker <brobecker@adacore.com>
10598
10599 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10600 update.
10601
71ce852c
JB
106022011-01-01 Joel Brobecker <brobecker@adacore.com>
10603
10604 * server.c (gdbserver_version): Update copyright year in version
10605 output.
10606 * gdbreplay.c (gdbreplay_version): Ditto.
10607
eb826dc6
MF
106082010-12-29 Jie Zhang <jie.zhang@analog.com>
10609
10610 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10611 * linux-bfin-low.c: New file.
10612 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10613 PT_DATA_ADDR for BFIN targets.
10614 * Makefile.in (SFILES): Add linux-bfin-low.c.
10615 (clean): Remove reg-bfin.c.
10616 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10617 * README: Mention supported Blackfin targets.
10618
39ab222a
MF
106192010-12-23 Mike Frysinger <vapier@gentoo.org>
10620
10621 * .gitignore: New file.
10622
a1f2ce7d
MF
106232010-11-16 Mike Frysinger <vapier@gentoo.org>
10624
10625 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10626
f474844c
JZ
106272010-10-22 Jie Zhang <jie@codesourcery.com>
10628
10629 * Makefile.in: Add FLAGS_TO_PASS variable.
10630 (install): Remove dependency of install-only and recursively
10631 invoke make for install-only.
10632
f1048712
DE
106332010-10-04 Doug Evans <dje@google.com>
10634
10635 * Makefile.in (uninstall): Use $(DESTDIR).
10636
b53a1623
PA
106372010-09-24 Pedro Alves <pedro@codesourcery.com>
10638
e6ee044d
PA
10639 PR gdb/11842
10640
b53a1623
PA
10641 * linux-x86-low.c (compat_siginfo_from_siginfo)
10642 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10643 si_code is < 0. Check for si_code == SI_TIMER before checking for
10644 si_code < 0.
10645
fa1bd1e4
JB
106462010-09-13 Joel Brobecker <brobecker@adacore.com>
10647
10648 * lynx-i386-low.c: New file.
10649 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10650
47fac8f8
JB
106512010-09-13 Joel Brobecker <brobecker@adacore.com>
10652
10653 * lynx-low.c (ptrace_request_to_str): Remove handling for
10654 request values that have been removed in LynxOS 5.x.
10655
1adfc54d
JB
106562010-09-13 Joel Brobecker <brobecker@adacore.com>
10657
10658 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10659 <ptrace.h>
10660
c2a66c29
NS
106612010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10662
10663 * configure.ac: Add --enable-inprocess-agent option.
10664 * configure: Rebuilt.
10665
32fcada3
YQ
106662010-09-06 Yao Qi <yao@codesourcery.com>
10667
10668 * linux-low.c (linux_kill): Remove unused variable.
10669 (linux_stabilize_threads): Likewise.
10670 * server.c (start_inferior): Likewise.
10671 (queue_stop_reply_callback): Likewise.
10672 * tracepoint.c (do_action_at_tracepoint): Likewise.
10673
0cccb683
YQ
106742010-09-06 Yao Qi <yao@codesourcery.com>
10675
10676 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10677 on return.
10678
423ec54c
JK
106792010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10680
10681 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10682
12ac6819
PA
106832010-09-06 Pedro Alves <pedro@codesourcery.com>
10684
10685 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10686 "$(IPA_DEPFILES)".
10687
8ed54b31
JB
106882010-09-01 Joel Brobecker <brobecker@adacore.com>
10689
10690 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10691 gdbserver/lynx-ppc-low.c: New files.
10692 * Makefile.in (lynx_low_h): New variable.
10693 (lynx-low.o, lynx-ppc-low.o): New rules.
10694 * configure.ac: On LynxOS, link with -lnetinet.
10695 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10696 * configure: regenerate.
10697
bb0116a4
JB
106982010-09-01 Joel Brobecker <brobecker@adacore.com>
10699
10700 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10701 * configure.ac: Add check for vasprintf and vsnprintf.
10702 * configure, config.in: Regenerate.
10703 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10704
a778ab81 107052010-09-01 Joel Brobecker <brobecker@adacore.com>
10706
10707 * gdbreplay.c: Move include of alloca.h up, next to include of
10708 malloc.h.
10709 * server.h: Add include of malloc.h.
10710 * mem-break.c: Remove include of malloc.h.
10711 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10712
8b034a19 107132010-09-01 Joel Brobecker <brobecker@adacore.com>
10714
10715 * Makefile.in (memmem.o): Build with -Wno-error.
10716
107172010-09-01 Joel Brobecker <brobecker@adacore.com>
10718
10719 * utils.c (xsnprintf): Make non-static.
10720 * server.h: Add xsnprintf declaration.
10721 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10722 replace calls to snprintf by calls to xsnprintf throughout.
10723
107242010-09-01 Joel Brobecker <brobecker@adacore.com>
10725
10726 * configure.ac: Add configure check for alloca.
10727 * configure, config.in: Regenerate.
10728 * server.h: Include alloca.h if it exists.
10729 * gdbreplay.c: Include alloca.h if it exists.
10730
1a981360
PA
107312010-08-28 Pedro Alves <pedro@codesourcery.com>
10732
10733 * linux-low.c (__SIGRTMIN): Define if not already defined.
10734 (linux_create_inferior): Check for __ANDROID__ rather than
10735 __SIGRTMIN.
10736 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10737 are already deferred.
10738 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10739 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10740 stopped and already has a pending signal to report.
10741 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10742 a pending signal to report or is moving out of a jump pad.
10743 (linux_init_signals): Check for __ANDROID__ rather than
10744 __SIGRTMIN.
10745
b4d51a55
PA
107462010-08-28 Pedro Alves <pedro@codesourcery.com>
10747
10748 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10749 debug_threads check. Avoid a linear search when not doing debug
10750 output.
10751
ec48365d
PA
107522010-08-27 Pedro Alves <pedro@codesourcery.com>
10753
10754 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10755 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10756 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10757 (process_event): Change local fd's type to gdb_fildes_t.
10758 (create_file_handler): Adjust prototype.
10759 (delete_file_handler): Adjust prototype.
10760 (handle_file_event): Adjust prototype. Use pfildes.
10761 (create_file_event): Adjsut prototype.
10762 * remote-utils.c (remote_desc, listen_desc): Change type to
10763 gdb_fildes_t.
10764 * server.h: New gdb_fildes_t typedef.
10765 [USE_WIN32API]: Include winsock2.h.
10766 (delete_file_handler, add_file_handler): Adjust prototypes.
10767 (pfildes): Declare.
10768 * utils.c (pfildes): New.
10769
854d88f0
PA
107702010-08-27 Pedro Alves <pedro@codesourcery.com>
10771
10772 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10773 * configure: Regenerate.
10774
0146f85b
PA
107752010-08-27 Pedro Alves <pedro@codesourcery.com>
10776
10777 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10778 (linux_done_accessing_memory): ... this.
10779 (linux_target_ops): Adjust.
10780 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10781 * nto-low.c (nto_target_ops): Adjust comment.
10782 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10783 * spu-low.c (spu_target_ops): Adjust comment.
10784 * target.h (target_ops): Rename unprepare_to_access_memory field
10785 to done_accessing_memory.
10786 (unprepare_to_access_memory): Rename to ...
10787 (done_accessing_memory): ... this.
10788
90d74c30
PA
107892010-08-26 Pedro Alves <pedro@codesourcery.com>
10790
10791 * linux-low.c (linux_prepare_to_access_memory): New.
10792 (linux_unprepare_to_access_memory): New.
10793 (linux_target_ops): Install them.
10794 * server.c (read_memory): Rename to ...
10795 (gdb_read_memory): ... this. Use
10796 prepare_to_access_memory/prepare_to_access_memory.
10797 (write_memory): Rename to ...
10798 (gdb_write_memory): ... this. Use
10799 prepare_to_access_memory/prepare_to_access_memory.
10800 (handle_search_memory_1): Adjust.
10801 (process_serial_event): Adjust.
10802 * target.h (struct target_ops): New fields
10803 prepare_to_access_memory and unprepare_to_access_memory.
10804 (prepare_to_access_memory, unprepare_to_access_memory): New.
10805 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10806 prepare_to_access_memory/prepare_to_access_memory.
10807 * nto-low.c (nto_target_ops): Adjust.
10808 * spu-low.c (spu_target_ops): Adjust.
10809 * win32-low.c (win32_target_ops): Adjust.
10810
fd467969
PA
108112010-08-26 Pedro Alves <pedro@codesourcery.com>
10812
10813 * Makefile.in (WARN_CFLAGS): Get it from configure.
10814 (WERROR_CFLAGS): New.
10815 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10816 * configure.ac: Introduce --enable-werror, which adds -Werror to
10817 the compiler command line. Enabled by default. Disable with
10818 --disable-werror. Add -Wdeclaration-after-statement
10819 Wpointer-arith and -Wformat-nonliteral to warning flags.
10820 * configure: Regenerate.
10821
331e2f5f
PA
108222010-08-26 Pedro Alves <pedro@codesourcery.com>
10823
10824 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10825
e581f2b4
PA
108262010-08-26 Pedro Alves <pedro@codesourcery.com>
10827
10828 * gdbreplay.c (remote_error): New.
10829 (gdbchar): New.
10830 (expect): Use gdbchar. Check for error reading from GDB.
10831 Clarify sync error output.
10832 (play): Check for errors writing to GDB.
10833 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10834 * remote-utils.c (getpkt): Check for errors writing to the remote
10835 descriptor.
10836
3c11dd79
PA
108372010-08-25 Pedro Alves <pedro@codesourcery.com>
10838
10839 * linux-low.c (linux_wait_1): Move non-debugging code out of
10840 `debug_threads' control.
10841
d20a8ad9
PA
108422010-08-25 Pedro Alves <pedro@codesourcery.com>
10843
10844 * linux-low.c (linux_wait_1): Don't set last_status here.
10845 * server.c (push_event, queue_stop_reply_callback): Assert we're
10846 not pushing a TARGET_WAITKIND_IGNORE event.
10847 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10848 (myresume, handle_target_event): Set the thread's last_resume_kind
10849 and last_status from the target returned status.
10850
964e4306
PA
108512010-08-25 Pedro Alves <pedro@codesourcery.com>
10852
10853 PR threads/10729
10854
10855 * linux-x86-low.c (update_debug_registers_callback): New.
10856 (i386_dr_low_set_addr): Use it.
10857 (i386_dr_low_get_addr): New.
10858 (i386_dr_low_set_control): Use update_debug_registers_callback.
10859 (i386_dr_low_get_control): New.
10860 (i386_dr_low_get_status): Adjust.
10861 * linux-low.c (linux_stop_lwp): New.
10862 * linux-low.h (linux_stop_lwp): Declare.
10863
10864 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10865 argument instead of a i386_debug_reg_state.
10866 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10867 a i386_debug_reg_state.
10868 (i386_insert_aligned_watchpoint): Adjust.
10869 (i386_remove_aligned_watchpoint): Adjust.
10870 (i386_low_stopped_data_address): Read the debug registers from the
10871 inferior instead of from the mirrors.
10872 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10873 (i386_dr_low_get_addr): Declare.
10874 (i386_dr_low_get_control): Declare.
10875 (i386_dr_low_get_status): Change prototype.
10876
10877 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10878 (i386_dr_low_get_addr): New.
10879 (i386_dr_low_get_control): New.
10880 (i386_dr_low_get_status): Adjust prototype. Return
10881 dr_status_mirror.
10882 (i386_initial_stuff): Clear dr_status_mirror and
10883 dr_control_mirror.
10884 (i386_get_thread_context): Adjust.
10885 (i386_set_thread_context): Adjust.
10886 (i386_thread_added): Adjust.
10887
5f21a75b
PA
108882010-08-24 Pedro Alves <pedro@codesourcery.com>
10889
10890 * linux-low.h (linux_thread_area): Delete declaration.
10891
3e4c1235
TS
108922010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10893
10894 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10895 after its termination.
10896
1971b033
PA
108972010-08-09 Pedro Alves <pedro@codesourcery.com>
10898
10899 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10900 (gdb_wants_all_stopped): Delete.
10901 (linux_wait_1): Don't call them.
10902 * server.c (handle_v_cont): Tag all threads as want-stopped.
10903 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10904 stopped as "client-wants-stopped".
10905
310444ac
PA
109062010-07-31 Pedro Alves <pedro@codesourcery.com>
10907
10908 * Makefile.in (signals_h): New.
10909 (server_h): Depend on it.
10910 (server.o): Don't depend on $(signals_def).
10911 (signals.o): Depend on $(signals_def).
10912
a19cae16
JK
109132010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10914
10915 * Makefile.in (signals_def): New.
10916 (server_h): Append include/gdb/signals.h and signals_def.
10917 (server.o): Append signals_def.
10918
30d50328
JK
109192010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10920
10921 * server.c (handle_target_event): Use target_signal_to_host for
10922 resume_info.sig initialization.
10923 * target.h (struct thread_resume) <sig>: New comment.
10924
5c3216e2
OS
109252010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10926
c6f46ca0
OS
10927 * server.c (handle_query): strcpy() the returned string from paddress()
10928 instead of sprintf().
5c3216e2
OS
10929 * utils.c (paddress): Return phex_nz().
10930
6bd31874
JB
109312010-07-07 Joel Brobecker <brobecker@adacore.com>
10932
10933 * server.c (handle_v_cont): Call mourn_inferior if process
10934 just exited.
10935 (myresume): Likewise.
10936
0fb4aa4b
PA
109372010-07-01 Pedro Alves <pedro@codesourcery.com>
10938
10939 Static tracepoints, and integration with UST.
10940
10941 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10942 * mem-break.c (uninsert_all_breakpoints)
10943 (reinsert_all_breakpoints): New.
10944 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10945 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10946 (gdb_agent_ust_loaded, helper_thread_id)
10947 (gdb_agent_helper_thread_id): New macros.
10948 (struct ipa_sym_addresses): Add addr_ust_loaded,
10949 addr_helper_thread_id, addr_cmd_buf.
10950 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10951 (in_process_agent_loaded_ust): New.
10952 (write_e_ust_not_loaded): New.
10953 (maybe_write_ipa_ust_not_loaded): New.
10954 (struct collect_static_trace_data_action): New.
10955 (enum tracepoint_type) <static_tracepoint>: New.
10956 (struct tracepoint) <handle>: Mention static tracepoints.
10957 (struct static_tracepoint_ctx): New.
10958 (CMD_BUF_SIZE): New.
10959 (add_tracepoint_action): Handle static tracepoint actions.
10960 (unprobe_marker_at): New.
10961 (clear_installed_tracepoints): Handle static tracepoints.
10962 (cmd_qtdp): Handle static tracepoints.
10963 (probe_marker_at): New.
10964 (cmd_qtstart): Handle static tracepoints.
10965 (response_tracepoint): Handle static tracepoints.
10966 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10967 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10968 (get_context_regcache): Handle static tracepoints.
10969 (do_action_at_tracepoint): Handle static tracepoint actions.
10970 (traceframe_find_block_type): Handle static trace data blocks.
10971 (traceframe_read_sdata): New.
10972 (download_tracepoints): Download static tracepoint actions.
10973 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10974 (GDB_PROBE_NAME): New.
10975 (ust_ops): New.
10976 (GET_UST_SYM): New.
10977 (USTF): New.
10978 (dlsym_ust): New.
10979 (ust_marker_to_static_tracepoint): New.
10980 (gdb_probe): New.
10981 (collect_ust_data_at_tracepoint): New.
10982 (gdb_ust_probe): New.
10983 (UNIX_PATH_MAX, SOCK_DIR): New.
10984 (gdb_ust_connect_sync_socket): New.
10985 (resume_thread, stop_thread): New.
10986 (run_inferior_command): New.
10987 (init_named_socket): New.
10988 (gdb_ust_socket_init): New.
10989 (cstr_to_hexstr): New.
10990 (next_st): New.
10991 (first_marker, next_marker): New.
10992 (response_ust_marker): New.
10993 (cmd_qtfstm, cmd_qtsstm): New.
10994 (unprobe_marker_at, probe_marker_at): New.
10995 (cmd_qtstmat, gdb_ust_thread): New.
10996 (gdb_ust_init): New.
10997 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10998 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10999 (ST_REGENTRY): New.
11000 (x86_64_st_collect_regmap): New.
11001 (X86_64_NUM_ST_COLLECT_GREGS): New.
11002 (AMD64_RIP_REGNUM): New.
11003 (supply_static_tracepoint_registers): New.
11004 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11005 (ST_REGENTRY): New.
11006 (i386_st_collect_regmap): New.
11007 (i386_NUM_ST_COLLECT_GREGS): New.
11008 (supply_static_tracepoint_registers): New.
11009 * server.c (handle_query): Handle qXfer:statictrace:read.
11010 <qSupported>: Report support for StaticTracepoints, and
11011 qXfer:statictrace:read features.
11012 * server.h (traceframe_read_sdata)
11013 (supply_static_tracepoint_registers): Declare.
11014 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11015 (unpack_varlen_hex): Include in IPA build.
11016 * Makefile.in (ustlibs, ustinc): New.
11017 (IPA_OBJS): Add remote-utils-ipa.o.
11018 ($(IPA_LIB)): Link -ldl and -lpthread.
11019 (UST_CFLAGS): New.
11020 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11021 * config.in, configure: Regenerate.
11022
9e4344e5
PA
110232010-06-20 Ian Lance Taylor <iant@google.com>
11024 Pedro Alves <pedro@codesourcery.com>
11025
11026 * linux-x86-low.c (always_true): Delete.
11027 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11028 trying to fool the compiler with always_true.
11029
c6beb2cb
PA
110302010-06-20 Pedro Alves <pedro@codesourcery.com>
11031
11032 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11033 conditions in gdbserver.
11034
d2ed6730
UW
110352010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11036
11037 * spu-low.c (spu_read_memory): Wrap around local store limit.
11038 (spu_write_memory): Likewise.
11039
4e29fb54
PA
110402010-06-15 Pedro Alves <pedro@codesourcery.com>
11041
11042 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11043 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11044 LONGEST uses.
11045 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11046 uses.
11047 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11048 uses with LONGEST uses.
11049
6a271cae
PA
110502010-06-14 Stan Shebs <stan@codesourcery.com>
11051 Pedro Alves <pedro@codesourcery.com>
11052
11053 Bytecode compiler.
11054
11055 * linux-x86-low.c: Include limits.h.
11056 (add_insns): New.
11057 (always_true): New.
11058 (EMIT_ASM): New.
11059 (EMIT_ASM32): New.
11060 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11061 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11062 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11063 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11064 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11065 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11066 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11067 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11068 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11069 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11070 (amd64_emit_void_call_2): New.
11071 (amd64_emit_ops): New.
11072 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11073 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11074 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11075 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11076 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11077 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11078 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11079 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11080 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11081 (i386_emit_stack_adjust, i386_emit_int_call_1)
11082 (i386_emit_void_call_2): New.
11083 (i386_emit_ops): New.
11084 (x86_emit_ops): New.
11085 (the_low_target): Install x86_emit_ops.
11086 * server.h (struct emit_ops): New.
11087 (get_raw_reg_func_addr): Declare.
11088 (current_insn_ptr, emit_error): Declare.
11089 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11090 (set_trace_state_variable_value): New defines.
11091 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11092 addr_get_trace_state_variable_value and
11093 addr_set_trace_state_variable_value.
11094 (symbol_list): New fields for get_raw_reg,
11095 get_trace_state_variable_value and set_trace_state_variable_value.
11096 (condfn): New typedef.
11097 (struct tracepoint): New field `compiled_cond'.
11098 (do_action_at_tracepoint): Clear compiled_cond.
11099 (get_trace_state_variable_value, set_trace_state_variable_value):
11100 Export in the IPA.
11101 (condition_true_at_tracepoint): If there's a compiled condition,
11102 run that.
11103 (current_insn_ptr, emit_error): New globals.
11104 (struct bytecode_address): New.
11105 (get_raw_reg_func_addr): New.
11106 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11107 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11108 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11109 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11110 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11111 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11112 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11113 (compile_tracepoint_condition, compile_bytecodes): New.
11114 * target.h (emit_ops): Forward declare.
11115 (struct target_ops): New field emit_ops.
11116 (target_emit_ops): New.
11117 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11118 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11119 * linux-low.c (linux_emit_ops): New.
11120 (linux_target_ops): Install it.
11121 * linux-low.h (struct linux_target_ops): New field emit_ops.
11122
92b72907
UW
111232010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11124
11125 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11126 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11127
fa593d66
PA
111282010-06-01 Pedro Alves <pedro@codesourcery.com>
11129 Stan Shebs <stan@codesourcery.com>
11130
11131 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11132 (all): Depend on $(extra_libraries).
11133 (install-only): Install the IPA.
11134 (IPA_OBJS, IPA_LIB): New.
11135 (clean): Remove the IPA lib.
11136 (IPAGENT_CFLAGS): New.
11137 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11138 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11139 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11140 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11141 * configure.ac: Check for atomic builtins support in the compiler.
11142 (IPA_DEPFILES, extra_libraries): Define.
11143 * configure.srv (ipa_obj): Add description.
11144 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11145 (i[34567]86-*-linux*): Set ipa_obj.
11146 (x86_64-*-linux*): Set ipa_obj.
11147 * linux-low.c (stabilizing_threads): New.
11148 (supports_fast_tracepoints): New.
11149 (linux_detach): Stabilize threads before detaching.
11150 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11151 the lwp is either not stabilizing, or is moving out of a jump pad.
11152 (linux_fast_tracepoint_collecting): New.
11153 (maybe_move_out_of_jump_pad): New.
11154 (enqueue_one_deferred_signal): New.
11155 (dequeue_one_deferred_signal): New.
11156 (linux_wait_for_event_1): If moving out of a jump pad, defer
11157 pending signals to later.
11158 (linux_stabilize_threads): New.
11159 (linux_wait_1): Check if threads need moving out of jump pads, and
11160 do it if so.
11161 (stuck_in_jump_pad_callback): New.
11162 (move_out_of_jump_pad_callback): New.
11163 (lwp_running): New.
11164 (linux_resume_one_lwp): Handle moving out of jump pads.
11165 (linux_set_resume_request): Dequeue deferred signals.
11166 (need_step_over_p): Also step over fast tracepoint jumps.
11167 (start_step_over): Also uninsert fast tracepoint jumps.
11168 (finish_step_over): Also reinsert fast tracepoint jumps.
11169 (linux_install_fast_tracepoint_jump): New.
11170 (linux_target_ops): Install linux_stabilize_threads and
11171 linux_install_fast_tracepoint_jump_pad.
11172 * linux-low.h (linux_target_ops) <get_thread_area,
11173 install_fast_tracepoint_jump_pad>: New fields.
11174 (struct lwp_info) <collecting_fast_tracepoint,
11175 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11176 (linux_get_thread_area): Declare.
11177 * linux-x86-low.c (jump_insn): New.
11178 (x86_get_thread_area): New.
11179 (append_insns): New.
11180 (push_opcode): New.
11181 (amd64_install_fast_tracepoint_jump_pad): New.
11182 (i386_install_fast_tracepoint_jump_pad): New.
11183 (x86_install_fast_tracepoint_jump_pad): New.
11184 (the_low_target): Install x86_get_thread_area and
11185 x86_install_fast_tracepoint_jump_pad.
11186 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11187 (struct fast_tracepoint_jump): New.
11188 (fast_tracepoint_jump_insn): New.
11189 (fast_tracepoint_jump_shadow): New.
11190 (find_fast_tracepoint_jump_at): New.
11191 (fast_tracepoint_jump_here): New.
11192 (delete_fast_tracepoint_jump): New.
11193 (set_fast_tracepoint_jump): New.
11194 (uninsert_fast_tracepoint_jumps_at): New.
11195 (reinsert_fast_tracepoint_jumps_at): New.
11196 (set_breakpoint_at): Use write_inferior_memory.
11197 (uninsert_raw_breakpoint): Use write_inferior_memory.
11198 (check_mem_read): Mask out fast tracepoint jumps.
11199 (check_mem_write): Mask out fast tracepoint jumps.
11200 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11201 (set_fast_tracepoint_jump): Declare.
11202 (delete_fast_tracepoint_jump)
11203 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11204 (reinsert_fast_tracepoint_jumps_at): Declare.
11205 * regcache.c: Don't compile many functions when building the
11206 in-process agent library.
11207 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11208 the register buffer in the heap.
11209 (free_register_cache): If the register buffer isn't owned by the
11210 regcache, don't free it.
11211 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11212 pre-existing register caches.
11213 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11214 type.
11215 (convert_ascii_to_int): : Constify `from' parameter type.
11216 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11217 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11218 the needed buffer in-place.
11219 (relocate_instruction): New.
11220 * server.c (handle_query) <qSymbols>: If the target supports
11221 tracepoints, give it a chance of looking up symbols. Report
11222 support for fast tracepoints.
11223 (handle_status): Stabilize threads.
11224 (process_serial_event): Adjust.
11225 * server.h (struct fast_tracepoint_jump): Forward declare.
11226 (struct process_info) <fast_tracepoint_jumps>: New field.
11227 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11228 (decode_X_packet, decode_M_packet): Adjust.
11229 (relocate_instruction): Declare.
11230 (in_process_agent_loaded): Declare.
11231 (tracepoint_look_up_symbols): Declare.
11232 (struct fast_tpoint_collect_status): Declare.
11233 (fast_tracepoint_collecting): Declare.
11234 (force_unlock_trace_buffer): Declare.
11235 (handle_tracepoint_bkpts): Declare.
11236 (initialize_low_tracepoint)
11237 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11238 * target.h (struct target_ops) <stabilize_threads,
11239 install_fast_tracepoint_jump_pad>: New fields.
11240 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11241 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11242 [HAVE_STDINT_H]: Include stdint.h.
11243 (trace_debug_1): Rename to ...
11244 (trace_vdebug): ... this.
11245 (trace_debug): Rename to ...
11246 (trace_debug_1): ... this. Add `level' parameter.
11247 (trace_debug): New.
11248 (ATTR_USED, ATTR_NOINLINE): New.
11249 (IP_AGENT_EXPORT): New.
11250 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11251 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11252 (about_to_request_buffer_space, trace_buffer_is_full)
11253 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11254 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11255 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11256 (traceframe_write_count, traceframes_created)
11257 (trace_state_variables)
11258 New renaming defines.
11259 (struct ipa_sym_addresses): New.
11260 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11261 (symbol_list): New.
11262 (ipa_sym_addrs): New.
11263 (all_tracepoint_symbols_looked_up): New.
11264 (in_process_agent_loaded): New.
11265 (write_e_ipa_not_loaded): New.
11266 (maybe_write_ipa_not_loaded): New.
11267 (tracepoint_look_up_symbols): New.
11268 (debug_threads) [IN_PROCESS_AGENT]: New.
11269 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11270 (UNKNOWN_SIDE_EFFECTS): New.
11271 (stop_tracing): New.
11272 (flush_trace_buffer): New.
11273 (stop_tracing_bkpt): New.
11274 (flush_trace_buffer_bkpt): New.
11275 (read_inferior_integer): New.
11276 (read_inferior_uinteger): New.
11277 (read_inferior_data_pointer): New.
11278 (write_inferior_data_pointer): New.
11279 (write_inferior_integer): New.
11280 (write_inferior_uinteger): New.
11281 (struct collect_static_trace_data_action): Delete.
11282 (enum tracepoint_type): New.
11283 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11284 <actions_str, step_actions, step_actions_str>: Only include in
11285 GDBserver.
fa593d66
PA
11286 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11287 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11288 (tracepoints): Use IP_AGENT_EXPORT.
11289 (last_tracepoint): Don't include in the IPA.
11290 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11291 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11292 (alloced_trace_state_variables): New.
11293 (trace_state_variables): Use IP_AGENT_EXPORT.
11294 (traceframe_t): Delete unused variable.
11295 (circular_trace_buffer): Don't include in the IPA.
11296 (trace_buffer_start): Delete.
11297 (struct trace_buffer_control): New.
11298 (trace_buffer_free): Delete.
11299 (struct ipa_trace_buffer_control): New.
11300 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11301 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11302 New.
11303 (trace_buffer_ctrl): New.
11304 (TRACE_BUFFER_CTRL_CURR): New.
11305 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11306 Reimplement as macros.
11307 (trace_buffer_wrap): Delete.
11308 (traceframe_write_count, traceframe_read_count)
11309 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11310 (struct tracepoint_hit_ctx) <type>: New field.
11311 (struct fast_tracepoint_ctx): New.
11312 (memory_barrier): New.
11313 (cmpxchg): New.
11314 (record_tracepoint_error): Update atomically in the IPA.
11315 (clear_inferior_trace_buffer): New.
11316 (about_to_request_buffer_space): New.
11317 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11318 updating the same buffer.
11319 (add_tracepoint): Default the tracepoint's type to trap
11320 tracepoint, and orig_size to -1.
11321 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11322 internal variables.
11323 (create_trace_state_variable): New parameter `gdb'. Handle it.
11324 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11325 (cmd_qtdp): Handle fast tracepoints.
11326 (cmd_qtdv): Adjust.
11327 (max_jump_pad_size): New.
11328 (gdb_jump_pad_head): New.
11329 (get_jump_space_head): New.
11330 (claim_jump_space): New.
11331 (sort_tracepoints): New.
11332 (MAX_JUMP_SIZE): New.
11333 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11334 IPA.
11335 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11336 support. Upload fast traceframes, and delete internal IPA
11337 breakpoints.
11338 (stop_tracing_handler): New.
11339 (flush_trace_buffer_handler): New.
11340 (cmd_qtstop): Upload fast tracepoints.
11341 (response_tracepoint): Handle fast tracepoints.
11342 (tracepoint_finished_step): Upload fast traceframes. Set the
11343 tracepoint hit context's tracepoint type.
11344 (handle_tracepoint_bkpts): New.
11345 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11346 type. Add comment about fast tracepoints.
11347 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11348 non-existing action_str field.
11349 (get_context_regcache): Handle fast tracepoints.
11350 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11351 to the regcache.
11352 (fast_tracepoint_from_jump_pad_address): New.
11353 (fast_tracepoint_from_ipa_tpoint_address): New.
11354 (collecting_t): New.
11355 (force_unlock_trace_buffer): New.
11356 (fast_tracepoint_collecting): New.
11357 (collecting): New.
11358 (gdb_collect): New.
11359 (write_inferior_data_ptr): New.
11360 (target_tp_heap): New.
11361 (target_malloc): New.
11362 (download_agent_expr): New.
11363 (UALIGN): New.
11364 (download_tracepoints): New.
11365 (download_trace_state_variables): New.
11366 (upload_fast_traceframes): New.
11367 (IPA_FIRST_TRACEFRAME): New.
11368 (IPA_NEXT_TRACEFRAME_1): New.
11369 (IPA_NEXT_TRACEFRAME): New.
11370 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11371 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11372 (gdb_jump_pad_buffer_end): New.
11373 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11374 (initialize_tracepoint): Adjust.
11375 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11376 buffer. Initialize the low module.
11377 * utils.c (PREFIX, TOOLNAME): New.
11378 (malloc_failure): Use PREFIX.
11379 (error): In the IPA, an error causes an exit.
11380 (fatal, warning): Use PREFIX.
11381 (internal_error): Use TOOLNAME.
11382 (NUMCELLS): Increase to 10.
11383 * configure, config.in: Regenerate.
11384
d149dd1d
PA
113852010-06-01 Pedro Alves <pedro@codesourcery.com>
11386
11387 * server.c (handle_query) <qSupported>: Do two passes over the
11388 qSupported string to avoid nesting strtok.
11389
f6528abd
JK
113902010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11391
11392 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11393 (CDEPS): New.
11394 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11395 -Wl,--dynamic-list.
11396 * configure: Regenerate.
11397 * proc-service.list: New.
11398
ca2a87a0
JK
113992010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11400
11401 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11402 New comment.
11403
363a6e9f
OS
114042010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11405
11406 * gdbreplay.c (remote_open): Check error return from socket() call by
11407 its equality to -1 not by it being negative.
11408 * remote-utils.c (remote_open): Likewise.
11409
d23b6cb1
PA
114102010-05-23 Pedro Alves <pedro@codesourcery.com>
11411
11412 * config.h: Regenerate.
11413
28d3cf85
MK
114142010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11415
11416 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11417 doesn't provide PTRACE_GET_THREAD_AREA.
11418
fea36a59
MK
114192010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11420
11421 * linux-m68k-low.c: Include <asm/ptrace.h>
11422 (ps_get_thread_area): Implement.
11423
24b066ba
DE
114242010-05-03 Doug Evans <dje@google.com>
11425
11426 * event-loop.c (struct callback_event): New struct.
11427 (callback_list): New global.
11428 (append_callback_event, delete_callback_event): New functions.
11429 (process_callback): New function.
11430 (start_event_loop): Call it.
11431 * remote-utils.c (NOT_SCHEDULED): Define.
11432 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11433 moved out of readchar.
11434 (readchar): Rewrite. Call reschedule before returning.
11435 (reset_readchar): New function.
11436 (remote_close): Call it.
11437 (process_remaining, reschedule): New functions.
11438 * server.h (callback_handler_func): New typedef.
11439 (append_callback_event, delete_callback_event): Declare.
11440
9836d6ea
PA
114412010-05-03 Pedro Alves <pedro@codesourcery.com>
11442
11443 * proc-service.c (ps_pglobal_lookup): Use
11444 thread_db_look_up_one_symbol.
11445 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11446 parameter. Use it instead of all_symbols_looked_up.
11447 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11448 field.
11449 (all_symbols_looked_up): Don't declare.
11450 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11451 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11452 field.
11453 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11454 Set all_symbols_looked_up here.
11455 (thread_db_look_up_one_symbol): New.
11456 (thread_db_get_tls_address): Adjust.
11457 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11458 thread_db object on the heap, and tentatively set it in the
11459 process structure.
11460 (thread_db_init): Don't set all_symbols_looked_up here.
11461 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11462
7984d532
PA
114632010-05-03 Pedro Alves <pedro@codesourcery.com>
11464
11465 * linux-low.c (linux_kill, linux_detach): Adjust.
11466 (status_pending_p_callback): Remove redundant statement. Check
11467 for !TARGET_WAITIKIND_IGNORE, instead of
11468 TARGET_WAITKIND_STOPPED.
11469 (handle_tracepoints): Make sure LWP is locked. Adjust.
11470 (linux_wait_for_event_1): Adjust.
11471 (linux_cancel_breakpoints): New.
11472 (unsuspend_one_lwp): New.
11473 (unsuspend_all_lwps): New.
11474 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11475 (send_sigstop_callback): Change return type to int, add new
11476 `except' parameter and handle it.
11477 (suspend_and_send_sigstop_callback): New.
11478 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11479 pass them down. If SUSPEND, also increment the lwp's suspend
11480 count.
11481 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11482 (need_step_over_p): Don't consider suspended LWPs.
11483 (start_step_over): Adjust.
11484 (proceed_one_lwp): Change return type to int, add new `except'
11485 parameter and handle it.
11486 (unsuspend_and_proceed_one_lwp): New.
11487 (proceed_all_lwps): Use find_inferior instead of
11488 for_each_inferior.
11489 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11490 also decrement the suspend count of LWPs. Pass `except' down,
11491 instead of hacking its suspend count.
11492 (linux_pause_all): Add `freeze' parameter. Adjust.
11493 (linux_unpause_all): New.
11494 (linux_target_ops): Install linux_unpause_all.
11495 * server.c (handle_status): Adjust.
11496 * target.h (struct target_ops): New fields `unpause_all' and
11497 `cancel_breakpoints'. Add new parameter to `pause_all'.
11498 (pause_all): Add new `freeze' parameter.
11499 (unpause_all): New.
11500 (cancel_breakpoints): New.
11501 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11502 cancel breakpoints.
11503 (cmd_qtstart): Pause threads.
11504 (stop_tracing): Pause threads, and cancel breakpoints.
11505 * win32-low.c (win32_target_ops): Adjust.
11506
e471f25b
PA
115072010-05-03 Pedro Alves <pedro@codesourcery.com>
11508
11509 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11510 the inferior right away from here...
11511 (linux_wait_1): ... to here, and adjust to check the thread's
11512 last_resume_kind instead of the lwp's step or stop_expected flags.
11513
1915ef4f
PA
115142010-05-02 Pedro Alves <pedro@codesourcery.com>
11515
11516 * README: Use consistent `GDB' and `GDBserver' spellings.
11517
f9e39928
PA
115182010-05-02 Pedro Alves <pedro@codesourcery.com>
11519
11520 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11521 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11522 (linux_detach_one_lwp): Assume the lwp is stopped.
11523 (any_thread_of): Delete.
11524 (linux_detach): Stop all lwps here. Don't blindly delete all
11525 breakpoints.
11526 (delete_lwp_callback): New.
11527 (linux_mourn): Delete all lwps of the process that is gone.
11528 (linux_wait_1): Don't delete the last lwp of the process here.
11529 * mem-break.h (mark_breakpoints_out): Declare.
11530 * mem-break.c (mark_breakpoints_out): New.
11531 (free_all_breakpoints): Use it.
11532 * server.c (handle_target_event): If the process is gone, mark
11533 breakpoints out.
11534 * thread-db.c (struct thread_db) <create_bp>: New field.
11535 (thread_db_enable_reporting): Fix prototype. Store a thread event
11536 breakpoint reference in the thread_db struct.
11537 (thread_db_load_search): Clear the thread_db object.
11538 (try_thread_db_load_1): Ditto.
11539 (switch_to_process): New.
11540 (disable_thread_event_reporting): Use it.
11541 (remove_thread_event_breakpoints): New.
11542 (thread_db_detach, thread_db_mourn): Use it.
11543
1e7fc18c
PA
115442010-05-01 Pedro Alves <pedro@codesourcery.com>
11545
11546 * linux-low.c (linux_enable_event_reporting): New.
11547 (linux_wait_for_event_1, handle_extended_wait): Use it.
11548
02fc4de7
PA
115492010-04-30 Pedro Alves <pedro@codesourcery.com>
11550
11551 * linux-low.c (linux_kill_one_lwp, linux_kill)
11552 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11553 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11554 SIGSTOP even if the LWP is stopped.
11555 (send_sigstop_callback): New.
11556 (stop_all_lwps): Use send_sigstop_callback instead.
11557 (linux_resume_one_thread): Adjust.
11558 (proceed_one_lwp): Still proceed an LWP that the client has
11559 requested to stop, if we haven't reported it as stopped yet. Make
11560 sure that LWPs the client want stopped, have a pending SIGSTOP.
11561
bc3b5632
DE
115622010-04-26 Doug Evans <dje@google.com>
11563
ae1ada35
DE
11564 * server.c (handle_general_set): Make static.
11565
bc3b5632
DE
11566 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11567 Print received char after testing for error/eof instead of before.
11568 (input_interrupt): Tweak comment.
11569
65730243
DE
115702010-04-23 Doug Evans <dje@google.com>
11571
11572 * server.c (start_inferior): Print inferior argv if --debug.
11573
a8ae7dc0
AR
115742010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11575
11576 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11577 * nto-x86-low.c: Include server.h
11578
1c07cc19
PM
115792010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11580
11581 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11582 be consistent with other sources of this directory.
11583 (init_registers_amd64): Correct name of source file of this function
11584 in the comment.
11585
e0a61e09
PM
115862010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11587
11588 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11589 64-bit executables.
11590
54709339
PM
115912010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11592
11593 * win32-i386-low.c: Add 64-bit support.
11594 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11595 (init_registers_amd64): Declare.
11596 (mappings): Add 64-bit version of array.
11597 (init_windows_x86): New function.
11598 (the_low_target): Change init_arch field to init_windows_x86.
11599
e8f0053d
PM
116002010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11601
11602 * win32-low.c: Adapt to support also 64-bit architecture.
11603 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11604 (get_image_name): Use SIZE_T type for local variable `done'.
11605 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11606 (toolhelp_get_dll_name): Idem.
11607 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11608 Use uintptr_t typecast to avoid warning.
11609 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11610 (handle_exception): Use phex_nz to avoid warning.
11611 (win32_wait): Remove unused local variable `process'.
11612
c481e77e
PM
116132010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11614
11615 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11616 `amd64-avx.o'.
11617
12ea4b69
PM
116182010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11619
11620 * configure.ac: Use `ws2_32' library for srv_mingw.
11621 * configure: Regenerate.
11622 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11623 * remote-utils.c: Likewise.
11624
f6d1620c
L
116252010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11626
11627 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11628 if __x86_64__ is defined.
11629
8e642873
PM
116302010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11631
11632 * configure: Regenerate.
11633
711e434b
PM
116342010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11635
11636 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11637 * target.h (target_ops): New get_tib_address field.
11638 * win32-low.h (win32_thread_info): Add thread_local_base field.
11639 * win32-low.c (child_add_thread): Add tlb argument.
11640 Set thread_local_base field to TLB.
11641 (get_child_debug_event): Adapt to child_add_thread change.
11642 (win32_get_tib_address): New function.
11643 (win32_target_ops): Set get_tib_address field to
11644 win32_get_tib_address.
11645 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11646
505106cd
PA
116472010-04-12 Pedro Alves <pedro@codesourcery.com>
11648
505106cd
PA
11649 * linux-low.c (linux_mourn): Also remove the process.
11650 * server.c (handle_target_event): Don't remove the process here.
11651 * nto-low.c (nto_mourn): New.
11652 (nto_target_ops): Install it.
11653 * spu-low.c (spu_mourn): New.
11654 (spu_target_ops): Install it.
11655 * win32-low.c (win32_mourn): New.
11656 (win32_target_ops): Install it.
11657
e8470a06
PA
116582010-04-12 Pedro Alves <pedro@codesourcery.com>
11659
11660 * server.h (buffer_xml_printf): Remove redundant `;'.
11661
45ba0d02
PA
116622010-04-12 Pedro Alves <pedro@codesourcery.com>
11663
11664 * regcache.c (set_register_cache): Invalidate regcaches before
11665 changing the register cache layout.
11666 (regcache_invalidate_one): Allow a NULL regcache.
11667 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11668 regcaches before changing the register cache layout or the target
11669 regsets.
11670
59e04013
L
116712010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11672
11673 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11674 variable warning on Linux/x86-64.
11675
8336d594
PA
116762010-04-11 Pedro Alves <pedro@codesourcery.com>
11677
11678 GDBserver disconnected tracing support.
11679
11680 * linux-low.c (linux_remove_process): Delete.
11681 (add_lwp): Don't set last_resume_kind here.
11682 (linux_kill): Use `mourn'.
11683 (linux_detach): Use `thread_db_detach', and `mourn'.
11684 (linux_mourn): New.
11685 (linux_attach_lwp_1): Adjust comment.
11686 (linux_attach): last_resume_kind moved the thread_info; adjust.
11687 (status_pending_p_callback): Adjust.
11688 (linux_wait_for_event_1): Adjust.
11689 (count_events_callback, select_singlestep_lwp_callback)
11690 (select_event_lwp_callback, cancel_breakpoints_callback)
11691 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11692 (proceed_one_lwp): Adjust.
11693 (linux_async): Add debug output.
11694 (linux_thread_stopped): New.
11695 (linux_pause_all): New.
11696 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11697 linux_pause_all.
11698 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11699 (thread_db_free): Delete declaration.
11700 (thread_db_detach, thread_db_mourn): Declare.
11701 * thread-db.c (thread_db_init): Use thread_db_mourn.
11702 (thread_db_free): Delete, split in two.
11703 (disable_thread_event_reporting): New.
11704 (thread_db_detach): New.
11705 (thread_db_mourn): New.
11706
11707 * server.h (struct thread_info) <last_resume_kind>: New field.
11708 <attached>: Add comment.
11709 <gdb_detached>: New field.
11710 (handler_func): Change return type to int.
11711 (handle_serial_event, handle_target_event): Ditto.
11712 (gdb_connected): Declare.
11713 (tracing): Delete.
11714 (disconnected_tracing): Declare.
11715 (stop_tracing): Declare.
11716
11717 * server.c (handle_query) <qSupported>: Report support for
11718 disconnected tracing.
11719 (queue_stop_reply_callback): Account for running threads.
11720 (gdb_wants_thread_stopped): New.
11721 (gdb_wants_all_threads_stopped): New.
11722 (gdb_reattached_process): New.
11723 (handle_status): Clear the `gdb_detached' flag of all processes.
11724 In all-stop, stop all threads.
11725 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11726 (process_serial_event): If the remote connection breaks, or if an
11727 exit was forced with "monitor exit", force an event loop exit.
11728 Handle disconnected tracing on detach.
11729 (handle_serial_event): Adjust.
11730 (handle_target_event): If GDB isn't connected, forward events back
11731 to the inferior, unless the last process exited, in which case,
11732 exit gdbserver. Adjust interface.
11733
11734 * remote-utils.c (remote_open): Don't block in accept. Instead
11735 register an event loop source on the listen socket file
11736 descriptor. Refactor bits into ...
11737 (listen_desc): ... this new global.
11738 (gdb_connected): ... this new function.
11739 (enable_async_notification): ... this new function.
11740 (handle_accept_event): ... this new function.
11741 (remote_close): Clear remote_desc.
11742
11743 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11744
11745 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11746 New fields.
11747 (mourn_inferior): Define.
11748 (target_process_qsupported): Avoid the dangling else problem.
11749 (thread_stopped): Define.
11750 (pause_all): Define.
11751 (target_waitstatus_to_string): Declare.
11752 * target.c (target_waitstatus_to_string): New.
11753
11754 * tracepoint.c (tracing): Make extern.
11755 (disconnected_tracing): New.
11756 (stop_tracing): Make extern. Handle tracing stops due to GDB
11757 disconnecting.
11758 (cmd_qtdisconnected): New.
11759 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11760 (handle_tracepoint_general_set): Handle QTDisconnected.
11761
11762 * event-loop.c (event_handler_func): Change return type to int.
11763 (process_event): Bail out if the event handler wants the event
11764 loop to stop.
11765 (handle_file_event): Ditto.
11766 (start_event_loop): Bail out if the event handler wants the event
11767 loop to stop.
11768
11769 * nto-low.c (nto_target_ops): Adjust.
11770 * spu-low.c (spu_wait): Don't remove the process here.
11771 (spu_target_ops): Adjust.
11772 * win32-low.c (win32_wait): Don't remove the process here.
11773 (win32_target_ops): Adjust.
11774
5d267c4c
PA
117752010-04-11 Pedro Alves <pedro@codesourcery.com>
11776
11777 * regcache.c (realloc_register_cache): Invalidate inferior's
11778 regcache before recreating it.
11779
623ccd72
PA
117802010-04-09 Pedro Alves <pedro@codesourcery.com>
11781
11782 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11783
219f2f23
PA
117842010-04-09 Stan Shebs <stan@codesourcery.com>
11785 Pedro Alves <pedro@codesourcery.com>
11786
11787 * server.h (LONGEST): New.
11788 (struct thread_info) <while_stepping>: New field.
11789 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11790 Declare.
11791 (initialize_tracepoint, handle_tracepoint_general_set)
11792 (handle_tracepoint_query, tracepoint_finished_step)
11793 (tracepoint_was_hit, release_while_stepping_state_list):
11794 (current_traceframe): Declare.
11795 * server.c (handle_general_set): Handle tracepoint packets.
11796 (read_memory): New.
11797 (write_memory): New.
11798 (handle_search_memory_1): Use read_memory.
11799 (handle_query): Report support for conditional tracepoints, trace
11800 state variables, and tracepoint sources. Handle tracepoint
11801 queries.
11802 (main): Initialize the tracepoints module.
11803 (process_serial_event): Handle traceframe reads/writes.
11804
11805 * linux-low.c (handle_tracepoints): New.
11806 (linux_wait_1): Call it.
11807 (linux_resume_one_lwp): Handle while-stepping.
11808 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11809 (linux_target_ops): Install them.
11810 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11811 New field.
11812 * linux-x86-low.c (x86_supports_tracepoints): New.
11813 (the_low_target). Install it.
11814
11815 * mem-break.h (delete_breakpoint): Declare.
11816 * mem-break.c (delete_breakpoint): Make external.
11817
11818 * target.h (struct target_ops): Add `supports_tracepoints',
11819 `read_pc', and `write_pc' fields.
11820 (target_supports_tracepoints): Define.
11821 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11822 (phex_nz): New.
11823
11824 * regcache.h (struct regcache) <registers_owned>: New field.
11825 (init_register_cache, regcache_cpy): Declare.
11826 (regcache_read_pc, regcache_write_pc): Declare.
11827 (register_cache_size): Declare.
11828 (supply_regblock): Declare.
11829 * regcache.c (init_register_cache): New.
11830 (new_register_cache): Use it.
11831 (regcache_cpy): New.
11832 (register_cache_size): New.
11833 (supply_regblock): New.
11834 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11835
219f2f23
PA
11836 * tracepoint.c: New.
11837
11838 * Makefile.in (OBS): Add tracepoint.o.
11839 (tracepoint.o): New rule.
11840
3a13a53b
L
118412010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11842
11843 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11844 (i386-mmx.o): New.
11845 (i386-mmx.c): Likewise.
11846 (i386-mmx-linux.o): Likewise.
11847 (i386-mmx-linux.c): Likewise.
11848
11849 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11850 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11851 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11852 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11853
11854 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11855 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11856 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11857
1570b33e
L
118582010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11859
11860 * Makefile.in (clean): Updated.
11861 (i386-avx.o): New.
11862 (i386-avx.c): Likewise.
11863 (i386-avx-linux.o): Likewise.
11864 (i386-avx-linux.c): Likewise.
11865 (amd64-avx.o): Likewise.
11866 (amd64-avx.c): Likewise.
11867 (amd64-avx-linux.o): Likewise.
11868 (amd64-avx-linux.c): Likewise.
11869
11870 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11871 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11872 (srv_amd64_regobj): Add amd64-avx.o.
11873 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11874 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11875 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11876 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11877 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11878 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11879 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11880
11881 * i387-fp.c: Include "i386-xstate.h".
11882 (i387_xsave): New.
11883 (i387_cache_to_xsave): Likewise.
11884 (i387_xsave_to_cache): Likewise.
11885 (x86_xcr0): Likewise.
11886
11887 * i387-fp.h (i387_cache_to_xsave): Likewise.
11888 (i387_xsave_to_cache): Likewise.
11889 (x86_xcr0): Likewise.
11890
11891 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11892 * linux-crisv32-low.c (target_regsets): Likewise.
11893 * linux-m68k-low.c (target_regsets): Likewise.
11894 * linux-mips-low.c (target_regsets): Likewise.
11895 * linux-ppc-low.c (target_regsets): Likewise.
11896 * linux-s390-low.c (target_regsets): Likewise.
11897 * linux-sh-low.c (target_regsets): Likewise.
11898 * linux-sparc-low.c (target_regsets): Likewise.
11899 * linux-xtensa-low.c (target_regsets): Likewise.
11900
11901 * linux-low.c: Include <sys/uio.h>.
11902 (regsets_fetch_inferior_registers): Support nt_type.
11903 (regsets_store_inferior_registers): Likewise.
11904 (linux_process_qsupported): New.
11905 (linux_target_ops): Add linux_process_qsupported.
11906
11907 * linux-low.h (regset_info): Add nt_type.
11908 (linux_target_ops): Add process_qsupported.
11909
11910 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11911 and <sys/uio.h>.
11912 (init_registers_i386_avx_linux): New.
11913 (init_registers_amd64_avx_linux): Likewise.
11914 (xmltarget_i386_linux_no_xml): Likewise.
11915 (xmltarget_amd64_linux_no_xml): Likewise.
11916 (PTRACE_GETREGSET): Likewise.
11917 (PTRACE_SETREGSET): Likewise.
11918 (x86_fill_xstateregset): Likewise.
11919 (x86_store_xstateregset): Likewise.
11920 (use_xml): Likewise.
11921 (x86_linux_update_xmltarget): Likewise.
11922 (x86_linux_process_qsupported): Likewise.
11923 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11924 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11925 init_registers_i386_linux here. Call
11926 x86_linux_update_xmltarget.
11927 (the_low_target): Add x86_linux_process_qsupported.
11928
11929 * server.c (handle_query): Call target_process_qsupported.
11930
11931 * target.h (target_ops): Add process_qsupported.
11932 (target_process_qsupported): New.
11933
fc7238bb
PA
119342010-04-03 Pedro Alves <pedro@codesourcery.com>
11935
11936 * inferiors.c (add_thread): Set last_status kind to
11937 TARGET_WAITKIND_IGNORE.
11938 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11939 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11940 (linux_wait_1): Move `thread' local definition to block that uses
11941 it. Don't NULL initialize `event_child'.
11942 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11943 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11944 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11945
bdabb078
PA
119462010-04-01 Pedro Alves <pedro@codesourcery.com>
11947
11948 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11949 an extended waitstatus, or by a watchpoint.
11950 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11951 thread was stepping or has been stopped by a watchpoint.
11952
d3bbe7a0
PA
119532010-04-01 Pedro Alves <pedro@codesourcery.com>
11954
11955 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11956 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11957 of another, then delete the previous, and validate all
11958 breakpoints.
11959 (validate_inserted_breakpoint): New.
11960 (delete_disabled_breakpoints): New.
11961 (validate_breakpoints): New.
11962 (check_mem_read): Validate breakpoints before trusting their
11963 shadow. Delete disabled breakpoints.
11964 (check_mem_write): Validate breakpoints before trusting they
11965 should be inserted. Delete disabled breakpoints.
11966 * mem-break.h (validate_breakpoints):
11967 * server.c (handle_query): Validate breakpoints when we see a
11968 qSymbol query.
11969
8b07ae33
PA
119702010-04-01 Pedro Alves <pedro@codesourcery.com>
11971
11972 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11973 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11974 if we could tell there's a GDB breakpoint at stop_pc.
11975 (need_step_over_p): Don't do a step over if we find a GDB
11976 breakpoint at the resume PC.
11977
11978 * mem-break.c (struct raw_breakpoint): New.
11979 (enum bkpt_type): New type `gdb_breakpoint'.
11980 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11981 fields. New field `raw'.
11982 (find_raw_breakpoint_at): New.
11983 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11984 breakpoint instead.
11985 (set_breakpoint_at): Adjust.
11986 (delete_raw_breakpoint): New.
11987 (release_breakpoint): New.
11988 (delete_breakpoint): Rename to...
11989 (delete_breakpoint_1): ... this. Add proc parameter. Use
11990 release_breakpoint. Return ENOENT.
11991 (delete_breakpoint): Reimplement.
11992 (find_breakpoint_at): Delete.
11993 (find_gdb_breakpoint_at): New.
11994 (delete_breakpoint_at): Delete.
11995 (set_gdb_breakpoint_at): New.
11996 (delete_gdb_breakpoint_at): New.
11997 (gdb_breakpoint_here): New.
11998 (set_reinsert_breakpoint): Use release_breakpoint.
11999 (uninsert_breakpoint): Rename to ...
12000 (uninsert_raw_breakpoint): ... this.
12001 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12002 (reinsert_raw_breakpoint): Change parameter type to
12003 raw_breakpoint.
12004 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12005 instead.
12006 (check_breakpoints): Adjust. Use release_breakpoint.
12007 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12008 (breakpoint_inserted_here): Ditto.
12009 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12010 Don't trust the breakpoint's shadow if it is not inserted.
12011 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12012 (delete_all_breakpoints): Adjust.
12013 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12014 use delete_breakpoint_1.
12015
12016 * mem-break.h (breakpoints_supported): Delete declaration.
12017 (set_gdb_breakpoint_at): Declare.
12018 (gdb_breakpoint_here): Declare.
12019 (delete_breakpoint_at): Delete.
12020 (delete_gdb_breakpoint_at): Declare.
12021
12022 * server.h (struct raw_breakpoint): Forward declare.
12023 (struct process_info): New field `raw_breakpoints'.
12024
12025 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12026 breakpoints.
12027
6bf5e0ba
PA
120282010-03-24 Pedro Alves <pedro@codesourcery.com>
12029
12030 * linux-low.c (status_pending_p_callback): Fix comment.
12031 (linux_wait_for_event_1): Move most of the internal breakpoint
12032 handling from here...
12033 (linux_wait_1): ... to here.
12034 (count_events_callback): New.
12035 (select_singlestep_lwp_callback): New.
12036 (select_event_lwp_callback): New.
12037 (cancel_breakpoints_callback): New.
12038 (select_event_lwp): New.
12039 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12040 priority to all LWPs that have had events that should be reported
12041 to the client. Cancel breakpoints when about to reporting the
12042 event to the client, not while stopping lwps. No longer cancel
12043 finished single-steps here.
12044 (cancel_finished_single_step): Delete.
12045 (cancel_finished_single_steps): Delete.
12046
414a389f
PA
120472010-03-24 Pedro Alves <pedro@codesourcery.com>
12048
12049 * mem-break.c (enum bkpt_type): New.
12050 (struct breakpoint): New field `type'.
12051 (set_breakpoint_at): Change return type to struct breakpoint
12052 pointer. Set type to `other_breakpoint' by default.
12053 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12054 in the breakpoint list.
12055 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12056 (reinsert_breakpoint): Rename to ...
12057 (reinsert_raw_breakpoint): ... this.
12058 (reinsert_breakpoints_at): Adjust.
12059 * mem-break.h (struct breakpoint): Declare.
12060 (set_breakpoint_at): Change return type to struct breakpoint
12061 pointer.
12062
2280c721
PA
120632010-03-24 Pedro Alves <pedro@codesourcery.com>
12064
12065 * server.c (handle_query): Assign, not compare.
12066
d50171e4
PA
120672010-03-24 Pedro Alves <pedro@codesourcery.com>
12068
12069 Teach linux gdbserver to step-over-breakpoints.
12070
12071 * linux-low.c (can_hardware_single_step): New.
12072 (supports_breakpoints): New.
12073 (handle_extended_wait): If stopping threads, read the stop pc of
12074 the new cloned LWP.
12075 (get_pc): New.
12076 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12077 low target doesn't support retrieving the PC.
12078 (add_lwp): Set last_resume_kind to resume_continue.
12079 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12080 (linux_attach): Don't clear stop_expected. Set the lwp's
12081 last_resume_kind to resume_stop.
12082 (linux_detach_one_lwp): Don't check for removed breakpoints.
12083 (check_removed_breakpoint): Delete.
12084 (status_pending_p): Rename to ...
12085 (status_pending_p_callback): ... this. Don't check for removed
12086 breakpoints. Don't consider threads that are stopped from GDB's
12087 perspective.
12088 (linux_wait_for_lwp): Always read the stop_pc here.
12089 (cancel_breakpoint): New.
12090 (step_over_bkpt): New global.
12091 (linux_wait_for_event_1): Implement stepping over breakpoints.
12092 (gdb_wants_lwp_stopped): New.
12093 (gdb_wants_all_stopped): New.
12094 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12095 single-step traps here. Store the thread's last reported target
12096 wait status.
12097 (send_sigstop): Don't clear stop_expected. Always set it,
12098 instead.
12099 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12100 (cancel_finished_single_step): New.
12101 (cancel_finished_single_steps): New.
12102 (wait_for_sigstop): Don't cancel finished single-step traps here.
12103 (linux_resume_one_lwp): Don't check for removed breakpoints.
12104 Don't set `step' on non-hardware step archs.
12105 (linux_set_resume_request): Ignore resume_stop requests if already
12106 stopping or stopped. Set the lwp's last_resume_kind.
12107 (resume_status_pending_p): Don't check for removed breakpoints.
12108 (need_step_over_p): New.
12109 (start_step_over): New.
12110 (finish_step_over): New.
12111 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12112 requests. Clear the thread's last reported target waitstatus.
12113 Don't use the `suspended' flag. Don't consider pending breakpoints.
12114 (linux_resume): Start a step-over if necessary.
12115 (proceed_one_lwp): New.
12116 (proceed_all_lwps): New.
12117 (unstop_all_lwps): New.
12118 * linux-low.h (struct lwp_info): Rewrite comment for the
12119 `suspended' flag. Add the `stop_pc' field. Delete the
12120 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12121 Add `'last_resume_kind' and `need_step_over' fields.
12122 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12123 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12124 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12125 (set_raw_breakpoint_at): New.
12126 (set_breakpoint_at): Rewrite to use it.
12127 (reinsert_breakpoint_handler): Delete.
12128 (set_reinsert_breakpoint): New.
12129 (reinsert_breakpoint_by_bp): Delete.
12130 (delete_reinsert_breakpoints): New.
12131 (uninsert_breakpoint): Rewrite.
12132 (uninsert_breakpoints_at): New.
12133 (reinsert_breakpoint): Rewrite.
12134 (reinsert_breakpoints_at): New.
12135 (check_breakpoints): Rewrite.
12136 (breakpoint_here): New.
12137 (breakpoint_inserted_here): New.
12138 (check_mem_read): Adjust.
12139 * mem-break.h (breakpoints_supported, breakpoint_here)
12140 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12141 (reinsert_breakpoint_by_bp): Delete declaration.
12142 (delete_reinsert_breakpoints): Declare.
12143 (reinsert_breakpoint): Delete declaration.
12144 (reinsert_breakpoints_at): Declare.
12145 (uninsert_breakpoint): Delete declaration.
12146 (uninsert_breakpoints_at): Declare.
12147 (check_breakpoints): Adjust prototype.
12148 * server.h: Adjust include order.
12149 (struct thread_info): Declare here. Add a `last_status' field.
12150
30ba68cb
MS
121512010-03-23 Michael Snyder <msnyder@vmware.com>
12152
12153 * server.c (crc32): New function.
12154 (handle_query): Add handling for 'qCRC:' request.
12155
b9a881c2
PA
121562010-03-23 Pedro Alves <pedro@codesourcery.com>
12157
12158 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12159 lwp had been stopped by a watchpoint.
12160
e92d13d5
PA
121612010-03-16 Pedro Alves <pedro@codesourcery.com>
12162
12163 * server.h (internal_error): Declare.
12164 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12165 * utils.c (internal_error): New function.
12166
64daa791
AS
121672010-03-15 Andreas Schwab <schwab@redhat.com>
12168
12169 * configure.srv: Fix typo setting srv_regobj.
12170
f52cd8cd
PA
121712010-03-15 Pedro Alves <pedro@codesourcery.com>
12172
12173 * linux-low.c (fetch_register): Avoid passing a non string literal
12174 format to `error'.
12175 (usr_store_inferior_registers): Ditto.
12176
93ae6fdc
PA
121772010-03-14 Pedro Alves <pedro@codesourcery.com>
12178
12179 * linux-low.c (linux_write_memory): Bail out early if peeking
12180 memory failed.
12181
c3adc08c
PA
121822010-03-14 Pedro Alves <pedro@codesourcery.com>
12183
12184 * linux-low.h (struct lwp_info): New fields
12185 `stopped_by_watchpoint' and `stopped_data_address'.
12186 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12187 here, and cache them in the lwp object.
12188 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12189 directly.
12190 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12191 field.
12192 (linux_stopped_by_watchpoint): Rewrite.
12193 (linux_stopped_data_address): Rewrite.
12194
bce522a2
PA
121952010-03-06 Simo Melenius <simo.melenius@iki.fi>
12196
12197 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12198 switching the current inferior, not before.
12199
90884b2b
L
122002010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12201
12202 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12203 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12204 i386-linux.c and amd64-linux.c.
12205 (reg-i386.o): Removed.
12206 (reg-i386.c): Likewise.
12207 (reg-i386-linux.o): Likewise.
12208 (reg-i386-linux.c): Likewise.
12209 (reg-x86-64.o): Likewise.
12210 (reg-x86-64.c): Likewise.
12211 (reg-x86-64-linux.o): Likewise.
12212 (reg-x86-64-linux.c): Likewise.
12213 (i386.o): New.
12214 (i386.c): Likewise.
12215 (i386-linux.o): Likewise.
12216 (i386-linux.c): Likewise.
12217 (amd64.o): Likewise.
12218 (amd64.c): Likewise.
12219 (amd64-linux.o): Likewise.
12220 (amd64-linux.c): Likewise.
12221
12222 * configure.srv (srv_i386_regobj): New.
12223 (srv_i386_linux_regobj): Likewise.
12224 (srv_amd64_regobj): Likewise.
12225 (srv_amd64_linux_regobj): Likewise.
12226 (srv_i386_32bit_xmlfiles): Likewise.
12227 (srv_i386_64bit_xmlfiles): Likewise.
12228 (srv_i386_xmlfiles): Likewise.
12229 (srv_amd64_xmlfiles): Likewise.
12230 (srv_i386_linux_xmlfiles): Likewise.
12231 (srv_amd64_linux_xmlfiles): Likewise.
12232 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12233 srv_xmlfiles to $srv_i386_xmlfiles.
12234 (i[34567]86-*-mingw32ce*): Likewise.
12235 (i[34567]86-*-mingw*): Likewise.
12236 (i[34567]86-*-nto*): Likewise.
12237 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12238 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12239 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12240 (x86_64-*-linux*): Likewise.
12241
12242 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12243 (init_registers_amd64_linux): New.
12244 (x86_arch_setup): Replace init_registers_x86_64_linux with
12245 init_registers_amd64_linux.
12246
193f13e6
MK
122472010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12248
12249 * configure.ac: Check for libdl. If it is not available link against
12250 static libthread_db.
12251 * configure: Regenerate.
12252
85d721b8
PA
122532010-02-22 Pedro Alves <pedro@codesourcery.com>
12254
12255 PR9605
12256
12257 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12258 handing a read watchpoint.
12259 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12260
6076632b
DE
122612010-02-12 Doug Evans <dje@google.com>
12262
12263 * linux-low.c (linux_supports_tracefork_flag): Document.
12264 (linux_look_up_symbols): Add comment.
12265
3327ccf7
L
122662010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12267
12268 * regcache.c (supply_register): Clear regcache if buf is NULL.
12269
0718675c 122702010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12271 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12272
12273 * inferiors.c (find_inferior): Add function documentation.
12274 (unloaded_dll): Handle the case where the unloaded dll has not
12275 been previously registered in the dll list.
12276
177321bd
DJ
122772010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12278
12279 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12280 (thumb2_breakpoint): New.
12281 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12282
2b009048
DJ
122832010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12284
12285 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12286 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12287 breakpoints.
12288
3be029c7
PA
122892010-01-21 Pedro Alves <pedro@codesourcery.com>
12290
12291 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12292
18f5de3b
JK
122932010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12294
12295 * linux-s390-low.c (s390_collect_ptrace_register)
12296 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12297
3743bb4f
DE
122982010-01-21 Doug Evans <dje@google.com>
12299
14ce3065
DE
12300 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12301 (PTRACE_ARG4_TYPE): New macro.
12302 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12303 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12304 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12305 (usr_store_inferior_registers): Ditto.
12306 (linux_read_memory, linux_write_memory): Ditto.
12307 (linux_test_for_tracefork): Ditto.
12308
3743bb4f
DE
12309 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12310 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12311
8b315be5
PA
123122010-01-21 Pedro Alves <pedro@codesourcery.com>
12313
12314 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12315 target.
12316
85492558
PA
123172010-01-21 Pedro Alves <pedro@codesourcery.com>
12318
12319 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12320 prototype to take a regcache. Adjust.
12321
442ea881
PA
123222010-01-20 Pedro Alves <pedro@codesourcery.com>
12323
12324 * regcache.h (struct thread_info): Forward declare.
12325 (struct regcache): New.
12326 (new_register_cache): Adjust prototype.
12327 (get_thread_regcache): Declare.
12328 (free_register_cache): Adjust prototype.
12329 (registers_to_string, registers_from_string): Ditto.
12330 (supply_register, supply_register_by_name, collect_register)
12331 (collect_register_as_string, collect_register_by_name): Ditto.
12332 * regcache.c (struct inferior_regcache_data): Delete.
12333 (get_regcache): Rename to ...
12334 (get_thread_regcache): ... this. Adjust. Switch inferior before
12335 fetching registers.
12336 (regcache_invalidate_one): Adjust.
12337 (regcache_invalidate): Fix prototype.
12338 (new_register_cache): Return the new register cache.
12339 (free_register_cache): Change prototype.
12340 (realloc_register_cache): Adjust.
12341 (registers_to_string): Change prototype to take a regcache. Adjust.
12342 (registers_from_string): Ditto.
12343 (register_data): Ditto.
12344 (supply_register): Ditto.
12345 (supply_register_by_name): Ditto.
12346 (collect_register): Ditto.
12347 (collect_register_as_string): Ditto.
12348 (collect_register_by_name): Ditto.
12349 * server.c (process_serial_event): Adjust.
12350 * linux-low.h (regset_fill_func, regset_store_func): Change
12351 prototype.
12352 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12353 Change prototype.
12354 * linux-low.c (get_stop_pc): Adjust.
12355 (check_removed_breakpoint): Adjust.
12356 (linux_wait_for_event): Adjust.
12357 (linux_resume_one_lwp): Adjust.
12358 (fetch_register): Add regcache parameter. Adjust.
12359 (usr_store_inferior_registers): Ditto.
12360 (regsets_fetch_inferior_registers): Ditto.
12361 (regsets_store_inferior_registers): Ditto.
12362 (linux_fetch_registers, linux_store_registers): Ditto.
12363 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12364 regcache. Adjust.
43aaf8b6
PA
12365 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12366 Ditto.
442ea881
PA
12367 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12368 prototype to take a regcache.
12369 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12370 * remote-utils.c (convert_ascii_to_int, outreg)
12371 (prepare_resume_reply): Change prototype to take a regcache.
12372 Adjust.
12373 * target.h (struct target_ops) <fetch_registers, store_registers>:
12374 Change prototype to take a regcache.
12375 (fetch_inferior_registers, store_inferior_registers): Change
12376 prototype to take a regcache. Adjust.
12377 * proc-service.c (ps_lgetregs): Adjust.
12378 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12379 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12380 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12381 take a regcache. Adjust.
12382 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12383 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12384 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12385 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12386 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12387 (cris_cannot_fetch_register):
12388 (cris_breakpoint_at): Change prototype to take a regcache.
12389 Adjust.
12390 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12391 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12392 to take a regcache. Adjust.
12393 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12394 Adjust.
12395 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12396 take a regcache. Adjust.
12397 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12398 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12399 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12400 * linux-mips-low.c (mips_get_pc):
12401 (mips_set_pc): Change prototype to take a regcache. Adjust.
12402 (mips_reinsert_addr): Adjust.
12403 (mips_collect_register): Change prototype to take a regcache.
12404 Adjust.
12405 (mips_supply_register):
12406 (mips_collect_register_32bit, mips_supply_register_32bit)
12407 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12408 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12409 * linux-ppc-low.c (ppc_supply_ptrace_register)
12410 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12411 (parse_spufs_run): Adjust.
12412 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12413 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12414 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12415 take a regcache. Adjust.
12416 * linux-s390-low.c (s390_collect_ptrace_register)
12417 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12418 (s390_set_pc): Change prototype to take a regcache. Adjust.
12419 (s390_arch_setup): Adjust.
12420 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12421 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12422 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12423 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12424 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12425 regcache. Adjust.
12426 (sparc_breakpoint_at): Adjust.
12427 * linux-xtensa-low.c (xtensa_fill_gregset):
12428 (xtensa_store_gregset):
12429 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12430 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12431 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12432 prototype to take a regcache. Adjust.
12433 * win32-arm-low.c (arm_fetch_inferior_register)
12434 (arm_store_inferior_register): Change prototype to take a
12435 regcache. Adjust.
12436 * win32-i386-low.c (i386_fetch_inferior_register)
12437 (i386_store_inferior_register): Change prototype to take a
12438 regcache. Adjust.
12439 * win32-low.c (child_fetch_inferior_registers)
12440 (child_store_inferior_registers): Change prototype to take a
12441 regcache. Adjust.
12442 (win32_wait): Adjust.
12443 (win32_fetch_inferior_registers): Change prototype to take a
12444 regcache. Adjust.
12445 (win32_store_inferior_registers): Adjust.
12446 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12447 store_inferior_register>: Change prototype to take a regcache.
12448
60c3d7b0
DE
124492010-01-20 Doug Evans <dje@google.com>
12450
12451 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12452 #ifdef.
12453 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12454 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12455
dc146f7c
VP
124562010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12457
12458 * linux-low.c (linux_core_of_thread): New.
12459 (compare_ints, show_process, list_threads): New.
12460 (linux_qxfer_osdata): Report threads and cores.
12461 (linux_target_op): Register linux_core_of_thread.
12462 * remote-utils.c (prepare_resume_reply): Report the core.
12463 (buffer_xml_printf): Support %d specifier.
12464 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12465 New.
12466 (handle_query): Handle qXfer:threads. Announce availability
12467 thereof.
12468 * target.h (struct target_ops): New field core_of_thread.
12469
7803799a
UW
124702010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12471
12472 * Makefile.in (clean): Remove new generated files.
12473 (reg-s390.o, reg-s390.c): Remove rules.
12474 (reg-s390x.o, reg-s390x.c): Likewise.
12475 (s390-linux32.o, s390-linux32.c): Add rules.
12476 (s390-linux64.o, s390-linux64.c): Likewise.
12477 (s390x-linux64.o, s390x-linux64.c): Likewise.
12478 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12479 * linux-s390-low.c: Include <elf.h>.
12480 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12481 (init_registers_s390): Remove prototype.
12482 (init_registers_s390x): Likewise.
12483 (init_registers_s390_linux32): Add prototype.
12484 (init_registers_s390_linux64): Likewise.
12485 (init_registers_s390x_linux64): Likewise.
12486 (s390_num_regs_3264): New define.
12487 (s390_regmap_3264): New global variable.
12488 (s390_cannot_fetch_register): Remove obsolete check.
12489 (s390_cannot_store_register): Likewise.
12490 (s390_collect_ptrace_register): Handle upper/lower register halves.
12491 (s390_supply_ptrace_register): Likewise.
12492 (s390_fill_gregset): Update to register number changes.
12493 (s390_get_hwcap): New routine.
12494 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12495 Install appropriate regmap and register set.
12496
6e7ffa39
JB
124972010-01-01 Joel Brobecker <brobecker@adacore.com>
12498
12499 * server.c (gdbserver_version): Update copyright year to 2010.
12500 * gdbreplay.c (gdbreplay_version): Likewise.
12501
957f3f49
DE
125022009-12-28 Doug Evans <dje@google.com>
12503
12504 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12505 elf/external.h. Include <elf.h> instead but only if necessary.
12506
ca5c370d
PA
125072009-12-28 Pedro Alves <pedro@codesourcery.com>
12508
12509 * linux-low.c (linux_remove_process): Remove `detaching'
12510 parameter. Don't release/detach from thread_db here.
12511 (linux_kill): Release/detach from thread_db here, ...
12512 (linux_detach): ... and here, before actually detaching.
12513 (linux_wait_1): ... and here, when a process exits.
12514 * thread-db.c (any_thread_of): New.
12515 (thread_db_free): Switch the current inferior to a thread of the
12516 passed in process.
12517
4ee62156
DE
125182009-12-21 Doug Evans <dje@google.com>
12519
d90e6a88
DE
12520 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12521
c5f62d5f
DE
12522 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12523 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12524 warning ifndef __NR_tkill. Move setting of errno there too.
12525 Delete unnecessary resetting of errno after syscall.
12526 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12527
10e86dd7
DE
12528 * configure.ac: Check for dladdr.
12529 * config.in: Regenerate.
12530 * configure: Regenerate.
12531 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12532 (try_thread_db_load): Update.
12533
4ee62156
DE
12534 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12535
00f515da
DE
125362009-12-18 Doug Evans <dje@google.com>
12537
e9464885
DE
12538 * event-loop.c: Include unistd.h if it exists.
12539
07d4f67e
DE
12540 * linux-low.c (my_waitpid): Move definition away from being in
12541 between linux_tracefork_child/linux_test_for_tracefork.
12542
00f515da
DE
12543 * gdb_proc_service.h (psaddr_t): Fix type.
12544 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12545 signature to match glibc.
12546
1de1badb
DE
125472009-12-16 Doug Evans <dje@google.com>
12548
12549 * linux-low.c (linux_read_memory): Fix argument to read.
12550
aeeb81d1
PA
125512009-11-26 Pedro Alves <pedro@codesourcery.com>
12552
12553 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12554 events, don't leave current_inferior pointing at null.
12555
10357975
PA
125562009-11-26 Pedro Alves <pedro@codesourcery.com>
12557
12558 * win32-low.c (LOG): Delete.
12559 (OUTMSG): Output to stderr.
12560 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12561 on compile time LOG macro.
12562 (win32_wait): Fix debug output.
12563
cf6e3471
PA
125642009-11-26 Pedro Alves <pedro@codesourcery.com>
12565
12566 * win32-low.c (win32_add_one_solib): If the dll name is
12567 "ntdll.dll", prepend the system directory to the dll path.
12568
0c85e18e
MK
125692009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12570
12571 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12572
9ac544ce 125732009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12574 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12575
12576 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12577 * configure.ac: Check for __mcoldfire__ and set
12578 gdb_cv_m68k_is_coldfire.
12579 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12580 reg-cf.o and reg-m68k.o.
12581 * configure: Regenerated.
12582
fd7dd3e6
PA
125832009-11-16 Pedro Alves <pedro@codesourcery.com>
12584
12585 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12586 Pass it to thread_db_free.
12587 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12588 proper `detaching' argument to linux_remove_process.
12589 * linux-low.h (thread_db_free): Add `detaching' parameter.
12590 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12591 to thread_db_free.
12592 (thread_db_free): Add `detaching' parameter. Only
12593 call td_ta_clear_event if detaching from process.
12594
75aa492e
MK
125952009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12596
12597 * thread-db.c (thread_db_free): Fix typo.
12598
21e1bee4
PP
125992009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12600
12601 PR gdb/10838
12602 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12603
8838b45e
NS
126042009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12605
12606 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12607 with an i686 compiler.
12608 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12609 needed.
12610 * configure: Rebuilt.
12611
8a35fb51
SL
126122009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12613
12614 PR gdb/10783
12615
12616 * server.c (handle_search_memory_1): Correct read_addr initialization
12617 in loop for searching subsequent chunks.
12618
96f15937
PP
126192009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12620
12621 * configure.ac: New --with-libthread-db option.
12622 * thread-db.c: Allow direct dependence on libthread_db.
12623 (thread_db_free): Adjust.
12624 * config.in: Regenerate.
12625 * configure: Likewise.
889bf7c5 12626
5f7d1694
PP
126272009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12628
12629 PR gdb/10757
12630 * thread-db.c (attach_thread): New function.
12631 (maybe_attach_thread): Return success/failure.
12632 (find_new_threads_callback): Adjust.
889bf7c5
PA
12633 (thread_db_find_new_threads): Loop until no new threads.
12634
88e3b899
PA
126352009-10-13 Pedro Alves <pedro@codesourcery.com>
12636
12637 * proc-service.c (ps_lgetregs): Formatting.
12638
cdbfd419
PP
126392009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12640
12641 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12642 * configure.ac: Adjust.
12643 * linux-low.h (struct process_info_private): Move members to struct
12644 thread_db.
12645 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12646 * linux-low.c (linux_remove_process): Adjust.
12647 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12648 * server.c (handle_query): Move code ...
12649 (handle_monitor_command): ... here. New function.
12650 * target.h (struct target_ops): New member.
12651 * thread-db.c (struct thread_db): New.
12652 (libthread_db_search_path): New variable.
12653 (thread_db_create_event, thread_db_enable_reporting)
12654 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12655 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12656 (try_thread_db_load_1, dladdr_to_soname): New functions.
12657 (try_thread_db_load, thread_db_load_search): New functions.
12658 (thread_db_init): Search for libthread_db.
12659 (thread_db_free): New function.
12660 (thread_db_handle_monitor_command): Likewise.
12661 * config.in: Regenerate.
12662 * configure: Regenerate.
889bf7c5 12663
4168d2d6
UW
126642009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12665
12666 * spu-low.c (spu_kill): Wait for inferior to terminate.
12667 Call clear_inferiors.
12668 (spu_detach): Call clear_inferiors.
12669
81ecdfbb
RW
126702009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12671
12672 * aclocal.m4: Regenerate.
12673 * config.in: Likewise.
12674 * configure: Likewise.
12675
0b9ff2c0
UW
126762009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12677
12678 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12679 (parse_spufs_run): New function.
12680 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12681 (ppc_breakpoint_at): Handle SPU breakpoints.
12682
efcbbd14
UW
126832009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12684
12685 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12686 (SPUFS_MAGIC): Define.
12687 (spu_enumerate_spu_ids): New function.
12688 (linux_qxfer_spu): New function.
12689 (linux_target_ops): Install linux_qxfer_spu.
12690
f4d9bade
UW
126912009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12692
12693 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12694 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12695 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12696 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12697 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12698 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12699 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12700 (init_registers_powerpc_cell32l): Add prototype.
12701 (init_registers_powerpc_cell64l): Likewise.
12702 (ppc_arch_setup): Detect Cell/B.E. architecture.
12703
96e946ca
RW
127042009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12705
12706 * Makefile.in (datarootdir): New variable.
12707
58d6951d
DJ
127082009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12709
12710 * linux-low.c (linux_write_memory): Update debugging output.
12711 * Makefile.in (clean): Add new descriptions.
12712 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12713 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12714 * configure.srv: Add new files for arm*-*-linux*.
12715 * linux-arm-low.c: Add new declarations.
12716 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12717 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12718 (HWCAP_VFPv3D16): New.
12719 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12720 instead of __IWMMXT__.
12721 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12722 (arm_arch_setup): New.
12723 (target_regsets): Remove #ifdef. Add VFP regset.
12724 (the_low_target): Use arm_arch_setup.
12725
12b42a12
DJ
127262009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12727
12728 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12729 the main thread again.
12730
ac8c974e
AR
127312009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12732
12733 Adding Neutrino gdbserver.
12734 * configure: Regenerated.
12735 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12736 * configure.srv (i[34567]86-*-nto*): New target.
12737 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12738 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12739 (nto_comctrl) [__QNX__]: New function.
12740 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12741
4424e0c3 127422009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12743
12744 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12745 srv_tgtobj.
12746
912cf4ba
PA
127472009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12748 Pedro Alves <pedro@codesourcery.com>
12749
12750 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12751 don't support CONTEXT_EXTENDED_REGISTERS.
12752 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12753 (the_low_target): Install them.
12754 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12755 failing with ERROR_PIPE_NOT_CONNECTED.
12756
aa5ca48f
DE
127572009-06-30 Doug Evans <dje@google.com>
12758 Pierre Muller <muller@ics.u-strasbg.fr>
12759
12760 Add h/w watchpoint support to x86-linux, win32-i386.
12761 * Makefile.in (SFILES): Add i386-low.c
12762 (i386_low_h): Define.
12763 (i386-low.o): Add dependencies.
12764 (linux-x86-low.o): Add i386-low.h dependency.
12765 (win32-i386-low.o): Ditto.
12766 * i386-low.c: New file.
12767 * i386-low.h: New file.
12768 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12769 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12770 * linux-low.c (linux_add_process): Initialize arch_private.
12771 (linux_remove_process): Free arch_private.
12772 (add_lwp): Initialize arch_private.
12773 (delete_lwp): Free arch_private.
12774 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12775 provided.
12776 * linux-low.h (process_info_private): New member arch_private.
12777 (lwp_info): New member arch_private.
12778 (linux_target_ops): New members new_process, new_thread,
12779 prepare_to_resume.
12780 (ptid_of): New macro.
12781 * linux-x86-low.c: Include stddef.h, i386-low.h.
12782 (arch_process_info): New struct.
12783 (arch_lwp_info): New struct.
12784 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12785 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12786 (i386_dr_low_get_status): New function.
12787 (x86_insert_point, x86_remove_point): New functions.
12788 (x86_stopped_by_watchpoint): New function.
12789 (x86_stopped_data_address): New function.
12790 (x86_linux_new_process, x86_linux_new_thread): New functions.
12791 (x86_linux_prepare_to_resume): New function.
12792 (the_low_target): Add entries for insert_point, remove_point,
12793 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12794 prepare_to_resume.
12795 * server.c (debug_hw_points): New global.
12796 (monitor_show_help): Document set debug-hw-points.
12797 (handle_query): Process "set debug-hw-points".
12798 * server.h (debug_hw_points): Declare.
12799 (paddress): Declare.
12800 * utils.c (NUMCELLS, CELLSIZE): New macros.
12801 (get_sell, xsnprintf, paddress): New functions.
12802 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12803 remove_point, stopped_by_watchpoint, stopped_data_address.
12804 * win32-i386-low.c: Include i386-low.h.
12805 (debug_reg_state): Replaces dr.
12806 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12807 (i386_dr_low_get_status): New function.
12808 (i386_insert_point, i386_remove_point): New functions.
12809 (i386_stopped_by_watchpoint): New function.
12810 (i386_stopped_data_address): New function.
12811 (i386_initial_stuff): Update.
12812 (get_thread_context,set_thread_context,i386_thread_added): Update.
12813 (the_low_target): Add entries for insert_point,
12814 remove_point, stopped_by_watchpoint, stopped_data_address.
12815 * win32-low.c (win32_insert_watchpoint): New function.
12816 (win32_remove_watchpoint): New function.
12817 (win32_stopped_by_watchpoint): New function.
12818 (win32_stopped_data_address): New function.
12819 (win32_target_ops): Add entries for insert_watchpoint,
12820 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12821 * win32-low.h (win32_target_ops): New members insert_point,
12822 remove_point, stopped_by_watchpoint, stopped_data_address.
12823
d993e290
PA
128242009-06-25 Pedro Alves <pedro@codesourcery.com>
12825
12826 * server.c (process_serial_event): Re-return unsupported, not
12827 error, if the type isn't recognized. Re-allow supporting only
12828 insert or remove packets. Also call require_running for
12829 breakpoints. Add missing break statement to default case. Tidy.
12830 * target.h (struct target_ops): Rename insert_watchpoint to
12831 insert_point, and remove_watchpoint to remove_point.
12832
12833 * linux-low.h (struct linux_target_ops): Likewise.
12834 * linux-low.c (linux_insert_watchpoint): Rename to ...
12835 (linux_insert_point): ... this. Adjust.
12836 (linux_remove_watchpoint): Rename to ...
12837 (linux_remove_point): ... this. Adjust.
12838 (linux_target_ops): Adjust.
12839 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12840 (cris_insert_point): ... this.
12841 (cris_remove_watchpoint): Rename to ...
12842 (cris_remove_point): ... this.
12843 (the_low_target): Adjust.
12844
0f54c268
PM
128452009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12846
12847 * server.c (handle_v_kill): Pass signal_pid to
12848 kill_inferior if multi_process is zero.
12849
c6314022
AR
128502009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12851
12852 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12853 * target.h (target_ops): Comment for *_watchpoint to make it clear
12854 the functions can get types '0' and '1'.
12855
4463ce24
AR
128562009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12857
12858 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12859 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12860 * regcache.c (get_regcache): Likewise.
12861 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12862 * win32-low.c (child_fetch_inferior_registers): Remove check for
12863 regno 0.
12864
cf8fd78b
PA
128652009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12866 Pedro Alves <pedro@codesourcery.com>
12867
12868 * target.h (struct target_ops) <supports_multi_process>: New
12869 callback.
12870 (target_supports_multi_process): New.
12871 * server.c (handle_query): Even if GDB reports support, only
12872 enable multi-process if the target also supports it. Report
12873 multi-process support only if the target backend supports it.
12874 * linux-low.c (linux_supports_multi_process): New function.
12875 (linux_target_ops): Install it as target_supports_multi_process
12876 callback.
12877
47c0c975
DE
128782009-05-24 Doug Evans <dje@google.com>
12879
e09875d4
DE
12880 Global renaming of find_thread_pid to find_thread_ptid.
12881 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12882 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12883 All callers updated.
12884
e27d73f6
DE
12885 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12886 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12887 directly.
12888
47c0c975
DE
12889 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12890 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12891 (linux_resume_one_lwp): Ditto.
12892
2acc282a
DE
128932009-05-23 Doug Evans <dje@google.com>
12894
12895 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12896 from struct inferior_list_entry * to struct lwp_info *.
12897 All callers updated.
12898
9f1036c1
DE
128992009-05-13 Doug Evans <dje@google.com>
12900
12901 * linux-x86-low.c: Don't include assert.h.
12902 (x86_siginfo_fixup): Use fatal, not assert.
12903 (x86_arch_setup): Fix comment.
12904
d0722149
DE
129052009-05-12 Doug Evans <dje@google.com>
12906
12907 Biarch support for i386/amd64 gdbserver.
12908 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12909 Add linux-x86-low.c.
12910 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12911 (linux-x86-low.o): Add.
12912 * linux-x86-64-low.c: Delete.
12913 * linux-i386-low.c: Delete.
12914 * linux-x86-low.c: New file.
12915 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12916 linux-x86-low.o.
12917 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12918 linux-x86-low.o.
12919 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12920 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12921 (linux_child_pid_to_exec_file): New function.
12922 (elf_64_header_p, elf_64_file_p): New functions.
12923 (siginfo_fixup): New function.
12924 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12925 give target a chance to convert layout.
12926 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12927 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12928
fdeb2a12
DE
129292009-05-07 Doug Evans <dje@google.com>
12930
12931 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12932 (regsets_store_inferior_registers): Ditto.
12933
a6dbe5df
PA
129342009-05-06 Pedro Alves <pedro@codesourcery.com>
12935
12936 PR server/10048
12937
12938 * linux-low.c (must_set_ptrace_flags): Delete.
12939 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12940 of the global.
12941 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12942 `lwp->must_set_ptrace_flags' instead.
ba42693b 12943 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12944 (linux_wait_1): ... not here.
12945
5091eb23
DE
129462009-04-30 Doug Evans <dje@google.com>
12947
9f767825
DE
12948 * inferiors.c (started_inferior_callback): New function.
12949 (attached_inferior_callback): New function.
12950 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12951 * server.c (print_started_pid, print_attached_pid): New functions.
12952 (detach_or_kill_for_exit): New function.
12953 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12954 * server.h (have_started_inferiors_p): Declare.
12955 (have_attached_inferiors_p): Declare.
12956
5091eb23
DE
12957 * inferiors.c (remove_process): Fix memory leak, free process.
12958 * linux-low.c (linux_remove_process): New function.
12959 (linux_kill): Call it instead of remove_process.
12960 (linux_detach, linux_wait_1): Ditto.
12961
155c8968
PA
129622009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12963
12964 * configure.srv: Add x86 Windows CE target.
12965
7fe519cb
UW
129662009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12967
12968 * inferiors.c (get_thread_process): Make global.
12969 * server.h (get_thread_process): Add prototype.
12970 * thread-db.c (find_one_thread): Use get_thread_process
12971 instead of current_process.
12972 (thread_db_get_tls_address): Do not crash if called when
12973 thread layer is not yet initialized.
12974
5472f405
UW
129752009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12976
12977 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12978 * spu-low.c (current_tid): Rename to ...
12979 (current_ptid): ... this.
12980 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12981 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12982 ptid_get_lwp (current_ptid) instead of current_tid.
12983 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12984 instead of current_tid. Use find_process_pid to verify pid
12985 argument is valid. Pass proper argument to remove_process.
12986 (spu_thread_alive): Compare current_ptid instead of current_tid.
12987 (spu_resume): Likewise.
12988
55ac2b99
PA
129892009-04-02 Pedro Alves <pedro@codesourcery.com>
12990
12991 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12992 variable.
12993
95954743
PA
129942009-04-01 Pedro Alves <pedro@codesourcery.com>
12995
12996 Implement the multiprocess extensions, and add linux multiprocess
12997 support.
12998
12999 * server.h (ULONGEST): Declare.
13000 (struct ptid, ptid_t): New.
13001 (minus_one_ptid, null_ptid): Declare.
13002 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13003 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13004 (struct inferior_list_entry): Change `id' type from unsigned from
13005 to ptid_t.
13006 (struct sym_cache, struct breakpoint, struct
13007 process_info_private): Forward declare.
13008 (struct process_info): Declare.
13009 (current_process): Declare.
13010 (all_processes): Declare.
13011 (initialize_inferiors): Declare.
13012 (add_thread): Adjust to use ptid_t.
13013 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13014 (add_process, remove_process, find_thread_pid): Declare.
13015 (find_inferior_id): Adjust to use ptid_t.
13016 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13017 (multi_process): Declare.
13018 (push_event): Adjust to use ptid_t.
13019 (read_ptid, write_ptid): Declare.
13020 (prepare_resume_reply): Adjust to use ptid_t.
13021 (clear_symbol_cache): Declare.
13022 * inferiors.c (all_processes): New.
13023 (null_ptid, minus_one_ptid): New.
13024 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13025 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13026 (add_thread): Change unsigned long to ptid. Remove gdb_id
13027 parameter. Adjust.
13028 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13029 (gdb_id_to_thread): Rename to ...
13030 (find_thread_pid): ... this. Change unsigned long to ptid.
13031 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13032 (loaded_dll, pull_pid_from_list): Adjust.
13033 (add_process, remove_process, find_process_pid)
13034 (get_thread_process, current_process, initialize_inferiors): New.
13035 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13036 (struct target_waitstatus) <related_pid>: Ditto.
13037 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13038 return type to int.
13039 (struct target_ops) <join>: Add `pid' argument.
13040 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13041 (struct target_ops) <wait>: Add `ptid' field. Change return type
13042 to ptid.
13043 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13044 (mywait): Add `ptid' argument. Change return type to ptid_t.
13045 (target_pid_to_str): Declare.
13046 * target.c (set_desired_inferior): Adjust to use ptids.
13047 (mywait): Add new `ptid' argument. Adjust.
13048 (target_pid_to_str): New.
13049 * mem-break.h (free_all_breakpoints): Declare.
13050 * mem-break.c (breakpoints): Delelete.
13051 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13052 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13053 to use per-process breakpoint list.
13054 (free_all_breakpoints): New.
13055 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13056 (symbol_cache, all_symbols_looked_up): Delete.
13057 (hexchars): New.
13058 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13059 read_ptid): New.
13060 (prepare_resume_reply): Change ptid argument's type from unsigned
13061 long to ptid_t. Adjust. Implement W;process and X;process.
13062 (free_sym_cache, clear_symbol_cache): New.
13063 (look_up_one_symbol): Adjust to per-process symbol cache. *
13064 * server.c (cont_thread, general_thread, step_thread): Change type
13065 to ptid_t.
13066 (attached): Delete.
13067 (multi_process): New.
13068 (last_ptid): Change type to ptid_t.
13069 (struct vstop_notif) <ptid>: Change type to ptid_t.
13070 (queue_stop_reply, push_event): Change `ptid' argument's type to
13071 ptid_t.
13072 (discard_queued_stop_replies): Add `pid' argument.
13073 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13074 changes. Don't reference the `attached' global.
13075 (attach_inferior): Adjust to mywait interface changes.
13076 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13077 features. Handle and report "multiprocess+". Handle
13078 "qAttached:PID".
13079 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13080 changes.
13081 (handle_v_kill): New.
13082 (handle_v_stopped): Adjust to use target_pid_to_str.
13083 (handle_v_requests): Allow multiple attaches and runs when
13084 multiprocess extensions are in effect. Handle "vKill".
13085 (myresume): Adjust to use ptids.
13086 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13087 (handle_status): Adjust to discard_queued_stop_replies interface
13088 change.
13089 (first_thread_of, kill_inferior_callback)
13090 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13091 (main): Call initialize_inferiors. Adjust to use ptids, killing
13092 and detaching from all inferiors. Handle multiprocess packet
13093 variants.
13094 * linux-low.h: Include gdb_proc_service.h.
13095 (struct process_info_private): New.
13096 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13097 <lwpid_of>: Use ptid_get_lwp.
13098 (get_lwp_thread): Adjust.
13099 (struct lwp_info): Add `dead' member.
13100 (find_lwp_pid): Declare.
13101 * linux-low.c (thread_db_active): Delete.
13102 (new_inferior): Adjust comment.
13103 (inferior_pid): Delete.
13104 (linux_add_process): New.
13105 (handle_extended_wait): Adjust.
13106 (add_lwp): Change unsigned long to ptid.
13107 (linux_create_inferior): Add process to processes table. Adjust
13108 to use ptids. Don't set new_inferior here.
13109 (linux_attach_lwp): Rename to ...
13110 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13111 it. Adjust to use ptids.
13112 (linux_attach_lwp): New.
13113 (linux_attach): Add process to processes table. Don't set
13114 new_inferior here.
13115 (struct counter): New.
13116 (second_thread_of_pid_p, last_thread_of_process_p): New.
13117 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13118 multiple processes.
13119 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13120 processes. Remove process from process table.
13121 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13122 to multiple processes.
13123 (any_thread_of): New.
13124 (linux_detach): Add `pid' argument, and handle it. Remove process
13125 from processes table.
13126 (linux_join): Add `pid' argument. Handle it.
13127 (linux_thread_alive): Change unsighed long argument to ptid_t.
13128 Consider dead lwps as not being alive.
13129 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13130 threads we're not interested in.
13131 (same_lwp, find_lwp_pid): New.
13132 (linux_wait_for_lwp): Change `pid' argument's type from int to
13133 ptid_t. Adjust.
13134 (linux_wait_for_event): Rename to ...
13135 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13136 from int to ptid_t. Adjust.
13137 (linux_wait_for_event): New.
13138 (linux_wait_1): Add `ptid' argument. Change return type to
13139 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13140 that exit from the process table.
13141 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13142 Adjust.
13143 (mark_lwp_dead): New.
13144 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13145 stopping all threads, mark its main lwp as dead.
13146 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13147 ptids.
13148 (fetch_register, usr_store_inferior_registers)
13149 (regsets_fetch_inferior_registers)
13150 (regsets_store_inferior_registers, linux_read_memory)
13151 (linux_write_memory): Inline `inferior_pid'.
13152 (linux_look_up_symbols): Adjust to use per-process
13153 `thread_db_active'.
13154 (linux_request_interrupt): Adjust to use ptids.
13155 (linux_read_auxv): Inline `inferior_pid'.
13156 (initialize_low): Don't reference thread_db_active.
13157 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13158 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13159 (ps_getpid): Return the pid of the current inferior.
13160 * thread-db.c (proc_handle, thread_agent): Delete.
13161 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13162 per-process data.
13163 (find_one_thread): Change argument type to ptid_t. Adjust to
13164 per-process data.
13165 (maybe_attach_thread): Adjust to per-process data and ptids.
13166 (thread_db_find_new_threads): Ditto.
13167 (thread_db_init): Ditto.
13168 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13169 processes table. Adjust to use ptids.
13170 (spu_kill, spu_detach): Adjust interface. Remove process from
13171 processes table.
13172 (spu_join, spu_thread_alive): Adjust interface.
13173 (spu_wait): Adjust interface. Remove process from processes
13174 table. Adjust to use ptids.
13175 * win32-low.c (current_inferior_tid): Delete.
13176 (current_inferior_ptid): New.
13177 (debug_event_ptid): New.
13178 (thread_rec): Take a ptid. Adjust.
13179 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13180 (child_delete_thread): Ditto.
13181 (do_initial_child_stuff): Add `attached' argument. Add process to
13182 processes table.
13183 (child_fetch_inferior_registers, child_store_inferior_registers):
13184 Adjust.
13185 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13186 (win32_attach): Pass 1 to do_initial_child_stuff.
13187 (win32_kill): Adjust interface. Remove process from processes
13188 table.
13189 (win32_detach): Ditto.
13190 (win32_join): Adjust interface.
13191 (win32_thread_alive): Take a ptid.
13192 (win32_resume): Adjust to use ptids.
13193 (get_child_debug_event): Ditto.
13194 (win32_wait): Adjust interface. Remove exiting process from
13195 processes table.
13196
bd99dc85
PA
131972009-04-01 Pedro Alves <pedro@codesourcery.com>
13198
13199 Non-stop mode support.
13200
13201 * server.h (non_stop): Declare.
13202 (gdb_client_data, handler_func): Declare.
13203 (delete_file_handler, add_file_handler, start_event_loop):
13204 Declare.
13205 (handle_serial_event, handle_target_event, push_event)
13206 (putpkt_notif): Declare.
13207 * target.h (enum resume_kind): New.
13208 (struct thread_resume): Replace `step' field by `kind' field.
13209 (TARGET_WNOHANG): Define.
13210 (struct target_ops) <wait>: Add `options' argument.
13211 <supports_non_stop, async, start_non_stop>: New fields.
13212 (target_supports_non_stop, target_async): New.
13213 (start_non_stop): Declare.
13214 (mywait): Add `options' argument.
13215 * target.c (mywait): Add `options' argument. Print child exit
13216 notifications here.
13217 (start_non_stop): New.
13218 * server.c (non_stop, own_buf, mem_buf): New globals.
13219 (struct vstop_notif): New.
13220 (notif_queue): New global.
13221 (queue_stop_reply, push_event, discard_queued_stop_replies)
13222 (send_next_stop_reply): New.
13223 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13224 interface changes.
13225 (attach_inferior): In non-stop mode, don't wait for the target
13226 here.
13227 (handle_general_set): Handle QNonStop.
13228 (handle_query): When handling qC, return the current general
13229 thread, instead of the first thread of the list.
13230 (handle_query): If the backend supports non-stop mode, include
13231 QNonStop+ in the qSupported query response.
13232 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13233 and non-stop mode.
13234 (handle_v_attach, handle_v_run): Handle non-stop mode.
13235 (handle_v_stopped): New.
13236 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13237 (myresume): Adjust to use resume_kind. Handle non-stop.
13238 (queue_stop_reply_callback): New.
13239 (handle_status): Handle non-stop mode.
13240 (main): Clear non_stop flag on reconnection. Use the event-loop.
13241 Refactor serial protocol handling from here ...
13242 (process_serial_event): ... to this new function. When GDB
13243 selects any thread, select one here. In non-stop mode, wait until
13244 GDB acks all pending events before exiting.
13245 (handle_serial_event, handle_target_event): New.
13246 * remote-utils.c (remote_open): Install remote_desc in the event
13247 loop.
13248 (remote_close): Remove remote_desc from the event loop.
13249 (putpkt_binary): Rename to...
13250 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13251 (putpkt_binary): New as wrapper around putpkt_binary_1.
13252 (putpkt_notif): New.
13253 (prepare_resume_reply): In non-stop mode, don't change the
13254 general_thread.
13255 * event-loop.c: New.
13256 * Makefile.in (OBJ): Add event-loop.o.
13257 (event-loop.o): New rule.
13258
13259 * linux-low.h (pid_of): Moved here.
13260 (lwpid_of): New.
13261 (get_lwp_thread): Use lwpid_of.
13262 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13263 * linux-low.c (pid_of): Delete.
13264 (inferior_pid): Use lwpid_of.
13265 (linux_event_pipe): New.
13266 (target_is_async_p): New.
13267 (delete_lwp): New.
13268 (handle_extended_wait): Use lwpid_of.
13269 (add_lwp): Don't set lwpid field.
13270 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13271 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13272 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13273 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13274 first. Adjust to linux_wait_for_event interface changes. Use
13275 lwpid_of.
13276 (linux_detach): Don't delete the main lwp here.
13277 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13278 (status_pending_p): Don't consider explicitly suspended lwps.
13279 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13280 pointer. Add OPTIONS argument. Change return type to int. Use
13281 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13282 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13283 pointer. Add status pointer argument. Return a pid instead of a
13284 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13285 changes. In non-stop mode, don't switch to a random thread.
13286 (linux_wait): Rename to...
13287 (linux_wait_1): ... this. Add target_options argument, and handle
13288 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13289 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13290 clean exit and signal exit code. Don't stop all threads in
13291 non-stop mode. In all-stop mode, only stop all threads when
13292 reporting a stop to GDB. Handle explicit thread stop requests.
13293 (async_file_flush, async_file_mark): New.
13294 (linux_wait): New.
13295 (send_sigstop): Use lwpid_of.
13296 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13297 interface changes. In non-stop mode, don't switch to a random
13298 thread.
13299 (linux_resume_one_lwp): Use lwpid_of.
13300 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13301 (linux_resume_one_thread): ... this. Handle resume_stop. In
13302 non-stop mode, don't look for pending flag in all threads.
13303 (resume_status_pending_p): Don't consider explicitly suspended
13304 threads.
13305 (my_waitpid): Reimplement. Emulate __WALL.
13306 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13307 Use lwpid_of.
13308 (sigchld_handler, linux_supports_non_stop, linux_async)
13309 (linux_start_non_stop): New.
13310 (linux_target_ops): Register linux_supports_non_stop, linux_async
13311 and linux_start_non_stop.
13312 (initialize_low): Install SIGCHLD handler.
13313 * thread-db.c (thread_db_create_event, find_one_thread)
13314 (thread_db_get_tls_address): Use lwpid_of.
13315 * win32-low.c (win32_detach): Adjust to use resume_kind.
13316 (win32_wait): Add `options' argument.
13317 * spu-low.c (spu_resume): Adjust to use resume_kind.
13318 (spu_wait): Add `options' argument.
13319
5b1c542e
PA
133202009-04-01 Pedro Alves <pedro@codesourcery.com>
13321
13322 Decouple target code from remote protocol.
13323
13324 * target.h (enum target_waitkind): New.
13325 (struct target_waitstatus): New.
13326 (struct target_ops) <wait>: Return an unsigned long. Take a
13327 target_waitstatus pointer instead of a char pointer.
13328 (mywait): Likewise.
13329 * target.c (mywait): Change prototype to return an unsigned long.
13330 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13331 * server.h (thread_from_wait, old_thread_from_wait): Delete
13332 declarations.
13333 (prepare_resume_reply): Change prototype to take a
13334 target_waitstatus.
13335 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13336 (last_status, last_ptid): New.
13337 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13338 pid instead of a signal.
13339 (attach_inferior): Remove "status" and "signal" parameters.
13340 Adjust.
13341 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13342 not as an address.
13343 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13344 (handle_v_requests, myresume): Remove "status" and "signal"
13345 parameters. Adjust.
13346 (handle_status): New.
13347 (main): Delete local `status'. Adjust.
13348 * remote-utils.c: Include target.h.
13349 (prepare_resume_reply): Change prototype to take a
13350 target_waitstatus. Adjust.
13351
13352 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13353 interface.
13354 * spu-low.c (spu_wait): Adjust.
13355 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13356 Delete.
13357 (win32_wait): Adjust.
13358
2bd7c093
PA
133592009-04-01 Pedro Alves <pedro@codesourcery.com>
13360
13361 * target.h (struct thread_resume): Delete leave_stopped member.
13362 (struct target_ops): Add a `n' argument to the `resume' callback.
13363 * server.c (start_inferior): Adjust.
13364 (handle_v_cont, myresume): Adjust.
13365 * linux-low.c (check_removed_breakpoint): Adjust to resume
13366 interface change, and to removed leave_stopped field.
13367 (resume_ptr): Delete.
13368 (struct thread_resume_array): New.
13369 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13370 resume interface change.
13371 (linux_continue_one_thread, linux_queue_one_thread)
13372 (resume_status_pending_p): Check if the resume field is NULL
13373 instead of checking the leave_stopped member.
13374 (linux_resume): Adjust to the target resume interface change.
13375 * spu-low.c (spu_resume): Adjust to the target resume interface
13376 change.
13377 * win32-low.c (win32_detach, win32_resume): Ditto.
13378
c35fafde
PA
133792009-04-01 Pedro Alves <pedro@codesourcery.com>
13380
13381 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13382 flag.
13383 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13384 pending.
13385 (linux_continue_one_thread): Only preserve the stepping flag if
13386 there's a pending breakpoint.
13387
0a59d50b
PA
133882009-03-31 Pedro Alves <pedro@codesourcery.com>
13389
13390 * server.c (main): After the inferior having exited, call
13391 remote_close before exiting gdbserver.
13392
f04c6d38
TJB
133932009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13394
13395 Fix size of FPSCR in Power 7 processors.
13396 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13397 (PPC_FEATURE_HAS_DFP): New #define.
13398 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13399 size of the FPSCR.
13400
78e5cee6
PA
134012009-03-23 Pedro Alves <pedro@codesourcery.com>
13402
13403 * server.c (handle_query) Whitespace and formatting.
13404
1b3f6016
PA
134052009-03-22 Pedro Alves <pedro@codesourcery.com>
13406
13407 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13408 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13409 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13410 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13411 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13412 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13413 Makefile.in, configure.ac: Fix whitespace throughout.
13414 * configure: Regenerate.
13415
a07b2135
PA
134162009-03-22 Pedro Alves <pedro@codesourcery.com>
13417
13418 * inferiors.c (find_inferior): Make it safe for the callback
13419 function to delete the currently iterated inferior.
13420
67cc2626
PA
134212009-03-22 Pedro Alves <pedro@codesourcery.com>
13422
13423 * Makefile.in (linuw_low_h): Move higher.
13424 (thread-db.o): Depend on $(linux_low_h).
13425
54a0b537
PA
134262009-03-17 Pedro Alves <pedro@codesourcery.com>
13427
13428 Rename "process" to "lwp" throughout.
13429
13430 * linux-low.c (all_processes): Rename to...
13431 (all_lwps): ... this.
13432 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13433 (add_process): Rename to ...
13434 (add_lwp): ... this. Adjust.
13435 (linux_create_inferior): Adjust.
13436 (linux_attach_lwp): Adjust.
13437 (linux_attach): Adjust.
13438 (linux_kill_one_process): Rename to ...
13439 (linux_kill_one_lwp): ... this. Adjust.
13440 (linux_kill): Adjust.
13441 (linux_detach_one_process): Rename to ...
13442 (linux_detach_one_lwp): ... this. Adjust.
13443 (linux_detach): Adjust.
13444 (check_removed_breakpoint): Adjust.
13445 (status_pending_p): Adjust.
13446 (linux_wait_for_process): Rename to ...
13447 (linux_wait_for_lwp): ... this. Adjust.
13448 (linux_wait_for_event): Adjust.
13449 (send_sigstop): Adjust.
13450 (wait_for_sigstop): Adjust.
13451 (stop_all_processes): Rename to ...
13452 (stop_all_lwps): ... this.
13453 (linux_resume_one_process): Rename to ...
13454 (linux_resume_one_lwp): ... this. Adjust.
13455 (linux_set_resume_request, linux_continue_one_thread)
13456 (linux_queue_one_thread, resume_status_pending_p)
13457 (usr_store_inferior_registers, regsets_store_inferior_registers)
13458 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13459 Adjust.
13460 * linux-low.h (get_process): Rename to ...
13461 (get_lwp): ... this. Adjust.
13462 (get_thread_process): Rename to ...
13463 (get_thread_lwp): ... this. Adjust.
13464 (get_process_thread): Rename to ...
13465 (get_lwp_thread): ... this. Adjust.
13466 (struct process_info): Rename to ...
13467 (struct lwp_info): ... this.
13468 (all_processes): Rename to ...
13469 (all_lwps): ... this.
13470 * proc-service.c (ps_lgetregs): Adjust.
13471 * thread-db.c (thread_db_create_event, find_one_thread)
13472 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13473
0b16c5cf
PA
134742009-03-14 Pedro Alves <pedro@codesourcery.com>
13475
13476 * server.c (handle_query): Handle "qAttached".
13477
32de4b9d
NS
134782009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13479
13480 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13481 GPLv3, update license URL.
13482
2aecd87f
DE
134832009-03-01 Doug Evans <dje@google.com>
13484
93efd302 13485 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13486 (server_h): Add gdb_signals.h.
13487 (signals.o): Update.
13488 * server.h (target_signal_from_host,target_signal_to_host_p)
13489 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13490
86b1f9c5
PM
134912009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13492
13493 * remote-utils.c (getpkt): Also generate remote-debug
13494 information if noack_mode is set.
13495
4aa995e1
PA
134962009-02-06 Pedro Alves <pedro@codesourcery.com>
13497
13498 * server.c (handle_query): Report qXfer:siginfo:read and
13499 qXfer:siginfo:write as supported and handle them.
13500 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13501 * linux-low.c (linux_xfer_siginfo): New.
13502 (linux_target_ops): Set it.
13503
62709adf
PA
135042009-01-26 Pedro Alves <pedro@codesourcery.com>
13505
13506 * server.c (gdbserver_usage): Mention --remote-debug.
13507 (main): Accept '--remote-debug' switch.
13508
aef93bd7
DE
135092009-01-18 Doug Evans <dje@google.com>
13510
13511 * regcache.c (new_register_cache): No need to check result of xcalloc.
13512 * server.c (handle_search_memory): Back out calls to xmalloc,
13513 result is checked and error is returned to user upon failure.
13514 (handle_query): Ditto. Add more checks for result of malloc.
13515 (handle_v_cont): Check result of malloc, report error back to
13516 user upon failure.
13517 (handle_v_run): Ditto. Call freeargv.
13518 * server.h (freeargv): Declare.
13519 * utils.c (freeargv): New fn.
13520
54363045
DE
135212009-01-15 Doug Evans <dje@google.com>
13522
f626972c
DE
13523 * gdbreplay.c (perror_with_name): Make arg const char *.
13524 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13525 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13526 * utils.c (perror_with_name): Make arg const char *.
54363045 13527
18aae699
PA
135282009-01-14 Pedro Alves <pedro@codesourcery.com>
13529
13530 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13531 when handling a EXIT_PROCESS_DEBUG_EVENT.
13532
ff703abe
JB
135332009-01-06 Joel Brobecker <brobecker@adacore.com>
13534
13535 * gdbreplay.c (gdbreplay_version): Update copyright year.
13536 * server.c (gdbserver_version): Likewise.
13537
f21cc1a2 135382009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13539
13540 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13541 (handle_extended_wait): Improve comment.
0e21c1ec 13542
bca929d3
DE
135432008-12-13 Doug Evans <dje@google.com>
13544
13545 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13546 * server.h (ATTR_MALLOC): New macro.
13547 (xmalloc,xcalloc,xstrdup): Declare.
13548 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13549 * inferiors.c: Ditto.
13550 * linux-low.c: Ditto.
13551 * mem-break.c: Ditto.
13552 * regcache.c: Ditto.
13553 * remote-utils.c: Ditto.
13554 * server.c: Ditto.
13555 * target.c: Ditto.
13556 * win32-low.c: Ditto.
13557
97438e3f
DE
135582008-12-12 Doug Evans <dje@google.com>
13559
896c7fbb
DE
13560 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13561 in debugging printf.
13562
97438e3f
DE
13563 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13564
e3b886f8
DE
135652008-12-09 Doug Evans <dje@google.com>
13566
13567 * linux-low.h (struct process_info): Delete member tid, unused.
13568 * thread-db.c (find_one_thread): Update.
13569 (maybe_attach_thread): Update.
13570
07e059b5
VP
135712008-12-02 Pedro Alves <pedro@codesourcery.com>
13572
889bf7c5
PA
13573 * target.h (struct target_ops): Add qxfer_osdata member.
13574 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13575 and dirent.h.
13576 (linux_qxfer_osdata): New functions.
13577 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13578 callback.
13579 * server.c (handle_query): Handle "qXfer:osdata:read:".
13580 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13581 (buffer_xml_printf): New functions.
13582 * server.h (struct buffer): New.
13583 (buffer_grow_str, buffer_grow_str0): New macros.
13584 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13585 (buffer_xml_printf): Declare.
07e059b5 13586
4cab47ab
DE
135872008-11-24 Doug Evans <dje@google.com>
13588
13589 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13590
f142445f
DJ
135912008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13592
13593 * server.c (handle_v_run): Always use the supplied argument list.
13594
d0107bb6 135952008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13596
d0107bb6
BW
13597 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13598 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13599
2c4ad781
TJB
136002008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13601
13602 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13603 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13604 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13605 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13606 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13607 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13608 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13609 XML target descriptions.
13610 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13611 when inferior is running on an ISA 2.05 or later processor. Add
13612 special case to return offset for full 64-bit slot of FPSCR when
13613 in 32-bits.
13614
dfb64f85
DJ
136152008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13616
13617 * Makefile.in (SFILES, clean): Added sparc64 files.
13618 (reg-sparc64.o, reg-sparc64.c): New.
13619 * configure.srv (sparc*-*-linux*): New configuration.
13620 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13621 syscall arguments for SPARC.
13622 (regsets_store_inferior_registers): Likewise.
13623 * linux-sparc-low.c: New file.
13624
66b6e1dd
DE
136252008-10-21 Doug Evans <dje@google.com>
13626
13627 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13628 (READLINE_DIR,READLINE_DEP): Delete.
13629 (INTERNAL_CFLAGS): Update.
13630 (LINTFLAGS): Update.
13631
9b710a42
PA
136322008-10-10 Pedro Alves <pedro@codesourcery.com>
13633
13634 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13635 whole argv from the last run, not just argv[0].
13636
5822d809
PA
136372008-09-08 Pedro Alves <pedro@codesourcery.com>
13638
13639 * regcache.c (new_register_cache): Return NULL if the register
13640 cache size isn't known yet.
13641 (free_register_cache): Avoid dereferencing a NULL regcache.
13642
74aac56f
DJ
136432008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13644
13645 * configure.srv: Merge MIPS and MIPS64.
13646
400b20f5
MR
136472008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13648
13649 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13650
677c5bb1
LM
136512008-08-18 Luis Machado <luisgpm@br.ibm.com>
13652
13653 * Makefile.in: Add required vsx dependencies.
13654
13655 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13656 Declare init_registers_powerpc_vsx32l.
13657 Declare init_registers_powerpc_vsx64l.
13658 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13659 (ppc_arch_setup): Check for VSX in hwcap.
13660 (ppc_fill_vsxregset): New function.
13661 (ppc_store_vsxregset): New function.
13662 Add new VSX entry in regset_info target_regsets.
13663
13664 * configure.srv: Add new VSX dependencies.
13665
a6f3e723
SL
136662008-08-12 Pedro Alves <pedro@codesourcery.com>
13667
13668 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13669 (remote_open): Set or clear transport_is_reliable.
13670 (putpkt_binary): Don't expect acks in noack mode.
13671 (getpkt): Don't send ack/nac in noack mode.
13672 * server.c (handle_general_set): Handle QStartNoAckMode.
13673 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13674 qSupported.
13675 (main): Reset noack_mode on every connection.
13676 * server.h (noack_mode): Declare.
13677
a417dc56
RW
136782008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13679
13680 * Makefile.in (GDBREPLAY_OBS): New variable.
13681 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13682
3221518c
UW
136832008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13684 Daniel Jacobowitz <dan@codesourcery.com>
13685
13686 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13687 (usr_store_inferior_registers): Likewise.
13688 (regsets_store_inferior_registers): Likewise.
13689
ec56be1b
PA
136902008-07-31 Rolf Jansen <rj@surtec.com>
13691 Pedro Alves <pedro@codesourcery.com>
13692
13693 * configure.ac: Check for memmem declaration.
13694 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13695 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13696 (disable_packet_qfThreadInfo): Unconditionally compile.
13697 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13698 * configure, config.in: Regenerate.
13699
2fe5e3ff
DE
137002008-07-28 Doug Kwan <dougkwan@google.com>
13701
13702 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13703 (linux_write_memory): Remove declaration of errno.
13704
836acd6d
UW
137052008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13706
13707 * linux-low.c (handle_extended_wait): Do not use "status"
13708 variable uninitialized.
13709
aeba519e
PA
137102008-07-07 Pedro Alves <pedro@codesourcery.com>
13711
13712 * server.c (handle_v_attach): Inhibit reporting dll changes.
13713
db42f210
PA
137142008-06-27 Pedro Alves <pedro@codesourcery.com>
13715
13716 * remote-utils.c (prepare_resume_reply): If requested, don't
13717 output "thread:TID" in the T stop reply.
13718
13719 * server.c (disable_packet_vCont, disable_packet_Tthread)
13720 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13721 (handle_query): If requested, disable support for qC, qfThreadInfo
13722 and qsThreadInfo.
13723 (handle_v_requests): If requested, disable support for vCont.
13724 (gdbserver_show_disableable): New.
13725 (main): Handle --disable-packet and --disable-packet=LIST.
13726
13727 * server.h (disable_packet_vCont, disable_packet_Tthread)
13728 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13729
8e4c5421
CD
137302008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13731
13732 * server.c (gdbserver_usage): Mention --version.
13733
6e23a804
DJ
137342008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13735
13736 * Makefile.in (gdbreplay.o): New rule.
13737
90aa6a40
JM
137382008-06-06 Joseph Myers <joseph@codesourcery.com>
13739
13740 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13741 message, not gdbserver.
13742
c16158bc 137432008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13744 Nathan Sidwell <nathan@codesourcery.com>
13745 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13746
13747 * acinclude.m4: Include ../../config/acx.m4.
13748 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13749 * configure, config.in: Regenerate.
13750 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13751 * server.c (gdbserver_version): Print PKGVERSION.
13752 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13753 (main): Adjust gdbserver_usage calls.
13754 * gdbreplay.c (version, host_name): Add declarations.
13755 (gdbreplay_version, gdbreplay_usage): New.
13756 (main): Accept --version and --help options.
13757
aeb75bf5
DJ
137582008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13759
13760 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13761 (arm_breakpoint_at): Handle Thumb.
13762 (the_low_target): Add comment.
13763
76b233dd
UW
137642008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13765
13766 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13767
08388c79
DE
137682008-05-09 Doug Evans <dje@google.com>
13769
a3c83fae
DE
13770 * server.h (decode_search_memory_packet): Declare.
13771 * remote-utils.c (decode_search_memory_packet): New fn.
13772 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13773 (handle_search_memory): New fn.
13774 (handle_query): Process qSearch:memory packets.
13775
bb9c3d36
UW
137762008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13777
13778 * regcache.c (registers_length): Remove.
13779 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13780 full register packet.
13781 * regcache.h (registers_length): Remove prototype.
13782 * server.h (PBUFSIZ): Define to 16384.
13783
7284e1be
UW
137842008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13785
13786 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13787 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13788 powerpc-64l.o, and powerpc-altivec64l.o.
13789 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13790 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13791 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13792 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13793 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13794 to srv_xmlfiles.
13795
13796 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13797 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13798 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13799 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13800 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13801 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13802 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13803 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13804 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13805 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13806 (clean): Update.
13807
13808 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13809 (init_registers_powerpc_32l): ... this new prototype.
13810 (init_registers_powerpc_32): Remove, replace by ...
13811 (init_registers_powerpc_altivec32l): ... this new prototype.
13812 (init_registers_powerpc_e500): Remove, replace by ...
13813 (init_registers_powerpc_e500l): ... this new prototype.
13814 (init_registers_ppc64): Remove, replace by ...
13815 (init_registers_powerpc_64l): ... this new prototype.
13816 (init_registers_powerpc_64): Remove, replace by ...
13817 (init_registers_powerpc_altivec64l): ... this new prototype.
13818 (ppc_num_regs): Set to 73.
13819 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13820 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13821 (ppc_cannot_store_register): Handle orig_r3 and trap.
13822 (ppc_arch_setup): Update init_registers_... calls.
13823 (ppc_fill_gregset): Handle orig_r3 and trap.
13824
13825 * inferiors.c (clear_inferiors): Reset current_inferior.
13826
fdc59709
PB
138272008-04-23 Paolo Bonzini <bonzini@gnu.org>
13828
889bf7c5
PA
13829 * acinclude.m4: Add override.m4.
13830 * configure: Regenerate.
fdc59709 13831
c9b2f845
UW
138322008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13833
13834 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13835 initial call to init_register_ppc64.
13836
550512b8
UW
138372008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13838
43aaf8b6
PA
13839 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13840 single powerpc*-*-linux* case.
550512b8
UW
13841 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13842
b6430ec3
UW
138432008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13844
13845 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13846 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13847 from reg_xmlfiles.
13848 * linux-ppc-low.c: Include <elf.h>.
13849 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13850 (ppc_hwcap): New global variable.
13851 (ppc_regmap): Remove __SPE__ #ifdef sections.
13852 (ppc_regmap_e500): New global variable.
13853 (ppc_cannot_store_register): Update __SPE__ special case.
13854 (ppc_get_hwcap): New function.
13855 (ppc_arch_setup): Use it to determine whether inferior supports
13856 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13857 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13858 Do not access registers if target does not support AltiVec.
13859 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13860 Do not access registers if target does not support SPE.
13861 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13862
52fa2412
UW
138632008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13864
13865 * linux-low.c (disabled_regsets, num_regsets): New.
13866 (use_regsets_p): Delete.
13867 (linux_wait_for_process): Clear disabled_regsets.
13868 (regsets_fetch_inferior_registers): Check and set it.
13869 (regsets_store_inferior_registers): Likewise.
13870 (linux_fetch_registers, linux_store_registers): Do not use
13871 use_regsets_p.
13872 (initialize_low): Allocate disabled_regsets.
13873
e28b3332
DJ
138742008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13875
13876 * Makefile.in (LIBOBJS): New.
13877 (OBS): Use LIBOBJS.
13878 (memmem.o): New rule.
13879 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13880 * configure: Regenerated.
13881
4536995d
UW
138822008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13883
13884 * server.c (handle_query): Never return "unsupported" for
13885 qXfer:features:read queries.
13886
221c031f
UW
138872008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13888
13889 * server.c (get_features_xml): Fix inverted condition.
13890 (handle_query): Always support qXfer:feature:read.
13891
ccd213ac
DJ
138922008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13893
13894 * server.c (wrapper_argv): New.
13895 (start_inferior): Handle wrapper_argv. If set, expect an extra
13896 trap.
13897 (gdbserver_usage): Document --wrapper.
13898 (main): Parse --wrapper.
13899
6fe305f7
UW
139002008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13901
13902 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13903 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13904 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13905 (ppc_set_pc): Likewise.
13906 (ppc_arch_setup): New function.
13907 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13908 of collect_register.
889bf7c5 13909 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13910
5b0a002e
UW
139112008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13912
13913 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13914 instead of linux-ppc64-low.o.
13915 * linux-ppc64-low.c: Remove file.
13916 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13917 (linux-ppc64-low.o): Remove rule.
13918
13919 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13920 (init_registers_powerpc_64): Likewise.
13921 (ppc_regmap): Conditionally define depending on __powerpc64__.
13922 (ppc_cannot_store_register): Do not special-case "fpscr" when
13923 compiled on __powerpc64__.
13924 (ppc_collect_ptrace_register): New function.
13925 (ppc_supply_ptrace_register): New function.
13926 (ppc_breakpoint): Change type to "unsigned int".
13927 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13928 (the_low_target): Conditionally provide initializers for the
889bf7c5 13929 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13930 collect_ptrace_register and supply_ptrace_register members.
13931
9b4b61c8
UW
139322008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13933
13934 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13935 * server.c (gdbserver_xmltarget): Define.
13936 (get_features_xml): Use it to replace "target.xml" and arch_string.
13937
13938 * configure.srv: Remove srv_xmltarget. Add XML files that were
13939 mentioned there to srv_xmlfiles instead. Remove conditional tests
13940 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13941 srv_xmlfiles and srv_regobj to include all possible choices.
13942 * configure.ac (srv_xmltarget): Remove.
13943 (srv_xmlfiles): Do not add "target.xml".
13944 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13945 checks for supplementary target information.
13946 * configure: Regenerate.
13947 * Makefile.in (XML_TARGET): Remove.
13948 (target.xml): Remove rule.
13949 (clean): Do not clean up target.xml.
13950 (.PRECIOUS): Do not mention target.xml.
13951
13952 * target.h (struct target_ops): Remove arch_string member.
13953 * linux-low.c (linux_arch_string): Remove.
13954 (linux_target_ops): Remove arch_string initializer.
13955 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13956 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13957 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13958 * spu-low.c (spu_arch_string): Remove.
13959 (spu_target_ops): Remove arch_string initializer.
13960 * win32-low.c (win32_arch_string): Remove.
13961 (win32_target_ops): Remove arch_string initializer.
13962 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13963 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13964 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13965
ee1a7ae4
UW
139662008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13967
13968 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13969 by collect_ptrace_register and supply_ptrace_register hooks.
13970 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13971 instead of checking for the_low_target.left_pad_xfer.
13972 (usr_store_inferior_registers): Use collect_ptrace_register callback
13973 instead of checking for the_low_target.left_pad_xfer.
13974
13975 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13976 (s390_supply_ptrace_register): Likewise.
13977 (s390_fill_gregset): Call s390_collect_ptrace_register.
13978 (the_low_target): Update.
13979
13980 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13981 (ppc_supply_ptrace_register): Likewise.
13982 (the_low_target): Update.
13983
13984 * linux-i386-low.c (the_low_target): Update.
13985 * linux-x86-64-low.c (the_low_target): Update.
13986
d61ddec4
UW
139872008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13988
13989 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13990 reg-s390.o and reg-s390x.o.
13991
13992 * linux-low.c (new_inferior): New global variable.
13993 (linux_create_inferior, linux_attach): Set it.
13994 (linux_wait_for_process): Call the_low_target.arch_setup after the
13995 target has stopped for the first time.
13996 (initialize_low): Do not call the_low_target.arch_setup.
13997
13998 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13999 (s390_set_pc): Likewise.
14000 (s390_arch_setup): New function.
14001 (the_low_target): Use s390_arch_setup as arch_setup routine.
14002
14003 * regcache.c (realloc_register_cache): New function.
14004 (set_register_cache): Call it for each existing regcache.
14005
d05b4ac3
UW
140062008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14007
14008 * server.h (init_registers): Remove prototype.
14009
14010 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14011 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14012 instead of init_registers ().
14013 * linux-arm-low.c (init_registers_arm): Add prototype.
14014 (init_registers_arm_with_iwmmxt): Likewise.
14015 (the_low_target): Add initializer for arch_setup field.
14016 * linux-cris-low.c (init_registers_cris): Add prototype.
14017 (the_low_target): Add initializer for arch_setup field.
14018 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14019 (the_low_target): Add initializer for arch_setup field.
14020 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14021 (the_low_target): Add initializer for arch_setup field.
14022 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14023 (the_low_target): Add initializer for arch_setup field.
14024 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14025 (the_low_target): Add initializer for arch_setup field.
14026 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14027 (the_low_target): Add initializer for arch_setup field.
14028 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14029 (init_registers_mips64_linux): Likewise.
14030 (the_low_target): Add initializer for arch_setup field.
14031 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14032 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14033 (the_low_target): Add initializer for arch_setup field.
14034 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14035 (init_registers_powerpc_64): Likewise.
14036 (the_low_target): Add initializer for arch_setup field.
14037 * linux-s390-low.c (init_registers_s390): Add prototype.
14038 (init_registers_s390x): Likewise.
14039 (the_low_target): Add initializer for arch_setup field.
14040 * linux-sh-low.c (init_registers_sh): Add prototype.
14041 (the_low_target): Add initializer for arch_setup field.
14042 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14043 (the_low_target): Add initializer for arch_setup field.
14044 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14045 (the_low_target): Add initializer for arch_setup field.
14046
14047 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14048 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14049 instead of init_registers ().
14050 * win32-arm-low.c (init_registers_arm): Add prototype.
14051 (the_low_target): Add initializer for arch_setup field.
14052 * win32-i386-low.c (init_registers_i386): Add prototype.
14053 (the_low_target): Add initializer for arch_setup field.
14054
14055 * spu-low.c (init_registers_spu): Add prototype.
14056 (initialize_low): Call initialie_registers_spu () instead of
14057 initialize_registers ().
14058
fd96d250
PA
140592008-02-19 Pedro Alves <pedro@codesourcery.com>
14060
14061 * server.c (handle_v_requests): When handling the vRun and vAttach
14062 packets, if already debugging a process, don't kill it. Return an
14063 error instead.
14064
d41b6bb4
DJ
140652008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14066
14067 * server.c (handle_query): Correct length check.
14068
5ac588cf
PA
140692008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14070
14071 * win32-low.c (do_initial_child_stuff): Add process handle
14072 parameter. Set current_process_handle and current_process_id from the
14073 parameters. Clear globals.
14074 (win32_create_inferior): Don't set current_process_handle and
14075 current_process_id here. Instead pass them on the call to
14076 do_initial_child_stuff.
14077 (win32_attach): Likewise.
14078 (win32_clear_inferiors): New.
14079 (win32_kill): Don't close the current process handle or the
14080 current thread handle here. Instead call win32_clear_inferiors.
14081 (win32_detach): Don't open a new handle to the process. Call
14082 win32_clear_inferiors.
14083 (win32_join): Don't rely on current_process_handle; open a new
14084 handle using the process id.
14085 (win32_wait): Call win32_clear_inferiors when the inferior process
14086 has exited.
14087
ecd7ecbc
DJ
140882008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14089
14090 * server.c (monitor_show_help): Add "exit".
14091
1525d545
MG
140922008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14093
ecd7ecbc 14094 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14095 (clean): Add reg-xtensa.c.
14096 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14097 * configure.srv (xtensa*-*-linux*) New target.
14098 * linux-xtensa-low.c: New.
14099 * xtensa-xtregs.c: New.
1525d545 14100
59a016f0
PA
141012008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14102
14103 * hostio.c: Don't include errno.h.
14104 (errno_to_fileio_errno): Move to hostio-errno.
14105 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14106 error number outputting to the target->hostio_last_error callback.
14107 (hostio_packet_error): Use FILEIO_EINVAL directly.
14108 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14109 calls to hostio_error.
14110 * hostio-errno.c: New.
14111 * server.h (hostio_last_error_from_errno): Declare.
14112 * target.h (target_ops): Add hostio_last_error member.
14113 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14114 as hostio_last_error handler.
889bf7c5 14115 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14116 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14117 (wince_hostio_last_error): New functions.
14118 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14119 as hostio_last_error handler.
14120 (win32_target_ops) [!_WIN32_WCE]: Register
14121 hostio_last_error_from_errno as hostio_last_error handler.
14122 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14123 (hostio-errno.o): New rule.
14124 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14125 * configure.srv (srv_hostio_err_objs): New variable. Default to
14126 hostio-errno.o.
14127 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14128 * configure: Regenerate.
14129
2d717e4f
DJ
141302008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14131
14132 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14133 (linux_kill, linux_detach): Clean up the process list.
14134 * remote-utils.c (remote_open): Improve port number parsing.
14135 (putpkt_binary, input_interrupt): Only send interrupts if the target
14136 is running.
14137 * server.c (extended_protocol): Make static.
14138 (attached): Define earlier.
14139 (exit_requested, response_needed, program_argv): New variables.
14140 (target_running): New.
14141 (start_inferior): Clear attached here.
14142 (attach_inferior): Set attached here.
14143 (require_running): Define.
14144 (handle_query): Use require_running and target_running. Implement
14145 "monitor exit".
14146 (handle_v_attach, handle_v_run): New.
14147 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14148 (gdbserver_usage): Update.
14149 (main): Redo argument parsing. Handle --debug and --multi. Handle
14150 --attach along with other options or after the port. Save
14151 program_argv. Support no initial program. Resynchronize
14152 communication with GDB after an error. Handle "monitor exit".
14153 Use require_running and target_running. Always allow the extended
14154 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14155 restart in extended mode.
14156 * README: Refer to the GDB manual. Update --attach usage.
14157
7407e2de
AS
141582007-12-20 Andreas Schwab <schwab@suse.de>
14159
14160 * linux-low.c (STACK_SIZE): Define.
14161 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14162 (linux_test_for_tracefork): Likewise.
14163
b65d95c5
DJ
141642007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14165
14166 * linux-low.c (linux_wait_for_event): Update messages. Do not
14167 reinsert auto-delete breakpoints.
14168 * mem-break.c (struct breakpoint): Change return type of handler to
14169 int.
14170 (set_breakpoint_at): Update handler type.
14171 (reinsert_breakpoint_handler): Return 1 instead of calling
14172 delete_breakpoint.
14173 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14174 setting a new one.
14175 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14176 * mem-break.h (set_breakpoint_at): Update handler type.
14177 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14178 * win32-low.c (auto_delete_breakpoint): New.
14179 (get_child_debug_event): Use it.
14180
4e799345
DJ
141812007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14182
14183 * configure.ac: Check for pread and pwrite.
14184 * hostio.c (handle_pread): Fall back to lseek and read.
14185 (handle_pwrite): Fall back to lseek and write.
14186 * config.in, configure: Regenerated.
14187
27524b67
DJ
141882007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14189
14190 * server.c (myresume): Add own_buf argument.
14191 (main): Update calls.
14192
a20d5e98
DJ
141932007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14194
14195 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14196 * remote-utils.c (remote_open): Do not call disable_async_io.
14197 (block_async_io): Delete.
14198 (unblock_async_io): Make static.
14199 (initialize_async_io): New.
14200 * server.c (handle_v_cont): Handle async I/O here.
14201 (myresume): Likewise. Move other common resume tasks here...
14202 (main): ... from here. Call initialize_async_io. Disable async
14203 I/O before the main loop.
14204 * server.h (initialize_async_io): Declare.
14205 (block_async_io, unblock_async_io): Delete prototypes.
14206 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14207
b79d787e
DJ
142082007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14209
14210 * remote-utils.c (readchar): Allow binary data in received messages.
14211
d97903b2
PA
142122007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14213
14214 * win32-low.c (attaching): New global.
14215 (win32_create_inferior): Clear the `attaching' global.
14216 (win32_attach): Set the `attaching' global.
14217 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14218 attaching. Only set a breakpoint at the entry point if not
14219 attaching.
14220
311de423
PA
142212007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14222
14223 * server.c (main): Don't report dll events on the initial
14224 connection on attaches.
14225
6c2d16d2
PA
142262007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14227
14228 * server.c (main): Relax numerical bases supported for the pid of
14229 the --attach command line argument.
14230
5ca906e6
PA
142312007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14232
14233 * win32-low.c (win32_attach): Call OpenProcess before
14234 DebugActiveProcess, not after. Add last error output to error
14235 call.
14236
9c6c8194
PA
142372007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14238
14239 * win32-low.c (win32_get_thread_context)
14240 (win32_set_thread_context): New functions.
14241 (thread_rec): Use win32_get_thread_context.
14242 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14243 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14244 field.
14245
4d5d1aaa
PA
142462007-12-03 Leo Zayas
14247 Pedro Alves <pedro_alves@portugalmail.pt>
14248
14249 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14250 global variables.
14251 (child_add_thread): Minor cleanup.
14252 (child_continue): Resume artificially suspended threads before
14253 calling ContinueDebugEvent.
14254 (suspend_one_thread): New.
14255 (fake_breakpoint_event): New.
14256 (get_child_debug_event): Change return type to int. Check here if
14257 gdb sent an interrupt request. If a soft interrupt was requested,
14258 fake a breakpoint event. Return 0 if there is no event to handle,
14259 and 1 otherwise.
14260 (win32_wait): Don't check here if gdb sent an interrupt request.
14261 Ensure there is a valid event to handle.
14262 (win32_request_interrupt): Add soft interruption method as last
14263 resort.
14264
c436e841
PA
142652007-12-03 Leo Zayas
14266 Pedro Alves <pedro_alves@portugalmail.pt>
14267
14268 * win32-low.h (win32_thread_info): Add descriptions to the
14269 structure members. Replace `suspend_count' counter by a
14270 `suspended' flag.
14271 * win32-low.c (thread_rec): Update condition of when to get the
14272 context from the inferior. Rely on ContextFlags being set if it
14273 has already been retrieved. Only suspend the inferior thread if
14274 we haven't already. Warn if that fails.
14275 (continue_one_thread): s/suspend_count/suspended/. Only call
14276 ResumeThread once. Warn if that fails.
14277
e7b5fa67
PA
142782007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14279
14280 * win32-low.c (win32_wait): Don't read from the inferior when it
14281 has already exited.
14282
a385171d
PA
142832007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14284
14285 * Makefile.in (win32_low_h): New variable.
14286 (win32-low.o): Add dependency on $(win32_low_h).
14287 (win32-arm-low.o, win32-i386-low.o): New rules.
14288
f80c84b3
DJ
142892007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14290
14291 * hostio.c: Correct copyright year.
14292
a6b151f1
DJ
142932007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14294
14295 * Makefile.in (OBS): Add hostio.o.
14296 (hostio.o): New rule.
14297 * server.h (handle_vFile): Declare.
14298 * hostio.c: New file.
14299 * server.c (handle_v_requests): Take packet_len and new_packet_len
14300 for binary packets. Call handle_vFile.
14301 (main): Update call to handle_v_requests.
14302
f9387fc3
DJ
143032007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14304
14305 * linux-low.c: Include <sched.h>.
14306
51c2684e
DJ
143072007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14308
14309 * linux-low.c (linux_tracefork_grandchild): New.
14310 (linux_tracefork_child): Use clone.
14311 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14312
75f83163
JB
143132007-10-31 Joel Brobecker <brobecker@adacore.com>
14314
14315 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14316
da5898ce
DJ
143172007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14318
14319 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14320
24a09b5f
DJ
143212007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14322
14323 * inferiors.c (change_inferior_id): Delete.
14324 (add_pid_to_list, pull_pid_from_list): New.
14325 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14326 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14327 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14328 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14329 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14330 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14331 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14332 (using_threads): Always set to 1.
14333 (handle_extended_wait): New.
14334 (add_process): Do not set TID.
14335 (linux_create_inferior): Set must_set_ptrace_flags.
14336 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14337 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14338 (linux_thread_alive): Rename TID argument to LWPID.
14339 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14340 (linux_wait_for_event): Do not use TID or check using_threads. Update
14341 call to dead_thread_notify. Call handle_extended_wait.
14342 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14343 (send_sigstop): Delete sigstop_sent.
14344 (wait_for_sigstop): Avoid TID.
14345 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14346 (linux_test_for_tracefork): New.
14347 (linux_lookup_signals): Use thread_db_active and
14348 linux_supports_tracefork_flag.
14349 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14350 * linux-low.h (get_process_thread): Avoid TID.
14351 (struct process_ifo): Move thread_known and tid to the end. Remove
14352 sigstop_sent.
14353 (linux_attach_lwp, thread_db_init): Update prototypes.
14354 * server.h (change_inferior_id): Delete prototype.
14355 (add_pid_to_list, pull_pid_from_list): New prototypes.
14356 * thread-db.c (thread_db_use_events): New.
14357 (find_first_thread): Rename to...
14358 (find_one_thread): ...this. Update callers and messages. Do not
14359 call fatal. Check thread_db_use_events. Do not call
14360 change_inferior_id or new_thread_notify.
14361 (maybe_attach_thread): Update. Do not call new_thread_notify.
14362 (thread_db_init): Set thread_db_use_events. Check use_events.
14363 * utils.c (fatal, warning): Correct message prefix.
14364
30ed0a8f
DJ
143652007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14366
14367 * Makefile.in (clean): Remove new files.
14368 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14369 (powerpc-64.o, powerpc-64.c): New rules.
14370 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14371 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14372 with SPE.
14373 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14374 SPE targets.
14375 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14376 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14377 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14378 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14379 (target_regsets): Add AltiVec and SPE register sets.
14380 * configure.ac: Check for AltiVec and SPE.
14381 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14382 (ppc_fill_vrregset, ppc_store_vrregset): New.
14383 (target_regsets): Add AltiVec register set.
14384 * configure: Regenerated.
14385
fd462a61
DJ
143862007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14387
14388 * linux-low.c (O_LARGEFILE): Define.
14389 (linux_read_memory): Use /proc/PID/mem.
14390 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14391 * configure, config.in: Regenerated.
14392
69f223ed
DJ
143932007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14394
14395 * linux-low.c (linux_wait_for_event): Do not pass signals while
14396 single-stepping.
14397
aec18585
PA
143982007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14399
14400 * win32-low.c (create_process): New.
14401 (win32_create_inferior): Use create_process instead of
14402 CreateProcess. If create_process failed retry appending an ".exe"
14403 suffix. Store the GetLastError result immediatelly after
14404 create_process calls and use it on the call to error.
14405
34d86ddd
PA
144062007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14407
14408 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14409
5a0e3bd0
JB
144102007-08-23 Joel Brobecker <brobecker@adacore.com>
14411
14412 * configure.ac: Switch license to GPLv3.
14413
f88c79e6
MS
144142007-08-01 Michael Snyder <msnyder@access-company.com>
14415
14416 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14417
6b3d9b83
PA
144182007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14419
14420 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14421 typedef.
14422 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14423 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14424 CloseToolhelp32Snapshot.
14425 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14426 CloseToolhelp32Snapshot.
14427
c588c53c
MS
144282007-07-27 Michael Snyder <michael.snyder@access-company.com>
14429
14430 * server.c (main): Check for inferior exit before main loop.
14431
aa0403d9
PA
144322007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14433
14434 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14435 instead of on tmp_desc.
14436
255e7678
DJ
144372007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14438 Daniel Jacobowitz <dan@codesourcery.com>
14439
14440 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14441 (add_thread): Minor cleanups.
14442 (clear_inferiors): Move lower in the file. Clear the DLL
14443 list.
14444 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14445 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14446 (xml_escape_text): New.
14447 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14448 for qSupported.
14449 (handle_v_cont): Report errors.
14450 (gdbserver_version): Update.
14451 (main): Correct size of own_buf. Do not report initial DLL events.
14452 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14453 (unloaded_dll, xml_escape_text): New.
14454 * win32-low.c (enum target_waitkind): Update comments.
14455 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14456 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14457 (win32_EnumProcessModules, win32_GetModuleInformation)
14458 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14459 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14460 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14461 (win32_Module32First, win32_Module32Next, load_toolhelp)
14462 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14463 (get_child_debug_event): Handle DLL events.
14464 (win32_wait): Likewise.
14465
0d37add9
DJ
144662007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14467
14468 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14469 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14470
45e2715e
PA
144712007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14472
14473 * win32-low.c (handle_output_debug_string): Ignore event if not
14474 waiting.
14475
c5674cf1
PA
144762007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14477
14478 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14479
2bbe3cc1
DJ
144802007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14481
14482 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14483
ae13219e
DJ
144842007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14485
14486 * inferiors.c (change_inferior_id): Add comment.
14487 * linux-low.c (check_removed_breakpoint): Add an early
14488 prototype. Improve debug output.
14489 (linux_attach): Doc update.
14490 (linux_detach_one_process, linux_detach): Clean up before releasing
14491 each process.
14492 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14493 * linux-low.h (struct process_info): Doc improvement.
14494 * mem-break.c (delete_all_breakpoints): New.
14495 * mem-break.h (delete_all_breakpoints): New prototype.
14496 * thread-db.c (find_first_thread): New.
14497 (thread_db_create_event): Call it instead of
14498 thread_db_find_new_threads. Clean up unused variables.
14499 (maybe_attach_thread): Remove first thread handling.
14500 (thread_db_find_new_threads): Use find_first_thread.
14501 (thread_db_get_tls_address): Likewise.
14502
4105de34
DJ
145032007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14504
14505 * thread-db.c (thread_db_find_new_threads): Add prototype.
14506 (thread_db_create_event): Check for the main thread before adding
14507 a new thread.
14508 (maybe_attach_thread): Only enable event reporting if TID == 0.
14509 (thread_db_get_tls_address): Check for new threads.
14510
2b876972
DJ
145112007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14512
14513 * linux-low.c (linux_create_inferior): Try execv before execvp.
14514 * spu-low.c (spu_create_inferior): Likewise.
14515
7a245884
DJ
145162007-06-13 Mike Frysinger <vapier@gentoo.org>
14517
14518 * linux-low.c (linux_create_inferior): Change execv to execvp.
14519 * spu-low.c (spu_create_inferior): Likewies.
14520
117ce543
DJ
145212007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14522
14523 * Makefile.in (clean): Clean new files instead of deleted ones.
14524 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14525 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14526 rules.
14527 * configure.srv: Specify XML files and new regformats for MIPS and
14528 MIPS64 GNU/Linux.
14529 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14530 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14531 an entry for the restart register.
14532 (mips_cannot_fetch_register, mips_cannot_store_register)
14533 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14534 register names to match the XML descriptions.
14535 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14536 restart register instead of $0.
14537
0e7f50da
UW
145382007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14539 Markus Deuling <deuling@de.ibm.com>
14540
14541 * remote-utils.c (decode_xfer_write): New function.
14542 * server.h (decode_xfer_write): Add prototype.
14543 * server.c (handle_query): Add PACKET_LEN argument. Support
14544 qXfer:spu:read and qXfer:spu:write packets.
14545 (main): Pass packet_len to handle_query.
14546 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14547 * target.h (target_ops): Add qxfer_spu.
14548
374c1d38
UW
145492007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14550
14551 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14552 accessing non-seekable spufs files.
14553
bb63802a
UW
145542007-05-16 Markus Deuling <deuling@de.ibm.com>
14555
889bf7c5 14556 * server.c (handle_query): Add reply for qC packet.
bb63802a 14557
7390519e
PA
145582007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14559 Leo Zayas <lerele@champenstudios@com>
14560
14561 * server.h (check_remote_input_interrupt_request): New function.
14562 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14563 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14564 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14565 (check_remote_input_interrupt_request): New function.
14566 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14567 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14568 winapi_GenerateConsoleCtrlEvent): New typedefs.
14569 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14570 to 250 ms.
14571 (win32_wait): Check for remote interrupt request
14572 with check_remote_input_interrupt_request.
14573 (win32_request_interrupt): New function.
14574 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14575
34b34921
PA
145762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14577
14578 * win32-low.c (debug_registers_changed,
14579 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14580 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14581 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14582 (thread_rec): Get context using the low target.
14583 (child_add_thread): Call thread_added on the low target,
14584 which does the same thing.
14585 (regptr): Delete.
14586 (do_initial_child_stuff): Remove debug registers references.
14587 Set context using the low target. Resume threads after
14588 setting the contexts.
14589 (child_continue): Remove dead variable. Remove debug
14590 registers references.
14591 (child_fetch_inferior_registers): Go through the low target.
14592 (do_child_store_inferior_registers): Remove.
14593 (child_store_inferior_registers): Go through the low target.
14594 (win32_resume): Remove debug registers references.
14595 Set context using the low target.
14596 (handle_exception): Change return type to void. Don't record
14597 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14598 first chance exception.
889bf7c5 14599 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14600 goto loop. Always return after waiting for debug event.
14601 (win32_wait): Convert to switch statement. Handle spurious
14602 events.
14603
14604 * win32-i386-low.c (debug_registers_changed,
14605 debug_registers_used): New.
14606 (initial_stuff): Rename to ...
14607 (i386_initial_stuff): ... this. Clear debug registers
14608 state variables.
14609 (store_debug_registers): Delete.
14610 (i386_get_thread_context): New.
14611 (load_debug_registers): Delete.
14612 (i386_set_thread_context): New.
14613 (i386_thread_added): New.
14614 (single_step): Rename to ...
14615 (i386_single_step): ... this.
14616 (do_fetch_inferior_registers): Rename to ...
14617 (i386_fetch_inferior_register): ... this.
14618 (i386_store_inferior_register): New.
14619 (the_low_target): Adapt to new interface.
14620
14621 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14622 (arm_get_thread_context): New.
14623 (arm_set_thread_context): New.
14624 (regptr): New.
14625 (do_fetch_inferior_registers): Rename to ...
14626 (arm_fetch_inferior_register): ... this.
14627 (arm_store_inferior_register): New.
14628 (arm_wince_breakpoint): Reimplement as unsigned long.
14629 (arm_wince_breakpoint_len): Define.
14630 (the_low_target): Adapt to new interface.
14631
14632 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14633 load_debug_registers. Add get_thread_context, set_thread_context,
14634 thread_added and store_inferior_register. Rename
14635 fetch_inferior_registers to fetch_inferior_register.
14636 (regptr): Remove declaration.
14637
dd6953e1
PA
146382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14639
14640 * linux-low.c (linux_detach): Change return type to int. Return 0.
14641 * spu-low.c (spu_detach): Likewise.
14642
444d6139
PA
146432007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14644
14645 * target.h (target_ops): Change return type of detach to int.
14646 Add join.
14647 (join_inferior): New.
14648 * server.c (main): Don't skip detach support on mingw32.
14649 If the inferior doesn't support detaching return error.
14650 Call join_inferior instead of using waitpid.
14651 * linux-low.c (linux_join): New.
14652 (linux_target_op): Add linux_join.
14653 * spu-low.c (spu_join): New.
14654 (spu_target_ops): Add spu_join.
14655 * win32-low.c (win32_detach): Adapt to new interface.
14656 Reopen current_process_handle before detaching. Issue a child
14657 resume before detaching.
14658 (win32_join): New.
14659 (win32_target_op): Add win32_join.
14660
1d5315fe
PA
146612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14662
14663 * win32-low.c (win32-attach): Fix return value.
14664 * target.h (target_ops): Describe ATTACH return values.
14665
bf914831
PA
146662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14667
14668 * win32-low.c (GETPROCADDRESS): Define.
14669 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14670 (winapi_DebugSetProcessKillOnExit): Likewise.
14671 (win32_create_inferior): Force usage of ansi CreateProcessA.
14672 (win32_attach): Use GETPROCADDRESS.
14673 (win32_detach): Likewise.
14674
f72f3e60
PA
146752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14676
14677 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14678
ed50f18f
PA
146792007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14680
14681 * win32-low.c: Commit leftover changes from 2007-03-29.
14682
0c2ead7e
DJ
146832007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14684
14685 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14686 fields short instead of int. Add explicit padding.
14687 (i387_cache_to_fsave): Remove unnecessary casts.
14688 (i387_fsave_to_cache): Doc fix.
14689 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14690
73725ff3
DJ
146912007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14692
14693 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14694 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14695
d99f33d8
PA
146962007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14697
14698 * configure.srv (arm*-*-mingw32ce*): Move near the other
14699 arm targets.
14700
68070c10
PA
147012007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14702
2482afc6 14703 * configure.ac: Add errno checking.
68070c10
PA
14704 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14705 sys/file.h and malloc.h.
14706 (AC_CHECK_DECLS): Add perror.
14707 (srv_mingwce): Handle.
2482afc6 14708 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14709 win32-i386-low.o to srv_tgtobj.
14710 (i[34567]86-*-mingw*): Likewise.
14711 (arm*-*-mingw32ce*): Add case.
14712 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14713 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14714 [__MINGW32CE__] (strerror): New function.
14715 [__MINGW32CE__] (errno): Define to GetLastError.
14716 [__MINGW32CE__] (COUNTOF): New macro.
14717 (remote_open): Remove extra close call.
14718 * mem-break.c (delete_breakpoint_at): New function.
14719 * mem-break.h (delete_breakpoint_at): Declare.
14720 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14721 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14722 [USE_WIN32API] (read, write): Add char* casts.
14723 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14724 * server.h: Include wincecompat.h on Windows CE.
14725 [HAVE_ERRNO_H]: Check.
14726 (perror): Declare if not declared.
14727 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14728 (perror_with_name): Remove errno declaration.
14729 * wincecompat.h: New.
14730 * wincecompat.c: New.
14731 * win32-low.h: New.
14732 * win32-arm-low.c: New.
14733 * win32-i386-low.c: New.
14734 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14735 (OUTMSG2): Make it safe.
14736 (_T): New macro.
14737 (COUNTOF): New macro.
14738 (NUM_REGS): Get it from the low target.
14739 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14740 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14741 (thread_rec): Let low target handle debug registers.
14742 (child_add_thread): Likewise.
14743 (child_init_thread_list): Likewise.
14744 (continue_one_thread): Likewise.
14745 (regptr): New.
14746 (do_child_fetch_inferior_registers): Move to ...
14747 * win32-i386-low.c: ... here, and rename to ...
14748 (do_fetch_inferior_registers): ... this.
889bf7c5 14749 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14750 Go through the low target.
14751 (do_child_store_inferior_registers): Use regptr.
14752 (strwinerror): New function.
14753 (win32_create_inferior): Handle Windows CE.
14754 Use strwinerror instead of strerror on Windows error
14755 codes. Add program to the error output.
14756 Don't close the main thread handle on Windows CE.
14757 (win32_attach): Use coredll.dll on Windows CE.
14758 (win32_kill): Close current process and current
14759 thread handles.
14760 (win32_detach): Use coredll.dll on Windows CE.
14761 (win32_resume): Let low target handle debug registers, and
14762 step request.
14763 (handle_exception): Add/Remove initial breakpoint. Avoid
14764 non-existant WSTOPSIG on Windows CE.
14765 (win32_read_inferior_memory): Cast to remove warning.
14766 (win32_arch_string): Go through the low target.
14767 (initialize_low): Call set_breakpoint_data with the low
14768 target's breakpoint.
14769 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14770 FOP_REGNUM, mappings): Move to ...
14771 * win32-i386-low.c: ... here.
14772 * win32-low.c (win32_thread_info): Move to ...
14773 * win32-low.h: ... here.
14774 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14775 win32-arm-low.c and wincecompat.c.
14776 (all:): Add $EXEEXT.
14777 (install-only:): Likewise.
14778 (gdbserver:): Likewise.
14779 (gdbreplay:): Likewise.
14780 * config.in: Regenerate.
14781 * configure: Regenerate.
14782
41093d81
PA
147832007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14784
14785 * win32-low.c: Rename typedef thread_info to
14786 win32_thread_info throughout.
14787
544afa54
PA
147882007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14789
14790 * win32-i386-low.c: Rename to ...
14791 * win32-low.c: ... this.
14792 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14793 * Makefile.in: Likewise.
14794
bce7165d
PA
147952007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14796
14797 * remote-utils.c (monitor_output): Constify msg parameter.
14798 * server.h (monitor_output): Likewise.
14799 * win32-i386-low.c (handle_output_debug_string): New.
14800 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14801 handle_output_debug_string.
14802 (get_child_debug_event): Likewise.
14803
506c7aa0
DJ
148042007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14805
14806 * server.c (main): Correct strtoul check.
14807
42c81e2a
DJ
148082007-03-27 Jon Ringle <jon@ringle.org>
14809
14810 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14811
9453113a
DJ
148122007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14813
14814 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14815
64a69107
DJ
148162007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14817
14818 * terminal.h: Check HAVE_SGTTY_H.
14819
148202007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14821
14822 * remote-utils.c (remote_open): Print out the assigned port number.
14823
c74d0ad8
DJ
148242007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14825
14826 * remote-utils.c (monitor_output): New function.
14827 * server.c (debug_threads): Define here.
14828 (monitor_show_help): New function.
14829 (handle_query): Handle qRcmd.
14830 (main): Do not handle 'd' packet.
14831 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14832 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14833 of debug_threads.
14834
de7c3b4a
PA
148352007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14836
14837 * Makefile.in (EXEEXT): New.
14838 (clean): Use $(EXEEXT).
14839
ef57601b
PA
148402007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14841
14842 * target.h (target_ops): Rename send_signal to request_interrupt,
14843 and remove enum target_signal parameter.
14844 * linux-low.c (linux_request_interrupt): Rename from
14845 linux_send_signal, and always send SIGINT.
14846 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14847 and always send SIGINT.
14848 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14849 of send_signal.
14850 (input_interrupt): Likewise.
14851
820f2bda
PA
148522007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14853
14854 * server.c (get_features_xml): Check if target implemented
14855 arch_string.
14856 * win32-i386-low.c (win32_arch_string): New.
14857 (win32_target_ops): Add win32_arch_string as arch_string member.
14858
ab39bf24
UW
148592007-02-22 Markus Deuling <deuling@de.ibm.com>
14860
14861 * spu-low.c (spu_arch_string): New.
14862 (spu_target_ops): Add spu_arch_string.
14863
61ff6e04
DJ
148642007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14865
14866 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14867 * configure.ac: Do not check for terminal.h.
14868 * configure, config.in: Regenerated.
14869
fb1e4ffc
DJ
148702007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14871
14872 * Makefile.in (OBS): Add $(XML_BUILTIN).
14873 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14874 (clean): Update.
14875 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14876 (arm-with-iwmmxt.c): New.
14877 * config.in, configure: Regenerate.
14878 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14879 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14880 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14881 (arm*-*-linux*): Add iWMMXt and regset support.
14882 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14883 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14884 (arm_store_wmmxregset, target_regsets): New.
14885 * server.c (get_features_xml): Take annex argument. Check builtin
14886 XML documents.
14887 (handle_query): Handle multiple annexes.
14888
0f48aa01
DJ
148892007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14890
14891 * remote-utils.c [USE_WIN32API] (read, write): Define.
14892 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14893 write.
14894
23181151
DJ
148952007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14896
14897 * linux-i386-low.c (the_low_target): Set arch_string.
14898 * linux-x86-64-low.c (the_low_target): Likewise.
14899 * linux-low.c (linux_arch_string): New.
14900 (linux_target_ops): Add it.
14901 * linux-low.h (struct linux_target_ops): Add arch_string.
14902 * server.c (write_qxfer_response): Use const void * for DATA.
14903 (get_features_xml): New.
14904 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14905 * target.h (struct target_ops): Add arch_string method.
14906
9d606399
DJ
149072007-01-03 Denis Pilat <denis.pilat@st.com>
14908 Daniel Jacobowitz <dan@codesourcery.com>
14909
14910 * linux-low.c (linux_kill): Handle being called with no threads.
14911 * win32-i386-low.c (win32_kill): Likewise.
14912 (get_child_debug_event): Clear current_process_handle.
14913
149142006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14915 Daniel Jacobowitz <dan@codesourcery.com>
14916
14917 * remote-utils.c (remote_open): Check the type of specified
14918 serial port devices before opening them.
14919 * server.c (main): Kill the inferior if an error occurs during
14920 the first remote_open.
14921
a5e13d24
DJ
149222006-12-05 Markus Deuling <deuling@de.ibm.com>
14923
14924 * README: Update supported targets.
14925
186947f7
DJ
149262006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14927
14928 * Makefile.in (clean): Remove reg-mips64.c.
14929 (reg-mips64.c, reg-mips64.o): New rules.
14930 * configure.srv: Handle mips64. Include regset support for mips.
14931 * linux-mips-low.c (union mips_register): New.
14932 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14933 (mips_breakpoint, mips_breakpoint_at): Use int.
14934 (mips_collect_register, mips_supply_register)
14935 (mips_collect_register_32bit, mips_supply_register_32bit)
14936 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14937 (mips_store_fpregset, target_regsets): New.
14938 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14939
a13e2c95
UW
149402006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14941
14942 * configure.srv: Add target "spu*-*-*".
14943 * Makefile.in (clean): Remove reg-spu.c.
14944 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14945 * spu-low.c: New file.
14946
cb7283db
DJ
149472006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14948
14949 * configure.ac: Correct td_thr_tls_get_addr test.
14950 * configure: Regenerated.
14951
89be2091
DJ
149522006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14953
14954 * linux-low.c (linux_wait_for_event): Reformat. Use the
14955 pass_signals array.
14956 * remote-utils.c (decode_address_to_semicolon): New.
14957 * server.c (pass_signals, handle_general_set): New.
14958 (handle_query): Mention QPassSignals for qSupported.
14959 (main): Call handle_general_set.
14960 * server.h (pass_signals, decode_address_to_semicolon): New.
14961
000ef4f0
DJ
149622006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14963
14964 * server.c (handle_query): Correct error handling for read_auxv.
14965
b7149293
UW
149662005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14967
14968 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14969 and srv_linux_thread_db to yes.
14970 * linux-s390-low.c (s390_fill_gregset): New function.
14971 (target_regsets): Define data structure.
14972
dae5f5cf
DJ
149732006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14974
14975 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14976 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14977 * config.in, configure: Regenerated.
14978 * inferiors.c (gdb_id_to_thread): New function.
14979 (gdb_id_to_thread_id): Use it.
14980 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14981 * linux-low.h (struct process_info): Add th member.
14982 (thread_db_get_tls_address): New prototype.
14983 * remote-utils.c (decode_address): Make non-static.
14984 * server.c (handle_query): Handle qGetTLSAddr.
14985 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14986 * target.h (struct target_ops): Add get_tls_address.
14987 * thread-db.c (maybe_attach_thread): Save the thread handle.
14988 (thread_db_get_tls_address): New.
14989
32ca6d61
DJ
149902006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14991
14992 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14993 (linux_resume_one_process): Take a siginfo_t *. Update all
14994 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14995 (struct pending_signals): Add a siginfo_t.
14996 (linux_wait_for_process): Always set last_status.
14997 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14998 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14999 * linux-low.h (struct process_info): Add last_status.
15000
5ffff7c1
DJ
150012006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15002
15003 * remote-utils.c (try_rle): New function.
15004 (putpkt_binary): Use it.
15005
8695c747
DJ
150062006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15007
15008 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15009 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15010 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15011 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15012 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15013 point registers.
15014
290fadea
RS
150152006-08-08 Richard Sandiford <richard@codesourcery.com>
15016
15017 * server.c (terminal_fd): New variable.
15018 (old_foreground_pgrp): Likewise.
15019 (restore_old_foreground_pgrp): New function.
15020 (start_inferior): Record the terminal file descriptor in terminal_fd
15021 and its original foreground group in old_foreground_pgrp. Register
15022 restore_old_foreground_pgrp with atexit().
15023
9f2e1e63
DJ
150242006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15025
15026 * server.c (handle_query): Correct qPart to qXfer.
15027
b80864fb
DJ
150282006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15029
15030 * configure.ac: Check for more headers which are missing on
15031 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15032 * configure.srv: Add Cygwin and mingw32.
15033 * remote-utils.c: Don't include headers unconditionally which
15034 are missing on mingw32. Include <winsock.h> for mingw32.
15035 (remote_open): Adjust for mingw32 support. Flush
15036 standard error after writing to it.
15037 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15038 (unblock_async_io, enable_async_io, disable_async_io)
15039 (readchar, getpkt): Update for Winsock support.
15040 (prepare_resume_reply): Expect a protocol signal number.
15041 * server.c: Disable <sys/wait.h> on mingw32.
15042 (start_inferior): Adjust for mingw32 support. Flush
15043 standard error after writing to it.
15044 (attach_inferior): Likewise. Use protocol signal
15045 numbers.
15046 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15047 and names.
15048 * win32-i386-low.c: New file.
15049 * Makefile.in (XM_CLIBS): Set.
15050 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15051 (win32-i386-low.o): New dependency rule.
15052 * linux-low.c (linux_wait): Use target signal numbers.
15053 * target.h (struct target_ops): Doc fix.
15054 * server.h (target_signal_to_name): New prototype.
15055 * gdbreplay.c: Don't include headers unconditionally which
15056 are missing on mingw32. Include <winsock.h> for mingw32.
15057 (remote_close, remote_open): Adjust for Winsock support.
15058 * configure, config.in: Regenerated.
15059
0876f84a
DJ
150602006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15061
15062 * server.c (decode_xfer_read, write_qxfer_response): New.
15063 (handle_query): Take a packet length argument. Handle
15064 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15065 the qSupported response.
15066 (main): Update call to handle_query.
15067
01f9e8fa
DJ
150682006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15069
15070 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15071 (putpkt_binary): Renamed from putpkt and adjusted for binary
15072 data.
15073 (putpkt): New wrapper for putpkt_binary.
15074 (readchar): Don't mask off the high bit.
15075 (decode_X_packet): New function.
15076 * server.c (main): Call putpkt_binary if a handler sets the packet
15077 length. Save the length of the incoming packet. Handle 'X'.
15078 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15079
be2a5f71
DJ
150802006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15081
15082 * server.c (handle_query): Handle qSupported.
15083
ea025f5f
DJ
150842006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15085
15086 * remote-utils.c (all_symbols_looked_up): New variable.
15087 (look_up_one_symbol): Check it.
15088 * server.h (look_up_one_symbol): New declaration.
15089 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15090
9308fc88
DJ
150912006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15092
15093 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15094 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15095 (PTRACE_GET_THREAD_AREA): Define.
15096 (ps_get_thread_area): New function.
15097
52fb6437
NS
150982006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15099
15100 * configure.srv (m68k*-*-uclinux*): New target.
15101 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15102 (linux_resume_one_process): Remove extraneous cast.
15103 (linux_read_offsets): New.
15104 (linux_target_op): Add linux_read_offsets on mmuless systems.
15105 * server.c (handle_query): Add qOffsets logic.
15106 * target.h (struct target_ops): Add read_offsets.
15107
21b0f40c
DJ
151082006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15109
15110 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15111 (PTRACE_GET_THREAD_AREA): Define.
15112 (ps_get_thread_area): New function.
15113 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15114 (linux-x86-64-low.o): Update.
15115
0050a760
DJ
151162006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15117
15118 * configure.ac: Remove checks for prfpregset_t.
15119 * gdb_proc_service.h: New file.
15120 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15121 new "gdb_proc_service.h".
15122 * proc-service.c: Likewise.
15123 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15124 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15125 * Makefile.in (gdb_proc_service_h): Updated.
15126 * configure, config.in: Regenerated.
15127
b92a518e
DJ
151282006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15129
15130 * remote-utils.c (prepare_resume_reply): Move declaration
15131 of gdb_id_from_wait to the top of the block.
15132
545587ee
DJ
151332006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15134
15135 * linux-low.c (regsets_store_inferior_registers): Read the regset
15136 from the target before filling it.
15137
9db87ebd
DJ
151382006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15139
15140 * server.c (attach_inferior): Return SIGTRAP for a successful
15141 attach.
15142
dd24457d
DJ
151432006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15144
15145 * Makefile.in (OBS): Add version.o.
15146 (STAGESTUFF): Delete.
15147 (version.o): Add dependencies.
15148 (version.c): Replace rule.
15149 (clean): Remove version.c.
15150 * server.c (gdbserver_version): New.
15151 (gdbserver_usage): Use printf.
15152 (main): Handle --version and --help.
15153 * server.h (version, host_name): Add declarations.
15154
6f0f660e
EZ
151552005-12-23 Eli Zaretskii <eliz@gnu.org>
15156
889bf7c5
PA
15157 * linux-arm-low.c:
15158 * linux-arm-low.c:
15159 * inferiors.c:
15160 * i387-fp.h:
15161 * i387-fp.c:
15162 * gdbreplay.c:
15163 * regcache.c:
15164 * proc-service.c:
15165 * mem-break.h:
15166 * mem-break.c:
15167 * linux-x86-64-low.c:
15168 * linux-sh-low.c:
15169 * linux-s390-low.c:
15170 * linux-ppc64-low.c:
15171 * linux-ppc-low.c:
15172 * linux-mips-low.c:
15173 * linux-m68k-low.c:
15174 * linux-m32r-low.c:
15175 * linux-low.h:
15176 * linux-low.c:
15177 * linux-ia64-low.c:
15178 * linux-i386-low.c:
15179 * linux-crisv32-low.c:
15180 * thread-db.c:
15181 * terminal.h:
15182 * target.h:
15183 * target.c:
15184 * server.h:
15185 * server.c:
15186 * remote-utils.c:
15187 * regcache.h:
15188 * utils.c:
15189 * Makefile.in:
15190 * configure.ac:
6f0f660e
EZ
15191 * gdbserver.1: Add (C) after Copyright. Update the FSF
15192 address.
15193
9d1fb177
DJ
151942005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15195
15196 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15197 (arm_breakpoint_at): Recognize both breakpoints.
15198 (the_low_target): Use the correct breakpoint instruction.
15199
011a70c2
DJ
152002005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15201
15202 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15203 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15204 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15205 (the_low_target): Update.
15206
7fb85e41
AS
152072005-10-25 Andreas Schwab <schwab@suse.de>
15208
15209 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15210
15211 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15212 (ia64_num_regs): Reduce to 462.
15213
3db0444b
DJ
152142005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15215
15216 * acinclude.m4: Correct quoting.
15217 * aclocal.m4: Regenerated.
15218
15219 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15220 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15221 (thread_db_init): Call thread_db_err_str.
15222 * configure.ac: Check for TD_VERSION.
15223 * config.in, configure: Regenerated.
15224
bee0189a
DJ
152252005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15226
15227 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15228
e9d25b98
DJ
152292005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15230
15231 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15232 is not available. Define HAVE_PTRACE_GETREGS if it is.
15233 * config.in, configure: Regenerated.
15234 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15235 * linux-i386-low.c, linux-m68k-low.c: Update to use
15236 HAVE_PTRACE_GETREGS.
15237 * linux-low.c (regsets_fetch_inferior_registers)
15238 (regsets_store_inferior_registers): Only return 0 if we processed
15239 GENERAL_REGS.
15240 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15241 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15242
a06660f7
DJ
152432005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15244
15245 * inferiors.c (struct thread_info): Add gdb_id.
15246 (add_thread): Add gdb_id argument.
15247 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15248 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15249 calls to add_thread.
15250 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15251 * server.c (handle_query): Use thread_to_gdb_id.
15252 (handle_v_cont, main): Use gdb_id_to_thread_id.
15253 * server.h (add_thread): Update prototype.
15254 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15255 prototypes.
15256
5a1f5858
DJ
152572005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15258
15259 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15260 left-padded registers.
15261 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15262 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15263
e122f1f5
SE
152642005-07-01 Steve Ellcey <sje@cup.hp.com>
15265
15266 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15267 * configure: Regenerate.
15268 * config.in: Regenerate.
15269 * server.h (NEED_DECLARATION_STRERROR):
15270 Replace with !HAVE_DECL_STRERROR.
15271
d592fa2f
DJ
152722005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15273
15274 * linux-low.c (linux_wait, linux_send_signal): Don't test
15275 an unsigned long variable for > 0 if it could be MAX_ULONG.
15276 * server.c (myresume): Likewise.
15277 * target.c (set_desired_inferior): Likewise.
15278
ccbd4912
MK
152792005-06-13 Mark Kettenis <kettenis@gnu.org>
15280
15281 * configure.ac: Simplify and improve check for socklen_t.
15282 * configure, config.in: Regenerate.
15283
f450004a
DJ
152842005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15285
15286 * acconfig.h: Remove.
15287 * configure.ac: Add a test for socklen_t. Use three-argument
15288 AC_DEFINE throughout.
15289 * config.in: Regenerated using autoheader 2.59.
15290 * configure: Regenerated.
15291
15292 * gdbreplay.c (socklen_t): Provide a default.
15293 (remote_open): Use socklen_t.
15294 * remote-utils.c (socklen_t): Provide a default.
15295 (remote_open): Use socklen_t.
15296 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15297 unsigned char.
15298
15299 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15300 char for buffers.
15301 * linux-low.c (linux_read_memory, linux_write_memory)
15302 (linux_read_auxv): Likewise.
15303 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15304 (check_mem_write): Likewise.
15305 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15306 Likewise.
15307 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15308 (registers_from_string, register_data): Likewise.
15309 * server.c (handle_query, main): Likewise.
15310 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15311 (decode_M_packet): Likewise.
15312 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15313 * target.h (struct target_ops): Update read_memory, write_memory,
15314 and read_auxv.
15315 (read_inferior_memory, write_inferior_memory): Update.
15316 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15317 to unsigned char *.
15318 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15319 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15320 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15321 linux-s390-low.c, linux-sh-low.c: Update for changes in
15322 read_inferior_memory and the_low_target->breakpoint.
15323
eee84df1
DJ
153242005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15325
15326 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15327 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15328 * configure.srv: Add powerpc64-*-linux*.
15329 * linux-ppc64-low.c: New file.
15330
45b134e5
OF
153312005-05-23 Orjan Friberg <orjanf@axis.com>
15332
15333 * linux-cris-low.c: New file with support for CRIS.
15334 * linux-crisv32-low.c: Ditto for CRISv32.
15335 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15336 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15337 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15338 reg-crisv32.o, and reg-crisv32.c to make rules.
15339 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15340 recognized targets.
15341
48d93c75
UW
153422005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15343
15344 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15345 of sizeof (PTRACE_XFER_TYPE).
15346 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15347
e013ee27
OF
153482005-05-12 Orjan Friberg <orjanf@axis.com>
15349
889bf7c5 15350 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15351 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15352 pointers for hardware watchpoint support.
15353 * linux-low.h (struct linux_target_ops): Ditto.
15354 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15355 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15356 to linux_target_ops.
15357 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15358 reply packet.
15359 * server.c (main): Recognize 'Z' and 'z' packets.
15360
b0ded00b
UW
153612005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15362
15363 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15364 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15365 (the_low_target): Add new members.
15366
8643e2ad
DJ
153672005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15368
15369 * proc-service.c (ps_lgetregs): Search all_processes instead of
15370 all_threads.
15371
fc620387
DJ
153722005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15373
15374 * server.c (start_inferior): Change return type to int.
15375 (attach_inferior): Change sigptr to int *.
15376 (handle_v_cont, handle_v_requests): Change signal to int *.
15377 (main): Change signal to int.
15378
153792005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15380
15381 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15382 * configure.srv: Add m32r*-*-linux*.
15383 * linux-m32r-low.c: New file.
15384
e0e76420
DJ
153852005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15386
15387 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15388
a1928bad
DJ
153892005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15390
15391 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15392 Take unsigned long arguments for PIDs.
15393 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15394 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15395 (wait_for_sigstop, linux_resume_one_process)
15396 (regsets_fetch_inferior_registers, linux_send_signal)
15397 (linux_read_auxv): Likewise. Update the types of variables holding
15398 PIDs. Update format string specifiers.
15399 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15400 * remote-utils.c (prepare_resume_reply): Likewise.
15401 * server.c (cont_thread, general_thread, step_thread)
15402 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15403 unsigned long.
15404 (handle_query): Update format specifiers.
15405 (handle_v_cont, main): Use strtoul for thread IDs.
15406 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15407 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15408 (general_thread, step_thread, thread_from_wait)
15409 (old_thread_from_wait): Update.
15410 * target.h (struct thread_resume): Use unsigned long for THREAD.
15411 (struct target_ops): Use unsigned long for arguments to attach and
15412 thread_alive.
15413
dcdb98d2
DJ
154142005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15415
15416 * acinclude.m4: Include bfd/bfd.m4 directly.
15417 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15418 <agriffis@toolchain.org>.
15419 * aclocal.m4, configure: Regenerated.
15420
bec39cab
AC
154212005-01-07 Andrew Cagney <cagney@gnu.org>
15422
15423 * configure.ac: Rename configure.in, require autoconf 2.59.
15424 * configure: Re-generate.
15425
434c4c77
DJ
154262004-12-08 Daniel Jacobowitz <dan@debian.org>
15427
15428 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15429 LIBS when finished.
15430 * aclocal.m4: Regenerated.
15431 * configure: Regenerated.
15432
db1d3e1b
AS
154332004-11-21 Andreas Schwab <schwab@suse.de>
15434
15435 * linux-m68k-low.c (m68k_num_gregs): Define.
15436 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15437 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15438 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15439 (m68k_breakpoint_at): New. Add to the_low_target.
15440
15441 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15442 srv_linux_thread_db to yes.
15443
43360365
JB
154442004-10-20 Joel Brobecker <brobecker@gnat.com>
15445
15446 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15447 (ARCH_SET_FS): Likewise.
15448 (ARCH_GET_FS): Likewise.
15449 (ARCH_GET_GS): Likewise.
15450
fd500816
DJ
154512004-10-16 Daniel Jacobowitz <dan@debian.org>
15452
15453 * linux-i386-low.c (ps_get_thread_area): New.
15454 * linux-x86-64-low.c (ps_get_thread_area): New.
15455 * linux-low.c: Include <sys/syscall.h>.
15456 (linux_kill_one_process): Don't kill the first thread here.
15457 (linux_kill): Kill the first thread here.
15458 (kill_lwp): New function.
15459 (send_sigstop, linux_send_signal): Use it.
15460 * proc-service.c: Clean up #ifdefs.
15461 (fpregset_info): Delete.
15462 (ps_lgetregs): Update and enable implementation.
15463 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15464 implementations.
15465 * remote-utils.c (struct sym_cache, symbol_cache): New.
15466 (input_interrupt): Print a clearer message.
15467 (async_io_enabled): New variable.
15468 (enable_async_io, disable_async_io): Use it. Update comments.
15469 (look_up_one_symbol): Use the symbol cache.
15470 * thread-db.c (thread_db_look_up_symbols): New function.
15471 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15472
f6de3c42
DJ
154732004-10-16 Daniel Jacobowitz <dan@debian.org>
15474
15475 * configure.in: Test for -rdynamic.
15476 * configure: Regenerated.
15477 * Makefile (INTERNAL_LDFLAGS): New.
15478 (gdbserver, gdbreplay): Use it.
15479
2c0fc042
AC
154802004-09-02 Andrew Cagney <cagney@gnu.org>
15481
15482 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15483
075b3282
DJ
154842004-03-23 Daniel Jacobowitz <drow@mvista.com>
15485
15486 * linux-low.c (linux_wait): Clear all_processes list also.
15487
fa6a77dc
DJ
154882004-03-12 Daniel Jacobowitz <drow@mvista.com>
15489
15490 * linux-low.c: Include <errno.h>. Remove extern declaration of
15491 errno.
15492
6d782a97
DJ
154932004-03-12 Daniel Jacobowitz <drow@mvista.com>
15494
15495 * gdbreplay.c, server.h, utils.c: Update copyright years.
15496
3a7fb99b
DJ
154972004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15498
15499 * server.c (main): Print child status or termination signal from
15500 variable 'signal', not 'sig'.
15501
c3e735a6
DJ
155022004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15503
15504 * linux-low.c (linux_read_memory): Change return type to
15505 int. Check for and return error from ptrace().
15506 * target.c (read_inferior_memory): Change return type to int. Pass
15507 back return status from the_target->read_memory().
15508 * target.h (struct target_ops): Adapt *read_memory() prototype.
15509 Update comment.
15510 (read_inferior_memory): Adapt prototype.
15511 * server.c (main): Return an error packet if
15512 read_inferior_memory() returns an error.
15513
a59d1c82
DJ
155142004-03-04 Daniel Jacobowitz <drow@mvista.com>
15515
15516 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15517 Unify with other clean targets.
15518
dc3f8883
DJ
155192004-02-29 Daniel Jacobowitz <drow@mvista.com>
15520
15521 * server.c (handle_v_cont): Call set_desired_inferior.
15522
89a208da
DJ
155232004-02-29 Daniel Jacobowitz <drow@mvista.com>
15524
15525 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15526
62ea82f5
DJ
155272004-02-29 Daniel Jacobowitz <drow@mvista.com>
15528
15529 * linux-low.c (linux_wait): Unblock async I/O.
15530 (linux_resume): Block and enable async I/O.
15531 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15532 * server.h (block_async_io, unblock_async_io): Add prototypes.
15533
6910d122
DJ
155342004-02-29 Daniel Jacobowitz <drow@mvista.com>
15535
15536 * remote-utils.c (remote_open): Print a status notice after
15537 opening a TCP port.
15538 * server.c (attach_inferior): Print a status notice after
15539 attaching.
15540
155412004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15542
15543 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15544
c89dc5d4
DJ
155452004-02-26 Daniel Jacobowitz <drow@mvista.com>
15546
15547 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15548 error packet.
15549 * server.c, target.h: Update copyright years.
15550
4b8dad4a
RM
155512004-02-25 Roland McGrath <roland@redhat.com>
15552
15553 * target.h (struct target_ops): New member `read_auxv'.
15554 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15555 * linux-low.c (linux_read_auxv): New function.
15556 (linux_target_ops): Initialize `read_auxv' member to that.
15557
d7446758
JB
155582004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15559
15560 Committed by Jim Blandy <jimb@redhat.com>.
15561
15562 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15563 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15564 instead of GPR_SIZE to distiguish s390 and s390x targets.
15565
5544ad89
DJ
155662004-01-31 Daniel Jacobowitz <drow@mvista.com>
15567
15568 * linux-low.c: Update copyright year.
15569 (check_removed_breakpoint): Clear pending_is_breakpoint.
15570 (linux_set_resume_request, linux_queue_one_thread)
15571 (resume_status_pending_p): New functions.
15572 (linux_continue_one_thread): Use process->resume.
15573 (linux_resume): Only resume threads if there are no pending events.
15574 * linux-low.h (struct process_info): Add resume request
15575 pointer.
15576
2a68b70e
DJ
155772004-01-30 Daniel Jacobowitz <drow@mvista.com>
15578
15579 * regcache.c (new_register_cache): Clear the allocated register
15580 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15581
64386c31
DJ
155822003-10-13 Daniel Jacobowitz <drow@mvista.com>
15583
15584 * linux-low.c (linux_resume): Take a struct thread_resume *
15585 argument.
15586 (linux_wait): Update call.
15587 (resume_ptr): New static variable.
15588 (linux_continue_one_thread): Renamed from
15589 linux_continue_one_process. Use resume_ptr.
15590 (linux_resume): Use linux_continue_one_thread.
15591 * server.c (handle_v_cont, handle_v_requests): New functions.
15592 (myresume): New function.
15593 (main): Handle 'v' case.
15594 * target.h (struct thread_resume): New type.
15595 (struct target_ops): Change argument of "resume" to struct
15596 thread_resume *.
15597 (myresume): Delete macro.
15598
c938e9b0
L
155992003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15600
15601 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15602 (uninstall): Support DESTDIR.
15603
7f313d07
BC
15604Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15605
15606 * configure.srv: Add xscale*linux copy of arm*linux entry.
15607
3b2fc2ea
DJ
156082003-07-24 Daniel Jacobowitz <drow@mvista.com>
15609
15610 * linux-arm-low.c (arm_reinsert_addr): New function.
15611 (the_low_target): Add arm_reinsert_addr.
15612
1c0a559e
MK
156132003-07-08 Mark Kettenis <kettenis@gnu.org>
15614
15615 * mem-break.c: Remove whitespace at end of file.
15616
43d5792c
DJ
156172003-06-28 Daniel Jacobowitz <drow@mvista.com>
15618
15619 * configure.in: Check whether we need to prototype strerror.
15620 * server.h: Optionally prototype strerror.
15621 * gdbreplay.c (perror_with_name): Use strerror.
15622 * linux-low.c (linux_attach_lwp): Use strerror.
15623 * utils.c (perror_with_name): Use strerror.
15624 * config.in, configure: Regenerated.
15625
c8a86edf
DJ
156262003-06-28 Daniel Jacobowitz <drow@mvista.com>
15627
15628 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15629 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15630
73d37363
DJ
156312003-06-20 Daniel Jacobowitz <drow@mvista.com>
15632
15633 * Makefile.in (SFILES): Update.
15634 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15635 low-sun3.c: Remove files.
15636
6ad8ae5c
DJ
156372003-06-17 Daniel Jacobowitz <drow@mvista.com>
15638
15639 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15640 (linux_detach_one_process, linux_detach): New functions.
15641 (linux_target_ops): Add linux_detach.
15642 * server.c (main): Handle 'D' packet.
15643 * target.h (struct target_ops): Add "detach" member.
15644 (detach_inferior): Define.
15645
1581182a
MK
156462003-06-13 Mark Kettenis <kettenis@gnu.org>
15647
15648 From Kelley Cook <kelleycook@wideopenwest.com>:
15649 * configure.srv: Accept i[34567]86 variants.
15650
e5379b03
DJ
156512003-06-05 Daniel Jacobowitz <drow@mvista.com>
15652
15653 * linux-low.c (linux_wait_for_event): Correct comment typos.
15654 (linux_resume_one_process): Call check_removed_breakpoint.
15655 (linux_send_signal): New function.
15656 (linux_target_ops): Add linux_send_signal.
15657 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15658 of kill.
15659 * target.h (struct target_ops): Add send_signal.
15660
2ff29de4
JB
156612003-05-29 Jim Blandy <jimb@redhat.com>
15662
15663 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15664 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15665 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15666 away part of the register's value.
15667
254787d4
DJ
156682003-03-26 Daniel Jacobowitz <drow@mvista.com>
15669
15670 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15671 (linux_wait_for_event, linux_init_signals): Likewise.
15672
94e10508
DJ
156732003-03-17 Daniel Jacobowitz <drow@mvista.com>
15674
15675 * configure.in: Check for stdlib.h.
15676 * configure: Regenerated.
15677 * config.in: Regenerated.
15678
4c0711e0
DJ
156792003-01-04 Andreas Schwab <schwab@suse.de>
15680
15681 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15682
ef66e766
AC
156832003-01-02 Andrew Cagney <ac131313@redhat.com>
15684
15685 * Makefile.in: Remove obsolete code.
15686
a1358604
DJ
156872002-11-20 Daniel Jacobowitz <drow@mvista.com>
15688
15689 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15690 defined(PT_FPR0_HI).
15691
23ce3b1c
DJ
156922002-11-17 Stuart Hughes <seh@zee2.com>
15693
15694 * linux-arm-low.c (arm_num_regs): Increase.
15695 (arm_regmap): Include status register.
15696
156972002-11-17 Daniel Jacobowitz <drow@mvista.com>
15698
15699 * linux-low.c (register_addr): Remove incorrect -1 check.
15700
a9fa9f7d
DJ
157012002-08-29 Daniel Jacobowitz <drow@mvista.com>
15702
15703 * linux-low.c (linux_create_inferior): Call setpgid. Return
15704 the new PID.
15705 (unstopped_p, linux_signal_pid): Remove.
15706 (linux_target_ops): Remove linux_signal_pid.
15707 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15708 global instead of target method.
15709 * target.h (struct target_ops): Remove signal_pid. Update comment
15710 for create_inferior.
15711 * server.c (signal_pid): New variable.
15712 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15713 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15714 (attach_inferior): Set signal_pid.
15715
17574093
DJ
157162002-08-23 Daniel Jacobowitz <drow@mvista.com>
15717
15718 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15719
157202002-08-20 Jim Blandy <jimb@redhat.com>
15721
15722 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15723 default for this.
15724
157252002-08-01 Andrew Cagney <cagney@redhat.com>
15726
15727 * Makefile.in: Make chill references obsolete.
15728
157292002-07-24 Kevin Buettner <kevinb@redhat.com>
15730
15731 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15732 * configure: Regenerate.
15733 * config.in: Regenerate.
15734
157352002-07-09 David O'Brien <obrien@FreeBSD.org>
15736
15737 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15738 (perror_with_name, remote_close, remote_open, expect, play): Static.
15739
157402002-07-04 Michal Ludvig <mludvig@suse.cz>
15741
4b8dad4a 15742 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15743 byte offsets instead of an array of indexes.
15744 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15745
157462002-06-13 Daniel Jacobowitz <drow@mvista.com>
15747
15748 * regcache.c: Add comment.
15749
157502002-06-11 Daniel Jacobowitz <drow@mvista.com>
15751
15752 * thread-db.c: New file.
15753 * proc-service.c: New file.
15754 * acinclude.m4: New file.
15755 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15756 proc-service.o, and thread-db.o.
15757 (linux-low.o): Add USE_THREAD_DB.
15758 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15759 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15760 * aclocal.m4: Regenerated.
15761 * config.in: Regenerated.
15762 * configure: Regenerated.
15763 * configure.in: Check for proc_service.h, sys/procfs.h,
15764 thread_db.h, and linux/elf.h headrs.
15765 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15766 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15767 Check for -lthread_db and thread support.
15768 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15769 PowerPC, and SuperH.
15770 * i387-fp.c: Constify arguments.
15771 * i387-fp.h: Likewise.
15772 * inferiors.c: (struct thread_info): Renamed from
15773 `struct inferior_info'. Remove PID member. Use generic inferior
15774 list header. All uses updated.
15775 (inferiors, signal_pid): Removed.
15776 (all_threads): New variable.
15777 (get_thread): Define.
15778 (add_inferior_to_list): New function.
15779 (for_each_inferior): New function.
15780 (change_inferior_id): New function.
15781 (add_inferior): Removed.
15782 (remove_inferior): New function.
15783 (add_thread): New function.
15784 (free_one_thread): New function.
15785 (remove_thread): New function.
15786 (clear_inferiors): Use for_each_inferior and free_one_thread.
15787 (find_inferior): New function.
15788 (find_inferior_id): New function.
15789 (inferior_target_data): Update argument type.
15790 (set_inferior_target_data): Likewise.
15791 (inferior_regcache_data): Likewise.
15792 (set_inferior_regcache_data): Likewise.
15793 * linux-low.c (linux_bp_reinsert): Remove.
15794 (all_processes, stopping_threads, using_thrads)
15795 (struct pending_signals, debug_threads, pid_of): New.
15796 (inferior_pid): Replace with macro.
15797 (struct inferior_linux_data): Remove.
15798 (get_stop_pc, add_process): New functions.
15799 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15800 Use add_process and add_thread.
15801 (linux_attach_lwp): New function, based on old linux_attach. Use
15802 add_process and add_thread. Set stop_expected for new threads.
15803 (linux_attach): New function.
15804 (linux_kill_one_process): New function.
15805 (linux_kill): Kill all LWPs.
15806 (linux_thread_alive): Use find_inferior_id.
15807 (check_removed_breakpoints, status_pending_p): New functions.
15808 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15809 Update. Use WNOHANG. Wait for cloned processes also. Update process
15810 struct for the found process.
15811 (linux_wait_for_event): New function.
15812 (linux_wait): Use it. Support LWPs.
15813 (send_sigstop, wait_for_sigstop, stop_all_processes)
15814 (linux_resume_one_process, linux_continue_one_process): New functions.
15815 (linux_resume): Support LWPs.
15816 (REGISTER_RAW_SIZE): Remove.
15817 (fetch_register): Use register_size instead. Call supply_register.
15818 (usr_store_inferior_registers): Likewise. Call collect_register.
15819 Fix recursive case.
15820 (regsets_fetch_inferior_registers): Improve error message.
15821 (regsets_store_inferior_registers): Add debugging.
15822 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15823 (unstopped_p, linux_signal_pid): New functions.
15824 (linux_target_ops): Add linux_signal_pid.
15825 (linux_init_signals): New function.
15826 (initialize_low): Call it. Initialize using_threads.
15827 * regcache.c (inferior_regcache_data): Add valid
15828 flag.
15829 (get_regcache): Fetch registers lazily. Add fetch argument
15830 and update all callers.
15831 (regcache_invalidate_one, regcache_invalidate): New
15832 functions.
15833 (new_register_cache): Renamed from create_register_cache.
15834 Return the new regcache.
15835 (free_register_cache): Change argument to a void *.
15836 (registers_to_string, registers_from_string): Call get_regcache
15837 with fetch flag set.
15838 (register_data): Make static. Pass fetch flag to get_regcache.
15839 (supply_register): Call get_regcache with fetch flag clear.
15840 (collect_register): Call get_regcache with fetch flag set.
15841 (collect_register_as_string): New function.
15842 * regcache.h: Update.
15843 * remote-utils.c (putpkt): Flush after debug output and use
15844 stderr.
15845 Handle input interrupts while waiting for an ACK.
15846 (input_interrupt): Use signal_pid method.
15847 (getpkt): Flush after debug output and use stderr.
15848 (outreg): Use collect_register_as_string.
15849 (new_thread_notify, dead_thread_notify): New functions.
15850 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15851 and general_thread.
15852 (look_up_one_symbol): Flush after debug output.
15853 * server.c (step_thread, server_waiting): New variables.
15854 (start_inferior): Don't use signal_pid. Update call to mywait.
15855 (attach_inferior): Update call to mywait.
15856 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15857 (main): Don't fetch/store registers explicitly. Use
15858 set_desired_inferior. Support proposed ``Hs'' packet. Update
15859 calls to mywait.
15860 * server.h: Update.
15861 (struct inferior_list, struct_inferior_list_entry): New.
15862 * target.c (set_desired_inferior): New.
15863 (write_inferior_memory): Constify.
15864 (mywait): New function.
15865 * target.h: Update.
15866 (struct target_ops): New signal_pid method.
15867 (mywait): Removed macro, added prototype.
15868
15869 * linux-low.h (regset_func): Removed.
15870 (regset_fill_func, regset_store_func): New.
15871 (enum regset_type): New.
15872 (struct regset_info): Add type field. Use new operation types.
15873 (struct linux_target_ops): stop_pc renamed to get_pc.
15874 Add decr_pc_after_break and breakpoint_at.
15875 (get_process, get_thread_proess, get_process_thread)
15876 (strut process_info, all_processes, linux_attach_lwp)
15877 (thread_db_init): New.
15878
15879 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15880 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15881 (the_low_target): Add new members.
15882 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15883 (i386_store_fpxregset): Constify.
15884 (target_regsets): Add new kind identifier.
15885 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15886 (i386_set_pc): Add debugging.
15887 (i386_breakpoint_at): New function.
15888 (the_low_target): Add new members.
15889 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15890 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15891 (mips_breakpoint_at): New.
15892 (the_low_target): Add new members.
15893 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15894 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15895 (the_low_target): Add new members.
15896 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15897 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15898 (the_low_target): Add new members.
15899 * linux-x86-64-low.c (target_regsets): Add new kind
15900 identifier.
15901
159022002-05-15 Daniel Jacobowitz <drow@mvista.com>
15903
15904 From Martin Pool <mbp@samba.org>:
15905 * server.c (gdbserver_usage): New function.
15906 (main): Call it.
15907
159082002-05-14 Daniel Jacobowitz <drow@mvista.com>
15909
15910 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15911 stop_at -> stop_pc.
15912
159132002-05-04 Andrew Cagney <ac131313@redhat.com>
15914
15915 * Makefile.in: Remove obsolete code.
15916
159172002-04-24 Michal Ludvig <mludvig@suse.cz>
15918
15919 * linux-low.c (regsets_fetch_inferior_registers),
15920 (regsets_store_inferior_registers): Removed cast to int from
15921 ptrace() calls.
15922 * regcache.h: Added declaration of struct inferior_info.
15923
159242002-04-20 Daniel Jacobowitz <drow@mvista.com>
15925
15926 * inferiors.c (struct inferior_info): Add regcache_data.
15927 (add_inferior): Call create_register_cache.
15928 (clear_inferiors): Call free_register_cache.
15929 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15930 * regcache.c (struct inferior_regcache_data): New.
15931 (registers): Remove.
15932 (get_regcache): New function.
15933 (create_register_cache, free_register_cache): New functions.
15934 (set_register_cache): Don't initialize the register cache here.
15935 (registers_to_string, registers_from_string, register_data): Call
15936 get_regcache.
15937 * regcache.h: Add prototypes.
15938 * server.h: Likewise.
15939
159402002-04-20 Daniel Jacobowitz <drow@mvista.com>
15941
15942 * mem-break.c: New file.
15943 * mem-break.h: New file.
15944 * Makefile.in: Add mem-break.o rule; update server.h
15945 dependencies.
15946 * inferiors.c (struct inferior_info): Add target_data
15947 member.
15948 (clear_inferiors): Free target_data member if set.
15949 (inferior_target_data, set_inferior_target_data): New functions.
15950 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15951 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15952 * linux-low.c (linux_bp_reinsert): New variable.
15953 (struct inferior_linux_data): New.
15954 (linux_create_inferior): Use set_inferior_target_data.
15955 (linux_attach): Likewise. Call add_inferior.
15956 (linux_wait_for_one_inferior): New function.
15957 (linux_wait): Call it.
15958 (linux_write_memory): Add const.
15959 (initialize_low): Call set_breakpoint_data.
15960 * linux-low.h (struct linux_target_ops): Add breakpoint
15961 handling members.
15962 * server.c (attach_inferior): Remove extra add_inferior
15963 call.
15964 * server.h: Include mem-break.h. Update inferior.c
15965 prototypes.
15966 * target.c (read_inferior_memory)
15967 (write_inferior_memory): New functions.
15968 * target.h (read_inferior_memory)
15969 (write_inferior_memory): Change macros to prototypes.
15970 (struct target_ops): Update comments. Add const to write_memory
15971 definition.
15972
159732002-04-11 Daniel Jacobowitz <drow@mvista.com>
15974
15975 * linux-low.c (usr_store_inferior_registers): Support
15976 registers which are allowed to fail to store.
15977 * linux-low.h (linux_target_ops): Likewise.
15978 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15979 (ppc_cannot_store_register): FPSCR may not be storable.
15980
159812002-04-09 Daniel Jacobowitz <drow@mvista.com>
15982
15983 * server.h: Include <string.h> if HAVE_STRING_H.
15984 * ChangeLog: Correct paths in last ChangeLog entry.
15985
159862002-04-09 Daniel Jacobowitz <drow@mvista.com>
15987
15988 * linux-low.h: Remove obsolete prototypes.
15989 (struct linux_target_ops): New.
15990 (extern the_low_target): New.
15991 * linux-low.c (num_regs, regmap): Remove declarations.
15992 (register_addr): Use the_low_target explicitly.
15993 (fetch_register): Likewise.
15994 (usr_fetch_inferior_registers): Likewise.
15995 (usr_store_inferior_registers): Likewise.
15996 * linux-arm-low.c (num_regs): Remove.
15997 (arm_num_regs): Define.
15998 (arm_regmap): Renamed from regmap, made static.
15999 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16000 made static.
16001 (arm_cannot_store_register): Renamed from cannot_store_register,
16002 made static.
16003 (the_low_target): New.
16004 * linux-i386-low.c (num_regs): Remove.
16005 (i386_num_regs): Define.
16006 (i386_regmap): Renamed from regmap, made static.
16007 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16008 made static.
16009 (i386_cannot_store_register): Renamed from cannot_store_register,
16010 made static.
16011 (the_low_target): New.
16012 * linux-ia64-low.c (num_regs): Remove.
16013 (ia64_num_regs): Define.
16014 (ia64_regmap): Renamed from regmap, made static.
16015 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16016 made static.
16017 (ia64_cannot_store_register): Renamed from cannot_store_register,
16018 made static.
16019 (the_low_target): New.
16020 * linux-m68k-low.c (num_regs): Remove.
16021 (m68k_num_regs): Define.
16022 (m68k_regmap): Renamed from regmap, made static.
16023 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16024 made static.
16025 (m68k_cannot_store_register): Renamed from cannot_store_register,
16026 made static.
16027 (the_low_target): New.
16028 * linux-mips-low.c (num_regs): Remove.
16029 (mips_num_regs): Define.
16030 (mips_regmap): Renamed from regmap, made static.
16031 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16032 made static.
16033 (mips_cannot_store_register): Renamed from cannot_store_register,
16034 made static.
16035 (the_low_target): New.
16036 * linux-ppc-low.c (num_regs): Remove.
16037 (ppc_num_regs): Define.
16038 (ppc_regmap): Renamed from regmap, made static.
16039 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16040 made static.
16041 (ppc_cannot_store_register): Renamed from cannot_store_register,
16042 made static.
16043 (the_low_target): New.
16044 * linux-s390-low.c (num_regs): Remove.
16045 (s390_num_regs): Define.
16046 (s390_regmap): Renamed from regmap, made static.
16047 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16048 made static.
16049 (s390_cannot_store_register): Renamed from cannot_store_register,
16050 made static.
16051 (the_low_target): New.
16052 * linux-sh-low.c (num_regs): Remove.
16053 (sh_num_regs): Define.
16054 (sh_regmap): Renamed from regmap, made static.
16055 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16056 made static.
16057 (sh_cannot_store_register): Renamed from cannot_store_register,
16058 made static.
16059 (the_low_target): New.
16060 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16061 (the_low_target): New.
16062
160632002-04-09 Daniel Jacobowitz <drow@mvista.com>
16064
16065 * Makefile.in: Add stamp-h target.
16066 * configure.in: Create stamp-h.
16067 * configure: Regenerated.
16068
160692002-04-09 Daniel Jacobowitz <drow@mvista.com>
16070
16071 * inferiors.c: New file.
16072 * target.c: New file.
16073 * target.h: New file.
16074 * Makefile.in: Add target.o and inferiors.o. Update
16075 dependencies.
16076 * linux-low.c (inferior_pid): New static variable,
16077 moved from server.c.
16078 (linux_create_inferior): Renamed from create_inferior.
16079 Call add_inferior. Return 0 on success instead of a PID.
16080 (linux_attach): Renamed from myattach.
16081 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16082 (linux_thread_alive): Renamed from mythread_alive.
16083 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16084 child dies.
16085 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16086 (regsets_store_inferior_registers): Correct error message.
16087 Add missing ``return 0''.
16088 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16089 (linux_store_registers): Renamed from store_inferior_registers.
16090 (linux_read_memory): Renamed from read_inferior_memory.
16091 (linux_write_memory): Renamed from write_inferior_memory.
16092 (linux_target_ops): New structure.
16093 (initialize_low): Call set_target_ops ().
16094 * remote-utils.c (unhexify): New function.
16095 (hexify): New function.
16096 (input_interrupt): Send signals to ``signal_pid''.
16097 * server.c (inferior_pid): Remove.
16098 (start_inferior): Update create_inferior call.
16099 (attach_inferior): Call add_inferior.
16100 (handle_query): New function.
16101 (main): Call handle_query for `q' packets.
16102 * server.h: Include "target.h". Remove obsolete prototypes.
16103 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16104
161052002-04-09 Daniel Jacobowitz <drow@mvista.com>
16106
16107 * Makefile.in: Add WARN_CFLAGS. Update configury
16108 dependencies.
16109 * configure.in: Check for <string.h>
16110 * configure: Regenerate.
16111 * config.in: Regenerate.
16112 * gdbreplay.c: Include needed system headers.
16113 (remote_open): Remove strchr prototype.
16114 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16115 * regcache.c (supply_register): Change buf argument to const void *.
16116 (supply_register_by_name): Likewise.
16117 (collect_register): Change buf argument to void *.
16118 (collect_register_by_name): Likewise.
16119 * regcache.h: Add missing prototypes.
16120 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16121 * server.c (handle_query): New function.
16122 (attached): New static variable, moved out of main.
16123 (main): Quiet longjmp clobber warnings.
16124 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16125 * utils.c (error): Remove NORETURN.
16126 (fatal): Likewise.
This page took 1.959082 seconds and 4 git commands to generate.