Riscv shared libraries should not export __global_pointer$.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
c0e15c9b
SM
12017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * inferiors.c (for_each_inferior_with_data): Remove.
4 * inferiors.h (for_each_inferior_with_data): Remove.
5 * server.c (handle_qxfer_threads_worker): Change parameter type.
6 (handle_qxfer_threads_proper): Use for_each_thread.
7
f0045347
SM
82017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
9
10 * inferiors.c (for_each_inferior): Remove.
11 (clear_inferiors): Use for_each_thread.
12 * inferiors.h (for_each_inferior): Remove.
13 * linux-low.c (linux_wait_for_event_filtered): Use
14 for_each_thread.
15 (linux_stabilize_threads): Likewise.
16 * regcache.c (regcache_release): Likewise.
17 * server.c (gdb_wants_all_threads_stopped): Likewise.
18 (clear_pending_status_callback): Remove.
19 (handle_status): Use for_each_thread.
20 (captured_main): Likewise.
21 * win32-low.c (child_init_thread_list): Likewise.
22 (win32_clear_inferiors): Likewise.
23 (fake_breakpoint_event): Likewise.
24
9521758b
SM
252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
26
27 * inferiors.h (find_inferior): Remove.
28 * inferiors.c (find_inferior): Remove.
29
8f86d7aa
SM
302017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
31
32 * linux-low.c (resume_status_pending_p): Update comment.
33 (need_step_over_p): Update comment.
34
e2b44075
SM
352017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
36
37 * linux-low.c (proceed_one_lwp): Return void, change parameter
38 type.
39 (unsuspend_and_proceed_one_lwp): Likewise.
40 (proceed_all_lwps): Use for_each_thread.
41 (unstop_all_lwps): Likewise.
42
c80825ff
SM
432017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
44
45 * linux-low.c (linux_resume_one_thread): Return void, take
46 parameter directly.
47 (linux_resume): Use for_each_thread.
48
df3e4dbe
SM
492017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
50
51 * linux-low.c (send_sigstop_callback): Return void, change
52 parameter type. Rename to...
53 (send_sigstop): ... this.
54 (suspend_and_send_sigstop_callback): Return void, change parameter
55 type. Rename to...
56 (suspend_and_send_sigstop): ... this.
57 (stop_all_lwps): Use for_each_thread.
58
5a6b0a41
SM
592017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
60
61 * linux-low.c (lwp_running): Return bool, remove unused
62 argument.
63 (linux_stabilize_threads): Use find_thread.
64
39a64da5
SM
652017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
66
67 * linux-low.c (select_singlestep_lwp_callback): Remove.
68 (count_events_callback): Remove.
69 (select_event_lwp_callback): Remove.
70 (select_event_lwp): Use find_thread/for_each_thread.
71
a1385b7b
SM
722017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
73
74 * linux-low.c (not_stopped_callback): Return bool, take filter
75 argument directly.
76 (linux_wait_for_event_filtered): Use find_thread.
77 (linux_wait_1): Likewise.
78
454296a2
SM
792017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
80
81 * linux-low.c (same_lwp): Remove.
82 (find_lwp_pid): Use find_thread.
83
6b2a85da
SM
842017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
85
86 * linux-low.c (delete_lwp_callback): Remove.
87 (linux_mourn): Use for_each_thread.
88
798a38e8
SM
892017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
90
91 * linux-low.c (linux_detach_lwp_callback): Return void, remove
92 args parameter, don't check for pid.
93 (linux_detach): Use for_each_thread.
94
e4eb0dec
SM
952017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
96
97 * linux-low.c (struct counter): Remove.
98 (second_thread_of_pid_p): Remove.
99 (last_thread_of_process_p): Use find_thread.
100
83e1b6c1
SM
1012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
102
103 * inferiors.c (find_inferior_in_random): Remove.
104 * inferiors.h (find_inferior_in_random): Remove.
105 * linux-low.c (status_pending_p_callback): Return bool, accept
106 parameter ptid directly.
107 (linux_wait_for_event_filtered): Use find_thread_in_random.
108 (linux_wait_1): Likewise.
109
8dc7b443
SM
1102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
111
112 * inferiors.c (find_inferior_id): Remove.
113 (find_thread_ptid): Move implemention from find_inferior_id to
114 here.
115 * inferiors.h (find_inferior_id): Remove.
116 * server.c (handle_status): Use find_thread_ptid.
117 (process_serial_event): Likewise.
118 * thread-db.c (find_one_thread): Likewise.
119 (thread_db_thread_handle): Likewise.
120 * win32-low.c (thread_rec): Likewise.
121 (child_delete_thread): Likewise.
122 (win32_thread_alive): Likewise.
123 (get_child_debug_event): Likewise.
124
da25033c
SM
1252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
126
127 * linux-mips-low.c (update_watch_registers_callback): Return
128 void, remove pid_p parameter, don't check for pid.
129 (mips_insert_point, mips_remove_point): Use for_each_thread.
130
c91bb56b
SM
1312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
132
133 * lynx.low (lynx_delete_thread_callback): Remove.
134 (lynx_mourn): Use for_each_thread.
135
634a3254
SM
1362017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
137
138 * regcache.c (regcache_invalidate_one): Remove.
139 (regcache_invalidate_pid): use for_each_thread.
140
41272101
TT
1412017-11-26 Tom Tromey <tom@tromey.com>
142
143 * linux-low.c (linux_create_inferior): Update.
144
f5291a6f
UW
1452017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
146
147 * spu-low.c (spu_create_inferior): Fix typo in argument name.
148
6654d750
AH
1492017-11-24 Alan Hayward <alan.hayward@arm.com>
150
151 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
152 * linux-aarch64-low.c (initialize_low_arch): Call init func.
153 * linux-aarch64-tdesc-selftest.c: New file.
154 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
155
1562017-11-24 Alan Hayward <alan.hayward@arm.com>
157
158 * configure.srv: Add new file.
159 * linux-aarch64-low.c (initialize_low_arch): Call init func.
160 * linux-aarch64-tdesc-selftest.c: New file.
161 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
162
49bdb7ee
AH
1632017-11-24 Alan Hayward <alan.hayward@arm.com>
164
165 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
166 * linux-aarch64-low.c (initialize_low_arch): Remove init.
167 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
168
d6d7ce56
AH
1692017-11-24 Alan Hayward <alan.hayward@arm.com>
170
171 * configure.srv: Add new files.
172 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
173 aarch64_linux_read_description.
174 * linux-aarch64-low.c (aarch64_linux_read_description):
175 Merge with aarch64_arch_setup.
176 (aarch64_arch_setup): Call aarch64_linux_read_description.
177 * linux-aarch64-tdesc.c: New file.
178 * linux-aarch64-tdesc.h: New file.
179
506fe5f4
YQ
1802017-11-24 Yao Qi <yao.qi@linaro.org>
181
182 * configure.srv: Set $srv_regobj for tic6x-linux.
183 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
184 (tic6x_read_description): Move some code to tic6x_arch_setup.
185 (tic6x_tdesc_test): New function.
186 (initialize_low_arch): Call selftests::register_test.
187
29f9a567
YQ
1882017-11-22 Yao Qi <yao.qi@linaro.org>
189
190 * remote-utils.c (prepare_resume_reply): Use memcpy.
191
578290ec
SM
1922017-11-19 Simon Marchi <simon.marchi@ericsson.com>
193
194 * linux-low.c (kill_one_lwp_callback): Return void, take
195 argument directly, don't filter on pid.
196 (linux_kill): Use for_each_thread.
197
eca55aec
SM
1982017-11-19 Simon Marchi <simon.marchi@ericsson.com>
199
200 * linux-low.c (need_step_over_p): Return bool, remove dummy
201 argument.
202 (linux_resume, proceed_all_lwps): Use find_thread.
203
25c28b4d
SM
2042017-11-19 Simon Marchi <simon.marchi@ericsson.com>
205
206 * linux-low.c (resume_status_pending_p): Return bool, remove
207 flag_p argument.
208 (linux_resume): Use find_thread.
209
5fdda392
SM
2102017-11-19 Simon Marchi <simon.marchi@ericsson.com>
211
212 * linux-low.c (struct thread_resume_array): Remove.
213 (linux_set_resume_request): Return void, take arguments
214 directly.
215 (linux_resume): Use for_each_thread.
216
fcb056a5
SM
2172017-11-19 Simon Marchi <simon.marchi@ericsson.com>
218
219 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
220 return bool, remove data argument.
221 (linux_stabilize_threads): Use find_thread.
222
139720c5
SM
2232017-11-19 Simon Marchi <simon.marchi@ericsson.com>
224
225 * linux-low.c (unsuspend_one_lwp): Remove.
226 (unsuspend_all_lwps): Use for_each_thread, inline code from
227 unsuspend_one_lwp.
228
6d1e5673
SM
2292017-11-19 Simon Marchi <simon.marchi@ericsson.com>
230
231 * gdbthread.h (find_thread): Add overload with ptid_t filter.
232 * linux-low.c (struct iterate_over_lwps_args): Remove.
233 (iterate_over_lwps_filter): Remove.
234 (iterate_over_lwps): Use find_thread.
235
bbf550d5
SM
2362017-11-19 Simon Marchi <simon.marchi@ericsson.com>
237
238 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
239 (linux_handle_new_gdb_connection): Use for_each_thread, inline
240 code from reset_lwp_ptrace_options_callback.
241
00192f77
SM
2422017-11-19 Simon Marchi <simon.marchi@ericsson.com>
243
244 * linux-arm-low.c (struct update_registers_data): Remove.
245 (update_registers_callback): Return void, take arguments
246 directly, don't check thread's pid.
247 (arm_insert_point, arm_remove_point): Use for_each_thread.
248
2bee2b6c
SM
2492017-11-19 Simon Marchi <simon.marchi@ericsson.com>
250
251 * win32-low.c (continue_one_thread): Return void, take argument
252 directly.
253 (child_continue): Use for_each_thread.
254
0b360f19
SM
2552017-11-19 Simon Marchi <simon.marchi@ericsson.com>
256
257 * win32-i386-low.c (update_debug_registers_callback): Rename
258 to ...
259 (update_debug_registers): ... this, return void, remove pid_p arg.
260 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
261
f27866ba
SM
2622017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
263
264 * inferiors.h (struct process_info): Add constructor, initialize
265 fields..
266 <syscalls_to_catch>: Change type to std::vector<int>.
267 * inferiors.c (add_process): Allocate process_info with new.
268 (remove_process): Free process_info with delete.
269 * linux-low.c (handle_extended_wait): Adjust.
270 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
271 * server.c (handle_general_set): Adjust.
272
e849ea89
PA
2732017-11-16 Pedro Alves <palves@redhat.com>
274
275 * remote-utils.c (remote_close): Block SIGIO signals instead of
276 uninstalling the SIGIO handler.
277
1d0aa65c
AH
2782017-11-16 Alan Hayward <alan.hayward@arm.com>
279
280 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
281
3491a34c
YQ
2822017-11-16 Yao Qi <yao.qi@linaro.org>
283
284 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
285 (tic6x_store_gregset): Likewise.
286 (tic6x_usrregs_info): Move it up.
287
a602f924
AH
2882017-11-15 Alan Hayward <alan.hayward@arm.com>
289
290 * Makefile.in: Update arch rules.
291 * configure.srv: Explicitly mark arch/ files.
292
5616b6c3
AS
2932017-11-13 Andreas Schwab <schwab@suse.de>
294
295 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
296 function.
297 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
298
d1928160
PA
2992017-11-06 Pedro Alves <palves@redhat.com>
300
301 * config.in, configure: Regenerate.
302
bac608e7
SM
3032017-10-27 Simon Marchi <simon.marchi@ericsson.com>
304
305 * target.c (struct thread_search): Remove.
306 (thread_search_callback): Remove.
307 (prepare_to_access_memory): Use for_each_thread instead of
308 find_inferior. Inline code from thread_search_callback.
309
eaddb425
SM
3102017-10-27 Simon Marchi <simon.marchi@ericsson.com>
311
312 * server.c (struct visit_actioned_threads_data): Remove.
313 (visit_actioned_threads): Change prototype to take arguments
314 directly.
315 (resume): Use find_thread instead of find_inferior.
316
99078d34
SM
3172017-10-27 Simon Marchi <simon.marchi@ericsson.com>
318
319 * server.c (queue_stop_reply_callback): Change prototype, return
320 void.
321 (find_status_pending_thread_callback): Remove.
322 (handle_status): Replace find_inferior with find_thread and
323 for_each_thread.
324
cc628f3d
AH
3252017-10-25 Alan Hayward <alan.hayward@arm.com>
326
327 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
328 with REGNO.
329 (aarch64_store_gregset): Likewise.
330 (aarch64_fill_fpregset): Likewise.
331 (aarch64_store_fpregset): Likewise.
332
4d3bb80e
SM
3332017-10-21 Simon Marchi <simon.marchi@ericsson.com>
334
335 * gdbthread.h (find_thread, for_each_thread): New functions.
336 * inferiors.c (thread_of_pid): Remove.
337 (find_any_thread_of_pid): Use find_thread.
338 * linux-low.c (num_lwps): Use for_each_thread.
339
7a7cdfa0
YQ
3402017-10-17 Yao Qi <yao.qi@linaro.org>
341
342 * Makefile.in: Remove one rule.
343 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
344
e675d170
YQ
3452017-10-17 Yao Qi <yao.qi@linaro.org>
346
347 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
348 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
349
7eb4e0f9
YQ
3502017-10-17 Yao Qi <yao.qi@linaro.org>
351
352 * configure.srv: Rename arm.o with arch/arm.o.
353
60d6cfc9
YQ
3542017-10-17 Yao Qi <yao.qi@linaro.org>
355
356 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
357 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
358 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
359 (arch-i386.o, arch-amd64.o): Remove rules.
360 (arch/%.o): New rule.
361 Update POSTCOMPILE and COMPILE.pre.
362 * configure.ac: Invoke AC_CONFIG_COMMANDS.
363 * configure: Re-generated.
364 * configure.srv: Replace arch-i386.o with arch/i386.o.
365 Replace arch-amd64.o with arch/amd64.o.
366
5bfda255
YQ
3672017-10-16 Yao Qi <yao.qi@linaro.org>
368
369 * configure: Regenerated.
370
9c80ecd6
SM
3712017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
372
373 * inferiors.h: (struct inferior_list): Remove.
374 (struct inferior_list_entry); Remove.
375 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
376 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
377 get_first_inferior): Remove.
378 (for_each_inferior, for_each_inferior_with_data, find_inferior,
379 find_inferior_id, find_inferior_in_random): Change signature.
380 * inferiors.c (all_threads): Change type to
381 std::list<thread_info *>.
382 (get_thread): Remove macro.
383 (find_inferior, find_inferior_id): Change signature, implement
384 using find_thread.
385 (find_inferior_in_random): Change signature, implement using
386 find_thread_in_random.
387 (for_each_inferior, for_each_inferior_with_data): Change
388 signature, implement using for_each_thread.
389 (add_inferior_to_list, remove_inferior): Remove.
390 (add_thread, get_first_thread, thread_of_pid,
391 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
392 (get_first_inferior, one_inferior_p, clear_inferior_list):
393 Remove.
394 (clear_inferiors, get_thread_process): Update.
395 * gdbthread.h: Include <list>.
396 (struct thread_info) <entry>: Remove field.
397 <id>: New field.
398 (all_threads): Change type to std::list<thread_info *>.
399 (get_first_inferior): Add doc.
400 (find_thread, for_each_thread, find_thread_in_random): New
401 functions.
402 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
403 * linux-arm-low.c (update_registers_callback): Update.
404 * linux-low.c (second_thread_of_pid_p): Update.
405 (kill_one_lwp_callback, linux_detach_lwp_callback,
406 delete_lwp_callback, status_pending_p_callback, same_lwp,
407 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
408 iterate_over_lwps, not_stopped_callback,
409 resume_stopped_resumed_lwps, count_events_callback,
410 select_singlestep_lwp_callback, select_event_lwp_callback,
411 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
412 suspend_and_send_sigstop_callback, wait_for_sigstop,
413 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
414 lwp_running, linux_set_resume_request, resume_status_pending_p,
415 need_step_over_p, start_step_over, linux_resume_one_thread,
416 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
417 reset_lwp_ptrace_options_callback): Update.
418 * linux-mips-low.c (update_watch_registers_callback): Update.
419 * regcache.c (regcache_invalidate_one, regcache_invalidate):
420 Update.
421 (free_register_cache_thread_one): Remove.
422 (regcache_release): Update.
423 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
424 handle_qxfer_threads_worker): Update.
425 (handle_query): Update, use list iterator.
426 (visit_actioned_threads, handle_pending_status,
427 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
428 clear_pending_status_callback, set_pending_status_callback,
429 find_status_pending_thread_callback, handle_status,
430 process_serial_event): Update.
431 * target.c (thread_search_callback): Update.
432 * thread-db.c (thread_db_get_tls_address): Update.
433 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
434 Update.
435 * win32-i386-low.c (update_debug_registers_callback): Update.
436 * win32-low.c (delete_thread_info, child_delete_thread,
437 continue_one_thread, suspend_one_thread,
438 get_child_debug_event): Adjust.
439
9179355e
SM
4402017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
441
442 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
443 * inferiors.h: Include <list>.
444 (struct process_info) <entry>: Remove field.
445 <pid>: New field.
446 (pid_of): Change macro to function.
447 (ptid_of, lwpid_of): Remove macro.
448 (all_processes): Change type to std::list<process_info *>.
449 (ALL_PROCESSES): Remove macro.
450 (for_each_process, find_process): New function.
451 * inferiors.c (all_processes): Change type to
452 std::list<process_info *>.
453 (find_thread_process): Adjust.
454 (add_process): Likewise.
455 (remove_process): Likewise.
456 (find_process_pid): Likewise.
457 (get_first_process): Likewise.
458 (started_inferior_callback): Remove.
459 (have_started_inferiors_p): Adjust.
460 (attached_inferior_callback): Remove.
461 (have_attached_inferiors_p): Adjust.
462 * linux-low.c (check_zombie_leaders): Likewise.
463 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
464 (x86_linux_update_xmltarget): Adjust.
465 * server.c (handle_query): Likewise.
466 (gdb_reattached_process): Remove.
467 (handle_status): Adjust.
468 (kill_inferior_callback): Likewise.
469 (detach_or_kill_inferior): Remove.
470 (print_started_pid): Likewise.
471 (print_attached_pid): Likewise.
472 (detach_or_kill_for_exit): Update.
473 (process_serial_event): Likewise.
474 * linux-arm-low.c (arm_new_fork): Likewise.
475
c9cb8905
SM
4762017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
477
478 * dll.h: Include <list>.
479 (struct dll_info): Add constructor.
480 <entry>: Remove field.
481 (all_dlls): Change type to std::list<dll_info>.
482 * dll.c: Include <algorithm>.
483 (get_dll): Remove macro.
484 (all_dlls): Change type to std::list<dll_info *>.
485 (free_one_dll): Remove.
486 (match_dll): Likewise.
487 (loaded_dll): Adjust.
488 (unloaded_dll): Adjust to all_dlls type change, use
489 std::find_if. Inline code from match_dll.
490 (clear_dlls): Adjust to all_dlls type change.
491 * server.c (emit_dll_description): Remove.
492 (handle_qxfer_libraries): Adjust to all_dlls type change,
493 integrate emit_dll_description's functionality.
494
04ec7890
SM
4952017-10-12 Simon Marchi <simon.marchi@ericsson.com>
496
497 * linux-low.h (struct linux_target_ops) <delete_process>: New
498 field.
499 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
500 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
501 (struct linux_target_ops): Add delete_process callback.
502 * linux-arm-low.c (arm_delete_process): New.
503 (struct linux_target_ops): Add delete_process callback.
504 * linux-bfin-low.c (struct linux_target_ops): Likewise.
505 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
506 * linux-m32r-low.c (struct linux_target_ops): Likewise.
507 * linux-mips-low.c (mips_linux_delete_process): New.
508 (struct linux_target_ops): Add delete_process callback.
509 * linux-ppc-low.c (struct linux_target_ops): Likewise.
510 * linux-s390-low.c (struct linux_target_ops): Likewise.
511 * linux-sh-low.c (struct linux_target_ops): Likewise.
512 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
513 * linux-tile-low.c (struct linux_target_ops): Likewise.
514 * linux-x86-low.c (x86_linux_delete_process): New.
515 (struct linux_target_ops): Add delete_process callback.
516 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
517
466eecee
SM
5182017-10-12 Simon Marchi <simon.marchi@ericsson.com>
519
520 * linux-aarch64-low.c (the_low_target): Add thread delete
521 callback.
522 * linux-arm-low.c (arm_delete_thread): New function.
523 (the_low_target): Add thread delete callback.
524 * linux-bfin-low.c (the_low_target): Likewise.
525 * linux-crisv32-low.c (the_low_target): Likewise.
526 * linux-low.c (delete_lwp): Invoke delete_thread callback if
527 set.
528 * linux-low.h (struct linux_target_ops) <delete_thread>: New
529 field.
530 * linux-m32r-low.c (the_low_target): Add thread delete callback.
531 * linux-mips-low.c (mips_linux_delete_thread): New function.
532 (the_low_target): Add thread delete callback.
533 * linux-ppc-low.c (the_low_target): Likewise.
534 * linux-s390-low.c (the_low_target): Likewise.
535 * linux-sh-low.c (the_low_target): Likewise.
536 * linux-tic6x-low.c (the_low_target): Likewise.
537 * linux-tile-low.c (the_low_target): Likewise.
538 * linux-x86-low.c (the_low_target): Likewise.
539 * linux-xtensa-low.c (the_low_target): Likewise.
540
b79f7801
YZ
5412017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
542
543 * win32-low.c: Include "common-inferior.h".
544
bc3b087d
SDJ
5452017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
546
547 * inferiors.c (set_inferior_cwd): New function.
548 * server.c (handle_general_set): Handle QSetWorkingDir packet.
549 (handle_query): Inform that QSetWorkingDir is supported.
550 * win32-low.c (create_process): Pass the inferior's cwd to
551 CreateProcess.
552
d092c5a2
SDJ
5532017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
554
555 * inferiors.c (current_inferior_cwd): New global variable.
556 (get_inferior_cwd): New function.
557 * inferiors.h (struct process_info) <cwd>: New field.
558
7da0a886
SDJ
5592017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
560
561 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
562 (OBS): Add gdb_tilde_expand.o.
563
289a6840
SM
5642017-10-02 Simon Marchi <simon.marchi@ericsson.com>
565
566 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
567 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
568
256642e8
PA
5692017-09-29 Pedro Alves <palves@redhat.com>
570
571 * ax.c (gdb_parse_agent_expr): Constify.
572 * ax.h (gdb_parse_agent_expr): Constify.
573 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
574 Constify.
575 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
576 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
577 * remote-utils.h (read_ptid): Constify.
578 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
579 (process_point_options, process_serial_event): Constify.
580 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
581 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
582 (cmd_qtbuffer): Constify.
583
5b9ca4d4
PA
5842017-09-29 Pedro Alves <palves@redhat.com>
585
586 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
587 fails.
588
94c207e0
PA
5892017-09-29 Pedro Alves <palves@redhat.com>
590
591 * linux-low.c (handle_extended_wait): Pass parent thread instead
592 of process to thread_db_notice_clone.
593 * linux-low.h (thread_db_notice_clone): Replace parent process
594 parameter with parent thread parameter.
595 * thread-db.c (find_one_thread): Add comment.
596 (thread_db_notice_clone): Replace parent process parameter with
597 parent thread parameter. Temporarily switch to the parent thread.
598
75352e28
SDJ
5992017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
600
601 * gdbthread.h: Include "common-gdbthread.h".
602 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
603 "if" when validating the ptid.
604 * remote-utils.c: Include "gdbthread.h".
605 (prepare_resume_reply): Use "switch_to_thread".
606 * target.c (done_accessing_memory): Likewise.
607
ad339634
AA
6082017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
609
610 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
611 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
612 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
613 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
614 s390x-gs-linux64-ipa.o to ipa_obj.
615 * linux-s390-low.c (HWCAP_S390_GS): New define.
616 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
617 New functions.
618 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
619 (s390_arch_setup): Check for guarded-storage support and choose
620 appropriate tdesc.
621 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
622 init_registers_s390x_gs_linux64.
623 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
624 enum value.
625 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
626 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
627
cc4d742f
SM
6282017-09-22 Simon Marchi <simon.marchi@ericsson.com>
629
630 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
631
f6327dcb
KB
6322017-09-21 Kevin Buettner <kevinb@redhat.com>
633
634 * linux-low.h (struct lwp_info): Add new field, thread_handle.
635 (thread_db_thread_handle): Declare.
636 * linux-low.c (linux_target_ops): Initialize thread_handle.
637 * server.c (handle_qxfer_threads_worker): Add support for
638 "handle" attribute.
639 * target.h (struct target_ops): Add new function pointer,
640 thread_handle.
641 (target_thread_handle): Define.
642 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
643 field in lwp.
644 (thread_db_thread_handle): New function.
645
86299109
KB
6462017-09-21 Kevin Buettner <kevinb@redhat.com>
647
648 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
649 * linux-low.h (thread_db_notice_clone): Declare.
650 * thread-db.c (thread_db_notice_clone): New function.
651
f557a88a
PA
6522017-09-21 Pedro Alves <palves@redhat.com>
653
654 * server.c (gdb_read_memory, handle_status, process_serial_event)
655 (handle_serial_event, handle_target_event): Adjust to
656 set_desired_thread prototype change.
657 * target.c (set_desired_thread): Remove 'use_general' parameter
658 and adjust.
659 * target.h (set_desired_thread): Remove 'use_general' parameter.
660
223ffa71
TT
6612017-09-20 Tom Tromey <tom@tromey.com>
662
663 * target.c (target_terminal::terminal_state): Define.
664 (target_terminal::init): Rename from target_terminal_init.
665 (target_terminal::inferior): Rename from
666 target_terminal_inferior.
667 (target_terminal::ours): Rename from target_terminal_ours.
668 (target_terminal::ours_for_output, target_terminal::info): New.
669
04fd3ba9
SM
6702017-09-16 Simon Marchi <simon.marchi@ericsson.com>
671
672 * server.c (accumulate_file_name_length): Remove.
673 (emit_dll_description): Adjust to std::string change.
674 (handle_qxfer_libraries): Use std::string to hold document.
675
5e187554
SM
6762017-09-16 Simon Marchi <simon.marchi@ericsson.com>
677
678 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
679 return type of xml_escape_text.
680 * server.c (emit_dll_description): Likewise.
681
1526853e
SM
6822017-09-16 Simon Marchi <simon.marchi@ericsson.com>
683
684 * server.c (captured_main): Accept argument for --selftest.
685 Update run_tests call.
686 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
687 when registering selftests.
688
c4dfafab
SDJ
6892017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
690
691 * regcache.c (get_thread_regcache): Update code to use "std::vector"
692 instead of "VEC" for "target_desc.reg_defs".
693 (regcache_cpy): Likewise.
694 (registers_to_string): Likewise.
695 (registers_from_string): Likewise.
696 (find_regno): Likewise.
697 (supply_regblock): Likewise.
698 (regcache_raw_read_unsigned): Likewise.
699 * tdesc.c (init_target_desc): Likewise.
700 (tdesc_create_reg): Likewise.
701 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
702 (struct target_desc) <reg_defs>: Convert to "std::vector".
703 (target_desc): Do not initialize "reg_defs".
704 (~target_desc): Update code to use "std::vector" instead of "VEC"
705 for "target_desc.reg_defs".
706 (operator==): Likewise.
707
124aceb4
SM
7082017-09-15 Simon Marchi <simon.marchi@ericsson.com>
709
710 * inferiors.h (thread_to_gdb_id): Remove.
711 * inferiors.c (thread_to_gdb_id): Remove.
712 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
713 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
714 lynx_store_registers, lynx_read_memory, lynx_write_memory):
715 Likewise.
716 * nto-low.c (nto_fetch_registers, nto_store_registers,
717 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
718
96cde54f
SM
7192017-09-15 Simon Marchi <simon.marchi@ericsson.com>
720
721 * inferiors.h (gdb_id_to_thread_id): Remove.
722 * inferiors.c (gdb_id_to_thread_id): Remove.
723 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
724 removal. Move pid declaration closer to where it's used.
725
e8ca139e
SM
7262017-09-15 Simon Marchi <simon.marchi@ericsson.com>
727
728 * server.c (handle_detach): New function.
729 (process_serial_event): Move code out, call handle_detach.
730
f8a4e119
SM
7312017-09-15 Simon Marchi <simon.marchi@ericsson.com>
732
733 * server.c (require_running): Rename to ...
734 (require_running_or_return): ... this ...
735 (require_running_or_break): ... and this.
736 (handle_query, process_serial_event): Adjust.
737
0eb0a407
SM
7382017-09-15 Simon Marchi <simon.marchi@ericsson.com>
739
740 * linux-low.c (linux_set_resume_request): Remove unused
741 variables.
742
785922a5
SM
7432017-09-15 Simon Marchi <simon.marchi@ericsson.com>
744
745 * server.c (first_thread_of): Remove.
746 (process_serial_event): Replace usage of first_thread_of with
747 find_any_thread_of_pid.
748 * tracepoint.c (same_process_p): Remove.
749 (gdb_agent_about_to_close): Replace usage of same_process_p with
750 find_any_thread_of_pid.
751 * linux-x86-low.c (same_process_callback): Remove.
752 (x86_arch_setup_process_callback): Replace usage of
753 same_process_callback with find_any_thread_of_pid.
754 * thread-db.c (any_thread_of): Remove.
755 (switch_to_process): Replace usage of any_thread_of with
756 find_any_thread_of_pid.
757 * inferiors.c (thread_pid_matches_callback): Remove.
758 (find_thread_process): Adjust to use find_any_thread_of_pid.
759
a059f00c
SDJ
7602017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
761
762 * regcache.c (get_thread_regcache): Guard calls to "memset"
763 with "!VEC_empty".
764
cc397f3a
SDJ
7652017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
766
767 * linux-low.c (handle_extended_wait): Use
768 "allocate_target_description" instead of "XNEW".
769 * linux-x86-low.c (initialize_low_arch): Likewise.
770
22916b07
YQ
7712017-09-05 Yao Qi <yao.qi@linaro.org>
772
773 * configure.srv (srv_i386_regobj): Remove.
774 (srv_amd64_regobj): Remove.
775 (srv_regobj): Set it to "" for x86 non-linux targets.
776 * linux-x86-tdesc.c (i386_linux_read_description):
777 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
778 (init_registers_i386): Remove the declaration.
779 (tdesc_i386): Remove the declaration.
780 (lynx_i386_arch_setup): Call i386_create_target_description.
781 * nto-x86-low.c: Likewise.
782 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
783 [!__x86_64__]: include arch/i386.h.
784 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
785
38602d55
YQ
7862017-09-05 Yao Qi <yao.qi@linaro.org>
787
788 * configure.srv (srv_amd64_linux_xmlfiles): Remove
789 i386/amd64-XXX-linux from it.
790
44b886ff
YQ
7912017-09-05 Yao Qi <yao.qi@linaro.org>
792
793 * configure.srv: Empty srv_amd64_linux_regobj if $development is
794 false.
795 (ipa_amd64_linux_regobj): Remove.
796 (ipa_x32_linux_regobj): Remove.
797
b4570e4b
YQ
7982017-09-05 Yao Qi <yao.qi@linaro.org>
799
800 * Makefile.in (arch-amd64.o): New rule.
801 * configure.srv: Append arch-amd64.o.
802 * linux-amd64-ipa.c: Include common/x86-xstate.h.
803 (get_ipa_tdesc): Call amd64_linux_read_description.
804 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
805 and init_registers_amd64_XXX.
806 * linux-x86-low.c (x86_linux_read_description): Call
807 amd64_linux_read_description.
808 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
809 (initialize_low_arch): Don't call init_registers_x32_XXX and
810 init_registers_amd64_XXX.
811 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
812 and tdesc_amd64_XXX.
813 [__x86_64__] (amd64_tdesc_test): New function.
814 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
815 and init_registers_amd64_XXX.
816 * linux-x86-tdesc.c: Include arch/amd64.h.
817 (xcr0_to_tdesc_idx): New function.
818 (i386_linux_read_description): New function.
819 (amd64_get_ipa_tdesc_idx): New function.
820 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
821 (amd64_get_ipa_tdesc): Declare.
822
d1f28ea2
YQ
8232017-09-05 Yao Qi <yao.qi@linaro.org>
824
825 * configure.srv (srv_i386_linux_xmlfiles): Remove
826 i386/i386-XXX-linux.xml from it.
827
25a93583
YQ
8282017-09-05 Yao Qi <yao.qi@linaro.org>
829
830 * configure.srv: Set srv_i386_linux_regobj empty if $development
831 is false.
832 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
833 initialize_low_tdesc.
834 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
835 with #if initialize_low_tdesc.
836 * linux-x86-tdesc-selftest.c: New file.
837 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
838
5f035c07
YQ
8392017-09-05 Yao Qi <yao.qi@linaro.org>
840
841 * Makefile.in (arch-i386.o): New rule.
842 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
843 (x86_64-*-linux*): Likewise.
844 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
845 include arch/i386.h.
846 (i386_linux_read_description): Remove code and call
847 i386_create_target_description.
848 * tdesc.c (allocate_target_description): New function.
849 * tdesc.h (set_tdesc_architecture): Remove declaration.
850 (set_tdesc_osabi): Likewise.
851
0abe8a89
YQ
8522017-09-05 Yao Qi <yao.qi@linaro.org>
853
854 * linux-x86-tdesc.c: Don't include <inttypes.h>.
855 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
856 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
857 .xmltarget.
858 * server.c (get_features_xml): Call tdesc_get_features_xml.
859 * tdesc.c (set_tdesc_architecture): New function.
860 (set_tdesc_osabi): New function.
861 (tdesc_get_features_xml): New function.
862 (tdesc_create_feature): Add an argument.
863 * tdesc.h (struct target_desc) <features>: New field.
864 <arch, osabi>: New field.
865 (~target_desc): xfree features, arch, and osabi.
866 (target_desc::oerator==): Don't compare .xmltarget.
867 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
868 (set_tdesc_osabi): Likewise.
869 (tdesc_get_features_xml): Likewise.
870
0a188386
YQ
8712017-09-05 Yao Qi <yao.qi@linaro.org>
872
873 * linux-x86-tdesc.c: Include selftest.h.
874 (i386_tdesc_test): New function.
875 (initialize_low_tdesc): Call selftests::register_test.
876 * tdesc.h: Include regdef.h.
877 (target_desc): Override operator == and !=.
878
f49ff000
YQ
8792017-09-05 Yao Qi <yao.qi@linaro.org>
880
881 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
882 (ipa_obj): Likewise.
883 * linux-i386-ipa.c: Include common/x86-xstate.h
884 (get_ipa_tdesc): Call i386_linux_read_description.
885 (initialize_low_tracepoint): Don't call init_registers_XXX
886 functions, call initialize_low_tdesc instead.
887 * linux-x86-low.c (x86_linux_read_description): Call
888 i386_linux_read_description.
889 (initialize_low_arch): Don't call init_registers_i386_XXX
890 functions, call initialize_low_tdesc.
891 * linux-x86-tdesc.c: New file.
892 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
893 (i386_get_ipa_tdesc_idx): Declare.
894 (i386_get_ipa_tdesc): Declare.
895 (initialize_low_tdesc): Declare.
896
2b68ef2f
YQ
8972017-09-05 Yao Qi <yao.qi@linaro.org>
898
899 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
900 instead of 0.
901
f7000548
YQ
9022017-09-05 Yao Qi <yao.qi@linaro.org>
903
904 * Makefile.in (IPA_OBJS): Add vec-ipa.o
905 * regcache.c (get_thread_regcache): Use VEC_length.
906 (init_register_cache): Likewise.
907 (regcache_cpy): Likewise.
908 (registers_to_string): Iterate reg_defs via VEC_iterate.
909 (find_regno): Likewise.
910 (find_register_by_number): Use VEC_index.
911 (register_size): Call find_register_by_number.
912 (register_data): Call find_register_by_number.
913 (supply_regblock): Use VEC_length.
914 (regcache_raw_read_unsigned): Likewise.
915 * tdesc.c (init_target_desc): Iterate reg_defs via
916 VEC_iterate.
917 (default_description): Update initializer.
918 (copy_target_description): Don't update field num_registers.
919 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
920 <num_registers>: Remove.
921
50a421ac
SM
9222017-09-04 Simon Marchi <simon.marchi@ericsson.com>
923
924 * Makefile.in (.SECONDARY): Define target.
925
23fdd69e
SM
9262017-09-03 Simon Marchi <simon.marchi@ericsson.com>
927
928 * linux-low.c (linux_wait_1): Adjust.
929 * server.c (queue_stop_reply_callback): Adjust.
930
0a2dde4a
SDJ
9312017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
932
933 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
934 QEnvironmentUnset and QEnvironmentReset packets.
935 (handle_query): Inform remote that QEnvironmentHexEncoded,
936 QEnvironmentUnset and QEnvironmentReset are supported.
937
6afd337d
SM
9382017-08-25 Simon Marchi <simon.marchi@ericsson.com>
939
940 * inferiors.h (inferior_target_data): Rename to ...
941 (thread_target_data): ... this.
942 (inferior_regcache_data): Rename to ...
943 (thread_regcache_data): ... this.
944 (set_inferior_regcache_data): Rename to ...
945 (set_thread_regcache_data): ... this.
946 * inferiors.c (inferior_target_data): Rename to ...
947 (thread_target_data): ... this.
948 (inferior_regcache_data): Rename to ...
949 (thread_regcache_data): ... this.
950 (set_inferior_regcache_data): Rename to ...
951 (set_thread_regcache_data): ... this.
952 (free_one_thread): Update.
953 * linux-low.h (get_thread_lwp): Update.
954 * regcache.c (get_thread_regcache): Update.
955 (regcache_invalidate_thread): Update.
956 (free_register_cache_thread): Update.
957 * win32-i386-low.c (update_debug_registers_callback): Update.
958 (win32_get_current_dr): Update.
959 * win32-low.c (thread_rec): Update.
960 (delete_thread_info): Update.
961 (continue_one_thread): Update.
962 (suspend_one_thread): Update.
963
a160cc46
SM
9642017-08-24 Simon Marchi <simon.marchi@ericsson.com>
965
966 * inferiors.c (set_inferior_target_data): Remove.
967 * inferiors.h (set_inferior_target_data): Remove.
968
6d580b63
YQ
9692017-08-18 Yao Qi <yao.qi@linaro.org>
970
971 * Makefile.in (OBS): Add selftest.o.
972 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
973 * configure, config.in: Re-generated.
974 * server.c: Include common/sefltest.h.
975 (captured_main): Handle option --selftest.
976
f5a29eb0
YQ
9772017-08-09 Yao Qi <yao.qi@linaro.org>
978
979 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
980 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
981 i386-avx-mpx.o and i386-mmx.o.
982 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
983 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
984 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
985 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
986 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
987 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
988 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
989 i386/amd64-avx-mpx.xml.
990
57757c2f
YQ
9912017-08-09 Yao Qi <yao.qi@linaro.org>
992
993 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
994 and x32-avx-avx512.o.
995 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
996 i386/x32-avx-avx512.xml.
997
229d26fc
SM
9982017-07-26 Simon Marchi <simon.marchi@ericsson.com>
999
1000 * tracepoint.h (enum class fast_tpoint_collect_result): New
1001 enumeration.
1002 (fast_tracepoint_collecting): Change return type to
1003 fast_tpoint_collect_result.
1004 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1005 * linux-low.h: Include tracepoint.h.
1006 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1007 fast_tpoint_collect_result.
1008 * linux-low.c (handle_tracepoints): Adjust.
1009 (linux_fast_tracepoint_collecting): Change return type to
1010 fast_tpoint_collect_result.
1011 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1012 linux_wait_1, stuck_in_jump_pad_callback,
1013 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1014 proceed_one_lwp): Adjust to type change.
1015
2e1e43e1
YQ
10162017-07-10 Yao Qi <yao.qi@linaro.org>
1017
1018 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1019
adc764e7
YQ
10202017-06-29 Yao Qi <yao.qi@linaro.org>
1021
1022 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1023 Remove.
1024 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1025
a206891a
SM
10262017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1027
1028 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1029
9a6c7d9c
SDJ
10302017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1031
1032 * linux-low.c (linux_create_inferior): Adjust code to access the
1033 environment information via 'gdb_environ' class.
1034 * lynx-low.c (lynx_create_inferior): Likewise.
1035 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1036 (get_environ): Return a pointer to 'our_environ'.
1037 (captured_main): Initialize 'our_environ'.
1038 * server.h (get_environ): Adjust prototype.
1039 * spu-low.c (spu_create_inferior): Adjust code to access the
1040 environment information via 'gdb_environ' class.
1041
ae3e2ccf
SM
10422017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1043
1044 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1045 usage of "register" keyword.
1046
3e019bdc
SM
10472017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1048
1049 * configure: Re-generate.
1050
8465943a
SM
10512017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1052
1053 * configure: Re-generate.
1054
cf0dd6f0
SM
10552017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1056
1057 * Makefile.in (COMPILE.pre): Add "-x c++".
1058
9845682b
SDJ
10592017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1060
1061 * fork-child.c: Conditionally include <signal.h>.
1062
aefd8b33
SDJ
10632017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1064
1065 * server.c (handle_general_set): Handle new packet
1066 "QStartupWithShell".
1067 (handle_query): Add "QStartupWithShell" to the list of supported
1068 packets.
1069 (gdbserver_usage): Add help text explaining the
1070 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1071 options.
1072 (captured_main): Recognize and act upon the presence of the new
1073 CLI options.
1074
2090129c
SDJ
10752017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1076 Pedro Alves <palves@redhat.com>
1077
1078 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1079 * configure: Regenerate.
1080 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1081 "fork-inferior.o".
1082 (i[34567]86-*-lynxos*): Likewise.
1083 (spu*-*-*): Likewise.
1084 * fork-child.c: New file.
1085 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1086 and "environ.h".
1087 (linux_ptrace_fun): New function.
1088 (linux_create_inferior): Adjust function prototype to reflect
1089 change on "target.h". Adjust function code to use
1090 "fork_inferior".
1091 (linux_request_interrupt): Delete "signal_pid".
1092 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1093 (lynx_ptrace_fun): New function.
1094 (lynx_create_inferior): Adjust function prototype to reflect
1095 change on "target.h". Adjust function code to use
1096 "fork_inferior".
1097 * nto-low.c (nto_create_inferior): Adjust function prototype and
1098 code to reflect change on "target.h". Update comments.
1099 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1100 "common-terminal.h" and "environ.h".
1101 (terminal_fd): Moved to fork-child.c.
1102 (old_foreground_pgrp): Likewise.
1103 (restore_old_foreground_pgrp): Likewise.
1104 (last_status): Make it global.
1105 (last_ptid): Likewise.
1106 (our_environ): New variable.
1107 (startup_with_shell): Likewise.
1108 (program_name): Likewise.
1109 (program_argv): Rename to...
1110 (program_args): ...this.
1111 (wrapper_argv): New variable.
1112 (start_inferior): Delete function.
1113 (get_exec_wrapper): New function.
1114 (get_exec_file): Likewise.
1115 (get_environ): Likewise.
1116 (prefork_hook): Likewise.
1117 (post_fork_inferior): Likewise.
1118 (postfork_hook): Likewise.
1119 (postfork_child_hook): Likewise.
1120 (handle_v_run): Update code to deal with arguments coming from the
1121 remote host. Update calls from "start_inferior" to
1122 "create_inferior".
1123 (captured_main): Likewise. Initialize environment variable. Call
1124 "have_job_control".
1125 * server.h (post_fork_inferior): New prototype.
1126 (get_environ): Likewise.
1127 (last_status): Declare.
1128 (last_ptid): Likewise.
1129 (signal_pid): Likewise.
1130 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1131 (spu_ptrace_fun): New function.
1132 (spu_create_inferior): Adjust function prototype to reflect change
1133 on "target.h". Adjust function code to use "fork_inferior".
1134 * target.c (target_terminal_init): New function.
1135 (target_terminal_inferior): Likewise.
1136 (target_terminal_ours): Likewise.
1137 * target.h: Include <vector>.
1138 (struct target_ops) <create_inferior>: Update prototype.
1139 (create_inferior): Update macro.
1140 * utils.c (gdb_flush_out_err): New function.
1141 * win32-low.c (win32_create_inferior): Adjust function prototype
1142 and code to reflect change on "target.h".
1143
043a4934
SDJ
11442017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1145
1146 * inferiors.c (switch_to_thread): New function.
1147
15652511
SDJ
11482017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1149
1150 * Makefile.in (SFILE): Add "common/job-control.c".
1151 (OBS): Add "job-control.o".
1152
21ea5acd
SDJ
11532017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1154
1155 * Makefile: Remove "@host_makefile_frag@".
1156
e13cb306
PA
11572017-05-05 Pedro Alves <palves@redhat.com>
1158
1159 * configure: Regenerate.
1160
c94fee56
SDJ
11612017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1162
1163 * configure: Regenerate.
1164
a0ff9e1a
SM
11652017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1166
1167 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1168 software_single_step change of return type to
1169 std::vector<CORE_ADDR>.
1170 * linux-low.c (install_software_single_step_breakpoints):
1171 Likewise.
1172 * linux-low.h (install_software_single_step_breakpoints):
1173 Likewise.
1174
be628ab8
SDJ
11752017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1176
1177 * remote-utils.c: Include "gdb_termios.h" instead of
1178 "terminal.h".
1179 * terminal.h: Delete file.
1180
7c5ded6a
SDJ
11812017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1182
1183 * server.c: Include <vector>.
1184 <program_argv, wrapper_argv>: Convert to std::vector.
1185 (start_inferior): Rewrite function to use C++.
1186 (handle_v_run): Likewise. Update code that calculates the argv
1187 based on the vRun packet; use C++.
1188 (captured_main): Likewise.
1189
436252de
SM
11902017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1191
1192 * server.c (handle_v_cont): Initialize thread_resume::thread
1193 with null_ptid.
1194
9bf2a700
PA
11952017-04-05 Pedro Alves <palves@redhat.com>
1196
1197 * configure: Regenerate.
1198
a121b7c1
PA
11992017-04-05 Pedro Alves <palves@redhat.com>
1200
1201 * gdbreplay.c (sync_error): Constify.
1202 * linux-x86-low.c (push_opcode): Constify.
1203
21c8a587
PA
12042017-04-05 Pedro Alves <palves@redhat.com>
1205
1206 * win32-low.c (get_child_debug_event)
1207 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1208 Report TARGET_WAITKIND_SPURIOUS instead.
1209
fb32b4f7
PA
12102017-04-05 Pedro Alves <palves@redhat.com>
1211
1212 * remote-utils.c (remote_prepare, remote_open): Constify.
1213 * remote-utils.h (remote_prepare, remote_open): Constify.
1214 * server.c (captured_main): Constify 'port' handling.
1215
65dd1e59
SM
12162017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1217
1218 * Makefile.in (clean): Clear .deps.
1219
8fa5b777
SM
12202017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1221
1222 * .gitignore: Remove generated files, replace with wildcard.
1223 * (clean): Replace removal of generated files with wildcard.
1224 (version.c): Replace with...
1225 (version-generated.c): ...this.
1226 (xml-builtin.c): Replace with...
1227 (xml-builtin-generated.c): ...this.
1228 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1229 (%.c: *regformats*): Replace with...
1230 (%-generated.c: *regformats*): ...this.
1231
a12e714b
MF
12322017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1233
1234 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1235 (xtensa_fill_gregset): Call collect_register_by_name for
1236 threadptr register.
1237 (xtensa_store_gregset): Call supply_register_by_name for
1238 threadptr register.
1239
1a09b50a
MF
12402017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1241
1242 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1243 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1244 (xtensa_store_gregset): Call supply_register for all registers in
1245 a0_regnum..a0_regnum + C0_NREGS range.
1246
1a01e7c6
SM
12472017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1248
1249 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1250 (ax-ipa.o: ax.c): Remove.
1251 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1252 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1253 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1254 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1255 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1256
36bc18a8
SM
12572017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1258
1259 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1260 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1261 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1262 (errors-ipa.o: ../common/errors.c): Remove.
1263 (format-ipa.o: ../common/format.c): Remove.
1264 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1265
a8ebe3d5
SM
12662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1267
1268 * Makefile.in (%-ipa.o: %.c): New rule.
1269 (tracepoint-ipa.o: tracepoint.c): Remove.
1270 (utils-ipa.o: utils.c): Remove.
1271 (remote-utils-ipa.o: remote-utils.c): Remove.
1272 (regcache-ipa.o: regcache.c): Remove.
1273 (i386-linux-ipa.o: i386-linux.c): Remove.
1274 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1275 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1276 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1277 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1278 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1279 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1280 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1281 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1282 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1283 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1284 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1285 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1286 (aarch64-ipa.o: aarch64.c): Remove.
1287 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1288 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1289 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1290 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1291 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1292 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1293 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1294 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1295 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1296 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1297 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1298 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1299 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1300 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1301 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1302 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1303 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1304 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1305 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1306 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1307 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1308 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1309 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1310 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1311 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1312 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1313 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1314 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1315 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1316 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1317 (tdesc-ipa.o: tdesc.c): Remove.
1318 (x32-linux-ipa.o: x32-linux.c): Remove.
1319 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1320 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1321
50cfacb7
SM
13222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1323
1324 * Makefile.in (%.o: ../arch/%.c): New rule.
1325 (arm.o: ../arch/arm.c): Remove.
1326 (arm-linux.o: ../arch/arm-linux.c): Remove.
1327 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1328 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1329
c5a22423
SM
13302017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1331
1332 * Makefile.in (%.o: ../nat/%.c): New rule.
1333 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1334 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1335 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1336 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1337 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1338 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1339 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1340 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1341 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1342 (linux-personality.o: ../nat/linux-personality.c): Remove.
1343 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1344 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1345 (x86-linux.o: ../nat/x86-linux.c): Remove.
1346 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1347 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1348
6bda016b
SM
13492017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1350
1351 * Makefile.in (%.o: ../common/%.c): New rule.
1352 (signals.o: ../common/signals.c): Remove.
1353 (print-utils.o: ../common/print-utils.c): Remove.
1354 (rsp-low.o: ../common/rsp-low.c): Remove.
1355 (common-utils.o: ../common/common-utils.c): Remove.
1356 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1357 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1358 (vec.o: ../common/vec.c): Remove.
1359 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1360 (xml-utils.o: ../common/xml-utils.c): Remove.
1361 (ptid.o: ../common/ptid.c): Remove.
1362 (buffer.o: ../common/buffer.c): Remove.
1363 (format.o: ../common/format.c): Remove.
1364 (filestuff.o: ../common/filestuff.c): Remove.
1365 (agent.o: ../common/agent.c): Remove.
1366 (errors.o: ../common/errors.c): Remove.
1367 (environ.o: ../common/environ.c): Remove.
1368 (common-debug.o: ../common/common-debug.c): Remove.
1369 (cleanups.o: ../common/cleanups.c): Remove.
1370 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1371 (fileio.o: ../common/fileio.c): Remove.
1372 (common-regcache.o: ../common/common-regcache.c): Remove.
1373 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1374 (new-op.o: ../common/new-op.c): Remove.
1375 (btrace-common.o: ../common/btrace-common.c): Remove.
1376
21122961
SM
13772017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1378
1379 * Makefile.in (%.o: ../target/%.c): New rule.
1380 (waitstatus.o: ../target/waitstatus.c): Remove.
1381
c362e621
SM
13822017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1383
1384 * Makefile.in
1385 (%.c: ../regformats/%.dat,
1386 (%.c: ../regformats/arm/%.dat,
1387 (%.c: ../regformats/i386/%.dat,
1388 (%.c: ../regformats/rs6000/%.dat): New rules.
1389 (aarch64.c): Remove.
1390 (reg-arm.c): Remove.
1391 (arm-with-iwmmxt.c): Remove.
1392 (arm-with-vfpv2.c): Remove.
1393 (arm-with-vfpv3.c): Remove.
1394 (arm-with-neon.c): Remove.
1395 (reg-bfin.c): Remove.
1396 (reg-cris.c): Remove.
1397 (reg-crisv32.c): Remove.
1398 (i386.c): Remove.
1399 (i386-linux.c): Remove.
1400 (i386-avx.c): Remove.
1401 (i386-avx-linux.c): Remove.
1402 (i386-avx-avx512.c): Remove.
1403 (i386-avx-avx512-linux.c): Remove.
1404 (i386-mpx.c): Remove.
1405 (i386-mpx-linux.c): Remove.
1406 (i386-avx-mpx-avx512-pku.c): Remove.
1407 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1408 (i386-avx-mpx.c): Remove.
1409 (i386-avx-mpx-linux.c): Remove.
1410 (i386-mmx.c): Remove.
1411 (i386-mmx-linux.c): Remove.
1412 (reg-ia64.c): Remove.
1413 (reg-m32r.c): Remove.
1414 (reg-m68k.c): Remove.
1415 (reg-cf.c): Remove.
1416 (mips-linux.c): Remove.
1417 (mips-dsp-linux.c): Remove.
1418 (mips64-linux.c): Remove.
1419 (mips64-dsp-linux.c): Remove.
1420 (nios2-linux.c): Remove.
1421 (powerpc-32.c): Remove.
1422 (powerpc-32l.c): Remove.
1423 (powerpc-altivec32l.c): Remove.
1424 (powerpc-cell32l.c): Remove.
1425 (powerpc-vsx32l.c): Remove.
1426 (powerpc-isa205-32l.c): Remove.
1427 (powerpc-isa205-altivec32l.c): Remove.
1428 (powerpc-isa205-vsx32l.c): Remove.
1429 (powerpc-e500l.c): Remove.
1430 (powerpc-64l.c): Remove.
1431 (powerpc-altivec64l.c): Remove.
1432 (powerpc-cell64l.c): Remove.
1433 (powerpc-vsx64l.c): Remove.
1434 (powerpc-isa205-64l.c): Remove.
1435 (powerpc-isa205-altivec64l.c): Remove.
1436 (powerpc-isa205-vsx64l.c): Remove.
1437 (s390-linux32.c): Remove.
1438 (s390-linux32v1.c): Remove.
1439 (s390-linux32v2.c): Remove.
1440 (s390-linux64.c): Remove.
1441 (s390-linux64v1.c): Remove.
1442 (s390-linux64v2.c): Remove.
1443 (s390-te-linux64.c): Remove.
1444 (s390-vx-linux64.c): Remove.
1445 (s390-tevx-linux64.c): Remove.
1446 (s390x-linux64.c): Remove.
1447 (s390x-linux64v1.c): Remove.
1448 (s390x-linux64v2.c): Remove.
1449 (s390x-te-linux64.c): Remove.
1450 (s390x-vx-linux64.c): Remove.
1451 (s390x-tevx-linux64.c): Remove.
1452 (tic6x-c64xp-linux.c): Remove.
1453 (tic6x-c64x-linux.c): Remove.
1454 (tic6x-c62x-linux.c): Remove.
1455 (reg-sh.c): Remove.
1456 (reg-sparc64.c): Remove.
1457 (reg-spu.c): Remove.
1458 (amd64.c): Remove.
1459 (amd64-linux.c): Remove.
1460 (amd64-avx.c): Remove.
1461 (amd64-avx-linux.c): Remove.
1462 (amd64-avx-avx512.c): Remove.
1463 (amd64-avx-avx512-linux.c): Remove.
1464 (amd64-mpx.c): Remove.
1465 (amd64-mpx-linux.c): Remove.
1466 (amd64-avx-mpx-avx512-pku.c): Remove.
1467 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1468 (amd64-avx-mpx.c): Remove.
1469 (amd64-avx-mpx-linux.c): Remove.
1470 (x32.c): Remove.
1471 (x32-linux.c): Remove.
1472 (x32-avx.c): Remove.
1473 (x32-avx-linux.c): Remove.
1474 (x32-avx-avx512.c): Remove.
1475 (x32-avx-avx512-linux.c): Remove.
1476 (reg-xtensa.c): Remove.
1477 (reg-tilegx.c): Remove.
1478 (reg-tilegx32.c): Remove.
1479
1672e0d9
SDJ
14802017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1481
1482 * Makefile.in (SFILES): Add "common/environ.c".
1483 (OBJS): Add "common/environ.h".
1484
239b6d10
WT
14852017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1486
1487 * configure.ac: Check if the fs_base and gs_base members of
1488 `struct user_regs_struct' exist.
1489 * config.in: Regenerated.
1490 * configure: Likewise.
1491
694b382c
AT
14922017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1493
1494 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1495 target_read_memory.
1496 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1497 (get_next_pcs_syscall_next_pc): Likewise.
1498
7dc53023
LM
14992016-12-23 Luis Machado <lgustavo@codesourcery.com>
1500
1501 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1502 * nto-x86-low.c: Likewise.
1503
ad02e4fe
SM
15042016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1505
1506 * Makefile.in: Include disable-implicit-rules.mk.
1507
dcb07cfa
PA
15082016-11-23 Pedro Alves <palves@redhat.com>
1509
1510 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1511 (debug_vprintf): Use std::chrono::steady_clock instead of
1512 gettimeofday. Use '.' instead of ':'.
1513 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1514 (get_timestamp): Use std::chrono::steady_clock instead of
1515 gettimeofday.
1516
8629c02c
SM
15172016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1518
1519 * Makefile.in: Fix whitespace formatting.
1520
b593ecca
SM
15212016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1522
1523 * Makefile.in (SFILES, OBS): Flatten list and order
1524 alphabetically.
1525
9986ba08
PA
15262016-11-23 Pedro Alves <palves@redhat.com>
1527
1528 * event-loop.c (handle_file_event): Use warning.
1529 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1530 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1531 Use warning.
1532
4eefa7bc
PA
15332016-11-23 Pedro Alves <palves@redhat.com>
1534
1535 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1536 output.
1537 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1538 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1539 debug_printf and debug_flush for debug output.
1540 * server.c (handle_general_set): Likewise.
1541 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1542 output.
1543
5443506e
SM
15442016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1545
1546 * Makefile.in (.c.o): Replace rule with ...
1547 (%.o: %.c): ... this one.
1548
3b165252
SM
15492016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1550
1551 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1552 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1553 make.
1554 * configure.ac: Remove checks for the make program.
1555 * configure: Re-generate.
1556
0bcda685
PA
15572016-10-28 Pedro Alves <palves@redhat.com>
1558
1559 * Makefile.in (CXX_DIALECT): Get from configure.
1560 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1561 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1562 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1563 * config.in: Regenerate.
1564 * configure: Regenerate.
1565
c3805894
YQ
15662016-10-27 Yao Qi <yao.qi@linaro.org>
1567
1568 * linux-low.c (linux_supports_range_stepping): Return true if
1569 can_software_single_step return true.
1570
89342618
YQ
15712016-10-27 Yao Qi <yao.qi@linaro.org>
1572
1573 * inferiors.c (find_inferior_in_random): New function.
1574 * inferiors.h (find_inferior_in_random): Declare.
1575 * linux-low.c (linux_wait_for_event_filtered): Call
1576 find_inferior_in_random instead of find_inferior.
1577
e3652c84
YQ
15782016-10-27 Yao Qi <yao.qi@linaro.org>
1579
1580 * linux-low.c (linux_wait_1): If single-step breakpoints are
1581 inserted, remove them.
1582
5a04c4cf
PA
15832016-10-26 Pedro Alves <palves@redhat.com>
1584
1585 * linux-low.c (handle_extended_wait): Link parent/child fork
1586 threads.
1587 (linux_wait_1): Unlink them.
1588 (linux_set_resume_request): Ignore resume requests for
1589 already-resumed and unhandled fork child threads.
1590 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1591 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1592 New functions.
1593 (handle_v_requests) <vCont>: Don't call require_running.
1594 * server.h (in_queued_stop_replies): New declaration.
1595
cb93dc7f
YQ
15962016-10-24 Yao Qi <yao.qi@linaro.org>
1597
1598 PR server/20733
1599 * linux-aarch64-low.c (append_insns): Cast the return value to
1600 'uint32_t *'.
1601
a1078bea
YQ
16022016-10-10 Yao Qi <yao.qi@linaro.org>
1603
1604 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1605
1fb77080
SDJ
16062016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1607
1608 * target.c (target_supports_multi_process): New function, moved
1609 from...
1610 * target.h (target_supports_multi_process): ... here. Remove
1611 macro.
1612
39b5a3b9
TT
16132016-10-05 Tom Tromey <tom@tromey.com>
1614
1615 PR remote/20655:
1616 * tracepoint.c (handle_tracepoint_bkpts): Check
1617 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1618
c1d0b70a
YQ
16192016-10-05 Yao Qi <yao.qi@linaro.org>
1620
1621 * configure.srv: Update the path of arm-*.xml files.
1622
0a69eedb
YQ
16232016-10-05 Terry Guo <terry.guo@arm.com>
1624 Yao Qi <yao.qi@linaro.org>
1625
1626 * Makefile.in: Adjust the path of rules.
1627 * configure.srv: Update the path of xml files.
1628 * regformats/arm-with-iwmmxt.dat: Regenerated.
1629 * regformats/arm-with-neon.dat: Likewise.
1630 * regformats/arm-with-vfpv2.dat: Likewise.
1631 * regformats/arm-with-vfpv3.dat Likewise.
1632
17e16485
YQ
16332016-09-30 Yao Qi <yao.qi@linaro.org>
1634
1635 PR gdbserver/20627
1636 * target.c (target_stop_and_wait): Don't call
1637 target_continue_no_signal, use resume_stop instead.
1638
edeeb602
YQ
16392016-09-26 Yao Qi <yao.qi@linaro.org>
1640
1641 * linux-low.c (linux_wait_1): Call debug_exit.
1642
503b1c39
PA
16432016-09-23 Pedro Alves <palves@redhat.com>
1644
1645 * Makefile.in (SFILES): Add common/new-op.c.
1646 (OBS): Add common/new-op.o.
1647 (new-op.o): New rule.
1648
74172ecf
SM
16492016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1650
1651 * .gitinore: Ignore more files.
1652
fc6cda2e
YQ
16532016-09-21 Yao Qi <yao.qi@linaro.org>
1654
1655 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1656 23.
1657
bc1e6c81
SDJ
16582016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1659
1660 * server.c (start_inferior): Call target_mourn_inferior instead of
1661 mourn_inferior; pass ptid_t argument to it.
1662 (resume): Likewise.
1663 (handle_target_event): Likewise.
1664 * target.c (target_mourn_inferior): New function.
1665 * target.h (mourn_inferior): Delete macro.
1666
0e00e962
AA
16672016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1668
1669 * linux-low.c (lwp_is_stepping): New function.
1670
1d8cb77d
CL
16712016-09-06 Carl Love <cel@us.ibm.com>
1672
1673 * server.c (start_inferior): Fixed comment, requested comment change
1674 didn't get updated correctly. Removed reference to ptrace () call as
1675 it is only true on Linux systems.
1676
7313bced
CL
16772016-09-06 Carl Love <cel@us.ibm.com>
1678
1679 * server.c (start_inferior): Do not call
1680 function target_post_create_inferior () if the
1681 inferior process has already exited.
1682
cf6de44d
PA
16832016-09-05 Pedro Alves <palves@redhat.com>
1684
1685 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1686 (COMPILE.pre, CC_LD): Use CXX directly.
1687 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1688 * acinclude.m4: Don't include build-with-cxx.m4.
1689 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1690 * configure: Regenerate.
1691
c1da6748
AT
16922016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1693
1694 PR gdb/19495
1695 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1696 call writing data to own_buf.
1697
f2b9e3df
SDJ
16982016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1699
1700 * target.c (mywait): Call target_wait instead of
1701 the_target->wait.
1702 (target_wait): New function.
1703
049a8570
SDJ
17042016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1705
1706 * server.c (start_inferior): New variable 'ptid'. Replace calls
1707 to the_target->resume by target_continue{,_no_signal}, depending
1708 on the case.
1709 * target.c (target_stop_and_wait): Call target_continue_no_signal
1710 instead of the_target->resume.
1711 (target_continue): New function.
1712
3aa5cfa0
AT
17132016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1714
1715 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1716
754653a7
AZ
17172016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1718
1719 PR server/20491
1720 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1721 ps_prochandle.
1722 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1723 * linux-arm-low.c (ps_get_thread_area): Likewise.
1724 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1725 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1726 * linux-mips-low.c (ps_get_thread_area): Likewise.
1727 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1728 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1729 * linux-x86-low.c (ps_get_thread_area): Likewise.
1730 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1731
ed036b40
PA
17322016-08-19 Pedro Alves <palves@redhat.com>
1733
1734 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1735
c8ef42ee
PA
17362016-08-19 Pedro Alves <palves@redhat.com>
1737
1738 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1739 comment. Use memcpy instead of casting through unsigned long.
1740
9c235a72
PA
17412016-08-19 Pedro Alves <palves@redhat.com>
1742
1743 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1744 allocating around 0x80000000.
1745
201506da
PA
17462016-08-19 Pedro Alves <palves@redhat.com>
1747
1748 PR gdb/20415
1749 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1750 (x32-avx512-linux-ipa.o): New rules.
1751 * configure.ac (x86_64-*-linux*): New x32 check.
1752 * configure.srv (ipa_x32_linux_regobj): New.
1753 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1754 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1755 descriptions.
1756 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1757 descriptions.
1758 * configure: Regenerate.
1759
f348d89a
PA
17602016-08-09 Pedro Alves <palves@redhat.com>
1761
1762 PR gdb/18653
1763 * Makefile.in (OBS): Add signals-state-save-restore.o.
1764 (signals-state-save-restore.o): New rule.
1765 * config.in: Regenerate.
1766 * configure: Regenerate.
1767 * linux-low.c: Include "signals-state-save-restore.h".
1768 (linux_create_inferior): Call
1769 restore_original_signals_state.
1770 * server.c: Include "dispositions-save-restore.h".
1771 (captured_main): Call save_original_signals_state.
1772
1baf5149
PA
17732016-08-05 Pedro Alves <palves@redhat.com>
1774
1775 * configure: Regenerate.
1776
fcd4a73d
YQ
17772016-08-04 Yao Qi <yao.qi@linaro.org>
1778
1779 * linux-low.c (regsets_fetch_inferior_registers): Check
1780 errno is ESRCH or not.
1781
979659d0
YQ
17822016-08-02 Yao Qi <yao.qi@linaro.org>
1783
1784 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1785 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1786 (thread_db_load_search): Update.
1787 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1788 td_ta_set_event and td_ta_event_getmsg.
1789
6598661d
PA
17902016-07-26 Pedro Alves <palves@redhat.com>
1791
1792 PR server/20414
1793 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1794 of unsigned long for 64-bit registers and use uint32_t instead of
1795 unsigned int for 32-bit registers.
1796
9cf12d57
PA
17972016-07-26 Pedro Alves <palves@redhat.com>
1798
1799 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1800 to 'ptrace'.
1801
305450ed
TT
18022016-07-21 Tom Tromey <tom@tromey.com>
1803
1804 * configure: Rebuild.
1805
2583da7c
YQ
18062016-07-21 Yao Qi <yao.qi@linaro.org>
1807
1808 * mem-break.c (find_gdb_breakpoint): Cast bp to
1809 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1810
21536b36
YQ
18112016-07-21 Yao Qi <yao.qi@linaro.org>
1812
1813 * server.c (handle_v_requests): Support s and S actions
1814 if target_supports_software_single_step return true.
1815
8901d193
YQ
18162016-07-21 Yao Qi <yao.qi@linaro.org>
1817
1818 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1819 is resume_step, call maybe_hw_step.
1820 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1821 and unstop them.
1822 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1823 breakpoints or not.
1824 (proceed_one_lwp): If resume request is resume_step, install
1825 reinsert breakpoints and call maybe_hw_step.
1826
0e9a339e
YQ
18272016-07-21 Yao Qi <yao.qi@linaro.org>
1828
1829 * linux-low.c (proceed_one_lwp): Declare.
1830 (linux_resume_one_thread): Remove local variable 'step'.
1831 Lift code enqueue signal. Call proceed_one_lwp instead of
1832 linux_resume_one_lwp.
1833
4281b351
YQ
18342016-07-21 Yao Qi <yao.qi@linaro.org>
1835
1836 * linux-low.c (linux_resume_one_thread): Call
1837 enqueue_pending_signal.
1838
984a2c04
YQ
18392016-07-21 Yao Qi <yao.qi@linaro.org>
1840
1841 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1842 * inferiors.c (do_restore_current_thread_cleanup): New function.
1843 (make_cleanup_restore_current_thread): Likewise.
1844 * linux-low.c (install_software_single_step_breakpoints): Call
1845 make_cleanup_restore_current_thread. Switch current_thread to
1846 thread.
1847
bec903c9
YQ
18482016-07-21 Yao Qi <yao.qi@linaro.org>
1849
1850 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1851 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1852 (clone_one_breakpoint): Likewise.
1853 (delete_reinsert_breakpoints): Change parameter to thread.
1854 Callers updated.
1855 (has_reinsert_breakpoints): Likewise.
1856 (uninsert_reinsert_breakpoints): Likewise.
1857 (reinsert_reinsert_breakpoints): Likewise.
1858 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1859 (delete_reinsert_breakpoints): Likewise.
1860 (reinsert_reinsert_breakpoints): Likewise.
1861 (uninsert_reinsert_breakpoints): Likewise.
1862 (has_reinsert_breakpoints): Likewise.
1863
63c40ec7
YQ
18642016-07-21 Yao Qi <yao.qi@linaro.org>
1865
1866 * inferiors.c (get_thread_process): Make parameter const.
1867 * inferiors.h (get_thread_process): Update declaration.
1868 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1869 Add new parameters child_thread and parent_thread. Callers
1870 updated.
1871 * mem-break.h (clone_all_breakpoints): Update declaration.
1872
9aa76cd0
YQ
18732016-07-21 Yao Qi <yao.qi@linaro.org>
1874
1875 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1876 <command_list, handler>: Remove.
1877 (struct gdb_breakpoint): New.
1878 (struct other_breakpoint): New.
1879 (struct reinsert_breakpoint): New.
1880 (is_gdb_breakpoint): New function.
1881 (any_persistent_commands): Update command_list if
1882 is_gdb_breakpoint returns true.
1883 (set_breakpoint): Create breakpoints according to their types.
1884 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1885 (set_gdb_breakpoint_1): Likewise.
1886 (set_gdb_breakpoint): Likewise.
1887 (clear_breakpoint_conditions): Change parameter type to
1888 'struct gdb_breakpoint *'.
1889 (clear_breakpoint_commands): Likewise.
1890 (clear_breakpoint_conditions_and_commands): Likewise.
1891 (add_condition_to_breakpoint): Likewise.
1892 (add_breakpoint_condition): Likewise.
1893 (add_commands_to_breakpoint): Likewise.
1894 (check_breakpoints): Check other_breakpoint.
1895 (clone_one_breakpoint): Clone breakpopint according to its type.
1896 * mem-break.h (struct gdb_breakpoint): Declare.
1897 (set_gdb_breakpoint): Update declaration.
1898 (clear_breakpoint_conditions_and_commands): Likewise.
1899 (add_breakpoint_condition): Likewise.
1900 (add_breakpoint_commands): Likewise.
1901 * server.c (process_point_options): Change parameter type to
1902 'struct gdb_breakpoint *'.
1903
811f8301
YQ
19042016-07-21 Yao Qi <yao.qi@linaro.org>
1905
1906 * mem-break.c (set_breakpoint_at): Rename it to ...
1907 (set_breakpoint_type_at): ... it.
1908 (set_breakpoint_at): Call set_breakpoint_type_at.
1909 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1910 * mem-break.h (set_breakpoint_at): Update comments.
1911
b1c51e36
CLT
19122016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1913
1914 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1915 to buf parameter.
1916 (nios2_store_gregset): Likewise.
1917
ced2dffb
PA
19182016-07-01 Pedro Alves <palves@redhat.com>
1919 Antoine Tremblay <antoine.tremblay@ericsson.com>
1920
1921 * linux-low.c: Change interface to take the target lwp_info
1922 pointer directly and return void. Handle detaching from a zombie
1923 thread.
1924 (linux_detach_lwp_callback): New function.
1925 (linux_detach): Detach from the leader thread after detaching from
1926 the clone threads.
1927
2ac09a5b
YQ
19282016-06-28 Yao Qi <yao.qi@linaro.org>
1929
1930 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1931 for variable new_offset.
1932 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1933 (aarch64_ftrace_insn_reloc_cb): Likewise.
1934 (aarch64_ftrace_insn_reloc_tb): Likewise.
1935 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1936 PRIx64 instead of PRIx32.
1937
79e7fd4f
YQ
19382016-06-28 Yao Qi <yao.qi@linaro.org>
1939
1940 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1941 (the_low_target): Install arm_get_syscall_trapinfo.
1942
061fc021
YQ
19432016-06-28 Yao Qi <yao.qi@linaro.org>
1944
1945 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1946 function.
1947 (the_low_target): Install aarch64_get_syscall_trapinfo.
1948
4cc32bec
YQ
19492016-06-28 Yao Qi <yao.qi@linaro.org>
1950
1951 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1952 Callers updated.
1953 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1954 Remove parameter sysno.
1955 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1956 sysret.
1957
782c1122
AA
19582016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1959
1960 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1961 (s390_emit_ne_goto): Likewise.
1962 (s390_emit_lt_goto): Likewise.
1963 (s390_emit_le_goto): Likewise.
1964 (s390_emit_gt_goto): Likewise.
1965 (s390_emit_ge_goto): Likewise.
1966 (s390x_emit_eq_goto): Likewise.
1967 (s390x_emit_ne_goto): Likewise.
1968 (s390x_emit_lt_goto): Likewise.
1969 (s390x_emit_le_goto): Likewise.
1970 (s390x_emit_gt_goto): Likewise.
1971 (s390x_emit_ge_goto): Likewise.
1972 (s390_emit_ops_impl): Mark variable static.
1973 (s390x_emit_ops): Likewise.
1974
2e7b624b
YQ
19752016-06-17 Yao Qi <yao.qi@linaro.org>
1976
1977 * linux-low.c (handle_extended_wait): Call
1978 uninsert_reinsert_breakpoints for the parent process. Remove
1979 reinsert breakpoints from the child process. Reinsert them to
1980 the parent process when vfork is done.
1981 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1982 (reinsert_reinsert_breakpoints): New function.
1983 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1984 (reinsert_reinsert_breakpoints): Declare.
1985
8a81c5d7
YQ
19862016-06-17 Yao Qi <yao.qi@linaro.org>
1987
1988 * linux-low.c (handle_extended_wait): If the parent is doing
1989 step-over, remove the reinsert breakpoints from the forked child.
1990
f50bf8e5
YQ
19912016-06-17 Yao Qi <yao.qi@linaro.org>
1992
1993 * linux-low.c (unsuspend_all_lwps): Declare.
1994 (linux_low_filter_event): If thread exited, call finish_step_over.
1995 If step-over is finished, unsuspend other threads.
1996
8376a3cb
YQ
19972016-06-17 Yao Qi <yao.qi@linaro.org>
1998
1999 * linux-low.c (linux_resume_one_lwp_throw): Assert
2000 has_reinsert_breakpoints returns false.
2001 * mem-break.c (delete_disabled_breakpoints): Assert
2002 bp type isn't reinsert_breakpoint.
2003
f79b145d
YQ
20042016-06-17 Yao Qi <yao.qi@linaro.org>
2005
2006 * linux-low.c (maybe_hw_step): New function.
2007 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2008 (finish_step_over): Switch current_thread to lwp temporarily,
2009 and assert has_reinsert_breakpoints returns true.
2010 (proceed_one_lwp): Call maybe_hw_step.
2011 * mem-break.c (has_reinsert_breakpoints): New function.
2012 * mem-break.h (has_reinsert_breakpoints): Declare.
2013
0ae534d2
JT
20142016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2015
2016 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2017
fcdad592
YQ
20182016-05-17 Yao Qi <yao.qi@linaro.org>
2019
2020 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2021 instead of find_inferior.
2022
9e784964
YQ
20232016-05-05 Yao Qi <yao.qi@linaro.org>
2024
2025 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2026 Initialize res to zero.
2027
cf2ebb6e
YQ
20282016-05-05 Yao Qi <yao.qi@linaro.org>
2029
2030 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2031 to uint32_t.
2032
c1aebf87
UW
20332016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2034
2035 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2036 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2037 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2038
35fd2deb 20392016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2040 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2041
2042 * tracepoint.c (write_inferior_int8): New function.
2043 (cmd_qtenable_disable): Write enable flag using
2044 write_inferior_int8.
2045
484b3c32
YQ
20462016-04-25 Yao Qi <yao.qi@linaro.org>
2047
2048 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2049 (need_step_over_p): Return zero if the LWP has pending signals
2050 can be delivered on software single step target.
2051
85ba7d86
YQ
20522016-04-25 Yao Qi <yao.qi@linaro.org>
2053
2054 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2055 return instead of error.
2056
3539aa13
YQ
20572016-04-22 Yao Qi <yao.qi@linaro.org>
2058
2059 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2060 to 23.
2061
5b061e98
YQ
20622016-04-22 Yao Qi <yao.qi@linaro.org>
2063
2064 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2065 signal when stepping over breakpoint with software single
2066 step.
2067
3451269c
PA
20682016-04-21 Pedro Alves <palves@redhat.com>
2069
2070 * linux-s390-low.c (s390_collect_ptrace_register)
2071 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2072 add casts.
2073 (s390_check_regset): Use void * instead of gdb_byte *.
2074
a2358508
PA
20752016-04-20 Pedro Alves <palves@redhat.com>
2076
2077 * configure: Renegerate.
2078
6885166d
YQ
20792016-04-20 Yao Qi <yao.qi@linaro.org>
2080
2081 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2082 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2083 number 16.
2084 (arm_store_gregset): Likewise.
2085
2b863f51
WT
20862016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2087
2088 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2089 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2090 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2091 (amd64-avx-mpx-linux.c): New rules.
2092 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2093 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2094 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2095 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2096 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2097 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2098 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2099 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2100 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2101 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2102 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2103 * linux-x86-low.c (x86_linux_read_description): Add case for
2104 X86_XSTATE_AVX_MPX_MASK.
2105 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2106 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2107 init_registers_i386_avx_mpx_linux.
2108 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2109 (initialize_low_tracepoint): Call
2110 init_registers_i386_avx_mpx_linux.
2111 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2112 (initialize_low_tracepoint): Call
2113 init_registers_amd64_avx_mpx_linux.
2114 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2115 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2116 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2117 declarations.
2118
9b30624b
PA
21192016-04-18 Pedro Alves <palves@redhat.com>
2120
2121 * configure: Regenerate.
2122
45e3745e
AT
21232016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2124
2125 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2126 (aarch64_emit_sub): Likewise.
2127
2afc13ff
PA
21282016-04-12 Pedro Alves <palves@redhat.com>
2129
2130 * utils.c (prepare_to_throw_exception): Delete.
2131
6e774b13
SM
21322016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2133
2134 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2135
4dca19f8
MK
21362016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2137
2138 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2139
d0a9981f
MK
21402016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2141
2142 * linux-aarch64-ipa.c: Add <elf.h> include.
2143 * linux-ppc-ipa.c: Add <elf.h> include.
2144 * linux-s390-ipa.c: Add <elf.h> include.
2145
252db07e
MK
21462016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2147
2148 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2149 (get_raw_reg_ptr): Likewise.
2150 (get_trace_state_variable_value_ptr): Likewise.
2151 (set_trace_state_variable_value_ptr): Likewise.
2152 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2153 char *.
2154
14e2b6d9
MK
21552016-03-31 Wei-cheng Wang <cole945@gmail.com>
2156 Marcin Kościelnicki <koriakin@0x04.net>
2157
2158 PR/17221
2159 * linux-ppc-low.c (emit_insns): New function.
2160 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2161 (ppc_emit_prologue): New function.
2162 (ppc_emit_epilogue): New function.
2163 (ppc_emit_add): New function.
2164 (ppc_emit_sub): New function.
2165 (ppc_emit_mul): New function.
2166 (ppc_emit_lsh): New function.
2167 (ppc_emit_rsh_signed): New function.
2168 (ppc_emit_rsh_unsigned): New function.
2169 (ppc_emit_ext): New function.
2170 (ppc_emit_zero_ext): New function.
2171 (ppc_emit_log_not): New function.
2172 (ppc_emit_bit_and): New function.
2173 (ppc_emit_bit_or): New function.
2174 (ppc_emit_bit_xor): New function.
2175 (ppc_emit_bit_not): New function.
2176 (ppc_emit_equal): New function.
2177 (ppc_emit_less_signed): New function.
2178 (ppc_emit_less_unsigned): New function.
2179 (ppc_emit_ref): New function.
2180 (ppc_emit_const): New function.
2181 (ppc_emit_reg): New function.
2182 (ppc_emit_pop): New function.
2183 (ppc_emit_stack_flush): New function.
2184 (ppc_emit_swap): New function.
2185 (ppc_emit_stack_adjust): New function.
2186 (ppc_emit_call): New function.
2187 (ppc_emit_int_call_1): New function.
2188 (ppc_emit_void_call_2): New function.
2189 (ppc_emit_if_goto): New function.
2190 (ppc_emit_goto): New function.
2191 (ppc_emit_eq_goto): New function.
2192 (ppc_emit_ne_goto): New function.
2193 (ppc_emit_lt_goto): New function.
2194 (ppc_emit_le_goto): New function.
2195 (ppc_emit_gt_goto): New function.
2196 (ppc_emit_ge_goto): New function.
2197 (ppc_write_goto_address): New function.
2198 (ppc_emit_ops_impl): New static variable.
2199 (ppc64v1_emit_prologue): New function.
2200 (ppc64v2_emit_prologue): New function.
2201 (ppc64_emit_epilogue): New function.
2202 (ppc64_emit_add): New function.
2203 (ppc64_emit_sub): New function.
2204 (ppc64_emit_mul): New function.
2205 (ppc64_emit_lsh): New function.
2206 (ppc64_emit_rsh_signed): New function.
2207 (ppc64_emit_rsh_unsigned): New function.
2208 (ppc64_emit_ext): New function.
2209 (ppc64_emit_zero_ext): New function.
2210 (ppc64_emit_log_not): New function.
2211 (ppc64_emit_bit_and): New function.
2212 (ppc64_emit_bit_or): New function.
2213 (ppc64_emit_bit_xor): New function.
2214 (ppc64_emit_bit_not): New function.
2215 (ppc64_emit_equal): New function.
2216 (ppc64_emit_less_signed): New function.
2217 (ppc64_emit_less_unsigned): New function.
2218 (ppc64_emit_ref): New function.
2219 (ppc64_emit_const): New function.
2220 (ppc64v1_emit_reg): New function.
2221 (ppc64v2_emit_reg): New function.
2222 (ppc64_emit_pop): New function.
2223 (ppc64_emit_stack_flush): New function.
2224 (ppc64_emit_swap): New function.
2225 (ppc64v1_emit_call): New function.
2226 (ppc64v2_emit_call): New function.
2227 (ppc64v1_emit_int_call_1): New function.
2228 (ppc64v2_emit_int_call_1): New function.
2229 (ppc64v1_emit_void_call_2): New function.
2230 (ppc64v2_emit_void_call_2): New function.
2231 (ppc64_emit_if_goto): New function.
2232 (ppc64_emit_eq_goto): New function.
2233 (ppc64_emit_ne_goto): New function.
2234 (ppc64_emit_lt_goto): New function.
2235 (ppc64_emit_le_goto): New function.
2236 (ppc64_emit_gt_goto): New function.
2237 (ppc64_emit_ge_goto): New function.
2238 (ppc64v1_emit_ops_impl): New static variable.
2239 (ppc64v2_emit_ops_impl): New static variable.
2240 (ppc_emit_ops): New function.
2241 (linux_low_target): Wire in ppc_emit_ops.
2242
a2174ba4
MK
22432016-03-31 Wei-cheng Wang <cole945@gmail.com>
2244 Marcin Kościelnicki <koriakin@0x04.net>
2245
2246 PR/17221
2247 * Makefile.in: Add powerpc-*-ipa.o
2248 * configure.srv: Add ipa_obj for powerpc*-linux.
2249 * linux-ppc-ipa.c: New file.
2250 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2251 includes.
2252 (PPC_FIELD): New macro.
2253 (PPC_SEXT): New macro.
2254 (PPC_OP6): New macro.
2255 (PPC_BO): New macro.
2256 (PPC_LI): New macro.
2257 (PPC_BD): New macro.
2258 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2259 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2260 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2261 (ppc_get_thread_area): New function.
2262 (is_elfv2_inferior): New function.
2263 (gen_ds_form): New function.
2264 (GEN_STD): New macro.
2265 (GEN_STDU): New macro.
2266 (GEN_LD): New macro.
2267 (GEN_LDU): New macro.
2268 (gen_d_form): New function.
2269 (GEN_ADDI): New macro.
2270 (GEN_ADDIS): New macro.
2271 (GEN_LI): New macro.
2272 (GEN_LIS): New macro.
2273 (GEN_ORI): New macro.
2274 (GEN_ORIS): New macro.
2275 (GEN_LWZ): New macro.
2276 (GEN_STW): New macro.
2277 (GEN_STWU): New macro.
2278 (gen_xfx_form): New function.
2279 (GEN_MFSPR): New macro.
2280 (GEN_MTSPR): New macro.
2281 (GEN_MFCR): New macro.
2282 (GEN_MTCR): New macro.
2283 (GEN_SYNC): New macro.
2284 (GEN_LWSYNC): New macro.
2285 (gen_x_form): New function.
2286 (GEN_OR): New macro.
2287 (GEN_MR): New macro.
2288 (GEN_LWARX): New macro.
2289 (GEN_STWCX): New macro.
2290 (GEN_CMPW): New macro.
2291 (gen_md_form): New function.
2292 (GEN_RLDICL): New macro.
2293 (GEN_RLDICR): New macro.
2294 (gen_i_form): New function.
2295 (GEN_B): New macro.
2296 (GEN_BL): New macro.
2297 (gen_b_form): New function.
2298 (GEN_BNE): New macro.
2299 (GEN_LOAD): New macro.
2300 (GEN_STORE): New macro.
2301 (gen_limm): New function.
2302 (gen_atomic_xchg): New function.
2303 (gen_call): New function.
2304 (ppc_relocate_instruction): New function.
2305 (ppc_install_fast_tracepoint_jump_pad): New function.
2306 (ppc_get_min_fast_tracepoint_insn_len): New function.
2307 (ppc_get_ipa_tdesc_idx): New function.
2308 (the_low_target): Wire in the new functions.
2309 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2310 tdescs.
2311 * linux-ppc-tdesc.h: New file.
2312
a13c4696
MK
23132016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2314
2315 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2316 (alloc_jump_pad_buffer): New function.
2317 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2318 (alloc_jump_pad_buffer): New function.
2319 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2320 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2321 (alloc_jump_pad_buffer): New function.
2322 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2323 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2324 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2325 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2326
1cda1512
MK
23272016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2328
2329 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2330 * linux-amd64-ipa.c: Likewise.
2331 * linux-i386-ipa.c: Likewise.
2332 * linux-s390-ipa.c: Likewise.
2333 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2334 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2335 set_trace_state_variable_value_ptr.
2336 (struct ipa_sym_addresses): Likewise.
2337 (symbol_list): Likewise.
2338 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2339 accessing gdb_collect directly.
2340 (gdb_collect_ptr_type): New typedef.
2341 (get_raw_reg_ptr_type): New typedef.
2342 (get_trace_state_variable_value_ptr_type): New typedef.
2343 (set_trace_state_variable_value_ptr_type): New typedef.
2344 (gdb_collect_ptr): New global.
2345 (get_raw_reg_ptr): New global.
2346 (get_trace_state_variable_value_ptr): New global.
2347 (set_trace_state_variable_value_ptr): New global.
2348 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2349 accessing get_raw_reg directly.
2350 (get_get_tsv_func_addr): Likewise for
2351 get_trace_state_variable_value_ptr.
2352 (get_set_tsv_func_addr): Likewise for
2353 set_trace_state_variable_value_ptr.
2354 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2355
72fb5488
SM
23562016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2357
2358 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2359
28170b88
MK
23602016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2361
2362 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2363 packets.
2364 (relocate_instruction): Remove own_buf.
2365 * server.c (own_buf): Make global.
2366 (handle_v_requests): Make global.
2367 * server.h (own_buf): New declaration.
2368 (handle_v_requests): New prototype.
2369
f39e8743
MK
23702016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2371
2372 PR 18377
2373 * linux-s390-low.c (add_insns): New function.
2374 (s390_emit_prologue): New function.
2375 (s390_emit_epilogue): New function.
2376 (s390_emit_add): New function.
2377 (s390_emit_sub): New function.
2378 (s390_emit_mul): New function.
2379 (s390_emit_lsh): New function.
2380 (s390_emit_rsh_signed): New function.
2381 (s390_emit_rsh_unsigned): New function.
2382 (s390_emit_ext): New function.
2383 (s390_emit_log_not): New function.
2384 (s390_emit_bit_and): New function.
2385 (s390_emit_bit_or): New function.
2386 (s390_emit_bit_xor): New function.
2387 (s390_emit_bit_not): New function.
2388 (s390_emit_equal): New function.
2389 (s390_emit_less_signed): New function.
2390 (s390_emit_less_unsigned): New function.
2391 (s390_emit_ref): New function.
2392 (s390_emit_if_goto): New function.
2393 (s390_emit_goto): New function.
2394 (s390_write_goto_address): New function.
2395 (s390_emit_litpool): New function.
2396 (s390_emit_const): New function.
2397 (s390_emit_call): New function.
2398 (s390_emit_reg): New function.
2399 (s390_emit_pop): New function.
2400 (s390_emit_stack_flush): New function.
2401 (s390_emit_zero_ext): New function.
2402 (s390_emit_swap): New function.
2403 (s390_emit_stack_adjust): New function.
2404 (s390_emit_set_r2): New function.
2405 (s390_emit_int_call_1): New function.
2406 (s390_emit_void_call_2): New function.
2407 (s390_emit_eq_goto): New function.
2408 (s390_emit_ne_goto): New function.
2409 (s390_emit_lt_goto): New function.
2410 (s390_emit_le_goto): New function.
2411 (s390_emit_gt_goto): New function.
2412 (s390_emit_ge_goto): New function.
2413 (s390x_emit_prologue): New function.
2414 (s390x_emit_epilogue): New function.
2415 (s390x_emit_add): New function.
2416 (s390x_emit_sub): New function.
2417 (s390x_emit_mul): New function.
2418 (s390x_emit_lsh): New function.
2419 (s390x_emit_rsh_signed): New function.
2420 (s390x_emit_rsh_unsigned): New function.
2421 (s390x_emit_ext): New function.
2422 (s390x_emit_log_not): New function.
2423 (s390x_emit_bit_and): New function.
2424 (s390x_emit_bit_or): New function.
2425 (s390x_emit_bit_xor): New function.
2426 (s390x_emit_bit_not): New function.
2427 (s390x_emit_equal): New function.
2428 (s390x_emit_less_signed): New function.
2429 (s390x_emit_less_unsigned): New function.
2430 (s390x_emit_ref): New function.
2431 (s390x_emit_if_goto): New function.
2432 (s390x_emit_const): New function.
2433 (s390x_emit_call): New function.
2434 (s390x_emit_reg): New function.
2435 (s390x_emit_pop): New function.
2436 (s390x_emit_stack_flush): New function.
2437 (s390x_emit_zero_ext): New function.
2438 (s390x_emit_swap): New function.
2439 (s390x_emit_stack_adjust): New function.
2440 (s390x_emit_int_call_1): New function.
2441 (s390x_emit_void_call_2): New function.
2442 (s390x_emit_eq_goto): New function.
2443 (s390x_emit_ne_goto): New function.
2444 (s390x_emit_lt_goto): New function.
2445 (s390x_emit_le_goto): New function.
2446 (s390x_emit_gt_goto): New function.
2447 (s390x_emit_ge_goto): New function.
2448 (s390_emit_ops): New function.
2449 (struct linux_target_ops): Fill in emit_ops hook.
2450
abd9baf9
MK
24512016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2452
2453 PR 18377
2454 * Makefile.in: Add s390 IPA files.
2455 * configure.srv: Build IPA for s390.
2456 * linux-s390-ipa.c: New file.
2457 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2458 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2459 (tdesc_s390_linux32): Likewise.
2460 (init_registers_s390_linux32v1): Likewise.
2461 (tdesc_s390_linux32v1): Likewise.
2462 (init_registers_s390_linux32v2): Likewise.
2463 (tdesc_s390_linux32v2): Likewise.
2464 (init_registers_s390_linux64): Likewise.
2465 (tdesc_s390_linux64): Likewise.
2466 (init_registers_s390_linux64v1): Likewise.
2467 (tdesc_s390_linux64v1): Likewise.
2468 (init_registers_s390_linux64v2): Likewise.
2469 (tdesc_s390_linux64v2): Likewise.
2470 (init_registers_s390_te_linux64): Likewise.
2471 (tdesc_s390_te_linux64): Likewise.
2472 (init_registers_s390_vx_linux64): Likewise.
2473 (tdesc_s390_vx_linux64): Likewise.
2474 (init_registers_s390_tevx_linux64): Likewise.
2475 (tdesc_s390_tevx_linux64): Likewise.
2476 (init_registers_s390x_linux64): Likewise.
2477 (tdesc_s390x_linux64): Likewise.
2478 (init_registers_s390x_linux64v1): Likewise.
2479 (tdesc_s390x_linux64v1): Likewise.
2480 (init_registers_s390x_linux64v2): Likewise.
2481 (tdesc_s390x_linux64v2): Likewise.
2482 (init_registers_s390x_te_linux64): Likewise.
2483 (tdesc_s390x_te_linux64): Likewise.
2484 (init_registers_s390x_vx_linux64): Likewise.
2485 (tdesc_s390x_vx_linux64): Likewise.
2486 (init_registers_s390x_tevx_linux64): Likewise.
2487 (tdesc_s390x_tevx_linux64): Likewise.
2488 (have_hwcap_s390_vx): New static variable.
2489 (s390_arch_setup): Fill have_hwcap_s390_vx.
2490 (s390_get_thread_area): New function.
2491 (s390_ft_entry_gpr_esa): New const.
2492 (s390_ft_entry_gpr_zarch): New const.
2493 (s390_ft_entry_misc): New const.
2494 (s390_ft_entry_fr): New const.
2495 (s390_ft_entry_vr): New const.
2496 (s390_ft_main_31): New const.
2497 (s390_ft_main_64): New const.
2498 (s390_ft_exit_fr): New const.
2499 (s390_ft_exit_vr): New const.
2500 (s390_ft_exit_misc): New const.
2501 (s390_ft_exit_gpr_esa): New const.
2502 (s390_ft_exit_gpr_zarch): New const.
2503 (append_insns): New function.
2504 (s390_relocate_instruction): New function.
2505 (s390_install_fast_tracepoint_jump_pad): New function.
2506 (s390_get_min_fast_tracepoint_insn_len): New function.
2507 (s390_get_ipa_tdesc_idx): New function.
2508 (struct linux_target_ops): Wire in the above functions.
2509 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2510 * linux-s390-tdesc.h: New file.
2511
a4105d04
MK
25122016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2513
2514 * linux-s390-low.c (s390_supports_tracepoints): New function.
2515 (struct linux_target_ops): Fill supports_tracepoints hook.
2516
35ac8b3e
YQ
25172016-03-18 Yao Qi <yao.qi@linaro.org>
2518
2519 * linux-low.c (lwp_signal_can_be_delivered): New function.
2520 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2521
94610ec4
YQ
25222016-03-18 Yao Qi <yao.qi@linaro.org>
2523
2524 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2525 0 if signal is enqueued. Remove 'signal' from one debugging
2526 message. Move one debugging message to some lines below.
2527 Remove code setting 'signal' to 0.
2528
80aea927
YQ
25292016-03-18 Yao Qi <yao.qi@linaro.org>
2530
2531 * linux-low.c (linux_low_filter_event): Remove redundant
2532 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2533
b04fd3be
MK
25342016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2535
2536 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2537 (struct linux_target_ops): Wire in the above.
2538
c40c8d4b
YQ
25392016-03-03 Yao Qi <yao.qi@linaro.org>
2540
2541 * linux-low.c: Update comments to start_step_over.
2542
0f8288ae
YQ
25432016-03-03 Yao Qi <yao.qi@linaro.org>
2544
2545 PR server/19736
2546 * linux-low.c (handle_extended_wait): Set child suspended
2547 if event_lwp->bp_reinsert isn't zero.
2548
fdbd04a8
YQ
25492016-03-02 Yao Qi <yao.qi@linaro.org>
2550
2551 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2552 enqueue_pending_signal.
2553
6896a8fa
MK
25542016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2555
2556 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2557 is actually loaded.
2558
ab503087
MK
25592016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2560
2561 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2562 (s390_regmap_3264) [!__s390x__]: New global.
2563 (s390_collect_ptrace_register): Skip map entries containing -1.
2564 (s390_supply_ptrace_register): Ditto.
2565 (s390_fill_gprs_high): New function.
2566 (s390_store_gprs_high): New function.
2567 (s390_regsets): Add NT_S390_HIGH_GPRS.
2568 (s390_get_hwcap): Enable on 31-bit.
2569 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2570 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2571 Detect NT_S390_HIGH_GPRS.
2572 (s390_usrregs_info_3264): Enable on 31-bit.
2573 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2574 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2575
ae91f625
MK
25762016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2577
2578 PR gdb/13808
2579 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2580 * configure.srv: Ditto.
2581 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2582 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2583 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2584 (init_registers_amd64_linux): Remove prototype.
2585 (tdesc_amd64_linux): Remove declaration.
2586 (get_ipa_tdesc): New function.
2587 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2588 initialize remaining tdescs.
2589 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2590 (init_registers_i386_linux): Remove prototype.
2591 (tdesc_i386_linux): Remove declaration.
2592 (get_ipa_tdesc): New function.
2593 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2594 initialize remaining tdescs.
2595 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2596 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2597 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2598 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2599 (x86_get_ipa_tdesc_idx): New function.
2600 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2601 * linux-x86-tdesc.h: New file.
2602 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2603 (target_get_ipa_tdesc_idx): New macro.
2604 * tracepoint.c (ipa_tdesc_idx): New macro.
2605 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2606 (symbol_list): Add ipa_tdesc_idx.
2607 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2608 (ipa_tdesc): Remove.
2609 (ipa_tdesc_idx): New variable.
2610 (get_context_regcache): Use get_ipa_tdesc.
2611 (gdb_collect): Ditto.
2612 (gdb_probe): Ditto.
2613 * tracepoint.h (get_ipa_tdesc): New prototype.
2614 (ipa_tdesc): Remove.
2615
e7ad2f14
PA
26162016-02-24 Pedro Alves <palves@redhat.com>
2617
2618 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2619 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2620 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2621 Factor out common code between the USE_SIGTRAP_SIGINFO and
2622 !USE_SIGTRAP_SIGINFO blocks.
2623 (linux_low_filter_event): Call save_stop_reason instead of
2624 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2625 Update comments.
2626 (linux_wait_1): Update comments.
2627
657f9cde
WW
26282016-02-24 Wei-cheng Wang <cole945@gmail.com>
2629
2630 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2631 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2632 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2633 ppc_insert_point, ppc_remove_point.
2634
b00b61e1
MK
26352016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2636
2637 * linux-s390-low.c (s390_supports_z_point_type): New function.
2638 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2639
553cb527
YQ
26402016-02-16 Yao Qi <yao.qi@linaro.org>
2641
2642 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2643 PC. Get pc from regcache_read_pc.
2644
a5652c21
YQ
26452016-02-12 Yao Qi <yao.qi@linaro.org>
2646
2647 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2648 or linux_get_pc_32bit.
2649 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2650
ed443b61
YQ
26512016-02-12 Yao Qi <yao.qi@linaro.org>
2652
2653 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2654 arm_linux_get_next_pcs_fixup.
2655
020ecd38
MK
26562016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2657
2658 * tracepoint.c (x_tracepoint_action_download): Change
2659 write_inferior_data_ptr to write_inferior_data_pointer.
2660 (cmd_qtstart): Likewise.
2661 (write_inferior_data_ptr): Remove.
2662 (download_agent_expr): Change write_inferior_data_ptr to
2663 write_inferior_data_pointer.
2664 (download_tracepoint_1): Likewise.
2665 (download_tracepoint): Likewise.
2666 (download_trace_state_variables): Likewise.
2667
7cae9051
WW
26682016-02-11 Wei-cheng Wang <cole945@gmail.com>
2669 Marcin Kościelnicki <koriakin@0x04.net>
2670
2671 * tracepoint.c (struct tracepoint_action_ops): Remove.
2672 (struct tracepoint_action): Remove ops.
2673 (m_tracepoint_action_download, r_tracepoint_action_download)
2674 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2675 size and offset accordingly.
2676 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2677 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2678 (tracepoint_action_send, tracepoint_action_download): New functions.
2679 Helpers for trace action handlers.
2680 (add_tracepoint_action): Remove setup actions ops.
2681 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2682
9f6a71b4
YQ
26832016-02-10 Yao Qi <yao.qi@linaro.org>
2684
2685 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2686
1e94266c
SM
26872016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2688
2689 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2690 to AC_OUTPUT.
2691 * configure: Regenerate.
2692
8adce034
SM
26932016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2694
2695 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2696 void * to gdb_byte *.
2697 * linux-low.c (siginfo_fixup): Likewise.
2698 (linux_xfer_siginfo): Likewise.
2699 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2700 Likewise.
2701 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2702
93813b37
WT
27032016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2704
2705 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2706 to srv_tgtobj.
2707 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2708 to srv_tgtobj.
2709 * linux-x86-low.c [__x86_64__]: Include
2710 "nat/amd64-linux-siginfo.h".
2711 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2712 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2713 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2714 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2715 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2716 (cpt_si_fd, si_timerid, si_overrun): Move from
2717 nat/amd64-linux-siginfo.c.
2718 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2719
8424cc97
SM
27202016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2721
2722 * server.c (skip_to_semicolon): Remove.
2723 (process_point_options): Use strchrnul instead of
2724 skip_to_semicolon.
2725
4d18591b
YQ
27262016-01-26 Yao Qi <yao.qi@linaro.org>
2727
2728 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2729 * linux-low.c (install_software_single_step_breakpoints): Don't
2730 call regcache_read_pc.
2731 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2732 argument pc.
2733
d8020970
YQ
27342016-01-26 Yao Qi <yao.qi@linaro.org>
2735
2736 * linux-low.c (install_software_single_step_breakpoints): Call
2737 regcache_read_pc instead of get_pc.
2738
8b207339
YQ
27392016-01-26 Yao Qi <yao.qi@linaro.org>
2740
2741 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2742 (unblock_async_io): Rename to ...
2743 (block_unblock_async_io): ... it. New function.
2744 (enable_async_io): Don't install SIGIO handler. Unblock it
2745 instead.
2746 (disable_async_io): Don't ignore SIGIO. Block it instead.
2747 (initialize_async_io): Install SIGIO handler. Don't call
2748 unblock_async_io.
2749
18879fef
YQ
27502016-01-26 Yao Qi <yao.qi@linaro.org>
2751
2752 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2753 first character is '\003', call *the_target->request_interrupt.
2754
a0f8e08a
YQ
27552016-01-25 Yao Qi <yao.qi@linaro.org>
2756
2757 * remote-utils.c (new_thread_notify): Remove.
2758 (dead_thread_notify): Likewise.
2759 * remote-utils.h (new_thread_notify): Remove declaration.
2760 (dead_thread_notify): Likewise.
2761
cc5fd9ab
MK
27622016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2763
2764 * gdb.trace/pending.exp: Fix expected message on continue.
2765
99e8eb11
MK
27662016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2767
2768 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2769 it works properly on big-endian machines where sizeof (CORE_ADDR)
2770 != sizeof (void *).
2771
a994041d
PA
27722016-01-21 Pedro Alves <palves@redhat.com>
2773
2774 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2775 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2776 * configure: Regenerate.
2777
f7a6a40d
YQ
27782016-01-21 Yao Qi <yao.qi@linaro.org>
2779
2780 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2781 is_thumb and set it according to CPSR saved on the stack.
2782 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2783 arm_sigreturn_next_pc.
2784
6f69e520
YQ
27852016-01-18 Yao Qi <yao.qi@linaro.org>
2786
2787 * linux-low.c (linux_set_pc_64bit): New function.
2788 (linux_get_pc_64bit): New function.
2789 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2790 Declare.
2791 * linux-sparc-low.c (debug_threads): Remove declaration.
2792 (sparc_get_pc): Remove.
2793 (the_low_target): Use linux_get_pc_64bit instead of
2794 sparc_get_pc.
2795 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2796 (the_low_target): Use linux_get_pc_64bit and
2797 linux_set_pc_64bit.
2798
276d4552
YQ
27992016-01-18 Yao Qi <yao.qi@linaro.org>
2800
2801 * linux-arm-low.c (debug_threads): Remove declaration.
2802 (arm_get_pc, arm_set_pc): Remove.
2803 (the_low_target): Use linux_get_pc_32bit and
2804 linux_set_pc_32bit.
2805 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2806 (the_low_target): Use linux_get_pc_32bit and
2807 linux_set_pc_32bit.
2808 * linux-cris-low.c (debug_threads): Remove declaration.
2809 (cris_get_pc, cris_set_pc,): Remove.
2810 (the_low_target): Use linux_get_pc_32bit and
2811 linux_set_pc_32bit.
2812 * linux-crisv32-low.c (debug_threads): Remove declaration.
2813 (cris_get_pc, cris_set_pc): Remove.
2814 (the_low_target): Use linux_get_pc_32bit and
2815 linux_set_pc_32bit.
2816 * linux-low.c: Include inttypes.h.
2817 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2818 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2819 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2820 (the_low_target): Use linux_get_pc_32bit and
2821 linux_set_pc_32bit.
2822 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2823 (the_low_target): Use linux_get_pc_32bit and
2824 linux_set_pc_32bit.
2825 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2826 (the_low_target): Use linux_get_pc_32bit and
2827 linux_set_pc_32bit.
2828 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2829 (the_low_target): Use linux_get_pc_32bit and
2830 linux_set_pc_32bit.
2831 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2832 (the_low_target): Use linux_get_pc_32bit and
2833 linux_set_pc_32bit.
2834
eb0edac8
GB
28352016-01-18 Gary Benson <gbenson@redhat.com>
2836
2837 * configure.ac (AC_FUNC_FORK): New check.
2838 * config.in: Regenerate.
2839 * configure: Likewise.
2840
1b451dda
YQ
28412016-01-14 Yao Qi <yao.qi@linaro.org>
2842
2843 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2844 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2845 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2846 arm_get_next_pcs_ctor.
2847
82075af2
JS
28482016-01-12 Josh Stone <jistone@redhat.com>
2849 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2850
2851 * inferiors.h: Include "gdb_vecs.h".
2852 (struct process_info): Add syscalls_to_catch.
2853 * inferiors.c (remove_process): Free syscalls_to_catch.
2854 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2855 syscall_return stops.
2856 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2857 * server.c (handle_general_set): Handle QCatchSyscalls.
2858 (handle_query): Report support for QCatchSyscalls.
2859 * target.h (struct target_ops): Add supports_catch_syscall.
2860 (target_supports_catch_syscall): New macro.
2861 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2862 (struct lwp_info): Add syscall_state.
2863 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2864 Maintain syscall_state and syscalls_to_catch across exec.
2865 (get_syscall_trapinfo): New function, proxy to the_low_target.
2866 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2867 (linux_low_filter_event): Toggle syscall_state entry/return for
2868 syscall traps, and set it ignored for all others.
2869 (gdb_catching_syscalls_p): New function.
2870 (gdb_catch_this_syscall_p): New function.
2871 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2872 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2873 (linux_supports_catch_syscall): New function.
2874 (linux_target_ops): Install it.
2875 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2876 (the_low_target): Install it.
2877
8f13a3ce
MF
28782016-01-12 Mike Frysinger <vapier@gentoo.org>
2879
2880 * acinclude.m4: Include new ../warning.m4 file.
2881 * configure: Regenerated.
2882 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2883
5b3da067
MF
28842016-01-12 Mike Frysinger <vapier@gentoo.org>
2885
2886 * ax.c (is_goto_target): Mark static.
2887 * linux-low.c (register_addr): Likewise.
2888 (linux_fetch_registers, linux_store_registers): Likewise.
2889 * mem-break.c (any_persistent_commands): Fix old prototype.
2890 (add_commands_to_breakpoint): Mark static.
2891 * regcache.c (find_register_by_name): Delete unused func.
2892 * remote-utils.c (hex_or_minus_one): Mark static.
2893 * server.c (monitor_show_help): Mark static.
2894 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2895 handle_v_requests): Likewise.
2896
bc504a31
PA
28972016-01-12 Pedro Alves <palves@redhat.com>
2898
2899 Remove use of the registered trademark symbol throughout.
2900
5a0dd67a
YQ
29012016-01-08 Yao Qi <yao.qi@linaro.org>
2902
2903 * remote-utils.c (getpkt): If c is '\003', call target hook
2904 request_interrupt.
2905
b2ca446f
YQ
29062016-01-06 Yao Qi <yao.qi@linaro.org>
2907
2908 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2909 linux-aarch32-low.c.
2910 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2911 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2912 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2913 (thumb2_breakpoint): Declare.
2914 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2915 linux-aarch32-low.h.
2916 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2917 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2918 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2919
edd88788
JB
29202016-01-01 Joel Brobecker <brobecker@adacore.com>
2921
2922 * gdbreplay.c (gdbreplay_version): Change copyright year in
2923 version message.
2924 * server.c (gdbserver_version): Likewise.
2925
65da7f14
PP
29262015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2927
2928 * server.c (crc32_table): Delete.
2929 (crc32): Use libiberty's xcrc32 function.
2930
4abd5ed2
JB
29312015-12-22 Joel Brobecker <brobecker@adacore.com>
2932
2933 * lynx-low.c (lynx_delete_thread_callback): New function.
2934 (lynx_mourn): Properly delete our process and all of its
2935 threads. Remove call to clear_inferiors.
2936
0e50fe5c
JB
29372015-12-22 Joel Brobecker <brobecker@adacore.com>
2938
2939 * target.c (thread_search_callback): Add check that
2940 the thread_stopped target callback is not NULL before
2941 calling it.
2942
35adc03f
YQ
29432015-12-21 Yao Qi <yao.qi@linaro.org>
2944
2945 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2946 arm breakpoint.
2947
bd2b2909
AT
29482015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2949
2950 * server.c (handle_query): Call target_supports_software_single_step.
2951
7fe5e27e
AT
29522015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2953
2954 * linux-low.c (single_step): New function.
2955 (linux_resume_one_lwp_throw): Call single_step.
2956 (start_step_over): Likewise.
2957
d9311bfa
AT
29582015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2959
2960 * Makefile.in (SFILES): Append arch/arm-linux.c,
2961 arch/arm-get-next-pcs.c.
2962 (arm-linux.o): New rule.
2963 (arm-get-next-pcs.o): New rule.
2964 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2965 arm-linux.o.
2966 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2967 to linux-aarch32-low.c.
2968 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2969 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2970 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2971 (thumb2_breakpoint_len): Likewise.
2972 (arm_is_thumb_mode): Make non-static.
2973 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2974 from linux-aarch32-low.c.
2975 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2976 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2977 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2978 (thumb2_breakpoint_len): Likewise.
2979 (arm_is_thumb_mode): New declaration.
2980 * linux-arm-low.c: Include arch/arm-linux.h
2981 aarch/arm-get-next-pcs.h, sys/syscall.h.
2982 (get_next_pcs_ops): New struct.
2983 (get_next_pcs_addr_bits_remove): New function.
2984 (get_next_pcs_is_thumb): New function.
2985 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2986 (arm_sigreturn_next_pc): Likewise.
2987 (get_next_pcs_syscall_next_pc): Likewise.
2988 (arm_gdbserver_get_next_pcs): Likewise.
2989 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2990 Initialize.
2991 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2992 * server.h: Include gdb_vecs.h.
2993
68ce2059
AT
29942015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2995
2996 * Makefile.in (SFILES): Append common/common-regcache.c.
2997 (OBS): Append common-regcache.o.
2998 (common-regcache.o): New rule.
2999 * regcache.c (init_register_cache): Initialize cache to
3000 REG_UNAVAILABLE.
3001 (regcache_raw_read_unsigned): New function.
3002 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3003 register_status enum.
3004
fa5308bd
AT
30052015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3006
3007 * linux-aarch64-low.c (the_low_targets): Rename
3008 breakpoint_reinsert_addr to get_next_pcs.
3009 * linux-arm-low.c (the_low_targets): Likewise.
3010 * linux-bfin-low.c (the_low_targets): Likewise.
3011 * linux-cris-low.c (the_low_targets): Likewise.
3012 * linux-crisv32-low.c (the_low_targets): Likewise.
3013 * linux-low.c (can_software_single_step): Likewise.
3014 (install_software_single_step_breakpoints): New function.
3015 (start_step_over): Use install_software_single_step_breakpoints.
3016 * linux-low.h: New CORE_ADDR vector.
3017 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3018 get_next_pcs.
3019 * linux-mips-low.c (the_low_targets): Likewise.
3020 * linux-nios2-low.c (the_low_targets): Likewise.
3021 * linux-sparc-low.c (the_low_targets): Likewise.
3022
4a6ed09b
PA
30232015-12-17 Pedro Alves <palves@redhat.com>
3024
3025 * linux-low.c (linux_kill_one_lwp): Remove references to
3026 LinuxThreads.
3027 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3028 to 'kill'.
3029 (linux_init_signals): Delete.
3030 (initialize_low): Adjust.
3031 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3032
7544db95
PA
30332015-12-16 Pedro Alves <palves@redhat.com>
3034
3035 * configure.ac (compiler warning flags): When testing a
3036 -Wno-foo option, check whether -Wfoo works instead.
3037 * configure: Regenerate.
3038
8020350c
DB
30392015-12-11 Don Breazeal <donb@codesourcery.com>
3040
3041 * server.c (process_serial_event): Don't exit from gdbserver
3042 in remote mode if there are still active inferiors.
3043
db91f502
YQ
30442015-12-11 Yao Qi <yao.qi@linaro.org>
3045
3046 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3047 arm_breakpoint_at if the process is 32-bit.
3048
b37a6290
YQ
30492015-12-11 Yao Qi <yao.qi@linaro.org>
3050
3051 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3052 arm breakpoint.
3053
17b1509a
YQ
30542015-12-07 Yao Qi <yao.qi@linaro.org>
3055
3056 * configure.srv: Append arm.o to srv_tgtobj for
3057 aarch64*-*-linux* target.
3058 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3059 from linux-arm-low.c.
3060 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3061 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3062 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3063 (thumb2_breakpoint_len): Likewise.
3064 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3065 (arm_breakpoint_kinds): Likewise.
3066 (arm_breakpoint_kind_from_pc): Likewise.
3067 (arm_sw_breakpoint_from_kind): Likewise.
3068 (arm_breakpoint_kind_from_current_state): Likewise.
3069 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3070 (arm_sw_breakpoint_from_kind): Declare.
3071 (arm_breakpoint_kind_from_current_state): Declare.
3072 (arm_breakpoint_at): Declare.
3073 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3074 arm_sw_breakpoint_from_kind if process is 32-bit.
3075 (aarch64_breakpoint_kind_from_pc): New function.
3076 (aarch64_breakpoint_kind_from_current_state): New function.
3077 (the_low_target): Initialize fields breakpoint_kind_from_pc
3078 and breakpoint_kind_from_current_state.
3079 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3080 linux-aarch32-low.c.
3081 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3082 (arm_breakpoint, arm_breakpoint_len): Likewise.
3083 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3084 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3085 (arm_is_thumb_mode): Likewise.
3086 (arm_breakpoint_at): Likewise.
3087 (arm_breakpoint_kind_from_pc): Likewise.
3088 (arm_sw_breakpoint_from_kind): Likewise.
3089 (arm_breakpoint_kind_from_current_state): Likewise.
3090
3091 Revert:
3092 2015-08-04 Yao Qi <yao.qi@linaro.org>
3093
3094 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3095 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3096 * server.c (extended_protocol): Remove "static".
3097 * server.h (extended_protocol): Declare it.
3098
ece66d65
JS
30992015-12-04 Josh Stone <jistone@redhat.com>
3100
3101 * target.h (struct target_ops) <arch_setup>: Rename to ...
3102 (struct target_ops) <post_create_inferior>: ... this.
3103 (target_arch_setup): Rename to ...
3104 (target_post_create_inferior): ... this, calling post_create_inferior.
3105 * server.c (start_inferior): Update target_arch_setup calls to
3106 target_post_create_inferior.
3107 * linux-low.c (linux_low_ptrace_options): Forward declare.
3108 (linux_arch_setup): Update its comment for general use.
3109 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3110 (struct linux_target_ops): Use linux_post_create_inferior.
3111 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3112 to post_create_inferior.
3113 * nto-low.c (struct nto_target_ops): Likewise.
3114 * spu-low.c (struct spu_target_ops): Likewise.
3115 * win32-low.c (struct win32_target_ops): Likewise.
3116
e58c48b4
AT
31172015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3118
3119 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3120
fbec8956
AT
31212015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3122
3123 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3124 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3125 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3126 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3127 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3128 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3129 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3130 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3131 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3132 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3133 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3134 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3135
9b4c5f87
AT
31362015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3137
3138 * linux-low.c (linux_look_up_symbols): Don't call
3139 linux_supports_traceclone.
3140 * linux-low.h (thread_db_init): Remove use_events argument.
3141 * thread-db.c (thread_db_use_event): Remove global variable.
3142 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3143 (struct thread_db) <td_create_bp>: Remove field.
3144 (thread_db_create_event): Remove function.
3145 (thread_db_enable_reporting): Likewise.
3146 (find_one_thread): Don't check for thread_db_use_events.
3147 (attach_thread): Likewise.
3148 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3149 (try_thread_db_load_1): Don't check for thread_db_use_events.
3150 (thread_db_init): Remove use_events argument and thread events
3151 handling.
3152 (remove_thread_event_breakpoints): Remove function.
3153 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3154
7d00775e
AT
31552015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3156
3157 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3158 New function.
3159 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3160 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3161 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3162 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3163 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3164 Initialize.
3165 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3166 New function.
3167 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3168 * linux-low.c (can_hardware_single_step): Use
3169 supports_hardware_single_step.
3170 (can_software_single_step): New function.
3171 (start_step_over): Call can_software_single_step.
3172 (linux_supports_hardware_single_step): New function.
3173 (struct target_ops) <supports_software_single_step>: Initialize.
3174 * linux-low.h (struct linux_target_ops)
3175 <supports_hardware_single_step>: Initialize.
3176 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3177 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3178 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3179 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3180 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3181 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3182 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3183 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3184 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3185 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3186 Initialize.
3187 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3188 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3189 Initialize.
3190 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3191 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3192 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3193 New function.
3194 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3195 * target.h (struct target_ops): <supports_software_single_step>:
3196 New field.
3197 (target_supports_software_single_step): New macro.
3198
2d97cd35
AT
31992015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3200
3201 * linux-low.c (linux_wait_1): Fix pc advance condition.
3202 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3203 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3204
769ef81f
AT
32052015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3206
3207 * linux-arm-low.c (arm_is_thumb_mode): New function.
3208 (arm_breakpoint_at): Use arm_is_thumb_mode.
3209 (arm_breakpoint_kind_from_current_state): New function.
3210 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3211 Initialize.
3212 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3213 (linux_breakpoint_kind_from_current_state): New function.
3214 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3215 * linux-low.h (struct linux_target_ops)
3216 <breakpoint_kind_from_current_state>: New field.
3217 * target.h (struct target_ops): Likewise.
3218 (target_breakpoint_kind_from_current_state): New macro.
3219
1bebeeca
PA
32202015-11-30 Pedro Alves <palves@redhat.com>
3221
3222 * linux-low.c (linux_resume): Wake up the event loop before
3223 returning.
3224
a67a9fae
PA
32252015-11-30 Pedro Alves <palves@redhat.com>
3226
3227 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3228 check.
3229 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3230 to -1.
3231 * target.c (struct thread_search): New structure.
3232 (thread_search_callback): New function.
3233 (prev_general_thread): New global.
3234 (prepare_to_access_memory, done_accessing_memory): New functions.
3235 * target.h (prepare_to_access_memory, done_accessing_memory):
3236 Replace macros with function declarations.
3237
f2faf941
PA
32382015-11-30 Pedro Alves <palves@redhat.com>
3239
3240 PR 14618
3241 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3242 report TARGET_WAITKIND_NO_RESUMED.
3243 * remote-utils.c (prepare_resume_reply): Handle
3244 TARGET_WAITKIND_NO_RESUMED.
3245 * server.c (report_no_resumed): New global.
3246 (handle_query) <qSupported>: Handle "no-resumed+". Report
3247 "no-resumed+" support.
3248 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3249 return error if the client doesn't support no-resumed events.
3250 (push_stop_notification): New function.
3251 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3252 events if the client supports them.
3253
a681f9c9
PA
32542015-11-30 Pedro Alves <palves@redhat.com>
3255
3256 * linux-low.c (thread_still_has_status_pending_p): Don't check
3257 vCont;t here.
3258 (lwp_resumed): New function.
3259 (status_pending_p_callback): Return early if the LWP is not
3260 supposed to be resumed.
3261
65706a29
PA
32622015-11-30 Pedro Alves <palves@redhat.com>
3263
3264 * linux-low.c (handle_extended_wait): Assert that the LWP's
3265 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3266 thread create events, leave the new child's status pending.
3267 (linux_low_filter_event): If GDB wants to hear about thread exit
3268 events, leave the LWP marked dead and don't delete it.
3269 (linux_wait_for_event_filtered): Don't check for thread exit.
3270 (filter_exit_event): New function.
3271 (linux_wait_1): Use it, when returning an exit event.
3272 (linux_resume_one_lwp_throw): Assert that the LWP's
3273 waitstatus is TARGET_WAITKIND_IGNORE.
3274 * remote-utils.c (prepare_resume_reply): Handle
3275 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3276 * server.c (report_thread_events): New global.
3277 (handle_general_set): Handle QThreadEvents.
3278 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3279 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3280 TARGET_WAITKIND_THREAD_EXITED.
3281 * server.h (report_thread_events): Declare.
3282
56cf4bed
PA
32832015-11-30 Pedro Alves <palves@redhat.com>
3284
3285 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3286 the thread's last_resume_kind was resume_stop.
3287
500c1d85
PA
32882015-11-30 Pedro Alves <palves@redhat.com>
3289
3290 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3291 before returning.
3292
de979965
PA
32932015-11-30 Pedro Alves <palves@redhat.com>
3294
3295 * server.c (handle_v_requests): Handle vCtrlC.
3296
34c65914
PA
32972015-11-30 Pedro Alves <palves@redhat.com>
3298
3299 * gdbthread.h (find_any_thread_of_pid): Declare.
3300 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3301 functions.
3302 * server.c (handle_query): If current_thread is NULL, look for
3303 another thread of the selected process.
3304
79efa585 33052015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3306 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3307
3308 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3309 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3310 name in reply.
3311 * target.h (struct target_ops) <thread_name>: New field.
3312 (target_thread_name): New macro.
3313
80d82c19
JB
33142015-11-23 Joel Brobecker <brobecker@adacore.com>
3315
3316 * regcache.h (regcache_invalidate_pid): Add declaration.
3317 * regcache.c (regcache_invalidate_pid): New function, extracted
3318 from regcache_invalidate.
3319 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3320 Add trivial documentation comment.
3321 * lynx-low.c: Use regcache_invalidate_pid instead of
3322 regcache_invalidate.
3323
64da5dd5
JB
33242015-11-23 Joel Brobecker <brobecker@adacore.com>
3325
3326 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3327 and Elf64_auxv_t if the target is Android.
3328
37ce4055
DE
33292015-11-22 Doug Evans <xdje42@gmail.com>
3330
3331 * target.h: #include <sys/types.h>.
3332
06e03fff
PA
33332015-11-19 Pedro Alves <palves@redhat.com>
3334
3335 * linux-low.c (linux_process_qsupported): Change prototype.
3336 Adjust.
3337 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3338 Change prototype.
3339 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3340 and adjust to loop over all features.
3341 * server.c (handle_query) <qSupported>: Adjust to call
3342 target_process_qsupported once, passing it a vector of unprocessed
3343 features.
3344 * target.h (struct target_ops) <process_qsupported>: Change
3345 prototype.
3346 (target_process_qsupported): Adjust.
3347
9a084706
PA
33482015-11-19 Pedro Alves <palves@redhat.com>
3349
3350 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3351 mode.
3352 * configure: Regenerate.
3353
dad44a1f
PA
33542015-11-19 Pedro Alves <palves@redhat.com>
3355
3356 * configure: Regenerate.
3357
231c0592
YQ
33582015-11-19 Yao Qi <yao.qi@linaro.org>
3359
3360 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3361 type to uint32_t.
3362
6c1c9a8b
YQ
33632015-11-19 Yao Qi <yao.qi@linaro.org>
3364
3365 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3366 (struct aarch64_operand): Move enum out.
3367
9caa3311
YQ
33682015-11-19 Yao Qi <yao.qi@linaro.org>
3369
3370 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3371 struct user_fpsimd_state *.
3372 (aarch64_store_fpregset): Likewise.
3373
6a69a054
YQ
33742015-11-19 Yao Qi <yao.qi@linaro.org>
3375
3376 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3377 struct user_pt_regs *.
3378 (aarch64_store_gregset): Likewise.
3379
1798301e
PA
33802015-11-18 Pedro Alves <palves@redhat.com>
3381
3382 * Makefile.in (all_object_files): Add $IPA_OBJS.
3383
ce7715e2
PA
33842015-11-17 Pedro Alves <palves@redhat.com>
3385
3386 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3387 GDB_SIGNAL_0 and gdb_signal_to_string.
3388
c0879059
PA
33892015-11-17 Pedro Alves <palves@redhat.com>
3390
3391 * win32-low.c (handle_output_debug_string): Remove parameter.
3392 (win32_kill): Remove our_status local and adjust call to
3393 handle_output_debug_string.
3394 (get_child_debug_event): Adjust call to
3395 handle_output_debug_string.
3396
1996e237
SM
33972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3398
3399 * linux-mips-low.c (mips_fill_gregset): Add cast.
3400 (mips_store_gregset): Likewise.
3401 (mips_fill_fpregset): Likewise.
3402 (mips_store_fpregset): Likewise.
3403
cbec665b
SM
34042015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3405
3406 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3407 priv.
3408
eb3e3c67
SM
34092015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3410
3411 * linux-mips-low.c (mips_linux_new_thread): Change type of
3412 watch_type to enum target_hw_bp_type.
3413
171de4b8
SM
34142015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3415
3416 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3417 Change return type to arm_hwbp_type.
3418
04248ead
SM
34192015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3420
3421 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3422 (arm_store_gregset): Likewise.
3423 * linux-arm-low.c (arm_get_hwcap): Likewise.
3424 (arm_read_description): Likewise.
3425
04b3479c
SM
34262015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3427
3428 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3429
2bc84e8a
SM
34302015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3431
3432 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3433 (ppc_fill_vsxregset): Likewise.
3434 (ppc_store_vsxregset): Likewise.
3435 (ppc_fill_vrregset): Likewise.
3436 (ppc_store_vrregset): Likewise.
3437 (ppc_fill_evrregset): Likewise.
3438 (ppc_store_evrregset): Likewise.
3439
e6c5bb05
SM
34402015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3441
3442 * linux-ppc-low.c (ppc_usrregs_info): Remove
3443 forward-declaration.
3444 (ppc_arch_setup): Move lower in file.
3445
7ea45d72
SM
34462015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3447
3448 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3449 (ps_pdwrite): Likewise.
3450
69291610
HW
34512015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3452
3453 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3454 to after assert checks.
3455
b42945fd
SM
34562015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3457
3458 * proc-service.c (ps_pdread): Add/adjust casts.
3459 (ps_pdwrite): Add/adjust casts.
3460
d6f85c84
SM
34612015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3462
3463 * server.c (handle_search_memory_1): Cast return value of
3464 memmem.
3465
f98cd059
SM
34662015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3467
3468 * server.c (write_qxfer_response): Change type of data to
3469 gdb_byte *.
3470
d2412fa5
PA
34712015-10-29 Pedro Alves <palves@redhat.com>
3472
3473 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3474
c17414a2
PA
34752015-10-29 Pedro Alves <palves@redhat.com>
3476
3477 * tracepoint.c (clear_installed_tracepoints): Add casts.
3478
e053fbc4
PA
34792015-10-29 Pedro Alves <palves@redhat.com>
3480
3481 * server.c (handle_v_cont, process_serial_event): Add enum
3482 gdb_signal casts to signal parsing code.
3483
add67df8
PA
34842015-10-29 Pedro Alves <palves@redhat.com>
3485
3486 * linux-low.h (NULL_REGSET): Define.
3487 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3488 * linux-arm-low.c (arm_regsets): Likewise.
3489 * linux-crisv32-low.c (cris_regsets): Likewise.
3490 * linux-m68k-low.c (m68k_regsets): Likewise.
3491 * linux-mips-low.c (mips_regsets): Likewise.
3492 * linux-nios2-low.c (nios2_regsets): Likewise.
3493 * linux-ppc-low.c (ppc_regsets): Likewise.
3494 * linux-s390-low.c (s390_regsets): Likewise.
3495 * linux-sh-low.c (sh_regsets): Likewise.
3496 * linux-sparc-low.c (sparc_regsets): Likewise.
3497 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3498 * linux-tile-low.c (tile_regsets): Likewise.
3499 * linux-x86-low.c (x86_regsets): Likewise.
3500 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3501
50bc912a
PA
35022015-10-29 Pedro Alves <palves@redhat.com>
3503
3504 * linux-low.h (NULL_REGSET): Define.
3505 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3506 * linux-arm-low.c (arm_regsets): Likewise.
3507 * linux-crisv32-low.c (cris_regsets): Likewise.
3508 * linux-m68k-low.c (m68k_regsets): Likewise.
3509 * linux-mips-low.c (mips_regsets): Likewise.
3510 * linux-nios2-low.c (nios2_regsets): Likewise.
3511 * linux-ppc-low.c (ppc_regsets): Likewise.
3512 * linux-s390-low.c (s390_regsets): Likewise.
3513 * linux-sh-low.c (sh_regsets): Likewise.
3514 * linux-sparc-low.c (sparc_regsets): Likewise.
3515 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3516 * linux-tile-low.c (tile_regsets): Likewise.
3517 * linux-x86-low.c (x86_regsets): Likewise.
3518 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3519
682b2546
DE
35202015-10-26 Doug Evans <dje@google.com>
3521
3522 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3523
963843d4
DE
35242015-10-26 Doug Evans <dje@google.com>
3525
3526 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3527
d41401ac
DE
35282015-10-26 Doug Evans <dje@google.com>
3529
3530 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3531 for debug_printf.
3532 (attach_thread, find_new_threads_callback): Ditto.
3533
3db28855
AT
35342015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3535
3536 * mem-break.h (set_breakpoint_data): Remove.
3537
fb78e89c
AT
35382015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3539
3540 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3541 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3542 (initialize_low): Remove set_breakpoint_data call.
3543 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3544 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3545 (initialize_low): Remove set_breakpoint_data call.
3546 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3547 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3548 (initialize_low): Remove set_breakpoint_data call.
3549
2e6ee069
AT
35502015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3551
3552 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3553 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3554 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3555 * target.h (target_breakpoint_kind_from_pc): New macro.
3556
1652a986
AT
35572015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3558
3559 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3560 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3561 the default breakpoint kind.
3562
abeead09
AT
35632015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3564
3565 * linux-arm-low.c (arm_supports_z_point_type): Add software
3566 breakpoint support.
3567
b0b4b501
AT
35682015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3569
3570 * linux-arm-low.c: Refactor breakpoint definitions.
3571 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3572 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3573
8689682c
AT
35742015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3575
3576 * Makefile.in: Add arm.c/o.
3577 * configure.srv: Likewise.
3578 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3579 (arm_breakpoint_kind_from_pc): New function.
3580 (arm_sw_breakpoint_from_kind): Return proper kind.
3581 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3582
27165294
AT
35832015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3584
3585 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3586 removal.
3587 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3588 (struct raw_breakpoint) <size>: Remove.
3589 (struct raw_breakpoint) <kind>: Add.
3590 (bp_size): New function.
3591 (bp_opcode): Likewise.
3592 (find_raw_breakpoint_at): Adjust for kind.
3593 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3594 (remove_memory_breakpoint): Adjust for kind call bp_size.
3595 (set_raw_breakpoint_at): Adjust for kind.
3596 (set_breakpoint): Likewise.
3597 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3598 (delete_raw_breakpoint): Adjust for kind.
3599 (delete_breakpoint): Likewise.
3600 (find_gdb_breakpoint): Likewise.
3601 (set_gdb_breakpoint_1): Likewise.
3602 (set_gdb_breakpoint): Likewise.
3603 (delete_gdb_breakpoint_1): Likewise.
3604 (delete_gdb_breakpoint): Likewise.
3605 (uninsert_raw_breakpoint): Likewise.
3606 (reinsert_raw_breakpoint): Likewise.
3607 (set_breakpoint_data): Remove.
3608 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3609 (check_mem_read): Adjust for kind call bp_size.
3610 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3611 (clone_one_breakpoint): Adjust for kind.
3612 * mem-break.h (set_gdb_breakpoint): Likewise.
3613 (delete_gdb_breakpoint): Likewise.
3614 * server.c (process_serial_event): Likewise.
3615
dd373349
AT
36162015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3617
3618 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3619 (struct linux_target_ops) <breakpoint>: Remove.
3620 (struct linux_target_ops) <breakpoint_len>: Remove.
3621 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3622 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3623 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3624 (arm_sw_breakpoint_from_kind): New function.
3625 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3626 (struct linux_target_ops) <breakpoint>: Remove.
3627 (struct linux_target_ops) <breakpoint_len>: Remove.
3628 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3629 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3630 * linux-cris-low.c (cris_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-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3636 (struct linux_target_ops) <breakpoint>: Remove.
3637 (struct linux_target_ops) <breakpoint_len>: Remove.
3638 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3639 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3640 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3641 and sw_breakpoint_from_kind to increment the pc.
3642 (linux_breakpoint_kind_from_pc): New function.
3643 (linux_sw_breakpoint_from_kind): New function.
3644 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3645 (initialize_low): Call breakpoint_kind_from_pc and
3646 sw_breakpoint_from_kind to replace breakpoint_data/len.
3647 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3648 New field.
3649 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3650 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3651 (struct linux_target_ops) <breakpoint>: Remove.
3652 (struct linux_target_ops) <breakpoint_len>: Remove.
3653 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3654 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3655 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3656 (struct linux_target_ops) <breakpoint>: Remove.
3657 (struct linux_target_ops) <breakpoint_len>: Remove.
3658 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3659 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3660 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3661 (struct linux_target_ops) <breakpoint>: Remove.
3662 (struct linux_target_ops) <breakpoint_len>: Remove.
3663 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3664 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3665 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3666 (struct linux_target_ops) <breakpoint>: Remove.
3667 (struct linux_target_ops) <breakpoint_len>: Remove.
3668 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3669 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3670 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3671 (struct linux_target_ops) <breakpoint>: Remove.
3672 (struct linux_target_ops) <breakpoint_len>: Remove.
3673 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3674 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3675 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3676 (struct linux_target_ops) <breakpoint>: Remove.
3677 (struct linux_target_ops) <breakpoint_len>: Remove.
3678 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3679 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3680 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3681 (struct linux_target_ops) <breakpoint>: Remove.
3682 (struct linux_target_ops) <breakpoint_len>: Remove.
3683 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3684 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3685 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3686 (struct linux_target_ops) <breakpoint>: Remove.
3687 (struct linux_target_ops) <breakpoint_len>: Remove.
3688 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3689 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3690 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3691 (struct linux_target_ops) <breakpoint>: Remove.
3692 (struct linux_target_ops) <breakpoint_len>: Remove.
3693 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3694 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3695 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3696 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3697 (struct linux_target_ops) <breakpoint>: Remove.
3698 (struct linux_target_ops) <breakpoint_len>: Remove.
3699 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3700 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3701 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3702 (struct linux_target_ops) <breakpoint>: Remove.
3703 (struct linux_target_ops) <breakpoint_len>: Remove.
3704 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3705 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3706
4cd98a19
AT
37072015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3708
3709 * linux-cris-low.c (cris_get_pc): Remove void arg.
3710
774ee6d2
AR
37112015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3712
3713 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3714 variable name.
3715
833dcd29
AR
37162015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3717
3718 * inferiors.c (thread_pid_matches_callback): New function.
3719 (find_thread_process): New function.
3720 (remove_thread): Reset current_thread.
3721 (remove_process): Assert threads have been removed first.
3722
8d689ee5
YQ
37232015-10-15 Yao Qi <yao.qi@linaro.org>
3724
3725 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3726 if it is 3.
3727 (aarch64_remove_point): Likewise.
3728 * regcache.c (regcache_register_size): New function.
3729
1c2e1515
YQ
37302015-10-12 Yao Qi <yao.qi@linaro.org>
3731
3732 * linux-aarch64-low.c: Update all callers as emit_load_store
3733 is renamed to aarch64_emit_load_store.
3734
e1c587c3
YQ
37352015-10-12 Yao Qi <yao.qi@linaro.org>
3736
3737 * linux-aarch64-low.c: Update all callers of function renaming
3738 from emit_insn to aarch64_emit_insn.
3739
b6542f81
YQ
37402015-10-12 Yao Qi <yao.qi@linaro.org>
3741
3742 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3743 arch/aarch64-insn.h.
3744 (struct aarch64_memory_operand): Likewise.
3745 (ENCODE): Likewise.
3746 (emit_insn): Move to arch/aarch64-insn.c.
3747 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3748 (emit_load_store): Move to arch/aarch64-insn.c.
3749 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3750 (can_encode_int32): Remove.
3751
246994ce
YQ
37522015-10-12 Yao Qi <yao.qi@linaro.org>
3753
3754 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3755 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3756 (aarch64_relocate_instruction): Likewise.
3757 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3758 (struct aarch64_insn_visitor): Likewise.
3759
0badd99f
YQ
37602015-10-12 Yao Qi <yao.qi@linaro.org>
3761
3762 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3763 (struct aarch64_insn_visitor): New.
3764 (struct aarch64_insn_relocation_data): New.
3765 (aarch64_ftrace_insn_reloc_b): New function.
3766 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3767 (aarch64_ftrace_insn_reloc_cb): Likewise.
3768 (aarch64_ftrace_insn_reloc_tb): Likewise.
3769 (aarch64_ftrace_insn_reloc_adr): Likewise.
3770 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3771 (aarch64_ftrace_insn_reloc_others): Likewise.
3772 (visitor): New.
3773 (aarch64_relocate_instruction): Use visitor.
3774
dfaffe9d
YQ
37752015-10-12 Yao Qi <yao.qi@linaro.org>
3776
3777 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3778 int. Add argument buf.
3779 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3780 aarch64_relocate_instruction.
3781
70b439f0
YQ
37822015-10-12 Yao Qi <yao.qi@linaro.org>
3783
3784 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3785 argument insn. Remove local variable insn. Don't call
3786 target_read_uint32.
3787 (aarch64_install_fast_tracepoint_jump_pad): Call
3788 target_read_uint32.
3789
7781c06f
YQ
37902015-09-30 Yao Qi <yao.qi@linaro.org>
3791
3792 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3793 (emit_load_store_pair): Likewise.
3794
9a3c8263
SM
37952015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3796
3797 * dll.c (match_dll): Add cast(s).
3798 (unloaded_dll): Likewise.
3799 * linux-low.c (second_thread_of_pid_p): Likewise.
3800 (delete_lwp_callback): Likewise.
3801 (count_events_callback): Likewise.
3802 (select_event_lwp_callback): Likewise.
3803 (linux_set_resume_request): Likewise.
3804 * server.c (accumulate_file_name_length): Likewise.
3805 (emit_dll_description): Likewise.
3806 (handle_qxfer_threads_worker): Likewise.
3807 (visit_actioned_threads): Likewise.
3808 * thread-db.c (any_thread_of): Likewise.
3809 * tracepoint.c (same_process_p): Likewise.
3810 (match_blocktype): Likewise.
3811 (build_traceframe_info_xml): Likewise.
3812
224c3ddb
SM
38132015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3814
3815 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3816 assignment.
3817 (gdb_unparse_agent_expr): Likewise.
3818 * hostio.c (require_data): Likewise.
3819 (handle_pread): Likewise.
3820 * linux-low.c (disable_regset): Likewise.
3821 (fetch_register): Likewise.
3822 (store_register): Likewise.
3823 (get_dynamic): Likewise.
3824 (linux_qxfer_libraries_svr4): Likewise.
3825 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3826 (set_fast_tracepoint_jump): Likewise.
3827 (uninsert_fast_tracepoint_jumps_at): Likewise.
3828 (reinsert_fast_tracepoint_jumps_at): Likewise.
3829 (validate_inserted_breakpoint): Likewise.
3830 (clone_agent_expr): Likewise.
3831 * regcache.c (init_register_cache): Likewise.
3832 * remote-utils.c (putpkt_binary_1): Likewise.
3833 (decode_M_packet): Likewise.
3834 (decode_X_packet): Likewise.
3835 (look_up_one_symbol): Likewise.
3836 (relocate_instruction): Likewise.
3837 (monitor_output): Likewise.
3838 * server.c (handle_search_memory): Likewise.
3839 (handle_qxfer_exec_file): Likewise.
3840 (handle_qxfer_libraries): Likewise.
3841 (handle_qxfer): Likewise.
3842 (handle_query): Likewise.
3843 (handle_v_cont): Likewise.
3844 (handle_v_run): Likewise.
3845 (captured_main): Likewise.
3846 * target.c (write_inferior_memory): Likewise.
3847 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3848 * tracepoint.c (init_trace_buffer): Likewise.
3849 (add_tracepoint_action): Likewise.
3850 (add_traceframe): Likewise.
3851 (add_traceframe_block): Likewise.
3852 (cmd_qtdpsrc): Likewise.
3853 (cmd_qtdv): Likewise.
3854 (cmd_qtstatus): Likewise.
3855 (response_source): Likewise.
3856 (response_tsv): Likewise.
3857 (cmd_qtnotes): Likewise.
3858 (gdb_collect): Likewise.
3859 (initialize_tracepoint): Likewise.
3860
afbe19f8
PL
38612015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3862
3863 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3864 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3865 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3866 <NOP>: New.
3867 (enum aarch64_condition_codes): New enum.
3868 (w0): New static global.
3869 (fp): Likewise.
3870 (lr): Likewise.
3871 (struct aarch64_memory_operand) <type>: New
3872 MEMORY_OPERAND_POSTINDEX type.
3873 (postindex_memory_operand): New helper function.
3874 (emit_ret): New function.
3875 (emit_load_store_pair): New function, factored out of emit_stp
3876 with support for MEMORY_OPERAND_POSTINDEX.
3877 (emit_stp): Rewrite using emit_load_store_pair.
3878 (emit_ldp): New function.
3879 (emit_load_store): Likewise.
3880 (emit_ldr): Mention post-index instruction in comment.
3881 (emit_ldrh): New function.
3882 (emit_ldrb): New function.
3883 (emit_ldrsw): Mention post-index instruction in comment.
3884 (emit_str): Likewise.
3885 (emit_subs): New function.
3886 (emit_cmp): Likewise.
3887 (emit_and): Likewise.
3888 (emit_orr): Likewise.
3889 (emit_orn): Likewise.
3890 (emit_eor): Likewise.
3891 (emit_mvn): Likewise.
3892 (emit_lslv): Likewise.
3893 (emit_lsrv): Likewise.
3894 (emit_asrv): Likewise.
3895 (emit_mul): Likewise.
3896 (emit_sbfm): Likewise.
3897 (emit_sbfx): Likewise.
3898 (emit_ubfm): Likewise.
3899 (emit_ubfx): Likewise.
3900 (emit_csinc): Likewise.
3901 (emit_cset): Likewise.
3902 (emit_nop): Likewise.
3903 (emit_ops_insns): New helper function.
3904 (emit_pop): Likewise.
3905 (emit_push): Likewise.
3906 (aarch64_emit_prologue): New function.
3907 (aarch64_emit_epilogue): Likewise.
3908 (aarch64_emit_add): Likewise.
3909 (aarch64_emit_sub): Likewise.
3910 (aarch64_emit_mul): Likewise.
3911 (aarch64_emit_lsh): Likewise.
3912 (aarch64_emit_rsh_signed): Likewise.
3913 (aarch64_emit_rsh_unsigned): Likewise.
3914 (aarch64_emit_ext): Likewise.
3915 (aarch64_emit_log_not): Likewise.
3916 (aarch64_emit_bit_and): Likewise.
3917 (aarch64_emit_bit_or): Likewise.
3918 (aarch64_emit_bit_xor): Likewise.
3919 (aarch64_emit_bit_not): Likewise.
3920 (aarch64_emit_equal): Likewise.
3921 (aarch64_emit_less_signed): Likewise.
3922 (aarch64_emit_less_unsigned): Likewise.
3923 (aarch64_emit_ref): Likewise.
3924 (aarch64_emit_if_goto): Likewise.
3925 (aarch64_emit_goto): Likewise.
3926 (aarch64_write_goto_address): Likewise.
3927 (aarch64_emit_const): Likewise.
3928 (aarch64_emit_call): Likewise.
3929 (aarch64_emit_reg): Likewise.
3930 (aarch64_emit_pop): Likewise.
3931 (aarch64_emit_stack_flush): Likewise.
3932 (aarch64_emit_zero_ext): Likewise.
3933 (aarch64_emit_swap): Likewise.
3934 (aarch64_emit_stack_adjust): Likewise.
3935 (aarch64_emit_int_call_1): Likewise.
3936 (aarch64_emit_void_call_2): Likewise.
3937 (aarch64_emit_eq_goto): Likewise.
3938 (aarch64_emit_ne_goto): Likewise.
3939 (aarch64_emit_lt_goto): Likewise.
3940 (aarch64_emit_le_goto): Likewise.
3941 (aarch64_emit_gt_goto): Likewise.
3942 (aarch64_emit_ge_got): Likewise.
3943 (aarch64_emit_ops_impl): New static global variable.
3944 (aarch64_emit_ops): New target function, return
3945 &aarch64_emit_ops_impl.
3946 (struct linux_target_ops): Install it.
3947
bb903df0
PL
39482015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3949
3950 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3951 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3952 aarch64-ipa.o.
3953 * linux-aarch64-ipa.c: New file.
3954 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3955 and endian.h.
3956 (aarch64_get_thread_area): New target method.
3957 (extract_signed_bitfield): New helper function.
3958 (aarch64_decode_ldr_literal): New function.
3959 (enum aarch64_opcodes): New enum.
3960 (struct aarch64_register): New struct.
3961 (struct aarch64_operand): New struct.
3962 (x0): New static global.
3963 (x1): Likewise.
3964 (x2): Likewise.
3965 (x3): Likewise.
3966 (x4): Likewise.
3967 (w2): Likewise.
3968 (ip0): Likewise.
3969 (sp): Likewise.
3970 (xzr): Likewise.
3971 (aarch64_register): New helper function.
3972 (register_operand): Likewise.
3973 (immediate_operand): Likewise.
3974 (struct aarch64_memory_operand): New struct.
3975 (offset_memory_operand): New helper function.
3976 (preindex_memory_operand): Likewise.
3977 (enum aarch64_system_control_registers): New enum.
3978 (ENCODE): New macro.
3979 (emit_insn): New helper function.
3980 (emit_b): New function.
3981 (emit_bcond): Likewise.
3982 (emit_cb): Likewise.
3983 (emit_tb): Likewise.
3984 (emit_blr): Likewise.
3985 (emit_stp): Likewise.
3986 (emit_ldp_q_offset): Likewise.
3987 (emit_stp_q_offset): Likewise.
3988 (emit_load_store): Likewise.
3989 (emit_ldr): Likewise.
3990 (emit_ldrsw): Likewise.
3991 (emit_str): Likewise.
3992 (emit_ldaxr): Likewise.
3993 (emit_stxr): Likewise.
3994 (emit_stlr): Likewise.
3995 (emit_data_processing_reg): Likewise.
3996 (emit_data_processing): Likewise.
3997 (emit_add): Likewise.
3998 (emit_sub): Likewise.
3999 (emit_mov): Likewise.
4000 (emit_movk): Likewise.
4001 (emit_mov_addr): Likewise.
4002 (emit_mrs): Likewise.
4003 (emit_msr): Likewise.
4004 (emit_sevl): Likewise.
4005 (emit_wfe): Likewise.
4006 (append_insns): Likewise.
4007 (can_encode_int32_in): New helper function.
4008 (aarch64_relocate_instruction): New function.
4009 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4010 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4011 (struct linux_target_ops): Install aarch64_get_thread_area,
4012 aarch64_install_fast_tracepoint_jump_pad and
4013 aarch64_get_min_fast_tracepoint_insn_len.
4014
787749ea
PL
40152015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4016
4017 * Makefile.in (aarch64-insn.o): New rule.
4018 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4019
9812b2e6
YQ
40202015-09-21 Yao Qi <yao.qi@linaro.org>
4021
4022 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4023
18fe412b
YQ
40242015-09-21 Yao Qi <yao.qi@linaro.org>
4025
4026 * tracepoint.c (max_jump_pad_size): Remove.
4027
a0cc84cd
YQ
40282015-09-18 Yao Qi <yao.qi@linaro.org>
4029
4030 * linux-aarch64-low.c: Don't include sys/uio.h.
4031 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4032
d78908cf
WW
40332015-09-16 Wei-cheng Wang <cole945@gmail.com>
4034
4035 * tracepoint.c (eval_result_type): Change prototype.
4036 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4037
d57e0d50
PA
40382015-09-15 Pedro Alves <palves@redhat.com>
4039
4040 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4041 Check whether to report exec events instead of checking whether
4042 multiprocess is enabled.
4043
5a676acc
PA
40442015-09-15 Pedro Alves <palves@redhat.com>
4045
4046 PR remote/18965
4047 * remote-utils.c (prepare_resume_reply): Merge
4048 TARGET_WAITKIND_VFORK_DONE switch case with the
4049 TARGET_WAITKIND_FORKED case.
4050
7c5d0fad
YQ
40512015-09-15 Yao Qi <yao.qi@linaro.org>
4052
4053 * server.c (handle_query): Check string comparison using
4054 "else if" instead of "if".
4055
750ce8d1
YQ
40562015-09-15 Yao Qi <yao.qi@linaro.org>
4057
4058 * server.c (vCont_supported): New global variable.
4059 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4060 matches. Append ";vContSupported+" to own_buf.
4061 (handle_v_requests): Append ";s;S" to own_buf if target supports
4062 hardware single step or vCont_supported is false.
4063 (capture_main): Set vCont_supported to zero.
4064
70b90b91
YQ
40652015-09-15 Yao Qi <yao.qi@linaro.org>
4066
4067 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4068 it to ...
4069 (linux_supports_hardware_single_step): ... New function.
4070 (linux_target_ops): Update.
4071 * lynx-low.c (lynx_target_ops): Set field
4072 supports_hardware_single_step to target_can_do_hardware_single_step.
4073 * nto-low.c (nto_target_ops): Likewise.
4074 * spu-low.c (spu_target_ops): Likewise.
4075 * win32-low.c (win32_target_ops): Likewise.
4076 * target.c (target_can_do_hardware_single_step): New function.
4077 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4078 Remove. <supports_hardware_single_step>: New field.
4079 (target_supports_conditional_breakpoints): Remove.
4080 (target_supports_hardware_single_step): New macro.
4081 (target_can_do_hardware_single_step): Declare.
4082 * server.c (handle_query): Use target_supports_hardware_single_step
4083 instead of target_supports_conditional_breakpoints.
4084
ade90bde
YQ
40852015-09-15 Yao Qi <yao.qi@linaro.org>
4086
4087 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4088 function.
4089 (struct linux_target_ops the_low_target): Install
4090 aarch64_linux_siginfo_fixup.
4091
94585166
DB
40922015-09-11 Don Breazeal <donb@codesourcery.com>
4093 Luis Machado <lgustavo@codesourcery.com>
4094
4095 * linux-low.c (linux_mourn): Static declaration.
4096 (linux_arch_setup): Move in front of
4097 handle_extended_wait.
4098 (linux_arch_setup_thread): New function.
4099 (handle_extended_wait): Handle exec events. Call
4100 linux_arch_setup_thread. Make event_lwp argument a
4101 pointer-to-a-pointer.
4102 (check_zombie_leaders): Do not check stopped threads.
4103 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4104 (linux_low_filter_event): Add lwp and thread for exec'ing
4105 non-leader thread if leader thread has been deleted.
4106 Refactor code into linux_arch_setup_thread and call it.
4107 Pass child lwp pointer by reference to handle_extended_wait.
4108 (linux_wait_for_event_filtered): Update comment.
4109 (linux_wait_1): Prevent clobbering exec event status.
4110 (linux_supports_exec_events): New function.
4111 (linux_target_ops) <supports_exec_events>: Initialize new member.
4112 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4113 new member.
4114 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4115 * server.c (report_exec_events): New global variable.
4116 (handle_query): Handle qSupported query for exec-events feature.
4117 (captured_main): Initialize report_exec_events.
4118 * server.h (report_exec_events): Declare new global variable.
4119 * target.h (struct target_ops) <supports_exec_events>: New
4120 member.
4121 (target_supports_exec_events): New macro.
4122 * win32-low.c (win32_target_ops) <supports_exec_events>:
4123 Initialize new member.
4124
0568462b
MM
41252015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4126
4127 * linux-low.c (linux_low_enable_btrace): Remove.
4128 (linux_target_ops): Replace linux_low_enable_btrace with
4129 linux_enable_btrace.
4130
39edd165
YQ
41312015-09-03 Yao Qi <yao.qi@linaro.org>
4132
4133 * linux-aarch64-low.c (aarch64_insert_point): Call
4134 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4135 returns true.
4136
1db33b5a
UW
41372015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4138
4139 * linux-low.c (check_stopped_by_breakpoint): Use
4140 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4141
ab290430
PA
41422015-08-27 Pedro Alves <palves@redhat.com>
4143
4144 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4145
8d749320
SM
41462015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4147
6711b7f8
SM
4148 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4149 the XNEW-family equivalent.
8d749320
SM
4150 (compile_bytecodes): Likewise.
4151 * dll.c (loaded_dll): Likewise.
4152 * event-loop.c (append_callback_event): Likewise.
4153 (create_file_handler): Likewise.
4154 (create_file_event): Likewise.
4155 * hostio.c (handle_open): Likewise.
4156 * inferiors.c (add_thread): Likewise.
4157 (add_process): Likewise.
4158 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4159 * linux-arm-low.c (arm_new_process): Likewise.
4160 (arm_new_thread): Likewise.
4161 * linux-low.c (add_to_pid_list): Likewise.
4162 (linux_add_process): Likewise.
4163 (handle_extended_wait): Likewise.
4164 (add_lwp): Likewise.
4165 (enqueue_one_deferred_signal): Likewise.
4166 (enqueue_pending_signal): Likewise.
4167 (linux_resume_one_lwp_throw): Likewise.
4168 (linux_resume_one_thread): Likewise.
4169 (linux_read_memory): Likewise.
4170 (linux_write_memory): Likewise.
4171 * linux-mips-low.c (mips_linux_new_process): Likewise.
4172 (mips_linux_new_thread): Likewise.
4173 (mips_add_watchpoint): Likewise.
4174 * linux-x86-low.c (initialize_low_arch): Likewise.
4175 * lynx-low.c (lynx_add_process): Likewise.
4176 * mem-break.c (set_raw_breakpoint_at): Likewise.
4177 (set_breakpoint): Likewise.
4178 (add_condition_to_breakpoint): Likewise.
4179 (add_commands_to_breakpoint): Likewise.
4180 (clone_agent_expr): Likewise.
4181 (clone_one_breakpoint): Likewise.
4182 * regcache.c (new_register_cache): Likewise.
4183 * remote-utils.c (look_up_one_symbol): Likewise.
4184 * server.c (queue_stop_reply): Likewise.
4185 (start_inferior): Likewise.
4186 (queue_stop_reply_callback): Likewise.
4187 (handle_target_event): Likewise.
4188 * spu-low.c (fetch_ppc_memory): Likewise.
4189 (store_ppc_memory): Likewise.
4190 * target.c (set_target_ops): Likewise.
4191 * thread-db.c (thread_db_load_search): Likewise.
4192 (try_thread_db_load_1): Likewise.
4193 * tracepoint.c (add_tracepoint): Likewise.
4194 (add_tracepoint_action): Likewise.
4195 (create_trace_state_variable): Likewise.
4196 (cmd_qtdpsrc): Likewise.
4197 (cmd_qtro): Likewise.
4198 (add_while_stepping_state): Likewise.
4199 * win32-low.c (child_add_thread): Likewise.
4200 (get_image_name): Likewise.
4201
ed8b7b42
YQ
42022015-08-25 Yao Qi <yao.qi@linaro.org>
4203
4204 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4205
db3cb7cb
YQ
42062015-08-25 Yao Qi <yao.qi@linaro.org>
4207
4208 * Makefile.in (aarch64-linux.o): New rule.
4209 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4210 srv_tgtobj.
4211 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4212 (aarch64_init_debug_reg_state): Make it extern.
4213 (aarch64_linux_prepare_to_resume): Remove.
4214
f6011a1c
YQ
42152015-08-25 Yao Qi <yao.qi@linaro.org>
4216
4217 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4218 lwp_arch_private_info and ptid_of_lwp.
4219
88e2cf7e
YQ
42202015-08-25 Yao Qi <yao.qi@linaro.org>
4221
4222 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4223 Find proc_info by find_process_pid. All callers updated.
4224
5e35436e
YQ
42252015-08-25 Yao Qi <yao.qi@linaro.org>
4226
4227 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4228 Remove.
4229 (debug_reg_change_callback): Remove.
4230 (aarch64_notify_debug_reg_change): Remove.
4231
4a8a7965
YQ
42322015-08-25 Yao Qi <yao.qi@linaro.org>
4233
4234 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4235 Call current_lwp_ptid.
4236
32a271ee
YQ
42372015-08-25 Yao Qi <yao.qi@linaro.org>
4238
4239 * linux-aarch64-low.c (debug_reg_change_callback): Use
4240 debug_printf.
4241
0d51c8d7
YQ
42422015-08-25 Yao Qi <yao.qi@linaro.org>
4243
4244 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4245
31a43dd5
YQ
42462015-08-25 Yao Qi <yao.qi@linaro.org>
4247
4248 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4249
8ee52567
YQ
42502015-08-25 Yao Qi <yao.qi@linaro.org>
4251
4252 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4253 the code.
4254
ff3f0f45
YQ
42552015-08-25 Yao Qi <yao.qi@linaro.org>
4256
4257 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4258 Remove.
4259 (debug_reg_change_callback): Remove argument entry and add argument
4260 lwp. Remove local variable thread. Don't print thread id in the
4261 debugging output. Don't check whether pid of thread equals to pid.
4262 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4263 iterate_over_lwps instead find_inferior.
4264
3d40fbb5
PA
42652015-08-24 Pedro Alves <palves@redhat.com>
4266
4267 * inferiors.c (get_first_process): New function.
4268 * inferiors.h (get_first_process): New declaration.
4269 * remote-utils.c (read_ptid): Default to the first process in the
4270 list, instead of to the current thread's process.
4271
438e1e42
PA
42722015-08-24 Pedro Alves <palves@redhat.com>
4273
4274 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4275 * event-loop.c: Likewise.
4276 * remote-utils.c: Likewise.
4277 * tracepoint.c: Likewise.
4278
a8c6d4fc
PA
42792015-08-24 Pedro Alves <palves@redhat.com>
4280
4281 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4282 ptid_get_lwp.
4283
99b0bb12
PA
42842015-08-21 Pedro Alves <palves@redhat.com>
4285
4286 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4287 instead of literal 1.
4288
f8904751
PA
42892015-08-21 Pedro Alves <palves@redhat.com>
4290
4291 * tdesc.c (default_description): Explicitly zero-initialize.
4292
465a859e
PA
42932015-08-21 Pedro Alves <palves@redhat.com>
4294
4295 PR gdb/18749
4296 * inferiors.c (remove_thread): Discard any pending stop reply for
4297 this thread.
4298 * server.c (remove_all_on_match_pid): Rename to ...
4299 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4300 instead of a pid.
4301 (discard_queued_stop_replies): Change parameter to a ptid. Now
4302 extern.
4303 (handle_v_kill, kill_inferior_callback, captured_main)
4304 (process_serial_event): Adjust.
4305 * server.h (discard_queued_stop_replies): Declare.
4306
f0db101d
PA
43072015-08-21 Pedro Alves <palves@redhat.com>
4308
4309 * linux-low.c (wait_for_sigstop): Always switch to no thread
4310 selected if the previously current thread dies.
4311 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4312 process instead of the current thread's.
4313 * remote-utils.c (input_interrupt): Don't check if there's no
4314 current thread.
4315 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4316 current thread to the general thread fails, error out.
4317 (handle_qxfer_auxv, handle_qxfer_libraries)
4318 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4319 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4320 (handle_query): Check if there's a thread selected instead of
4321 checking whether there's any thread in the thread list.
4322 (handle_qxfer_threads, handle_qxfer_btrace)
4323 (handle_qxfer_btrace_conf): Don't error out early if there's no
4324 thread in the thread list.
4325 (handle_v_cont, myresume): Don't set the current thread to the
4326 continue thread.
4327 (process_serial_event) <Hg handling>: Also set thread_id if the
4328 previous general thread is still alive.
4329 (process_serial_event) <g/G handling>: If setting the current
4330 thread to the general thread fails, error out.
4331 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4332 thread's lwp instead of the current thread's.
4333 * target.c (set_desired_thread): If the desired thread was not
4334 found, leave the current thread pointing to NULL. Return an int
4335 (boolean) indicating success.
4336 * target.h (set_desired_thread): Change return type to int.
4337
40045d91
MF
43382015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4339
4340 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4341 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4342 #includes.
4343 (ps_get_thread_area): New function.
4344
45face3b
GB
43452015-08-19 Gary Benson <gbenson@redhat.com>
4346
4347 * hostio.c (handle_pread): Do not attempt to read more data
4348 than hostio_reply_with_data can fit in a packet.
4349
16d5f642
JB
43502015-08-18 Joel Brobecker <brobecker@adacore.com>
4351
4352 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4353
a738da3a
MF
43542015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4355
4356 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4357
33ebda9d
PA
43582015-08-06 Pedro Alves <palves@redhat.com>
4359
4360 * tracepoint.c (expr_eval_result): Now an int.
4361
a44892be
PA
43622015-08-06 Pedro Alves <palves@redhat.com>
4363
4364 * gdbthread.h (struct regcache): Forward declare.
4365 (struct thread_info) <regcache_data>: Now a struct regcache
4366 pointer.
4367 * inferiors.c (inferior_regcache_data)
4368 (set_inferior_regcache_data): Now work with struct regcache
4369 pointers.
4370 * inferiors.h (struct regcache): Forward declare.
4371 (inferior_regcache_data, set_inferior_regcache_data): Now work
4372 with struct regcache pointers.
4373 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4374 (free_register_cache_thread): Remove struct regcache pointer
4375 casts.
4376
608a1e46
PA
43772015-08-06 Pedro Alves <palves@redhat.com>
4378
4379 * server.c (captured_main): On error, print the exception message
4380 to stderr, and if run_once is set, throw a quit.
4381
f0ce0d3a
PA
43822015-08-06 Pedro Alves <palves@redhat.com>
4383
4384 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4385 the current thread.
4386
bf47e248
PA
43872015-08-06 Pedro Alves <palves@redhat.com>
4388
4389 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4390 reading beyond the passed in buffer length.
4391
b6b9ffcc
PL
43922015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4393
4394 * tracepoint.c (symbol_list) <required>: Remove.
4395
863d01bd
PA
43962015-08-06 Pedro Alves <palves@redhat.com>
4397
4398 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4399 count if stopping and suspending threads.
4400 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4401 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4402 (linux_detach): Complete an ongoing step-over.
4403 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4404 throughout.
4405 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4406 (linux_wait_1): If passing a signal to the inferior after
4407 finishing a step-over, unsuspend and re-resume all lwps. If we
4408 see a single-step event but the thread should be continuing, don't
4409 pass the trap to gdb.
4410 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4411 internal_error instead of gdb_assert.
4412 (enqueue_pending_signal): New function.
4413 (check_ptrace_stopped_lwp_gone): Add debug output.
4414 (start_step_over): Use internal_error instead of gdb_assert.
4415 (complete_ongoing_step_over): New function.
4416 (linux_resume_one_thread): Don't resume a suspended thread.
4417 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4418 it stepping.
4419
00db26fa
PA
44202015-08-06 Pedro Alves <palves@redhat.com>
4421
4422 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4423 (linux_thread_alive): Use lwp_is_marked_dead.
4424 (extended_event_reported): Delete.
4425 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4426 instead of extended_event_reported.
4427 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4428 as well.
4429 (lwp_is_marked_dead): New function.
4430 (lwp_running): Use lwp_is_marked_dead.
4431 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4432 comment.
4433
ad071a30
PA
44342015-08-06 Pedro Alves <palves@redhat.com>
4435
4436 * linux-low.c (linux_wait_1): Move fork event output out of the
4437 !report_to_gdb check. Pass event_child->waitstatus to
4438 target_waitstatus_to_string instead of ourstatus.
4439
524b57e6
YQ
44402015-08-04 Yao Qi <yao.qi@linaro.org>
4441
4442 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4443 if current_thread is 32 bit.
4444
6085d6f6
YQ
44452015-08-04 Yao Qi <yao.qi@linaro.org>
4446
4447 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4448 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4449 * server.c (extended_protocol): Remove "static".
4450 * server.h (extended_protocol): Declare it.
4451
8a7e4587
YQ
44522015-08-04 Yao Qi <yao.qi@linaro.org>
4453
4454 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4455 both aarch64 and aarch32.
4456 (aarch64_set_pc): Likewise.
4457
3b53ae99
YQ
44582015-08-04 Yao Qi <yao.qi@linaro.org>
4459
4460 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4461 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4462 arm-with-neon.xml to srv_xmlfiles.
4463 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4464 (is_64bit_tdesc): New function.
4465 (aarch64_linux_read_description): New function.
4466 (aarch64_arch_setup): Call aarch64_linux_read_description.
4467 (regs_info): Rename to regs_info_aarch64.
4468 (aarch64_regs_info): Return right regs_info.
4469 (initialize_low_arch): Call initialize_low_arch_aarch32.
4470
bd9e6534
YQ
44712015-08-04 Yao Qi <yao.qi@linaro.org>
4472
4473 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4474 * linux-aarch32-low.c: New file.
4475 * linux-aarch32-low.h: New file.
4476 * linux-arm-low.c (arm_fill_gregset): Move it to
4477 linux-aarch32-low.c.
4478 (arm_store_gregset): Likewise.
4479 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4480 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4481 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4482 (regs_info): Rename to regs_info_arm.
4483 (arm_regs_info): Return regs_info_aarch32 if
4484 have_ptrace_getregset is 1 and target description is
4485 arm_with_neon or arm_with_vfpv3.
4486 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4487 Call initialize_low_arch_aarch32 instead.
4488
ded48a5e
YQ
44892015-08-04 Yao Qi <yao.qi@linaro.org>
4490
4491 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4492 * linux-low.c: ... here.
4493 * linux-low.h (have_ptrace_getregset): Declare it.
4494
96e9210f
PA
44952015-08-04 Pedro Alves <palves@redhat.com>
4496
4497 * thread-db.c (struct thread_db): Use new typedefs.
4498 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4499 CHK calls.
4500 (disable_thread_event_reporting): Cast result of dlsym to
4501 destination function pointer type.
4502 (thread_db_mourn): Use td_ta_delete_ftype.
4503
af60a1ef
SL
45042015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4505
4506 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4507 arch variant.
4508 (CDX_BREAKPOINT): Define for R2.
4509 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4510 (the_low_target): Add comments.
4511
e8b41681
YQ
45122015-07-30 Yao Qi <yao.qi@linaro.org>
4513
4514 * linux-arm-low.c (arm_hwcap): Remove it.
4515 (arm_read_description): New local variable arm_hwcap. Don't
4516 set arm_hwcap to zero.
4517
89abb039
YQ
45182015-07-30 Yao Qi <yao.qi@linaro.org>
4519
4520 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4521 Use regcache->tdesc instead.
4522 (arm_store_wmmxregset): Likewise.
4523 (arm_fill_vfpregset): Likewise.
4524 (arm_store_vfpregset): Likewise.
4525
deca266c
YQ
45262015-07-30 Yao Qi <yao.qi@linaro.org>
4527
4528 * linux-arm-low.c: Include arch/arm.h.
4529 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4530 (arm_store_gregset): Likewise.
4531
aa58a496
SM
45322015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4533
4534 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4535 ptrace's 4th parameter.
4536
50904b25
YQ
45372015-07-27 Yao Qi <yao.qi@linaro.org>
4538
4539 * configure.srv (case aarch64*-*-linux*): Don't set
4540 srv_linux_usrregs.
4541
5826e159
PA
45422015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4543
4544 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4545 sys/ptrace.h.
4546 * linux-arm-low.c: Likewise.
4547 * linux-cris-low.c: Likewise.
4548 * linux-crisv32-low.c: Likewise.
4549 * linux-low.c: Likewise.
4550 * linux-m68k-low.c: Likewise.
4551 * linux-mips-low.c: Likewise.
4552 * linux-nios2-low.c: Likewise.
4553 * linux-s390-low.c: Likewise.
4554 * linux-sparc-low.c: Likewise.
4555 * linux-tic6x-low.c: Likewise.
4556 * linux-tile-low.c: Likewise.
4557 * linux-x86-low.c: Likewise.
4558
54019719
PA
45592015-07-24 Pedro Alves <palves@redhat.com>
4560
4561 * config.in: Regenerate.
4562 * configure: Regenerate.
4563
eb7aa561
PA
45642015-07-24 Pedro Alves <palves@redhat.com>
4565
4566 * acinclude.m4: Include ../ptrace.m4.
4567 * configure.ac: Call GDB_AC_PTRACE.
4568 * config.in, configure: Regenerate.
4569
55d7b841
YQ
45702015-07-24 Yao Qi <yao.qi@linaro.org>
4571
4572 * linux-low.c (linux_create_inferior): Remove setting to
4573 proc->priv->new_inferior.
4574 (linux_attach): Likewise.
4575 (linux_low_filter_event): Likewise.
4576 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4577
c06cbd92
YQ
45782015-07-24 Yao Qi <yao.qi@linaro.org>
4579
4580 * linux-low.c (linux_arch_setup): New function.
4581 (linux_low_filter_event): If proc->tdesc is NULL and
4582 proc->attached is true, call the_low_target.arch_setup.
4583 Otherwise, keep status pending, and return.
4584 (linux_resume_one_lwp_throw): Don't call get_pc if
4585 thread->while_stepping isn't NULL. Don't call
4586 get_thread_regcache if proc->tdesc is NULL.
4587 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4588 (linux_target_ops): Install arch_setup.
4589 * server.c (start_inferior): Call the_target->arch_setup.
4590 * target.h (struct target_ops) <arch_setup>: New field.
4591 (target_arch_setup): New marco.
4592 * lynx-low.c (lynx_target_ops): Update.
4593 * nto-low.c (nto_target_ops): Update.
4594 * spu-low.c (spu_target_ops): Update.
4595 * win32-low.c (win32_target_ops): Update.
4596
5ae3ebba
YQ
45972015-07-24 Yao Qi <yao.qi@linaro.org>
4598
4599 * linux-low.c (linux_add_process): Don't set
4600 proc->priv->new_inferior.
4601 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4602 (linux_attach): Likewise.
4603
eb97750b
YQ
46042015-07-24 Yao Qi <yao.qi@linaro.org>
4605
4606 * server.c (start_inferior): Code refactor.
4607
51aee833
YQ
46082015-07-24 Yao Qi <yao.qi@linaro.org>
4609
4610 * server.c (process_serial_event): Set general_thread.
4611
af1b22f3
YQ
46122015-07-21 Yao Qi <yao.qi@linaro.org>
4613
4614 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4615 aarch64_linux_get_debug_reg_capacity.
4616
554717a3
YQ
46172015-07-17 Yao Qi <yao.qi@linaro.org>
4618
4619 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4620 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4621 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4622 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4623 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4624 (AARCH64_HWP_ALIGNMENT): Likewise.
4625 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4626 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4627 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4628 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4629 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4630 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4631 (struct aarch64_debug_reg_state): Likewise.
4632 (struct arch_lwp_info): Likewise.
4633 (aarch64_align_watchpoint): Likewise.
4634 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4635 (aarch64_watchpoint_length): Likewise.
4636 (aarch64_point_encode_ctrl_reg): Likewise
4637 (aarch64_point_is_aligned): Likewise.
4638 (aarch64_align_watchpoint): Likewise.
4639 (aarch64_linux_set_debug_regs):
4640 (aarch64_dr_state_insert_one_point): Likewise.
4641 (aarch64_dr_state_remove_one_point): Likewise.
4642 (aarch64_handle_breakpoint): Likewise.
4643 (aarch64_handle_aligned_watchpoint): Likewise.
4644 (aarch64_handle_unaligned_watchpoint): Likewise.
4645 (aarch64_handle_watchpoint): Likewise.
4646
c67ca4de
YQ
46472015-07-17 Yao Qi <yao.qi@linaro.org>
4648
4649 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4650 and don't aarch64_get_debug_reg_state. All callers update.
4651 (aarch64_handle_aligned_watchpoint): Likewise.
4652 (aarch64_handle_unaligned_watchpoint): Likewise.
4653 (aarch64_handle_watchpoint): Likewise.
4654 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4655 (aarch64_remove_point): Likewise.
4656
25abf979
YQ
46572015-07-17 Yao Qi <yao.qi@linaro.org>
4658
4659 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4660 debug_printf.
4661 (aarch64_handle_unaligned_watchpoint): Likewise.
4662
db1ff28b
JK
46632015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4664
4665 Revert the previous 3 commits:
4666 Move gdb_regex* to common/
4667 Move linux_find_memory_regions_full & co.
4668 gdbserver build-id attribute generator
4669
700ca40f
JK
46702015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4671 Jan Kratochvil <jan.kratochvil@redhat.com>
4672
4673 gdbserver build-id attribute generator.
4674 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4675 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4676 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4677 (find_phdr): New.
4678 (get_dynamic): Use find_pdhr to traverse program headers.
4679 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4680 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4681 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4682 (get_hex_build_id): New.
4683 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4684 to reply XML document.
4685
9904185c
JK
46862015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4687 Jan Kratochvil <jan.kratochvil@redhat.com>
4688
4689 * target.c: Include target/target-utils.h and fcntl.h.
4690 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4691 (target_fileio_read_stralloc): New functions.
4692
6e5b4429
JK
46932015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4694
4695 * Makefile.in (OBS): Add gdb_regex.o.
4696 (gdb_regex.o): New.
4697 * config.in: Rebuilt.
4698 * configure: Rebuilt.
4699
ddc98fbf
JK
47002015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4701 Jan Kratochvil <jan.kratochvil@redhat.com>
4702
4703 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4704 * Makefile.in (OBS): Add target-utils.o.
4705 (linux-maps.o, target-utils.o): New.
4706 * configure.srv (srv_linux_obj): Add linux-maps.o.
4707
e57bb7a0
PL
47082015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4709
4710 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4711 function, return 1.
4712 (the_low_target): Install it.
4713
586b02a9
PA
47142015-07-14 Pedro Alves <palves@redhat.com>
4715
4716 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4717 Instead, ignore ECHILD, and throw an error for other errnos.
4718
58c1b36c
PA
47192015-07-10 Pedro Alves <palves@redhat.com>
4720
4721 * event-loop.c (struct callback_event) <data>: Change type to
4722 gdb_client_data instance instead of gdb_client_data pointer.
4723 (append_callback_event): Adjust.
4724
421530db
PL
47252015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4726
4727 * linux-aarch64-low.c: Add comments for each linux_target_ops
4728 method. Remove comments already covered in target_ops and
4729 linux_target_ops definitions.
4730 (the_low_target): Add comments for each unimplemented method.
4731
c2d65f38
YQ
47322015-07-09 Yao Qi <yao.qi@linaro.org>
4733
4734 * linux-aarch64-low.c (aarch64_regmap): Remove.
4735 (aarch64_usrregs_info): Remove.
4736 (regs_info): Set field usrregs to NULL.
4737
b20a6524
MM
47382015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4739
4740 * linux-low.c: Include "rsp-low.h"
4741 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4742 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4743 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4744 (handle_btrace_enable_pt): New.
4745 (handle_btrace_general_set): Support "pt".
4746 (handle_btrace_conf_general_set): Support "pt:size".
4747
96c97461
PL
47482015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4749
4750 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4751 Z_PACKET_SW_BP.
4752
37d66942
PL
47532015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4754
4755 * linux-aarch64-low.c: Remove comment about endianness.
4756 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4757 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4758 memcmp.
4759
dc06243f
GB
47602015-06-24 Gary Benson <gbenson@redhat.com>
4761
4762 * linux-i386-ipa.c (stdint.h): Do not include.
4763 * lynx-i386-low.c (stdint.h): Likewise.
4764 * lynx-ppc-low.c (stdint.h): Likewise.
4765 * mem-break.c (stdint.h): Likewise.
4766 * thread-db.c (stdint.h): Likewise.
4767 * tracepoint.c (stdint.h): Likewise.
4768 * win32-low.c (stdint.h): Likewise.
4769
124e13d9
SM
47702015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4771
4772 * server.c (write_qxfer_response): Update call to
4773 remote_escape_output.
4774
909c2cda
JK
47752015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4776 Jan Kratochvil <jan.kratochvil@redhat.com>
4777
4778 Merge multiple hex conversions.
4779 * gdbreplay.c (tohex): Rename to 'fromhex'.
4780 (logchar): Use fromhex.
4781
24c05f46
JK
47822015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4783
4784 * server.c (handle_qxfer_libraries): Set `version' attribute for
4785 <library-list>.
4786
14d2069a
GB
47872015-06-10 Gary Benson <gbenson@redhat.com>
4788
4789 * target.h (struct target_ops) <multifs_open>: New field.
4790 <multifs_unlink>: Likewise.
4791 <multifs_readlink>: Likewise.
4792 * linux-low.c (nat/linux-namespaces.h): New include.
4793 (linux_target_ops): Initialize the_target->multifs_open,
4794 the_target->multifs_unlink and the_target->multifs_readlink.
4795 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4796 * hostio.c (hostio_fs_pid): New static variable.
4797 (hostio_handle_new_gdb_connection): New function.
4798 (handle_setfs): Likewise.
4799 (handle_open): Use the_target->multifs_open as appropriate.
4800 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4801 (handle_readlink): Use the_target->multifs_readlink as
4802 appropriate.
4803 (handle_vFile): Handle vFile:setfs packets.
4804 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4805 after target_handle_new_gdb_connection.
4806
4b8b5e72
GB
48072015-06-10 Gary Benson <gbenson@redhat.com>
4808
4809 * configure.ac (AC_CHECK_FUNCS): Add setns.
4810 * config.in: Regenerate.
4811 * configure: Likewise.
4812 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4813 (linux-namespaces.o): New rule.
4814 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4815
3ac2e371
GB
48162015-06-09 Gary Benson <gbenson@redhat.com>
4817
4818 * hostio.c (handle_open): Process mode argument with
4819 fileio_to_host_mode.
4820
ca9b78ce
YQ
48212015-06-01 Yao Qi <yao.qi@linaro.org>
4822
4823 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4824 * linux-x86-low.c: Likewise.
4825
bfacd19d
DB
48262015-05-28 Don Breazeal <donb@codesourcery.com>
4827
4828 * linux-low.c (handle_extended_wait): Initialize
4829 thread_info.last_resume_kind for new fork children.
4830
452003ef
PA
48312015-05-15 Pedro Alves <palves@redhat.com>
4832
4833 * target.h (target_handle_new_gdb_connection): Rewrite using if
4834 wrapped in do/while.
4835
1041a03c
JB
48362015-05-14 Joel Brobecker <brobecker@adacore.com>
4837
4838 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4839 * configure, config.in: Regenerate.
4840 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4841 Declare typedef.
4842
c269dbdb
DB
48432015-05-12 Don Breazeal <donb@codesourcery.com>
4844
4845 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4846 PTRACE_EVENT_VFORK_DONE.
4847 (linux_low_ptrace_options, extended_event_reported): Add vfork
4848 events.
4849 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4850 and "vforkdone" for RSP 'T' Stop Reply Packet.
4851 * server.h (report_vfork_events): Declare
4852 global variable.
4853
3a8a0396
DB
48542015-05-12 Don Breazeal <donb@codesourcery.com>
4855
4856 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4857 (the_low_target) <new_fork>: Initialize new member.
4858 * linux-arm-low.c (arm_new_fork): New function.
4859 (the_low_target) <new_fork>: Initialize new member.
4860 * linux-low.c (handle_extended_wait): Call new target function
4861 new_fork.
4862 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4863 * linux-mips-low.c (mips_add_watchpoint): New function
4864 extracted from mips_insert_point.
4865 (the_low_target) <new_fork>: Initialize new member.
4866 (mips_linux_new_fork): New function.
4867 (mips_insert_point): Call mips_add_watchpoint.
4868 * linux-x86-low.c (x86_linux_new_fork): New function.
4869 (the_low_target) <new_fork>: Initialize new member.
4870
de0d863e
DB
48712015-05-12 Don Breazeal <donb@codesourcery.com>
4872
4873 * linux-low.c (handle_extended_wait): Implement return value,
4874 rename argument 'event_child' to 'event_lwp', handle
4875 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4876 (linux_low_ptrace_options): New function.
4877 (linux_low_filter_event): Call linux_low_ptrace_options,
4878 use different argument fo linux_enable_event_reporting,
4879 use return value from handle_extended_wait.
4880 (extended_event_reported): New function.
4881 (linux_wait_1): Call extended_event_reported and set
4882 status to report fork events.
4883 (linux_write_memory): Add pid to debug message.
4884 (reset_lwp_ptrace_options_callback): New function.
4885 (linux_handle_new_gdb_connection): New function.
4886 (linux_target_ops): Initialize new structure member.
4887 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4888 * lynx-low.c: Initialize new structure member.
4889 * remote-utils.c (prepare_resume_reply): Implement stop reason
4890 "fork" for "T" stop message.
4891 * server.c (handle_query): Call handle_new_gdb_connection.
4892 * server.h (report_fork_events): Declare global flag.
4893 * target.h (struct target_ops) <handle_new_gdb_connection>:
4894 New member.
4895 (target_handle_new_gdb_connection): New macro.
4896 * win32-low.c: Initialize new structure member.
4897
ddcbc397
DB
48982015-05-12 Don Breazeal <donb@codesourcery.com>
4899
4900 * mem-break.c (APPEND_TO_LIST): Define macro.
4901 (clone_agent_expr): New function.
4902 (clone_one_breakpoint): New function.
4903 (clone_all_breakpoints): New function.
4904 * mem-break.h: Declare new functions.
4905
89245bc0
DB
49062015-05-12 Don Breazeal <donb@codesourcery.com>
4907
4908 * linux-low.c (linux_supports_fork_events): New function.
4909 (linux_supports_vfork_events): New function.
4910 (linux_target_ops): Initialize new structure members.
4911 (initialize_low): Call linux_check_ptrace_features.
4912 * lynx-low.c (lynx_target_ops): Initialize new structure
4913 members.
4914 * server.c (report_fork_events, report_vfork_events):
4915 New global flags.
4916 (handle_query): Add new features to qSupported packet and
4917 response.
4918 (captured_main): Initialize new global variables.
4919 * target.h (struct target_ops) <supports_fork_events>:
4920 New member.
4921 <supports_vfork_events>: New member.
4922 (target_supports_fork_events): New macro.
4923 (target_supports_vfork_events): New macro.
4924 * win32-low.c (win32_target_ops): Initialize new structure
4925 members.
4926
835205d0
GB
49272015-05-12 Gary Benson <gbenson@redhat.com>
4928
4929 * server.c (handle_qxfer_exec_file): Use current process
4930 if annex is empty.
4931
21e94bd9
SL
49322015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4933
4934 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4935 Remove HAVE_PTRACE_GETREGS conditionals.
4936 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4937 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4938
45614f15
YQ
49392015-05-08 Yao Qi <yao.qi@linaro.org>
4940
4941 * linux-low.c (linux_supports_conditional_breakpoints): New
4942 function.
4943 (linux_target_ops): Install new target method.
4944 * lynx-low.c (lynx_target_ops): Install NULL hook for
4945 supports_conditional_breakpoints.
4946 * nto-low.c (nto_target_ops): Likewise.
4947 * spu-low.c (spu_target_ops): Likewise.
4948 * win32-low.c (win32_target_ops): Likewise.
4949 * server.c (handle_query): Check
4950 target_supports_conditional_breakpoints.
4951 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4952 New field.
4953 (target_supports_conditional_breakpoints): New macro.
4954
80ad801e
PA
49552015-05-06 Pedro Alves <palves@redhat.com>
4956
4957 PR server/18081
4958 * server.c (start_inferior): If the process exits, mourn it.
4959
819843c7
GB
49602015-04-21 Gary Benson <gbenson@redhat.com>
4961
4962 * hostio.c (fileio_open_flags_to_host): Factored out to
4963 fileio_to_host_openflags in common/fileio.c. Single use
4964 updated.
4965
a2d5a9d7
MF
49662015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4967
4968 * linux-xtensa-low.c (xtensa_fill_gregset)
4969 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4970 XCHAL_HAVE_LOOP.
4971
deb44829
MF
49722015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4973
4974 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4975 (regs_info): Replace usrregs pointer with NULL.
4976
e57f1de3
GB
49772015-04-17 Gary Benson <gbenson@redhat.com>
4978
4979 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4980 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4981 * server.c (handle_qxfer_exec_file): New function.
4982 (qxfer_packets): Add exec-file entry.
4983 (handle_query): Report qXfer:exec-file:read as supported packet.
4984
62828379
RN
49852015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4986
4987 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4988
b88bb450
GB
49892015-04-09 Gary Benson <gbenson@redhat.com>
4990
4991 * hostio-errno.c (errno_to_fileio_error): Remove function.
4992 Update caller to use remote_fileio_to_fio_error.
4993
c8f4bfdd
YQ
49942015-04-09 Yao Qi <yao.qi@linaro.org>
4995
4996 * linux-low.c (linux_insert_point): Call
4997 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4998 (linux_remove_point): Call remove_memory_breakpoint if type is
4999 raw_bkpt_type_sw.
5000 * linux-x86-low.c (x86_insert_point): Don't call
5001 insert_memory_breakpoint.
5002 (x86_remove_point): Don't call remove_memory_breakpoint.
5003
41f98f02
PA
50042015-04-01 Pedro Alves <palves@redhat.com>
5005 Cleber Rosa <crosa@redhat.com>
5006
5007 * server.c (gdbserver_usage): Reorganize and extend the usage
5008 message.
5009
2bf6fb9d
PA
50102015-03-24 Pedro Alves <palves@redhat.com>
5011
5012 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5013 output. Also dump TRAP_TRACE.
5014 (linux_low_filter_event): In debug output, distinguish a
5015 resume_stop SIGSTOP from a delayed SIGSTOP.
5016
369f6daa
GB
50172015-03-24 Gary Benson <gbenson@redhat.com>
5018
5019 * linux-x86-low.c (x86_linux_new_thread): Moved to
5020 nat/x86-linux.c.
5021 (x86_linux_prepare_to_resume): Likewise.
5022
8e5d4070
GB
50232015-03-24 Gary Benson <gbenson@redhat.com>
5024
5025 * Makefile.in (x86-linux-dregs.o): New rule.
5026 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5027 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5028 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5029 (x86_linux_dr_get): Likewise.
5030 (x86_linux_dr_set): Likewise.
5031 (update_debug_registers_callback): Likewise.
5032 (x86_linux_dr_set_addr): Likewise.
5033 (x86_linux_dr_get_addr): Likewise.
5034 (x86_linux_dr_set_control): Likewise.
5035 (x86_linux_dr_get_control): Likewise.
5036 (x86_linux_dr_get_status): Likewise.
5037 (x86_linux_update_debug_registers): Likewise.
5038
2b95d440
GB
50392015-03-24 Gary Benson <gbenson@redhat.com>
5040
5041 * linux-x86-low.c (x86_linux_update_debug_registers):
5042 New function, factored out from...
5043 (x86_linux_prepare_to_resume): ...this.
5044
14b0bc68
GB
50452015-03-24 Gary Benson <gbenson@redhat.com>
5046
5047 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5048 (x86_linux_dr_set): Likewise.
5049 (update_debug_registers_callback): Likewise.
5050 (x86_linux_dr_set_addr): Likewise.
5051 (x86_linux_dr_get_addr): Likewise.
5052 (x86_linux_dr_set_control): Likewise.
5053 (x86_linux_dr_get_control): Likewise.
5054 (x86_linux_dr_get_status): Likewise.
5055 (x86_linux_prepare_to_resume): Likewise.
5056
5dfe6ca8
GB
50572015-03-24 Gary Benson <gbenson@redhat.com>
5058
5059 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5060 Use perror_with_name. Pass string through gettext.
5061 (x86_linux_dr_set): Likewise.
5062
d33472ad
GB
50632015-03-24 Gary Benson <gbenson@redhat.com>
5064
5065 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5066 (x86_linux_dr_set_addr): ...this.
5067 (x86_dr_low_get_addr): Rename to...
5068 (x86_linux_dr_get_addr): ...this.
5069 (x86_dr_low_set_control): Rename to...
5070 (x86_linux_dr_set_control): ...this.
5071 (x86_dr_low_get_control): Rename to...
5072 (x86_linux_dr_get_control): ...this.
5073 (x86_dr_low_get_status): Rename to...
5074 (x86_linux_dr_get_status): ...this.
5075 (x86_dr_low): Update with new function names.
5076
4b134ca1
GB
50772015-03-24 Gary Benson <gbenson@redhat.com>
5078
5079 * Makefile.in (x86-linux.o): New rule.
5080 * configure.srv: Add x86-linux.o to relevant targets.
5081 * linux-low.c (lwp_set_arch_private_info): New function.
5082 (lwp_arch_private_info): Likewise.
5083 * linux-x86-low.c: Include nat/x86-linux.h.
5084 (arch_lwp_info): Removed structure.
5085 (update_debug_registers_callback):
5086 Use lwp_set_debug_registers_changed.
5087 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5088 and lwp_set_debug_registers_changed.
5089 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5090
34c703da
GB
50912015-03-24 Gary Benson <gbenson@redhat.com>
5092
5093 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5094 * linux-arm-low.c (arm_new_thread): Likewise.
5095 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5096 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5097 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5098 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5099
cff068da
GB
51002015-03-24 Gary Benson <gbenson@redhat.com>
5101
5102 * linux-low.c (ptid_of_lwp): New function.
5103 (lwp_is_stopped): Likewise.
5104 (lwp_stop_reason): Likewise.
5105 * linux-x86-low.c (update_debug_registers_callback):
5106 Use lwp_is_stopped.
5107 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5108 lwp_stop_reason.
5109
b2f7c7e8
GB
51102015-03-24 Gary Benson <gbenson@redhat.com>
5111
5112 * linux-low.h (linux_stop_lwp): Remove declaration.
5113
6d4ee8c6
GB
51142015-03-24 Gary Benson <gbenson@redhat.com>
5115
5116 * linux-low.h: Include nat/linux-nat.h.
5117 * linux-low.c (iterate_over_lwps_args): New structure.
5118 (iterate_over_lwps_filter): New function.
5119 (iterate_over_lwps): Likewise.
5120 * linux-x86-low.c (update_debug_registers_callback):
5121 Update signature to what iterate_over_lwps expects.
5122 Remove PID check that iterate_over_lwps now performs.
5123 (x86_dr_low_set_addr): Use iterate_over_lwps.
5124 (x86_dr_low_set_control): Likewise.
5125
70a0bb6b
GB
51262015-03-24 Gary Benson <gbenson@redhat.com>
5127
5128 * linux-x86-low.c (x86_debug_reg_state): New function.
5129 (x86_linux_prepare_to_resume): Use the above.
5130
7b669087
GB
51312015-03-24 Gary Benson <gbenson@redhat.com>
5132
5133 * linux-low.c (current_lwp_ptid): New function.
5134 * linux-x86-low.c: Include nat/linux-nat.h.
5135 (x86_dr_low_get_addr): Use current_lwp_ptid.
5136 (x86_dr_low_get_control): Likewise.
5137 (x86_dr_low_get_status): Likewise.
5138
eef49a3d
PA
51392015-03-20 Pedro Alves <palves@redhat.com>
5140
5141 * tracepoint.c (cmd_qtstatus): Make "str" const.
5142
b2333d22
PA
51432015-03-20 Pedro Alves <palves@redhat.com>
5144
5145 * server.c (handle_general_set): Make "req_str" const.
5146
23f238d3
PA
51472015-03-19 Pedro Alves <palves@redhat.com>
5148
5149 * linux-low.c (linux_resume_one_lwp): Rename to ...
5150 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5151 instead call perror_with_name.
5152 (check_ptrace_stopped_lwp_gone): New function.
5153 (linux_resume_one_lwp): Reimplement as wrapper around
5154 linux_resume_one_lwp_throw that swallows errors if the LWP is
5155 gone.
5156
91baf43f
PA
51572015-03-19 Pedro Alves <palves@redhat.com>
5158
5159 * linux-low.c (count_events_callback, select_event_lwp_callback):
5160 No longer check whether the thread has resume_stop as last resume
5161 kind.
5162
8bf3b159
PA
51632015-03-19 Pedro Alves <palves@redhat.com>
5164
5165 * linux-low.c (count_events_callback, select_event_lwp_callback):
5166 Use the lwp's status_pending_p field, not the thread's.
5167
b90fc188
PA
51682015-03-19 Pedro Alves <palves@redhat.com>
5169
5170 * linux-low.c (select_event_lwp_callback): Update comments to
5171 no longer mention SIGTRAP.
5172
464b0089
GB
51732015-03-18 Gary Benson <gbenson@redhat.com>
5174
5175 * server.c (handle_query): Do not report vFile:fstat as supported.
5176
aa9e327f
GB
51772015-03-11 Gary Benson <gbenson@redhat.com>
5178
5179 * hostio.c (sys/types.h): New include.
5180 (sys/stat.h): Likewise.
5181 (common-remote-fileio.h): Likewise.
5182 (handle_fstat): New function.
5183 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5184
791c0056
GB
51852015-03-11 Gary Benson <gbenson@redhat.com>
5186
5187 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5188 struct stat.st_blocks and struct stat.st_blksize.
5189 * configure: Regenerate.
5190 * config.in: Likewise.
5191 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5192 (OBS): Add common-remote-fileio.o.
5193 (common-remote-fileio.o): New rule.
5194
9a9df970
PA
51952015-03-09 Pedro Alves <palves@redhat.com>
5196
5197 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5198 'struct sockaddr' pointer in 'accept' call.
5199
9eb1356e
PA
52002015-03-09 Pedro Alves <palves@redhat.com>
5201
5202 Revert:
5203 2015-03-07 Pedro Alves <palves@redhat.com>
5204 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5205 or <winsock2.h> here. Instead include "gdb_socket.h".
5206 (remote_open): Use union gdb_sockaddr_u.
5207 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5208 or <winsock2.h> here. Instead include "gdb_socket.h".
5209 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5210 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5211 or <sys/un.h>.
5212 (init_named_socket, gdb_agent_helper_thread): Use union
5213 gdb_sockaddr_u.
5214
aac331e4
PA
52152015-03-07 Pedro Alves <palves@redhat.com>
5216
5217 * configure.ac (build_warnings): Move
5218 -Wdeclaration-after-statement to the C-specific set.
5219 * configure: Regenerate.
5220
366c75fc
PA
52212015-03-07 Pedro Alves <palves@redhat.com>
5222
5223 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5224 or <winsock2.h> here. Instead include "gdb_socket.h".
5225 (remote_open): Use union gdb_sockaddr_u.
5226 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5227 or <winsock2.h> here. Instead include "gdb_socket.h".
5228 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5229 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5230 or <sys/un.h>.
5231 (init_named_socket, gdb_agent_helper_thread): Use union
5232 gdb_sockaddr_u.
5233
492d29ea
PA
52342015-03-07 Pedro Alves <palves@redhat.com>
5235
5236 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5237 instead.
5238
60a191ed
YQ
52392015-03-06 Yao Qi <yao.qi@linaro.org>
5240
5241 * linux-aarch64-low.c (aarch64_insert_point): Use
5242 show_debug_regs as a boolean.
5243 (aarch64_remove_point): Likewise.
5244
f5771b1d
PA
52452015-03-05 Pedro Alves <palves@redhat.com>
5246
5247 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5248 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5249 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5250 * nto-low.c (nto_target_ops): Likewise.
5251 * spu-low.c (spu_target_ops): Likewise.
5252 * win32-low.c (win32_target_ops): Likewise.
5253
3e572f71
PA
52542015-03-04 Pedro Alves <palves@redhat.com>
5255
72f4393d 5256 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5257 Decide whether a breakpoint triggered based on the SIGTRAP's
5258 siginfo.si_code.
72f4393d
L
5259 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5260 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5261 (linux_low_filter_event): Check for breakpoints before checking
5262 watchpoints.
5263 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5264 siginfo.si_code.
72f4393d
L
5265 (linux_stopped_by_sw_breakpoint)
5266 (linux_supports_stopped_by_sw_breakpoint)
5267 (linux_stopped_by_hw_breakpoint)
5268 (linux_supports_stopped_by_hw_breakpoint): New functions.
5269 (linux_target_ops): Install new target methods.
3e572f71 5270
1ec68e26
PA
52712015-03-04 Pedro Alves <palves@redhat.com>
5272
5273 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5274 * server.c (swbreak_feature, hwbreak_feature): New globals.
5275 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5276 (captured_main): Clear swbreak_feature and hwbreak_feature.
5277 * server.h (swbreak_feature, hwbreak_feature): Declare.
5278 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5279 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5280 supports_stopped_by_hw_breakpoint>: New fields.
5281 (target_supports_stopped_by_sw_breakpoint)
5282 (target_stopped_by_sw_breakpoint)
5283 (target_supports_stopped_by_hw_breakpoint)
5284 (target_stopped_by_hw_breakpoint): Declare.
5285
15c66dd6
PA
52862015-03-04 Pedro Alves <palves@redhat.com>
5287
5288 enum lwp_stop_reason -> enum target_stop_reason
5289 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5290 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5291 (linux_wait_1, stuck_in_jump_pad_callback)
5292 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5293 (linux_stopped_by_watchpoint):
5294 * linux-low.h (enum lwp_stop_reason): Delete.
5295 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5296 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5297
98fc70d6
YQ
52982015-03-04 Yao Qi <yao.qi@linaro.org>
5299
5300 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5301
dd2ac174
GB
53022015-03-03 Gary Benson <gbenson@redhat.com>
5303
5304 * hostio.c (handle_vFile): Fix prefix lengths.
5305
d68e53f4
MM
53062015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5307
5308 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5309 ptr_bits.
5310
bf2d68ab
AA
53112015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5312
5313 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5314 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5315 (clean): Add "rm -f" for above C files.
5316 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5317 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5318 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5319 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5320 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5321 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5322 (init_registers_s390x_vx_linux64)
5323 (init_registers_s390x_tevx_linux64)
5324 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5325 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5326 declarations.
5327 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5328 (s390_store_vxrs_high): New functions.
5329 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5330 NT_S390_VXRS_HIGH.
5331 (s390_arch_setup): Add logic for selecting one of the new target
5332 descriptions. Activate the new vector regsets if applicable.
5333 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5334 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5335 and init_registers_s390x_tevx_linux64.
5336
c966a859
PA
53372015-03-01 Pedro Alves <palves@redhat.com>
5338
5339 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5340 parameter.
5341
4180215b
PA
53422015-02-27 Pedro Alves <palves@redhat.com>
5343
5344 * linux-x86-low.c (u_debugreg_offset): New function.
5345 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5346
749bab01
PA
53472015-02-27 Pedro Alves <palves@redhat.com>
5348
5349 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5350 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5351 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5352 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5353 (ps_lsetfpregs, ps_getpid)
5354 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5355 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5356 (ps_lsetxregs, ps_plog): Declare.
5357
3c14e5a3
PA
53582015-02-27 Pedro Alves <palves@redhat.com>
5359
5360 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5361 IP_AGENT_EXPORT_FUNC.
5362 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5363 IP_AGENT_EXPORT_FUNC.
5364 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5365 (IP_AGENT_EXPORT): Delete.
5366 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5367 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5368 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5369 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5370 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5371 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5372 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5373 (traceframe_read_count, traceframe_write_count)
5374 (traceframes_created, trace_state_variables, get_raw_reg)
5375 (get_trace_state_variable_value, set_trace_state_variable_value)
5376 (ust_loaded, helper_thread_id, cmd_buf): Use
5377 IPA_SYM_EXPORTED_NAME.
5378 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5379 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5380 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5381 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5382 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5383 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5384 EXTERN_C_PUSH/EXTERN_C_POP.
5385 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5386 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5387 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5388 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5389 (traceframe_write_count, traceframe_read_count)
5390 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5391 (about_to_request_buffer_space, get_trace_state_variable_value)
5392 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5393 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5394 EXTERN_C_PUSH/EXTERN_C_POP.
5395 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5396 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5397 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5398 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5399 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5400 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5401 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5402 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5403 Define.
5404 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5405 (IP_AGENT_EXPORT_VAR_DECL): Define.
5406 (tracing): Declare.
5407 (gdb_agent_get_raw_reg): Declare.
5408
fe978cb0
PA
54092015-02-27 Tom Tromey <tromey@redhat.com>
5410 Pedro Alves <palves@redhat.com>
5411
5412 Rename symbols whose names are reserved C++ keywords throughout.
5413
3bc3d82a
PA
54142015-02-27 Pedro Alves <palves@redhat.com>
5415
5416 * Makefile.in (COMPILER): New, get it from autoconf.
5417 (CXX): Get from autoconf instead.
5418 (COMPILE.pre): Use COMPILER.
5419 (CC-LD): Rename to ...
5420 (CC_LD): ... this. Use COMPILER.
5421 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5422 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5423 * acinclude.m4: Include build-with-cxx.m4.
5424 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5425 Disable -Werror by default if building in C++ mode.
5426 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5427 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5428 the C++ compiler. Save/restore CXXFLAGS too.
5429 * configure: Regenerate.
5430
07697489
PA
54312015-02-27 Pedro Alves <palves@redhat.com>
5432
5433 * acinclude.m4: Include libiberty.m4.
5434 * configure.ac: Call libiberty_INIT.
5435 * config.in, configure: Regenerate.
5436
9beb7c4e
PA
54372015-02-26 Pedro Alves <palves@redhat.com>
5438
5439 * linux-low.c (linux_wait_1): When incrementing the PC past a
5440 program breakpoint always use the_low_target.breakpoint_len as
5441 increment, rather than the maximum between that and
5442 the_low_target.decr_pc_after_break.
5443
8090aef2
PA
54442015-02-23 Pedro Alves <palves@redhat.com>
5445
5446 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5447 thread was doing a step-over; always adjust the PC if
5448 we stepped over a permanent breakpoint.
5449 (linux_wait_1): If we stepped over breakpoint that was on top of a
5450 permanent breakpoint, manually advance the PC past it.
5451
bc9540e8
PA
54522015-02-23 Pedro Alves <palves@redhat.com>
5453
5454 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5455 modes.
5456 (x86_fill_gregset, x86_store_gregset): Use it when handling
5457 $orig_eax.
5458
2db9a427
PA
54592015-02-20 Pedro Alves <palves@redhat.com>
5460
5461 * thread-db.c: Include "nat/linux-procfs.h".
5462 (thread_db_init): Skip listing new threads if the kernel supports
5463 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5464
afa8d396
PA
54652015-02-20 Pedro Alves <palves@redhat.com>
5466
5467 * linux-low.c (status_pending_p_callback): Use ptid_match.
5468
c9587f88
AT
54692015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5470
5471 PR breakpoints/16812
5472 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5473 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5474 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5475
b05ec7a5
AT
54762015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5477
5478 PR breakpoints/15956
5479 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5480
d33501a5
MM
54812015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5482
5483 * linux-low.c (linux_low_btrace_conf): Print size.
5484 * server.c (handle_btrace_conf_general_set): New.
5485 (hanle_general_set): Call handle_btrace_conf_general_set.
5486 (handle_query): Report Qbtrace-conf:bts:size as supported.
5487
f4abbc16
MM
54882015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5489
5490 * linux-low.c (linux_low_enable_btrace): Update parameters.
5491 (linux_low_btrace_conf): New.
5492 (linux_target_ops)<to_btrace_conf>: Initialize.
5493 * server.c (current_btrace_conf): New.
5494 (handle_btrace_enable): Rename to ...
5495 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5496 to target_enable_btrace. Update comment. Update users.
5497 (handle_qxfer_btrace_conf): New.
5498 (qxfer_packets): Add btrace-conf entry.
5499 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5500 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5501 (target_ops)<read_btrace_conf>: New.
5502 (target_enable_btrace): Update parameters.
5503 (target_read_btrace_conf): New.
5504
043c3577
MM
55052015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5506
5507 * server.c (handle_btrace_general_set): Remove call to
5508 target_supports_btrace.
5509 (supported_btrace_packets): New.
5510 (handle_query): Call supported_btrace_packets.
5511 * target.h: include btrace-common.h.
5512 (btrace_target_info): Removed.
5513 (supports_btrace, target_supports_btrace): Update parameters.
5514
734b0e4b
MM
55152015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5516
5517 * Makefile.in (SFILES): Add common/btrace-common.c.
5518 (OBS): Add common/btrace-common.o.
5519 (btrace-common.o): Add build rules.
5520 * linux-low: Include btrace-common.h.
5521 (linux_low_read_btrace): Use struct btrace_data. Call
5522 btrace_data_init and btrace_data_fini.
5523
d6c146e9
PA
55242015-02-06 Pedro Alves <palves@redhat.com>
5525
5526 * thread-db.c (find_new_threads_callback): Add debug output.
5527
20ba1ce6
PA
55282015-02-04 Pedro Alves <palves@redhat.com>
5529
5530 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5531 (resume_stopped_resumed_lwps): New function.
5532 (linux_wait_for_event_filtered): Use it.
5533
8cc73a39
SDJ
55342015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5535
5536 * Makefile.in (SFILES): Add linux-personality.c.
5537 (linux-personality.o): New rule.
5538 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5539 list of objects to be built.
5540 * linux-low.c: Include nat/linux-personality.h.
5541 (linux_create_inferior): Remove code to disable address space
5542 randomization (moved to ../nat/linux-personality.c). Create
5543 cleanup to disable address space randomization.
5544
fb23d554
SDJ
55452015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5546
5547 * Makefile.in (posix-strerror.o): New rule.
5548 (mingw-strerror.o): Likewise.
5549 * configure: Regenerated.
5550 * configure.ac: Source file ../common/common.host. Initialize new
5551 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5552
cdf43629
YQ
55532015-01-14 Yao Qi <yao@codesourcery.com>
5554
5555 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5556 (ppc-linux.o): New rule.
5557 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5558 * configure.ac: AC_CHECK_FUNCS(getauxval).
5559 * config.in: Re-generated.
5560 * configure: Re-generated.
5561 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5562 ppc64_64bit_inferior_p
5563
514c5338
YQ
55642015-01-14 Yao Qi <yao@codesourcery.com>
5565
5566 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5567 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5568 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5569 (PT_ORIG_R3, PT_TRAP): Likewise.
5570 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5571 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5572 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5573
3368c1e5
JB
55742015-01-10 Joel Brobecker <brobecker@adacore.com>
5575
5576 * i387-fp.c (i387_cache_to_xsave): In look over
5577 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5578 zmmh_low_space field by use of zmmh_high_space.
5579
582511be
PA
55802015-01-09 Pedro Alves <palves@redhat.com>
5581
5582 * linux-low.c (step_over_bkpt): Move higher up in the file.
5583 (handle_extended_wait): Don't store the stop_pc here.
5584 (get_stop_pc): Adjust comments and rename to ...
5585 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5586 stopped for a software breakpoint or hardware breakpoint.
5587 (thread_still_has_status_pending_p): New function.
5588 (status_pending_p_callback): Use
5589 thread_still_has_status_pending_p. If the event is no longer
5590 interesting, resume the LWP.
5591 (handle_tracepoints): Add assert.
5592 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5593 (wstatus_maybe_breakpoint): New function.
5594 (cancel_breakpoint): Delete function.
5595 (check_stopped_by_watchpoint): New function, factored out from
5596 linux_low_filter_event.
5597 (lp_status_maybe_breakpoint): Delete function.
5598 (linux_low_filter_event): Remove filter_ptid argument.
5599 Leave thread group exits pending here. Store the LWP's stop PC.
5600 Always leave events pending.
5601 (linux_wait_for_event_filtered): Pull all events out of the
5602 kernel, and leave them all pending.
5603 (count_events_callback, select_event_lwp_callback): Consider all
5604 events.
5605 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5606 (select_event_lwp): Only give preference to the stepping LWP in
5607 all-stop mode. Adjust comments.
5608 (ignore_event): New function.
5609 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5610 references to cancel_breakpoints. Adjust to renames. Also give
5611 equal priority to all LWPs that have had events in non-stop mode.
5612 If reporting a software breakpoint event, unadjust the LWP's PC.
5613 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5614 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5615 Adjust.
5616 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5617 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5618 (linux_stopped_by_watchpoint): Adjust.
5619 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5620 * linux-low.h (enum lwp_stop_reason): New.
5621 (struct lwp_info) <stop_pc>: Adjust comment.
5622 <stopped_by_watchpoint>: Delete field.
5623 <stop_reason>: New field.
5624 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5625 * mem-break.c (software_breakpoint_inserted_here)
5626 (hardware_breakpoint_inserted_here): New function.
5627 * mem-break.h (software_breakpoint_inserted_here)
5628 (hardware_breakpoint_inserted_here): Declare.
5629 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5630 (cancel_breakpoints): Delete.
5631 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5632 (upload_fast_traceframes): Remove references to
5633 cancel_breakpoints.
5634
a33e3959
PA
56352015-01-09 Pedro Alves <palves@redhat.com>
5636
5637 * thread-db.c (find_new_threads_callback): Ignore thread if the
5638 kernel thread ID is -1.
5639
8784d563
PA
56402015-01-09 Pedro Alves <palves@redhat.com>
5641
5642 * linux-low.c (linux_attach_fail_reason_string): Move to
5643 nat/linux-ptrace.c, and rename.
5644 (linux_attach_lwp): Update comment.
5645 (attach_proc_task_lwp_callback): New function.
5646 (linux_attach): Adjust to rename and use
5647 linux_proc_attach_tgid_threads.
5648 (linux_attach_fail_reason_string): Delete declaration.
5649
76f2b779
JB
56502015-01-01 Joel Brobecker <brobecker@adacore.com>
5651
5652 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5653 * server.c (gdbserver_version): Likewise.
5654
fafcc06a
SDJ
56552014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5656
5657 * remote-utils.c: Include ctype.h.
5658 (input_interrupt): Explicitly handle the case when the char
5659 received is the NUL byte. Improve the printing of non-ASCII
5660 characters.
5661
beed38b8
JB
56622014-12-16 Joel Brobecker <brobecker@adacore.com>
5663
5664 * linux-low.c (linux_low_filter_event): Update call to
5665 linux_enable_event_reporting following the addition of
5666 a new parameter to that function.
5667
bf330350
CU
56682014-12-16 Catalin Udma <catalin.udma@freescale.com>
5669
5670 PR server/17457
5671 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5672 (AARCH64_FPCR_REGNO): Likewise.
5673 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5674 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5675 (aarch64_store_fpregset): Likewise.
5676
5227d625
JB
56772014-12-15 Joel Brobecker <brobecker@adacore.com>
5678
5679 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5680 Remove FIXME comment about assumption about N.
5681
f93b65a0
JB
56822014-12-13 Joel Brobecker <brobecker@adacore.com>
5683
5684 * configure.ac: If large-file support is disabled in GDBserver,
5685 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5686 * configure: Regenerate.
5687
e5a9158d
AA
56882014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5689
5690 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5691 warning upon ENODATA from ptrace.
5692 * linux-s390-low.c (s390_store_tdb): New.
5693 (s390_regsets): Add regset for NT_S390_TDB.
5694
feea5f36
AA
56952014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5696
5697 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5698 without a fill_function.
5699 * linux-s390-low.c (s390_fill_last_break): Remove.
5700 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5701 (s390_arch_setup): Use regset's size instead of fill_function for
5702 loop end condition.
5703
098dbe61
AA
57042014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5705
5706 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5707 the regset's store function when ptrace returned an error.
5708 * regcache.c (get_thread_regcache): Invalidate register cache
5709 before fetching inferior's registers.
5710
28eef672
AA
57112014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5712
5713 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5714 while-loop as for-loop.
5715 (regsets_store_inferior_registers): Likewise.
5716
bdca27a2
YQ
57172014-11-28 Yao Qi <yao@codesourcery.com>
5718
5719 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5720 * config.in, configure: Re-generate.
5721 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5722 is defined.
5723
9c232dda
YQ
57242014-11-21 Yao Qi <yao@codesourcery.com>
5725
5726 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5727 (AC_CHECK_HEADERS): Remove malloc.h.
5728 * configure: Re-generated.
5729 * config.in: Re-generated.
5730 * server.h: Don't include alloca.h and malloc.h.
5731 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5732 Don't include malloc.h.
5733
43968415
JB
57342014-11-17 Joel Brobecker <brobecker@adacore.com>
5735
5736 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5737 corresponding ERRNO check in same block.
5738
40e91bc7
PA
57392014-11-12 Pedro Alves <palves@redhat.com>
5740
5741 * server.c (cont_thread): Update comment.
5742 (start_inferior, attach_inferior): No longer clear cont_thread.
5743 (handle_v_cont): No longer set cont_thread.
5744 (captured_main): Clear cont_thread each time a GDB connects.
5745
c2c118cf
PA
57462014-11-12 Pedro Alves <palves@redhat.com>
5747
5748 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5749 thread, and don't resume all threads if the Hc thread has exited.
5750
78708b7c
PA
57512014-11-12 Pedro Alves <palves@redhat.com>
5752
5753 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5754 the process group instead of to a specific LWP.
5755
a2abc7de
PA
57562014-10-15 Pedro Alves <palves@redhat.com>
5757
5758 PR server/17487
5759 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5760 parameter.
5761 (arm_set_thread_context): Delete.
5762 (the_low_target): Adjust.
5763 * win32-i386-low.c (debug_registers_changed)
5764 (debug_registers_used): Delete.
5765 (update_debug_registers_callback): New function.
5766 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5767 needing to update their debug registers.
5768 (win32_get_current_dr): New function.
5769 (x86_dr_low_get_addr, x86_dr_low_get_control)
5770 (x86_dr_low_get_status): Fetch the debug register from the thread
5771 record's context.
5772 (i386_initial_stuff): Adjust.
5773 (i386_get_thread_context): Remove current_event parameter. Don't
5774 clear debug_registers_changed nor copy DR values to
5775 debug_reg_state.
5776 (i386_set_thread_context): Delete.
5777 (i386_prepare_to_resume): New function.
5778 (i386_thread_added): Mark the thread as needing to update irs
5779 debug registers.
5780 (the_low_target): Remove i386_set_thread_context and install
5781 i386_prepare_to_resume.
5782 * win32-low.c (win32_get_thread_context): Adjust.
5783 (win32_set_thread_context): Use SetThreadContext
5784 directly.
5785 (win32_prepare_to_resume): New function.
5786 (win32_require_context): New function, factored out from ...
5787 (thread_rec): ... this.
5788 (continue_one_thread): Call win32_prepare_to_resume on each thread
5789 we're about to continue.
5790 (win32_resume): Call win32_prepare_to_resume on the event thread.
5791 * win32-low.h (struct win32_thread_info)
5792 <debug_registers_changed>: New field.
5793 (struct win32_target_ops): Change prototype of set_thread_context,
5794 delete set_thread_context and add prepare_to_resume.
5795 (win32_require_context): New declaration.
5796
a442d071
GB
57972014-10-08 Gary Benson <gbenson@redhat.com>
5798
5799 * server.h: Do not include common-exceptions.h.
5800
6f1947e8
GB
58012014-10-08 Gary Benson <gbenson@redhat.com>
5802
5803 * server.h: Do not include cleanups.h.
5804
63b434a4
JH
58052014-09-30 James Hogan <james.hogan@imgtec.com>
5806
5807 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5808 mips64-dsp-linux.c.
5809
c4d9ceb6
YQ
58102014-09-23 Yao Qi <yao@codesourcery.com>
5811
5812 * linux-low.c (lp_status_maybe_breakpoint): New function.
5813 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5814 (count_events_callback): Likewise.
5815 (select_event_lwp_callback): Likewise.
5816 (cancel_breakpoints_callback): Likewise.
5817
89a5711c
DB
58182014-09-19 Don Breazeal <donb@codesourcery.com>
5819
5820 * linux-low.c (handle_extended_wait): Call
5821 linux_ptrace_get_extended_event.
5822 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5823 linux_is_extended_waitstatus.
5824
bffc0964
JB
58252014-09-16 Joel Brobecker <brobecker@adacore.com>
5826
5827 * Makefile.in (CPPFLAGS): Define.
5828 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5829 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5830
0bfdf32f
GB
58312014-09-16 Gary Benson <gbenson@redhat.com>
5832
5833 * inferiors.h (current_inferior): Renamed as...
5834 (current_thread): New variable. All uses updated.
5835 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5836 (maybe_move_out_of_jump_pad): Likewise.
5837 (cancel_breakpoint): Likewise.
5838 (linux_low_filter_event): Likewise.
5839 (wait_for_sigstop): Likewise.
5840 (linux_resume_one_lwp): Likewise.
5841 (need_step_over_p): Likewise.
5842 (start_step_over): Likewise.
5843 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5844 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5845 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5846 and save_inferior as saved_thread.
5847 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5848 saved_thread.
5849 (regcache_invalidate_thread): Likewise.
5850 * remote-utils.c (prepare_resume_reply): Likewise.
5851 * thread-db.c (thread_db_get_tls_address): Likewise.
5852 (disable_thread_event_reporting): Likewise.
5853 (remove_thread_event_breakpoints): Likewise.
5854 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5855 as saved_thread.
5856 * target.h (set_desired_inferior): Renamed as...
5857 (set_desired_thread): New declaration. All uses updated.
5858 * server.c (myresume): Updated comment to reference thread instead
5859 of inferior.
5860 (handle_serial_event): Likewise.
5861 (handle_target_event): Likewise.
5862
361c8ade
GB
58632014-09-12 Tom Tromey <tromey@redhat.com>
5864 Gary Benson <gbenson@redhat.com>
5865
5866 * regcache.h: Include common-regcache.h.
5867 (regcache_read_pc): Don't declare.
5868 * regcache.c (get_thread_regcache_for_ptid): New function.
5869
bd9269f7
GB
58702014-09-11 Tom Tromey <tromey@redhat.com>
5871 Gary Benson <gbenson@redhat.com>
5872
5873 * symbol.c: New file.
5874 * Makefile.in (SFILES): Add symbol.c.
5875 (OBS): Add symbol.o.
5876
f8c1d06b
GB
58772014-09-11 Gary Benson <gbenson@redhat.com>
5878
5879 * target.c (target_stop_ptid, target_continue_ptid): New
5880 functions.
5881
721ec300
GB
58822014-09-11 Tom Tromey <tromey@redhat.com>
5883 Gary Benson <gbenson@redhat.com>
5884
5885 * target.h: Include target/target.h.
5886 * target.c (target_read_memory, target_read_uint32)
5887 (target_write_memory): New functions.
5888
c5e92cca
GB
58892014-09-11 Gary Benson <gbenson@redhat.com>
5890
5891 * server.h (debug_hw_points): Don't declare.
5892 * server.c (debug_hw_points): Don't define. Replace all uses
5893 with show_debug_regs.
5894 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5895 all uses with show_debug_regs.
5896
2e4bb98a
EBM
58972014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5898
5899 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5900 endianness into account.
5901 (ppc_supply_ptrace_register): Likewise.
5902
ac740bc7
JH
59032014-09-03 James Hogan <james.hogan@imgtec.com>
5904
5905 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5906 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5907
97ea6506
GB
59082014-09-03 Gary Benson <gbenson@redhat.com>
5909
5910 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5911 ALL_DEBUG_ADDRESS_REGISTERS.
5912
df7e5265
GB
59132014-09-02 Gary Benson <gbenson@redhat.com>
5914
5915 * i386-low.h: Renamed as...
5916 * x86-low.h: New file. All type, function and variable name
5917 prefixes changed from "i386_" to "x86_". All references updated.
5918 * i386-low.c: Renamed as...
5919 * x86-low.c: New file. All type, function and variable name
5920 prefixes changed from "i386_" to "x86_". All references updated.
5921
ed859da7
GB
59222014-09-02 Gary Benson <gbenson@redhat.com>
5923
5924 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5925 (x86_linux_new_thread): Likewise.
5926
860789c7
GB
59272014-08-29 Gary Benson <gbenson@redhat.com>
5928
5929 * server.h (setjmp.h): Do not include.
5930 (toplevel): Do not declare.
5931 (common-exceptions.h): Include.
5932 (cleanups.h): Likewise.
5933 * server.c (toplevel): Do not define.
5934 (exit_code): New static global.
5935 (detach_or_kill_for_exit_cleanup): New function.
5936 (main): New function. Original main renamed to...
5937 (captured_main): New function.
5938 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5939
ff55e1b5
GB
59402014-08-29 Gary Benson <gbenson@redhat.com>
5941
5942 * Makefile.in (SFILES): Add common/common-exceptions.c.
5943 (OBS): Add common-exceptions.o.
5944 (common-exceptions.o): New rule.
5945 * utils.c (prepare_to_throw_exception): New function.
5946
e9bcb658
GB
59472014-08-29 Gary Benson <gbenson@redhat.com>
5948
5949 * config.in: Regenerate.
5950 * configure: Likewise.
5951
e3180625
GB
59522014-08-29 Gary Benson <gbenson@redhat.com>
5953
5954 * Makefile.in (SFILES): Add common/cleanups.c.
5955 (OBS): cleanups.o.
5956 (cleanups.o): New rule.
5957
e3d6ba5d
GB
59582014-08-29 Gary Benson <gbenson@redhat.com>
5959
5960 * utils.c (internal_vwarning): New function.
5961
7096e886
GB
59622014-08-28 Gary Benson <gbenson@redhat.com>
5963
5964 * utils.h (fatal): Remove declaration.
5965 * utils.c (fatal): Remove function.
5966
14ce3192
GB
59672014-08-28 Gary Benson <gbenson@redhat.com>
5968
5969 * tracepoint.c (gdb_agent_init): Replace fatal with
5970 perror_with_name.
5971 (initialize_tracepoint): Likewise.
5972
50278d59
GB
59732014-08-28 Gary Benson <gbenson@redhat.com>
5974
5975 * remote-utils.c (remote_prepare): Replace fatal with error.
5976
aa96c426
GB
59772014-08-28 Gary Benson <gbenson@redhat.com>
5978
5979 * linux-low.c (linux_async): Replace fatal with warning.
5980 Tidy up and return.
5981 (linux_start_non_stop): Return -1 if linux_async failed.
5982
f7160e97
GB
59832014-08-28 Gary Benson <gbenson@redhat.com>
5984
5985 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5986 gdb_assert.
5987 (i386_dr_low_get_addr): Remove vague comment.
5988 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5989 gdb_assert.
5990
38e08fca
GB
59912014-08-28 Gary Benson <gbenson@redhat.com>
5992
5993 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5994 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5995 internal_error.
5996 (linux_resume_one_lwp): Likewise.
5997 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5998 gdb_assert.
5999 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6000 with internal_error.
6001 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6002 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6003 (find_register_by_name): Replace fatal with internal_error.
6004 (find_regno): Likewise.
6005 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6006 * thread-db.c (thread_db_create_event): Likewise.
6007 (thread_db_load_search): Likewise.
6008 (try_thread_db_load_1): Likewise.
6009 * tracepoint.c (get_jump_space_head): Replace fatal with
6010 internal_error.
6011 (claim_trampoline_space): Likewise.
6012 (have_fast_tracepoint_trampoline_buffer): Likewise.
6013 (cmd_qtstart): Likewise.
6014 (stop_tracing): Likewise.
6015 (fast_tracepoint_collecting): Likewise.
6016 (target_malloc): Likewise.
6017 (download_tracepoint): Likewise.
6018 (download_trace_state_variables): Replace check with gdb_assert.
6019 (upload_fast_traceframes): Replace fatal with internal_error.
6020
34abf635
GB
60212014-08-19 Tom Tromey <tromey@redhat.com>
6022 Gary Benson <gbenson@redhat.com>
6023
6024 * Makefile.in (SFILES): Add common/common-debug.c.
6025 (OBS): Add common-debug.o.
6026 (common-debug.o): New rule.
6027 * debug.h (debug_printf): Don't declare.
6028 * debug.c (debug_printf): Renamed and rewritten as...
6029 (debug_vprintf): New function.
6030
f6e94d78
GB
60312014-08-19 Gary Benson <gbenson@redhat.com>
6032
6033 * utils.h: Do not include print-utils.h.
6034
9239eeab
GB
60352014-08-19 Tom Tromey <tromey@redhat.com>
6036 Gary Benson <gbenson@redhat.com>
6037
6038 * server.h: Add static assertion.
6039 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6040
ef87c8bb
GB
60412014-08-19 Tom Tromey <tromey@redhat.com>
6042 Gary Benson <gbenson@redhat.com>
6043
6044 * Makefile.in (SFILES): Add common/errors.c.
6045 (OBS): Add errors.o.
6046 (IPA_OBS): Add errors-ipa.o.
6047 (errors.o): New rule.
6048 (errors-ipa.o): Likewise.
6049 * utils.h (perror_with_name, error, warning): Don't declare.
6050 * utils.c (warning): Renamed and rewritten as...
6051 (vwarning): New function.
6052 (error): Renamed and rewritten as...
6053 (verror): New function.
6054 (internal_error): Renamed and rewritten as...
6055 (internal_verror): New function.
6056
bb974a24
GB
60572014-08-07 Gary Benson <gbenson@redhat.com>
6058
6059 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6060 * configure: Regenerate.
6061 * config.in: Likewise.
6062 * server.h: Do not include errno.h.
6063 * event-loop.c: Likewise.
6064 * hostio-errno.c: Likewise.
6065 * linux-low.c: Likewise.
6066 * remote-utils.c: Likewise.
6067 * spu-low.c: Likewise.
6068 * utils.c: Likewise.
6069 * gdbreplay.c: Unconditionally include errno.h.
6070
6d3d12eb
GB
60712014-08-07 Gary Benson <gbenson@redhat.com>
6072
6073 * server.h: Do not include string.h.
6074 * event-loop.c: Likewise.
6075 * linux-low.c: Likewise.
6076 * regcache.c: Likewise.
6077 * remote-utils.c: Likewise.
6078 * spu-low.c: Likewise.
6079 * utils.c: Likewise.
6080
dccbb609
GB
60812014-08-07 Gary Benson <gbenson@redhat.com>
6082
6083 * server.h: Do not include gdb_assert.h.
6084
e76df0d0
GB
60852014-08-07 Gary Benson <gbenson@redhat.com>
6086
6087 * server.h: Do not include common-utils.h.
6088
4cb9c816
GB
60892014-08-07 Gary Benson <gbenson@redhat.com>
6090
6091 * server.h: Do not include ptid.h.
6092 * notif.h: Likewise.
6093
3995eeee
GB
60942014-08-07 Gary Benson <gbenson@redhat.com>
6095
6096 * server.h: Do not include gdb_locale.h.
6097
cb9f1a9b
GB
60982014-08-07 Gary Benson <gbenson@redhat.com>
6099
6100 * server.h: Do not include gdb/signals.h.
6101 * win32-low.c: Likewise.
6102
a5fceff8
GB
61032014-08-07 Gary Benson <gbenson@redhat.com>
6104
6105 * server.h: Do not include pathmax.h.
6106
b9391142
GB
61072014-08-07 Gary Benson <gbenson@redhat.com>
6108
6109 * server.h: Do not include libiberty.h.
6110 * linux-bfin-low.c: Likewise.
6111
0e443c87
GB
61122014-08-07 Gary Benson <gbenson@redhat.com>
6113
6114 * server.h: Do not include ansidecl.h.
6115
8ebb3f56
GB
61162014-08-07 Gary Benson <gbenson@redhat.com>
6117
6118 * linux-x86-low.c: Do not include stddef.h.
6119 * lynx-ppc-low.c: Likewise.
6120 * tracepoint.c: Likewise.
6121
8980bdf6
GB
61222014-08-07 Gary Benson <gbenson@redhat.com>
6123
6124 * server.h: Do not include stdarg.h.
6125 * nto-low.c: Likewise.
6126
d7096f71
GB
61272014-08-07 Gary Benson <gbenson@redhat.com>
6128
6129 * server.h: Do not include stdlib.h.
6130 * inferiors.c: Likewise.
6131 * linux-low.c: Likewise.
6132 * regcache.c: Likewise.
6133 * spu-low.c: Likewise.
6134 * tracepoint.c: Likewise.
6135 * utils.c: Likewise.
6136
d02f550d
GB
61372014-08-07 Gary Benson <gbenson@redhat.com>
6138
6139 * server.h: Do not include stdio.h.
6140 * linux-low.c: Likewise.
6141 * remote-utils.c: Likewise.
6142 * spu-low.c: Likewise.
6143 * utils.c: Likewise.
6144 * wincecompat.c: Likewise.
6145
87f6c4e3
GB
61462014-08-06 Gary Benson <gbenson@redhat.com>
6147
6148 * regcache.c (init_register_cache): Move conditionals inside if.
6149
7089dca4
GB
61502014-08-06 Gary Benson <gbenson@redhat.com>
6151
6152 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6153
462f517e
GB
61542014-07-31 Gary Benson <gbenson@redhat.com>
6155
6156 * ax.h: Do not include server.h.
6157 * gdbthread.h: Likewise.
6158 * lynx-low.h: Likewise.
6159 * notif.h: Likewise.
6160
976411d6
GB
61612014-07-30 Gary Benson <gbenson@redhat.com>
6162
6163 * server.h: Include common-defs.h.
6164 Do not include config.h or build-gnulib-gdbserver/config.h.
6165
d41f6d8e
GB
61662014-07-30 Gary Benson <gbenson@redhat.com>
6167
6168 * hostio-errno.c: Move server.h to top of includes list.
6169 * inferiors.c: Likewise.
6170 * linux-x86-low.c: Likewise.
6171 * notif.c: Include server.h.
6172
314c6a35
TT
61732014-07-24 Tom Tromey <tromey@redhat.com>
6174 Gary Benson <gbenson@redhat.com>
6175
6176 * server.h (CORE_ADDR): Now unsigned.
6177
69ff6be5
PA
61782014-07-16 Pedro Alves <palves@redhat.com>
6179
6180 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6181
ce9e3fe7
PA
61822014-07-15 Pedro Alves <palves@redhat.com>
6183
6184 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6185 copy.
6186
e76126e8
PA
61872014-07-11 Pedro Alves <palves@redhat.com>
6188
6189 * linux-low.c (kill_wait_lwp): New function, based on
6190 kill_one_lwp_callback, but use my_waitpid directly.
6191 (kill_one_lwp_callback, linux_kill): Use it.
6192
8e9db26e
PA
61932014-06-23 Pedro Alves <palves@redhat.com>
6194
6195 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6196 before setting DR0..DR3.
6197
698b3e08
GB
61982014-06-20 Gary Benson <gbenson@redhat.com>
6199
6200 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6201 * configure: Regenerated.
6202 * config.in: Likewise.
6203
125f8a3d
GB
62042014-06-20 Gary Benson <gbenson@redhat.com>
6205
6206 * Makefile.in (SFILES): Update locations for files moved
6207 from common to nat.
6208 (object file files): Reordered.
6209
42995dbd
GB
62102014-06-20 Gary Benson <gbenson@redhat.com>
6211
6212 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6213 (i386_dr_low_set_addr): Likewise.
6214 (i386_dr_low_get_addr): Likewise.
6215 (i386_dr_low_can_set_control): Likewise.
6216 (i386_dr_low_set_control): Likewise.
6217 (i386_dr_low_get_control): Likewise.
6218 (i386_dr_low_get_status): Likewise.
6219 (i386_get_debug_register_length): Likewise.
6220 * linux-x86-low.c (i386_dr_low_set_addr):
6221 Changed signature. Made static.
6222 (i386_dr_low_get_addr): Likewise.
6223 (i386_dr_low_set_control): Likewise.
6224 (i386_dr_low_get_control): Likewise.
6225 (i386_dr_low_get_status): Likewise.
6226 (i386_dr_low): New global variable.
6227 * win32-i386-low.c (i386_dr_low_set_addr):
6228 Changed signature. Made static.
6229 (i386_dr_low_get_addr): Likewise.
6230 (i386_dr_low_set_control): Likewise.
6231 (i386_dr_low_get_control): Likewise.
6232 (i386_dr_low_get_status): Likewise.
6233 (i386_dr_low): New global variable.
6234
e1d2394b
MS
62352014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6236
6237 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6238 * Makefile.in (AR, AR_FLAGS): Define.
6239 * configure: Regenerate.
6240
3a8ee006
GB
62412014-06-19 Gary Benson <gbenson@redhat.com>
6242
6243 * Makefile.in (i386-dregs.o): New rule.
6244 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6245 * i386-low.c (target.h): Remove include.
6246 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6247 (DR_CONTROL_SHIFT): Likewise.
6248 (DR_CONTROL_SIZE): Likewise.
6249 (DR_RW_EXECUTE): Likewise.
6250 (DR_RW_WRITE): Likewise.
6251 (DR_RW_READ): Likewise.
6252 (DR_RW_IORW): Likewise.
6253 (DR_LEN_1): Likewise.
6254 (DR_LEN_2): Likewise.
6255 (DR_LEN_4): Likewise.
6256 (DR_LEN_8): Likewise.
6257 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6258 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6259 (DR_ENABLE_SIZE): Likewise.
6260 (DR_LOCAL_SLOWDOWN): Likewise.
6261 (DR_GLOBAL_SLOWDOWN): Likewise.
6262 (DR_CONTROL_RESERVED): Likewise.
6263 (I386_DR_CONTROL_MASK): Likewise.
6264 (I386_DR_VACANT): Likewise.
6265 (I386_DR_LOCAL_ENABLE): Likewise.
6266 (I386_DR_GLOBAL_ENABLE): Likewise.
6267 (I386_DR_DISABLE): Likewise.
6268 (I386_DR_SET_RW_LEN): Likewise.
6269 (I386_DR_GET_RW_LEN): Likewise.
6270 (I386_DR_WATCH_HIT): Likewise.
6271 (i386_wp_op_t): Likewise.
6272 (i386_show_dr): Likewise.
6273 (i386_length_and_rw_bits): Likewise.
6274 (i386_insert_aligned_watchpoint): Likewise.
6275 (i386_remove_aligned_watchpoint): Likewise.
6276 (i386_handle_nonaligned_watchpoint): Likewise.
6277 i386_update_inferior_debug_regs(): Likewise.
6278 (i386_dr_insert_watchpoint): Likewise.
6279 (i386_dr_remove_watchpoint): Likewise.
6280 (i386_dr_region_ok_for_watchpoint): Likewise.
6281 (i386_dr_stopped_data_address): Likewise.
6282 (i386_dr_stopped_by_watchpoint): Likewise.
6283
8f26655c
GB
62842014-06-19 Gary Benson <gbenson@redhat.com>
6285
6286 * i386-low.c (i386_dr_show): Renamed to
6287 i386_show_dr and made static. All uses updated.
6288 (i386_dr_length_and_rw_bits): Renamed to
6289 i386_length_and_rw_bits and made static.
6290 All uses updated.
6291 (i386_dr_insert_aligned_watchpoint): Renamed to
6292 i386_insert_aligned_watchpoint and made static.
6293 All uses updated.
6294 (i386_dr_remove_aligned_watchpoint): Renamed to
6295 i386_remove_aligned_watchpoint and made static.
6296 All uses updated.
6297 (i386_dr_update_inferior_debug_regs): Renamed to
6298 i386_update_inferior_debug_regs and made static.
6299 All uses updated.
6300
b9228891
GB
63012014-06-18 Gary Benson <gbenson@redhat.com>
6302
5171def3
GB
6303 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6304 (i386_dr_low_can_set_control): Likewise.
6305 (i386_get_debug_register_length): Likewise.
6306 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6307 (i386_dr_low_can_set_control): Likewise.
6308 (i386_get_debug_register_length): Likewise.
6309
63102014-06-17 Gary Benson <gbenson@redhat.com>
6311
b9228891
GB
6312 * i386-low.h (i386-dregs.h): New include.
6313 (DR_FIRSTADDR): Now in i386-dregs.h.
6314 (DR_LASTADDR): Likewise.
6315 (DR_NADDR): Likewise.
6316 (DR_STATUS): Likewise.
6317 (DR_CONTROL): Likewise.
6318 (i386_debug_reg_state): Likewise.
6319 (i386_dr_insert_watchpoint): Likewise.
6320 (i386_dr_remove_watchpoint): Likewise.
6321 (i386_dr_region_ok_for_watchpoint): Likewise.
6322 (i386_dr_stopped_data_address): Likewise.
6323 (i386_dr_stopped_by_watchpoint): Likewise.
6324 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6325
4be83cc2
GB
63262014-06-18 Gary Benson <gbenson@redhat.com>
6327
6328 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6329 i386_dr_insert_watchpoint.
6330 (i386_low_remove_watchpoint): Renamed to
6331 i386_dr_remove_watchpoint.
6332 (i386_low_region_ok_for_watchpoint): Renamed to
6333 i386_dr_region_ok_for_watchpoint.
6334 (i386_low_stopped_data_address): Renamed to
6335 i386_dr_stopped_data_address.
6336 (i386_low_stopped_by_watchpoint): Renamed to
6337 i386_dr_stopped_by_watchpoint.
6338 * i386-low.c (i386_show_dr): Renamed to
6339 i386_dr_show and made nonstatic. All uses updated.
6340 (i386_length_and_rw_bits): Renamed to
6341 i386_dr_length_and_rw_bits and made nonstatic.
6342 All uses updated.
6343 (i386_insert_aligned_watchpoint): Renamed to
6344 i386_dr_insert_aligned_watchpoint and made nonstatic.
6345 All uses updated.
6346 (i386_remove_aligned_watchpoint): Renamed to
6347 i386_dr_remove_aligned_watchpoint and made nonstatic.
6348 All uses updated.
6349 (i386_update_inferior_debug_regs): Renamed to
6350 i386_dr_update_inferior_debug_regs and made nonstatic.
6351 All uses updated.
6352 (i386_low_insert_watchpoint): Renamed to
6353 i386_dr_insert_watchpoint. All uses updated.
6354 (i386_low_remove_watchpoint): Renamed to
6355 i386_dr_remove_watchpoint. All uses updated.
6356 (i386_low_region_ok_for_watchpoint): Renamed to
6357 i386_dr_region_ok_for_watchpoint. All uses updated.
6358 (i386_low_stopped_data_address): Renamed to
6359 i386_dr_stopped_data_address. All uses updated.
6360 (i386_low_stopped_by_watchpoint): Renamed to
6361 i386_dr_stopped_by_watchpoint. All uses updated.
6362
131aa0d4
GB
63632014-06-18 Gary Benson <gbenson@redhat.com>
6364
6365 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6366 (i386_dr_low_can_set_control): Likewise.
6367 (i386_insert_aligned_watchpoint): New check.
6368
d9305f7f
GB
63692014-06-18 Gary Benson <gbenson@redhat.com>
6370
6371 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6372 Renamed to state.
6373
e927c9fc
GB
63742014-06-18 Gary Benson <gbenson@redhat.com>
6375
6376 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6377 instead of fatal and error.
6378 (i386_handle_nonaligned_watchpoint): Likewise.
6379
1b6d4134
GB
63802014-06-18 Gary Benson <gbenson@redhat.com>
6381
6382 * i386-low.c (i386_get_debug_register_length): New macro.
6383 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6384 (i386_show_dr): Use debug_printf instead of fprintf. Use
6385 phex to format values.
6386
6e62758f
GB
63872014-06-18 Gary Benson <gbenson@redhat.com>
6388
6389 * i386-low.h: Comment changes.
6390 * i386-low.c: Likewise.
6391
fc6e2f03
GB
63922014-06-18 Gary Benson <gbenson@redhat.com>
6393
6394 * i386-low.c: Whitespace changes.
6395
f9d1eeed
TT
63962014-06-12 Tom Tromey <tromey@redhat.com>
6397
6398 * utils.c (freeargv): Remove.
6399
0b04e523
TT
64002014-06-12 Tom Tromey <tromey@redhat.com>
6401
6402 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6403 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6404 (parse_debug_format_options): Likewise.
6405 (gdbserver_usage): Likewise.
6406 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6407 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6408 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6409 against libiberty.
6410 ($(LIBGNU)): Depend on libiberty.
6411 (all-lib): Recurse into all subdirs.
6412 (install-only): Invoke "install" target in subdirs.
6413 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6414 targets.
6415 * configure: Rebuild.
6416 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6417 for vasprintf, vsnprintf, or gettimeofday.
6418 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6419 srv_tgtobj.
6420
270c9937
JB
64212014-06-05 Joel Brobecker <brobecker@adacore.com>
6422
6423 * development.sh: Delete.
6424 * Makefile.in (config.status): Adjust dependency on development.sh.
6425 * configure.ac: Adjust development.sh source call.
6426 * configure: Regenerate.
6427
0a261ed8
PA
64282014-06-02 Pedro Alves <palves@redhat.com>
6429
6430 * ax.c (gdb_free_agent_expr): New function.
6431 * ax.h (gdb_free_agent_expr): New declaration.
6432 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6433 list.
6434 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6435 static.
6436 (clear_breakpoint_conditions_and_commands): New function.
6437 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6438 (clear_breakpoint_conditions_and_commands): New declaration.
6439
e9dae05e
RR
64402014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6441
6442 * linux-aarch64-low.c (asm/ptrace.h): Include.
6443
5876f503
JK
64442014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6445
6446 Fix TLS access for -static -pthread.
6447 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6448 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6449 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6450
802e8e6d
PA
64512014-05-20 Pedro Alves <palves@redhat.com>
6452
6453 * linux-aarch64-low.c (aarch64_insert_point)
6454 (aarch64_remove_point): No longer check whether the type is
6455 supported here. Adjust to new interface.
6456 (the_low_target): Install aarch64_supports_z_point_type as
6457 supports_z_point_type method.
6458 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6459 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6460 instead of a Z packet char. Adjust.
6461 (arm_supports_z_point_type): New function.
6462 (arm_insert_point, arm_remove_point): Adjust to new interface.
6463 (the_low_target): Install arm_supports_z_point_type.
6464 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6465 (cris_insert_point, cris_remove_point): Adjust to new interface.
6466 Don't check whether the type is supported here.
6467 (the_low_target): Install cris_supports_z_point_type.
6468 * linux-low.c (linux_supports_z_point_type): New function.
6469 (linux_insert_point, linux_remove_point): Adjust to new interface.
6470 * linux-low.h (struct linux_target_ops) <insert_point,
6471 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6472 raw_breakpoint pointer parameter.
6473 <supports_z_point_type>: New method.
6474 * linux-mips-low.c (mips_supports_z_point_type): New function.
6475 (mips_insert_point, mips_remove_point): Adjust to new interface.
6476 Use mips_supports_z_point_type.
6477 (the_low_target): Install mips_supports_z_point_type.
6478 * linux-ppc-low.c (the_low_target): Install NULL as
6479 supports_z_point_type method.
6480 * linux-s390-low.c (the_low_target): Install NULL as
6481 supports_z_point_type method.
6482 * linux-sparc-low.c (the_low_target): Install NULL as
6483 supports_z_point_type method.
6484 * linux-x86-low.c (x86_supports_z_point_type): New function.
6485 (x86_insert_point): Adjust to new insert_point interface. Use
6486 insert_memory_breakpoint. Adjust to new
6487 i386_low_insert_watchpoint interface.
6488 (x86_remove_point): Adjust to remove_point interface. Use
6489 remove_memory_breakpoint. Adjust to new
6490 i386_low_remove_watchpoint interface.
6491 (the_low_target): Install x86_supports_z_point_type.
6492 * lynx-low.c (lynx_target_ops): Install NULL as
6493 supports_z_point_type callback.
6494 * nto-low.c (nto_supports_z_point_type): New.
6495 (nto_insert_point, nto_remove_point): Adjust to new interface.
6496 (nto_target_ops): Install nto_supports_z_point_type.
6497 * mem-break.c: Adjust intro comment.
6498 (struct raw_breakpoint) <raw_type, size>: New fields.
6499 <inserted>: Update comment.
6500 <shlib_disabled>: Delete field.
6501 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6502 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6503 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6504 (raw_bkpt_type_to_target_hw_bp_type): New function.
6505 (find_enabled_raw_code_breakpoint_at): New function.
6506 (find_raw_breakpoint_at): New type and size parameters. Use them.
6507 (insert_memory_breakpoint): New function, based off
6508 set_raw_breakpoint_at.
6509 (remove_memory_breakpoint): New function.
6510 (set_raw_breakpoint_at): Reimplement.
6511 (set_breakpoint): New, based on set_breakpoint_at.
6512 (set_breakpoint_at): Reimplement.
6513 (delete_raw_breakpoint): Go through the_target->remove_point
6514 instead of assuming memory breakpoints.
6515 (find_gdb_breakpoint_at): Delete.
6516 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6517 (find_gdb_breakpoint): New function.
6518 (set_gdb_breakpoint_at): Delete.
6519 (z_type_supported): New function.
6520 (set_gdb_breakpoint_1): New function, loosely based off
6521 set_gdb_breakpoint_at.
6522 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6523 (delete_gdb_breakpoint_at): Delete.
6524 (delete_gdb_breakpoint_1): New function, loosely based off
6525 delete_gdb_breakpoint_at.
6526 (delete_gdb_breakpoint): New function.
6527 (clear_gdb_breakpoint_conditions): Rename to ...
6528 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6529 breakpoint.
6530 (add_condition_to_breakpoint): Make static.
6531 (add_breakpoint_condition): Take a struct breakpoint pointer
6532 instead of an address. Adjust.
6533 (gdb_condition_true_at_breakpoint): Rename to ...
6534 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6535 z_type parameter.
6536 (gdb_condition_true_at_breakpoint): Reimplement.
6537 (add_breakpoint_commands): Take a struct breakpoint pointer
6538 instead of an address. Adjust.
6539 (gdb_no_commands_at_breakpoint): Rename to ...
6540 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6541 parameter. Return true if no breakpoint was found. Change debug
6542 output.
6543 (gdb_no_commands_at_breakpoint): Reimplement.
6544 (run_breakpoint_commands): Rename to ...
6545 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6546 and change return type to boolean.
6547 (run_breakpoint_commands): New function.
6548 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6549 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6550 breakpoint. Go through the_target->remove_point instead of
6551 assuming memory breakpoint.
6552 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6553 software and hardware breakpoints.
6554 (reinsert_raw_breakpoint): Go through the_target->insert_point
6555 instead of assuming memory breakpoint.
6556 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6557 software and hardware breakpoints.
6558 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6559 Check both software and hardware breakpoints.
6560 (validate_inserted_breakpoint): Assert the breakpoint is a
6561 software breakpoint. Set the inserted flag to -1 instead of
6562 setting shlib_disabled.
6563 (delete_disabled_breakpoints): Adjust.
6564 (validate_breakpoints): Only validate software breakpoints.
6565 Adjust to inserted flag change.
6566 (check_mem_read, check_mem_write): Skip breakpoint types other
6567 than software breakpoints. Adjust to inserted flag change.
6568 * mem-break.h (enum raw_bkpt_type): New enum.
6569 (raw_breakpoint, struct process_info): Forward declare.
6570 (Z_packet_to_target_hw_bp_type): Delete declaration.
6571 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6572 (set_gdb_breakpoint, delete_gdb_breakpoint)
6573 (clear_breakpoint_conditions): New declarations.
6574 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6575 (breakpoint_inserted_here): Update comment.
6576 (add_breakpoint_condition, add_breakpoint_commands): Replace
6577 address parameter with a breakpoint pointer parameter.
6578 (gdb_breakpoint_here): Update comment.
6579 (delete_gdb_breakpoint_at): Delete.
6580 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6581 * server.c (process_point_options): Take a struct breakpoint
6582 pointer instead of an address. Adjust.
6583 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6584 delete_gdb_breakpoint.
6585 * spu-low.c (spu_target_ops): Install NULL as
6586 supports_z_point_type method.
6587 * target.h: Include mem-break.h.
6588 (struct target_ops) <prepare_to_access_memory>: Update comment.
6589 <supports_z_point_type>: New field.
6590 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6591 instead of a char. Also take a raw breakpoint pointer.
6592 * win32-arm-low.c (the_low_target): Install NULL as
6593 supports_z_point_type.
6594 * win32-i386-low.c (i386_supports_z_point_type): New function.
6595 (i386_insert_point, i386_remove_point): Adjust to new interface.
6596 (the_low_target): Install i386_supports_z_point_type.
6597 * win32-low.c (win32_supports_z_point_type): New function.
6598 (win32_insert_point, win32_remove_point): Adjust to new interface.
6599 (win32_target_ops): Install win32_supports_z_point_type.
6600 * win32-low.h (struct win32_target_ops):
6601 <supports_z_point_type>: New method.
6602 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6603 instead of a char. Also take a raw breakpoint pointer.
6604
932539e3
PA
66052014-05-20 Pedro Alves <palves@redhat.com>
6606
6607 * mem-break.h: Include break-common.h.
6608 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6609 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6610 (Z_packet_to_target_hw_bp_type): New declaration.
6611 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6612 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6613 (Z_PACKET_ACCESS_WP): Delete macros.
6614 (Z_packet_to_hw_type): Delete function.
6615 * i386-low.h: Don't include break-common.h here.
6616 (Z_packet_to_hw_type): Delete declaration.
6617 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6618 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6619 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6620 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6621 * linux-aarch64-low.c: Don't include break-common.h here.
6622 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6623 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6624 (Z_packet_to_target_hw_bp_type): Delete function.
6625 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6626 function.
6627 (mips_insert_point, mips_remove_point): Use
6628 Z_packet_to_target_hw_bp_type.
6629
4ff0d3d8
PA
66302014-05-20 Pedro Alves <palves@redhat.com>
6631
6632 * linux-aarch64-low.c: Include break-common.h.
6633 (enum target_point_type): Delete.
6634 (Z_packet_to_point_type): Rename to ...
6635 (Z_packet_to_target_hw_bp_type): ... this, and return a
6636 target_hw_bp_type instead.
6637 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6638 instead of an enum target_point_type.
6639 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6640 breakpoint type.
6641 (aarch64_dr_state_insert_one_point)
6642 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6643 (aarch64_handle_aligned_watchpoint)
6644 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6645 Take an enum target_hw_bp_type instead of an enum
6646 target_point_type.
6647 (aarch64_supports_z_point_type): New function.
6648 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6649 use Z_packet_to_target_hw_bp_type.
6650
786dc519
JB
66512014-05-20 Joel Brobecker <brobecker@adacore.com>
6652
6653 * configure.ac: Only use -Werror by default when DEVELOPMENT
6654 is true.
6655 * configure: Regenerate.
6656
9e0aa64f
JK
66572014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6658
6659 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6660 * linux-x86-low.c (X86_64_USER_REGS): New.
6661 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6662
2b577b92
YQ
66632014-04-28 Yao Qi <yao@codesourcery.com>
6664
6665 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6666 name.
6667
94611da2
PA
66682014-04-25 Pedro Alves <palves@redhat.com>
6669
6670 PR server/16255
6671 * linux-low.c (linux_attach_fail_reason_string): New function.
6672 (linux_attach_lwp): Delete.
6673 (linux_attach_lwp_1): Rename to ...
6674 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6675 argument. Remove "initial" parameter. Return int instead of
6676 void. Don't error or warn here.
6677 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6678 failure to attach to the tgid. Call warning when failing to
6679 attach to an lwp.
6680 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6681 argument. Remove "initial" parameter. Return int instead of
6682 void. Don't error or warn here.
6683 (linux_attach_fail_reason_string): New declaration.
6684 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6685 interface change. Use linux_attach_fail_reason_string.
6686
01f9f808
MS
66872014-04-24 Michael Sturm <michael.sturm@mintel.com>
6688 Walfred Tedeschi <walfred.tedeschi@intel.com>
6689
6690 * Makefile.in: Added rules to handle new files
6691 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6692 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6693 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6694 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6695 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6696 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6697 x32-avx512-linux.o.
6698 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6699 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6700 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6701 i386/x32-avx512.xml.
6702 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6703 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6704 i386/x32-avx512-linux.xml.
6705 * i387-fp.c (num_avx512_k_registers): New constant for number
6706 of K registers.
6707 (num_avx512_zmmh_low_registers): New constant for number of
6708 lower ZMM registers (0-15).
6709 (num_avx512_zmmh_high_registers): New constant for number of
6710 higher ZMM registers (16-31).
6711 (num_avx512_ymmh_registers): New contant for number of higher
6712 YMM registers (ymm16-31 added by avx521 on x86_64).
6713 (num_avx512_xmm_registers): New constant for number of higher
6714 XMM registers (xmm16-31 added by AVX512 on x86_64).
6715 (struct i387_xsave): Add space for AVX512 registers.
6716 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6717 Add code to handle AVX512 registers.
6718 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6719 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6720 prototypei from generated file.
6721 (tdesc_amd64_avx512_linux): Likewise.
6722 (init_registers_x32_avx512_linux): Likewise.
6723 (tdesc_x32_avx512_linux): Likewise.
6724 (init_registers_i386_avx512_linux): Likewise.
6725 (tdesc_i386_avx512_linux): Likewise.
6726 (x86_64_regmap): Add AVX512 registers.
6727 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6728 mask.
6729 (initialize_low_arch): Add code to initialize AVX512 registers.
6730
51aa91f9
PA
67312014-04-23 Pedro Alves <palves@redhat.com>
6732
6733 * mem-break.c (find_gdb_breakpoint_at): Make static.
6734 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6735
a4165e94
PA
67362014-04-23 Pedro Alves <palves@redhat.com>
6737
6738 * i386-low.c: Don't include break-common.h here.
6739 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6740 prototype to take target_hw_bp_type as argument instead of a Z
6741 packet char.
6742 * i386-low.h: Include break-common.h here.
6743 (Z_packet_to_hw_type): Declare.
6744 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6745 prototypes.
6746 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6747 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6748 (x86_remove_point): Convert the packet number to a
6749 target_hw_bp_type before calling i386_low_remove_watchpoint.
6750 * win32-i386-low.c (i386_insert_point): Convert the packet number
6751 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6752 (i386_remove_point): Convert the packet number to a
6753 target_hw_bp_type before calling i386_low_remove_watchpoint.
6754
b8acf843
PA
67552014-04-23 Pedro Alves <palves@redhat.com>
6756
6757 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6758
d708bcd1
PA
67592014-04-10 Pedro Alves <palves@redhat.com>
6760
6761 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6762 Check if the condition or command is NULL before checking if the
6763 breakpoint is known. On success, return true.
6764 * mem-break.h (add_breakpoint_condition): Document return.
6765 (add_breakpoint_commands): Add describing comment.
6766 * server.c (skip_to_semicolon): New function.
6767 (process_point_options): Use it.
6768
2eec7d5b
PA
67692014-04-09 Pedro Alves <palves@redhat.com>
6770
6771 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6772 to lwpid_of.
6773
fa96cb38
PA
67742014-02-27 Pedro Alves <palves@redhat.com>
6775
6776 PR 12702
6777 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6778 macros.
6779 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6780 output.
6781 (last_thread_of_process_p): Take a PID argument instead of a
6782 thread pointer.
6783 (linux_wait_for_lwp): Delete.
6784 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6785 functions.
6786 (linux_low_filter_event): New function, party factored out from
6787 linux_wait_for_event.
6788 (linux_wait_for_event): Rename to ...
6789 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6790 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6791 sigsuspend. Check for zombie leaders.
6792 (linux_wait_for_event): Reimplement as wrapper around
6793 linux_wait_for_event_filtered.
6794 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6795 a normal or signal exit is seen, it's the whole process exiting.
6796 (wait_for_sigstop): No longer a for_each_inferior callback.
6797 Rewrite on top of linux_wait_for_event_filtered.
6798 (stop_all_lwps): Call wait_for_sigstop directly.
6799 * server.c (resume, handle_target_event): Handle
6800 TARGET_WAITKIND_NO_RESUMED.
6801
d763de10
JB
68022014-02-26 Joel Brobecker <brobecker@adacore.com>
6803
6804 * win32-low.c (psapi_get_dll_name,
6805 * win32_CreateToolhelp32Snapshot): Delete.
6806 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6807 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6808 Delete.
6809 (handle_load_dll): Add function description.
6810 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6811
850a0f76
JB
68122014-02-26 Joel Brobecker <brobecker@adacore.com>
6813
6814 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6815 Add comment.
6816 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6817 base address when calling win32_add_one_solib.
6818 (handle_load_dll): Delete local variable load_addr.
6819 Remove 0x1000 offset applied to DLL base address when calling
6820 win32_add_one_solib.
6821 (handle_unload_dll): Add comment.
6822
f25b3fc3
JB
68232014-02-26 Joel Brobecker <brobecker@adacore.com>
6824
6825 * win32-low.c (win32_add_all_dlls): Renames
6826 win32_ensure_ntdll_loaded. Rewrite function documentation.
6827 Adjust implementation to always load all DLLs.
6828 Add 0x1000 offset to DLL base address when calling
6829 win32_add_one_solib.
6830 (child_initialization_done): New static global.
6831 (do_initial_child_stuff): Set child_initialization_done to
6832 zero during child initialization, and 1 after. Replace call
6833 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6834 Add comment.
6835 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6836 (handle_unload_dll): Add function documentation.
6837 (get_child_debug_event): Ignore load and unload DLL events
6838 during child initialization.
6839
d86d4aaf
DE
68402014-02-20 Doug Evans <dje@google.com>
6841
3bc32da3 6842 Remove global all_lwps.
d86d4aaf
DE
6843 * inferiors.h (ptid_of): Move here from linux-low.h.
6844 (pid_of, lwpid_of): Ditto.
6845 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6846 parameter is a struct thread_info * now.
6847 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6848 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6849 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6850 directly.
6851 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6852 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6853 * linux-arm-low.c (update_registers_callback): Update, "entry"
6854 parameter is a struct thread_info * now.
6855 Fetch lwpid from current_inferior directly.
6856 (arm_insert_point): Pass &all_threads to find_inferior instead of
6857 &all_lwps.
6858 (arm_remove_point): Ditto.
6859 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6860 (arm_prepare_to_resume): Fetch pid from thread.
6861 (arm_read_description): Fetch lwpid from current_inferior directly.
6862 * linux-low.c (all_lwps): Delete.
6863 (delete_lwp): Delete call to remove_inferior.
6864 (handle_extended_wait): Fetch lwpid from thread.
6865 (add_lwp): Don't set lwp->entry.id. Remove call to
6866 add_inferior_to_list.
6867 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6868 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6869 (kill_one_lwp_callback): Ditto.
6870 (linux_kill): Don't dereference NULL pointer.
6871 Fetch ptid,lwpid from thread.
6872 (get_detach_signal): Fetch ptid from thread.
6873 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6874 Simplify call to regcache_invalidate_thread.
6875 (delete_lwp_callback): Update, "entry" parameter is a
6876 struct thread_info * now. Fetch pid from thread.
6877 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6878 (status_pending_p_callback): Update, "entry" parameter is a
6879 struct thread_info * now. Fetch ptid from thread.
6880 (find_lwp_pid): Update, "entry" parameter is a
6881 struct thread_info * now.
6882 (linux_wait_for_lwp): Fetch pid from thread.
6883 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6884 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6885 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6886 (dequeue_one_deferred_signal): Ditto.
6887 (cancel_breakpoint): Fetch ptid from current_inferior.
6888 (linux_wait_for_event): Pass &all_threads to find_inferior,
6889 not &all_lwps. Fetch ptid, lwpid from thread.
6890 (count_events_callback): Update, "entry" parameter is a
6891 struct thread_info * now.
6892 (select_singlestep_lwp_callback): Ditto.
6893 (select_event_lwp_callback): Ditto.
6894 (cancel_breakpoints_callback): Ditto.
6895 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6896 not &all_lwps.
6897 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6898 (unsuspend_one_lwp): Update, "entry" parameter is a
6899 struct thread_info * now.
6900 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6901 not &all_lwps.
6902 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6903 Fetch lwpid from thread, not lwp.
6904 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6905 Pass &all_threads to find_inferior, not &all_lwps.
6906 (send_sigstop): Fetch lwpid from thread, not lwp.
6907 (send_sigstop_callback): Update, "entry" parameter is a
6908 struct thread_info * now.
6909 (suspend_and_send_sigstop_callback): Ditto.
6910 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6911 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6912 struct thread_info * now.
6913 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6914 from thread, lwp.
6915 (lwp_running): Update, "entry" parameter is a
6916 struct thread_info * now.
6917 (stop_all_lwps): Fetch ptid from thread.
6918 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6919 (linux_resume_one_lwp): Fetch lwpid from thread.
6920 (linux_set_resume_request): Update, "entry" parameter is a
6921 struct thread_info * now. Fetch pid, lwpid from thread.
6922 (resume_status_pending_p): Update, "entry" parameter is a
6923 struct thread_info * now.
6924 (need_step_over_p): Ditto. Fetch lwpid from thread.
6925 (start_step_over): Fetch lwpid from thread.
6926 (linux_resume_one_thread): Update, "entry" parameter is a
6927 struct thread_info * now. Fetch lwpid from thread.
6928 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6929 (proceed_one_lwp): Update, "entry" parameter is a
6930 struct thread_info * now. Fetch lwpid from thread.
6931 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6932 struct thread_info * now.
6933 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6934 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6935 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6936 directly.
6937 (regsets_store_inferior_registers): Ditto.
6938 (fetch_register, store_register): Ditto.
6939 (linux_read_memory, linux_write_memory): Ditto.
6940 (linux_request_interrupt): Ditto.
6941 (linux_read_auxv): Ditto.
6942 (linux_xfer_siginfo): Ditto.
6943 (linux_qxfer_spu): Ditto.
6944 (linux_qxfer_libraries_svr4): Ditto.
6945 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6946 moved to inferiors.h.
6947 (get_lwp): Delete.
6948 (get_thread_lwp): Update.
6949 (struct lwp_info): Delete member "entry". Simplify comment for
6950 member "thread".
6951 (all_lwps): Delete.
6952 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6953 current_inferior directly.
6954 (update_watch_registers_callback): Update, "entry" parameter is a
6955 struct thread_info * now. Fetch pid from thread.
6956 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6957 (mips_insert_point): Fetch lwpid from current_inferior.
6958 Pass &all_threads to find_inferior, not &all_lwps.
6959 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6960 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6961 directly.
6962 (mips_stopped_data_address): Ditto.
6963 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6964 directly.
6965 * linux-tile-low.c (tile_arch_setup): Ditto.
6966 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6967 (update_debug_registers_callback): Update, "entry" parameter is a
6968 struct thread_info * now. Fetch pid from thread.
6969 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6970 Pass &all_threads to find_inferior, not &all_lwps.
6971 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6972 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6973 Pass &all_threads to find_inferior, not &all_lwps.
6974 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6975 (i386_dr_low_get_status): Ditto.
6976 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6977 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6978 (x86_linux_read_description): Ditto.
6979 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6980
3b8361aa
DE
69812014-02-20 Doug Evans <dje@google.com>
6982
6983 * inferiors.c (get_first_inferior): Fix buglet.
6984
f7667f0d
DE
69852014-02-19 Doug Evans <dje@google.com>
6986
6987 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6988 * inferiors.c (add_thread): Change result type to struct thread_info *.
6989 All callers updated.
6990 (add_lwp): Call add_thread here instead of in callers.
6991 All callers updated.
6992 * linux-low.h (get_lwp_thread): Rewrite.
6993 (struct lwp_info): New member "thread".
6994
b3312d80
DE
69952014-02-19 Doug Evans <dje@google.com>
6996
6997 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6998 All callers updated.
6999
ecc6f45c
DE
70002014-02-19 Doug Evans <dje@google.com>
7001
7002 * inferiors.c (add_thread): Fix whitespace.
7003
649ebbca
DE
70042014-02-19 Doug Evans <dje@google.com>
7005
7006 * dll.c (clear_dlls): Replace accessing list implemention details
7007 with API function.
7008 * gdbthread.h (get_first_thread): Declare.
7009 * inferiors.c (for_each_inferior_with_data): New function.
7010 (get_first_thread): New function.
7011 (find_thread_ptid): Simplify.
7012 (get_first_inferior): New function.
7013 (clear_list): Delete.
7014 (one_inferior_p): New function.
7015 (clear_inferior_list): New function.
7016 (clear_inferiors): Update.
7017 * inferiors.h (for_each_inferior_with_data): Declare.
7018 (clear_inferior_list): Declare.
7019 (one_inferior_p): Declare.
7020 (get_first_inferior): Declare.
7021 * linux-low.c (linux_wait_for_event): Replace accessing list
7022 implemention details with API function.
7023 * server.c (target_running): Ditto.
7024 (accumulate_file_name_length): New function.
7025 (emit_dll_description): New function.
7026 (handle_qxfer_libraries): Replace accessing list implemention
7027 details with API function.
7028 (handle_qxfer_threads_worker): New function.
7029 (handle_qxfer_threads_proper): Replace accessing list implemention
7030 details with API function.
7031 (handle_query): Ditto.
7032 (visit_actioned_threads_callback_ftype): New typedef.
7033 (visit_actioned_threads_data): New struct.
7034 (visit_actioned_threads): Rewrite to be find_inferior callback.
7035 (resume): Call find_inferior.
7036 (handle_status): Replace accessing list implemention
7037 details with API function.
7038 (process_serial_event): Replace accessing list implemention details
7039 with API function.
7040 * target.c (set_desired_inferior): Replace accessing list implemention
7041 details with API function.
7042 * tracepoint.c (same_process_p): New function.
7043 (gdb_agent_about_to_close): Replace accessing list implemention
7044 details with API function.
7045 * win32-low.c (child_delete_thread): Replace accessing list
7046 implemention details with API function.
7047 (match_dll_by_basename): New function.
7048 (dll_is_loaded_by_basename): New function.
7049 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7050 details call to dll_is_loaded_by_basename.
7051
80894984
DE
70522014-02-19 Doug Evans <dje@google.com>
7053
7054 * dll.h (struct dll_info): Add comment.
7055 * gdbthread.h (struct thread_info): Add comment.
7056 (current_ptid): Simplify.
7057 * inferiors.c (add_process): Update.
7058 (remove_process): Update.
7059 * inferiors.h (struct process_info): Rename member "head" to "entry".
7060 * linux-low.c (delete_lwp): Update.
7061 (add_lwp): Update.
7062 (last_thread_of_process_p): Update.
7063 (kill_one_lwp_callback, linux_kill): Update.
7064 (status_pending_p_callback): Update.
7065 (wait_for_sigstop): Update. Simplify read of ptid.
7066 (start_step_over): Update.
7067 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7068 (get_lwp_thread): Update.
7069 (struct lwp_info): Rename member "head" to "entry".
7070 * regcache.h (inferior_list_entry): Delete.
7071 * server.c (kill_inferior_callback): Update.
7072 (detach_or_kill_inferior_callback): Update.
7073 (print_started_pid): Update.
7074 (print_attached_pid): Update.
7075 (process_serial_event): Simplify read of ptid.
7076 * thread-db.c (thread_db_create_event): Update.
7077 (thread_db_get_tls_address): Update.
7078 * win32-low.c (current_inferior_ptid): Simplify.
7079
46917d26
TT
70802014-02-19 Tom Tromey <tromey@redhat.com>
7081
7082 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7083 argument.
7084 (target_supports_btrace): Update.
7085
0759a81e
YQ
70862014-02-14 Yao Qi <yao@codesourcery.com>
7087
7088 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7089 (rsp-low-ipa.o): New target.
7090
a7191e8b
TT
70912014-02-12 Tom Tromey <tromey@redhat.com>
7092
7093 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7094 convert_ascii_to_int.
7095 * regcache.c (registers_to_string): Likewise.
7096 * remote-utils.c (decode_M_packet): Likewise.
7097 * server.c (process_serial_event): Likewise.
7098
ff0e980e
TT
70992014-02-12 Tom Tromey <tromey@redhat.com>
7100
7101 * server.c (handle_query, handle_v_run): Use hex2bin, not
7102 unhexify.
7103 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7104
e9371aff
TT
71052014-02-12 Tom Tromey <tromey@redhat.com>
7106
7107 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7108 convert_int_to_ascii.
7109 * regcache.c (registers_to_string, collect_register_as_string):
7110 Likewise.
7111 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7112 Likewise.
7113 * server.c (process_serial_event): Likewise.
7114 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7115 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7116
971dc0b8
TT
71172014-02-12 Tom Tromey <tromey@redhat.com>
7118
7119 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7120 bin2hex, not hexify.
7121 * tracepoint.c (cmd_qtstatus): Likewise.
7122
0a822afb
TT
71232014-02-12 Tom Tromey <tromey@redhat.com>
7124
7125 * remote-utils.c (monitor_output): Pass explicit length to
7126 hexify.
7127
9c3d6531
TT
71282014-02-12 Tom Tromey <tromey@redhat.com>
7129
7130 * tracepoint.c: Include rsp-low.h.
7131 * server.c: Include rsp-low.h.
7132 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7133 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7134 declare.
7135 * remote-utils.c: Include rsp-low.h.
7136 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7137 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7138 (convert_int_to_ascii, convert_ascii_to_int): Move to
7139 common/rsp-low.c.
7140 * regcache.c: Include rsp-low.h.
7141 * ax.c: Include rsp-low.h.
7142 * Makefile.in (SFILES): Add common/rsp-low.c.
7143 (OBS): Add rsp-low.o.
7144 (rsp-low.o): New target.
7145
01fd3ea5
TT
71462014-02-12 Tom Tromey <tromey@redhat.com>
7147
7148 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7149 Include print-utils.h.
7150 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7151 (plongest, thirty_two, phex_nz): Remove.
7152 * Makefile.in (SFILES): Add common/print-utils.c.
7153 (OBS): Add print-utils.o.
7154 (print-utils-ipa.o): New target.
7155 (print-utils.o): New target.
7156 (IPA_OBJS): Add print-utils-ipa.o.
7157
e99dc820
TT
71582014-02-06 Tom Tromey <tromey@redhat.com>
7159
7160 * Makefile.in (SFILES): Fix indentation.
7161
ee1e2d4f
DE
71622014-02-05 Doug Evans <dje@google.com>
7163
7164 * linux-low.c (linux_wait_for_event): Improve comment.
7165 (linux_wait_1): Keep current_inferior in sync with event_child.
7166
f5a02773
DE
71672014-01-22 Doug Evans <dje@google.com>
7168
7169 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7170
87ce2a04
DE
71712014-01-22 Doug Evans <dje@google.com>
7172
7173 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7174 * configure: Regenerate.
7175 * config.in: Regenerate.
7176 * Makefile.in (SFILES): Add debug.c.
7177 (OBS): Add debug.o.
7178 * debug.c: New file.
7179 * debug.h: New file.
7180 * linux-aarch64-low.c (*): Update all debugging printfs to use
7181 debug_printf instead of fprintf.
7182 * linux-arm-low.c (*): Ditto.
7183 * linux-cris-low.c (*): Ditto.
7184 * linux-crisv32-low.c (*): Ditto.
7185 * linux-m32r-low.c (*): Ditto.
7186 * linux-sparc-low.c (*): Ditto.
7187 * linux-x86.c (*): Ditto.
7188 * linux-low.c (*): Ditto.
7189 (linux_wait_1): Add calls to debug_enter, debug_exit.
7190 (linux_wait): Remove redundant debugging printf.
7191 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7192 (linux_resume, unstop_all_lwps): Ditto.
7193 * mem-break.c (*): Update all debugging printfs to use
7194 debug_printf instead of fprintf.
7195 * remote-utils.c (*): Ditto.
7196 * thread-db.c (*): Ditto.
7197 * server.c #include <ctype.h>, "gdb_vecs.h".
7198 (debug_threads): Moved to debug.c.
7199 (*): Update all debugging printfs to use debug_printf instead of
7200 fprintf.
7201 (start_inferior): Replace call to fflush with call to debug_flush.
7202 (monitor_show_help): Mention set debug-format.
7203 (parse_debug_format_options): New function.
7204 (handle_monitor_command): Handle "monitor set debug-format".
7205 (gdbserver_usage): Mention --debug-format.
7206 (main): Parse --debug-format.
7207 * server.h (debug_threads): Declaration moved to debug.h.
7208 #include "debug.h".
7209 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7210 trace_debug_1 that uses debug_printf.
7211 (tracepoint_look_up_symbols): Update all debugging printfs to use
7212 debug_printf instead of fprintf.
7213
e671835b
BS
72142014-01-20 Baruch Siach <baruch@tkos.co.il>
7215
7216 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7217 sys/ptrace.h.
7218
b5737fa9
PA
72192014-01-17 Pedro Alves <palves@redhat.com>
7220
ea38d2a9 7221 PR build/16445
c7faa97a
PA
7222 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7223 defined after including gdb_proc_service.h.
b5737fa9 7224
40ed484e
DE
72252014-01-16 Doug Evans <dje@google.com>
7226
7227 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7228 (match_dll): Use it.
7229
969c39fb
MM
72302014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7231
7232 * target.h (target_ops) <read_btrace>: Change parameters and
7233 return type to allow error reporting.
7234 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7235 trace reading errors on.
7236 * linux-low.c (linux_low_read_btrace): Pass trace reading
7237 errors on.
7238 (linux_low_disable_btrace): New.
7239
ab7f45ba
DE
72402014-01-15 Doug Evans <dje@google.com>
7241
7242 * inferiors.c (thread_id_to_gdb_id): Delete.
7243 * inferiors.h (thread_id_to_gdb_id): Delete.
7244
66af0f44
EZ
72452014-01-13 Eli Zaretskii <eliz@gnu.org>
7246
7247 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7248 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7249 versions.
7250
9939e131
PA
72512014-01-08 Pedro Alves <palves@redhat.com>
7252
7253 * server.c (handle_status): Don't discard previous queued stop
7254 replies or thread's pending status here.
7255 (main) <disconnection>: Do it here instead.
7256
b7ea362b
PA
72572014-01-08 Pedro Alves <palves@redhat.com>
7258
7259 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7260 * server.c (visit_actioned_threads, handle_pending_status): New
7261 function.
7262 (handle_v_cont): Factor out parts to ...
7263 (resume): ... this new function. If in all-stop, and a thread
7264 being resumed has a pending status, report it without actually
7265 resuming.
7266 (myresume): Adjust to use the new 'resume' function.
7267 (clear_pending_status_callback, set_pending_status_callback)
7268 (find_status_pending_thread_callback): New functions.
7269 (handle_status): Handle the case of multiple threads having
7270 interesting statuses to report. Report threads' real last signal
7271 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7272 with an interesting thread to report the status for, instead of
7273 always reporting the status of the first thread.
7274
28498c42
JB
72752014-01-01 Joel Brobecker <brobecker@adacore.com>
7276
7277 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7278 * gdbreplay.c (gdbreplay_version): Likewise.
7279
f45c82da
YZ
72802013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7281
7282 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7283 iov.iov_len with the real length in use.
7284
379a5e2d
JB
72852013-12-13 Joel Brobecker <brobecker@adacore.com>
7286
7287 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7288 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7289 for all targets that use win32-low.c.
7290 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7291 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7292
4210d83e
PA
72932013-12-13 Pedro Alves <palves@redhat.com>
7294
7295 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7296 if equal to TARGET_WAITKIND_LOADED.
7297 * win32-low.c (cached_status): New static global.
7298 (win32_wait): Add declaration.
7299 (do_initial_child_stuff): Flush all initial pending debug events
7300 up to the initial breakpoint.
7301 (win32_wait): If CACHED_STATUS was set, return that instead
7302 of doing a real wait. Remove the code resuming the execution
7303 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7304 during the initial phase. Also remove the code changing
7305 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7306 TARGET_WAITKIND_STOPPED.
7307
e7f0d979
YQ
73082013-12-11 Yao Qi <yao@codesourcery.com>
7309
7310 * notif.c (handle_notif_ack): Return 0 if no notification
7311 matches.
7312
ebcf782c
DE
73132013-11-20 Doug Evans <dje@google.com>
7314
7315 * linux-low.c (linux_set_resume_request): Fix comment.
7316
20ad9378
DE
73172013-11-20 Doug Evans <dje@google.com>
7318
7319 * linux-low.c (resume_status_pending_p): Tweak comment.
7320
a196ebeb
WT
73212013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7322
7323 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7324 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7325 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7326 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7327 (srv_amd64_regobj): Add amd64-mpx.o.
7328 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7329 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7330 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7331 * i387-fp.c (num_pl_bnd_register) Added constant.
7332 (num_pl_bnd_cfg_registers) Added constant.
7333 (struct i387_xsave) Added reserved area and MPX fields.
7334 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7335 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7336 function.
7337 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7338 (init_registers_amd64_mpx_linux): Declare new function.
7339 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7340 (x86_64_regmap): Add MPX registers.
7341 (x86_linux_read_description): Add MPX case.
7342 (initialize_low_arch): Initialize MPX targets.
7343
0080a2f6
TT
73442013-11-18 Tom Tromey <tromey@redhat.com>
7345
7346 * configure: Rebuild.
7347 * configure.ac: Don't check for stdlib.h.
7348 * gdbreplay.c: Unconditionally include stdlib.h.
7349
2978b111
TT
73502013-11-18 Tom Tromey <tromey@redhat.com>
7351
7352 * config.in: Rebuild.
7353 * configure: Rebuild.
7354 * configure.ac: Don't use AC_HEADER_DIRENT.
7355
a3d08894
TT
73562013-11-18 Tom Tromey <tromey@redhat.com>
7357
7358 * server.h: Don't check HAVE_STRING_H.
7359 * gdbreplay.c: Don't check HAVE_STRING_H.
7360 * configure: Rebuild.
7361
0a5dd17d
TT
73622013-11-18 Tom Tromey <tromey@redhat.com>
7363
7364 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7365 LIBGNU.
7366
1bd2f0ba
TT
73672013-11-08 Tom Tromey <tromey@redhat.com>
7368
7369 * configure, config.in: Rebuild.
7370 * configure.ac: Remove unused configury.
7371
3266f10b
TT
73722013-11-08 Tom Tromey <tromey@redhat.com>
7373
7374 * acinclude.m4: Include common.m4, codeset.m4.
7375 * configure, config.in: Rebuild.
7376 * configure.ac: Use GDB_AC_COMMON.
7377
6682d959
AA
73782013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7379
7380 * linux-s390-low.c (HWCAP_S390_TE): New define.
7381 (s390_arch_setup): Consider the TE field in the HWCAP for
7382 determining 'have_regset_tdb'.
7383
fd0a4d76
SDJ
73842013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7385
7386 PR gdb/16014
7387 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7388 call to sizeof.
7389
1a3d890b
PA
73902013-10-02 Pedro Alves <palves@redhat.com>
7391
7392 * server.c (process_serial_event): Don't output "GDBserver
7393 exiting" if GDB is connected through stdio.
7394 * target.c (mywait): Likewise, be silent if GDB is connected
7395 through stdio.
7396
97ad4581
JB
73972013-10-01 Joel Brobecker <brobecker@adacore.com>
7398
7399 * lynx-low.c (lynx_add_threads_after_attach): New function.
7400 (lynx_attach): Remove call to add_thread. Add call to
7401 lynx_add_threads_after_attach instead.
7402
5b4e221c
MF
74032013-09-28 Mike Frysinger <vapier@gentoo.org>
7404
7405 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7406 * config.in, configure: Regenerated.
7407
ee47b2f8
YQ
74082013-09-18 Yao Qi <yao@codesourcery.com>
7409
7410 PR server/15959
7411 * server.c (start_inferior): Clear 'resume_info'.
7412
d6707650 74132013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7414
d6707650
JW
7415 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7416 for each register.
7417
9243dd0e 74182013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7419
9243dd0e
JW
7420 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7421 linux-tile-low.o to srv_tgtobj.
7422
c623a6ef
WN
74232013-09-16 Will Newton <will.newton@linaro.org>
7424
7425 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7426 out regs.
7427
fb71d39e
PA
74282013-09-06 Pedro Alves <palves@redhat.com>
7429
7430 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7431 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7432 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7433 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7434 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7435 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7436
8e7e9910
PA
74372013-09-06 Pedro Alves <palves@redhat.com>
7438
7439 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7440 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7441
7c3a12ca
PA
74422013-09-06 Pedro Alves <palves@redhat.com>
7443
7444 * linux-amd64-ipa.c: Include tracepoint.h.
7445 * linux-i386-ipa.c: Include tracepoint.h.
7446
8eb3d7b6
RW
74472013-09-06 Ricard Wanderlof <ricardw@axis.com>
7448
7449 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7450 (ps_get_thread_area): New function.
7451
eddddb9d
RW
74522013-09-06 Ricard Wanderlof <ricardw@axis.com>
7453
7454 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7455 (initialize_low_arch): Call init_registers_crisv32 rather than
7456 init_register_crisv32.
7457
533b0600
PA
74582013-09-05 Pedro Alves <palves@redhat.com>
7459
7460 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7461 to ...
7462 * hostio.h: ... this new file.
7463 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7464 win32-low.c: Include hostio.h.
7465
0ce3d3b5
PA
74662013-09-05 Pedro Alves <palves@redhat.com>
7467
7468 * server.h (gdb_client_data, handler_func, callback_handler_func)
7469 (delete_file_handler, add_file_handler, append_callback_event)
7470 (delete_callback_event, start_event_loop, initialize_event_loop):
7471 Move to event-loop.h and include it.
7472 * event-loop.h: New file.
7473
799cdc37
PA
74742013-09-05 Pedro Alves <palves@redhat.com>
7475
7476 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7477 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7478 (loaded_dll, unloaded_dll): Move to ...
7479 * dll.h: ... this new file.
7480 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7481
6a6bbd9d
PA
74822013-09-05 Pedro Alves <palves@redhat.com>
7483
7484 * server.h (current_process, get_thread_process, all_processes)
7485 (add_inferior_to_list, for_each_inferior, current_inferior)
7486 (remove_inferior, add_process, remove_process, find_process_pid)
7487 (have_started_inferiors_p, have_attached_inferiors_p)
7488 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7489 (clear_inferiors, find_inferior, find_inferior_id)
7490 (inferior_target_data, set_inferior_target_data)
7491 (inferior_regcache_data, set_inferior_regcache_data): Move to
7492 inferiors.h, and include it.
7493 * inferiors.h: New file.
7494
f699aaba
PA
74952013-09-05 Pedro Alves <palves@redhat.com>
7496
7497 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7498 Move ...
72f4393d 7499 * ax.h: ... here.
f699aaba 7500
c144c7a0
PA
75012013-09-05 Pedro Alves <palves@redhat.com>
7502
7503 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7504 tracepoint.h.
7505 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7506 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7507 (handle_tracepoint_general_set, handle_tracepoint_query)
7508 (tracepoint_finished_step, tracepoint_was_hit)
7509 (release_while_stepping_state_list, current_traceframe)
7510 (in_readonly_region, traceframe_read_mem)
7511 (fetch_traceframe_registers, traceframe_read_sdata)
7512 (traceframe_read_info, struct fast_tpoint_collect_status)
7513 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7514 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7515 (supply_fast_tracepoint_registers)
7516 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7517 (ipa_tdesc, claim_trampoline_space)
7518 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7519 (agent_mem_read, agent_get_trace_state_variable_value)
7520 (agent_set_trace_state_variable_value, agent_tsv_read)
7521 (agent_mem_read_string, get_raw_reg_func_addr)
7522 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7523 * tracepoint.h: ... this new file.
7524
ff42e6ab
PA
75252013-09-05 Pedro Alves <palves@redhat.com>
7526
7527 * server.h (perror_with_name, error, fatal, warning, paddress)
7528 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7529 include it.
7530 * utils.h: New file.
7531
541af0f4
PA
75322013-09-05 Pedro Alves <palves@redhat.com>
7533
7534 * server.h (remote_debug, noack_mode, transport_is_reliable)
7535 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7536 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7537 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7538 (write_enn, initialize_async_io, enable_async_io)
7539 (disable_async_io, check_remote_input_interrupt_request)
7540 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7541 (dead_thread_notify, prepare_resume_reply)
7542 (decode_address_to_semicolon, decode_address, decode_m_packet)
7543 (decode_M_packet, decode_X_packet, decode_xfer_write)
7544 (decode_search_memory_packet, unhexify, hexify)
7545 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7546 (look_up_one_symbol, relocate_instruction)
7547 (monitor_output): Move to remote-utils.h, and include it.
7548 * remote-utils.h: New file.
7549
eebdf26b
PA
75502013-09-05 Pedro Alves <palves@redhat.com>
7551
7552 * server.h (_): Delete.
7553
3aafd2ff
PA
75542013-09-02 Pedro Alves <palves@redhat.com>
7555
7556 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7557 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7558 allocated.
7559 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7560
cee83bcb
PM
75612013-09-02 Pierre Muller <muller@sourceware.org>
7562
7563 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7564 or WriteProcessMemory complete successfully and handle
7565 ERROR_PARTIAL_COPY error.
7566
9a13b2fa
PA
75672013-09-02 Pedro Alves <palves@redhat.com>
7568
7569 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7570 error instead of EIO.
7571
602e3198
JK
75722013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7573
7574 PR server/15604
7575 * linux-low.c: Include filestuff.h.
7576 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7577 * lynx-low.c: Include filestuff.h.
7578 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7579 * server.c: Include filestuff.h.
7580 (main): Call notice_open_fds.
7581 * spu-low.c: Include filestuff.h.
7582 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7583
96d7229d
LM
75842013-08-22 Luis Machado <lgustavo@codesourcery.com>
7585
7586 * Makefile.in: Explain why ../target and ../nat are not
7587 listed as include file search paths.
7588 (linux-waitpid.o): New object file rule.
7589 * configure.srv (srv_native_linux_obj): New variable.
7590 Replace all occurrences of linux native object files with
7591 $srv_native_linux_obj.
7592 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7593 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7594 (linux_enable_event_reporting): Remove declaration.
7595 (my_waitpid): Moved to common/linux-waitpid.c.
7596 (linux_wait_for_event): Pass ptid when calling
7597 linux_enable_event_reporting.
7598 (linux_supports_tracefork_flag): Remove.
7599 (linux_enable_event_reporting): Likewise.
7600 (linux_tracefork_grandchild): Remove.
7601 (STACK_SIZE): Moved to common/linux-ptrace.c.
7602 (linux_tracefork_child): Remove.
7603 (linux_test_for_tracefork): Remove.
7604 (linux_look_up_symbols): Call linux_supports_traceclone.
7605 (initialize_low): Remove call to linux_test_for_tracefork.
7606 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7607 common/linux-ptrace.h.
7608 (PTRACE_TYPE_ARG4): Likewise.
7609 Include linux-ptrace.h.
7610
32940073
PA
76112013-08-21 Pedro Alves <palves@redhat.com>
7612
7613 * config.in: Renegerate.
7614
33b60d58 76152013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7616
33b60d58
LM
7617 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7618 (SFILES): Remove $(srcdir)/common/target-common.c and
7619 add $(srcdir)/target/waitstatus.c.
7620 (OBS): Remove target-common.o and add waitstatus.o.
7621 (server_h): Remove $(srcdir)/../common/target-common.h and
7622 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7623 and $(srcdir)/../target/waitstatus.h.
7624 (target-common.o): Remove.
7625 (waitstatus.o): New target object file.
7626 * target.h: Do not include target-common.h and
7627 include target/resume.h, target/wait.h and
7628 target/waitstatus.h.
7629
b8e1b30e
LM
76302013-08-13 Luis Machado <lgustavo@codesourcery.com>
7631
7632 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7633 to PTRACE_TYPE_ARG3.
7634 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7635 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7636 PTRACE_TYPE_ARG4.
7637 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7638 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7639
7a60ad40
YQ
76402013-07-27 Jie Zhang <jie@codesourcery.com>
7641 Daniel Jacobowitz <dan@codesourcery.com>
7642 Yao Qi <yao@codesourcery.com>
7643
7644 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7645 (mips-linux-watch.o): New rule.
7646 (mips_linux_watch_h): New variable.
7647 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7648 srv_tgtobj.
7649 * linux-mips-low.c: Include mips-linux-watch.h.
7650 (struct arch_process_info, struct arch_lwp_info): New.
7651 (update_watch_registers_callback): New function.
7652 (mips_linux_new_process, mips_linux_new_thread) New functions.
7653 (mips_linux_prepare_to_resume, mips_insert_point): New
7654 functions.
7655 (mips_remove_point, mips_stopped_by_watchpoint): New
7656 functions.
7657 (rsp_bp_type_to_target_hw_bp_type): New function.
7658 (mips_stopped_data_address): New function.
7659 (the_low_target): Add watchpoint support functions.
7660
de6f69ad
YQ
76612013-07-27 Yao Qi <yao@codesourcery.com>
7662
7663 * i386-low.c: Include break-common.h.
7664 (enum target_hw_bp_type): Remove.
7665
3360c0bf
LM
76662013-07-24 Luis Machado <lgustavo@codesourcery.com>
7667
7668 * Makefile.in (SFILES): /common/target-common.c.
7669 (OBS): Add target-common.o.
7670 (server_h): Add $(srcdir)/../common/target-common.h.
7671 (target-common.o): New target.
7672 * server.c (queue_stop_reply_callback): Free
7673 status string after use.
7674 * target.c (target_waitstatus_to_string): Remove.
7675 * target.h: Include target-common.h.
7676 (resume_kind): Likewise.
7677 (target_waitkind): Likewise.
7678 (target_waitstatus): Likewise.
7679 (TARGET_WNOHANG): Likewise.
7680
bd885420
YQ
76812013-07-04 Yao Qi <yao@codesourcery.com>
7682
7683 * Makefile.in (host_alias): Use @host_noncanonical@.
7684 (target_alias): Use @target_noncanonical@.
7685 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7686 ACX_NONCANONICAL_HOST.
7687 * configure: Regenerated.
7688
7689 Revert:
7690 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7691
7692 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7693 * configure: Rebuild.
7694 * Makefile.in (version_host, version_target): Get from configure.
7695 (version.c): Use $(version_host) and $(version_target).
7696
17ef446e
PA
76972013-07-03 Pedro Alves <palves@redhat.com>
7698
7699 * Makefile.in (config.status): Depend on development.sh.
7700 * acinclude.m4: Include libmcheck.m4.
7701 * configure: Regenerate.
7702
7a9a7487
MG
77032013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7704
7705 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7706 attribute inside the parentheses.
7707 (winapi_DebugSetProcessKillOnExit): Ditto.
7708 (winapi_DebugBreakProcess): Ditto.
7709 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7710
49b64de6
MG
77112013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7712
7713 * notif.h (notif_event): Add a dummy member to avoid compiler
7714 errors.
7715
d5749ee7
PA
77162013-07-01 Pedro Alves <palves@redhat.com>
7717
7718 * hostio.c (HOSTIO_PATH_MAX): Define.
7719 (require_filename, handle_open, handle_unlink, handle_readlink):
7720 Use it.
7721
d8d2a3ee
PA
77222013-07-01 Pedro Alves <palves@redhat.com>
7723
7724 * server.h: Include "pathmax.h".
7725 * linux-low.c: Don't include sys/param.h.
7726 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7727 MAXPATHLEN.
7728 * win32-low.c: Don't include sys/param.h.
7729 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7730
bc7dea8d
PA
77312013-07-01 Pedro Alves <palves@redhat.com>
7732
7733 * event-loop.c: Don't check HAVE_UNISTD_H before including
7734 <unistd.h>.
7735 * gdbreplay.c: Likewise.
7736 * remote-utils.c: Likewise.
7737 * server.c: Likewise.
7738 * configure.ac: Don't check for unistd.h.
7739 * configure: Regenerate.
7740
d6c2da54
TT
77412013-06-28 Tom Tromey <tromey@redhat.com>
7742
7743 * Makefile.in (version.c): Use version.in, not
7744 common/version.in.
7745
257b6bec
MG
77462013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7747
7748 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7749 * configure: Rebuild.
7750 * Makefile.in (version_host, version_target): Get from configure.
7751 (version.c): Use $(version_host) and $(version_target).
7752
86ebe149
DK
77532013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7754
7755 Fix trace-status to output user name without trailing colon.
7756 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7757
f30aa5af
DK
77582013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7759
7760 Fix trace-status to output proper start-time and stop-time.
7761 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7762 output start time and stop time in hex as gdb expects.
7763
28a93511
YQ
77642013-06-26 Pedro Alves <pedro@codesourcery.com>
7765
7766 * tracepoint.c (build_traceframe_info_xml): Output trace state
7767 variables present in the trace buffer.
7768
01208463
TT
77692013-06-24 Tom Tromey <tromey@redhat.com>
7770
7771 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7772 create-version.sh.
7773 (version.o): Remove.
7774 * gdbreplay.c: Include version.h.
7775 (version, host_name): Don't declare.
7776 * server.h: Include version.h.
7777 (version, host_name): Don't declare.
7778
760256f9
PA
77792013-06-12 Pedro Alves <palves@redhat.com>
7780
7781 * linux-x86-low.c (linux_is_elf64): Delete global.
7782 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7783 with local linux_pid_exe_is_elf_64_file use.
7784
030031ee
PA
77852013-06-11 Pedro Alves <palves@redhat.com>
7786
7787 * linux-low.c (regset_disabled, disable_regset): New functions.
7788 (regsets_fetch_inferior_registers)
7789 (regsets_store_inferior_registers): Use them.
7790 (initialize_regsets_info); Don't allocate the disabled_regsets
7791 array here.
7792 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7793 comment.
7794
5da6eb0a
PA
77952013-06-11 Pedro Alves <palves@redhat.com>
7796
7797 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7798 xmalloc.
7799
7e5aaa09
PA
78002013-06-11 Pedro Alves <palves@redhat.com>
7801
7802 * linux-x86-low.c (initialize_low_arch): Call
7803 init_registers_x32_avx_linux.
7804
d878444c
JK
78052013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7806
7807 Fix compatibility with Android Bionic.
7808 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7809 it is not empty.
7810
3aee8918
PA
78112013-06-07 Pedro Alves <palves@redhat.com>
7812
5f2b57b5 7813 PR server/14823
3aee8918
PA
7814 * Makefile.in (OBS): Add tdesc.o.
7815 (IPA_OBJS): Add tdesc-ipa.o.
7816 (tdesc-ipa.o): New rule.
7817 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7818 interface.
7819 * linux-low.c (new_inferior): Delete.
7820 (disabled_regsets, num_regsets): Delete.
7821 (linux_add_process): Adjust to set the new per-process
7822 new_inferior flag.
7823 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7824 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7825 was a stop. When calling arch_setup, switch the current inferior
7826 to the thread that got an event.
7827 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7828 (regsets_fetch_inferior_registers)
7829 (regsets_store_inferior_registers): New regsets_info parameter.
7830 Adjust to use it.
7831 (linux_register_in_regsets): New regs_info parameter. Adjust to
7832 use it.
7833 (register_addr, fetch_register, store_register): New usrregs_info
7834 parameter. Adjust to use it.
7835 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7836 parameter regs_info. Adjust to use it.
7837 (linux_fetch_registers): Get the current inferior's regs_info, and
7838 adjust to use it.
7839 (linux_store_registers): Ditto.
7840 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7841 (initialize_low): Don't initialize the target_regsets here. Call
7842 initialize_low_arch.
7843 * linux-low.h (target_regsets): Delete declaration.
7844 (struct regsets_info): New.
7845 (struct usrregs_info): New.
7846 (struct regs_info): New.
7847 (struct process_info_private) <new_inferior>: New field.
7848 (struct linux_target_ops): Delete the num_regs, regmap, and
7849 regset_bitmap fields. New field regs_info.
7850 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7851 * i387-fp.c (num_xmm_registers): Delete.
7852 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7853 calls to new interface.
7854 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7855 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7856 Infer the number of xmm registers from the regcache's target
7857 description.
7858 * i387-fp.h (num_xmm_registers): Delete.
7859 * inferiors.c (add_thread): Don't install the thread's regcache
7860 here.
7861 * proc-service.c (gregset_info): Fetch the current inferior's
7862 regs_info. Adjust to use it.
7863 * regcache.c: Include tdesc.h.
7864 (register_bytes, reg_defs, num_registers)
7865 (gdbserver_expedite_regs): Delete.
7866 (get_thread_regcache): If the thread doesn't have a regcache yet,
7867 create one, instead of aborting gdbserver.
7868 (regcache_invalidate_one): Rename to ...
7869 (regcache_invalidate_thread): ... this.
7870 (regcache_invalidate_one): New.
7871 (regcache_invalidate): Only invalidate registers of the current
7872 process.
7873 (init_register_cache): Add target_desc parameter, and use it.
7874 (new_register_cache): Ditto. Assert the target description has a
7875 non zero registers_size.
7876 (regcache_cpy): Add assertions. Adjust.
7877 (realloc_register_cache, set_register_cache): Delete.
7878 (registers_to_string, registers_from_string): Adjust.
7879 (find_register_by_name, find_regno, find_register_by_number)
7880 (register_cache_size): Add target_desc parameter, and use it.
7881 (free_register_cache_thread, free_register_cache_thread_one)
7882 (regcache_release, register_cache_size): New.
7883 (register_size): Add target_desc parameter, and use it.
7884 (register_data, supply_register, supply_register_zeroed)
7885 (supply_regblock, supply_register_by_name, collect_register)
7886 (collect_register_as_string, collect_register_by_name): Adjust.
7887 * regcache.h (struct target_desc): Forward declare.
7888 (struct regcache) <tdesc>: New field.
7889 (init_register_cache, new_register_cache): Add target_desc
7890 parameter.
7891 (regcache_invalidate_thread): Declare.
7892 (regcache_invalidate_one): Delete declaration.
7893 (regcache_release): Declare.
7894 (find_register_by_number, register_cache_size, register_size)
7895 (find_regno): Add target_desc parameter.
7896 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7897 declarations.
7898 * remote-utils.c: Include tdesc.h.
7899 (outreg, prepare_resume_reply): Adjust.
7900 * server.c: Include tdesc.h.
7901 (gdbserver_xmltarget): Delete declaration.
7902 (get_features_xml, process_serial_event): Adjust.
7903 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7904 declare.
7905 (struct process_info) <tdesc>: New field.
7906 (ipa_tdesc): Declare.
7907 * tdesc.c: New file.
7908 * tdesc.h: New file.
7909 * tracepoint.c: Include tdesc.h.
7910 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7911 (get_context_regcache): Adjust to pass ipa_tdesc down.
7912 (do_action_at_tracepoint): Adjust to get the register cache size
7913 from the context regcache's description.
7914 (traceframe_walk_blocks): Adjust to get the register cache size
7915 from the current trace frame's description.
7916 (traceframe_get_pc): Adjust to get current trace frame's
7917 description and pass it down.
7918 (gdb_collect): Adjust to get the register cache size from the
7919 IPA's description.
7920 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7921 (gdbserver_xmltarget): Delete.
7922 (initialize_low_tracepoint): Set the ipa's target description.
7923 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7924 (initialize_low_tracepoint): Set the ipa's target description.
7925 * linux-x86-low.c: Include tdesc.h.
7926 [__x86_64__] (is_64bit_tdesc): New.
7927 (ps_get_thread_area, x86_get_thread_area): Use it.
7928 (i386_cannot_store_register): Rename to ...
7929 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7930 (i386_cannot_fetch_register): Rename to ...
7931 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7932 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7933 to new interface.
7934 (target_regsets): Rename to ...
7935 (x86_regsets): ... this.
7936 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7937 interface.
7938 (x86_siginfo_fixup): Use is_64bit_tdesc.
7939 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7940 (tdesc_x32_avx_linux, tdesc_x32_linux)
7941 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7942 Declare.
7943 (x86_linux_update_xmltarget): Delete.
7944 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7945 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7946 (AMD64_LINUX_USER64_CS): New.
7947 (x86_linux_read_description): New, based on
7948 x86_linux_update_xmltarget.
7949 (same_process_callback): New.
7950 (x86_arch_setup_process_callback): New.
7951 (x86_linux_update_xmltarget): New.
7952 (x86_regsets_info): New.
7953 (amd64_linux_regs_info): New.
7954 (i386_linux_usrregs_info): New.
7955 (i386_linux_regs_info): New.
7956 (x86_linux_regs_info): New.
7957 (x86_arch_setup): Reimplement.
7958 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7959 (x86_emit_ops): Ditto.
7960 (the_low_target): Adjust. Install x86_linux_regs_info,
7961 x86_cannot_fetch_register, and x86_cannot_store_register.
7962 (initialize_low_arch): New.
7963 * linux-ia64-low.c (tdesc_ia64): Declare.
7964 (ia64_fetch_register): Adjust.
7965 (ia64_usrregs_info, regs_info): New globals.
7966 (ia64_regs_info): New function.
7967 (the_low_target): Adjust.
7968 (initialize_low_arch): New function.
7969 * linux-sparc-low.c (tdesc_sparc64): Declare.
7970 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7971 Adjust.
7972 (sparc_arch_setup): New function.
7973 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7974 (the_low_target): Adjust.
7975 (initialize_low_arch): New function.
7976 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7977 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7978 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7979 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7980 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7981 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7982 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7983 (tdesc_powerpc_isa205_vsx64l): Declare.
7984 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7985 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7986 (ppc_set_pc, ppc_get_hwcap): Adjust.
7987 (ppc_usrregs_info): Forward declare.
7988 (!__powerpc64__) ppc_regmap_adjusted: New global.
7989 (ppc_arch_setup): Adjust to the current process'es target
7990 description.
7991 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7992 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7993 (ppc_store_evrregset): Adjust.
7994 (target_regsets): Rename to ...
7995 (ppc_regsets): ... this, and make static.
7996 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7997 (ppc_regs_info): New function.
7998 (the_low_target): Adjust.
7999 (initialize_low_arch): New function.
8000 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8001 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8002 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8003 (tdesc_s390x_linux64v2): Declare.
8004 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8005 (s390_fill_gregset, s390_store_last_break): Adjust.
8006 (target_regsets): Rename to ...
8007 (s390_regsets): ... this, and make static.
8008 (s390_get_pc, s390_set_pc): Adjust.
8009 (s390_get_hwcap): New target_desc parameter, and use it.
8010 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8011 (s390_arch_setup): Adjust to set the current process'es target
8012 description. Don't adjust the regmap.
8013 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8014 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8015 (regs_info_3264): New globals.
8016 (s390_regs_info): New function.
8017 (the_low_target): Adjust.
8018 (initialize_low_arch): New function.
8019 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8020 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8021 [__mips64] (init_registers_mips_linux)
8022 (init_registers_mips_dsp_linux): Delete defines.
8023 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8024 (have_dsp): New global.
8025 (mips_read_description): New, based on mips_arch_setup.
8026 (mips_arch_setup): Reimplement.
8027 (get_usrregs_info): New function.
8028 (mips_cannot_fetch_register, mips_cannot_store_register)
8029 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8030 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8031 (target_regsets): Rename to ...
8032 (mips_regsets): ... this, and make static.
8033 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8034 (dsp_regs_info, regs_info): New globals.
8035 (mips_regs_info): New function.
8036 (the_low_target): Adjust.
8037 (initialize_low_arch): New function.
8038 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8039 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8040 Declare.
8041 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8042 (arm_read_description): New, with bits factored from
8043 arm_arch_setup.
8044 (arm_arch_setup): Reimplement.
8045 (target_regsets): Rename to ...
8046 (arm_regsets): ... this, and make static.
8047 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8048 (arm_regs_info): New function.
8049 (the_low_target): Adjust.
8050 (initialize_low_arch): New function.
8051 * linux-m68k-low.c (tdesc_m68k): Declare.
8052 (target_regsets): Rename to ...
8053 (m68k_regsets): ... this, and make static.
8054 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8055 (m68k_regs_info): New function.
8056 (m68k_arch_setup): New function.
8057 (the_low_target): Adjust.
8058 (initialize_low_arch): New function.
8059 * linux-sh-low.c (tdesc_sharch): Declare.
8060 (target_regsets): Rename to ...
8061 (sh_regsets): ... this, and make static.
8062 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8063 (sh_regs_info, sh_arch_setup): New functions.
8064 (the_low_target): Adjust.
8065 (initialize_low_arch): New function.
8066 * linux-bfin-low.c (tdesc_bfin): Declare.
8067 (bfin_arch_setup): New function.
8068 (bfin_usrregs_info, regs_info): New globals.
8069 (bfin_regs_info): New function.
8070 (the_low_target): Adjust.
8071 (initialize_low_arch): New function.
8072 * linux-cris-low.c (tdesc_cris): Declare.
8073 (cris_arch_setup): New function.
8074 (cris_usrregs_info, regs_info): New globals.
8075 (cris_regs_info): New function.
8076 (the_low_target): Adjust.
8077 (initialize_low_arch): New function.
8078 * linux-cris-low.c (tdesc_crisv32): Declare.
8079 (cris_arch_setup): New function.
8080 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8081 (cris_regs_info): New function.
8082 (the_low_target): Adjust.
8083 (initialize_low_arch): New function.
8084 * linux-m32r-low.c (tdesc_m32r): Declare.
8085 (m32r_arch_setup): New function.
8086 (m32r_usrregs_info, regs_info): New globals.
8087 (m32r_regs_info): Adjust.
8088 (initialize_low_arch): New function.
8089 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8090 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8091 (tic6x_usrregs_info): Forward declare.
8092 (tic6x_read_description): New function, based on ...
8093 (tic6x_arch_setup): ... this. Reimplement.
8094 (target_regsets): Rename to ...
8095 (tic6x_regsets): ... this, and make static.
8096 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8097 (tic6x_regs_info): New function.
8098 (the_low_target): Adjust.
8099 (initialize_low_arch): New function.
8100 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8101 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8102 (target_regsets): Rename to ...
8103 (xtensa_regsets): ... this, and make static.
8104 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8105 globals.
8106 (xtensa_arch_setup, xtensa_regs_info): New functions.
8107 (the_low_target): Adjust.
8108 (initialize_low_arch): New function.
8109 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8110 (nios2_arch_setup): Set the current process'es tdesc.
8111 (target_regsets): Rename to ...
8112 (nios2_regsets): ... this.
8113 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8114 (nios2_regs_info): New function.
8115 (the_low_target): Adjust.
8116 (initialize_low_arch): New function.
a261b8f5
PA
8117 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8118 (aarch64_arch_setup): Set the current process'es tdesc.
8119 (target_regsets): Rename to ...
8120 (aarch64_regsets): ... this.
8121 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8122 (aarch64_regs_info): New function.
8123 (the_low_target): Adjust.
8124 (initialize_low_arch): New function.
3aee8918
PA
8125 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8126 globals.
8127 (target_regsets): Rename to ...
8128 (tile_regsets): ... this.
8129 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8130 (tile_regs_info): New function.
8131 (tile_arch_setup): Set the current process'es tdesc.
8132 (the_low_target): Adjust.
8133 (initialize_low_arch): New function.
8134 * spu-low.c (tdesc_spu): Declare.
8135 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8136 * win32-arm-low.c (tdesc_arm): Declare.
8137 (arm_arch_setup): New function.
8138 (the_low_target): Install arm_arch_setup instead of
8139 init_registers_arm.
8140 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8141 (init_windows_x86): Rename to ...
8142 (i386_arch_setup): ... this. Set `win32_tdesc'.
8143 (the_low_target): Adjust.
8144 * win32-low.c (win32_tdesc): New global.
8145 (child_add_thread): Don't create the thread cache here.
8146 (do_initial_child_stuff): Set the new process'es tdesc.
8147 * win32-low.h (struct target_desc): Forward declare.
8148 (win32_tdesc): Declare.
8149 * lynx-i386-low.c (tdesc_i386): Declare global.
8150 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8151 * lynx-low.c (lynx_tdesc): New global.
8152 (lynx_add_process): Set the new process'es tdesc.
8153 * lynx-low.h (struct target_desc): Forward declare.
8154 (lynx_tdesc): Declare global.
8155 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8156 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8157 * nto-low.c (nto_tdesc): New global.
8158 (do_attach): Set the new process'es tdesc.
8159 * nto-low.h (struct target_desc): Forward declare.
8160 (nto_tdesc): Declare.
8161 * nto-x86-low.c (tdesc_i386): Declare.
8162 (nto_x86_arch_setup): Set `nto_tdesc'.
8163
b1fbec62
GB
81642013-06-04 Gary Benson <gbenson@redhat.com>
8165
8166 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8167 to qSupported response when appropriate.
8168 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8169 with nonzero-length annex.
8170 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8171 arguments supplied in annex.
8172
d1ec4ce7
DE
81732013-05-31 Doug Evans <dje@google.com>
8174
ac44adcb 8175 PR server/15594
d1ec4ce7
DE
8176 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8177 64 bits in 64-cross-32 environment.
8178
9b25f2d3
PA
81792013-05-28 Pedro Alves <palves@redhat.com>
8180
8181 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8182 (aarch64-without-fpu.c): Delete rule.
8183 * configure.srv (aarch64*-*-linux*): Remove references to
8184 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8185 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8186 declaration.
8187
6740dc9c
PA
81882013-05-24 Pedro Alves <palves@redhat.com>
8189
8190 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8191 instead of strchr/decode_address. Error if the range isn't split
8192 with a ','. Don't assume there's be a ':' in the action.
8193
c2d6af84
PA
81942013-05-23 Yao Qi <yao@codesourcery.com>
8195 Pedro Alves <palves@redhat.com>
8196
8197 * linux-low.c (lwp_in_step_range): New function.
8198 (linux_wait_1): If the thread was range stepping and stopped
8199 outside the stepping range, report the stop to GDB. Otherwise,
8200 continue stepping. Add range stepping debug output.
8201 (linux_set_resume_request): Copy the step range from the resume
8202 request to the lwp.
8203 (linux_supports_range_stepping): New.
8204 (linux_target_ops) <supports_range_stepping>: Set to
8205 linux_supports_range_stepping.
8206 * linux-low.h (struct linux_target_ops)
8207 <supports_range_stepping>: New field.
8208 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8209 * linux-x86-low.c (x86_supports_range_stepping): New.
8210 (the_low_target) <supports_range_stepping>: Set to
8211 x86_supports_range_stepping.
8212 * server.c (handle_v_cont): Handle 'r' action.
8213 (handle_v_requests): Append ";r" if the target supports range
8214 stepping.
8215 * target.h (struct thread_resume) <step_range_start,
8216 step_range_end>: New fields.
8217 (struct target_ops) <supports_range_stepping>:
8218 New field.
8219 (target_supports_range_stepping): New macro.
8220
58794e1a
JB
82212013-05-17 Joel Brobecker <brobecker@adacore.com>
8222
8223 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8224 confusion in comment.
8225
d631c5a7
JB
82262013-05-17 Joel Brobecker <brobecker@adacore.com>
8227
8228 * lynx-low.c (struct process_info_private): New type.
8229 (lynx_add_process): New function.
8230 (lynx_create_inferior, lynx_attach): Replace calls to
8231 add_process by calls to lynx_add_process.
8232 (lynx_resume): If PTID is null, then try using
8233 current_process()->private->last_wait_event_ptid.
8234 Add comments.
8235 (lynx_clear_inferiors): Delete. The contents of that function
8236 has been inlined in lynx_mourn;
8237 (lynx_wait_1): Save the ptid in the process's private data.
8238 (lynx_mourn): Free the process' private data. Replace call
8239 to lynx_clear_inferiors by call to clear_inferiors.
8240
96f7a20f
YQ
82412013-05-17 Yao Qi <yao@codesourcery.com>
8242
8243 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8244 the right place.
8245
db0dfaa0
LM
82462013-05-16 Luis Machado <lgustavo@codesourcery.com>
8247
8248 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8249 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8250 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8251 PT_TEXT_END_ADDR guards. Update comments.
8252 (linux_target_op) <read_offsets>: Conditionally define to
8253 linux_read_offsets if the target is UCLIBC and if it defines
8254 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8255
68f5f838
SL
82562013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8257 Andrew Jenner <andrew@codesourcery.com>
8258
8259 * Makefile.in (SFILES): Add linux-nios2-low.c.
8260 (clean): Add action to delete nios2-linux.c.
8261 (nios2-linux.c): New rule.
8262 * configure.srv: Add nios2*-*-linux*.
8263 * linux-nios2-low.c: New.
8264
1ebff1fd
HAQ
82652013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8266
8267 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8268
f6150862
HZ
82692013-04-25 Hui Zhu <hui@codesourcery.com>
8270
8271 PR gdb/15186
f6150862
HZ
8272 * ax.c (ax_printf): Add fflush.
8273
614c279d
TT
82742013-04-22 Tom Tromey <tromey@redhat.com>
8275
8276 * Makefile.in (SFILES): Add filestuff.c.
8277 (OBS): Add filestuff.o.
8278 (filestuff.o): New target.
8279 * config.in, configure: Rebuild.
8280 * configure.ac: Check for fdwalk, pipe2.
8281
7d4e5717
PA
82822013-04-17 Pedro Alves <palves@redhat.com>
8283
8284 * configure.ac (USE_THREAD_DB): Delete variable.
8285 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8286 Don't AC_SUBST USE_THREAD_DB.
8287 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8288 * config.in, configure: Regenerate.
8289
d5c93e41
PA
82902013-04-16 Pedro Alves <palves@redhat.com>
8291
8292 * linux-low.h (struct lwp_info) <thread_known>: Move under
8293 the USE_THREAD_DB #ifdef.
8294
04f5fe89
PA
82952013-04-16 Pedro Alves <palves@redhat.com>
8296
8297 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8298 (linux-low.o): Delete rule.
8299 * linux-low.h: Always include "gdb_thread_db.h" instead of
8300 conditionally including thread_db.h.
8301 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8302 HAVE_THREAD_DB_H.
8303
480b27bf
JK
83042013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8305
8306 * Makefile.in (install-only): Fix make install regression.
8307
43662968
JK
83082013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8309
8310 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8311 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8312 installation.
8313 * gdbserver.1: Remove.
8314
3e74e146
PA
83152013-03-22 Pedro Alves <palves@redhat.com>
8316
8317 * linux-low.c (handle_extended_wait): Don't call
8318 linux_enable_event_reporting.
8319
a8347a2a
TT
83202013-03-15 Tony Theodore <tonyt@logyst.com>
8321
8322 PR build/9098:
8323 * Makefile.in (SHELL): Use @SHELL@.
8324
eeb56fa7
SDJ
83252013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8326
8327 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8328 compiler warning.
8329
4fa7e2ff
JB
83302013-03-13 Joel Brobecker <brobecker@adacore.com>
8331
8332 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8333 Remove extraneous NULL element.
8334
8ddb1965
YQ
83352013-03-13 Yao Qi <yao@codesourcery.com>
8336
8337 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8338 'V' block in trace frame.
8339
9accd112
MM
83402013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8341
8342 * target.h (struct target_ops): Add btrace ops.
8343 (target_supports_btrace): New macro.
8344 (target_enable_btrace): New macro.
8345 (target_disable_btrace): New macro.
8346 (target_read_btrace): New macro.
8347 * gdbthread.h (struct thread_info): Add btrace field.
8348 * server.c: Include btrace-common.h.
8349 (handle_btrace_general_set): New function.
8350 (handle_btrace_enable): New function.
8351 (handle_btrace_disable): New function.
8352 (handle_general_set): Call handle_btrace_general_set.
8353 (handle_qxfer_btrace): New function.
8354 (struct qxfer qxfer_packets[]): Add btrace entry.
8355 * inferiors.c (remove_thread): Disable btrace.
8356 * linux-low: Include linux-btrace.h.
8357 (linux_low_enable_btrace): New function.
8358 (linux_low_read_btrace): New function.
8359 (linux_target_ops): Add btrace ops.
8360 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8361 Add srv_linux_btrace=yes.
8362 (x86_64-*-linux*): Add linux-btrace.o.
8363 Add srv_linux_btrace=yes.
8364 * configure.ac: Define HAVE_LINUX_BTRACE.
8365 * config.in: Regenerated.
8366 * configure: Regenerated.
8367
5cc22e4c
MM
83682013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8369
8370 * server.c (handle_qxfer): Preserve error message if -3 is
8371 returned.
8372 (qxfer): Document the -3 return value.
8373
7c97f91e
MM
83742013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8375
8376 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8377 (linux_btrace_h): New variable.
8378 (linux-btrace.o): New rule.
8379
be9a119c 83802013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8381 Hafiz Abid Qadeer <abidh@codesourcery.com>
8382
8383 * tracepoint.c (trace_buffer_size): New global.
8384 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8385 (init_trace_buffer): Change to one-argument function. Allocate
8386 trace buffer memory.
8387 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8388 handle QTBuffer:size packet.
8389 (cmd_bigqtbuffer_size): New function.
8390 (initialize_tracepoint): Call init_trace_buffer with
8391 DEFAULT_TRACE_BUFFER_SIZE.
8392 * server.c (handle_query): Add QTBuffer:size in the
8393 supported packets.
8394
e64f7499
YQ
83952013-03-07 Yao Qi <yao@codesourcery.com>
8396
8397 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8398 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8399 of -1.
8400 (cmd_qtsp): Adjust condition. Do post increment.
8401 Set cur_action and cur_step_action back to 0.
8402
f0ae6fc3
PA
84032013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8404
8405 PR server/15236
8406 * linux-low.c (linux_write_memory): Return early success if LEN is
8407 zero.
8408
b5b0b0af
CV
84092013-03-05 Corinna Vinschen <vinschen@redhat.de>
8410
334ad4a8 8411 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8412
589bc927
TT
84132013-02-28 Tom Tromey <tromey@redhat.com>
8414
8415 * configure.ac: Invoke AC_SYS_LARGEFILE.
8416 * configure, config.in: Rebuild.
8417
dfe07582
CV
84182013-02-28 Corinna Vinschen <vinschen@redhat.com>
8419
8420 * win32-low.c: Throughout, fix format strings and casts of
8421 printf-like functions to avoid type related warnings on all
8422 platforms.
8423 (get_child_debug_event): Print dwDebugEventCode as hex since
8424 that's how it's usually documented.
8425
736cd585
YQ
84262013-02-28 Yao Qi <yao@codesourcery.com>
8427
8428 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8429 pulongest.
8430
e1f58301
JW
84312013-02-27 Jiong Wang <jiwang@tilera.com>
8432
8433 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8434 (reg-tilegx32.c): New rule.
8435 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8436 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8437 different register info initializer according to elf class.
8438 (init_registers_tilgx32): New function. The tilegx32 register info
8439 initializer.
8440 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8441 (tile_store_gregset): Likewise.
8442
d171ca78
YQ
84432013-02-27 Yao Qi <yao@codesourcery.com>
8444
8445 * server.c (process_point_options): Print debug message when
8446 debug_threads is true.
8447
282bbdf3
YQ
84482013-02-26 Yao Qi <yao@codesourcery.com>
8449
8450 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8451
aca22551
PA
84522013-02-19 Pedro Alves <palves@redhat.com>
8453 Kai Tietz <ktietz@redhat.com>
8454
8455 PR gdb/15161
8456
8457 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8458 instead of strtoul to extract address from packet.
8459 (process_serial_event) <'z'>: Likewise.
8460
4f3cee1c
YQ
84612013-02-18 Yao Qi <yao@codesourcery.com>
8462
8463 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8464
8e1d55a3
PA
84652013-02-14 Pedro Alves <palves@redhat.com>
8466
8467 Plug memory leak.
8468
8469 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8470 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8471
458820da
PA
84722013-02-14 Pedro Alves <palves@redhat.com>
8473
8474 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8475
baea0dae
PA
84762013-02-14 Pedro Alves <palves@redhat.com>
8477
8478 * tracepoint.c (save_string): Delete.
8479 (add_tracepoint_action): Use savestring instead of save_string.
8480
0b1afbb3
PA
84812013-02-12 Pedro Alves <palves@redhat.com>
8482
8483 * linux-xtensa-low.c: Ditto.
8484 * xtensa-xtregs.c: Ditto.
8485
8a4ac37e
PA
84862013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8487
8488 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8489 thread_db.
8490
148de6bb
MS
84912013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8492
8493 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8494 aarch64_num_wp_regs and aarch64_num_bp_regs to
8495 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8496
55fac6e0
MS
84972013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8498
8499 * linux-aarch64-low.c (ps_get_thread_area): Replace
8500 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8501
176eb98c
MS
85022013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8503 Marcus Shawcroft <marcus.shawcroft@arm.com>
8504 Nigel Stephens <nigel.stephens@arm.com>
8505 Yufeng Zhang <yufeng.zhang@arm.com>
8506
8507 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8508 (aarch64.c, aarch64-without-fpu.c): New targets.
8509 * configure.srv (aarch64*-*-linux*): New.
8510 * linux-aarch64-low.c: New file.
8511
56f7af9c
MS
85122013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8513
43aaf8b6 8514 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8515 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8516 (dequeue_one_deferred_signal, linux_resume_one_thread)
8517 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8518 (linux_tracefork_grandchild, linux_test_for_tracefork)
8519 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8520 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8521 where the argument is 0.
8522
60f662b0
YQ
85232013-01-25 Yao Qi <yao@codesourcery.com>
8524
8525 * event-loop.c: Include "queue.h".
8526 (gdb_event_p): New typedef.
8527 (struct gdb_event) <next_event>: Remove.
8528 (event_queue): Change to QUEUE(gdb_event_p).
8529 (async_queue_event): Remove.
8530 (gdb_event_xfree): New.
8531 (initialize_event_loop): New.
8532 (process_event): Use API from QUEUE.
8533 (wait_for_event): Likewise.
8534 * server.c (main): Call initialize_event_loop.
8535 * server.h (initialize_event_loop): Declare.
8536
5ae4861a
YQ
85372013-01-18 Yao Qi <yao@codesourcery.com>
8538
8539 * ax.h (struct eval_agent_expr_context): New.
8540 (gdb_eval_agent_expr): Update declaration.
8541 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8542 TFRAME. Add new argument CTX.
8543 * server.h (struct eval_agent_expr_context): Declare.
8544 (agent_mem_read, agent_tsv_read): Update declaration.
8545 (agent_mem_read_string): Likewise.
8546 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8547 (add_traceframe_block): Add new argument TPOINT.
8548 Increase TPOINT->traceframe_usage.
8549 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8550 eval_tracepoint_agent_expr.
8551 (condition_true_at_tracepoint): Likewise.
8552 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8553 (agent_mem_read_string, agent_tsv_read): Likewise.
8554
85e00e85
YQ
85552013-01-16 Yao Qi <yao@codesourcery.com>
8556
8557 * linux-low.c (linux_resume_one_lwp): Don't check
8558 'lwp->bp_reinsert != 0'.
8559
4039cf45
JB
85602013-01-07 Joel Brobecker <brobecker@adacore.com>
8561 Pedro Alves <palves@redhat.com>
8562
8563 * lynx-low.c (ptrace_request_to_str): Define a temporary
8564 macro and use it to simplify this function's implementation.
8565
9044dee2
JB
85662013-01-07 Joel Brobecker <brobecker@adacore.com>
8567
8568 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8569 sets errno.
8570
e6352c8f
JB
85712013-01-07 Joel Brobecker <brobecker@adacore.com>
8572
8573 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8574
50681a27
JB
85752013-01-07 Joel Brobecker <brobecker@adacore.com>
8576
8577 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8578
3f6e77ef
JB
85792013-01-07 Joel Brobecker <brobecker@adacore.com>
8580
8581 * lynx-low.c (lynx_resume): Use the resume_info parameter
8582 to determine the ptid for the lynx_ptrace call, unless
8583 it is equal to minus_one_ptid, in which case we use the
8584 ptid of the current_inferior.
8585 (lynx_wait_1): After having received a thread create/exit
8586 event, resume the inferior's execution using the signaling
8587 thread's ptid, rather than the old ptid.
8588
7fda33ae
JB
85892013-01-07 Joel Brobecker <brobecker@adacore.com>
8590
8591 * lynx-low.c (lynx_resume): Delete variable ret.
8592
b9786c74
JB
85932013-01-01 Joel Brobecker <brobecker@adacore.com>
8594
8595 * gdbreplay.c (gdbreplay_version): Update copyright year.
8596 * server.c (gdbserver_version): Likewise.
8597
8b93d60f
JB
85982012-12-17 Joel Brobecker <brobecker@adacore.com>
8599
8600 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8601 new thread.
8602
037335a7
JB
86032012-12-17 Joel Brobecker <brobecker@adacore.com>
8604
8605 * lynx-low.c (ptrace_request_to_str): Add handling for
8606 PTRACE_GETTRACESIG.
8607
52d4cbd8
JB
86082012-12-17 Joel Brobecker <brobecker@adacore.com>
8609
8610 * lynx-low.c (lynx_attach): Delete variable new_process.
8611
ab8f6ca9
JB
86122012-12-17 Joel Brobecker <brobecker@adacore.com>
8613
8614 * lynx-low.c (lynx_create_inferior): Delete variable
8615 new_process.
8616
78cbc024
JB
86172012-12-17 Joel Brobecker <brobecker@adacore.com>
8618
8619 * lynx-low.c (ptrace_request_to_str): Do not handle
8620 PTRACE_GETTHREADLIST if this macro does not exist.
8621
14a00470
YQ
86222012-12-15 Yao Qi <yao@codesourcery.com>
8623
8624 * Makefile.in (OBS): Add notif.o.
8625 * notif.c, notif.h: New.
8626 * server.c: Include "notif.h".
8627 (struct vstop_notif) <next>: Remove.
8628 <base>: New field.
8629 (queue_stop_reply): Update.
8630 (push_event, send_next_stop_reply): Remove.
8631 (discard_queued_stop_replies): Update.
8632 (notif_stop): New variable.
8633 (handle_v_stopped): Remove.
8634 (handle_v_requests): Don't call handle_v_stopped. Call
8635 handle_ack_notif instead.
8636 (queue_stop_reply_callback): Call notif_event_enque instead
8637 of queue_stop_reply.
8638 (handle_status): Don't call send_next_stop_reply, call
8639 notif_write_event instead.
8640 (kill_inferior_callback): Likewise.
8641 (detach_or_kill_inferior_callback): Likewise.
8642 (main): Call initialize_notif.
8643 (process_serial_event): Call QUEUE_is_empty.
8644 (handle_target_event): Call notif_push instead of push event.
8645 * server.h (push_event): Remove declaration.
8646
61c125b9
TT
86472012-12-10 Tom Tromey <tromey@redhat.com>
8648
8649 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8650 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8651 macros.
8652 (.c.o): Rewrite.
8653 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8654 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8655 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8656 (amd64-linux-ipa.o, ax.o): Rewrite.
8657 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8658 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8659 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8660 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8661 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8662 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8663 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8664 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8665 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8666 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8667 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8668 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8669 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8670 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8671 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8672 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8673 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8674 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8675 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8676 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8677 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8678 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8679 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8680 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8681 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8682 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8683 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8684 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8685 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8686 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8687 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8688 (reg-tilegx.o): Remove.
8689 (all_object_files): New macro.
8690 Include .deps files.
8691 * aclocal.m4, configure: Rebuild.
8692 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8693 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8694 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8695
e90e9ad9
TT
86962012-12-05 Tom Tromey <tromey@redhat.com>
8697
8698 PR gdb/14917:
8699 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8700
02d403bf 87012012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8702
8703 * configure.ac: Check for linux/perf_event.h.
8704 * config.in: Regenerated.
8705 * configure: Regenerated.
8706
0270a750
PA
87072012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8708
8709 * hostio.c (handle_readlink): Decrease buffer size
8710 parameter passed to readlink by one byte.
8711
8c29b58e
YQ
87122012-11-26 Yao Qi <yao@codesourcery.com>
8713
8714 * configure.ac (build_warnings): Append '-Wempty-body'.
8715 * configure: Regenerated.
8716 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8717 body.
8718
8bdce1ff
PM
87192012-11-15 Pierre Muller <muller@sourceware.org>
8720
8721 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8722 * config.in: Regenerate.
8723 * configure: Regenerate.
8724 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8725 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8726 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8727 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8728 header.
8729 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8730 instead of <sys/wait.h> header.
8731 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8732
02d403bf 87332012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8734
8735 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8736 (various make rules): Remove -DGDBSERVER
8737
fbd5db48
YQ
87382012-11-09 Yao Qi <yao@codesourcery.com>
8739
8740 * spu-low.c (current_ptid): Move it to ..
8741 * gdbthread.h: ... here. New.
8742 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8743 * server.c (myresume, process_serial_event): Likewise.
8744 * thread-db.c (thread_db_find_new_threads): Likewise.
8745 * tracepoint.c (run_inferior_command): Likewise.
8746
b3dc46ff
AB
87472012-10-01 Andrew Burgess <aburgess@broadcom.com>
8748
8749 * server.c (handle_search_memory_1): Include access length in
8750 warning message.
8751
07c04788
HPN
87522012-09-05 Michael Brandt <michael.brandt@axis.com>
8753
8754 * linux-crisv32-low.c: Fix compile errors.
8755
918d227b
YQ
87562012-09-04 Yao Qi <yao@codesourcery.com>
8757
8758 * tracepoint.c (cmd_qtsv): Adjust debug message.
8759 Don't check CUR_TPOINT.
8760
18c1b81a
YQ
87612012-08-28 Yao Qi <yao@codesourcery.com>
8762
8763 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8764 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8765 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8766 Remove declarations of xmalloc, xreallloc, xstrdup and
8767 freeargv.
8768 * Makefile.in (libiberty_h): New.
8769 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8770 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8771
dc82f37b
YQ
87722012-08-23 Yao Qi <yao@codesourcery.com>
8773
8774 * server.h: Remove declaration of 'xsnprintf'.
8775
406b1477
KS
87762012-08-22 Keith Seitz <keiths@redhat.com>
8777
8778 * server.h: Include build-gnulib-gbserver/config.h.
8779 * gdbreplay.c: Likewise.
8780
e6712ff1
DE
87812012-08-08 Doug Evans <dje@google.com>
8782
8783 * Makefile.in (SFILES): Add gdb_vecs.c.
8784 (OBS): Add gdb_vecs.o.
8785 (gdb_vecs_h, host_defs_h): New variables.
8786 (thread-db.o): Add $(gdb_vecs_h) dependency.
8787 (gdb_vecs.o): New rule.
8788 * thread-db.c: #include "gdb_vecs.h".
8789 (thread_db_load_search): Use a vector to iterate over path elements.
8790 Handle text appearing after "$pdir".
8791
8792 * configure.ac: Add check for strstr.
8793 * config.in: Regenerate.
8794 * configure: Regenerate.
8795
7c3270ae
UW
87962012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8797
8798 * hostio.c (handle_pread): If pread fails, fall back to attempting
8799 lseek/read.
8800 (handle_pwrite): Likewise for pwrite.
8801
b62e2b27
UW
88022012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8803
8804 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8805 between unsupported TYPE and unimplementable ADDR/LEN combination.
8806 (arm_insert_point): Act on new return value.
8807
78a99e91
PA
88082012-07-31 Pedro Alves <palves@redhat.com>
8809
8810 * server.c (process_point_options): Only skip tokens if we find
8811 one that is unrecognized. Don't treat 'X' specially while
8812 skipping unrecognized tokens.
8813
fcf303ab
UW
88142012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8815
8816 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8817 to 4-byte-align HW breakpoint addresses for Thumb.
8818
7255706c
YQ
88192012-07-27 Yao Qi <yao@codesourcery.com>
8820
8821 PR remote/14161.
8822
8823 * server.h: Declare gdb_agent_about_to_close.
8824 * target.c (kill_inferior): Include "agent.h".
8825 New. Send command 'kill'.
8826 * target.h (kill_inferior): Removed macro.
8827 * tracepoint.c (gdb_agent_about_to_close): New.
8828 (gdb_agent_helper_thread): Handle command 'close'.
8829 Wait endlessly until the inferior stops.
8830 Install gdb_agent_remove_socket to atexit hook.
8831 (agent_socket_name): New static variable.
8832 (gdb_agent_socket_init): Replace local variable 'name' with
8833 'agent_socket_name'.
8834 (gdb_agent_remove_socket): New.
8835
5a3f286f
YQ
88362012-07-27 Yao Qi <yao@codesourcery.com>
8837
8838 * server.c (process_point_options): Stop at 'X' when parsing.
8839
961bd387
ME
88402012-07-19 Michael Eager <eager@eagercon.com>
8841
a261b8f5 8842 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8843 to hw_execute.
8844 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8845 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8846 hardware breakpoint.
8847
aa7c7447
JK
88482012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8849
8850 * gdbserver/linux-low.c (initialize_low): Call
8851 linux_ptrace_init_warnings.
8852
7f216e7c
DE
88532012-07-02 Doug Evans <dje@google.com>
8854
8855 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8856 pointer to int.
8857
d3ce09f5
SS
88582012-07-02 Stan Shebs <stan@codesourcery.com>
8859
8860 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8861 (ax.o): Add it to build rule.
8862 (ax-ipa.o): Ditto.
8863 (OBS): Add format.o.
8864 (IPA_OBS): Add format.o.
8865 * server.c (handle_query): Claim support for breakpoint commands.
8866 (process_point_options): Add command case.
8867 (process_serial_event): Leave running if there are printfs in
8868 effect.
8869 * mem-break.h (any_persistent_commands): Declare.
8870 (add_breakpoint_commands): Declare.
8871 (gdb_no_commands_at_breakpoint): Declare.
8872 (run_breakpoint_commands): Declare.
8873 * mem-break.c (struct point_command_list): New struct.
8874 (struct breakpoint): New field command_list.
8875 (any_persistent_commands): New function.
8876 (add_commands_to_breakpoint): New function.
8877 (add_breakpoint_commands): New function.
8878 (gdb_no_commands_at_breakpoint): New function.
8879 (run_breakpoint_commands): New function.
8880 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8881 locally.
8882 * ax.c: Include format.h.
8883 (ax_printf): New function.
8884 (gdb_eval_agent_expr): Add printf opcode.
8885
2f8f6aed
YQ
88862012-06-13 Yao Qi <yao@codesourcery.com>
8887
8888 * server.c (start_inferior): Remove duplicated writes to fields
8889 'last_resume_kind' and 'last_status' of 'current_inferior'.
8890
0c9070b3
YQ
88912012-06-12 Yao Qi <yao@codesourcery.com>
8892 Pedro Alves <palves@redhat.com>
8893
8894 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8895 comment.
8896 * server.c (handle_v_cont): Extend comment.
8897
c52daf70
YQ
88982012-06-11 Yao Qi <yao@codesourcery.com>
8899
8900 * linux-low.c (linux_attach): Add 'static'.
8901
d38bbb0a
YQ
89022012-06-06 Yao Qi <yao@codesourcery.com>
8903
8904 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8905
89dc0afd
JK
89062012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8907
8908 Fix gcc -flto compilation warning.
8909 * server.c (main): Make variable multi_mode and attach volatile.
8910
75f62ce7
TJB
89112012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8912
8913 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8914 if the platform doesn't know about it.
8915
65f479b6
PA
89162012-05-30 Jeff Kenton <jkenton@tilera.com>
8917
8918 * Makefile.in (SFILES): Add linux-tile-low.c.
8919 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8920 * configure.srv: Handle tilegx-*-linux*.
8921 * linux-tile-low.c: New file.
8922
0c5bf5a9
JK
89232012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8924
8925 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8926
a493e3e2
PA
89272012-05-24 Pedro Alves <palves@redhat.com>
8928
8929 PR gdb/7205
8930
43aaf8b6 8931 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8932
2ea28649
PA
89332012-05-24 Pedro Alves <palves@redhat.com>
8934
8935 PR gdb/7205
8936
8937 Replace target_signal with gdb_signal throughout.
8938
8d409d16
MR
89392012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8940
8941 * linux-low.c (linux_store_registers): Avoid the copying sequence
8942 when no data has been retrieved by ptrace.
8943
23512c01
MGD
89442012-05-22 Will Deacon <will.deacon@arm.com>
8945
8946 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8947 Include asm/ptrace.h.
8948 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8949 already defined.
8950
4934b29e
MR
89512012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8952
8953 * linux-low.c (linux_store_registers): Don't re-retrieve data
8954 with ptrace that has already been obtained from /proc. Always
8955 copy any data retrieved with ptrace to the buffer supplied.
8956
bde24c0a
PA
89572012-05-11 Yao Qi <yao@codesourcery.com>
8958 Pedro Alves <palves@redhat.com>
8959
8960 * linux-low.c (enum stopping_threads_kind): New.
8961 (stopping_threads): Change type to `enum stopping_threads_kind'.
8962 (handle_extended_wait): If stopping and suspending threads, leave
8963 the new_lwp suspended too.
8964 (linux_wait_for_event): Adjust.
8965 (stop_all_lwps): Set `stopping_threads' to
8966 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8967 whether we're suspending threads or just stopping them. Assert no
8968 recursion happens.
8969
623b6bdf
YQ
89702012-04-29 Yao Qi <yao@codesourcery.com>
8971
8972 * server.h: Move some code to ...
8973 * gdbthread.h: ... here. New.
8974 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8975 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8976 (nto-low.o, win32-low.o): Likewise.
8977 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8978 * regcache.c, remote-utils.c, server.c: Likewise.
8979 * target.c, tracepoint.c, win32-low.c: Likewise.
8980
f15f9948
TJB
89812012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8982
8983 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8984 (PTRACE_ARG4_TYPE): Likewise.
8985 (PTRACE_XFER_TYPE): Likewise.
8986 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8987 ptrace to PTRACE_ARG3_TYPE.
8988 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8989 (PTRACE_ARG4_TYPE): Likewise.
8990 (PTRACE_XFER_TYPE): Likewise.
8991 (linux_detach_one_lwp): Cast fourth argument of
8992 ptrace to long then PTRACE_ARG4_TYPE.
8993 (regsets_fetch_inferior_registers): Cast third argument of
8994 ptrace to long then PTRACE_ARG3_TYPE.
8995 (regsets_store_inferior_registers): Likewise.
8996
38ea300a
PA
89972012-04-20 Pedro Alves <palves@redhat.com>
8998
8999 * configure: Regenerate.
9000
c971b7fa
PA
90012012-04-19 Pedro Alves <palves@redhat.com>
9002
43aaf8b6 9003 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9004 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9005 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9006 (all, install-only, uninstall, clean-info, all-lib, clean): No
9007 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9008 (maintainer-clean realclean distclean): Use subdir_do.
9009 (subdir_do): New.
9010 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9011 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9012 * acinclude.m4: Include acx_configure_dir.m4.
9013 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9014 calls. Call AC_PROG_RANLIB. Configure gnulib using
9015 ACX_CONFIGURE_DIR.
9016 (GNULIB): New.
9017 (GNULIB_STDINT_H): Adjust.
9018 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9019 * gdbreplay.c: Include build-gnulib/config.h.
9020 * server.h: Likewise.
9021 * aclocal.m4: Regenerate.
9022 * config.in: Regenerate.
9023 * configure: Regenerate.
c971b7fa 9024
809277f8
PA
90252012-04-19 Pedro Alves <palves@redhat.com>
9026
9027 * Makefile.in (LIBGNU, INCGNU): Adjust.
9028 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9029 (all, install-only, uninstall, clean-info, all-lib, clean)
9030 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9031 * configure.ac: Adjust AC_OUTPUT output.
9032 * aclocal.m4: Regenerate.
9033 * configure: Regenerate.
9034
fd9bb8b8
PA
90352012-04-19 Pedro Alves <palves@redhat.com>
9036
9037 * Makefile.in (generated_files): New.
9038 (server_h): Remove the explicit dependency on config.h, and depend
9039 on $generated_files.
9040
1c298c66
PA
90412012-04-19 Pedro Alves <palves@redhat.com>
9042
9043 * Makefile.in (INCGNU): Add -Ignulib.
9044
57c4b50b
PA
90452012-04-19 Pedro Alves <palves@redhat.com>
9046
9047 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9048 (INCGNU): ... this, and spell out -I here.
9049 (GNULIB_LIB): Rename to ...
9050 (LIBGNU): ... this.
9051 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9052
1030e047
PA
90532012-04-19 Pedro Alves <palves@redhat.com>
9054
9055 * config.in: Regenerate.
9056
447d4319
PA
90572012-04-19 Pedro Alves <palves@redhat.com>
9058
9059 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9060 * server.h (memmem): Remove declaration.
9061 * config.in: Regenerate.
9062 * configure: Regenerate.
9063
aad9eab9
YQ
90642012-04-19 Yao Qi <yao@codesourcery.com>
9065
9066 * Makefile.in (SFILES): Add common/vec.c.
9067 (OBS): Add vec.o.
9068 (vec.o): New rule.
9069
3e10640f
YQ
90702012-04-19 Yao Qi <yao@codesourcery.com>
9071
9072 * remote-utils.c (prepare_resume_reply): Replace with macro
9073 target_core_of_thread.
9074 * server.c (handle_qxfer_threads_proper): Likewise.
9075 * target.h (traget_core_of_thread): New macro.
9076
71622373
PA
90772012-04-18 Pedro Alves <palves@redhat.com>
9078
9079 * aclocal.m4: Regenerate.
9080 * configure: Regenerate.
9081
80d26939
YQ
90822012-04-16 Yao Qi <yao@codesourcery.com>
9083
9084 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9085 duplicated on address.
9086
42476b70
YQ
90872012-04-16 Yao Qi <yao@codesourcery.com>
9088
9089 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9090 (struct tracepoint_action_ops) <send>: New field.
9091 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9092 (agent_expr_send, x_tracepoint_action_send): New.
9093 (l_tracepoint_action_send): New.
9094 (cmd_qtdp): Download and install tracepoint
9095 according to `use_agent'.
9096 (run_inferior_command): Add one more parameter `len'.
9097 Update callers.
9098 (tracepoint_send_agent): New.
9099 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9100
7bc83639
YQ
91012012-04-16 Yao Qi <yao@codesourcery.com>
9102
9103 * tracepoint.c (download_tracepoints): Moved to ...
9104 (cmd_qtstart): ... here.
9105
5f18041e
YQ
91062012-04-14 Yao Qi <yao@codesourcery.com>
9107
9108 * tracepoint.c: Include inttypes.h.
9109 (struct collect_memory_action): Use sized types.
9110 (struct tracepoint): Likewise.
9111 (cmd_qtdp, stop_tracing): Update print specifiers.
9112 (cmd_qtp, response_tracepoint): Likewise.
9113 (collect_data_at_tracepoint): Likewise.
9114 (collect_data_at_step): Likewise.
9115
55a8c076
YQ
91162012-04-14 Yao Qi <yao@codesourcery.com>
9117
9118 Import gnulib module inttypes.
9119 * aclocal.m4, config.in, configure: Regenerated.
9120
dc750257
YQ
91212012-04-14 Yao Qi <yao@codesourcery.com>
9122
9123 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9124 Makefile and config.status at last.
9125
0ab5faf9
YQ
91262012-04-13 Yao Qi <yao@codesourcery.com>
9127
9128 * tracepoint.c: Include stdint.h unconditionally.
9129
18f5fd81
TJB
91302012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9131
9132 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9133 on BFD_HAVE_SYS_PROCFS_TYPE.
9134 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9135 * configure: Regenerate.
9136 * config.in: Likewise.
9137
4d47af5c
L
91382012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9139
9140 * Makefile.in (clean): Also remove x32.c x32-linux.c
9141 x32-avx.c x32-avx-linux.c.
9142 (x32.o): New target.
9143 (x32.c): Likewise.
9144 (x32-linux.o): Likewise.
9145 (x32-linux.c): Likewise.
9146 (x32-avx.o): Likewise.
9147 (x32-avx.c): Likewise.
9148 (x32-avx-linux.o): Likewise.
9149 (x32-avx-linux.c): Likewise.
9150
9151 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9152 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9153 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9154 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9155 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9156 i386/x32-avx-linux.xml.
9157
9158 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9159 (init_registers_x32_avx_linux): Likwise.
9160 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9161 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9162
ecedbe58
PA
91632012-04-13 Pedro Alves <palves@redhat.com>
9164
9165 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9166 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9167 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9168 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9169 the sub-make.
9170
c92b5177
L
91712012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9172
9173 * linux-x86-low.c (compat_x32_clock_t): New.
9174 (compat_x32_siginfo_t): Likewise.
9175 (compat_x32_siginfo_from_siginfo): Likewise.
9176 (siginfo_from_compat_x32_siginfo): Likewise.
9177 (linux_is_elf64): Likewise.
9178 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9179 and siginfo_from_compat_x32_siginfo for x32.
9180 (x86_arch_setup): Set linux_is_elf64.
9181
214d508e
L
91822012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9183
9184 PR gdb/13969
9185 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9186 e_machine field.
9187 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9188 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9189 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9190 compatible with process.
9191
c9a1864a
YQ
91922012-04-12 Yao Qi <yao@codesourcery.com>
9193
9194 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9195 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9196 (install-only, install-info, clean): Handle sub dir gnulib.
9197 (all-lib, am--refresh): New targets.
9198 (memmem.o): Remove target.
9199 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9200 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9201 (AC_REPLACE_FUNCS): Remove memmem.
9202 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9203 (AC_OUTPUT): Generate Makefile in gnulib/.
9204 * aclocal.m4, config.in, configure: Regenerated.
9205
367ba2c2
MR
92062012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9207
9208 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9209
9d236627
PA
92102012-04-05 Pedro Alves <palves@redhat.com>
9211
9212 -Werror=strict-aliasing
9213
9214 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9215 pointer.
9216
111217b3
PA
92172012-04-04 Pedro Alves <palves@redhat.com>
9218
9219 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9220 (sparc_store_gregset_from_stack, sparc_store_gregset)
9221 (sparc_breakpoint_at): Fix formatting.
9222
8365dcf5
TJB
92232012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9224
9225 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9226 are available.
9227 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9228 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9229 * config.in: Regenerate.
9230 * configure: Likewise.
9231
689cc2ae
PA
92322012-03-29 Pedro Alves <palves@redhat.com>
9233
9234 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9235 Correct ptrace arguments.
9236
c14dfd32
PA
92372012-03-28 Pedro Alves <palves@redhat.com>
9238
9239 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9240 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9241 (IA64_FR1_REGNUM): New defines.
9242 (ia64_fetch_register): New.
9243 (the_low_target): Install it.
9244 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9245 field.
9246 * linux-low.c (linux_fetch_registers): Try the
9247 the_low_target.fetch_register hook first.
9248
9249 * linux-arm-low.c (the_low_target): Adjust.
9250 * linux-bfin-low.c (the_low_target): Adjust.
9251 * linux-cris-low.c (the_low_target): Adjust.
9252 * linux-crisv32-low.c (the_low_target): Adjust.
9253 * linux-m32r-low.c (the_low_target): Adjust.
9254 * linux-m68k-low.c (the_low_target): Adjust.
9255 * linux-mips-low.c (the_low_target): Adjust.
9256 * linux-ppc-low.c (the_low_target): Adjust.
9257 * linux-s390-low.c (the_low_target): Adjust.
9258 * linux-sh-low.c (the_low_target): Adjust.
9259 * linux-sparc-low.c (the_low_target): Adjust.
9260 * linux-tic6x-low.c (the_low_target): Adjust.
9261 * linux-x86-low.c (the_low_target): Adjust.
9262 * linux-xtensa-low.c (the_low_target): Adjust.
9263
63c88e13
PA
92642012-03-26 Pedro Alves <palves@redhat.com>
9265
9266 * server.c (handle_qxfer_libraries): Don't bail early if
9267 the_target->qxfer_libraries_svr4 is not NULL.
9268
fb723180
PA
92692012-03-26 Pedro Alves <palves@redhat.com>
9270
9271 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9272
0afae3cf
PA
92732012-03-23 Pedro Alves <palves@redhat.com>
9274
9275 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9276 "library-list-svr4" element's start tag when the the DSO list is
9277 empty.
9278
485f1ee4
PA
92792012-03-23 Pedro Alves <palves@redhat.com>
9280
9281 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9282 a variable whose type size is the same as the inferior's pointer
9283 size.
9284
a5362b9a
TS
92852012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9286
9287 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9288 struct siginfo.
9289 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9290 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9291 * linux-low.h: Include <signal.h>.
9292 (struct siginfo): Remove forward declaration.
9293 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9294 struct siginfo.
9295
d226c142
MF
92962012-03-21 Mike Frysinger <vapier@gentoo.org>
9297
9298 * .gitignore: Ignore more files.
9299
122f36ef
PA
93002012-03-19 Pedro Alves <palves@redhat.com>
9301 Jan Kratochvil <jan.kratochvil@redhat.com>
9302
9303 * server.c (cont_thread, general_thread): Add describing comments.
9304 (start_inferior): Clear `cont_thread'.
9305 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9306 of a process.
9307
fc3e5175
YQ
93082012-03-15 Yao Qi <yao@codesourcery.com>
9309
9310 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9311 handling to ...
9312 (cmd_qtdp): ... here.
9313
8d0d92cd
YQ
93142012-03-15 Yao Qi <yao@codesourcery.com>
9315
9316 * tracepoint.c (struct tracepoint_action_ops): New.
9317 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9318 (m_tracepoint_action_download): New.
9319 (r_tracepoint_action_download): New.
9320 (x_tracepoint_action_download): New.
9321 (l_tracepoint_action_download): New.
9322 (add_tracepoint_action): Install `action->ops' according type.
9323 (download_tracepoint_1): Move code `download' function pointer
9324 of various tracepoint_action_ops.
9325
87b0bb13
JK
93262012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9327
9328 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9329 linux_ptrace_attach_warnings.
9330
5f572dec
JK
93312012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9332
9333 * Makefile.in (linux-ptrace.o): New.
9334 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9335 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9336 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9337 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9338 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9339 of these targets.
9340 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9341
f4647387
YQ
93422012-03-08 Yao Qi <yao@codesourcery.com>
9343 Pedro Alves <palves@redhat.com>
9344
9345 Fix PR server/13392.
9346 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9347 offset of JMP insn.
9348 * tracepoint.c (remove_tracepoint): New.
9349 (cmd_qtdp): Call remove_tracepoint when failed to install.
9350
9b224c5e
PA
93512012-03-07 Pedro Alves <palves@redhat.com>
9352
9353 * linux-low.c (get_detach_signal): New.
9354 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9355 Pass on pending signals to PTRACE_DETACH. Check the result of the
9356 ptrace call.
9357 * server.c (program_signals, program_signals_p): New.
9358 (handle_general_set): Handle QProgramSignals.
9359 * server.h (program_signals, program_signals_p): Declare.
9360
e237a7e2
JK
93612012-03-05 Pedro Alves <palves@redhat.com>
9362 Jan Kratochvil <jan.kratochvil@redhat.com>
9363
9364 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9365 New comment why.
9366
5808517f
YQ
93672012-03-03 Yao Qi <yao@codesourcery.com>
9368
9369 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9370 agent_look_up_symbols.
9371
58b4daa5
YQ
93722012-03-03 Yao Qi <yao@codesourcery.com>
9373
9374 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9375 (linux-x86-low.o): Likewise.
9376 * server.h: Remove in_process_agent_loaded.
9377 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9378 common/agent.c.
9379 Update callers.
9380
8ffcbaaf
YQ
93812012-03-03 Yao Qi <yao@codesourcery.com>
9382
9383 * tracepoint.c (gdb_agent_capability): New global.
9384 (in_process_agent_loaded_ust): Renamed to
9385 `in_process_agent_supports_ust'.
9386 Update callers.
9387 (in_process_agent_supports_ust): Call agent_capability_check.
9388 (clear_installed_tracepoints): Assert that agent supports
9389 agent.
9390
d1feda86
YQ
93912012-03-03 Yao Qi <yao@codesourcery.com>
9392
9393 * linux-low.c (linux_supports_agent): New.
9394 (linux_target_ops): Initialize field `supports_agent' with
9395 linux_supports_agent.
9396 * target.h (struct target_ops) <supports_agent>: New.
9397 (target_supports_agent): New macro.
9398 * server.c (handle_general_set): Handle packet 'QAgent'.
9399 (handle_query): Send `QAgent+'.
9400 * Makefile.in (server.o): Depends on agent.h.
9401
2fa291ac
YQ
94022012-03-03 Yao Qi <yao@codesourcery.com>
9403
9404 * Makefile.in (OBS): Add agent.o.
9405 Add new rule for agent.o.
9406 Track dependence of tracepoint.c on agent.h.
9407 * tracepoint.c (run_inferior_command_1):
9408 (run_inferior_command): Call agent_run_command.
9409 (gdb_ust_connect_sync_socket): Deleted. Move it to
9410 common/agent.c.
9411 (resume_thread, stop_thread): Likewise.
9412 (gdb_ust_socket_init): Renamed to ...
9413 (gdb_agent_socket_init): ... New.
9414 (gdb_ust_thread): Renamed to ...
9415 (gdb_agent_helper_thread): ... New.
9416 (gdb_ust_init): Move some code to ...
9417 (gdb_agent_init): ... here. New.
9418 [HAVE_UST]: Call gdb_ust_init.
9419 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9420 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9421 * config.in, configure: Regenerated.
9422
05044653
PA
94232012-03-02 Pedro Alves <palves@redhat.com>
9424
9425 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9426 * linux-low.c (struct simple_pid_list): New.
9427 (stopped_pids): New a struct simple_pid_list pointer.
9428 (add_to_pid_list, pull_pid_from_list): New.
9429 (handle_extended_wait): Don't assume the first signal new children
9430 report is SIGSTOP. Adjust call to pull_pid_from_list.
9431 (linux_wait_for_lwp): Adjust.
9432
8d00225b
YQ
94332012-03-02 Yao Qi <yao@codesourcery.com>
9434
9435 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9436 debug log.
9437
19560ba5
YQ
94382012-03-02 Yao Qi <yao@codesourcery.com>
9439
9440 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9441 `stop_pc' and `tpoint'. Update caller.
9442
1faeff08
MR
94432012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9444
9445 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9446 * linux-low.c (use_linux_regsets): New macro.
9447 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9448 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9449 (linux_register_in_regsets): New function.
9450 (usr_fetch_inferior_registers): Skip registers covered by
9451 regsets.
9452 (usr_store_inferior_registers): Likewise.
9453 (usr_fetch_inferior_registers): New macro.
9454 (usr_store_inferior_registers): Likewise.
9455 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9456 (linux_store_registers): Likewise.
9457 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9458 prototype.
9459 (init_registers_mips64_dsp_linux): Likewise.
9460 (init_registers_mips_linux): New macro.
9461 (init_registers_mips_dsp_linux): Likewise.
9462 (mips_dsp_num_regs): Likewise.
9463 (DSP_BASE, DSP_CONTROL): New fallback macros.
9464 (mips_base_regs): New macro.
9465 (mips_regmap): Use it. Fix the size.
9466 (mips_dsp_regmap): New variable.
9467 (mips_dsp_regset_bitmap): Likewise.
9468 (mips_arch_setup): New function.
9469 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9470 than mips_regmap.
9471 (mips_cannot_store_register): Likewise.
9472 (the_low_target): Update .arch_setup, .num_regs and .regmap
9473 initializers. Add .regset_bitmap initializer.
9474 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9475 initializer.
9476 * linux-bfin-low.c (the_low_target): Likewise.
9477 * linux-cris-low.c (the_low_target): Likewise.
9478 * linux-crisv32-low.c (the_low_target): Likewise.
9479 * linux-ia64-low.c (the_low_target): Likewise.
9480 * linux-m32r-low.c (the_low_target): Likewise.
9481 * linux-m68k-low.c (the_low_target): Likewise.
9482 * linux-ppc-low.c (the_low_target): Likewise.
9483 * linux-s390-low.c (the_low_target): Likewise.
9484 * linux-sh-low.c (the_low_target): Likewise.
9485 * linux-sparc-low.c (the_low_target): Likewise.
9486 * linux-tic6x-low.c (the_low_target): Likewise.
9487 * linux-x86-low.c (the_low_target): Likewise.
9488 * linux-xtensa-low.c (the_low_target): Likewise.
9489 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9490 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9491 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9492 srv_xmlfiles.
9493 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9494 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9495
c03e6ccc
YQ
94962012-02-29 Yao Qi <yao@codesourcery.com>
9497 Pedro Alves <palves@redhat.com>
9498
9499 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9500 `step_over_finished' is true.
9501
644cebc9
PA
95022012-02-27 Pedro Alves <palves@redhat.com>
9503
9504 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9505 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9506
c14d7ab2
PA
95072012-02-27 Pedro Alves <palves@redhat.com>
9508
9509 PR server/9684
9510 * linux-low.c (pid_is_stopped): New.
9511 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9512
412c89dd
LM
95132012-02-25 Luis Machado <lgustavo@codesourcery.com>
9514
9515 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9516 of conditions.
9517
b745defe
MR
95182012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9519
9520 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9521
9f3a5c85
LM
95222012-02-24 Luis Machado <lgustavo@codesourcery>
9523
9524 * server.c (handle_query): Advertise support for target-side
9525 breakpoint condition evaluation.
9526 (process_point_options): New function.
9527 (process_serial_event): When inserting a breakpoint, check for
9528 a target-side condition that should be evaluated.
9529
9530 * mem-break.c: Include regcache.h and ax.h.
9531 (point_cond_list_t): New data structure.
9532 (breakpoint) <cond_list>: New field.
9533 (find_gdb_breakpoint_at): Make non-static.
9534 (delete_gdb_breakpoint_at): Clear any target-side
9535 conditions.
9536 (clear_gdb_breakpoint_conditions): New function.
9537 (add_condition_to_breakpoint): Likewise.
9538 (add_breakpoint_condition): Likewise.
9539 (gdb_condition_true_at_breakpoint): Likewise.
9540 (gdb_breakpoint_here): Return result directly instead
9541 of going through a local variable.
9542
9543 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9544 (clear_gdb_breakpoint_conditions): Likewise.
9545 (add_breakpoint_condition): Likewise.
9546 (gdb_condition_true_at_breakpoint): Likewise.
9547
9548 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9549 (need_step_over_p): Take target-side breakpoint condition into
9550 consideration.
9551
5e1dc496
LM
95522012-02-24 Luis Machado <lgustavo@codesourcery>
9553
9554 * server.h: Include tracepoint.h.
9555 (agent_mem_read, agent_get_trace_state_variable_value,
9556 agent_set_trace_state_variable_value,
9557 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9558 get_set_tsv_func_addr): New prototypes.
9559
9560 * ax.h: New include file.
9561 * ax.c: New source file.
9562
9563 * tracepoint.c: Include ax.h.
9564 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9565 agent_expr, eval_result_type): Move to ax.h.
9566 (parse_agent_expr): Rename to ...
9567 (gdb_parse_agent_expr): ... this, make it non-static and move
9568 to ax.h.
9569 (unparse_agent_expr) Rename to ...
9570 (gdb_unparse_agent_expr): ... this, make it non-static and move
9571 to ax.h.
9572 (eval_agent_expr): Rename to ...
9573 (eval_tracepoint_agent_expr): ... this.
9574 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9575 forward declarations.
9576 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9577 (agent_get_trace_state_variable_value): New function.
9578 (agent_set_trace_state_variable_value): New function.
9579 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9580 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9581 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9582 (condition_true_at_tracepoint): Likewise.
9583 (parse_agent_expr): Rename to ...
9584 (gdb_parse_agent_expr): ... this and move to ax.c.
9585 (unparse_agent_expr): Rename to ...
9586 (gdb_unparse_agent_expr): ... this and move to ax.c.
9587 (gdb_agent_op_name): Move to ax.c.
9588 (eval_agent_expr): Rename to ...
9589 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9590 and move to ax.c.
9591 (eval_tracepoint_agent_expr): New function.
9592 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9593 non-static.
5e1dc496
LM
9594 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9595 ax.c.
9596 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9597 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9598 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9599 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9600 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9601 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9602 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9603 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9604 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9605 (compile_bytecodes): Remove forward declaration.
9606 (is_goto_target): Move to ax.c.
9607 (compile_bytecodes): Move to ax.c and call
9608 agent_get_trace_state_variable_value (...) and
9609 agent_set_trace_state_variable_value (...).
9610
9611 * Makefile.in: Update ax.c and IPA dependencies.
9612
277e4e52
PA
96132012-02-24 Pedro Alves <palves@redhat.com>
9614
9615 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9616 (cmd_bigqtbuffer_circular): ... this. Only handle
9617 'QTBuffer:circular:'.
9618 (handle_tracepoint_general_set): Adjust.
9619
bf4c19f7
YQ
96202012-02-16 Yao Qi <yao@codesourcery.com>
9621
9622 * inferiors.c: Move code to ...
9623 * dll.c: .... here. New.
9624 * server.h: Declare clear_dlls.
9625 * Makefile.in (SFILES): Add dll.c.
9626 (OBS): Add dll.o
9627 (dll.o): New rule.
9628
d73f2619
YQ
96292012-02-11 Yao Qi <yao@codesourcery.com>
9630
9631 * server.c: (handle_monitor_command): Add a new parameter
9632 `own_buf'.
9633 (handle_query): Update caller.
9634
f8255c2a
JB
96352012-02-09 Joel Brobecker <brobecker@adacore.com>
9636
9637 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9638 * configure, config.in: Regenerate.
9639 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9640 is not defined.
9641
da84f473
PA
96422012-02-02 Pedro Alves <palves@redhat.com>
9643
9644 Try SIGKILL first, then PTRACE_KILL.
9645 * linux-low.c (linux_kill_one_lwp): New.
9646 (linux_kill_one_lwp): Rename to ...
9647 (kill_one_lwp_callback): ... this. Use the new
9648 linux_kill_one_lwp.
9649
e886a173
PA
96502012-02-02 Pedro Alves <palves@redhat.com>
9651
9652 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9653 inferior.
9654
be07f1a2
PA
96552012-01-27 Pedro Alves <palves@redhat.com>
9656
9657 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9658 (elf_64_file_p): Make static.
9659 (linux_pid_exe_is_elf_64_file): New.
9660 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9661 Delete declarations.
9662 (linux_pid_exe_is_elf_64_file): Declare.
9663 * linux-x86-low.c (x86_arch_setup): Use
9664 linux_pid_exe_is_elf_64_file.
9665
d8301ad1
JK
96662012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9667
9668 * linux-low.c (linux_wait_for_event_1): Rename to ...
9669 (linux_wait_for_event): ... here and merge it with former
9670 linux_wait_for_event - new variable wait_ptid, use it.
9671 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9672
01b17894
PA
96732012-01-23 Pedro Alves <palves@redhat.com>
9674
9675 * server.c (main): Avoid yet another case of infinite loop while
9676 detaching/killing after a longjmp.
9677
e825046f
JK
96782012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9679
9680 Code cleanup.
9681 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9682
b9e7b9c3
UW
96832012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9684
9685 * hostio.c (handle_readlink): New function.
9686 (handle_vFile): Call it to handle "vFile:readlink" packets.
9687
901f9912
UW
96882012-01-20 Pedro Alves <palves@redhat.com>
9689 Ulrich Weigand <ulrich.weigand@linaro.org>
9690
9691 * server.c (handle_v_requests): Only support vAttach and vRun to
9692 start multiple processes when in extended protocol mode.
9693
fc1ab1a0
PA
96942012-01-17 Pedro Alves <palves@redhat.com>
9695
9696 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9697 memalign plus mprotect to allocate the scratch buffer.
9698
7d5d4e98
PA
96992012-01-13 Pedro Alves <palves@redhat.com>
9700
9701 * server.c (attach_inferior): Clear `cont_thread'.
9702
f128d5e9
PA
97032012-01-13 Pedro Alves <palves@redhat.com>
9704
9705 * server.c (main): Avoid infinite loop while detaching/killing
9706 after a longjmp.
9707
06db92f0
DE
97082012-01-09 Doug Evans <dje@google.com>
9709
9710 * server.c (start_inferior): Set last_ptid in --wrapper case.
9711
32d92999
YQ
97122012-01-06 Yao Qi <yao@codesourcery.com>
9713
9714 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9715 defined.
9716 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9717
5e0a92a9
YQ
97182012-01-04 Yao Qi <yao@codesourcery.com>
9719
9720 * tracepoint.c (cmd_qtdp): Print debug message
9721 for static tracepoint.
9722
ae639e8c
YQ
97232012-01-04 Yao Qi <yao@codesourcery.com>
9724
9725 * tracepoint.c (trace_vdebug): Differentiate debug message
9726 between gdbserver and IPA.
9727
f72429c5
YQ
97282012-01-03 Yao Qi <yao@codesourcery.com>
9729
9730 * tracepoint.c (tracepoint_was_hit): Don't collect for
9731 static tracepoint.
9732
12c3e59c
JB
97332012-01-02 Joel Brobecker <brobecker@adacore.com>
9734
9735 * terminal.h: Reformat copyright header.
9736
67827812
JB
97372012-01-02 Joel Brobecker <brobecker@adacore.com>
9738
9739 * server.c (gdbserver_version): Update copyright year.
9740 * gdbreplay.c (gdbreplay_version): Likewise.
9741
3e52c33d
JK
97422011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9743
9744 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9745
9746 Revert:
9747 2011-12-18 Hui Zhu <teawater@gmail.com>
9748 * linux-low.c (linux_create_inferior): Save return value to ret.
9749
66f1260e
HZ
97502011-12-18 Hui Zhu <teawater@gmail.com>
9751
9752 * linux-low.c (linux_create_inferior): Save return value to ret.
9753
e77616d7
DE
97542011-12-16 Doug Evans <dje@google.com>
9755
e7b06c57
DE
9756 * linux-low.c (linux_create_inferior): If stdio connection,
9757 redirect stdin from /dev/null, stdout to stderr.
9758 * remote-utils.c (remote_is_stdio): New static global.
9759 (remote_connection_is_stdio): New function.
9760 (remote_prepare): Handle stdio connection.
9761 (remote_open): Ditto.
9762 (remote_close): Don't close stdin for stdio connections.
9763 (read_prim,write_prim): New functions. Replace all calls to
9764 read/write to these.
9765 * server.c (main): Watch for "-" argument. Move call to
9766 remote_prepare before start_inferior.
9767 * server.h (STDIO_CONNECTION_NAME): New macro.
9768 (remote_connection_is_stdio): Declare.
9769
e77616d7
DE
9770 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9771 in debugging output.
9772
82067193
YQ
97732011-12-15 Yao Qi <yao@codesourcery.com>
9774
9775 * tracepoint.c: Include sys/syscall.h.
9776 (gdb_ust_thread): Remove preprocessor conditional.
9777
82bfbe7e
PA
97782011-12-14 Pedro Alves <pedro@codesourcery.com>
9779
9780 * linux-low.c (linux_detach_one_lwp): Call
9781 the_low_target.prepare_to_resume before detaching.
9782
712c6575
YQ
97832011-12-14 Yao Qi <yao@codesourcery.com>
9784
9785 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9786 of write.
9787
d54d1edf
YQ
97882011-12-14 Yao Qi <yao@codesourcery.com>
9789
9790 * i386-low.c (i386_low_stopped_data_address): Initialize local
9791 variable `control'.
9792
6210a125
PA
97932011-12-13 Pedro Alves <pedro@codesourcery.com>
9794
9795 PR remote/13492
9796
9797 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9798 DR_CONTROL unless necessary. Extend comments.
9799 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9800 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9801
2ece8244
YQ
98022011-12-13 Yao Qi <yao@codesourcery.com>
9803
9804 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9805 macros.
9806 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9807
784867a5
JK
98082011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9809
9810 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9811 Print new debug message for such case.
9812
6bf36717
JK
98132011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9814
9815 Fix overlapping memcpy.
9816 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9817 the read_inferior_memory transfer.
9818 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9819 write_inferior_memory transfer.
9820 (set_fast_tracepoint_jump): New variable buf. Use it for the
9821 read_inferior_memory and write_inferior_memory transfers.
9822 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9823 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9824 Use it for the write_inferior_memory transfer.
9825 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9826 buffers.
9827
50275556
MR
98282011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9829
9830 * linux-low.c (fetch_register, store_register): Make code
9831 consistent, fix formatting.
9832
7325beb4
MR
98332011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9834
9835 * linux-low.c (usr_store_inferior_registers): Factor out code
9836 to handle individual registers into...
9837 (store_register): ... this new function.
9838
c642a434
UW
98392011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9840
9841 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9842 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9843 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9844 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9845 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9846 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9847 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9848 (srv_xmlfiles): Add new XML files.
9849
9850 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9851 and <sys/uio.h>.
9852 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9853 (init_registers_s390_linux32v1): Add prototype.
9854 (init_registers_s390_linux32v2): Likewise.
9855 (init_registers_s390_linux64v1): Likewise.
9856 (init_registers_s390_linux64v2): Likewise.
9857 (init_registers_s390x_linux64v1): Likewise.
9858 (init_registers_s390x_linux64v2): Likewise.
9859 (s390_num_regs): Increment to 52.
9860 (s390_regmap): Add orig_r2 register.
9861 (s390_num_regs_3264): Increment to 68.
9862 (s390_regmap_3264): Add orig_r2 register.
9863 (s390_collect_ptrace_register): Handle orig_r2 register.
9864 (s390_supply_ptrace_register): Likewise.
9865 (s390_fill_last_break): New function.
9866 (s390_store_last_break): Likewise.
9867 (s390_fill_system_call): New function.
9868 (s390_store_system_call): Likewise.
9869 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9870 register sets.
9871 (s390_check_regset): New function.
9872 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9873 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9874 Update target_regsets for available register sets.
9875
2268b414
JK
98762011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9877 Jan Kratochvil <jan.kratochvil@redhat.com>
9878
9879 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9880 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9881 New.
9882 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9883 * linux-low.h (struct process_info_private): New member r_debug.
9884 * server.c (handle_qxfer_libraries): Call
9885 the_target->qxfer_libraries_svr4.
9886 (handle_qxfer_libraries_svr4): New function.
9887 (qxfer_packets): New entry "libraries-svr4".
9888 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9889 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9890 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9891 PACKET_qXfer_libraries_svr4.
9892
d6db1fab
UW
98932011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9894
9895 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9896 PSW address/mask between 8-byte and 16-byte formats.
9897 (s390_supply_ptrace_register): Likewise.
9898 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9899 basic addressing mode bit.
9900
242f5f1c
SS
99012011-11-24 Stan Shebs <stan@codesourcery.com>
9902
9903 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9904
f196051f
SS
99052011-11-17 Stan Shebs <stan@codesourcery.com>
9906
9907 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9908 (tracing_start_time): New global.
9909 (tracing_stop_time): New global.
9910 (tracing_user_name): New global.
9911 (tracing_notes): New global.
9912 (tracing_stop_note): New global.
9913 (cmd_qtstart): Set traceframe_usage, start_time.
9914 (stop_tracing): Set stop_time.
9915 (cmd_qtstatus): Report additional status.
9916 (cmd_qtp): New function.
9917 (handle_tracepoint_query): Call it.
9918 (cmd_qtnotes): New function.
9919 (handle_tracepoint_general_set): Call it.
9920 (get_timestamp): Rename from tsv_get_timestamp.
9921
405f8e94
SS
99222011-11-14 Stan Shebs <stan@codesourcery.com>
9923 Kwok Cheung Yeung <kcy@codesourcery.com>
9924
9925 * linux-x86-low.c (small_jump_insn): New.
9926 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9927 trampoline and error message, build a trampoline and issue a small
9928 jump instruction to it.
9929 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9930 trampoline and error message.
9931 (x86_get_min_fast_tracepoint_insn_len): New.
9932 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9933 * linux-low.h (struct linux_target_ops): Add arguments to
9934 install_fast_tracepoint_jump_pad operation, add new operation.
9935 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9936 arguments.
9937 (linux_get_min_fast_tracepoint_insn_len): New function.
9938 (linux_target_op): Add new operation.
9939 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9940 (gdb_trampoline_buffer_end): Ditto.
9941 (gdb_trampoline_buffer_error): Ditto.
9942 (struct ipa_sym_addresses): Add fields for new IPA variables.
9943 (symbol_list): Add entries for new IPA variables.
9944 (struct tracepoint): Add fields to hold the address range of the
9945 trampoline used by the tracepoint.
9946 (trampoline_buffer_head): New static variable.
9947 (trampoline_buffer_tail): Ditto.
9948 (claim_trampoline_space): New function.
9949 (have_fast_tracepoint_trampoline_buffer): New function.
9950 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9951 structure.
9952 (install_fast_tracepoint): Ditto, also add error buffer argument.
9953 (cmd_qtminftpilen): New function.
9954 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9955 (fast_tracepoint_from_trampoline_address): New function.
9956 (fast_tracepoint_collecting): Handle trampoline as part of jump
9957 pad space.
9958 (set_trampoline_buffer_space): New function.
9959 (initialize_tracepoint): Initialize new IPA variables.
9960 * target.h (struct target_ops): Add arguments to
9961 install_fast_tracepoint_jump_pad operation, add new
9962 get_min_fast_tracepoint_insn_len operation.
9963 (target_get_min_fast_tracepoint_insn_len): New.
9964 (install_fast_tracepoint_jump_pad): Add arguments.
9965 * server.h (IPA_BUFSIZ): Define.
9966 * linux-i386-ipa.c: Include extra header files.
9967 (initialize_fast_tracepoint_trampoline_buffer): New function.
9968 (initialize_low_tracepoint): Call it.
9969 * server.h (set_trampoline_buffer_space): Declare.
9970 (claim_trampoline_space): Ditto.
9971 (have_fast_tracepoint_trampoline_buffer): Ditto.
9972
1e4d1764
YQ
99732011-11-14 Yao Qi <yao@codesourcery.com>
9974
9975 * server.c (handle_query): Handle InstallInTrace for qSupported.
9976 * tracepoint.c (add_tracepoint): Sort list.
9977 (install_tracepoint, download_tracepoint): New.
9978 (cmd_qtdp): Call them to install and download tracepoints.
9979 (sort_tracepoints): Removed.
9980 (cmd_qtstart): Update.
9981
5c73ff4e
YQ
99822011-11-14 Yao Qi <yao@codesourcery.com>
9983
9984 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9985 * mem-break.h: Declare.
9986 * tracepoint.c (cmd_qtstart): Move some code to ...
9987 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9988 New.
9989 (download_tracepoints): Move some code to ...
9990 (download_tracepoint_1): ... here. New.
9991
86a30030
YQ
99922011-11-08 Yao Qi <yao@codesourcery.com>
9993
9994 * remote-utils.c (relocate_instruction): A comment fix.
9995
8d26e50c
JB
99962011-11-07 Joel Brobecker <brobecker@adacore.com>
9997
9998 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9999 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10000 dr_status_mirror and dr_control_mirror from debug_reg_state.
10001 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10002 (i386_initial_stuff): Remove use of deleted globals.
10003 (i386_get_thread_context, i386_set_thread_context,
10004 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10005 from debug_reg_state.
10006
a59306a3
YQ
100072011-11-05 Yao Qi <yao@codesourcery.com>
10008
10009 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10010 address as TPOINT's.
10011
3065dfb6
SS
100122011-11-02 Stan Shebs <stan@codesourcery.com>
10013
10014 * tracepoint.c (agent_mem_read_string): New function.
10015 (eval_agent_expr): Call it for tracenz.
10016 * server.c (handle_query): Report support for tracenz.
10017
fd0d8c7c
YQ
100182011-11-02 Yao Qi <yao@codesourcery.com>
10019
10020 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10021
609086b1
YQ
100222011-11-02 Yao Qi <yao@codesourcery.com>
10023
10024 * target.h: Fix a typo in comment.
10025
b9fd1791
PA
100262011-10-31 Pedro Alves <pedro@codesourcery.com>
10027
10028 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10029 clobber the breakpoints' shadows with fast tracepoint jumps.
10030 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10031 * target.c (write_inferior_memory): Also pass MYADDR down to
10032 check_mem_write.
10033
03583c20
UW
100342011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10035
10036 * configure.ac: Check support for personality routine.
10037 * configure: Regenerate.
10038 * config.in: Likewise.
10039 * linux-low.c: Include <sys/personality.h>.
10040 Define ADDR_NO_RANDOMIZE if necessary.
10041 (linux_create_inferior): Disable address space randomization when
10042 forking inferior, if requested.
10043 (linux_supports_disable_randomization): New function.
10044 (linux_target_ops): Install it.
10045 * server.h (disable_randomization): Declare.
10046 * server.c (disable_randomization): New global variable.
10047 (handle_general_set): Handle QDisableRandomization.
10048 (handle_query): Likewise for qSupported.
10049 (main): Support --disable-randomization and --no-disable-randomization
10050 command line arguments.
10051 * target.h (struct target_ops): Add supports_disable_randomization.
10052 (target_supports_disable_randomization): New macro.
10053
723b724b
MF
100542011-09-29 Mike Frysinger <vapier@gentoo.org>
10055
10056 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10057 ifdef check.
10058 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10059 [!PT_GETDSBT] (target_loadmap): New definition.
10060 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10061 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10062 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10063 and PT_GETDSBT to LINUX_LOADMAP.
10064 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10065 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10066
55329a5c 100672011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10068
10069 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10070 (arm_linux_hwbp_cap): New static variable.
10071 (arm_linux_get_hwbp_cap): Replace by ...
10072 (arm_linux_init_hwbp_cap): ... this new function.
10073 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10074 (arm_linux_get_hw_watchpoint_count): Likewise.
10075 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10076 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10077 (arm_prepare_to_resume): Use perror_with_name instead of error.
10078
55329a5c 100792011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10080
10081 * linux-arm-low.c: Include <signal.h>.
10082 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10083 (struct arm_linux_hwbp_cap): New data type.
10084 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10085 (struct arm_linux_hw_breakpoint): New data type.
10086 (MAX_BPTS, MAX_WPTS): Define.
10087 (struct arch_process_info, struct arch_lwp_info): New data types.
10088 (arm_linux_get_hwbp_cap): New function.
10089 (arm_linux_get_hw_breakpoint_count): Likewise.
10090 (arm_linux_get_hw_watchpoint_count): Likewise.
10091 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10092 (arm_hwbp_control_initialize): Likewise.
10093 (arm_hwbp_control_is_enabled): Likewise.
10094 (arm_hwbp_control_is_initialized): Likewise.
10095 (arm_hwbp_control_disable): Likewise.
10096 (arm_linux_hw_breakpoint_equal): Likewise.
10097 (arm_linux_hw_point_initialize): Likewise.
10098 (struct update_registers_data): New data structure.
10099 (update_registers_callback: New function.
10100 (arm_insert_point): Likewise.
10101 (arm_remove_point): Likewise.
10102 (arm_stopped_by_watchpoint): Likewise.
10103 (arm_stopped_data_address): Likewise.
10104 (arm_new_process): Likewise.
10105 (arm_new_thread): Likewise.
10106 (arm_prepare_to_resume): Likewise.
10107 (the_low_target): Register arm_insert_point, arm_remove_point,
10108 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10109 arm_new_thread, and arm_prepare_to_resume.
10110
6b9801d4
SS
101112011-09-15 Stan Shebs <stan@codesourcery.com>
10112
10113 * server.h (struct emit_ops): Add compare-goto fields.
10114 * tracepoint.c (gdb_agent_op_sizes): New table.
10115 (emit_eq_goto): New function.
10116 (emit_ne_goto): New function.
10117 (emit_lt_goto): New function.
10118 (emit_le_goto): New function.
10119 (emit_gt_goto): New function.
10120 (emit_ge_goto): New function.
10121 (is_goto_target): New function.
10122 (compile_bytecodes): Recognize special cases of compare-goto
10123 combinations and call specialized emitters for them.
10124 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10125 (amd64_emit_ne_goto): New function.
10126 (amd64_emit_lt_goto): New function.
10127 (amd64_emit_le_goto): New function.
10128 (amd64_emit_gt_goto): New function.
10129 (amd64_emit_ge_goto): New function.
10130 (amd64_emit_ops): Add the new functions.
10131 (i386_emit_eq_goto): New function.
10132 (i386_emit_ne_goto): New function.
10133 (i386_emit_lt_goto): New function.
10134 (i386_emit_le_goto): New function.
10135 (i386_emit_gt_goto): New function.
10136 (i386_emit_ge_goto): New function.
10137 (i386_emit_ops): Add the new functions.
10138
bf15cbda
SS
101392011-09-08 Stan Shebs <stan@codesourcery.com>
10140
10141 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10142 (i386_emit_epilogue): Restore %ebx.
10143
943ca1dd
JZ
101442011-08-31 Jie Zhang <jzhang918@gmail.com>
10145
10146 * server.c (step_thread): Remove definition.
10147 (process_serial_event): Don't handle Hs.
10148 * server.h (step_thread): Remove declaration.
10149 * target.c (set_desired_inferior): Remove use of step_thread.
10150
e3deef73
LM
101512011-08-24 Luis Machado <lgustavo@codesourcery.com>
10152
10153 * linux-low.c: Include linux-procfs.h.
10154 (linux_attach_lwp_1): Update comments.
10155 (linux_attach): Scan for existing threads when attaching to a
10156 process that is the tgid.
10157 * Makefile.in: Update dependencies.
10158
13da1c97
LM
101592011-08-24 Luis Machado <lgustavo@codesourcery.com>
10160
10161 * configure.srv: Add linux-procfs.o dependencies.
10162
881127c9
YQ
101632011-08-14 Yao Qi <yao@codesourcery.com>
10164
10165 * target.h (struct target_ops): Fix indent.
10166 * win32-low.c (win32_target_ops): Fix comment.
10167
58dbd541
YQ
101682011-08-14 Andrew Jenner <andrew@codesourcery.com>
10169 Yao Qi <yao@codesourcery.com>
10170
10171 * Makefile.in (clean): Remove tic6x-*.c files.
10172 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10173 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10174 (tic6x-c64xp-linux.c): Likewise.
10175 * configure.srv: Add support for tic6x-*-uclinux.
10176 * linux-tic6x-low.c: New.
10177 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10178
78d85199
YQ
101792011-08-14 Andrew Stubbs <ams@codesourcery.com>
10180 Yao Qi <yao@codesourcery.com>
10181
10182 * target.h (struct target_ops): Add read_loadmap.
10183 * linux-low.c (struct target_loadseg): New type.
10184 (struct target_loadmap): New type.
10185 (linux_read_loadmap): New function.
10186 (linux_target_ops): Add linux_read_loadmap.
10187 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10188 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10189 to NULL.
78d85199 10190
a959a88d
EZ
101912011-08-05 Eli Zaretskii <eliz@gnu.org>
10192
10193 * win32-low.c: Include <stdint.h>.
10194
1ced966e
PA
101952011-07-22 Pedro Alves <pedro@codesourcery.com>
10196
10197 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10198 to the inferior here.
10199 (i386_remove_aligned_watchpoint): Ditto.
10200 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10201 fit part of the watchpoint in the debug registers.
10202 (i386_update_inferior_debug_regs): New.
10203 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10204 registers, and only update the inferior on success.
10205 (i386_low_remove_watchpoint): Ditto.
10206
d26e3629
KY
102072011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10208
10209 * linux-low.c (compare_ints, unique, list_threads, show_process,
10210 linux_core_of_thread): Delete.
10211 (linux_target_ops): Change linux_core_of_thread to
10212 linux_common_core_of_thread.
10213 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10214 * utils.c (malloc_failure): Change type of argument.
10215 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10216 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10217 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10218 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10219 (IPA_OBJS): Add common-utils-ipa.o.
10220 (ptid_h, linux_osdata_h): New macros.
10221 (server_h): Add common/common-utils.h, common/xml-utils.h,
10222 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10223 common/ptid.h.
10224 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10225 ptid.o, buffer.o): New rules.
10226 (linux-low.o): Add common/linux-osdata.h as a dependency.
10227 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10228 * configure.ac: Add AC_HEADER_DIRENT check.
10229 * config.in: Regenerate.
10230 * configure: Regenerate.
10231 * remote-utils.c (xml_escape_text): Delete.
10232 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10233 buffer_xml_printf): Move to common/buffer.c.
10234 * server.c (main): Remove call to initialize_inferiors.
10235 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10236 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10237 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10238 internal_error, gdb_assert, gdb_assert_fail): Delete.
10239 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10240 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10241 common/buffer.h.
10242 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10243 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10244 initialize_inferiors): Delete.
10245
2275a1a7
PA
102462011-07-20 Pedro Alves <pedro@codesourcery.com>
10247
10248 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10249 symbol error.
10250
0a5b1e09
PA
102512011-05-31 Pedro Alves <pedro@codesourcery.com>
10252
10253 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10254 assertion.
10255 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10256
6938fd34
YQ
102572011-05-26 Yao Qi <yao@codesourcery.com>
10258
10259 * Makefile.in (thread-db.o): Track dependence to
10260 common/gdb_thread_db.h.
10261 * thread-db.c: include gdb_thread_db.h from right place.
10262
b481f9e0
TT
102632011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10264
10265 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10266 __FILE__ and __LINE__ to internal_error.
10267
98a5dd13
DE
102682011-05-13 Doug Evans <dje@google.com>
10269
10270 * thread-db.c (try_thread_db_load_from_sdir): New function.
10271 (try_thread_db_load_from_dir): New function.
10272 (thread_db_load_search): Handle $sdir, ignore $pdir.
10273 Remove trying of system directories if search of
10274 libthread-db-search-path fails, that is now done via $sdir.
10275
d248b706
KY
102762011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10277
10278 * server.c (handle_query): Add EnableDisableTracepoints to the list
10279 of supported features.
43aaf8b6 10280 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10281 tracepoints.
43aaf8b6
PA
10282 (cmd_qtenable_disable): New.
10283 (cmd_qtstart): Install tracepoints even if disabled.
10284 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10285 receiving a QTEnable or QTDisable packet.
10286 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10287 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10288 tracepoints.
10289 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10290
84e578fb
DE
102912011-05-10 Doug Evans <dje@google.com>
10292
10293 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10294
71f55dd8
DE
102952011-05-04 Doug Evans <dje@google.com>
10296
10297 * linux-low.c (linux_join): Skip process lookup.
10298 * spu-low.c (spu_join): Ditto.
10299 * server.c (join_inferiors_callback): Delete.
10300 (process_serial_event): For 'D' packet (detach) call join_inferior
10301 directly.
10302
4d393d60
JM
103032011-05-04 Joseph Myers <joseph@codesourcery.com>
10304
10305 * README: Don't mention xscale*-*-linux*.
10306 * configure.srv (xscale*-*-linux*): Don't handle target.
10307
b00ad6ff
NF
103082011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10309
10310 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10311 casting pointers.
10312 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10313 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10314 (i386_emit_void_call_2): Likewise.
10315
af96c192
YQ
103162011-04-26 Yao Qi <yao@codesourcery.com>
10317
43aaf8b6
PA
10318 * linux-low.c: Move common macros to linux-ptrace.h.
10319 Include linux-ptrace.h.
af96c192
YQ
10320 * Makefile.in (linux_ptrace_h): New.
10321 (linux-low.o): Depends on linux-ptrace.h.
10322
03f2bd59
JK
103232011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10324
10325 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10326 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10327 (remote_prepare): New function with most of the TCP code from ...
10328 (remote_open): ... here. Detect PORT here unconditionally. Move also
10329 setting transport_is_reliable.
10330 * server.c (run_once): New variable.
10331 (gdbserver_usage): Document it.
10332 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10333 the first run if RUN_ONCE.
10334 * server.h (run_once, remote_prepare): New declarations.
10335
7a9dd1b2
TT
103362011-04-19 Tom Tromey <tromey@redhat.com>
10337
10338 * win32-low.c (handle_load_dll): Remove duplicate "the".
10339
81239425
PM
103402011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10341
10342 Remove support for old Cygwin 1.5 versions.
10343 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10344 function to avoid warning.
10345 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10346 warning.
10347
9e0627f1
PM
103482011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10349
10350 * gdbserver/server.h (Macro _): Define it if not available.
10351
588eebee
MS
103522011-03-14 Michael Snyder <msnyder@vmware.com>
10353
348af9f7 10354 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10355
43f70d4c
JB
103562011-03-10 Joel Brobecker <brobecker@adacore.com>
10357
10358 * Makefile.in (maintainer-clean realclean distclean): Remove
10359 "make ... subdir_do" command.
10360
348af9f7
MS
103612011-03-10 Michael Snyder <msnyder@vmware.com>
10362
10363 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10364
10365 * server.c (handle_v_run): Free alloced buffer on early return.
10366
e637a4f5
YQ
103672011-03-09 Yao Qi <yao@codesourcery.com>
10368
10369 Revert:
10370 2011-03-04 Yao Qi <yao@codesourcery.com>
10371
10372 * Makefile.in: Remove GNU make feature --directory.
10373
10374 2011-03-05 Yao Qi <yao@codesourcery.com>
10375
10376 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10377 (subdir_do): New make target. Copied from gdb/Makefile.
10378 (maintainer-clean, realclean, distclean, clean): Call corresponding
10379 make targets in common/Makefile.
10380
10381 2011-02-11 Yao Qi <yao@codesourcery.com>
10382
10383 * configure.ac: Call AC_PROG_RANLIB.
10384 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10385 * configure: Regenerate.
10386
e6edda56
JK
103872011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10388
10389 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10390
e5141119
JB
103912011-03-06 Yao Qi <yao@codesourcery.com>
10392
10393 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10394
64794aa4
JB
103952011-03-05 Yao Qi <yao@codesourcery.com>
10396
10397 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10398 (subdir_do): New make target. Copied from gdb/Makefile.
10399 (maintainer-clean, realclean, distclean, clean): Call corresponding
10400 make targets in common/Makefile.
10401
7a762829
YQ
104022011-03-04 Yao Qi <yao@codesourcery.com>
10403
10404 * Makefile.in: Remove GNU make feature --directory.
10405
348af9f7
MS
104062011-03-04 Michael Snyder <msnyder@vmware.com>
10407
10408 * server.c (queue_stop_reply): Call xmalloc not malloc.
10409
104102011-03-02 Michael Snyder <msnyder@vmware.com>
10411
10412 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10413
9f72fee2
MS
104142011-02-28 Michael Snyder <msnyder@vmware.com>
10415
588eebee
MS
10416 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10417 (cmd_qtframe): Ditto.
10418 (cmd_qtbuffer): Ditto.
10419 (cmd_bigqtbuffer): Ditto.
10420
9f72fee2
MS
10421 * utils.c (decimal2str): Initialize 'width' to nine, then
10422 don't mess with it.
10423
8040bd49
UW
104242011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10425
10426 * hostio.c (require_data): Free *data, not data.
10427
7e52cbd0
JK
104282011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10429
10430 * hostio.c (require_data): Use free, not xfree.
10431
9130f83e
MS
104322011-02-27 Michael Snyder <msnyder@vmware.com>
10433
4b812f4e
MS
10434 * server.c (handle_query): Discard unused value.
10435
9130f83e
MS
10436 * hostio.c (require_data): Free malloc memory before returning
10437 error.
10438
69d37113
MS
104392011-02-26 Michael Snyder <msnyder@vmware.com>
10440
10441 * linux-low.c (list_threads): Call closedir for dirent.
10442
35f5825a
MS
104432011-02-27 Michael Snyder <msnyder@vmware.com>
10444
2a589cef
MS
10445 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10446 a case statement falls through.
10447
0adea5f7
MS
10448 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10449
35f5825a
MS
10450 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10451 in comparison.
10452
238f1c74
MS
104532011-02-26 Michael Snyder <msnyder@vmware.com>
10454
10455 * utils.c (decimal2str): Eliminate dead code and dead param.
10456 (pulongest): Drop dead param from call to decimal2str.
10457 (plongest): Ditto.
10458
633ff500
JB
104592011-02-24 Joel Brobecker <brobecker@adacore.com>
10460
10461 Revert the following patch (not approved yet):
10462 2011-02-21 Hui Zhu <teawater@gmail.com>
10463 * tracepoint.c (tp_printf): New function.
10464 (eval_agent_expr): Handle gdb_agent_op_printf.
10465
f9c6ff72
HZ
104662011-02-21 Hui Zhu <teawater@gmail.com>
10467
10468 * tracepoint.c (tp_printf): New function.
10469 (eval_agent_expr): Handle gdb_agent_op_printf.
10470
94d5e490
TT
104712011-02-18 Tom Tromey <tromey@redhat.com>
10472
10473 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10474 (tracepoint.o): Likewise.
10475 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10476 (gdb_agent_op_names): Likewise.
10477
c7f96d2b
TT
104782011-02-18 Tom Tromey <tromey@redhat.com>
10479
10480 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10481 gdb_agent_op_rot>: New constants.
10482 (gdb_agent_op_names): Add pick and roll.
10483 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10484 cases.
10485
0feedb2c
JK
104862011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10487
10488 * aclocal.m4: Regenerated with aclocal-1.11.1.
10489
b3b9301e
PA
104902011-02-14 Pedro Alves <pedro@codesourcery.com>
10491
10492 * server.c (handle_qxfer_traceframe_info): New.
10493 (qxfer_packets): Register "traceframe-info".
10494 (handle_query): Report support for qXfer:traceframe-info:read+.
10495 * tracepoint.c (match_blocktype): New.
10496 (traceframe_find_block_type): Rename to ...
10497 (traceframe_walk_blocks): ... this. Add callback filter argument,
10498 and use it.
10499 (traceframe_find_block_type): New, reimplemented on top of
10500 traceframe_walk_blocks.
10501 (build_traceframe_info_xml): New.
10502 (traceframe_read_info): New.
10503 * server.h (traceframe_read_info): Declare.
10504
4f3e6fb7
YQ
105052011-02-11 Yao Qi <yao@codesourcery.com>
10506
10507 * configure.ac: Call AC_PROG_RANLIB.
10508 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10509 * configure: Regenerate.
10510
764880b7
PA
105112011-02-07 Pedro Alves <pedro@codesourcery.com>
10512
10513 * server.c (gdb_read_memory): Change return semantics to allow
10514 partial transfers.
10515 (handle_search_memory_1): Adjust.
10516 (process_serial_event) <'m' packet>: Handle partial transfers.
10517 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10518
1c79eb8a
PA
105192011-01-28 Pedro Alves <pedro@codesourcery.com>
10520
10521 * regcache.c (init_register_cache): Initialize
10522 regcache->register_status.
10523 (free_register_cache): Release regcache->register_status.
10524 (regcache_cpy): Copy register_status.
10525 (registers_to_string): Print 'x's for unavailable registers.
10526 (supply_register): Mark the register's status valid or
10527 unavailable, depending on whether a buffer was passed in or not.
10528 (supply_register_zeroed): New.
10529 (supply_regblock): Mark the registers' status valid or
10530 unavailable, depending on whether a buffer was passed in or not.
10531 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10532 (struct regcache): New `register_status' field.
10533 (supply_register_zeroed): Declare.
10534 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10535 supply_register_zeroed, rather than passing a NULL buffer to
10536 supply_register.
10537 * tracepoint.c (fetch_traceframe_registers): Update comment.
10538
85724a0e
PA
105392011-01-28 Pedro Alves <pedro@codesourcery.com>
10540
10541 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10542 buffer explicit.
10543
d08aafef
PA
105442011-01-25 Pedro Alves <pedro@codesourcery.com>
10545
10546 * server.h (decode_xfer_write): Change prototype.
10547 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10548 and don't extract the annex here.
10549 * server.c (decode_xfer_read): Remove `annex' parameter,
10550 and don't extract the annex here.
10551 (decode_xfer): New.
10552 (struct qxfer): New.
10553 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10554 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10555 (handle_qxfer_statictrace): New functions, abstracted out from
10556 handle_query, and made to use the struct qxfer interface.
10557 (handle_threads_qxfer_proper): Rename to ...
10558 (handle_qxfer_threads_proper): ... this.
10559 (handle_threads_qxfer): Rename to ...
10560 (handle_qxfer_threads): ... this. Adjust.
10561 (qxfer_packets): New array.
10562 (handle_qxfer): New function.
10563 (handle_query): Use handle_qxfer.
10564
493e2a69
MS
105652011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10566
10567 * gdbreplay.c: Shorten lines of >= 80 columns.
10568 * linux-low.c: Ditto.
10569 * linux-ppc-low.c: Ditto.
10570 * linux-s390-low.c: Ditto.
10571 * linux-sparc-low.c: Ditto.
10572 * linux-x86-low.c: Ditto.
10573 * linux-xtensa-low.c: Ditto.
10574 * mem-break.c: Ditto.
10575 * nto-low.c: Ditto.
10576 * regcache.h: Ditto.
10577 * remote-utils.c: Ditto.
10578 * server.c: Ditto.
10579 * server.h: Ditto.
10580 * thread-db.c: Ditto.
10581 * tracepoint.c: Ditto.
10582 * utils.c: Ditto.
10583 * win32-low.h: Ditto.
10584
44944448
JB
105852011-01-05 Joel Brobecker <brobecker@adacore.com>
10586
10587 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10588 update.
10589
71ce852c
JB
105902011-01-01 Joel Brobecker <brobecker@adacore.com>
10591
10592 * server.c (gdbserver_version): Update copyright year in version
10593 output.
10594 * gdbreplay.c (gdbreplay_version): Ditto.
10595
eb826dc6
MF
105962010-12-29 Jie Zhang <jie.zhang@analog.com>
10597
10598 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10599 * linux-bfin-low.c: New file.
10600 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10601 PT_DATA_ADDR for BFIN targets.
10602 * Makefile.in (SFILES): Add linux-bfin-low.c.
10603 (clean): Remove reg-bfin.c.
10604 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10605 * README: Mention supported Blackfin targets.
10606
39ab222a
MF
106072010-12-23 Mike Frysinger <vapier@gentoo.org>
10608
10609 * .gitignore: New file.
10610
a1f2ce7d
MF
106112010-11-16 Mike Frysinger <vapier@gentoo.org>
10612
10613 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10614
f474844c
JZ
106152010-10-22 Jie Zhang <jie@codesourcery.com>
10616
10617 * Makefile.in: Add FLAGS_TO_PASS variable.
10618 (install): Remove dependency of install-only and recursively
10619 invoke make for install-only.
10620
f1048712
DE
106212010-10-04 Doug Evans <dje@google.com>
10622
10623 * Makefile.in (uninstall): Use $(DESTDIR).
10624
b53a1623
PA
106252010-09-24 Pedro Alves <pedro@codesourcery.com>
10626
e6ee044d
PA
10627 PR gdb/11842
10628
b53a1623
PA
10629 * linux-x86-low.c (compat_siginfo_from_siginfo)
10630 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10631 si_code is < 0. Check for si_code == SI_TIMER before checking for
10632 si_code < 0.
10633
fa1bd1e4
JB
106342010-09-13 Joel Brobecker <brobecker@adacore.com>
10635
10636 * lynx-i386-low.c: New file.
10637 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10638
47fac8f8
JB
106392010-09-13 Joel Brobecker <brobecker@adacore.com>
10640
10641 * lynx-low.c (ptrace_request_to_str): Remove handling for
10642 request values that have been removed in LynxOS 5.x.
10643
1adfc54d
JB
106442010-09-13 Joel Brobecker <brobecker@adacore.com>
10645
10646 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10647 <ptrace.h>
10648
c2a66c29
NS
106492010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10650
10651 * configure.ac: Add --enable-inprocess-agent option.
10652 * configure: Rebuilt.
10653
32fcada3
YQ
106542010-09-06 Yao Qi <yao@codesourcery.com>
10655
10656 * linux-low.c (linux_kill): Remove unused variable.
10657 (linux_stabilize_threads): Likewise.
10658 * server.c (start_inferior): Likewise.
10659 (queue_stop_reply_callback): Likewise.
10660 * tracepoint.c (do_action_at_tracepoint): Likewise.
10661
0cccb683
YQ
106622010-09-06 Yao Qi <yao@codesourcery.com>
10663
10664 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10665 on return.
10666
423ec54c
JK
106672010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10668
10669 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10670
12ac6819
PA
106712010-09-06 Pedro Alves <pedro@codesourcery.com>
10672
10673 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10674 "$(IPA_DEPFILES)".
10675
8ed54b31
JB
106762010-09-01 Joel Brobecker <brobecker@adacore.com>
10677
10678 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10679 gdbserver/lynx-ppc-low.c: New files.
10680 * Makefile.in (lynx_low_h): New variable.
10681 (lynx-low.o, lynx-ppc-low.o): New rules.
10682 * configure.ac: On LynxOS, link with -lnetinet.
10683 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10684 * configure: regenerate.
10685
bb0116a4
JB
106862010-09-01 Joel Brobecker <brobecker@adacore.com>
10687
10688 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10689 * configure.ac: Add check for vasprintf and vsnprintf.
10690 * configure, config.in: Regenerate.
10691 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10692
a778ab81 106932010-09-01 Joel Brobecker <brobecker@adacore.com>
10694
10695 * gdbreplay.c: Move include of alloca.h up, next to include of
10696 malloc.h.
10697 * server.h: Add include of malloc.h.
10698 * mem-break.c: Remove include of malloc.h.
10699 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10700
8b034a19 107012010-09-01 Joel Brobecker <brobecker@adacore.com>
10702
10703 * Makefile.in (memmem.o): Build with -Wno-error.
10704
107052010-09-01 Joel Brobecker <brobecker@adacore.com>
10706
10707 * utils.c (xsnprintf): Make non-static.
10708 * server.h: Add xsnprintf declaration.
10709 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10710 replace calls to snprintf by calls to xsnprintf throughout.
10711
107122010-09-01 Joel Brobecker <brobecker@adacore.com>
10713
10714 * configure.ac: Add configure check for alloca.
10715 * configure, config.in: Regenerate.
10716 * server.h: Include alloca.h if it exists.
10717 * gdbreplay.c: Include alloca.h if it exists.
10718
1a981360
PA
107192010-08-28 Pedro Alves <pedro@codesourcery.com>
10720
10721 * linux-low.c (__SIGRTMIN): Define if not already defined.
10722 (linux_create_inferior): Check for __ANDROID__ rather than
10723 __SIGRTMIN.
10724 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10725 are already deferred.
10726 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10727 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10728 stopped and already has a pending signal to report.
10729 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10730 a pending signal to report or is moving out of a jump pad.
10731 (linux_init_signals): Check for __ANDROID__ rather than
10732 __SIGRTMIN.
10733
b4d51a55
PA
107342010-08-28 Pedro Alves <pedro@codesourcery.com>
10735
10736 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10737 debug_threads check. Avoid a linear search when not doing debug
10738 output.
10739
ec48365d
PA
107402010-08-27 Pedro Alves <pedro@codesourcery.com>
10741
10742 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10743 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10744 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10745 (process_event): Change local fd's type to gdb_fildes_t.
10746 (create_file_handler): Adjust prototype.
10747 (delete_file_handler): Adjust prototype.
10748 (handle_file_event): Adjust prototype. Use pfildes.
10749 (create_file_event): Adjsut prototype.
10750 * remote-utils.c (remote_desc, listen_desc): Change type to
10751 gdb_fildes_t.
10752 * server.h: New gdb_fildes_t typedef.
10753 [USE_WIN32API]: Include winsock2.h.
10754 (delete_file_handler, add_file_handler): Adjust prototypes.
10755 (pfildes): Declare.
10756 * utils.c (pfildes): New.
10757
854d88f0
PA
107582010-08-27 Pedro Alves <pedro@codesourcery.com>
10759
10760 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10761 * configure: Regenerate.
10762
0146f85b
PA
107632010-08-27 Pedro Alves <pedro@codesourcery.com>
10764
10765 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10766 (linux_done_accessing_memory): ... this.
10767 (linux_target_ops): Adjust.
10768 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10769 * nto-low.c (nto_target_ops): Adjust comment.
10770 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10771 * spu-low.c (spu_target_ops): Adjust comment.
10772 * target.h (target_ops): Rename unprepare_to_access_memory field
10773 to done_accessing_memory.
10774 (unprepare_to_access_memory): Rename to ...
10775 (done_accessing_memory): ... this.
10776
90d74c30
PA
107772010-08-26 Pedro Alves <pedro@codesourcery.com>
10778
10779 * linux-low.c (linux_prepare_to_access_memory): New.
10780 (linux_unprepare_to_access_memory): New.
10781 (linux_target_ops): Install them.
10782 * server.c (read_memory): Rename to ...
10783 (gdb_read_memory): ... this. Use
10784 prepare_to_access_memory/prepare_to_access_memory.
10785 (write_memory): Rename to ...
10786 (gdb_write_memory): ... this. Use
10787 prepare_to_access_memory/prepare_to_access_memory.
10788 (handle_search_memory_1): Adjust.
10789 (process_serial_event): Adjust.
10790 * target.h (struct target_ops): New fields
10791 prepare_to_access_memory and unprepare_to_access_memory.
10792 (prepare_to_access_memory, unprepare_to_access_memory): New.
10793 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10794 prepare_to_access_memory/prepare_to_access_memory.
10795 * nto-low.c (nto_target_ops): Adjust.
10796 * spu-low.c (spu_target_ops): Adjust.
10797 * win32-low.c (win32_target_ops): Adjust.
10798
fd467969
PA
107992010-08-26 Pedro Alves <pedro@codesourcery.com>
10800
10801 * Makefile.in (WARN_CFLAGS): Get it from configure.
10802 (WERROR_CFLAGS): New.
10803 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10804 * configure.ac: Introduce --enable-werror, which adds -Werror to
10805 the compiler command line. Enabled by default. Disable with
10806 --disable-werror. Add -Wdeclaration-after-statement
10807 Wpointer-arith and -Wformat-nonliteral to warning flags.
10808 * configure: Regenerate.
10809
331e2f5f
PA
108102010-08-26 Pedro Alves <pedro@codesourcery.com>
10811
10812 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10813
e581f2b4
PA
108142010-08-26 Pedro Alves <pedro@codesourcery.com>
10815
10816 * gdbreplay.c (remote_error): New.
10817 (gdbchar): New.
10818 (expect): Use gdbchar. Check for error reading from GDB.
10819 Clarify sync error output.
10820 (play): Check for errors writing to GDB.
10821 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10822 * remote-utils.c (getpkt): Check for errors writing to the remote
10823 descriptor.
10824
3c11dd79
PA
108252010-08-25 Pedro Alves <pedro@codesourcery.com>
10826
10827 * linux-low.c (linux_wait_1): Move non-debugging code out of
10828 `debug_threads' control.
10829
d20a8ad9
PA
108302010-08-25 Pedro Alves <pedro@codesourcery.com>
10831
10832 * linux-low.c (linux_wait_1): Don't set last_status here.
10833 * server.c (push_event, queue_stop_reply_callback): Assert we're
10834 not pushing a TARGET_WAITKIND_IGNORE event.
10835 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10836 (myresume, handle_target_event): Set the thread's last_resume_kind
10837 and last_status from the target returned status.
10838
964e4306
PA
108392010-08-25 Pedro Alves <pedro@codesourcery.com>
10840
10841 PR threads/10729
10842
10843 * linux-x86-low.c (update_debug_registers_callback): New.
10844 (i386_dr_low_set_addr): Use it.
10845 (i386_dr_low_get_addr): New.
10846 (i386_dr_low_set_control): Use update_debug_registers_callback.
10847 (i386_dr_low_get_control): New.
10848 (i386_dr_low_get_status): Adjust.
10849 * linux-low.c (linux_stop_lwp): New.
10850 * linux-low.h (linux_stop_lwp): Declare.
10851
10852 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10853 argument instead of a i386_debug_reg_state.
10854 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10855 a i386_debug_reg_state.
10856 (i386_insert_aligned_watchpoint): Adjust.
10857 (i386_remove_aligned_watchpoint): Adjust.
10858 (i386_low_stopped_data_address): Read the debug registers from the
10859 inferior instead of from the mirrors.
10860 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10861 (i386_dr_low_get_addr): Declare.
10862 (i386_dr_low_get_control): Declare.
10863 (i386_dr_low_get_status): Change prototype.
10864
10865 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10866 (i386_dr_low_get_addr): New.
10867 (i386_dr_low_get_control): New.
10868 (i386_dr_low_get_status): Adjust prototype. Return
10869 dr_status_mirror.
10870 (i386_initial_stuff): Clear dr_status_mirror and
10871 dr_control_mirror.
10872 (i386_get_thread_context): Adjust.
10873 (i386_set_thread_context): Adjust.
10874 (i386_thread_added): Adjust.
10875
5f21a75b
PA
108762010-08-24 Pedro Alves <pedro@codesourcery.com>
10877
10878 * linux-low.h (linux_thread_area): Delete declaration.
10879
3e4c1235
TS
108802010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10881
10882 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10883 after its termination.
10884
1971b033
PA
108852010-08-09 Pedro Alves <pedro@codesourcery.com>
10886
10887 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10888 (gdb_wants_all_stopped): Delete.
10889 (linux_wait_1): Don't call them.
10890 * server.c (handle_v_cont): Tag all threads as want-stopped.
10891 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10892 stopped as "client-wants-stopped".
10893
310444ac
PA
108942010-07-31 Pedro Alves <pedro@codesourcery.com>
10895
10896 * Makefile.in (signals_h): New.
10897 (server_h): Depend on it.
10898 (server.o): Don't depend on $(signals_def).
10899 (signals.o): Depend on $(signals_def).
10900
a19cae16
JK
109012010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10902
10903 * Makefile.in (signals_def): New.
10904 (server_h): Append include/gdb/signals.h and signals_def.
10905 (server.o): Append signals_def.
10906
30d50328
JK
109072010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10908
10909 * server.c (handle_target_event): Use target_signal_to_host for
10910 resume_info.sig initialization.
10911 * target.h (struct thread_resume) <sig>: New comment.
10912
5c3216e2
OS
109132010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10914
c6f46ca0
OS
10915 * server.c (handle_query): strcpy() the returned string from paddress()
10916 instead of sprintf().
5c3216e2
OS
10917 * utils.c (paddress): Return phex_nz().
10918
6bd31874
JB
109192010-07-07 Joel Brobecker <brobecker@adacore.com>
10920
10921 * server.c (handle_v_cont): Call mourn_inferior if process
10922 just exited.
10923 (myresume): Likewise.
10924
0fb4aa4b
PA
109252010-07-01 Pedro Alves <pedro@codesourcery.com>
10926
10927 Static tracepoints, and integration with UST.
10928
10929 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10930 * mem-break.c (uninsert_all_breakpoints)
10931 (reinsert_all_breakpoints): New.
10932 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10933 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10934 (gdb_agent_ust_loaded, helper_thread_id)
10935 (gdb_agent_helper_thread_id): New macros.
10936 (struct ipa_sym_addresses): Add addr_ust_loaded,
10937 addr_helper_thread_id, addr_cmd_buf.
10938 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10939 (in_process_agent_loaded_ust): New.
10940 (write_e_ust_not_loaded): New.
10941 (maybe_write_ipa_ust_not_loaded): New.
10942 (struct collect_static_trace_data_action): New.
10943 (enum tracepoint_type) <static_tracepoint>: New.
10944 (struct tracepoint) <handle>: Mention static tracepoints.
10945 (struct static_tracepoint_ctx): New.
10946 (CMD_BUF_SIZE): New.
10947 (add_tracepoint_action): Handle static tracepoint actions.
10948 (unprobe_marker_at): New.
10949 (clear_installed_tracepoints): Handle static tracepoints.
10950 (cmd_qtdp): Handle static tracepoints.
10951 (probe_marker_at): New.
10952 (cmd_qtstart): Handle static tracepoints.
10953 (response_tracepoint): Handle static tracepoints.
10954 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10955 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10956 (get_context_regcache): Handle static tracepoints.
10957 (do_action_at_tracepoint): Handle static tracepoint actions.
10958 (traceframe_find_block_type): Handle static trace data blocks.
10959 (traceframe_read_sdata): New.
10960 (download_tracepoints): Download static tracepoint actions.
10961 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10962 (GDB_PROBE_NAME): New.
10963 (ust_ops): New.
10964 (GET_UST_SYM): New.
10965 (USTF): New.
10966 (dlsym_ust): New.
10967 (ust_marker_to_static_tracepoint): New.
10968 (gdb_probe): New.
10969 (collect_ust_data_at_tracepoint): New.
10970 (gdb_ust_probe): New.
10971 (UNIX_PATH_MAX, SOCK_DIR): New.
10972 (gdb_ust_connect_sync_socket): New.
10973 (resume_thread, stop_thread): New.
10974 (run_inferior_command): New.
10975 (init_named_socket): New.
10976 (gdb_ust_socket_init): New.
10977 (cstr_to_hexstr): New.
10978 (next_st): New.
10979 (first_marker, next_marker): New.
10980 (response_ust_marker): New.
10981 (cmd_qtfstm, cmd_qtsstm): New.
10982 (unprobe_marker_at, probe_marker_at): New.
10983 (cmd_qtstmat, gdb_ust_thread): New.
10984 (gdb_ust_init): New.
10985 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10986 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10987 (ST_REGENTRY): New.
10988 (x86_64_st_collect_regmap): New.
10989 (X86_64_NUM_ST_COLLECT_GREGS): New.
10990 (AMD64_RIP_REGNUM): New.
10991 (supply_static_tracepoint_registers): New.
10992 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10993 (ST_REGENTRY): New.
10994 (i386_st_collect_regmap): New.
10995 (i386_NUM_ST_COLLECT_GREGS): New.
10996 (supply_static_tracepoint_registers): New.
10997 * server.c (handle_query): Handle qXfer:statictrace:read.
10998 <qSupported>: Report support for StaticTracepoints, and
10999 qXfer:statictrace:read features.
11000 * server.h (traceframe_read_sdata)
11001 (supply_static_tracepoint_registers): Declare.
11002 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11003 (unpack_varlen_hex): Include in IPA build.
11004 * Makefile.in (ustlibs, ustinc): New.
11005 (IPA_OBJS): Add remote-utils-ipa.o.
11006 ($(IPA_LIB)): Link -ldl and -lpthread.
11007 (UST_CFLAGS): New.
11008 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11009 * config.in, configure: Regenerate.
11010
9e4344e5
PA
110112010-06-20 Ian Lance Taylor <iant@google.com>
11012 Pedro Alves <pedro@codesourcery.com>
11013
11014 * linux-x86-low.c (always_true): Delete.
11015 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11016 trying to fool the compiler with always_true.
11017
c6beb2cb
PA
110182010-06-20 Pedro Alves <pedro@codesourcery.com>
11019
11020 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11021 conditions in gdbserver.
11022
d2ed6730
UW
110232010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11024
11025 * spu-low.c (spu_read_memory): Wrap around local store limit.
11026 (spu_write_memory): Likewise.
11027
4e29fb54
PA
110282010-06-15 Pedro Alves <pedro@codesourcery.com>
11029
11030 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11031 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11032 LONGEST uses.
11033 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11034 uses.
11035 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11036 uses with LONGEST uses.
11037
6a271cae
PA
110382010-06-14 Stan Shebs <stan@codesourcery.com>
11039 Pedro Alves <pedro@codesourcery.com>
11040
11041 Bytecode compiler.
11042
11043 * linux-x86-low.c: Include limits.h.
11044 (add_insns): New.
11045 (always_true): New.
11046 (EMIT_ASM): New.
11047 (EMIT_ASM32): New.
11048 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11049 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11050 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11051 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11052 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11053 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11054 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11055 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11056 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11057 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11058 (amd64_emit_void_call_2): New.
11059 (amd64_emit_ops): New.
11060 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11061 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11062 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11063 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11064 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11065 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11066 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11067 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11068 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11069 (i386_emit_stack_adjust, i386_emit_int_call_1)
11070 (i386_emit_void_call_2): New.
11071 (i386_emit_ops): New.
11072 (x86_emit_ops): New.
11073 (the_low_target): Install x86_emit_ops.
11074 * server.h (struct emit_ops): New.
11075 (get_raw_reg_func_addr): Declare.
11076 (current_insn_ptr, emit_error): Declare.
11077 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11078 (set_trace_state_variable_value): New defines.
11079 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11080 addr_get_trace_state_variable_value and
11081 addr_set_trace_state_variable_value.
11082 (symbol_list): New fields for get_raw_reg,
11083 get_trace_state_variable_value and set_trace_state_variable_value.
11084 (condfn): New typedef.
11085 (struct tracepoint): New field `compiled_cond'.
11086 (do_action_at_tracepoint): Clear compiled_cond.
11087 (get_trace_state_variable_value, set_trace_state_variable_value):
11088 Export in the IPA.
11089 (condition_true_at_tracepoint): If there's a compiled condition,
11090 run that.
11091 (current_insn_ptr, emit_error): New globals.
11092 (struct bytecode_address): New.
11093 (get_raw_reg_func_addr): New.
11094 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11095 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11096 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11097 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11098 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11099 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11100 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11101 (compile_tracepoint_condition, compile_bytecodes): New.
11102 * target.h (emit_ops): Forward declare.
11103 (struct target_ops): New field emit_ops.
11104 (target_emit_ops): New.
11105 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11106 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11107 * linux-low.c (linux_emit_ops): New.
11108 (linux_target_ops): Install it.
11109 * linux-low.h (struct linux_target_ops): New field emit_ops.
11110
92b72907
UW
111112010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11112
11113 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11114 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11115
fa593d66
PA
111162010-06-01 Pedro Alves <pedro@codesourcery.com>
11117 Stan Shebs <stan@codesourcery.com>
11118
11119 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11120 (all): Depend on $(extra_libraries).
11121 (install-only): Install the IPA.
11122 (IPA_OBJS, IPA_LIB): New.
11123 (clean): Remove the IPA lib.
11124 (IPAGENT_CFLAGS): New.
11125 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11126 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11127 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11128 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11129 * configure.ac: Check for atomic builtins support in the compiler.
11130 (IPA_DEPFILES, extra_libraries): Define.
11131 * configure.srv (ipa_obj): Add description.
11132 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11133 (i[34567]86-*-linux*): Set ipa_obj.
11134 (x86_64-*-linux*): Set ipa_obj.
11135 * linux-low.c (stabilizing_threads): New.
11136 (supports_fast_tracepoints): New.
11137 (linux_detach): Stabilize threads before detaching.
11138 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11139 the lwp is either not stabilizing, or is moving out of a jump pad.
11140 (linux_fast_tracepoint_collecting): New.
11141 (maybe_move_out_of_jump_pad): New.
11142 (enqueue_one_deferred_signal): New.
11143 (dequeue_one_deferred_signal): New.
11144 (linux_wait_for_event_1): If moving out of a jump pad, defer
11145 pending signals to later.
11146 (linux_stabilize_threads): New.
11147 (linux_wait_1): Check if threads need moving out of jump pads, and
11148 do it if so.
11149 (stuck_in_jump_pad_callback): New.
11150 (move_out_of_jump_pad_callback): New.
11151 (lwp_running): New.
11152 (linux_resume_one_lwp): Handle moving out of jump pads.
11153 (linux_set_resume_request): Dequeue deferred signals.
11154 (need_step_over_p): Also step over fast tracepoint jumps.
11155 (start_step_over): Also uninsert fast tracepoint jumps.
11156 (finish_step_over): Also reinsert fast tracepoint jumps.
11157 (linux_install_fast_tracepoint_jump): New.
11158 (linux_target_ops): Install linux_stabilize_threads and
11159 linux_install_fast_tracepoint_jump_pad.
11160 * linux-low.h (linux_target_ops) <get_thread_area,
11161 install_fast_tracepoint_jump_pad>: New fields.
11162 (struct lwp_info) <collecting_fast_tracepoint,
11163 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11164 (linux_get_thread_area): Declare.
11165 * linux-x86-low.c (jump_insn): New.
11166 (x86_get_thread_area): New.
11167 (append_insns): New.
11168 (push_opcode): New.
11169 (amd64_install_fast_tracepoint_jump_pad): New.
11170 (i386_install_fast_tracepoint_jump_pad): New.
11171 (x86_install_fast_tracepoint_jump_pad): New.
11172 (the_low_target): Install x86_get_thread_area and
11173 x86_install_fast_tracepoint_jump_pad.
11174 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11175 (struct fast_tracepoint_jump): New.
11176 (fast_tracepoint_jump_insn): New.
11177 (fast_tracepoint_jump_shadow): New.
11178 (find_fast_tracepoint_jump_at): New.
11179 (fast_tracepoint_jump_here): New.
11180 (delete_fast_tracepoint_jump): New.
11181 (set_fast_tracepoint_jump): New.
11182 (uninsert_fast_tracepoint_jumps_at): New.
11183 (reinsert_fast_tracepoint_jumps_at): New.
11184 (set_breakpoint_at): Use write_inferior_memory.
11185 (uninsert_raw_breakpoint): Use write_inferior_memory.
11186 (check_mem_read): Mask out fast tracepoint jumps.
11187 (check_mem_write): Mask out fast tracepoint jumps.
11188 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11189 (set_fast_tracepoint_jump): Declare.
11190 (delete_fast_tracepoint_jump)
11191 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11192 (reinsert_fast_tracepoint_jumps_at): Declare.
11193 * regcache.c: Don't compile many functions when building the
11194 in-process agent library.
11195 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11196 the register buffer in the heap.
11197 (free_register_cache): If the register buffer isn't owned by the
11198 regcache, don't free it.
11199 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11200 pre-existing register caches.
11201 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11202 type.
11203 (convert_ascii_to_int): : Constify `from' parameter type.
11204 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11205 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11206 the needed buffer in-place.
11207 (relocate_instruction): New.
11208 * server.c (handle_query) <qSymbols>: If the target supports
11209 tracepoints, give it a chance of looking up symbols. Report
11210 support for fast tracepoints.
11211 (handle_status): Stabilize threads.
11212 (process_serial_event): Adjust.
11213 * server.h (struct fast_tracepoint_jump): Forward declare.
11214 (struct process_info) <fast_tracepoint_jumps>: New field.
11215 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11216 (decode_X_packet, decode_M_packet): Adjust.
11217 (relocate_instruction): Declare.
11218 (in_process_agent_loaded): Declare.
11219 (tracepoint_look_up_symbols): Declare.
11220 (struct fast_tpoint_collect_status): Declare.
11221 (fast_tracepoint_collecting): Declare.
11222 (force_unlock_trace_buffer): Declare.
11223 (handle_tracepoint_bkpts): Declare.
11224 (initialize_low_tracepoint)
11225 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11226 * target.h (struct target_ops) <stabilize_threads,
11227 install_fast_tracepoint_jump_pad>: New fields.
11228 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11229 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11230 [HAVE_STDINT_H]: Include stdint.h.
11231 (trace_debug_1): Rename to ...
11232 (trace_vdebug): ... this.
11233 (trace_debug): Rename to ...
11234 (trace_debug_1): ... this. Add `level' parameter.
11235 (trace_debug): New.
11236 (ATTR_USED, ATTR_NOINLINE): New.
11237 (IP_AGENT_EXPORT): New.
11238 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11239 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11240 (about_to_request_buffer_space, trace_buffer_is_full)
11241 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11242 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11243 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11244 (traceframe_write_count, traceframes_created)
11245 (trace_state_variables)
11246 New renaming defines.
11247 (struct ipa_sym_addresses): New.
11248 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11249 (symbol_list): New.
11250 (ipa_sym_addrs): New.
11251 (all_tracepoint_symbols_looked_up): New.
11252 (in_process_agent_loaded): New.
11253 (write_e_ipa_not_loaded): New.
11254 (maybe_write_ipa_not_loaded): New.
11255 (tracepoint_look_up_symbols): New.
11256 (debug_threads) [IN_PROCESS_AGENT]: New.
11257 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11258 (UNKNOWN_SIDE_EFFECTS): New.
11259 (stop_tracing): New.
11260 (flush_trace_buffer): New.
11261 (stop_tracing_bkpt): New.
11262 (flush_trace_buffer_bkpt): New.
11263 (read_inferior_integer): New.
11264 (read_inferior_uinteger): New.
11265 (read_inferior_data_pointer): New.
11266 (write_inferior_data_pointer): New.
11267 (write_inferior_integer): New.
11268 (write_inferior_uinteger): New.
11269 (struct collect_static_trace_data_action): Delete.
11270 (enum tracepoint_type): New.
11271 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11272 <actions_str, step_actions, step_actions_str>: Only include in
11273 GDBserver.
fa593d66
PA
11274 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11275 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11276 (tracepoints): Use IP_AGENT_EXPORT.
11277 (last_tracepoint): Don't include in the IPA.
11278 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11279 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11280 (alloced_trace_state_variables): New.
11281 (trace_state_variables): Use IP_AGENT_EXPORT.
11282 (traceframe_t): Delete unused variable.
11283 (circular_trace_buffer): Don't include in the IPA.
11284 (trace_buffer_start): Delete.
11285 (struct trace_buffer_control): New.
11286 (trace_buffer_free): Delete.
11287 (struct ipa_trace_buffer_control): New.
11288 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11289 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11290 New.
11291 (trace_buffer_ctrl): New.
11292 (TRACE_BUFFER_CTRL_CURR): New.
11293 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11294 Reimplement as macros.
11295 (trace_buffer_wrap): Delete.
11296 (traceframe_write_count, traceframe_read_count)
11297 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11298 (struct tracepoint_hit_ctx) <type>: New field.
11299 (struct fast_tracepoint_ctx): New.
11300 (memory_barrier): New.
11301 (cmpxchg): New.
11302 (record_tracepoint_error): Update atomically in the IPA.
11303 (clear_inferior_trace_buffer): New.
11304 (about_to_request_buffer_space): New.
11305 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11306 updating the same buffer.
11307 (add_tracepoint): Default the tracepoint's type to trap
11308 tracepoint, and orig_size to -1.
11309 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11310 internal variables.
11311 (create_trace_state_variable): New parameter `gdb'. Handle it.
11312 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11313 (cmd_qtdp): Handle fast tracepoints.
11314 (cmd_qtdv): Adjust.
11315 (max_jump_pad_size): New.
11316 (gdb_jump_pad_head): New.
11317 (get_jump_space_head): New.
11318 (claim_jump_space): New.
11319 (sort_tracepoints): New.
11320 (MAX_JUMP_SIZE): New.
11321 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11322 IPA.
11323 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11324 support. Upload fast traceframes, and delete internal IPA
11325 breakpoints.
11326 (stop_tracing_handler): New.
11327 (flush_trace_buffer_handler): New.
11328 (cmd_qtstop): Upload fast tracepoints.
11329 (response_tracepoint): Handle fast tracepoints.
11330 (tracepoint_finished_step): Upload fast traceframes. Set the
11331 tracepoint hit context's tracepoint type.
11332 (handle_tracepoint_bkpts): New.
11333 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11334 type. Add comment about fast tracepoints.
11335 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11336 non-existing action_str field.
11337 (get_context_regcache): Handle fast tracepoints.
11338 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11339 to the regcache.
11340 (fast_tracepoint_from_jump_pad_address): New.
11341 (fast_tracepoint_from_ipa_tpoint_address): New.
11342 (collecting_t): New.
11343 (force_unlock_trace_buffer): New.
11344 (fast_tracepoint_collecting): New.
11345 (collecting): New.
11346 (gdb_collect): New.
11347 (write_inferior_data_ptr): New.
11348 (target_tp_heap): New.
11349 (target_malloc): New.
11350 (download_agent_expr): New.
11351 (UALIGN): New.
11352 (download_tracepoints): New.
11353 (download_trace_state_variables): New.
11354 (upload_fast_traceframes): New.
11355 (IPA_FIRST_TRACEFRAME): New.
11356 (IPA_NEXT_TRACEFRAME_1): New.
11357 (IPA_NEXT_TRACEFRAME): New.
11358 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11359 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11360 (gdb_jump_pad_buffer_end): New.
11361 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11362 (initialize_tracepoint): Adjust.
11363 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11364 buffer. Initialize the low module.
11365 * utils.c (PREFIX, TOOLNAME): New.
11366 (malloc_failure): Use PREFIX.
11367 (error): In the IPA, an error causes an exit.
11368 (fatal, warning): Use PREFIX.
11369 (internal_error): Use TOOLNAME.
11370 (NUMCELLS): Increase to 10.
11371 * configure, config.in: Regenerate.
11372
d149dd1d
PA
113732010-06-01 Pedro Alves <pedro@codesourcery.com>
11374
11375 * server.c (handle_query) <qSupported>: Do two passes over the
11376 qSupported string to avoid nesting strtok.
11377
f6528abd
JK
113782010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11379
11380 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11381 (CDEPS): New.
11382 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11383 -Wl,--dynamic-list.
11384 * configure: Regenerate.
11385 * proc-service.list: New.
11386
ca2a87a0
JK
113872010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11388
11389 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11390 New comment.
11391
363a6e9f
OS
113922010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11393
11394 * gdbreplay.c (remote_open): Check error return from socket() call by
11395 its equality to -1 not by it being negative.
11396 * remote-utils.c (remote_open): Likewise.
11397
d23b6cb1
PA
113982010-05-23 Pedro Alves <pedro@codesourcery.com>
11399
11400 * config.h: Regenerate.
11401
28d3cf85
MK
114022010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11403
11404 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11405 doesn't provide PTRACE_GET_THREAD_AREA.
11406
fea36a59
MK
114072010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11408
11409 * linux-m68k-low.c: Include <asm/ptrace.h>
11410 (ps_get_thread_area): Implement.
11411
24b066ba
DE
114122010-05-03 Doug Evans <dje@google.com>
11413
11414 * event-loop.c (struct callback_event): New struct.
11415 (callback_list): New global.
11416 (append_callback_event, delete_callback_event): New functions.
11417 (process_callback): New function.
11418 (start_event_loop): Call it.
11419 * remote-utils.c (NOT_SCHEDULED): Define.
11420 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11421 moved out of readchar.
11422 (readchar): Rewrite. Call reschedule before returning.
11423 (reset_readchar): New function.
11424 (remote_close): Call it.
11425 (process_remaining, reschedule): New functions.
11426 * server.h (callback_handler_func): New typedef.
11427 (append_callback_event, delete_callback_event): Declare.
11428
9836d6ea
PA
114292010-05-03 Pedro Alves <pedro@codesourcery.com>
11430
11431 * proc-service.c (ps_pglobal_lookup): Use
11432 thread_db_look_up_one_symbol.
11433 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11434 parameter. Use it instead of all_symbols_looked_up.
11435 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11436 field.
11437 (all_symbols_looked_up): Don't declare.
11438 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11439 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11440 field.
11441 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11442 Set all_symbols_looked_up here.
11443 (thread_db_look_up_one_symbol): New.
11444 (thread_db_get_tls_address): Adjust.
11445 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11446 thread_db object on the heap, and tentatively set it in the
11447 process structure.
11448 (thread_db_init): Don't set all_symbols_looked_up here.
11449 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11450
7984d532
PA
114512010-05-03 Pedro Alves <pedro@codesourcery.com>
11452
11453 * linux-low.c (linux_kill, linux_detach): Adjust.
11454 (status_pending_p_callback): Remove redundant statement. Check
11455 for !TARGET_WAITIKIND_IGNORE, instead of
11456 TARGET_WAITKIND_STOPPED.
11457 (handle_tracepoints): Make sure LWP is locked. Adjust.
11458 (linux_wait_for_event_1): Adjust.
11459 (linux_cancel_breakpoints): New.
11460 (unsuspend_one_lwp): New.
11461 (unsuspend_all_lwps): New.
11462 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11463 (send_sigstop_callback): Change return type to int, add new
11464 `except' parameter and handle it.
11465 (suspend_and_send_sigstop_callback): New.
11466 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11467 pass them down. If SUSPEND, also increment the lwp's suspend
11468 count.
11469 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11470 (need_step_over_p): Don't consider suspended LWPs.
11471 (start_step_over): Adjust.
11472 (proceed_one_lwp): Change return type to int, add new `except'
11473 parameter and handle it.
11474 (unsuspend_and_proceed_one_lwp): New.
11475 (proceed_all_lwps): Use find_inferior instead of
11476 for_each_inferior.
11477 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11478 also decrement the suspend count of LWPs. Pass `except' down,
11479 instead of hacking its suspend count.
11480 (linux_pause_all): Add `freeze' parameter. Adjust.
11481 (linux_unpause_all): New.
11482 (linux_target_ops): Install linux_unpause_all.
11483 * server.c (handle_status): Adjust.
11484 * target.h (struct target_ops): New fields `unpause_all' and
11485 `cancel_breakpoints'. Add new parameter to `pause_all'.
11486 (pause_all): Add new `freeze' parameter.
11487 (unpause_all): New.
11488 (cancel_breakpoints): New.
11489 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11490 cancel breakpoints.
11491 (cmd_qtstart): Pause threads.
11492 (stop_tracing): Pause threads, and cancel breakpoints.
11493 * win32-low.c (win32_target_ops): Adjust.
11494
e471f25b
PA
114952010-05-03 Pedro Alves <pedro@codesourcery.com>
11496
11497 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11498 the inferior right away from here...
11499 (linux_wait_1): ... to here, and adjust to check the thread's
11500 last_resume_kind instead of the lwp's step or stop_expected flags.
11501
1915ef4f
PA
115022010-05-02 Pedro Alves <pedro@codesourcery.com>
11503
11504 * README: Use consistent `GDB' and `GDBserver' spellings.
11505
f9e39928
PA
115062010-05-02 Pedro Alves <pedro@codesourcery.com>
11507
11508 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11509 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11510 (linux_detach_one_lwp): Assume the lwp is stopped.
11511 (any_thread_of): Delete.
11512 (linux_detach): Stop all lwps here. Don't blindly delete all
11513 breakpoints.
11514 (delete_lwp_callback): New.
11515 (linux_mourn): Delete all lwps of the process that is gone.
11516 (linux_wait_1): Don't delete the last lwp of the process here.
11517 * mem-break.h (mark_breakpoints_out): Declare.
11518 * mem-break.c (mark_breakpoints_out): New.
11519 (free_all_breakpoints): Use it.
11520 * server.c (handle_target_event): If the process is gone, mark
11521 breakpoints out.
11522 * thread-db.c (struct thread_db) <create_bp>: New field.
11523 (thread_db_enable_reporting): Fix prototype. Store a thread event
11524 breakpoint reference in the thread_db struct.
11525 (thread_db_load_search): Clear the thread_db object.
11526 (try_thread_db_load_1): Ditto.
11527 (switch_to_process): New.
11528 (disable_thread_event_reporting): Use it.
11529 (remove_thread_event_breakpoints): New.
11530 (thread_db_detach, thread_db_mourn): Use it.
11531
1e7fc18c
PA
115322010-05-01 Pedro Alves <pedro@codesourcery.com>
11533
11534 * linux-low.c (linux_enable_event_reporting): New.
11535 (linux_wait_for_event_1, handle_extended_wait): Use it.
11536
02fc4de7
PA
115372010-04-30 Pedro Alves <pedro@codesourcery.com>
11538
11539 * linux-low.c (linux_kill_one_lwp, linux_kill)
11540 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11541 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11542 SIGSTOP even if the LWP is stopped.
11543 (send_sigstop_callback): New.
11544 (stop_all_lwps): Use send_sigstop_callback instead.
11545 (linux_resume_one_thread): Adjust.
11546 (proceed_one_lwp): Still proceed an LWP that the client has
11547 requested to stop, if we haven't reported it as stopped yet. Make
11548 sure that LWPs the client want stopped, have a pending SIGSTOP.
11549
bc3b5632
DE
115502010-04-26 Doug Evans <dje@google.com>
11551
ae1ada35
DE
11552 * server.c (handle_general_set): Make static.
11553
bc3b5632
DE
11554 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11555 Print received char after testing for error/eof instead of before.
11556 (input_interrupt): Tweak comment.
11557
65730243
DE
115582010-04-23 Doug Evans <dje@google.com>
11559
11560 * server.c (start_inferior): Print inferior argv if --debug.
11561
a8ae7dc0
AR
115622010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11563
11564 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11565 * nto-x86-low.c: Include server.h
11566
1c07cc19
PM
115672010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11568
11569 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11570 be consistent with other sources of this directory.
11571 (init_registers_amd64): Correct name of source file of this function
11572 in the comment.
11573
e0a61e09
PM
115742010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11575
11576 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11577 64-bit executables.
11578
54709339
PM
115792010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11580
11581 * win32-i386-low.c: Add 64-bit support.
11582 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11583 (init_registers_amd64): Declare.
11584 (mappings): Add 64-bit version of array.
11585 (init_windows_x86): New function.
11586 (the_low_target): Change init_arch field to init_windows_x86.
11587
e8f0053d
PM
115882010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11589
11590 * win32-low.c: Adapt to support also 64-bit architecture.
11591 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11592 (get_image_name): Use SIZE_T type for local variable `done'.
11593 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11594 (toolhelp_get_dll_name): Idem.
11595 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11596 Use uintptr_t typecast to avoid warning.
11597 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11598 (handle_exception): Use phex_nz to avoid warning.
11599 (win32_wait): Remove unused local variable `process'.
11600
c481e77e
PM
116012010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11602
11603 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11604 `amd64-avx.o'.
11605
12ea4b69
PM
116062010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11607
11608 * configure.ac: Use `ws2_32' library for srv_mingw.
11609 * configure: Regenerate.
11610 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11611 * remote-utils.c: Likewise.
11612
f6d1620c
L
116132010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11614
11615 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11616 if __x86_64__ is defined.
11617
8e642873
PM
116182010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11619
11620 * configure: Regenerate.
11621
711e434b
PM
116222010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11623
11624 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11625 * target.h (target_ops): New get_tib_address field.
11626 * win32-low.h (win32_thread_info): Add thread_local_base field.
11627 * win32-low.c (child_add_thread): Add tlb argument.
11628 Set thread_local_base field to TLB.
11629 (get_child_debug_event): Adapt to child_add_thread change.
11630 (win32_get_tib_address): New function.
11631 (win32_target_ops): Set get_tib_address field to
11632 win32_get_tib_address.
11633 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11634
505106cd
PA
116352010-04-12 Pedro Alves <pedro@codesourcery.com>
11636
505106cd
PA
11637 * linux-low.c (linux_mourn): Also remove the process.
11638 * server.c (handle_target_event): Don't remove the process here.
11639 * nto-low.c (nto_mourn): New.
11640 (nto_target_ops): Install it.
11641 * spu-low.c (spu_mourn): New.
11642 (spu_target_ops): Install it.
11643 * win32-low.c (win32_mourn): New.
11644 (win32_target_ops): Install it.
11645
e8470a06
PA
116462010-04-12 Pedro Alves <pedro@codesourcery.com>
11647
11648 * server.h (buffer_xml_printf): Remove redundant `;'.
11649
45ba0d02
PA
116502010-04-12 Pedro Alves <pedro@codesourcery.com>
11651
11652 * regcache.c (set_register_cache): Invalidate regcaches before
11653 changing the register cache layout.
11654 (regcache_invalidate_one): Allow a NULL regcache.
11655 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11656 regcaches before changing the register cache layout or the target
11657 regsets.
11658
59e04013
L
116592010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11660
11661 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11662 variable warning on Linux/x86-64.
11663
8336d594
PA
116642010-04-11 Pedro Alves <pedro@codesourcery.com>
11665
11666 GDBserver disconnected tracing support.
11667
11668 * linux-low.c (linux_remove_process): Delete.
11669 (add_lwp): Don't set last_resume_kind here.
11670 (linux_kill): Use `mourn'.
11671 (linux_detach): Use `thread_db_detach', and `mourn'.
11672 (linux_mourn): New.
11673 (linux_attach_lwp_1): Adjust comment.
11674 (linux_attach): last_resume_kind moved the thread_info; adjust.
11675 (status_pending_p_callback): Adjust.
11676 (linux_wait_for_event_1): Adjust.
11677 (count_events_callback, select_singlestep_lwp_callback)
11678 (select_event_lwp_callback, cancel_breakpoints_callback)
11679 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11680 (proceed_one_lwp): Adjust.
11681 (linux_async): Add debug output.
11682 (linux_thread_stopped): New.
11683 (linux_pause_all): New.
11684 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11685 linux_pause_all.
11686 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11687 (thread_db_free): Delete declaration.
11688 (thread_db_detach, thread_db_mourn): Declare.
11689 * thread-db.c (thread_db_init): Use thread_db_mourn.
11690 (thread_db_free): Delete, split in two.
11691 (disable_thread_event_reporting): New.
11692 (thread_db_detach): New.
11693 (thread_db_mourn): New.
11694
11695 * server.h (struct thread_info) <last_resume_kind>: New field.
11696 <attached>: Add comment.
11697 <gdb_detached>: New field.
11698 (handler_func): Change return type to int.
11699 (handle_serial_event, handle_target_event): Ditto.
11700 (gdb_connected): Declare.
11701 (tracing): Delete.
11702 (disconnected_tracing): Declare.
11703 (stop_tracing): Declare.
11704
11705 * server.c (handle_query) <qSupported>: Report support for
11706 disconnected tracing.
11707 (queue_stop_reply_callback): Account for running threads.
11708 (gdb_wants_thread_stopped): New.
11709 (gdb_wants_all_threads_stopped): New.
11710 (gdb_reattached_process): New.
11711 (handle_status): Clear the `gdb_detached' flag of all processes.
11712 In all-stop, stop all threads.
11713 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11714 (process_serial_event): If the remote connection breaks, or if an
11715 exit was forced with "monitor exit", force an event loop exit.
11716 Handle disconnected tracing on detach.
11717 (handle_serial_event): Adjust.
11718 (handle_target_event): If GDB isn't connected, forward events back
11719 to the inferior, unless the last process exited, in which case,
11720 exit gdbserver. Adjust interface.
11721
11722 * remote-utils.c (remote_open): Don't block in accept. Instead
11723 register an event loop source on the listen socket file
11724 descriptor. Refactor bits into ...
11725 (listen_desc): ... this new global.
11726 (gdb_connected): ... this new function.
11727 (enable_async_notification): ... this new function.
11728 (handle_accept_event): ... this new function.
11729 (remote_close): Clear remote_desc.
11730
11731 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11732
11733 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11734 New fields.
11735 (mourn_inferior): Define.
11736 (target_process_qsupported): Avoid the dangling else problem.
11737 (thread_stopped): Define.
11738 (pause_all): Define.
11739 (target_waitstatus_to_string): Declare.
11740 * target.c (target_waitstatus_to_string): New.
11741
11742 * tracepoint.c (tracing): Make extern.
11743 (disconnected_tracing): New.
11744 (stop_tracing): Make extern. Handle tracing stops due to GDB
11745 disconnecting.
11746 (cmd_qtdisconnected): New.
11747 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11748 (handle_tracepoint_general_set): Handle QTDisconnected.
11749
11750 * event-loop.c (event_handler_func): Change return type to int.
11751 (process_event): Bail out if the event handler wants the event
11752 loop to stop.
11753 (handle_file_event): Ditto.
11754 (start_event_loop): Bail out if the event handler wants the event
11755 loop to stop.
11756
11757 * nto-low.c (nto_target_ops): Adjust.
11758 * spu-low.c (spu_wait): Don't remove the process here.
11759 (spu_target_ops): Adjust.
11760 * win32-low.c (win32_wait): Don't remove the process here.
11761 (win32_target_ops): Adjust.
11762
5d267c4c
PA
117632010-04-11 Pedro Alves <pedro@codesourcery.com>
11764
11765 * regcache.c (realloc_register_cache): Invalidate inferior's
11766 regcache before recreating it.
11767
623ccd72
PA
117682010-04-09 Pedro Alves <pedro@codesourcery.com>
11769
11770 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11771
219f2f23
PA
117722010-04-09 Stan Shebs <stan@codesourcery.com>
11773 Pedro Alves <pedro@codesourcery.com>
11774
11775 * server.h (LONGEST): New.
11776 (struct thread_info) <while_stepping>: New field.
11777 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11778 Declare.
11779 (initialize_tracepoint, handle_tracepoint_general_set)
11780 (handle_tracepoint_query, tracepoint_finished_step)
11781 (tracepoint_was_hit, release_while_stepping_state_list):
11782 (current_traceframe): Declare.
11783 * server.c (handle_general_set): Handle tracepoint packets.
11784 (read_memory): New.
11785 (write_memory): New.
11786 (handle_search_memory_1): Use read_memory.
11787 (handle_query): Report support for conditional tracepoints, trace
11788 state variables, and tracepoint sources. Handle tracepoint
11789 queries.
11790 (main): Initialize the tracepoints module.
11791 (process_serial_event): Handle traceframe reads/writes.
11792
11793 * linux-low.c (handle_tracepoints): New.
11794 (linux_wait_1): Call it.
11795 (linux_resume_one_lwp): Handle while-stepping.
11796 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11797 (linux_target_ops): Install them.
11798 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11799 New field.
11800 * linux-x86-low.c (x86_supports_tracepoints): New.
11801 (the_low_target). Install it.
11802
11803 * mem-break.h (delete_breakpoint): Declare.
11804 * mem-break.c (delete_breakpoint): Make external.
11805
11806 * target.h (struct target_ops): Add `supports_tracepoints',
11807 `read_pc', and `write_pc' fields.
11808 (target_supports_tracepoints): Define.
11809 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11810 (phex_nz): New.
11811
11812 * regcache.h (struct regcache) <registers_owned>: New field.
11813 (init_register_cache, regcache_cpy): Declare.
11814 (regcache_read_pc, regcache_write_pc): Declare.
11815 (register_cache_size): Declare.
11816 (supply_regblock): Declare.
11817 * regcache.c (init_register_cache): New.
11818 (new_register_cache): Use it.
11819 (regcache_cpy): New.
11820 (register_cache_size): New.
11821 (supply_regblock): New.
11822 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11823
219f2f23
PA
11824 * tracepoint.c: New.
11825
11826 * Makefile.in (OBS): Add tracepoint.o.
11827 (tracepoint.o): New rule.
11828
3a13a53b
L
118292010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11830
11831 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11832 (i386-mmx.o): New.
11833 (i386-mmx.c): Likewise.
11834 (i386-mmx-linux.o): Likewise.
11835 (i386-mmx-linux.c): Likewise.
11836
11837 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11838 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11839 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11840 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11841
11842 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11843 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11844 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11845
1570b33e
L
118462010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11847
11848 * Makefile.in (clean): Updated.
11849 (i386-avx.o): New.
11850 (i386-avx.c): Likewise.
11851 (i386-avx-linux.o): Likewise.
11852 (i386-avx-linux.c): Likewise.
11853 (amd64-avx.o): Likewise.
11854 (amd64-avx.c): Likewise.
11855 (amd64-avx-linux.o): Likewise.
11856 (amd64-avx-linux.c): Likewise.
11857
11858 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11859 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11860 (srv_amd64_regobj): Add amd64-avx.o.
11861 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11862 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11863 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11864 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11865 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11866 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11867 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11868
11869 * i387-fp.c: Include "i386-xstate.h".
11870 (i387_xsave): New.
11871 (i387_cache_to_xsave): Likewise.
11872 (i387_xsave_to_cache): Likewise.
11873 (x86_xcr0): Likewise.
11874
11875 * i387-fp.h (i387_cache_to_xsave): Likewise.
11876 (i387_xsave_to_cache): Likewise.
11877 (x86_xcr0): Likewise.
11878
11879 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11880 * linux-crisv32-low.c (target_regsets): Likewise.
11881 * linux-m68k-low.c (target_regsets): Likewise.
11882 * linux-mips-low.c (target_regsets): Likewise.
11883 * linux-ppc-low.c (target_regsets): Likewise.
11884 * linux-s390-low.c (target_regsets): Likewise.
11885 * linux-sh-low.c (target_regsets): Likewise.
11886 * linux-sparc-low.c (target_regsets): Likewise.
11887 * linux-xtensa-low.c (target_regsets): Likewise.
11888
11889 * linux-low.c: Include <sys/uio.h>.
11890 (regsets_fetch_inferior_registers): Support nt_type.
11891 (regsets_store_inferior_registers): Likewise.
11892 (linux_process_qsupported): New.
11893 (linux_target_ops): Add linux_process_qsupported.
11894
11895 * linux-low.h (regset_info): Add nt_type.
11896 (linux_target_ops): Add process_qsupported.
11897
11898 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11899 and <sys/uio.h>.
11900 (init_registers_i386_avx_linux): New.
11901 (init_registers_amd64_avx_linux): Likewise.
11902 (xmltarget_i386_linux_no_xml): Likewise.
11903 (xmltarget_amd64_linux_no_xml): Likewise.
11904 (PTRACE_GETREGSET): Likewise.
11905 (PTRACE_SETREGSET): Likewise.
11906 (x86_fill_xstateregset): Likewise.
11907 (x86_store_xstateregset): Likewise.
11908 (use_xml): Likewise.
11909 (x86_linux_update_xmltarget): Likewise.
11910 (x86_linux_process_qsupported): Likewise.
11911 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11912 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11913 init_registers_i386_linux here. Call
11914 x86_linux_update_xmltarget.
11915 (the_low_target): Add x86_linux_process_qsupported.
11916
11917 * server.c (handle_query): Call target_process_qsupported.
11918
11919 * target.h (target_ops): Add process_qsupported.
11920 (target_process_qsupported): New.
11921
fc7238bb
PA
119222010-04-03 Pedro Alves <pedro@codesourcery.com>
11923
11924 * inferiors.c (add_thread): Set last_status kind to
11925 TARGET_WAITKIND_IGNORE.
11926 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11927 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11928 (linux_wait_1): Move `thread' local definition to block that uses
11929 it. Don't NULL initialize `event_child'.
11930 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11931 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11932 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11933
bdabb078
PA
119342010-04-01 Pedro Alves <pedro@codesourcery.com>
11935
11936 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11937 an extended waitstatus, or by a watchpoint.
11938 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11939 thread was stepping or has been stopped by a watchpoint.
11940
d3bbe7a0
PA
119412010-04-01 Pedro Alves <pedro@codesourcery.com>
11942
11943 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11944 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11945 of another, then delete the previous, and validate all
11946 breakpoints.
11947 (validate_inserted_breakpoint): New.
11948 (delete_disabled_breakpoints): New.
11949 (validate_breakpoints): New.
11950 (check_mem_read): Validate breakpoints before trusting their
11951 shadow. Delete disabled breakpoints.
11952 (check_mem_write): Validate breakpoints before trusting they
11953 should be inserted. Delete disabled breakpoints.
11954 * mem-break.h (validate_breakpoints):
11955 * server.c (handle_query): Validate breakpoints when we see a
11956 qSymbol query.
11957
8b07ae33
PA
119582010-04-01 Pedro Alves <pedro@codesourcery.com>
11959
11960 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11961 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11962 if we could tell there's a GDB breakpoint at stop_pc.
11963 (need_step_over_p): Don't do a step over if we find a GDB
11964 breakpoint at the resume PC.
11965
11966 * mem-break.c (struct raw_breakpoint): New.
11967 (enum bkpt_type): New type `gdb_breakpoint'.
11968 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11969 fields. New field `raw'.
11970 (find_raw_breakpoint_at): New.
11971 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11972 breakpoint instead.
11973 (set_breakpoint_at): Adjust.
11974 (delete_raw_breakpoint): New.
11975 (release_breakpoint): New.
11976 (delete_breakpoint): Rename to...
11977 (delete_breakpoint_1): ... this. Add proc parameter. Use
11978 release_breakpoint. Return ENOENT.
11979 (delete_breakpoint): Reimplement.
11980 (find_breakpoint_at): Delete.
11981 (find_gdb_breakpoint_at): New.
11982 (delete_breakpoint_at): Delete.
11983 (set_gdb_breakpoint_at): New.
11984 (delete_gdb_breakpoint_at): New.
11985 (gdb_breakpoint_here): New.
11986 (set_reinsert_breakpoint): Use release_breakpoint.
11987 (uninsert_breakpoint): Rename to ...
11988 (uninsert_raw_breakpoint): ... this.
11989 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11990 (reinsert_raw_breakpoint): Change parameter type to
11991 raw_breakpoint.
11992 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11993 instead.
11994 (check_breakpoints): Adjust. Use release_breakpoint.
11995 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11996 (breakpoint_inserted_here): Ditto.
11997 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11998 Don't trust the breakpoint's shadow if it is not inserted.
11999 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12000 (delete_all_breakpoints): Adjust.
12001 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12002 use delete_breakpoint_1.
12003
12004 * mem-break.h (breakpoints_supported): Delete declaration.
12005 (set_gdb_breakpoint_at): Declare.
12006 (gdb_breakpoint_here): Declare.
12007 (delete_breakpoint_at): Delete.
12008 (delete_gdb_breakpoint_at): Declare.
12009
12010 * server.h (struct raw_breakpoint): Forward declare.
12011 (struct process_info): New field `raw_breakpoints'.
12012
12013 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12014 breakpoints.
12015
6bf5e0ba
PA
120162010-03-24 Pedro Alves <pedro@codesourcery.com>
12017
12018 * linux-low.c (status_pending_p_callback): Fix comment.
12019 (linux_wait_for_event_1): Move most of the internal breakpoint
12020 handling from here...
12021 (linux_wait_1): ... to here.
12022 (count_events_callback): New.
12023 (select_singlestep_lwp_callback): New.
12024 (select_event_lwp_callback): New.
12025 (cancel_breakpoints_callback): New.
12026 (select_event_lwp): New.
12027 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12028 priority to all LWPs that have had events that should be reported
12029 to the client. Cancel breakpoints when about to reporting the
12030 event to the client, not while stopping lwps. No longer cancel
12031 finished single-steps here.
12032 (cancel_finished_single_step): Delete.
12033 (cancel_finished_single_steps): Delete.
12034
414a389f
PA
120352010-03-24 Pedro Alves <pedro@codesourcery.com>
12036
12037 * mem-break.c (enum bkpt_type): New.
12038 (struct breakpoint): New field `type'.
12039 (set_breakpoint_at): Change return type to struct breakpoint
12040 pointer. Set type to `other_breakpoint' by default.
12041 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12042 in the breakpoint list.
12043 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12044 (reinsert_breakpoint): Rename to ...
12045 (reinsert_raw_breakpoint): ... this.
12046 (reinsert_breakpoints_at): Adjust.
12047 * mem-break.h (struct breakpoint): Declare.
12048 (set_breakpoint_at): Change return type to struct breakpoint
12049 pointer.
12050
2280c721
PA
120512010-03-24 Pedro Alves <pedro@codesourcery.com>
12052
12053 * server.c (handle_query): Assign, not compare.
12054
d50171e4
PA
120552010-03-24 Pedro Alves <pedro@codesourcery.com>
12056
12057 Teach linux gdbserver to step-over-breakpoints.
12058
12059 * linux-low.c (can_hardware_single_step): New.
12060 (supports_breakpoints): New.
12061 (handle_extended_wait): If stopping threads, read the stop pc of
12062 the new cloned LWP.
12063 (get_pc): New.
12064 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12065 low target doesn't support retrieving the PC.
12066 (add_lwp): Set last_resume_kind to resume_continue.
12067 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12068 (linux_attach): Don't clear stop_expected. Set the lwp's
12069 last_resume_kind to resume_stop.
12070 (linux_detach_one_lwp): Don't check for removed breakpoints.
12071 (check_removed_breakpoint): Delete.
12072 (status_pending_p): Rename to ...
12073 (status_pending_p_callback): ... this. Don't check for removed
12074 breakpoints. Don't consider threads that are stopped from GDB's
12075 perspective.
12076 (linux_wait_for_lwp): Always read the stop_pc here.
12077 (cancel_breakpoint): New.
12078 (step_over_bkpt): New global.
12079 (linux_wait_for_event_1): Implement stepping over breakpoints.
12080 (gdb_wants_lwp_stopped): New.
12081 (gdb_wants_all_stopped): New.
12082 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12083 single-step traps here. Store the thread's last reported target
12084 wait status.
12085 (send_sigstop): Don't clear stop_expected. Always set it,
12086 instead.
12087 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12088 (cancel_finished_single_step): New.
12089 (cancel_finished_single_steps): New.
12090 (wait_for_sigstop): Don't cancel finished single-step traps here.
12091 (linux_resume_one_lwp): Don't check for removed breakpoints.
12092 Don't set `step' on non-hardware step archs.
12093 (linux_set_resume_request): Ignore resume_stop requests if already
12094 stopping or stopped. Set the lwp's last_resume_kind.
12095 (resume_status_pending_p): Don't check for removed breakpoints.
12096 (need_step_over_p): New.
12097 (start_step_over): New.
12098 (finish_step_over): New.
12099 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12100 requests. Clear the thread's last reported target waitstatus.
12101 Don't use the `suspended' flag. Don't consider pending breakpoints.
12102 (linux_resume): Start a step-over if necessary.
12103 (proceed_one_lwp): New.
12104 (proceed_all_lwps): New.
12105 (unstop_all_lwps): New.
12106 * linux-low.h (struct lwp_info): Rewrite comment for the
12107 `suspended' flag. Add the `stop_pc' field. Delete the
12108 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12109 Add `'last_resume_kind' and `need_step_over' fields.
12110 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12111 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12112 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12113 (set_raw_breakpoint_at): New.
12114 (set_breakpoint_at): Rewrite to use it.
12115 (reinsert_breakpoint_handler): Delete.
12116 (set_reinsert_breakpoint): New.
12117 (reinsert_breakpoint_by_bp): Delete.
12118 (delete_reinsert_breakpoints): New.
12119 (uninsert_breakpoint): Rewrite.
12120 (uninsert_breakpoints_at): New.
12121 (reinsert_breakpoint): Rewrite.
12122 (reinsert_breakpoints_at): New.
12123 (check_breakpoints): Rewrite.
12124 (breakpoint_here): New.
12125 (breakpoint_inserted_here): New.
12126 (check_mem_read): Adjust.
12127 * mem-break.h (breakpoints_supported, breakpoint_here)
12128 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12129 (reinsert_breakpoint_by_bp): Delete declaration.
12130 (delete_reinsert_breakpoints): Declare.
12131 (reinsert_breakpoint): Delete declaration.
12132 (reinsert_breakpoints_at): Declare.
12133 (uninsert_breakpoint): Delete declaration.
12134 (uninsert_breakpoints_at): Declare.
12135 (check_breakpoints): Adjust prototype.
12136 * server.h: Adjust include order.
12137 (struct thread_info): Declare here. Add a `last_status' field.
12138
30ba68cb
MS
121392010-03-23 Michael Snyder <msnyder@vmware.com>
12140
12141 * server.c (crc32): New function.
12142 (handle_query): Add handling for 'qCRC:' request.
12143
b9a881c2
PA
121442010-03-23 Pedro Alves <pedro@codesourcery.com>
12145
12146 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12147 lwp had been stopped by a watchpoint.
12148
e92d13d5
PA
121492010-03-16 Pedro Alves <pedro@codesourcery.com>
12150
12151 * server.h (internal_error): Declare.
12152 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12153 * utils.c (internal_error): New function.
12154
64daa791
AS
121552010-03-15 Andreas Schwab <schwab@redhat.com>
12156
12157 * configure.srv: Fix typo setting srv_regobj.
12158
f52cd8cd
PA
121592010-03-15 Pedro Alves <pedro@codesourcery.com>
12160
12161 * linux-low.c (fetch_register): Avoid passing a non string literal
12162 format to `error'.
12163 (usr_store_inferior_registers): Ditto.
12164
93ae6fdc
PA
121652010-03-14 Pedro Alves <pedro@codesourcery.com>
12166
12167 * linux-low.c (linux_write_memory): Bail out early if peeking
12168 memory failed.
12169
c3adc08c
PA
121702010-03-14 Pedro Alves <pedro@codesourcery.com>
12171
12172 * linux-low.h (struct lwp_info): New fields
12173 `stopped_by_watchpoint' and `stopped_data_address'.
12174 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12175 here, and cache them in the lwp object.
12176 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12177 directly.
12178 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12179 field.
12180 (linux_stopped_by_watchpoint): Rewrite.
12181 (linux_stopped_data_address): Rewrite.
12182
bce522a2
PA
121832010-03-06 Simo Melenius <simo.melenius@iki.fi>
12184
12185 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12186 switching the current inferior, not before.
12187
90884b2b
L
121882010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12189
12190 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12191 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12192 i386-linux.c and amd64-linux.c.
12193 (reg-i386.o): Removed.
12194 (reg-i386.c): Likewise.
12195 (reg-i386-linux.o): Likewise.
12196 (reg-i386-linux.c): Likewise.
12197 (reg-x86-64.o): Likewise.
12198 (reg-x86-64.c): Likewise.
12199 (reg-x86-64-linux.o): Likewise.
12200 (reg-x86-64-linux.c): Likewise.
12201 (i386.o): New.
12202 (i386.c): Likewise.
12203 (i386-linux.o): Likewise.
12204 (i386-linux.c): Likewise.
12205 (amd64.o): Likewise.
12206 (amd64.c): Likewise.
12207 (amd64-linux.o): Likewise.
12208 (amd64-linux.c): Likewise.
12209
12210 * configure.srv (srv_i386_regobj): New.
12211 (srv_i386_linux_regobj): Likewise.
12212 (srv_amd64_regobj): Likewise.
12213 (srv_amd64_linux_regobj): Likewise.
12214 (srv_i386_32bit_xmlfiles): Likewise.
12215 (srv_i386_64bit_xmlfiles): Likewise.
12216 (srv_i386_xmlfiles): Likewise.
12217 (srv_amd64_xmlfiles): Likewise.
12218 (srv_i386_linux_xmlfiles): Likewise.
12219 (srv_amd64_linux_xmlfiles): Likewise.
12220 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12221 srv_xmlfiles to $srv_i386_xmlfiles.
12222 (i[34567]86-*-mingw32ce*): Likewise.
12223 (i[34567]86-*-mingw*): Likewise.
12224 (i[34567]86-*-nto*): Likewise.
12225 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12226 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12227 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12228 (x86_64-*-linux*): Likewise.
12229
12230 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12231 (init_registers_amd64_linux): New.
12232 (x86_arch_setup): Replace init_registers_x86_64_linux with
12233 init_registers_amd64_linux.
12234
193f13e6
MK
122352010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12236
12237 * configure.ac: Check for libdl. If it is not available link against
12238 static libthread_db.
12239 * configure: Regenerate.
12240
85d721b8
PA
122412010-02-22 Pedro Alves <pedro@codesourcery.com>
12242
12243 PR9605
12244
12245 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12246 handing a read watchpoint.
12247 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12248
6076632b
DE
122492010-02-12 Doug Evans <dje@google.com>
12250
12251 * linux-low.c (linux_supports_tracefork_flag): Document.
12252 (linux_look_up_symbols): Add comment.
12253
3327ccf7
L
122542010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12255
12256 * regcache.c (supply_register): Clear regcache if buf is NULL.
12257
0718675c 122582010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12259 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12260
12261 * inferiors.c (find_inferior): Add function documentation.
12262 (unloaded_dll): Handle the case where the unloaded dll has not
12263 been previously registered in the dll list.
12264
177321bd
DJ
122652010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12266
12267 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12268 (thumb2_breakpoint): New.
12269 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12270
2b009048
DJ
122712010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12272
12273 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12274 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12275 breakpoints.
12276
3be029c7
PA
122772010-01-21 Pedro Alves <pedro@codesourcery.com>
12278
12279 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12280
18f5de3b
JK
122812010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12282
12283 * linux-s390-low.c (s390_collect_ptrace_register)
12284 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12285
3743bb4f
DE
122862010-01-21 Doug Evans <dje@google.com>
12287
14ce3065
DE
12288 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12289 (PTRACE_ARG4_TYPE): New macro.
12290 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12291 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12292 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12293 (usr_store_inferior_registers): Ditto.
12294 (linux_read_memory, linux_write_memory): Ditto.
12295 (linux_test_for_tracefork): Ditto.
12296
3743bb4f
DE
12297 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12298 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12299
8b315be5
PA
123002010-01-21 Pedro Alves <pedro@codesourcery.com>
12301
12302 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12303 target.
12304
85492558
PA
123052010-01-21 Pedro Alves <pedro@codesourcery.com>
12306
12307 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12308 prototype to take a regcache. Adjust.
12309
442ea881
PA
123102010-01-20 Pedro Alves <pedro@codesourcery.com>
12311
12312 * regcache.h (struct thread_info): Forward declare.
12313 (struct regcache): New.
12314 (new_register_cache): Adjust prototype.
12315 (get_thread_regcache): Declare.
12316 (free_register_cache): Adjust prototype.
12317 (registers_to_string, registers_from_string): Ditto.
12318 (supply_register, supply_register_by_name, collect_register)
12319 (collect_register_as_string, collect_register_by_name): Ditto.
12320 * regcache.c (struct inferior_regcache_data): Delete.
12321 (get_regcache): Rename to ...
12322 (get_thread_regcache): ... this. Adjust. Switch inferior before
12323 fetching registers.
12324 (regcache_invalidate_one): Adjust.
12325 (regcache_invalidate): Fix prototype.
12326 (new_register_cache): Return the new register cache.
12327 (free_register_cache): Change prototype.
12328 (realloc_register_cache): Adjust.
12329 (registers_to_string): Change prototype to take a regcache. Adjust.
12330 (registers_from_string): Ditto.
12331 (register_data): Ditto.
12332 (supply_register): Ditto.
12333 (supply_register_by_name): Ditto.
12334 (collect_register): Ditto.
12335 (collect_register_as_string): Ditto.
12336 (collect_register_by_name): Ditto.
12337 * server.c (process_serial_event): Adjust.
12338 * linux-low.h (regset_fill_func, regset_store_func): Change
12339 prototype.
12340 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12341 Change prototype.
12342 * linux-low.c (get_stop_pc): Adjust.
12343 (check_removed_breakpoint): Adjust.
12344 (linux_wait_for_event): Adjust.
12345 (linux_resume_one_lwp): Adjust.
12346 (fetch_register): Add regcache parameter. Adjust.
12347 (usr_store_inferior_registers): Ditto.
12348 (regsets_fetch_inferior_registers): Ditto.
12349 (regsets_store_inferior_registers): Ditto.
12350 (linux_fetch_registers, linux_store_registers): Ditto.
12351 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12352 regcache. Adjust.
43aaf8b6
PA
12353 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12354 Ditto.
442ea881
PA
12355 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12356 prototype to take a regcache.
12357 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12358 * remote-utils.c (convert_ascii_to_int, outreg)
12359 (prepare_resume_reply): Change prototype to take a regcache.
12360 Adjust.
12361 * target.h (struct target_ops) <fetch_registers, store_registers>:
12362 Change prototype to take a regcache.
12363 (fetch_inferior_registers, store_inferior_registers): Change
12364 prototype to take a regcache. Adjust.
12365 * proc-service.c (ps_lgetregs): Adjust.
12366 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12367 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12368 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12369 take a regcache. Adjust.
12370 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12371 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12372 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12373 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12374 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12375 (cris_cannot_fetch_register):
12376 (cris_breakpoint_at): Change prototype to take a regcache.
12377 Adjust.
12378 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12379 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12380 to take a regcache. Adjust.
12381 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12382 Adjust.
12383 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12384 take a regcache. Adjust.
12385 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12386 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12387 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12388 * linux-mips-low.c (mips_get_pc):
12389 (mips_set_pc): Change prototype to take a regcache. Adjust.
12390 (mips_reinsert_addr): Adjust.
12391 (mips_collect_register): Change prototype to take a regcache.
12392 Adjust.
12393 (mips_supply_register):
12394 (mips_collect_register_32bit, mips_supply_register_32bit)
12395 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12396 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12397 * linux-ppc-low.c (ppc_supply_ptrace_register)
12398 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12399 (parse_spufs_run): Adjust.
12400 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12401 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12402 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12403 take a regcache. Adjust.
12404 * linux-s390-low.c (s390_collect_ptrace_register)
12405 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12406 (s390_set_pc): Change prototype to take a regcache. Adjust.
12407 (s390_arch_setup): Adjust.
12408 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12409 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12410 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12411 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12412 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12413 regcache. Adjust.
12414 (sparc_breakpoint_at): Adjust.
12415 * linux-xtensa-low.c (xtensa_fill_gregset):
12416 (xtensa_store_gregset):
12417 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12418 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12419 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12420 prototype to take a regcache. Adjust.
12421 * win32-arm-low.c (arm_fetch_inferior_register)
12422 (arm_store_inferior_register): Change prototype to take a
12423 regcache. Adjust.
12424 * win32-i386-low.c (i386_fetch_inferior_register)
12425 (i386_store_inferior_register): Change prototype to take a
12426 regcache. Adjust.
12427 * win32-low.c (child_fetch_inferior_registers)
12428 (child_store_inferior_registers): Change prototype to take a
12429 regcache. Adjust.
12430 (win32_wait): Adjust.
12431 (win32_fetch_inferior_registers): Change prototype to take a
12432 regcache. Adjust.
12433 (win32_store_inferior_registers): Adjust.
12434 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12435 store_inferior_register>: Change prototype to take a regcache.
12436
60c3d7b0
DE
124372010-01-20 Doug Evans <dje@google.com>
12438
12439 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12440 #ifdef.
12441 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12442 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12443
dc146f7c
VP
124442010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12445
12446 * linux-low.c (linux_core_of_thread): New.
12447 (compare_ints, show_process, list_threads): New.
12448 (linux_qxfer_osdata): Report threads and cores.
12449 (linux_target_op): Register linux_core_of_thread.
12450 * remote-utils.c (prepare_resume_reply): Report the core.
12451 (buffer_xml_printf): Support %d specifier.
12452 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12453 New.
12454 (handle_query): Handle qXfer:threads. Announce availability
12455 thereof.
12456 * target.h (struct target_ops): New field core_of_thread.
12457
7803799a
UW
124582010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12459
12460 * Makefile.in (clean): Remove new generated files.
12461 (reg-s390.o, reg-s390.c): Remove rules.
12462 (reg-s390x.o, reg-s390x.c): Likewise.
12463 (s390-linux32.o, s390-linux32.c): Add rules.
12464 (s390-linux64.o, s390-linux64.c): Likewise.
12465 (s390x-linux64.o, s390x-linux64.c): Likewise.
12466 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12467 * linux-s390-low.c: Include <elf.h>.
12468 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12469 (init_registers_s390): Remove prototype.
12470 (init_registers_s390x): Likewise.
12471 (init_registers_s390_linux32): Add prototype.
12472 (init_registers_s390_linux64): Likewise.
12473 (init_registers_s390x_linux64): Likewise.
12474 (s390_num_regs_3264): New define.
12475 (s390_regmap_3264): New global variable.
12476 (s390_cannot_fetch_register): Remove obsolete check.
12477 (s390_cannot_store_register): Likewise.
12478 (s390_collect_ptrace_register): Handle upper/lower register halves.
12479 (s390_supply_ptrace_register): Likewise.
12480 (s390_fill_gregset): Update to register number changes.
12481 (s390_get_hwcap): New routine.
12482 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12483 Install appropriate regmap and register set.
12484
6e7ffa39
JB
124852010-01-01 Joel Brobecker <brobecker@adacore.com>
12486
12487 * server.c (gdbserver_version): Update copyright year to 2010.
12488 * gdbreplay.c (gdbreplay_version): Likewise.
12489
957f3f49
DE
124902009-12-28 Doug Evans <dje@google.com>
12491
12492 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12493 elf/external.h. Include <elf.h> instead but only if necessary.
12494
ca5c370d
PA
124952009-12-28 Pedro Alves <pedro@codesourcery.com>
12496
12497 * linux-low.c (linux_remove_process): Remove `detaching'
12498 parameter. Don't release/detach from thread_db here.
12499 (linux_kill): Release/detach from thread_db here, ...
12500 (linux_detach): ... and here, before actually detaching.
12501 (linux_wait_1): ... and here, when a process exits.
12502 * thread-db.c (any_thread_of): New.
12503 (thread_db_free): Switch the current inferior to a thread of the
12504 passed in process.
12505
4ee62156
DE
125062009-12-21 Doug Evans <dje@google.com>
12507
d90e6a88
DE
12508 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12509
c5f62d5f
DE
12510 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12511 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12512 warning ifndef __NR_tkill. Move setting of errno there too.
12513 Delete unnecessary resetting of errno after syscall.
12514 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12515
10e86dd7
DE
12516 * configure.ac: Check for dladdr.
12517 * config.in: Regenerate.
12518 * configure: Regenerate.
12519 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12520 (try_thread_db_load): Update.
12521
4ee62156
DE
12522 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12523
00f515da
DE
125242009-12-18 Doug Evans <dje@google.com>
12525
e9464885
DE
12526 * event-loop.c: Include unistd.h if it exists.
12527
07d4f67e
DE
12528 * linux-low.c (my_waitpid): Move definition away from being in
12529 between linux_tracefork_child/linux_test_for_tracefork.
12530
00f515da
DE
12531 * gdb_proc_service.h (psaddr_t): Fix type.
12532 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12533 signature to match glibc.
12534
1de1badb
DE
125352009-12-16 Doug Evans <dje@google.com>
12536
12537 * linux-low.c (linux_read_memory): Fix argument to read.
12538
aeeb81d1
PA
125392009-11-26 Pedro Alves <pedro@codesourcery.com>
12540
12541 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12542 events, don't leave current_inferior pointing at null.
12543
10357975
PA
125442009-11-26 Pedro Alves <pedro@codesourcery.com>
12545
12546 * win32-low.c (LOG): Delete.
12547 (OUTMSG): Output to stderr.
12548 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12549 on compile time LOG macro.
12550 (win32_wait): Fix debug output.
12551
cf6e3471
PA
125522009-11-26 Pedro Alves <pedro@codesourcery.com>
12553
12554 * win32-low.c (win32_add_one_solib): If the dll name is
12555 "ntdll.dll", prepend the system directory to the dll path.
12556
0c85e18e
MK
125572009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12558
12559 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12560
9ac544ce 125612009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12562 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12563
12564 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12565 * configure.ac: Check for __mcoldfire__ and set
12566 gdb_cv_m68k_is_coldfire.
12567 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12568 reg-cf.o and reg-m68k.o.
12569 * configure: Regenerated.
12570
fd7dd3e6
PA
125712009-11-16 Pedro Alves <pedro@codesourcery.com>
12572
12573 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12574 Pass it to thread_db_free.
12575 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12576 proper `detaching' argument to linux_remove_process.
12577 * linux-low.h (thread_db_free): Add `detaching' parameter.
12578 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12579 to thread_db_free.
12580 (thread_db_free): Add `detaching' parameter. Only
12581 call td_ta_clear_event if detaching from process.
12582
75aa492e
MK
125832009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12584
12585 * thread-db.c (thread_db_free): Fix typo.
12586
21e1bee4
PP
125872009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12588
12589 PR gdb/10838
12590 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12591
8838b45e
NS
125922009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12593
12594 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12595 with an i686 compiler.
12596 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12597 needed.
12598 * configure: Rebuilt.
12599
8a35fb51
SL
126002009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12601
12602 PR gdb/10783
12603
12604 * server.c (handle_search_memory_1): Correct read_addr initialization
12605 in loop for searching subsequent chunks.
12606
96f15937
PP
126072009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12608
12609 * configure.ac: New --with-libthread-db option.
12610 * thread-db.c: Allow direct dependence on libthread_db.
12611 (thread_db_free): Adjust.
12612 * config.in: Regenerate.
12613 * configure: Likewise.
889bf7c5 12614
5f7d1694
PP
126152009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12616
12617 PR gdb/10757
12618 * thread-db.c (attach_thread): New function.
12619 (maybe_attach_thread): Return success/failure.
12620 (find_new_threads_callback): Adjust.
889bf7c5
PA
12621 (thread_db_find_new_threads): Loop until no new threads.
12622
88e3b899
PA
126232009-10-13 Pedro Alves <pedro@codesourcery.com>
12624
12625 * proc-service.c (ps_lgetregs): Formatting.
12626
cdbfd419
PP
126272009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12628
12629 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12630 * configure.ac: Adjust.
12631 * linux-low.h (struct process_info_private): Move members to struct
12632 thread_db.
12633 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12634 * linux-low.c (linux_remove_process): Adjust.
12635 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12636 * server.c (handle_query): Move code ...
12637 (handle_monitor_command): ... here. New function.
12638 * target.h (struct target_ops): New member.
12639 * thread-db.c (struct thread_db): New.
12640 (libthread_db_search_path): New variable.
12641 (thread_db_create_event, thread_db_enable_reporting)
12642 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12643 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12644 (try_thread_db_load_1, dladdr_to_soname): New functions.
12645 (try_thread_db_load, thread_db_load_search): New functions.
12646 (thread_db_init): Search for libthread_db.
12647 (thread_db_free): New function.
12648 (thread_db_handle_monitor_command): Likewise.
12649 * config.in: Regenerate.
12650 * configure: Regenerate.
889bf7c5 12651
4168d2d6
UW
126522009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12653
12654 * spu-low.c (spu_kill): Wait for inferior to terminate.
12655 Call clear_inferiors.
12656 (spu_detach): Call clear_inferiors.
12657
81ecdfbb
RW
126582009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12659
12660 * aclocal.m4: Regenerate.
12661 * config.in: Likewise.
12662 * configure: Likewise.
12663
0b9ff2c0
UW
126642009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12665
12666 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12667 (parse_spufs_run): New function.
12668 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12669 (ppc_breakpoint_at): Handle SPU breakpoints.
12670
efcbbd14
UW
126712009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12672
12673 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12674 (SPUFS_MAGIC): Define.
12675 (spu_enumerate_spu_ids): New function.
12676 (linux_qxfer_spu): New function.
12677 (linux_target_ops): Install linux_qxfer_spu.
12678
f4d9bade
UW
126792009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12680
12681 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12682 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12683 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12684 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12685 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12686 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12687 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12688 (init_registers_powerpc_cell32l): Add prototype.
12689 (init_registers_powerpc_cell64l): Likewise.
12690 (ppc_arch_setup): Detect Cell/B.E. architecture.
12691
96e946ca
RW
126922009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12693
12694 * Makefile.in (datarootdir): New variable.
12695
58d6951d
DJ
126962009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12697
12698 * linux-low.c (linux_write_memory): Update debugging output.
12699 * Makefile.in (clean): Add new descriptions.
12700 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12701 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12702 * configure.srv: Add new files for arm*-*-linux*.
12703 * linux-arm-low.c: Add new declarations.
12704 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12705 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12706 (HWCAP_VFPv3D16): New.
12707 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12708 instead of __IWMMXT__.
12709 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12710 (arm_arch_setup): New.
12711 (target_regsets): Remove #ifdef. Add VFP regset.
12712 (the_low_target): Use arm_arch_setup.
12713
12b42a12
DJ
127142009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12715
12716 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12717 the main thread again.
12718
ac8c974e
AR
127192009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12720
12721 Adding Neutrino gdbserver.
12722 * configure: Regenerated.
12723 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12724 * configure.srv (i[34567]86-*-nto*): New target.
12725 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12726 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12727 (nto_comctrl) [__QNX__]: New function.
12728 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12729
4424e0c3 127302009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12731
12732 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12733 srv_tgtobj.
12734
912cf4ba
PA
127352009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12736 Pedro Alves <pedro@codesourcery.com>
12737
12738 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12739 don't support CONTEXT_EXTENDED_REGISTERS.
12740 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12741 (the_low_target): Install them.
12742 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12743 failing with ERROR_PIPE_NOT_CONNECTED.
12744
aa5ca48f
DE
127452009-06-30 Doug Evans <dje@google.com>
12746 Pierre Muller <muller@ics.u-strasbg.fr>
12747
12748 Add h/w watchpoint support to x86-linux, win32-i386.
12749 * Makefile.in (SFILES): Add i386-low.c
12750 (i386_low_h): Define.
12751 (i386-low.o): Add dependencies.
12752 (linux-x86-low.o): Add i386-low.h dependency.
12753 (win32-i386-low.o): Ditto.
12754 * i386-low.c: New file.
12755 * i386-low.h: New file.
12756 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12757 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12758 * linux-low.c (linux_add_process): Initialize arch_private.
12759 (linux_remove_process): Free arch_private.
12760 (add_lwp): Initialize arch_private.
12761 (delete_lwp): Free arch_private.
12762 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12763 provided.
12764 * linux-low.h (process_info_private): New member arch_private.
12765 (lwp_info): New member arch_private.
12766 (linux_target_ops): New members new_process, new_thread,
12767 prepare_to_resume.
12768 (ptid_of): New macro.
12769 * linux-x86-low.c: Include stddef.h, i386-low.h.
12770 (arch_process_info): New struct.
12771 (arch_lwp_info): New struct.
12772 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12773 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12774 (i386_dr_low_get_status): New function.
12775 (x86_insert_point, x86_remove_point): New functions.
12776 (x86_stopped_by_watchpoint): New function.
12777 (x86_stopped_data_address): New function.
12778 (x86_linux_new_process, x86_linux_new_thread): New functions.
12779 (x86_linux_prepare_to_resume): New function.
12780 (the_low_target): Add entries for insert_point, remove_point,
12781 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12782 prepare_to_resume.
12783 * server.c (debug_hw_points): New global.
12784 (monitor_show_help): Document set debug-hw-points.
12785 (handle_query): Process "set debug-hw-points".
12786 * server.h (debug_hw_points): Declare.
12787 (paddress): Declare.
12788 * utils.c (NUMCELLS, CELLSIZE): New macros.
12789 (get_sell, xsnprintf, paddress): New functions.
12790 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12791 remove_point, stopped_by_watchpoint, stopped_data_address.
12792 * win32-i386-low.c: Include i386-low.h.
12793 (debug_reg_state): Replaces dr.
12794 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12795 (i386_dr_low_get_status): New function.
12796 (i386_insert_point, i386_remove_point): New functions.
12797 (i386_stopped_by_watchpoint): New function.
12798 (i386_stopped_data_address): New function.
12799 (i386_initial_stuff): Update.
12800 (get_thread_context,set_thread_context,i386_thread_added): Update.
12801 (the_low_target): Add entries for insert_point,
12802 remove_point, stopped_by_watchpoint, stopped_data_address.
12803 * win32-low.c (win32_insert_watchpoint): New function.
12804 (win32_remove_watchpoint): New function.
12805 (win32_stopped_by_watchpoint): New function.
12806 (win32_stopped_data_address): New function.
12807 (win32_target_ops): Add entries for insert_watchpoint,
12808 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12809 * win32-low.h (win32_target_ops): New members insert_point,
12810 remove_point, stopped_by_watchpoint, stopped_data_address.
12811
d993e290
PA
128122009-06-25 Pedro Alves <pedro@codesourcery.com>
12813
12814 * server.c (process_serial_event): Re-return unsupported, not
12815 error, if the type isn't recognized. Re-allow supporting only
12816 insert or remove packets. Also call require_running for
12817 breakpoints. Add missing break statement to default case. Tidy.
12818 * target.h (struct target_ops): Rename insert_watchpoint to
12819 insert_point, and remove_watchpoint to remove_point.
12820
12821 * linux-low.h (struct linux_target_ops): Likewise.
12822 * linux-low.c (linux_insert_watchpoint): Rename to ...
12823 (linux_insert_point): ... this. Adjust.
12824 (linux_remove_watchpoint): Rename to ...
12825 (linux_remove_point): ... this. Adjust.
12826 (linux_target_ops): Adjust.
12827 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12828 (cris_insert_point): ... this.
12829 (cris_remove_watchpoint): Rename to ...
12830 (cris_remove_point): ... this.
12831 (the_low_target): Adjust.
12832
0f54c268
PM
128332009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12834
12835 * server.c (handle_v_kill): Pass signal_pid to
12836 kill_inferior if multi_process is zero.
12837
c6314022
AR
128382009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12839
12840 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12841 * target.h (target_ops): Comment for *_watchpoint to make it clear
12842 the functions can get types '0' and '1'.
12843
4463ce24
AR
128442009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12845
12846 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12847 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12848 * regcache.c (get_regcache): Likewise.
12849 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12850 * win32-low.c (child_fetch_inferior_registers): Remove check for
12851 regno 0.
12852
cf8fd78b
PA
128532009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12854 Pedro Alves <pedro@codesourcery.com>
12855
12856 * target.h (struct target_ops) <supports_multi_process>: New
12857 callback.
12858 (target_supports_multi_process): New.
12859 * server.c (handle_query): Even if GDB reports support, only
12860 enable multi-process if the target also supports it. Report
12861 multi-process support only if the target backend supports it.
12862 * linux-low.c (linux_supports_multi_process): New function.
12863 (linux_target_ops): Install it as target_supports_multi_process
12864 callback.
12865
47c0c975
DE
128662009-05-24 Doug Evans <dje@google.com>
12867
e09875d4
DE
12868 Global renaming of find_thread_pid to find_thread_ptid.
12869 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12870 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12871 All callers updated.
12872
e27d73f6
DE
12873 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12874 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12875 directly.
12876
47c0c975
DE
12877 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12878 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12879 (linux_resume_one_lwp): Ditto.
12880
2acc282a
DE
128812009-05-23 Doug Evans <dje@google.com>
12882
12883 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12884 from struct inferior_list_entry * to struct lwp_info *.
12885 All callers updated.
12886
9f1036c1
DE
128872009-05-13 Doug Evans <dje@google.com>
12888
12889 * linux-x86-low.c: Don't include assert.h.
12890 (x86_siginfo_fixup): Use fatal, not assert.
12891 (x86_arch_setup): Fix comment.
12892
d0722149
DE
128932009-05-12 Doug Evans <dje@google.com>
12894
12895 Biarch support for i386/amd64 gdbserver.
12896 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12897 Add linux-x86-low.c.
12898 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12899 (linux-x86-low.o): Add.
12900 * linux-x86-64-low.c: Delete.
12901 * linux-i386-low.c: Delete.
12902 * linux-x86-low.c: New file.
12903 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12904 linux-x86-low.o.
12905 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12906 linux-x86-low.o.
12907 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12908 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12909 (linux_child_pid_to_exec_file): New function.
12910 (elf_64_header_p, elf_64_file_p): New functions.
12911 (siginfo_fixup): New function.
12912 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12913 give target a chance to convert layout.
12914 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12915 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12916
fdeb2a12
DE
129172009-05-07 Doug Evans <dje@google.com>
12918
12919 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12920 (regsets_store_inferior_registers): Ditto.
12921
a6dbe5df
PA
129222009-05-06 Pedro Alves <pedro@codesourcery.com>
12923
12924 PR server/10048
12925
12926 * linux-low.c (must_set_ptrace_flags): Delete.
12927 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12928 of the global.
12929 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12930 `lwp->must_set_ptrace_flags' instead.
ba42693b 12931 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12932 (linux_wait_1): ... not here.
12933
5091eb23
DE
129342009-04-30 Doug Evans <dje@google.com>
12935
9f767825
DE
12936 * inferiors.c (started_inferior_callback): New function.
12937 (attached_inferior_callback): New function.
12938 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12939 * server.c (print_started_pid, print_attached_pid): New functions.
12940 (detach_or_kill_for_exit): New function.
12941 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12942 * server.h (have_started_inferiors_p): Declare.
12943 (have_attached_inferiors_p): Declare.
12944
5091eb23
DE
12945 * inferiors.c (remove_process): Fix memory leak, free process.
12946 * linux-low.c (linux_remove_process): New function.
12947 (linux_kill): Call it instead of remove_process.
12948 (linux_detach, linux_wait_1): Ditto.
12949
155c8968
PA
129502009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12951
12952 * configure.srv: Add x86 Windows CE target.
12953
7fe519cb
UW
129542009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12955
12956 * inferiors.c (get_thread_process): Make global.
12957 * server.h (get_thread_process): Add prototype.
12958 * thread-db.c (find_one_thread): Use get_thread_process
12959 instead of current_process.
12960 (thread_db_get_tls_address): Do not crash if called when
12961 thread layer is not yet initialized.
12962
5472f405
UW
129632009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12964
12965 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12966 * spu-low.c (current_tid): Rename to ...
12967 (current_ptid): ... this.
12968 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12969 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12970 ptid_get_lwp (current_ptid) instead of current_tid.
12971 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12972 instead of current_tid. Use find_process_pid to verify pid
12973 argument is valid. Pass proper argument to remove_process.
12974 (spu_thread_alive): Compare current_ptid instead of current_tid.
12975 (spu_resume): Likewise.
12976
55ac2b99
PA
129772009-04-02 Pedro Alves <pedro@codesourcery.com>
12978
12979 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12980 variable.
12981
95954743
PA
129822009-04-01 Pedro Alves <pedro@codesourcery.com>
12983
12984 Implement the multiprocess extensions, and add linux multiprocess
12985 support.
12986
12987 * server.h (ULONGEST): Declare.
12988 (struct ptid, ptid_t): New.
12989 (minus_one_ptid, null_ptid): Declare.
12990 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12991 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12992 (struct inferior_list_entry): Change `id' type from unsigned from
12993 to ptid_t.
12994 (struct sym_cache, struct breakpoint, struct
12995 process_info_private): Forward declare.
12996 (struct process_info): Declare.
12997 (current_process): Declare.
12998 (all_processes): Declare.
12999 (initialize_inferiors): Declare.
13000 (add_thread): Adjust to use ptid_t.
13001 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13002 (add_process, remove_process, find_thread_pid): Declare.
13003 (find_inferior_id): Adjust to use ptid_t.
13004 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13005 (multi_process): Declare.
13006 (push_event): Adjust to use ptid_t.
13007 (read_ptid, write_ptid): Declare.
13008 (prepare_resume_reply): Adjust to use ptid_t.
13009 (clear_symbol_cache): Declare.
13010 * inferiors.c (all_processes): New.
13011 (null_ptid, minus_one_ptid): New.
13012 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13013 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13014 (add_thread): Change unsigned long to ptid. Remove gdb_id
13015 parameter. Adjust.
13016 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13017 (gdb_id_to_thread): Rename to ...
13018 (find_thread_pid): ... this. Change unsigned long to ptid.
13019 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13020 (loaded_dll, pull_pid_from_list): Adjust.
13021 (add_process, remove_process, find_process_pid)
13022 (get_thread_process, current_process, initialize_inferiors): New.
13023 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13024 (struct target_waitstatus) <related_pid>: Ditto.
13025 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13026 return type to int.
13027 (struct target_ops) <join>: Add `pid' argument.
13028 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13029 (struct target_ops) <wait>: Add `ptid' field. Change return type
13030 to ptid.
13031 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13032 (mywait): Add `ptid' argument. Change return type to ptid_t.
13033 (target_pid_to_str): Declare.
13034 * target.c (set_desired_inferior): Adjust to use ptids.
13035 (mywait): Add new `ptid' argument. Adjust.
13036 (target_pid_to_str): New.
13037 * mem-break.h (free_all_breakpoints): Declare.
13038 * mem-break.c (breakpoints): Delelete.
13039 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13040 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13041 to use per-process breakpoint list.
13042 (free_all_breakpoints): New.
13043 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13044 (symbol_cache, all_symbols_looked_up): Delete.
13045 (hexchars): New.
13046 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13047 read_ptid): New.
13048 (prepare_resume_reply): Change ptid argument's type from unsigned
13049 long to ptid_t. Adjust. Implement W;process and X;process.
13050 (free_sym_cache, clear_symbol_cache): New.
13051 (look_up_one_symbol): Adjust to per-process symbol cache. *
13052 * server.c (cont_thread, general_thread, step_thread): Change type
13053 to ptid_t.
13054 (attached): Delete.
13055 (multi_process): New.
13056 (last_ptid): Change type to ptid_t.
13057 (struct vstop_notif) <ptid>: Change type to ptid_t.
13058 (queue_stop_reply, push_event): Change `ptid' argument's type to
13059 ptid_t.
13060 (discard_queued_stop_replies): Add `pid' argument.
13061 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13062 changes. Don't reference the `attached' global.
13063 (attach_inferior): Adjust to mywait interface changes.
13064 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13065 features. Handle and report "multiprocess+". Handle
13066 "qAttached:PID".
13067 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13068 changes.
13069 (handle_v_kill): New.
13070 (handle_v_stopped): Adjust to use target_pid_to_str.
13071 (handle_v_requests): Allow multiple attaches and runs when
13072 multiprocess extensions are in effect. Handle "vKill".
13073 (myresume): Adjust to use ptids.
13074 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13075 (handle_status): Adjust to discard_queued_stop_replies interface
13076 change.
13077 (first_thread_of, kill_inferior_callback)
13078 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13079 (main): Call initialize_inferiors. Adjust to use ptids, killing
13080 and detaching from all inferiors. Handle multiprocess packet
13081 variants.
13082 * linux-low.h: Include gdb_proc_service.h.
13083 (struct process_info_private): New.
13084 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13085 <lwpid_of>: Use ptid_get_lwp.
13086 (get_lwp_thread): Adjust.
13087 (struct lwp_info): Add `dead' member.
13088 (find_lwp_pid): Declare.
13089 * linux-low.c (thread_db_active): Delete.
13090 (new_inferior): Adjust comment.
13091 (inferior_pid): Delete.
13092 (linux_add_process): New.
13093 (handle_extended_wait): Adjust.
13094 (add_lwp): Change unsigned long to ptid.
13095 (linux_create_inferior): Add process to processes table. Adjust
13096 to use ptids. Don't set new_inferior here.
13097 (linux_attach_lwp): Rename to ...
13098 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13099 it. Adjust to use ptids.
13100 (linux_attach_lwp): New.
13101 (linux_attach): Add process to processes table. Don't set
13102 new_inferior here.
13103 (struct counter): New.
13104 (second_thread_of_pid_p, last_thread_of_process_p): New.
13105 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13106 multiple processes.
13107 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13108 processes. Remove process from process table.
13109 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13110 to multiple processes.
13111 (any_thread_of): New.
13112 (linux_detach): Add `pid' argument, and handle it. Remove process
13113 from processes table.
13114 (linux_join): Add `pid' argument. Handle it.
13115 (linux_thread_alive): Change unsighed long argument to ptid_t.
13116 Consider dead lwps as not being alive.
13117 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13118 threads we're not interested in.
13119 (same_lwp, find_lwp_pid): New.
13120 (linux_wait_for_lwp): Change `pid' argument's type from int to
13121 ptid_t. Adjust.
13122 (linux_wait_for_event): Rename to ...
13123 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13124 from int to ptid_t. Adjust.
13125 (linux_wait_for_event): New.
13126 (linux_wait_1): Add `ptid' argument. Change return type to
13127 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13128 that exit from the process table.
13129 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13130 Adjust.
13131 (mark_lwp_dead): New.
13132 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13133 stopping all threads, mark its main lwp as dead.
13134 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13135 ptids.
13136 (fetch_register, usr_store_inferior_registers)
13137 (regsets_fetch_inferior_registers)
13138 (regsets_store_inferior_registers, linux_read_memory)
13139 (linux_write_memory): Inline `inferior_pid'.
13140 (linux_look_up_symbols): Adjust to use per-process
13141 `thread_db_active'.
13142 (linux_request_interrupt): Adjust to use ptids.
13143 (linux_read_auxv): Inline `inferior_pid'.
13144 (initialize_low): Don't reference thread_db_active.
13145 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13146 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13147 (ps_getpid): Return the pid of the current inferior.
13148 * thread-db.c (proc_handle, thread_agent): Delete.
13149 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13150 per-process data.
13151 (find_one_thread): Change argument type to ptid_t. Adjust to
13152 per-process data.
13153 (maybe_attach_thread): Adjust to per-process data and ptids.
13154 (thread_db_find_new_threads): Ditto.
13155 (thread_db_init): Ditto.
13156 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13157 processes table. Adjust to use ptids.
13158 (spu_kill, spu_detach): Adjust interface. Remove process from
13159 processes table.
13160 (spu_join, spu_thread_alive): Adjust interface.
13161 (spu_wait): Adjust interface. Remove process from processes
13162 table. Adjust to use ptids.
13163 * win32-low.c (current_inferior_tid): Delete.
13164 (current_inferior_ptid): New.
13165 (debug_event_ptid): New.
13166 (thread_rec): Take a ptid. Adjust.
13167 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13168 (child_delete_thread): Ditto.
13169 (do_initial_child_stuff): Add `attached' argument. Add process to
13170 processes table.
13171 (child_fetch_inferior_registers, child_store_inferior_registers):
13172 Adjust.
13173 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13174 (win32_attach): Pass 1 to do_initial_child_stuff.
13175 (win32_kill): Adjust interface. Remove process from processes
13176 table.
13177 (win32_detach): Ditto.
13178 (win32_join): Adjust interface.
13179 (win32_thread_alive): Take a ptid.
13180 (win32_resume): Adjust to use ptids.
13181 (get_child_debug_event): Ditto.
13182 (win32_wait): Adjust interface. Remove exiting process from
13183 processes table.
13184
bd99dc85
PA
131852009-04-01 Pedro Alves <pedro@codesourcery.com>
13186
13187 Non-stop mode support.
13188
13189 * server.h (non_stop): Declare.
13190 (gdb_client_data, handler_func): Declare.
13191 (delete_file_handler, add_file_handler, start_event_loop):
13192 Declare.
13193 (handle_serial_event, handle_target_event, push_event)
13194 (putpkt_notif): Declare.
13195 * target.h (enum resume_kind): New.
13196 (struct thread_resume): Replace `step' field by `kind' field.
13197 (TARGET_WNOHANG): Define.
13198 (struct target_ops) <wait>: Add `options' argument.
13199 <supports_non_stop, async, start_non_stop>: New fields.
13200 (target_supports_non_stop, target_async): New.
13201 (start_non_stop): Declare.
13202 (mywait): Add `options' argument.
13203 * target.c (mywait): Add `options' argument. Print child exit
13204 notifications here.
13205 (start_non_stop): New.
13206 * server.c (non_stop, own_buf, mem_buf): New globals.
13207 (struct vstop_notif): New.
13208 (notif_queue): New global.
13209 (queue_stop_reply, push_event, discard_queued_stop_replies)
13210 (send_next_stop_reply): New.
13211 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13212 interface changes.
13213 (attach_inferior): In non-stop mode, don't wait for the target
13214 here.
13215 (handle_general_set): Handle QNonStop.
13216 (handle_query): When handling qC, return the current general
13217 thread, instead of the first thread of the list.
13218 (handle_query): If the backend supports non-stop mode, include
13219 QNonStop+ in the qSupported query response.
13220 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13221 and non-stop mode.
13222 (handle_v_attach, handle_v_run): Handle non-stop mode.
13223 (handle_v_stopped): New.
13224 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13225 (myresume): Adjust to use resume_kind. Handle non-stop.
13226 (queue_stop_reply_callback): New.
13227 (handle_status): Handle non-stop mode.
13228 (main): Clear non_stop flag on reconnection. Use the event-loop.
13229 Refactor serial protocol handling from here ...
13230 (process_serial_event): ... to this new function. When GDB
13231 selects any thread, select one here. In non-stop mode, wait until
13232 GDB acks all pending events before exiting.
13233 (handle_serial_event, handle_target_event): New.
13234 * remote-utils.c (remote_open): Install remote_desc in the event
13235 loop.
13236 (remote_close): Remove remote_desc from the event loop.
13237 (putpkt_binary): Rename to...
13238 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13239 (putpkt_binary): New as wrapper around putpkt_binary_1.
13240 (putpkt_notif): New.
13241 (prepare_resume_reply): In non-stop mode, don't change the
13242 general_thread.
13243 * event-loop.c: New.
13244 * Makefile.in (OBJ): Add event-loop.o.
13245 (event-loop.o): New rule.
13246
13247 * linux-low.h (pid_of): Moved here.
13248 (lwpid_of): New.
13249 (get_lwp_thread): Use lwpid_of.
13250 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13251 * linux-low.c (pid_of): Delete.
13252 (inferior_pid): Use lwpid_of.
13253 (linux_event_pipe): New.
13254 (target_is_async_p): New.
13255 (delete_lwp): New.
13256 (handle_extended_wait): Use lwpid_of.
13257 (add_lwp): Don't set lwpid field.
13258 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13259 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13260 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13261 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13262 first. Adjust to linux_wait_for_event interface changes. Use
13263 lwpid_of.
13264 (linux_detach): Don't delete the main lwp here.
13265 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13266 (status_pending_p): Don't consider explicitly suspended lwps.
13267 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13268 pointer. Add OPTIONS argument. Change return type to int. Use
13269 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13270 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13271 pointer. Add status pointer argument. Return a pid instead of a
13272 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13273 changes. In non-stop mode, don't switch to a random thread.
13274 (linux_wait): Rename to...
13275 (linux_wait_1): ... this. Add target_options argument, and handle
13276 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13277 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13278 clean exit and signal exit code. Don't stop all threads in
13279 non-stop mode. In all-stop mode, only stop all threads when
13280 reporting a stop to GDB. Handle explicit thread stop requests.
13281 (async_file_flush, async_file_mark): New.
13282 (linux_wait): New.
13283 (send_sigstop): Use lwpid_of.
13284 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13285 interface changes. In non-stop mode, don't switch to a random
13286 thread.
13287 (linux_resume_one_lwp): Use lwpid_of.
13288 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13289 (linux_resume_one_thread): ... this. Handle resume_stop. In
13290 non-stop mode, don't look for pending flag in all threads.
13291 (resume_status_pending_p): Don't consider explicitly suspended
13292 threads.
13293 (my_waitpid): Reimplement. Emulate __WALL.
13294 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13295 Use lwpid_of.
13296 (sigchld_handler, linux_supports_non_stop, linux_async)
13297 (linux_start_non_stop): New.
13298 (linux_target_ops): Register linux_supports_non_stop, linux_async
13299 and linux_start_non_stop.
13300 (initialize_low): Install SIGCHLD handler.
13301 * thread-db.c (thread_db_create_event, find_one_thread)
13302 (thread_db_get_tls_address): Use lwpid_of.
13303 * win32-low.c (win32_detach): Adjust to use resume_kind.
13304 (win32_wait): Add `options' argument.
13305 * spu-low.c (spu_resume): Adjust to use resume_kind.
13306 (spu_wait): Add `options' argument.
13307
5b1c542e
PA
133082009-04-01 Pedro Alves <pedro@codesourcery.com>
13309
13310 Decouple target code from remote protocol.
13311
13312 * target.h (enum target_waitkind): New.
13313 (struct target_waitstatus): New.
13314 (struct target_ops) <wait>: Return an unsigned long. Take a
13315 target_waitstatus pointer instead of a char pointer.
13316 (mywait): Likewise.
13317 * target.c (mywait): Change prototype to return an unsigned long.
13318 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13319 * server.h (thread_from_wait, old_thread_from_wait): Delete
13320 declarations.
13321 (prepare_resume_reply): Change prototype to take a
13322 target_waitstatus.
13323 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13324 (last_status, last_ptid): New.
13325 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13326 pid instead of a signal.
13327 (attach_inferior): Remove "status" and "signal" parameters.
13328 Adjust.
13329 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13330 not as an address.
13331 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13332 (handle_v_requests, myresume): Remove "status" and "signal"
13333 parameters. Adjust.
13334 (handle_status): New.
13335 (main): Delete local `status'. Adjust.
13336 * remote-utils.c: Include target.h.
13337 (prepare_resume_reply): Change prototype to take a
13338 target_waitstatus. Adjust.
13339
13340 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13341 interface.
13342 * spu-low.c (spu_wait): Adjust.
13343 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13344 Delete.
13345 (win32_wait): Adjust.
13346
2bd7c093
PA
133472009-04-01 Pedro Alves <pedro@codesourcery.com>
13348
13349 * target.h (struct thread_resume): Delete leave_stopped member.
13350 (struct target_ops): Add a `n' argument to the `resume' callback.
13351 * server.c (start_inferior): Adjust.
13352 (handle_v_cont, myresume): Adjust.
13353 * linux-low.c (check_removed_breakpoint): Adjust to resume
13354 interface change, and to removed leave_stopped field.
13355 (resume_ptr): Delete.
13356 (struct thread_resume_array): New.
13357 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13358 resume interface change.
13359 (linux_continue_one_thread, linux_queue_one_thread)
13360 (resume_status_pending_p): Check if the resume field is NULL
13361 instead of checking the leave_stopped member.
13362 (linux_resume): Adjust to the target resume interface change.
13363 * spu-low.c (spu_resume): Adjust to the target resume interface
13364 change.
13365 * win32-low.c (win32_detach, win32_resume): Ditto.
13366
c35fafde
PA
133672009-04-01 Pedro Alves <pedro@codesourcery.com>
13368
13369 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13370 flag.
13371 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13372 pending.
13373 (linux_continue_one_thread): Only preserve the stepping flag if
13374 there's a pending breakpoint.
13375
0a59d50b
PA
133762009-03-31 Pedro Alves <pedro@codesourcery.com>
13377
13378 * server.c (main): After the inferior having exited, call
13379 remote_close before exiting gdbserver.
13380
f04c6d38
TJB
133812009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13382
13383 Fix size of FPSCR in Power 7 processors.
13384 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13385 (PPC_FEATURE_HAS_DFP): New #define.
13386 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13387 size of the FPSCR.
13388
78e5cee6
PA
133892009-03-23 Pedro Alves <pedro@codesourcery.com>
13390
13391 * server.c (handle_query) Whitespace and formatting.
13392
1b3f6016
PA
133932009-03-22 Pedro Alves <pedro@codesourcery.com>
13394
13395 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13396 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13397 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13398 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13399 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13400 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13401 Makefile.in, configure.ac: Fix whitespace throughout.
13402 * configure: Regenerate.
13403
a07b2135
PA
134042009-03-22 Pedro Alves <pedro@codesourcery.com>
13405
13406 * inferiors.c (find_inferior): Make it safe for the callback
13407 function to delete the currently iterated inferior.
13408
67cc2626
PA
134092009-03-22 Pedro Alves <pedro@codesourcery.com>
13410
13411 * Makefile.in (linuw_low_h): Move higher.
13412 (thread-db.o): Depend on $(linux_low_h).
13413
54a0b537
PA
134142009-03-17 Pedro Alves <pedro@codesourcery.com>
13415
13416 Rename "process" to "lwp" throughout.
13417
13418 * linux-low.c (all_processes): Rename to...
13419 (all_lwps): ... this.
13420 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13421 (add_process): Rename to ...
13422 (add_lwp): ... this. Adjust.
13423 (linux_create_inferior): Adjust.
13424 (linux_attach_lwp): Adjust.
13425 (linux_attach): Adjust.
13426 (linux_kill_one_process): Rename to ...
13427 (linux_kill_one_lwp): ... this. Adjust.
13428 (linux_kill): Adjust.
13429 (linux_detach_one_process): Rename to ...
13430 (linux_detach_one_lwp): ... this. Adjust.
13431 (linux_detach): Adjust.
13432 (check_removed_breakpoint): Adjust.
13433 (status_pending_p): Adjust.
13434 (linux_wait_for_process): Rename to ...
13435 (linux_wait_for_lwp): ... this. Adjust.
13436 (linux_wait_for_event): Adjust.
13437 (send_sigstop): Adjust.
13438 (wait_for_sigstop): Adjust.
13439 (stop_all_processes): Rename to ...
13440 (stop_all_lwps): ... this.
13441 (linux_resume_one_process): Rename to ...
13442 (linux_resume_one_lwp): ... this. Adjust.
13443 (linux_set_resume_request, linux_continue_one_thread)
13444 (linux_queue_one_thread, resume_status_pending_p)
13445 (usr_store_inferior_registers, regsets_store_inferior_registers)
13446 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13447 Adjust.
13448 * linux-low.h (get_process): Rename to ...
13449 (get_lwp): ... this. Adjust.
13450 (get_thread_process): Rename to ...
13451 (get_thread_lwp): ... this. Adjust.
13452 (get_process_thread): Rename to ...
13453 (get_lwp_thread): ... this. Adjust.
13454 (struct process_info): Rename to ...
13455 (struct lwp_info): ... this.
13456 (all_processes): Rename to ...
13457 (all_lwps): ... this.
13458 * proc-service.c (ps_lgetregs): Adjust.
13459 * thread-db.c (thread_db_create_event, find_one_thread)
13460 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13461
0b16c5cf
PA
134622009-03-14 Pedro Alves <pedro@codesourcery.com>
13463
13464 * server.c (handle_query): Handle "qAttached".
13465
32de4b9d
NS
134662009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13467
13468 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13469 GPLv3, update license URL.
13470
2aecd87f
DE
134712009-03-01 Doug Evans <dje@google.com>
13472
93efd302 13473 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13474 (server_h): Add gdb_signals.h.
13475 (signals.o): Update.
13476 * server.h (target_signal_from_host,target_signal_to_host_p)
13477 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13478
86b1f9c5
PM
134792009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13480
13481 * remote-utils.c (getpkt): Also generate remote-debug
13482 information if noack_mode is set.
13483
4aa995e1
PA
134842009-02-06 Pedro Alves <pedro@codesourcery.com>
13485
13486 * server.c (handle_query): Report qXfer:siginfo:read and
13487 qXfer:siginfo:write as supported and handle them.
13488 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13489 * linux-low.c (linux_xfer_siginfo): New.
13490 (linux_target_ops): Set it.
13491
62709adf
PA
134922009-01-26 Pedro Alves <pedro@codesourcery.com>
13493
13494 * server.c (gdbserver_usage): Mention --remote-debug.
13495 (main): Accept '--remote-debug' switch.
13496
aef93bd7
DE
134972009-01-18 Doug Evans <dje@google.com>
13498
13499 * regcache.c (new_register_cache): No need to check result of xcalloc.
13500 * server.c (handle_search_memory): Back out calls to xmalloc,
13501 result is checked and error is returned to user upon failure.
13502 (handle_query): Ditto. Add more checks for result of malloc.
13503 (handle_v_cont): Check result of malloc, report error back to
13504 user upon failure.
13505 (handle_v_run): Ditto. Call freeargv.
13506 * server.h (freeargv): Declare.
13507 * utils.c (freeargv): New fn.
13508
54363045
DE
135092009-01-15 Doug Evans <dje@google.com>
13510
f626972c
DE
13511 * gdbreplay.c (perror_with_name): Make arg const char *.
13512 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13513 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13514 * utils.c (perror_with_name): Make arg const char *.
54363045 13515
18aae699
PA
135162009-01-14 Pedro Alves <pedro@codesourcery.com>
13517
13518 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13519 when handling a EXIT_PROCESS_DEBUG_EVENT.
13520
ff703abe
JB
135212009-01-06 Joel Brobecker <brobecker@adacore.com>
13522
13523 * gdbreplay.c (gdbreplay_version): Update copyright year.
13524 * server.c (gdbserver_version): Likewise.
13525
f21cc1a2 135262009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13527
13528 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13529 (handle_extended_wait): Improve comment.
0e21c1ec 13530
bca929d3
DE
135312008-12-13 Doug Evans <dje@google.com>
13532
13533 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13534 * server.h (ATTR_MALLOC): New macro.
13535 (xmalloc,xcalloc,xstrdup): Declare.
13536 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13537 * inferiors.c: Ditto.
13538 * linux-low.c: Ditto.
13539 * mem-break.c: Ditto.
13540 * regcache.c: Ditto.
13541 * remote-utils.c: Ditto.
13542 * server.c: Ditto.
13543 * target.c: Ditto.
13544 * win32-low.c: Ditto.
13545
97438e3f
DE
135462008-12-12 Doug Evans <dje@google.com>
13547
896c7fbb
DE
13548 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13549 in debugging printf.
13550
97438e3f
DE
13551 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13552
e3b886f8
DE
135532008-12-09 Doug Evans <dje@google.com>
13554
13555 * linux-low.h (struct process_info): Delete member tid, unused.
13556 * thread-db.c (find_one_thread): Update.
13557 (maybe_attach_thread): Update.
13558
07e059b5
VP
135592008-12-02 Pedro Alves <pedro@codesourcery.com>
13560
889bf7c5
PA
13561 * target.h (struct target_ops): Add qxfer_osdata member.
13562 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13563 and dirent.h.
13564 (linux_qxfer_osdata): New functions.
13565 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13566 callback.
13567 * server.c (handle_query): Handle "qXfer:osdata:read:".
13568 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13569 (buffer_xml_printf): New functions.
13570 * server.h (struct buffer): New.
13571 (buffer_grow_str, buffer_grow_str0): New macros.
13572 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13573 (buffer_xml_printf): Declare.
07e059b5 13574
4cab47ab
DE
135752008-11-24 Doug Evans <dje@google.com>
13576
13577 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13578
f142445f
DJ
135792008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13580
13581 * server.c (handle_v_run): Always use the supplied argument list.
13582
d0107bb6 135832008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13584
d0107bb6
BW
13585 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13586 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13587
2c4ad781
TJB
135882008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13589
13590 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13591 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13592 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13593 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13594 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13595 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13596 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13597 XML target descriptions.
13598 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13599 when inferior is running on an ISA 2.05 or later processor. Add
13600 special case to return offset for full 64-bit slot of FPSCR when
13601 in 32-bits.
13602
dfb64f85
DJ
136032008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13604
13605 * Makefile.in (SFILES, clean): Added sparc64 files.
13606 (reg-sparc64.o, reg-sparc64.c): New.
13607 * configure.srv (sparc*-*-linux*): New configuration.
13608 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13609 syscall arguments for SPARC.
13610 (regsets_store_inferior_registers): Likewise.
13611 * linux-sparc-low.c: New file.
13612
66b6e1dd
DE
136132008-10-21 Doug Evans <dje@google.com>
13614
13615 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13616 (READLINE_DIR,READLINE_DEP): Delete.
13617 (INTERNAL_CFLAGS): Update.
13618 (LINTFLAGS): Update.
13619
9b710a42
PA
136202008-10-10 Pedro Alves <pedro@codesourcery.com>
13621
13622 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13623 whole argv from the last run, not just argv[0].
13624
5822d809
PA
136252008-09-08 Pedro Alves <pedro@codesourcery.com>
13626
13627 * regcache.c (new_register_cache): Return NULL if the register
13628 cache size isn't known yet.
13629 (free_register_cache): Avoid dereferencing a NULL regcache.
13630
74aac56f
DJ
136312008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13632
13633 * configure.srv: Merge MIPS and MIPS64.
13634
400b20f5
MR
136352008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13636
13637 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13638
677c5bb1
LM
136392008-08-18 Luis Machado <luisgpm@br.ibm.com>
13640
13641 * Makefile.in: Add required vsx dependencies.
13642
13643 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13644 Declare init_registers_powerpc_vsx32l.
13645 Declare init_registers_powerpc_vsx64l.
13646 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13647 (ppc_arch_setup): Check for VSX in hwcap.
13648 (ppc_fill_vsxregset): New function.
13649 (ppc_store_vsxregset): New function.
13650 Add new VSX entry in regset_info target_regsets.
13651
13652 * configure.srv: Add new VSX dependencies.
13653
a6f3e723
SL
136542008-08-12 Pedro Alves <pedro@codesourcery.com>
13655
13656 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13657 (remote_open): Set or clear transport_is_reliable.
13658 (putpkt_binary): Don't expect acks in noack mode.
13659 (getpkt): Don't send ack/nac in noack mode.
13660 * server.c (handle_general_set): Handle QStartNoAckMode.
13661 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13662 qSupported.
13663 (main): Reset noack_mode on every connection.
13664 * server.h (noack_mode): Declare.
13665
a417dc56
RW
136662008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13667
13668 * Makefile.in (GDBREPLAY_OBS): New variable.
13669 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13670
3221518c
UW
136712008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13672 Daniel Jacobowitz <dan@codesourcery.com>
13673
13674 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13675 (usr_store_inferior_registers): Likewise.
13676 (regsets_store_inferior_registers): Likewise.
13677
ec56be1b
PA
136782008-07-31 Rolf Jansen <rj@surtec.com>
13679 Pedro Alves <pedro@codesourcery.com>
13680
13681 * configure.ac: Check for memmem declaration.
13682 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13683 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13684 (disable_packet_qfThreadInfo): Unconditionally compile.
13685 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13686 * configure, config.in: Regenerate.
13687
2fe5e3ff
DE
136882008-07-28 Doug Kwan <dougkwan@google.com>
13689
13690 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13691 (linux_write_memory): Remove declaration of errno.
13692
836acd6d
UW
136932008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13694
13695 * linux-low.c (handle_extended_wait): Do not use "status"
13696 variable uninitialized.
13697
aeba519e
PA
136982008-07-07 Pedro Alves <pedro@codesourcery.com>
13699
13700 * server.c (handle_v_attach): Inhibit reporting dll changes.
13701
db42f210
PA
137022008-06-27 Pedro Alves <pedro@codesourcery.com>
13703
13704 * remote-utils.c (prepare_resume_reply): If requested, don't
13705 output "thread:TID" in the T stop reply.
13706
13707 * server.c (disable_packet_vCont, disable_packet_Tthread)
13708 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13709 (handle_query): If requested, disable support for qC, qfThreadInfo
13710 and qsThreadInfo.
13711 (handle_v_requests): If requested, disable support for vCont.
13712 (gdbserver_show_disableable): New.
13713 (main): Handle --disable-packet and --disable-packet=LIST.
13714
13715 * server.h (disable_packet_vCont, disable_packet_Tthread)
13716 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13717
8e4c5421
CD
137182008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13719
13720 * server.c (gdbserver_usage): Mention --version.
13721
6e23a804
DJ
137222008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13723
13724 * Makefile.in (gdbreplay.o): New rule.
13725
90aa6a40
JM
137262008-06-06 Joseph Myers <joseph@codesourcery.com>
13727
13728 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13729 message, not gdbserver.
13730
c16158bc 137312008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13732 Nathan Sidwell <nathan@codesourcery.com>
13733 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13734
13735 * acinclude.m4: Include ../../config/acx.m4.
13736 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13737 * configure, config.in: Regenerate.
13738 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13739 * server.c (gdbserver_version): Print PKGVERSION.
13740 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13741 (main): Adjust gdbserver_usage calls.
13742 * gdbreplay.c (version, host_name): Add declarations.
13743 (gdbreplay_version, gdbreplay_usage): New.
13744 (main): Accept --version and --help options.
13745
aeb75bf5
DJ
137462008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13747
13748 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13749 (arm_breakpoint_at): Handle Thumb.
13750 (the_low_target): Add comment.
13751
76b233dd
UW
137522008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13753
13754 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13755
08388c79
DE
137562008-05-09 Doug Evans <dje@google.com>
13757
a3c83fae
DE
13758 * server.h (decode_search_memory_packet): Declare.
13759 * remote-utils.c (decode_search_memory_packet): New fn.
13760 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13761 (handle_search_memory): New fn.
13762 (handle_query): Process qSearch:memory packets.
13763
bb9c3d36
UW
137642008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13765
13766 * regcache.c (registers_length): Remove.
13767 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13768 full register packet.
13769 * regcache.h (registers_length): Remove prototype.
13770 * server.h (PBUFSIZ): Define to 16384.
13771
7284e1be
UW
137722008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13773
13774 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13775 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13776 powerpc-64l.o, and powerpc-altivec64l.o.
13777 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13778 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13779 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13780 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13781 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13782 to srv_xmlfiles.
13783
13784 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13785 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13786 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13787 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13788 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13789 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13790 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13791 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13792 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13793 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13794 (clean): Update.
13795
13796 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13797 (init_registers_powerpc_32l): ... this new prototype.
13798 (init_registers_powerpc_32): Remove, replace by ...
13799 (init_registers_powerpc_altivec32l): ... this new prototype.
13800 (init_registers_powerpc_e500): Remove, replace by ...
13801 (init_registers_powerpc_e500l): ... this new prototype.
13802 (init_registers_ppc64): Remove, replace by ...
13803 (init_registers_powerpc_64l): ... this new prototype.
13804 (init_registers_powerpc_64): Remove, replace by ...
13805 (init_registers_powerpc_altivec64l): ... this new prototype.
13806 (ppc_num_regs): Set to 73.
13807 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13808 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13809 (ppc_cannot_store_register): Handle orig_r3 and trap.
13810 (ppc_arch_setup): Update init_registers_... calls.
13811 (ppc_fill_gregset): Handle orig_r3 and trap.
13812
13813 * inferiors.c (clear_inferiors): Reset current_inferior.
13814
fdc59709
PB
138152008-04-23 Paolo Bonzini <bonzini@gnu.org>
13816
889bf7c5
PA
13817 * acinclude.m4: Add override.m4.
13818 * configure: Regenerate.
fdc59709 13819
c9b2f845
UW
138202008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13821
13822 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13823 initial call to init_register_ppc64.
13824
550512b8
UW
138252008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13826
43aaf8b6
PA
13827 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13828 single powerpc*-*-linux* case.
550512b8
UW
13829 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13830
b6430ec3
UW
138312008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13832
13833 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13834 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13835 from reg_xmlfiles.
13836 * linux-ppc-low.c: Include <elf.h>.
13837 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13838 (ppc_hwcap): New global variable.
13839 (ppc_regmap): Remove __SPE__ #ifdef sections.
13840 (ppc_regmap_e500): New global variable.
13841 (ppc_cannot_store_register): Update __SPE__ special case.
13842 (ppc_get_hwcap): New function.
13843 (ppc_arch_setup): Use it to determine whether inferior supports
13844 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13845 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13846 Do not access registers if target does not support AltiVec.
13847 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13848 Do not access registers if target does not support SPE.
13849 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13850
52fa2412
UW
138512008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13852
13853 * linux-low.c (disabled_regsets, num_regsets): New.
13854 (use_regsets_p): Delete.
13855 (linux_wait_for_process): Clear disabled_regsets.
13856 (regsets_fetch_inferior_registers): Check and set it.
13857 (regsets_store_inferior_registers): Likewise.
13858 (linux_fetch_registers, linux_store_registers): Do not use
13859 use_regsets_p.
13860 (initialize_low): Allocate disabled_regsets.
13861
e28b3332
DJ
138622008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13863
13864 * Makefile.in (LIBOBJS): New.
13865 (OBS): Use LIBOBJS.
13866 (memmem.o): New rule.
13867 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13868 * configure: Regenerated.
13869
4536995d
UW
138702008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13871
13872 * server.c (handle_query): Never return "unsupported" for
13873 qXfer:features:read queries.
13874
221c031f
UW
138752008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13876
13877 * server.c (get_features_xml): Fix inverted condition.
13878 (handle_query): Always support qXfer:feature:read.
13879
ccd213ac
DJ
138802008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13881
13882 * server.c (wrapper_argv): New.
13883 (start_inferior): Handle wrapper_argv. If set, expect an extra
13884 trap.
13885 (gdbserver_usage): Document --wrapper.
13886 (main): Parse --wrapper.
13887
6fe305f7
UW
138882008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13889
13890 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13891 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13892 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13893 (ppc_set_pc): Likewise.
13894 (ppc_arch_setup): New function.
13895 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13896 of collect_register.
889bf7c5 13897 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13898
5b0a002e
UW
138992008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13900
13901 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13902 instead of linux-ppc64-low.o.
13903 * linux-ppc64-low.c: Remove file.
13904 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13905 (linux-ppc64-low.o): Remove rule.
13906
13907 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13908 (init_registers_powerpc_64): Likewise.
13909 (ppc_regmap): Conditionally define depending on __powerpc64__.
13910 (ppc_cannot_store_register): Do not special-case "fpscr" when
13911 compiled on __powerpc64__.
13912 (ppc_collect_ptrace_register): New function.
13913 (ppc_supply_ptrace_register): New function.
13914 (ppc_breakpoint): Change type to "unsigned int".
13915 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13916 (the_low_target): Conditionally provide initializers for the
889bf7c5 13917 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13918 collect_ptrace_register and supply_ptrace_register members.
13919
9b4b61c8
UW
139202008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13921
13922 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13923 * server.c (gdbserver_xmltarget): Define.
13924 (get_features_xml): Use it to replace "target.xml" and arch_string.
13925
13926 * configure.srv: Remove srv_xmltarget. Add XML files that were
13927 mentioned there to srv_xmlfiles instead. Remove conditional tests
13928 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13929 srv_xmlfiles and srv_regobj to include all possible choices.
13930 * configure.ac (srv_xmltarget): Remove.
13931 (srv_xmlfiles): Do not add "target.xml".
13932 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13933 checks for supplementary target information.
13934 * configure: Regenerate.
13935 * Makefile.in (XML_TARGET): Remove.
13936 (target.xml): Remove rule.
13937 (clean): Do not clean up target.xml.
13938 (.PRECIOUS): Do not mention target.xml.
13939
13940 * target.h (struct target_ops): Remove arch_string member.
13941 * linux-low.c (linux_arch_string): Remove.
13942 (linux_target_ops): Remove arch_string initializer.
13943 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13944 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13945 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13946 * spu-low.c (spu_arch_string): Remove.
13947 (spu_target_ops): Remove arch_string initializer.
13948 * win32-low.c (win32_arch_string): Remove.
13949 (win32_target_ops): Remove arch_string initializer.
13950 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13951 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13952 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13953
ee1a7ae4
UW
139542008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13955
13956 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13957 by collect_ptrace_register and supply_ptrace_register hooks.
13958 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13959 instead of checking for the_low_target.left_pad_xfer.
13960 (usr_store_inferior_registers): Use collect_ptrace_register callback
13961 instead of checking for the_low_target.left_pad_xfer.
13962
13963 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13964 (s390_supply_ptrace_register): Likewise.
13965 (s390_fill_gregset): Call s390_collect_ptrace_register.
13966 (the_low_target): Update.
13967
13968 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13969 (ppc_supply_ptrace_register): Likewise.
13970 (the_low_target): Update.
13971
13972 * linux-i386-low.c (the_low_target): Update.
13973 * linux-x86-64-low.c (the_low_target): Update.
13974
d61ddec4
UW
139752008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13976
13977 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13978 reg-s390.o and reg-s390x.o.
13979
13980 * linux-low.c (new_inferior): New global variable.
13981 (linux_create_inferior, linux_attach): Set it.
13982 (linux_wait_for_process): Call the_low_target.arch_setup after the
13983 target has stopped for the first time.
13984 (initialize_low): Do not call the_low_target.arch_setup.
13985
13986 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13987 (s390_set_pc): Likewise.
13988 (s390_arch_setup): New function.
13989 (the_low_target): Use s390_arch_setup as arch_setup routine.
13990
13991 * regcache.c (realloc_register_cache): New function.
13992 (set_register_cache): Call it for each existing regcache.
13993
d05b4ac3
UW
139942008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13995
13996 * server.h (init_registers): Remove prototype.
13997
13998 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13999 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14000 instead of init_registers ().
14001 * linux-arm-low.c (init_registers_arm): Add prototype.
14002 (init_registers_arm_with_iwmmxt): Likewise.
14003 (the_low_target): Add initializer for arch_setup field.
14004 * linux-cris-low.c (init_registers_cris): Add prototype.
14005 (the_low_target): Add initializer for arch_setup field.
14006 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14007 (the_low_target): Add initializer for arch_setup field.
14008 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14009 (the_low_target): Add initializer for arch_setup field.
14010 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14011 (the_low_target): Add initializer for arch_setup field.
14012 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14013 (the_low_target): Add initializer for arch_setup field.
14014 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14015 (the_low_target): Add initializer for arch_setup field.
14016 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14017 (init_registers_mips64_linux): Likewise.
14018 (the_low_target): Add initializer for arch_setup field.
14019 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14020 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14021 (the_low_target): Add initializer for arch_setup field.
14022 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14023 (init_registers_powerpc_64): Likewise.
14024 (the_low_target): Add initializer for arch_setup field.
14025 * linux-s390-low.c (init_registers_s390): Add prototype.
14026 (init_registers_s390x): Likewise.
14027 (the_low_target): Add initializer for arch_setup field.
14028 * linux-sh-low.c (init_registers_sh): Add prototype.
14029 (the_low_target): Add initializer for arch_setup field.
14030 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14031 (the_low_target): Add initializer for arch_setup field.
14032 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14033 (the_low_target): Add initializer for arch_setup field.
14034
14035 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14036 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14037 instead of init_registers ().
14038 * win32-arm-low.c (init_registers_arm): Add prototype.
14039 (the_low_target): Add initializer for arch_setup field.
14040 * win32-i386-low.c (init_registers_i386): Add prototype.
14041 (the_low_target): Add initializer for arch_setup field.
14042
14043 * spu-low.c (init_registers_spu): Add prototype.
14044 (initialize_low): Call initialie_registers_spu () instead of
14045 initialize_registers ().
14046
fd96d250
PA
140472008-02-19 Pedro Alves <pedro@codesourcery.com>
14048
14049 * server.c (handle_v_requests): When handling the vRun and vAttach
14050 packets, if already debugging a process, don't kill it. Return an
14051 error instead.
14052
d41b6bb4
DJ
140532008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14054
14055 * server.c (handle_query): Correct length check.
14056
5ac588cf
PA
140572008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14058
14059 * win32-low.c (do_initial_child_stuff): Add process handle
14060 parameter. Set current_process_handle and current_process_id from the
14061 parameters. Clear globals.
14062 (win32_create_inferior): Don't set current_process_handle and
14063 current_process_id here. Instead pass them on the call to
14064 do_initial_child_stuff.
14065 (win32_attach): Likewise.
14066 (win32_clear_inferiors): New.
14067 (win32_kill): Don't close the current process handle or the
14068 current thread handle here. Instead call win32_clear_inferiors.
14069 (win32_detach): Don't open a new handle to the process. Call
14070 win32_clear_inferiors.
14071 (win32_join): Don't rely on current_process_handle; open a new
14072 handle using the process id.
14073 (win32_wait): Call win32_clear_inferiors when the inferior process
14074 has exited.
14075
ecd7ecbc
DJ
140762008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14077
14078 * server.c (monitor_show_help): Add "exit".
14079
1525d545
MG
140802008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14081
ecd7ecbc 14082 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14083 (clean): Add reg-xtensa.c.
14084 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14085 * configure.srv (xtensa*-*-linux*) New target.
14086 * linux-xtensa-low.c: New.
14087 * xtensa-xtregs.c: New.
1525d545 14088
59a016f0
PA
140892008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14090
14091 * hostio.c: Don't include errno.h.
14092 (errno_to_fileio_errno): Move to hostio-errno.
14093 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14094 error number outputting to the target->hostio_last_error callback.
14095 (hostio_packet_error): Use FILEIO_EINVAL directly.
14096 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14097 calls to hostio_error.
14098 * hostio-errno.c: New.
14099 * server.h (hostio_last_error_from_errno): Declare.
14100 * target.h (target_ops): Add hostio_last_error member.
14101 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14102 as hostio_last_error handler.
889bf7c5 14103 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14104 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14105 (wince_hostio_last_error): New functions.
14106 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14107 as hostio_last_error handler.
14108 (win32_target_ops) [!_WIN32_WCE]: Register
14109 hostio_last_error_from_errno as hostio_last_error handler.
14110 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14111 (hostio-errno.o): New rule.
14112 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14113 * configure.srv (srv_hostio_err_objs): New variable. Default to
14114 hostio-errno.o.
14115 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14116 * configure: Regenerate.
14117
2d717e4f
DJ
141182008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14119
14120 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14121 (linux_kill, linux_detach): Clean up the process list.
14122 * remote-utils.c (remote_open): Improve port number parsing.
14123 (putpkt_binary, input_interrupt): Only send interrupts if the target
14124 is running.
14125 * server.c (extended_protocol): Make static.
14126 (attached): Define earlier.
14127 (exit_requested, response_needed, program_argv): New variables.
14128 (target_running): New.
14129 (start_inferior): Clear attached here.
14130 (attach_inferior): Set attached here.
14131 (require_running): Define.
14132 (handle_query): Use require_running and target_running. Implement
14133 "monitor exit".
14134 (handle_v_attach, handle_v_run): New.
14135 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14136 (gdbserver_usage): Update.
14137 (main): Redo argument parsing. Handle --debug and --multi. Handle
14138 --attach along with other options or after the port. Save
14139 program_argv. Support no initial program. Resynchronize
14140 communication with GDB after an error. Handle "monitor exit".
14141 Use require_running and target_running. Always allow the extended
14142 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14143 restart in extended mode.
14144 * README: Refer to the GDB manual. Update --attach usage.
14145
7407e2de
AS
141462007-12-20 Andreas Schwab <schwab@suse.de>
14147
14148 * linux-low.c (STACK_SIZE): Define.
14149 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14150 (linux_test_for_tracefork): Likewise.
14151
b65d95c5
DJ
141522007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14153
14154 * linux-low.c (linux_wait_for_event): Update messages. Do not
14155 reinsert auto-delete breakpoints.
14156 * mem-break.c (struct breakpoint): Change return type of handler to
14157 int.
14158 (set_breakpoint_at): Update handler type.
14159 (reinsert_breakpoint_handler): Return 1 instead of calling
14160 delete_breakpoint.
14161 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14162 setting a new one.
14163 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14164 * mem-break.h (set_breakpoint_at): Update handler type.
14165 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14166 * win32-low.c (auto_delete_breakpoint): New.
14167 (get_child_debug_event): Use it.
14168
4e799345
DJ
141692007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14170
14171 * configure.ac: Check for pread and pwrite.
14172 * hostio.c (handle_pread): Fall back to lseek and read.
14173 (handle_pwrite): Fall back to lseek and write.
14174 * config.in, configure: Regenerated.
14175
27524b67
DJ
141762007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14177
14178 * server.c (myresume): Add own_buf argument.
14179 (main): Update calls.
14180
a20d5e98
DJ
141812007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14182
14183 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14184 * remote-utils.c (remote_open): Do not call disable_async_io.
14185 (block_async_io): Delete.
14186 (unblock_async_io): Make static.
14187 (initialize_async_io): New.
14188 * server.c (handle_v_cont): Handle async I/O here.
14189 (myresume): Likewise. Move other common resume tasks here...
14190 (main): ... from here. Call initialize_async_io. Disable async
14191 I/O before the main loop.
14192 * server.h (initialize_async_io): Declare.
14193 (block_async_io, unblock_async_io): Delete prototypes.
14194 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14195
b79d787e
DJ
141962007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14197
14198 * remote-utils.c (readchar): Allow binary data in received messages.
14199
d97903b2
PA
142002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14201
14202 * win32-low.c (attaching): New global.
14203 (win32_create_inferior): Clear the `attaching' global.
14204 (win32_attach): Set the `attaching' global.
14205 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14206 attaching. Only set a breakpoint at the entry point if not
14207 attaching.
14208
311de423
PA
142092007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14210
14211 * server.c (main): Don't report dll events on the initial
14212 connection on attaches.
14213
6c2d16d2
PA
142142007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14215
14216 * server.c (main): Relax numerical bases supported for the pid of
14217 the --attach command line argument.
14218
5ca906e6
PA
142192007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14220
14221 * win32-low.c (win32_attach): Call OpenProcess before
14222 DebugActiveProcess, not after. Add last error output to error
14223 call.
14224
9c6c8194
PA
142252007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14226
14227 * win32-low.c (win32_get_thread_context)
14228 (win32_set_thread_context): New functions.
14229 (thread_rec): Use win32_get_thread_context.
14230 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14231 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14232 field.
14233
4d5d1aaa
PA
142342007-12-03 Leo Zayas
14235 Pedro Alves <pedro_alves@portugalmail.pt>
14236
14237 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14238 global variables.
14239 (child_add_thread): Minor cleanup.
14240 (child_continue): Resume artificially suspended threads before
14241 calling ContinueDebugEvent.
14242 (suspend_one_thread): New.
14243 (fake_breakpoint_event): New.
14244 (get_child_debug_event): Change return type to int. Check here if
14245 gdb sent an interrupt request. If a soft interrupt was requested,
14246 fake a breakpoint event. Return 0 if there is no event to handle,
14247 and 1 otherwise.
14248 (win32_wait): Don't check here if gdb sent an interrupt request.
14249 Ensure there is a valid event to handle.
14250 (win32_request_interrupt): Add soft interruption method as last
14251 resort.
14252
c436e841
PA
142532007-12-03 Leo Zayas
14254 Pedro Alves <pedro_alves@portugalmail.pt>
14255
14256 * win32-low.h (win32_thread_info): Add descriptions to the
14257 structure members. Replace `suspend_count' counter by a
14258 `suspended' flag.
14259 * win32-low.c (thread_rec): Update condition of when to get the
14260 context from the inferior. Rely on ContextFlags being set if it
14261 has already been retrieved. Only suspend the inferior thread if
14262 we haven't already. Warn if that fails.
14263 (continue_one_thread): s/suspend_count/suspended/. Only call
14264 ResumeThread once. Warn if that fails.
14265
e7b5fa67
PA
142662007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14267
14268 * win32-low.c (win32_wait): Don't read from the inferior when it
14269 has already exited.
14270
a385171d
PA
142712007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14272
14273 * Makefile.in (win32_low_h): New variable.
14274 (win32-low.o): Add dependency on $(win32_low_h).
14275 (win32-arm-low.o, win32-i386-low.o): New rules.
14276
f80c84b3
DJ
142772007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14278
14279 * hostio.c: Correct copyright year.
14280
a6b151f1
DJ
142812007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14282
14283 * Makefile.in (OBS): Add hostio.o.
14284 (hostio.o): New rule.
14285 * server.h (handle_vFile): Declare.
14286 * hostio.c: New file.
14287 * server.c (handle_v_requests): Take packet_len and new_packet_len
14288 for binary packets. Call handle_vFile.
14289 (main): Update call to handle_v_requests.
14290
f9387fc3
DJ
142912007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14292
14293 * linux-low.c: Include <sched.h>.
14294
51c2684e
DJ
142952007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14296
14297 * linux-low.c (linux_tracefork_grandchild): New.
14298 (linux_tracefork_child): Use clone.
14299 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14300
75f83163
JB
143012007-10-31 Joel Brobecker <brobecker@adacore.com>
14302
14303 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14304
da5898ce
DJ
143052007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14306
14307 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14308
24a09b5f
DJ
143092007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14310
14311 * inferiors.c (change_inferior_id): Delete.
14312 (add_pid_to_list, pull_pid_from_list): New.
14313 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14314 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14315 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14316 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14317 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14318 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14319 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14320 (using_threads): Always set to 1.
14321 (handle_extended_wait): New.
14322 (add_process): Do not set TID.
14323 (linux_create_inferior): Set must_set_ptrace_flags.
14324 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14325 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14326 (linux_thread_alive): Rename TID argument to LWPID.
14327 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14328 (linux_wait_for_event): Do not use TID or check using_threads. Update
14329 call to dead_thread_notify. Call handle_extended_wait.
14330 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14331 (send_sigstop): Delete sigstop_sent.
14332 (wait_for_sigstop): Avoid TID.
14333 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14334 (linux_test_for_tracefork): New.
14335 (linux_lookup_signals): Use thread_db_active and
14336 linux_supports_tracefork_flag.
14337 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14338 * linux-low.h (get_process_thread): Avoid TID.
14339 (struct process_ifo): Move thread_known and tid to the end. Remove
14340 sigstop_sent.
14341 (linux_attach_lwp, thread_db_init): Update prototypes.
14342 * server.h (change_inferior_id): Delete prototype.
14343 (add_pid_to_list, pull_pid_from_list): New prototypes.
14344 * thread-db.c (thread_db_use_events): New.
14345 (find_first_thread): Rename to...
14346 (find_one_thread): ...this. Update callers and messages. Do not
14347 call fatal. Check thread_db_use_events. Do not call
14348 change_inferior_id or new_thread_notify.
14349 (maybe_attach_thread): Update. Do not call new_thread_notify.
14350 (thread_db_init): Set thread_db_use_events. Check use_events.
14351 * utils.c (fatal, warning): Correct message prefix.
14352
30ed0a8f
DJ
143532007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14354
14355 * Makefile.in (clean): Remove new files.
14356 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14357 (powerpc-64.o, powerpc-64.c): New rules.
14358 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14359 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14360 with SPE.
14361 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14362 SPE targets.
14363 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14364 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14365 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14366 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14367 (target_regsets): Add AltiVec and SPE register sets.
14368 * configure.ac: Check for AltiVec and SPE.
14369 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14370 (ppc_fill_vrregset, ppc_store_vrregset): New.
14371 (target_regsets): Add AltiVec register set.
14372 * configure: Regenerated.
14373
fd462a61
DJ
143742007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14375
14376 * linux-low.c (O_LARGEFILE): Define.
14377 (linux_read_memory): Use /proc/PID/mem.
14378 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14379 * configure, config.in: Regenerated.
14380
69f223ed
DJ
143812007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14382
14383 * linux-low.c (linux_wait_for_event): Do not pass signals while
14384 single-stepping.
14385
aec18585
PA
143862007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14387
14388 * win32-low.c (create_process): New.
14389 (win32_create_inferior): Use create_process instead of
14390 CreateProcess. If create_process failed retry appending an ".exe"
14391 suffix. Store the GetLastError result immediatelly after
14392 create_process calls and use it on the call to error.
14393
34d86ddd
PA
143942007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14395
14396 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14397
5a0e3bd0
JB
143982007-08-23 Joel Brobecker <brobecker@adacore.com>
14399
14400 * configure.ac: Switch license to GPLv3.
14401
f88c79e6
MS
144022007-08-01 Michael Snyder <msnyder@access-company.com>
14403
14404 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14405
6b3d9b83
PA
144062007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14407
14408 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14409 typedef.
14410 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14411 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14412 CloseToolhelp32Snapshot.
14413 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14414 CloseToolhelp32Snapshot.
14415
c588c53c
MS
144162007-07-27 Michael Snyder <michael.snyder@access-company.com>
14417
14418 * server.c (main): Check for inferior exit before main loop.
14419
aa0403d9
PA
144202007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14421
14422 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14423 instead of on tmp_desc.
14424
255e7678
DJ
144252007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14426 Daniel Jacobowitz <dan@codesourcery.com>
14427
14428 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14429 (add_thread): Minor cleanups.
14430 (clear_inferiors): Move lower in the file. Clear the DLL
14431 list.
14432 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14433 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14434 (xml_escape_text): New.
14435 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14436 for qSupported.
14437 (handle_v_cont): Report errors.
14438 (gdbserver_version): Update.
14439 (main): Correct size of own_buf. Do not report initial DLL events.
14440 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14441 (unloaded_dll, xml_escape_text): New.
14442 * win32-low.c (enum target_waitkind): Update comments.
14443 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14444 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14445 (win32_EnumProcessModules, win32_GetModuleInformation)
14446 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14447 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14448 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14449 (win32_Module32First, win32_Module32Next, load_toolhelp)
14450 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14451 (get_child_debug_event): Handle DLL events.
14452 (win32_wait): Likewise.
14453
0d37add9
DJ
144542007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14455
14456 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14457 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14458
45e2715e
PA
144592007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14460
14461 * win32-low.c (handle_output_debug_string): Ignore event if not
14462 waiting.
14463
c5674cf1
PA
144642007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14465
14466 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14467
2bbe3cc1
DJ
144682007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14469
14470 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14471
ae13219e
DJ
144722007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14473
14474 * inferiors.c (change_inferior_id): Add comment.
14475 * linux-low.c (check_removed_breakpoint): Add an early
14476 prototype. Improve debug output.
14477 (linux_attach): Doc update.
14478 (linux_detach_one_process, linux_detach): Clean up before releasing
14479 each process.
14480 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14481 * linux-low.h (struct process_info): Doc improvement.
14482 * mem-break.c (delete_all_breakpoints): New.
14483 * mem-break.h (delete_all_breakpoints): New prototype.
14484 * thread-db.c (find_first_thread): New.
14485 (thread_db_create_event): Call it instead of
14486 thread_db_find_new_threads. Clean up unused variables.
14487 (maybe_attach_thread): Remove first thread handling.
14488 (thread_db_find_new_threads): Use find_first_thread.
14489 (thread_db_get_tls_address): Likewise.
14490
4105de34
DJ
144912007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14492
14493 * thread-db.c (thread_db_find_new_threads): Add prototype.
14494 (thread_db_create_event): Check for the main thread before adding
14495 a new thread.
14496 (maybe_attach_thread): Only enable event reporting if TID == 0.
14497 (thread_db_get_tls_address): Check for new threads.
14498
2b876972
DJ
144992007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14500
14501 * linux-low.c (linux_create_inferior): Try execv before execvp.
14502 * spu-low.c (spu_create_inferior): Likewise.
14503
7a245884
DJ
145042007-06-13 Mike Frysinger <vapier@gentoo.org>
14505
14506 * linux-low.c (linux_create_inferior): Change execv to execvp.
14507 * spu-low.c (spu_create_inferior): Likewies.
14508
117ce543
DJ
145092007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14510
14511 * Makefile.in (clean): Clean new files instead of deleted ones.
14512 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14513 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14514 rules.
14515 * configure.srv: Specify XML files and new regformats for MIPS and
14516 MIPS64 GNU/Linux.
14517 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14518 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14519 an entry for the restart register.
14520 (mips_cannot_fetch_register, mips_cannot_store_register)
14521 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14522 register names to match the XML descriptions.
14523 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14524 restart register instead of $0.
14525
0e7f50da
UW
145262007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14527 Markus Deuling <deuling@de.ibm.com>
14528
14529 * remote-utils.c (decode_xfer_write): New function.
14530 * server.h (decode_xfer_write): Add prototype.
14531 * server.c (handle_query): Add PACKET_LEN argument. Support
14532 qXfer:spu:read and qXfer:spu:write packets.
14533 (main): Pass packet_len to handle_query.
14534 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14535 * target.h (target_ops): Add qxfer_spu.
14536
374c1d38
UW
145372007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14538
14539 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14540 accessing non-seekable spufs files.
14541
bb63802a
UW
145422007-05-16 Markus Deuling <deuling@de.ibm.com>
14543
889bf7c5 14544 * server.c (handle_query): Add reply for qC packet.
bb63802a 14545
7390519e
PA
145462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14547 Leo Zayas <lerele@champenstudios@com>
14548
14549 * server.h (check_remote_input_interrupt_request): New function.
14550 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14551 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14552 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14553 (check_remote_input_interrupt_request): New function.
14554 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14555 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14556 winapi_GenerateConsoleCtrlEvent): New typedefs.
14557 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14558 to 250 ms.
14559 (win32_wait): Check for remote interrupt request
14560 with check_remote_input_interrupt_request.
14561 (win32_request_interrupt): New function.
14562 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14563
34b34921
PA
145642007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14565
14566 * win32-low.c (debug_registers_changed,
14567 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14568 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14569 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14570 (thread_rec): Get context using the low target.
14571 (child_add_thread): Call thread_added on the low target,
14572 which does the same thing.
14573 (regptr): Delete.
14574 (do_initial_child_stuff): Remove debug registers references.
14575 Set context using the low target. Resume threads after
14576 setting the contexts.
14577 (child_continue): Remove dead variable. Remove debug
14578 registers references.
14579 (child_fetch_inferior_registers): Go through the low target.
14580 (do_child_store_inferior_registers): Remove.
14581 (child_store_inferior_registers): Go through the low target.
14582 (win32_resume): Remove debug registers references.
14583 Set context using the low target.
14584 (handle_exception): Change return type to void. Don't record
14585 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14586 first chance exception.
889bf7c5 14587 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14588 goto loop. Always return after waiting for debug event.
14589 (win32_wait): Convert to switch statement. Handle spurious
14590 events.
14591
14592 * win32-i386-low.c (debug_registers_changed,
14593 debug_registers_used): New.
14594 (initial_stuff): Rename to ...
14595 (i386_initial_stuff): ... this. Clear debug registers
14596 state variables.
14597 (store_debug_registers): Delete.
14598 (i386_get_thread_context): New.
14599 (load_debug_registers): Delete.
14600 (i386_set_thread_context): New.
14601 (i386_thread_added): New.
14602 (single_step): Rename to ...
14603 (i386_single_step): ... this.
14604 (do_fetch_inferior_registers): Rename to ...
14605 (i386_fetch_inferior_register): ... this.
14606 (i386_store_inferior_register): New.
14607 (the_low_target): Adapt to new interface.
14608
14609 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14610 (arm_get_thread_context): New.
14611 (arm_set_thread_context): New.
14612 (regptr): New.
14613 (do_fetch_inferior_registers): Rename to ...
14614 (arm_fetch_inferior_register): ... this.
14615 (arm_store_inferior_register): New.
14616 (arm_wince_breakpoint): Reimplement as unsigned long.
14617 (arm_wince_breakpoint_len): Define.
14618 (the_low_target): Adapt to new interface.
14619
14620 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14621 load_debug_registers. Add get_thread_context, set_thread_context,
14622 thread_added and store_inferior_register. Rename
14623 fetch_inferior_registers to fetch_inferior_register.
14624 (regptr): Remove declaration.
14625
dd6953e1
PA
146262007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14627
14628 * linux-low.c (linux_detach): Change return type to int. Return 0.
14629 * spu-low.c (spu_detach): Likewise.
14630
444d6139
PA
146312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14632
14633 * target.h (target_ops): Change return type of detach to int.
14634 Add join.
14635 (join_inferior): New.
14636 * server.c (main): Don't skip detach support on mingw32.
14637 If the inferior doesn't support detaching return error.
14638 Call join_inferior instead of using waitpid.
14639 * linux-low.c (linux_join): New.
14640 (linux_target_op): Add linux_join.
14641 * spu-low.c (spu_join): New.
14642 (spu_target_ops): Add spu_join.
14643 * win32-low.c (win32_detach): Adapt to new interface.
14644 Reopen current_process_handle before detaching. Issue a child
14645 resume before detaching.
14646 (win32_join): New.
14647 (win32_target_op): Add win32_join.
14648
1d5315fe
PA
146492007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14650
14651 * win32-low.c (win32-attach): Fix return value.
14652 * target.h (target_ops): Describe ATTACH return values.
14653
bf914831
PA
146542007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14655
14656 * win32-low.c (GETPROCADDRESS): Define.
14657 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14658 (winapi_DebugSetProcessKillOnExit): Likewise.
14659 (win32_create_inferior): Force usage of ansi CreateProcessA.
14660 (win32_attach): Use GETPROCADDRESS.
14661 (win32_detach): Likewise.
14662
f72f3e60
PA
146632007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14664
14665 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14666
ed50f18f
PA
146672007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14668
14669 * win32-low.c: Commit leftover changes from 2007-03-29.
14670
0c2ead7e
DJ
146712007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14672
14673 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14674 fields short instead of int. Add explicit padding.
14675 (i387_cache_to_fsave): Remove unnecessary casts.
14676 (i387_fsave_to_cache): Doc fix.
14677 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14678
73725ff3
DJ
146792007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14680
14681 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14682 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14683
d99f33d8
PA
146842007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14685
14686 * configure.srv (arm*-*-mingw32ce*): Move near the other
14687 arm targets.
14688
68070c10
PA
146892007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14690
2482afc6 14691 * configure.ac: Add errno checking.
68070c10
PA
14692 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14693 sys/file.h and malloc.h.
14694 (AC_CHECK_DECLS): Add perror.
14695 (srv_mingwce): Handle.
2482afc6 14696 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14697 win32-i386-low.o to srv_tgtobj.
14698 (i[34567]86-*-mingw*): Likewise.
14699 (arm*-*-mingw32ce*): Add case.
14700 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14701 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14702 [__MINGW32CE__] (strerror): New function.
14703 [__MINGW32CE__] (errno): Define to GetLastError.
14704 [__MINGW32CE__] (COUNTOF): New macro.
14705 (remote_open): Remove extra close call.
14706 * mem-break.c (delete_breakpoint_at): New function.
14707 * mem-break.h (delete_breakpoint_at): Declare.
14708 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14709 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14710 [USE_WIN32API] (read, write): Add char* casts.
14711 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14712 * server.h: Include wincecompat.h on Windows CE.
14713 [HAVE_ERRNO_H]: Check.
14714 (perror): Declare if not declared.
14715 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14716 (perror_with_name): Remove errno declaration.
14717 * wincecompat.h: New.
14718 * wincecompat.c: New.
14719 * win32-low.h: New.
14720 * win32-arm-low.c: New.
14721 * win32-i386-low.c: New.
14722 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14723 (OUTMSG2): Make it safe.
14724 (_T): New macro.
14725 (COUNTOF): New macro.
14726 (NUM_REGS): Get it from the low target.
14727 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14728 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14729 (thread_rec): Let low target handle debug registers.
14730 (child_add_thread): Likewise.
14731 (child_init_thread_list): Likewise.
14732 (continue_one_thread): Likewise.
14733 (regptr): New.
14734 (do_child_fetch_inferior_registers): Move to ...
14735 * win32-i386-low.c: ... here, and rename to ...
14736 (do_fetch_inferior_registers): ... this.
889bf7c5 14737 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14738 Go through the low target.
14739 (do_child_store_inferior_registers): Use regptr.
14740 (strwinerror): New function.
14741 (win32_create_inferior): Handle Windows CE.
14742 Use strwinerror instead of strerror on Windows error
14743 codes. Add program to the error output.
14744 Don't close the main thread handle on Windows CE.
14745 (win32_attach): Use coredll.dll on Windows CE.
14746 (win32_kill): Close current process and current
14747 thread handles.
14748 (win32_detach): Use coredll.dll on Windows CE.
14749 (win32_resume): Let low target handle debug registers, and
14750 step request.
14751 (handle_exception): Add/Remove initial breakpoint. Avoid
14752 non-existant WSTOPSIG on Windows CE.
14753 (win32_read_inferior_memory): Cast to remove warning.
14754 (win32_arch_string): Go through the low target.
14755 (initialize_low): Call set_breakpoint_data with the low
14756 target's breakpoint.
14757 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14758 FOP_REGNUM, mappings): Move to ...
14759 * win32-i386-low.c: ... here.
14760 * win32-low.c (win32_thread_info): Move to ...
14761 * win32-low.h: ... here.
14762 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14763 win32-arm-low.c and wincecompat.c.
14764 (all:): Add $EXEEXT.
14765 (install-only:): Likewise.
14766 (gdbserver:): Likewise.
14767 (gdbreplay:): Likewise.
14768 * config.in: Regenerate.
14769 * configure: Regenerate.
14770
41093d81
PA
147712007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14772
14773 * win32-low.c: Rename typedef thread_info to
14774 win32_thread_info throughout.
14775
544afa54
PA
147762007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14777
14778 * win32-i386-low.c: Rename to ...
14779 * win32-low.c: ... this.
14780 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14781 * Makefile.in: Likewise.
14782
bce7165d
PA
147832007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14784
14785 * remote-utils.c (monitor_output): Constify msg parameter.
14786 * server.h (monitor_output): Likewise.
14787 * win32-i386-low.c (handle_output_debug_string): New.
14788 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14789 handle_output_debug_string.
14790 (get_child_debug_event): Likewise.
14791
506c7aa0
DJ
147922007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14793
14794 * server.c (main): Correct strtoul check.
14795
42c81e2a
DJ
147962007-03-27 Jon Ringle <jon@ringle.org>
14797
14798 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14799
9453113a
DJ
148002007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14801
14802 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14803
64a69107
DJ
148042007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14805
14806 * terminal.h: Check HAVE_SGTTY_H.
14807
148082007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14809
14810 * remote-utils.c (remote_open): Print out the assigned port number.
14811
c74d0ad8
DJ
148122007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14813
14814 * remote-utils.c (monitor_output): New function.
14815 * server.c (debug_threads): Define here.
14816 (monitor_show_help): New function.
14817 (handle_query): Handle qRcmd.
14818 (main): Do not handle 'd' packet.
14819 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14820 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14821 of debug_threads.
14822
de7c3b4a
PA
148232007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14824
14825 * Makefile.in (EXEEXT): New.
14826 (clean): Use $(EXEEXT).
14827
ef57601b
PA
148282007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14829
14830 * target.h (target_ops): Rename send_signal to request_interrupt,
14831 and remove enum target_signal parameter.
14832 * linux-low.c (linux_request_interrupt): Rename from
14833 linux_send_signal, and always send SIGINT.
14834 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14835 and always send SIGINT.
14836 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14837 of send_signal.
14838 (input_interrupt): Likewise.
14839
820f2bda
PA
148402007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14841
14842 * server.c (get_features_xml): Check if target implemented
14843 arch_string.
14844 * win32-i386-low.c (win32_arch_string): New.
14845 (win32_target_ops): Add win32_arch_string as arch_string member.
14846
ab39bf24
UW
148472007-02-22 Markus Deuling <deuling@de.ibm.com>
14848
14849 * spu-low.c (spu_arch_string): New.
14850 (spu_target_ops): Add spu_arch_string.
14851
61ff6e04
DJ
148522007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14853
14854 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14855 * configure.ac: Do not check for terminal.h.
14856 * configure, config.in: Regenerated.
14857
fb1e4ffc
DJ
148582007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14859
14860 * Makefile.in (OBS): Add $(XML_BUILTIN).
14861 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14862 (clean): Update.
14863 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14864 (arm-with-iwmmxt.c): New.
14865 * config.in, configure: Regenerate.
14866 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14867 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14868 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14869 (arm*-*-linux*): Add iWMMXt and regset support.
14870 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14871 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14872 (arm_store_wmmxregset, target_regsets): New.
14873 * server.c (get_features_xml): Take annex argument. Check builtin
14874 XML documents.
14875 (handle_query): Handle multiple annexes.
14876
0f48aa01
DJ
148772007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14878
14879 * remote-utils.c [USE_WIN32API] (read, write): Define.
14880 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14881 write.
14882
23181151
DJ
148832007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14884
14885 * linux-i386-low.c (the_low_target): Set arch_string.
14886 * linux-x86-64-low.c (the_low_target): Likewise.
14887 * linux-low.c (linux_arch_string): New.
14888 (linux_target_ops): Add it.
14889 * linux-low.h (struct linux_target_ops): Add arch_string.
14890 * server.c (write_qxfer_response): Use const void * for DATA.
14891 (get_features_xml): New.
14892 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14893 * target.h (struct target_ops): Add arch_string method.
14894
9d606399
DJ
148952007-01-03 Denis Pilat <denis.pilat@st.com>
14896 Daniel Jacobowitz <dan@codesourcery.com>
14897
14898 * linux-low.c (linux_kill): Handle being called with no threads.
14899 * win32-i386-low.c (win32_kill): Likewise.
14900 (get_child_debug_event): Clear current_process_handle.
14901
149022006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14903 Daniel Jacobowitz <dan@codesourcery.com>
14904
14905 * remote-utils.c (remote_open): Check the type of specified
14906 serial port devices before opening them.
14907 * server.c (main): Kill the inferior if an error occurs during
14908 the first remote_open.
14909
a5e13d24
DJ
149102006-12-05 Markus Deuling <deuling@de.ibm.com>
14911
14912 * README: Update supported targets.
14913
186947f7
DJ
149142006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14915
14916 * Makefile.in (clean): Remove reg-mips64.c.
14917 (reg-mips64.c, reg-mips64.o): New rules.
14918 * configure.srv: Handle mips64. Include regset support for mips.
14919 * linux-mips-low.c (union mips_register): New.
14920 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14921 (mips_breakpoint, mips_breakpoint_at): Use int.
14922 (mips_collect_register, mips_supply_register)
14923 (mips_collect_register_32bit, mips_supply_register_32bit)
14924 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14925 (mips_store_fpregset, target_regsets): New.
14926 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14927
a13e2c95
UW
149282006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14929
14930 * configure.srv: Add target "spu*-*-*".
14931 * Makefile.in (clean): Remove reg-spu.c.
14932 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14933 * spu-low.c: New file.
14934
cb7283db
DJ
149352006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14936
14937 * configure.ac: Correct td_thr_tls_get_addr test.
14938 * configure: Regenerated.
14939
89be2091
DJ
149402006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14941
14942 * linux-low.c (linux_wait_for_event): Reformat. Use the
14943 pass_signals array.
14944 * remote-utils.c (decode_address_to_semicolon): New.
14945 * server.c (pass_signals, handle_general_set): New.
14946 (handle_query): Mention QPassSignals for qSupported.
14947 (main): Call handle_general_set.
14948 * server.h (pass_signals, decode_address_to_semicolon): New.
14949
000ef4f0
DJ
149502006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14951
14952 * server.c (handle_query): Correct error handling for read_auxv.
14953
b7149293
UW
149542005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14955
14956 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14957 and srv_linux_thread_db to yes.
14958 * linux-s390-low.c (s390_fill_gregset): New function.
14959 (target_regsets): Define data structure.
14960
dae5f5cf
DJ
149612006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14962
14963 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14964 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14965 * config.in, configure: Regenerated.
14966 * inferiors.c (gdb_id_to_thread): New function.
14967 (gdb_id_to_thread_id): Use it.
14968 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14969 * linux-low.h (struct process_info): Add th member.
14970 (thread_db_get_tls_address): New prototype.
14971 * remote-utils.c (decode_address): Make non-static.
14972 * server.c (handle_query): Handle qGetTLSAddr.
14973 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14974 * target.h (struct target_ops): Add get_tls_address.
14975 * thread-db.c (maybe_attach_thread): Save the thread handle.
14976 (thread_db_get_tls_address): New.
14977
32ca6d61
DJ
149782006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14979
14980 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14981 (linux_resume_one_process): Take a siginfo_t *. Update all
14982 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14983 (struct pending_signals): Add a siginfo_t.
14984 (linux_wait_for_process): Always set last_status.
14985 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14986 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14987 * linux-low.h (struct process_info): Add last_status.
14988
5ffff7c1
DJ
149892006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14990
14991 * remote-utils.c (try_rle): New function.
14992 (putpkt_binary): Use it.
14993
8695c747
DJ
149942006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14995
14996 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14997 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14998 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14999 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15000 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15001 point registers.
15002
290fadea
RS
150032006-08-08 Richard Sandiford <richard@codesourcery.com>
15004
15005 * server.c (terminal_fd): New variable.
15006 (old_foreground_pgrp): Likewise.
15007 (restore_old_foreground_pgrp): New function.
15008 (start_inferior): Record the terminal file descriptor in terminal_fd
15009 and its original foreground group in old_foreground_pgrp. Register
15010 restore_old_foreground_pgrp with atexit().
15011
9f2e1e63
DJ
150122006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15013
15014 * server.c (handle_query): Correct qPart to qXfer.
15015
b80864fb
DJ
150162006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15017
15018 * configure.ac: Check for more headers which are missing on
15019 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15020 * configure.srv: Add Cygwin and mingw32.
15021 * remote-utils.c: Don't include headers unconditionally which
15022 are missing on mingw32. Include <winsock.h> for mingw32.
15023 (remote_open): Adjust for mingw32 support. Flush
15024 standard error after writing to it.
15025 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15026 (unblock_async_io, enable_async_io, disable_async_io)
15027 (readchar, getpkt): Update for Winsock support.
15028 (prepare_resume_reply): Expect a protocol signal number.
15029 * server.c: Disable <sys/wait.h> on mingw32.
15030 (start_inferior): Adjust for mingw32 support. Flush
15031 standard error after writing to it.
15032 (attach_inferior): Likewise. Use protocol signal
15033 numbers.
15034 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15035 and names.
15036 * win32-i386-low.c: New file.
15037 * Makefile.in (XM_CLIBS): Set.
15038 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15039 (win32-i386-low.o): New dependency rule.
15040 * linux-low.c (linux_wait): Use target signal numbers.
15041 * target.h (struct target_ops): Doc fix.
15042 * server.h (target_signal_to_name): New prototype.
15043 * gdbreplay.c: Don't include headers unconditionally which
15044 are missing on mingw32. Include <winsock.h> for mingw32.
15045 (remote_close, remote_open): Adjust for Winsock support.
15046 * configure, config.in: Regenerated.
15047
0876f84a
DJ
150482006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15049
15050 * server.c (decode_xfer_read, write_qxfer_response): New.
15051 (handle_query): Take a packet length argument. Handle
15052 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15053 the qSupported response.
15054 (main): Update call to handle_query.
15055
01f9e8fa
DJ
150562006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15057
15058 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15059 (putpkt_binary): Renamed from putpkt and adjusted for binary
15060 data.
15061 (putpkt): New wrapper for putpkt_binary.
15062 (readchar): Don't mask off the high bit.
15063 (decode_X_packet): New function.
15064 * server.c (main): Call putpkt_binary if a handler sets the packet
15065 length. Save the length of the incoming packet. Handle 'X'.
15066 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15067
be2a5f71
DJ
150682006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15069
15070 * server.c (handle_query): Handle qSupported.
15071
ea025f5f
DJ
150722006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15073
15074 * remote-utils.c (all_symbols_looked_up): New variable.
15075 (look_up_one_symbol): Check it.
15076 * server.h (look_up_one_symbol): New declaration.
15077 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15078
9308fc88
DJ
150792006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15080
15081 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15082 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15083 (PTRACE_GET_THREAD_AREA): Define.
15084 (ps_get_thread_area): New function.
15085
52fb6437
NS
150862006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15087
15088 * configure.srv (m68k*-*-uclinux*): New target.
15089 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15090 (linux_resume_one_process): Remove extraneous cast.
15091 (linux_read_offsets): New.
15092 (linux_target_op): Add linux_read_offsets on mmuless systems.
15093 * server.c (handle_query): Add qOffsets logic.
15094 * target.h (struct target_ops): Add read_offsets.
15095
21b0f40c
DJ
150962006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15097
15098 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15099 (PTRACE_GET_THREAD_AREA): Define.
15100 (ps_get_thread_area): New function.
15101 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15102 (linux-x86-64-low.o): Update.
15103
0050a760
DJ
151042006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15105
15106 * configure.ac: Remove checks for prfpregset_t.
15107 * gdb_proc_service.h: New file.
15108 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15109 new "gdb_proc_service.h".
15110 * proc-service.c: Likewise.
15111 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15112 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15113 * Makefile.in (gdb_proc_service_h): Updated.
15114 * configure, config.in: Regenerated.
15115
b92a518e
DJ
151162006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15117
15118 * remote-utils.c (prepare_resume_reply): Move declaration
15119 of gdb_id_from_wait to the top of the block.
15120
545587ee
DJ
151212006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15122
15123 * linux-low.c (regsets_store_inferior_registers): Read the regset
15124 from the target before filling it.
15125
9db87ebd
DJ
151262006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15127
15128 * server.c (attach_inferior): Return SIGTRAP for a successful
15129 attach.
15130
dd24457d
DJ
151312006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15132
15133 * Makefile.in (OBS): Add version.o.
15134 (STAGESTUFF): Delete.
15135 (version.o): Add dependencies.
15136 (version.c): Replace rule.
15137 (clean): Remove version.c.
15138 * server.c (gdbserver_version): New.
15139 (gdbserver_usage): Use printf.
15140 (main): Handle --version and --help.
15141 * server.h (version, host_name): Add declarations.
15142
6f0f660e
EZ
151432005-12-23 Eli Zaretskii <eliz@gnu.org>
15144
889bf7c5
PA
15145 * linux-arm-low.c:
15146 * linux-arm-low.c:
15147 * inferiors.c:
15148 * i387-fp.h:
15149 * i387-fp.c:
15150 * gdbreplay.c:
15151 * regcache.c:
15152 * proc-service.c:
15153 * mem-break.h:
15154 * mem-break.c:
15155 * linux-x86-64-low.c:
15156 * linux-sh-low.c:
15157 * linux-s390-low.c:
15158 * linux-ppc64-low.c:
15159 * linux-ppc-low.c:
15160 * linux-mips-low.c:
15161 * linux-m68k-low.c:
15162 * linux-m32r-low.c:
15163 * linux-low.h:
15164 * linux-low.c:
15165 * linux-ia64-low.c:
15166 * linux-i386-low.c:
15167 * linux-crisv32-low.c:
15168 * thread-db.c:
15169 * terminal.h:
15170 * target.h:
15171 * target.c:
15172 * server.h:
15173 * server.c:
15174 * remote-utils.c:
15175 * regcache.h:
15176 * utils.c:
15177 * Makefile.in:
15178 * configure.ac:
6f0f660e
EZ
15179 * gdbserver.1: Add (C) after Copyright. Update the FSF
15180 address.
15181
9d1fb177
DJ
151822005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15183
15184 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15185 (arm_breakpoint_at): Recognize both breakpoints.
15186 (the_low_target): Use the correct breakpoint instruction.
15187
011a70c2
DJ
151882005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15189
15190 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15191 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15192 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15193 (the_low_target): Update.
15194
7fb85e41
AS
151952005-10-25 Andreas Schwab <schwab@suse.de>
15196
15197 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15198
15199 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15200 (ia64_num_regs): Reduce to 462.
15201
3db0444b
DJ
152022005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15203
15204 * acinclude.m4: Correct quoting.
15205 * aclocal.m4: Regenerated.
15206
15207 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15208 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15209 (thread_db_init): Call thread_db_err_str.
15210 * configure.ac: Check for TD_VERSION.
15211 * config.in, configure: Regenerated.
15212
bee0189a
DJ
152132005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15214
15215 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15216
e9d25b98
DJ
152172005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15218
15219 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15220 is not available. Define HAVE_PTRACE_GETREGS if it is.
15221 * config.in, configure: Regenerated.
15222 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15223 * linux-i386-low.c, linux-m68k-low.c: Update to use
15224 HAVE_PTRACE_GETREGS.
15225 * linux-low.c (regsets_fetch_inferior_registers)
15226 (regsets_store_inferior_registers): Only return 0 if we processed
15227 GENERAL_REGS.
15228 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15229 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15230
a06660f7
DJ
152312005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15232
15233 * inferiors.c (struct thread_info): Add gdb_id.
15234 (add_thread): Add gdb_id argument.
15235 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15236 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15237 calls to add_thread.
15238 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15239 * server.c (handle_query): Use thread_to_gdb_id.
15240 (handle_v_cont, main): Use gdb_id_to_thread_id.
15241 * server.h (add_thread): Update prototype.
15242 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15243 prototypes.
15244
5a1f5858
DJ
152452005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15246
15247 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15248 left-padded registers.
15249 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15250 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15251
e122f1f5
SE
152522005-07-01 Steve Ellcey <sje@cup.hp.com>
15253
15254 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15255 * configure: Regenerate.
15256 * config.in: Regenerate.
15257 * server.h (NEED_DECLARATION_STRERROR):
15258 Replace with !HAVE_DECL_STRERROR.
15259
d592fa2f
DJ
152602005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15261
15262 * linux-low.c (linux_wait, linux_send_signal): Don't test
15263 an unsigned long variable for > 0 if it could be MAX_ULONG.
15264 * server.c (myresume): Likewise.
15265 * target.c (set_desired_inferior): Likewise.
15266
ccbd4912
MK
152672005-06-13 Mark Kettenis <kettenis@gnu.org>
15268
15269 * configure.ac: Simplify and improve check for socklen_t.
15270 * configure, config.in: Regenerate.
15271
f450004a
DJ
152722005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15273
15274 * acconfig.h: Remove.
15275 * configure.ac: Add a test for socklen_t. Use three-argument
15276 AC_DEFINE throughout.
15277 * config.in: Regenerated using autoheader 2.59.
15278 * configure: Regenerated.
15279
15280 * gdbreplay.c (socklen_t): Provide a default.
15281 (remote_open): Use socklen_t.
15282 * remote-utils.c (socklen_t): Provide a default.
15283 (remote_open): Use socklen_t.
15284 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15285 unsigned char.
15286
15287 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15288 char for buffers.
15289 * linux-low.c (linux_read_memory, linux_write_memory)
15290 (linux_read_auxv): Likewise.
15291 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15292 (check_mem_write): Likewise.
15293 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15294 Likewise.
15295 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15296 (registers_from_string, register_data): Likewise.
15297 * server.c (handle_query, main): Likewise.
15298 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15299 (decode_M_packet): Likewise.
15300 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15301 * target.h (struct target_ops): Update read_memory, write_memory,
15302 and read_auxv.
15303 (read_inferior_memory, write_inferior_memory): Update.
15304 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15305 to unsigned char *.
15306 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15307 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15308 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15309 linux-s390-low.c, linux-sh-low.c: Update for changes in
15310 read_inferior_memory and the_low_target->breakpoint.
15311
eee84df1
DJ
153122005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15313
15314 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15315 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15316 * configure.srv: Add powerpc64-*-linux*.
15317 * linux-ppc64-low.c: New file.
15318
45b134e5
OF
153192005-05-23 Orjan Friberg <orjanf@axis.com>
15320
15321 * linux-cris-low.c: New file with support for CRIS.
15322 * linux-crisv32-low.c: Ditto for CRISv32.
15323 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15324 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15325 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15326 reg-crisv32.o, and reg-crisv32.c to make rules.
15327 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15328 recognized targets.
15329
48d93c75
UW
153302005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15331
15332 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15333 of sizeof (PTRACE_XFER_TYPE).
15334 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15335
e013ee27
OF
153362005-05-12 Orjan Friberg <orjanf@axis.com>
15337
889bf7c5 15338 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15339 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15340 pointers for hardware watchpoint support.
15341 * linux-low.h (struct linux_target_ops): Ditto.
15342 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15343 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15344 to linux_target_ops.
15345 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15346 reply packet.
15347 * server.c (main): Recognize 'Z' and 'z' packets.
15348
b0ded00b
UW
153492005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15350
15351 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15352 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15353 (the_low_target): Add new members.
15354
8643e2ad
DJ
153552005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15356
15357 * proc-service.c (ps_lgetregs): Search all_processes instead of
15358 all_threads.
15359
fc620387
DJ
153602005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15361
15362 * server.c (start_inferior): Change return type to int.
15363 (attach_inferior): Change sigptr to int *.
15364 (handle_v_cont, handle_v_requests): Change signal to int *.
15365 (main): Change signal to int.
15366
153672005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15368
15369 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15370 * configure.srv: Add m32r*-*-linux*.
15371 * linux-m32r-low.c: New file.
15372
e0e76420
DJ
153732005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15374
15375 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15376
a1928bad
DJ
153772005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15378
15379 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15380 Take unsigned long arguments for PIDs.
15381 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15382 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15383 (wait_for_sigstop, linux_resume_one_process)
15384 (regsets_fetch_inferior_registers, linux_send_signal)
15385 (linux_read_auxv): Likewise. Update the types of variables holding
15386 PIDs. Update format string specifiers.
15387 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15388 * remote-utils.c (prepare_resume_reply): Likewise.
15389 * server.c (cont_thread, general_thread, step_thread)
15390 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15391 unsigned long.
15392 (handle_query): Update format specifiers.
15393 (handle_v_cont, main): Use strtoul for thread IDs.
15394 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15395 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15396 (general_thread, step_thread, thread_from_wait)
15397 (old_thread_from_wait): Update.
15398 * target.h (struct thread_resume): Use unsigned long for THREAD.
15399 (struct target_ops): Use unsigned long for arguments to attach and
15400 thread_alive.
15401
dcdb98d2
DJ
154022005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15403
15404 * acinclude.m4: Include bfd/bfd.m4 directly.
15405 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15406 <agriffis@toolchain.org>.
15407 * aclocal.m4, configure: Regenerated.
15408
bec39cab
AC
154092005-01-07 Andrew Cagney <cagney@gnu.org>
15410
15411 * configure.ac: Rename configure.in, require autoconf 2.59.
15412 * configure: Re-generate.
15413
434c4c77
DJ
154142004-12-08 Daniel Jacobowitz <dan@debian.org>
15415
15416 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15417 LIBS when finished.
15418 * aclocal.m4: Regenerated.
15419 * configure: Regenerated.
15420
db1d3e1b
AS
154212004-11-21 Andreas Schwab <schwab@suse.de>
15422
15423 * linux-m68k-low.c (m68k_num_gregs): Define.
15424 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15425 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15426 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15427 (m68k_breakpoint_at): New. Add to the_low_target.
15428
15429 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15430 srv_linux_thread_db to yes.
15431
43360365
JB
154322004-10-20 Joel Brobecker <brobecker@gnat.com>
15433
15434 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15435 (ARCH_SET_FS): Likewise.
15436 (ARCH_GET_FS): Likewise.
15437 (ARCH_GET_GS): Likewise.
15438
fd500816
DJ
154392004-10-16 Daniel Jacobowitz <dan@debian.org>
15440
15441 * linux-i386-low.c (ps_get_thread_area): New.
15442 * linux-x86-64-low.c (ps_get_thread_area): New.
15443 * linux-low.c: Include <sys/syscall.h>.
15444 (linux_kill_one_process): Don't kill the first thread here.
15445 (linux_kill): Kill the first thread here.
15446 (kill_lwp): New function.
15447 (send_sigstop, linux_send_signal): Use it.
15448 * proc-service.c: Clean up #ifdefs.
15449 (fpregset_info): Delete.
15450 (ps_lgetregs): Update and enable implementation.
15451 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15452 implementations.
15453 * remote-utils.c (struct sym_cache, symbol_cache): New.
15454 (input_interrupt): Print a clearer message.
15455 (async_io_enabled): New variable.
15456 (enable_async_io, disable_async_io): Use it. Update comments.
15457 (look_up_one_symbol): Use the symbol cache.
15458 * thread-db.c (thread_db_look_up_symbols): New function.
15459 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15460
f6de3c42
DJ
154612004-10-16 Daniel Jacobowitz <dan@debian.org>
15462
15463 * configure.in: Test for -rdynamic.
15464 * configure: Regenerated.
15465 * Makefile (INTERNAL_LDFLAGS): New.
15466 (gdbserver, gdbreplay): Use it.
15467
2c0fc042
AC
154682004-09-02 Andrew Cagney <cagney@gnu.org>
15469
15470 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15471
075b3282
DJ
154722004-03-23 Daniel Jacobowitz <drow@mvista.com>
15473
15474 * linux-low.c (linux_wait): Clear all_processes list also.
15475
fa6a77dc
DJ
154762004-03-12 Daniel Jacobowitz <drow@mvista.com>
15477
15478 * linux-low.c: Include <errno.h>. Remove extern declaration of
15479 errno.
15480
6d782a97
DJ
154812004-03-12 Daniel Jacobowitz <drow@mvista.com>
15482
15483 * gdbreplay.c, server.h, utils.c: Update copyright years.
15484
3a7fb99b
DJ
154852004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15486
15487 * server.c (main): Print child status or termination signal from
15488 variable 'signal', not 'sig'.
15489
c3e735a6
DJ
154902004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15491
15492 * linux-low.c (linux_read_memory): Change return type to
15493 int. Check for and return error from ptrace().
15494 * target.c (read_inferior_memory): Change return type to int. Pass
15495 back return status from the_target->read_memory().
15496 * target.h (struct target_ops): Adapt *read_memory() prototype.
15497 Update comment.
15498 (read_inferior_memory): Adapt prototype.
15499 * server.c (main): Return an error packet if
15500 read_inferior_memory() returns an error.
15501
a59d1c82
DJ
155022004-03-04 Daniel Jacobowitz <drow@mvista.com>
15503
15504 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15505 Unify with other clean targets.
15506
dc3f8883
DJ
155072004-02-29 Daniel Jacobowitz <drow@mvista.com>
15508
15509 * server.c (handle_v_cont): Call set_desired_inferior.
15510
89a208da
DJ
155112004-02-29 Daniel Jacobowitz <drow@mvista.com>
15512
15513 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15514
62ea82f5
DJ
155152004-02-29 Daniel Jacobowitz <drow@mvista.com>
15516
15517 * linux-low.c (linux_wait): Unblock async I/O.
15518 (linux_resume): Block and enable async I/O.
15519 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15520 * server.h (block_async_io, unblock_async_io): Add prototypes.
15521
6910d122
DJ
155222004-02-29 Daniel Jacobowitz <drow@mvista.com>
15523
15524 * remote-utils.c (remote_open): Print a status notice after
15525 opening a TCP port.
15526 * server.c (attach_inferior): Print a status notice after
15527 attaching.
15528
155292004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15530
15531 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15532
c89dc5d4
DJ
155332004-02-26 Daniel Jacobowitz <drow@mvista.com>
15534
15535 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15536 error packet.
15537 * server.c, target.h: Update copyright years.
15538
4b8dad4a
RM
155392004-02-25 Roland McGrath <roland@redhat.com>
15540
15541 * target.h (struct target_ops): New member `read_auxv'.
15542 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15543 * linux-low.c (linux_read_auxv): New function.
15544 (linux_target_ops): Initialize `read_auxv' member to that.
15545
d7446758
JB
155462004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15547
15548 Committed by Jim Blandy <jimb@redhat.com>.
15549
15550 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15551 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15552 instead of GPR_SIZE to distiguish s390 and s390x targets.
15553
5544ad89
DJ
155542004-01-31 Daniel Jacobowitz <drow@mvista.com>
15555
15556 * linux-low.c: Update copyright year.
15557 (check_removed_breakpoint): Clear pending_is_breakpoint.
15558 (linux_set_resume_request, linux_queue_one_thread)
15559 (resume_status_pending_p): New functions.
15560 (linux_continue_one_thread): Use process->resume.
15561 (linux_resume): Only resume threads if there are no pending events.
15562 * linux-low.h (struct process_info): Add resume request
15563 pointer.
15564
2a68b70e
DJ
155652004-01-30 Daniel Jacobowitz <drow@mvista.com>
15566
15567 * regcache.c (new_register_cache): Clear the allocated register
15568 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15569
64386c31
DJ
155702003-10-13 Daniel Jacobowitz <drow@mvista.com>
15571
15572 * linux-low.c (linux_resume): Take a struct thread_resume *
15573 argument.
15574 (linux_wait): Update call.
15575 (resume_ptr): New static variable.
15576 (linux_continue_one_thread): Renamed from
15577 linux_continue_one_process. Use resume_ptr.
15578 (linux_resume): Use linux_continue_one_thread.
15579 * server.c (handle_v_cont, handle_v_requests): New functions.
15580 (myresume): New function.
15581 (main): Handle 'v' case.
15582 * target.h (struct thread_resume): New type.
15583 (struct target_ops): Change argument of "resume" to struct
15584 thread_resume *.
15585 (myresume): Delete macro.
15586
c938e9b0
L
155872003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15588
15589 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15590 (uninstall): Support DESTDIR.
15591
7f313d07
BC
15592Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15593
15594 * configure.srv: Add xscale*linux copy of arm*linux entry.
15595
3b2fc2ea
DJ
155962003-07-24 Daniel Jacobowitz <drow@mvista.com>
15597
15598 * linux-arm-low.c (arm_reinsert_addr): New function.
15599 (the_low_target): Add arm_reinsert_addr.
15600
1c0a559e
MK
156012003-07-08 Mark Kettenis <kettenis@gnu.org>
15602
15603 * mem-break.c: Remove whitespace at end of file.
15604
43d5792c
DJ
156052003-06-28 Daniel Jacobowitz <drow@mvista.com>
15606
15607 * configure.in: Check whether we need to prototype strerror.
15608 * server.h: Optionally prototype strerror.
15609 * gdbreplay.c (perror_with_name): Use strerror.
15610 * linux-low.c (linux_attach_lwp): Use strerror.
15611 * utils.c (perror_with_name): Use strerror.
15612 * config.in, configure: Regenerated.
15613
c8a86edf
DJ
156142003-06-28 Daniel Jacobowitz <drow@mvista.com>
15615
15616 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15617 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15618
73d37363
DJ
156192003-06-20 Daniel Jacobowitz <drow@mvista.com>
15620
15621 * Makefile.in (SFILES): Update.
15622 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15623 low-sun3.c: Remove files.
15624
6ad8ae5c
DJ
156252003-06-17 Daniel Jacobowitz <drow@mvista.com>
15626
15627 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15628 (linux_detach_one_process, linux_detach): New functions.
15629 (linux_target_ops): Add linux_detach.
15630 * server.c (main): Handle 'D' packet.
15631 * target.h (struct target_ops): Add "detach" member.
15632 (detach_inferior): Define.
15633
1581182a
MK
156342003-06-13 Mark Kettenis <kettenis@gnu.org>
15635
15636 From Kelley Cook <kelleycook@wideopenwest.com>:
15637 * configure.srv: Accept i[34567]86 variants.
15638
e5379b03
DJ
156392003-06-05 Daniel Jacobowitz <drow@mvista.com>
15640
15641 * linux-low.c (linux_wait_for_event): Correct comment typos.
15642 (linux_resume_one_process): Call check_removed_breakpoint.
15643 (linux_send_signal): New function.
15644 (linux_target_ops): Add linux_send_signal.
15645 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15646 of kill.
15647 * target.h (struct target_ops): Add send_signal.
15648
2ff29de4
JB
156492003-05-29 Jim Blandy <jimb@redhat.com>
15650
15651 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15652 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15653 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15654 away part of the register's value.
15655
254787d4
DJ
156562003-03-26 Daniel Jacobowitz <drow@mvista.com>
15657
15658 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15659 (linux_wait_for_event, linux_init_signals): Likewise.
15660
94e10508
DJ
156612003-03-17 Daniel Jacobowitz <drow@mvista.com>
15662
15663 * configure.in: Check for stdlib.h.
15664 * configure: Regenerated.
15665 * config.in: Regenerated.
15666
4c0711e0
DJ
156672003-01-04 Andreas Schwab <schwab@suse.de>
15668
15669 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15670
ef66e766
AC
156712003-01-02 Andrew Cagney <ac131313@redhat.com>
15672
15673 * Makefile.in: Remove obsolete code.
15674
a1358604
DJ
156752002-11-20 Daniel Jacobowitz <drow@mvista.com>
15676
15677 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15678 defined(PT_FPR0_HI).
15679
23ce3b1c
DJ
156802002-11-17 Stuart Hughes <seh@zee2.com>
15681
15682 * linux-arm-low.c (arm_num_regs): Increase.
15683 (arm_regmap): Include status register.
15684
156852002-11-17 Daniel Jacobowitz <drow@mvista.com>
15686
15687 * linux-low.c (register_addr): Remove incorrect -1 check.
15688
a9fa9f7d
DJ
156892002-08-29 Daniel Jacobowitz <drow@mvista.com>
15690
15691 * linux-low.c (linux_create_inferior): Call setpgid. Return
15692 the new PID.
15693 (unstopped_p, linux_signal_pid): Remove.
15694 (linux_target_ops): Remove linux_signal_pid.
15695 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15696 global instead of target method.
15697 * target.h (struct target_ops): Remove signal_pid. Update comment
15698 for create_inferior.
15699 * server.c (signal_pid): New variable.
15700 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15701 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15702 (attach_inferior): Set signal_pid.
15703
17574093
DJ
157042002-08-23 Daniel Jacobowitz <drow@mvista.com>
15705
15706 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15707
157082002-08-20 Jim Blandy <jimb@redhat.com>
15709
15710 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15711 default for this.
15712
157132002-08-01 Andrew Cagney <cagney@redhat.com>
15714
15715 * Makefile.in: Make chill references obsolete.
15716
157172002-07-24 Kevin Buettner <kevinb@redhat.com>
15718
15719 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15720 * configure: Regenerate.
15721 * config.in: Regenerate.
15722
157232002-07-09 David O'Brien <obrien@FreeBSD.org>
15724
15725 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15726 (perror_with_name, remote_close, remote_open, expect, play): Static.
15727
157282002-07-04 Michal Ludvig <mludvig@suse.cz>
15729
4b8dad4a 15730 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15731 byte offsets instead of an array of indexes.
15732 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15733
157342002-06-13 Daniel Jacobowitz <drow@mvista.com>
15735
15736 * regcache.c: Add comment.
15737
157382002-06-11 Daniel Jacobowitz <drow@mvista.com>
15739
15740 * thread-db.c: New file.
15741 * proc-service.c: New file.
15742 * acinclude.m4: New file.
15743 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15744 proc-service.o, and thread-db.o.
15745 (linux-low.o): Add USE_THREAD_DB.
15746 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15747 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15748 * aclocal.m4: Regenerated.
15749 * config.in: Regenerated.
15750 * configure: Regenerated.
15751 * configure.in: Check for proc_service.h, sys/procfs.h,
15752 thread_db.h, and linux/elf.h headrs.
15753 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15754 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15755 Check for -lthread_db and thread support.
15756 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15757 PowerPC, and SuperH.
15758 * i387-fp.c: Constify arguments.
15759 * i387-fp.h: Likewise.
15760 * inferiors.c: (struct thread_info): Renamed from
15761 `struct inferior_info'. Remove PID member. Use generic inferior
15762 list header. All uses updated.
15763 (inferiors, signal_pid): Removed.
15764 (all_threads): New variable.
15765 (get_thread): Define.
15766 (add_inferior_to_list): New function.
15767 (for_each_inferior): New function.
15768 (change_inferior_id): New function.
15769 (add_inferior): Removed.
15770 (remove_inferior): New function.
15771 (add_thread): New function.
15772 (free_one_thread): New function.
15773 (remove_thread): New function.
15774 (clear_inferiors): Use for_each_inferior and free_one_thread.
15775 (find_inferior): New function.
15776 (find_inferior_id): New function.
15777 (inferior_target_data): Update argument type.
15778 (set_inferior_target_data): Likewise.
15779 (inferior_regcache_data): Likewise.
15780 (set_inferior_regcache_data): Likewise.
15781 * linux-low.c (linux_bp_reinsert): Remove.
15782 (all_processes, stopping_threads, using_thrads)
15783 (struct pending_signals, debug_threads, pid_of): New.
15784 (inferior_pid): Replace with macro.
15785 (struct inferior_linux_data): Remove.
15786 (get_stop_pc, add_process): New functions.
15787 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15788 Use add_process and add_thread.
15789 (linux_attach_lwp): New function, based on old linux_attach. Use
15790 add_process and add_thread. Set stop_expected for new threads.
15791 (linux_attach): New function.
15792 (linux_kill_one_process): New function.
15793 (linux_kill): Kill all LWPs.
15794 (linux_thread_alive): Use find_inferior_id.
15795 (check_removed_breakpoints, status_pending_p): New functions.
15796 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15797 Update. Use WNOHANG. Wait for cloned processes also. Update process
15798 struct for the found process.
15799 (linux_wait_for_event): New function.
15800 (linux_wait): Use it. Support LWPs.
15801 (send_sigstop, wait_for_sigstop, stop_all_processes)
15802 (linux_resume_one_process, linux_continue_one_process): New functions.
15803 (linux_resume): Support LWPs.
15804 (REGISTER_RAW_SIZE): Remove.
15805 (fetch_register): Use register_size instead. Call supply_register.
15806 (usr_store_inferior_registers): Likewise. Call collect_register.
15807 Fix recursive case.
15808 (regsets_fetch_inferior_registers): Improve error message.
15809 (regsets_store_inferior_registers): Add debugging.
15810 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15811 (unstopped_p, linux_signal_pid): New functions.
15812 (linux_target_ops): Add linux_signal_pid.
15813 (linux_init_signals): New function.
15814 (initialize_low): Call it. Initialize using_threads.
15815 * regcache.c (inferior_regcache_data): Add valid
15816 flag.
15817 (get_regcache): Fetch registers lazily. Add fetch argument
15818 and update all callers.
15819 (regcache_invalidate_one, regcache_invalidate): New
15820 functions.
15821 (new_register_cache): Renamed from create_register_cache.
15822 Return the new regcache.
15823 (free_register_cache): Change argument to a void *.
15824 (registers_to_string, registers_from_string): Call get_regcache
15825 with fetch flag set.
15826 (register_data): Make static. Pass fetch flag to get_regcache.
15827 (supply_register): Call get_regcache with fetch flag clear.
15828 (collect_register): Call get_regcache with fetch flag set.
15829 (collect_register_as_string): New function.
15830 * regcache.h: Update.
15831 * remote-utils.c (putpkt): Flush after debug output and use
15832 stderr.
15833 Handle input interrupts while waiting for an ACK.
15834 (input_interrupt): Use signal_pid method.
15835 (getpkt): Flush after debug output and use stderr.
15836 (outreg): Use collect_register_as_string.
15837 (new_thread_notify, dead_thread_notify): New functions.
15838 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15839 and general_thread.
15840 (look_up_one_symbol): Flush after debug output.
15841 * server.c (step_thread, server_waiting): New variables.
15842 (start_inferior): Don't use signal_pid. Update call to mywait.
15843 (attach_inferior): Update call to mywait.
15844 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15845 (main): Don't fetch/store registers explicitly. Use
15846 set_desired_inferior. Support proposed ``Hs'' packet. Update
15847 calls to mywait.
15848 * server.h: Update.
15849 (struct inferior_list, struct_inferior_list_entry): New.
15850 * target.c (set_desired_inferior): New.
15851 (write_inferior_memory): Constify.
15852 (mywait): New function.
15853 * target.h: Update.
15854 (struct target_ops): New signal_pid method.
15855 (mywait): Removed macro, added prototype.
15856
15857 * linux-low.h (regset_func): Removed.
15858 (regset_fill_func, regset_store_func): New.
15859 (enum regset_type): New.
15860 (struct regset_info): Add type field. Use new operation types.
15861 (struct linux_target_ops): stop_pc renamed to get_pc.
15862 Add decr_pc_after_break and breakpoint_at.
15863 (get_process, get_thread_proess, get_process_thread)
15864 (strut process_info, all_processes, linux_attach_lwp)
15865 (thread_db_init): New.
15866
15867 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15868 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15869 (the_low_target): Add new members.
15870 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15871 (i386_store_fpxregset): Constify.
15872 (target_regsets): Add new kind identifier.
15873 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15874 (i386_set_pc): Add debugging.
15875 (i386_breakpoint_at): New function.
15876 (the_low_target): Add new members.
15877 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15878 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15879 (mips_breakpoint_at): New.
15880 (the_low_target): Add new members.
15881 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15882 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15883 (the_low_target): Add new members.
15884 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15885 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15886 (the_low_target): Add new members.
15887 * linux-x86-64-low.c (target_regsets): Add new kind
15888 identifier.
15889
158902002-05-15 Daniel Jacobowitz <drow@mvista.com>
15891
15892 From Martin Pool <mbp@samba.org>:
15893 * server.c (gdbserver_usage): New function.
15894 (main): Call it.
15895
158962002-05-14 Daniel Jacobowitz <drow@mvista.com>
15897
15898 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15899 stop_at -> stop_pc.
15900
159012002-05-04 Andrew Cagney <ac131313@redhat.com>
15902
15903 * Makefile.in: Remove obsolete code.
15904
159052002-04-24 Michal Ludvig <mludvig@suse.cz>
15906
15907 * linux-low.c (regsets_fetch_inferior_registers),
15908 (regsets_store_inferior_registers): Removed cast to int from
15909 ptrace() calls.
15910 * regcache.h: Added declaration of struct inferior_info.
15911
159122002-04-20 Daniel Jacobowitz <drow@mvista.com>
15913
15914 * inferiors.c (struct inferior_info): Add regcache_data.
15915 (add_inferior): Call create_register_cache.
15916 (clear_inferiors): Call free_register_cache.
15917 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15918 * regcache.c (struct inferior_regcache_data): New.
15919 (registers): Remove.
15920 (get_regcache): New function.
15921 (create_register_cache, free_register_cache): New functions.
15922 (set_register_cache): Don't initialize the register cache here.
15923 (registers_to_string, registers_from_string, register_data): Call
15924 get_regcache.
15925 * regcache.h: Add prototypes.
15926 * server.h: Likewise.
15927
159282002-04-20 Daniel Jacobowitz <drow@mvista.com>
15929
15930 * mem-break.c: New file.
15931 * mem-break.h: New file.
15932 * Makefile.in: Add mem-break.o rule; update server.h
15933 dependencies.
15934 * inferiors.c (struct inferior_info): Add target_data
15935 member.
15936 (clear_inferiors): Free target_data member if set.
15937 (inferior_target_data, set_inferior_target_data): New functions.
15938 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15939 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15940 * linux-low.c (linux_bp_reinsert): New variable.
15941 (struct inferior_linux_data): New.
15942 (linux_create_inferior): Use set_inferior_target_data.
15943 (linux_attach): Likewise. Call add_inferior.
15944 (linux_wait_for_one_inferior): New function.
15945 (linux_wait): Call it.
15946 (linux_write_memory): Add const.
15947 (initialize_low): Call set_breakpoint_data.
15948 * linux-low.h (struct linux_target_ops): Add breakpoint
15949 handling members.
15950 * server.c (attach_inferior): Remove extra add_inferior
15951 call.
15952 * server.h: Include mem-break.h. Update inferior.c
15953 prototypes.
15954 * target.c (read_inferior_memory)
15955 (write_inferior_memory): New functions.
15956 * target.h (read_inferior_memory)
15957 (write_inferior_memory): Change macros to prototypes.
15958 (struct target_ops): Update comments. Add const to write_memory
15959 definition.
15960
159612002-04-11 Daniel Jacobowitz <drow@mvista.com>
15962
15963 * linux-low.c (usr_store_inferior_registers): Support
15964 registers which are allowed to fail to store.
15965 * linux-low.h (linux_target_ops): Likewise.
15966 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15967 (ppc_cannot_store_register): FPSCR may not be storable.
15968
159692002-04-09 Daniel Jacobowitz <drow@mvista.com>
15970
15971 * server.h: Include <string.h> if HAVE_STRING_H.
15972 * ChangeLog: Correct paths in last ChangeLog entry.
15973
159742002-04-09 Daniel Jacobowitz <drow@mvista.com>
15975
15976 * linux-low.h: Remove obsolete prototypes.
15977 (struct linux_target_ops): New.
15978 (extern the_low_target): New.
15979 * linux-low.c (num_regs, regmap): Remove declarations.
15980 (register_addr): Use the_low_target explicitly.
15981 (fetch_register): Likewise.
15982 (usr_fetch_inferior_registers): Likewise.
15983 (usr_store_inferior_registers): Likewise.
15984 * linux-arm-low.c (num_regs): Remove.
15985 (arm_num_regs): Define.
15986 (arm_regmap): Renamed from regmap, made static.
15987 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15988 made static.
15989 (arm_cannot_store_register): Renamed from cannot_store_register,
15990 made static.
15991 (the_low_target): New.
15992 * linux-i386-low.c (num_regs): Remove.
15993 (i386_num_regs): Define.
15994 (i386_regmap): Renamed from regmap, made static.
15995 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15996 made static.
15997 (i386_cannot_store_register): Renamed from cannot_store_register,
15998 made static.
15999 (the_low_target): New.
16000 * linux-ia64-low.c (num_regs): Remove.
16001 (ia64_num_regs): Define.
16002 (ia64_regmap): Renamed from regmap, made static.
16003 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16004 made static.
16005 (ia64_cannot_store_register): Renamed from cannot_store_register,
16006 made static.
16007 (the_low_target): New.
16008 * linux-m68k-low.c (num_regs): Remove.
16009 (m68k_num_regs): Define.
16010 (m68k_regmap): Renamed from regmap, made static.
16011 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16012 made static.
16013 (m68k_cannot_store_register): Renamed from cannot_store_register,
16014 made static.
16015 (the_low_target): New.
16016 * linux-mips-low.c (num_regs): Remove.
16017 (mips_num_regs): Define.
16018 (mips_regmap): Renamed from regmap, made static.
16019 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16020 made static.
16021 (mips_cannot_store_register): Renamed from cannot_store_register,
16022 made static.
16023 (the_low_target): New.
16024 * linux-ppc-low.c (num_regs): Remove.
16025 (ppc_num_regs): Define.
16026 (ppc_regmap): Renamed from regmap, made static.
16027 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16028 made static.
16029 (ppc_cannot_store_register): Renamed from cannot_store_register,
16030 made static.
16031 (the_low_target): New.
16032 * linux-s390-low.c (num_regs): Remove.
16033 (s390_num_regs): Define.
16034 (s390_regmap): Renamed from regmap, made static.
16035 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16036 made static.
16037 (s390_cannot_store_register): Renamed from cannot_store_register,
16038 made static.
16039 (the_low_target): New.
16040 * linux-sh-low.c (num_regs): Remove.
16041 (sh_num_regs): Define.
16042 (sh_regmap): Renamed from regmap, made static.
16043 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16044 made static.
16045 (sh_cannot_store_register): Renamed from cannot_store_register,
16046 made static.
16047 (the_low_target): New.
16048 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16049 (the_low_target): New.
16050
160512002-04-09 Daniel Jacobowitz <drow@mvista.com>
16052
16053 * Makefile.in: Add stamp-h target.
16054 * configure.in: Create stamp-h.
16055 * configure: Regenerated.
16056
160572002-04-09 Daniel Jacobowitz <drow@mvista.com>
16058
16059 * inferiors.c: New file.
16060 * target.c: New file.
16061 * target.h: New file.
16062 * Makefile.in: Add target.o and inferiors.o. Update
16063 dependencies.
16064 * linux-low.c (inferior_pid): New static variable,
16065 moved from server.c.
16066 (linux_create_inferior): Renamed from create_inferior.
16067 Call add_inferior. Return 0 on success instead of a PID.
16068 (linux_attach): Renamed from myattach.
16069 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16070 (linux_thread_alive): Renamed from mythread_alive.
16071 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16072 child dies.
16073 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16074 (regsets_store_inferior_registers): Correct error message.
16075 Add missing ``return 0''.
16076 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16077 (linux_store_registers): Renamed from store_inferior_registers.
16078 (linux_read_memory): Renamed from read_inferior_memory.
16079 (linux_write_memory): Renamed from write_inferior_memory.
16080 (linux_target_ops): New structure.
16081 (initialize_low): Call set_target_ops ().
16082 * remote-utils.c (unhexify): New function.
16083 (hexify): New function.
16084 (input_interrupt): Send signals to ``signal_pid''.
16085 * server.c (inferior_pid): Remove.
16086 (start_inferior): Update create_inferior call.
16087 (attach_inferior): Call add_inferior.
16088 (handle_query): New function.
16089 (main): Call handle_query for `q' packets.
16090 * server.h: Include "target.h". Remove obsolete prototypes.
16091 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16092
160932002-04-09 Daniel Jacobowitz <drow@mvista.com>
16094
16095 * Makefile.in: Add WARN_CFLAGS. Update configury
16096 dependencies.
16097 * configure.in: Check for <string.h>
16098 * configure: Regenerate.
16099 * config.in: Regenerate.
16100 * gdbreplay.c: Include needed system headers.
16101 (remote_open): Remove strchr prototype.
16102 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16103 * regcache.c (supply_register): Change buf argument to const void *.
16104 (supply_register_by_name): Likewise.
16105 (collect_register): Change buf argument to void *.
16106 (collect_register_by_name): Likewise.
16107 * regcache.h: Add missing prototypes.
16108 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16109 * server.c (handle_query): New function.
16110 (attached): New static variable, moved out of main.
16111 (main): Quiet longjmp clobber warnings.
16112 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16113 * utils.c (error): Remove NORETURN.
16114 (fatal): Likewise.
This page took 1.965794 seconds and 4 git commands to generate.