Remove find_inferior
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
9521758b
SM
12017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * inferiors.h (find_inferior): Remove.
4 * inferiors.c (find_inferior): Remove.
5
8f86d7aa
SM
62017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
7
8 * linux-low.c (resume_status_pending_p): Update comment.
9 (need_step_over_p): Update comment.
10
e2b44075
SM
112017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
12
13 * linux-low.c (proceed_one_lwp): Return void, change parameter
14 type.
15 (unsuspend_and_proceed_one_lwp): Likewise.
16 (proceed_all_lwps): Use for_each_thread.
17 (unstop_all_lwps): Likewise.
18
c80825ff
SM
192017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
20
21 * linux-low.c (linux_resume_one_thread): Return void, take
22 parameter directly.
23 (linux_resume): Use for_each_thread.
24
df3e4dbe
SM
252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
26
27 * linux-low.c (send_sigstop_callback): Return void, change
28 parameter type. Rename to...
29 (send_sigstop): ... this.
30 (suspend_and_send_sigstop_callback): Return void, change parameter
31 type. Rename to...
32 (suspend_and_send_sigstop): ... this.
33 (stop_all_lwps): Use for_each_thread.
34
5a6b0a41
SM
352017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
36
37 * linux-low.c (lwp_running): Return bool, remove unused
38 argument.
39 (linux_stabilize_threads): Use find_thread.
40
39a64da5
SM
412017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
42
43 * linux-low.c (select_singlestep_lwp_callback): Remove.
44 (count_events_callback): Remove.
45 (select_event_lwp_callback): Remove.
46 (select_event_lwp): Use find_thread/for_each_thread.
47
a1385b7b
SM
482017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
49
50 * linux-low.c (not_stopped_callback): Return bool, take filter
51 argument directly.
52 (linux_wait_for_event_filtered): Use find_thread.
53 (linux_wait_1): Likewise.
54
454296a2
SM
552017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
56
57 * linux-low.c (same_lwp): Remove.
58 (find_lwp_pid): Use find_thread.
59
6b2a85da
SM
602017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
61
62 * linux-low.c (delete_lwp_callback): Remove.
63 (linux_mourn): Use for_each_thread.
64
798a38e8
SM
652017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
66
67 * linux-low.c (linux_detach_lwp_callback): Return void, remove
68 args parameter, don't check for pid.
69 (linux_detach): Use for_each_thread.
70
e4eb0dec
SM
712017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
72
73 * linux-low.c (struct counter): Remove.
74 (second_thread_of_pid_p): Remove.
75 (last_thread_of_process_p): Use find_thread.
76
83e1b6c1
SM
772017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
78
79 * inferiors.c (find_inferior_in_random): Remove.
80 * inferiors.h (find_inferior_in_random): Remove.
81 * linux-low.c (status_pending_p_callback): Return bool, accept
82 parameter ptid directly.
83 (linux_wait_for_event_filtered): Use find_thread_in_random.
84 (linux_wait_1): Likewise.
85
8dc7b443
SM
862017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
87
88 * inferiors.c (find_inferior_id): Remove.
89 (find_thread_ptid): Move implemention from find_inferior_id to
90 here.
91 * inferiors.h (find_inferior_id): Remove.
92 * server.c (handle_status): Use find_thread_ptid.
93 (process_serial_event): Likewise.
94 * thread-db.c (find_one_thread): Likewise.
95 (thread_db_thread_handle): Likewise.
96 * win32-low.c (thread_rec): Likewise.
97 (child_delete_thread): Likewise.
98 (win32_thread_alive): Likewise.
99 (get_child_debug_event): Likewise.
100
da25033c
SM
1012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
102
103 * linux-mips-low.c (update_watch_registers_callback): Return
104 void, remove pid_p parameter, don't check for pid.
105 (mips_insert_point, mips_remove_point): Use for_each_thread.
106
c91bb56b
SM
1072017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
108
109 * lynx.low (lynx_delete_thread_callback): Remove.
110 (lynx_mourn): Use for_each_thread.
111
634a3254
SM
1122017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
113
114 * regcache.c (regcache_invalidate_one): Remove.
115 (regcache_invalidate_pid): use for_each_thread.
116
41272101
TT
1172017-11-26 Tom Tromey <tom@tromey.com>
118
119 * linux-low.c (linux_create_inferior): Update.
120
f5291a6f
UW
1212017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
122
123 * spu-low.c (spu_create_inferior): Fix typo in argument name.
124
6654d750
AH
1252017-11-24 Alan Hayward <alan.hayward@arm.com>
126
127 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
128 * linux-aarch64-low.c (initialize_low_arch): Call init func.
129 * linux-aarch64-tdesc-selftest.c: New file.
130 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
131
1322017-11-24 Alan Hayward <alan.hayward@arm.com>
133
134 * configure.srv: Add new file.
135 * linux-aarch64-low.c (initialize_low_arch): Call init func.
136 * linux-aarch64-tdesc-selftest.c: New file.
137 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
138
49bdb7ee
AH
1392017-11-24 Alan Hayward <alan.hayward@arm.com>
140
141 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
142 * linux-aarch64-low.c (initialize_low_arch): Remove init.
143 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
144
d6d7ce56
AH
1452017-11-24 Alan Hayward <alan.hayward@arm.com>
146
147 * configure.srv: Add new files.
148 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
149 aarch64_linux_read_description.
150 * linux-aarch64-low.c (aarch64_linux_read_description):
151 Merge with aarch64_arch_setup.
152 (aarch64_arch_setup): Call aarch64_linux_read_description.
153 * linux-aarch64-tdesc.c: New file.
154 * linux-aarch64-tdesc.h: New file.
155
506fe5f4
YQ
1562017-11-24 Yao Qi <yao.qi@linaro.org>
157
158 * configure.srv: Set $srv_regobj for tic6x-linux.
159 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
160 (tic6x_read_description): Move some code to tic6x_arch_setup.
161 (tic6x_tdesc_test): New function.
162 (initialize_low_arch): Call selftests::register_test.
163
29f9a567
YQ
1642017-11-22 Yao Qi <yao.qi@linaro.org>
165
166 * remote-utils.c (prepare_resume_reply): Use memcpy.
167
578290ec
SM
1682017-11-19 Simon Marchi <simon.marchi@ericsson.com>
169
170 * linux-low.c (kill_one_lwp_callback): Return void, take
171 argument directly, don't filter on pid.
172 (linux_kill): Use for_each_thread.
173
eca55aec
SM
1742017-11-19 Simon Marchi <simon.marchi@ericsson.com>
175
176 * linux-low.c (need_step_over_p): Return bool, remove dummy
177 argument.
178 (linux_resume, proceed_all_lwps): Use find_thread.
179
25c28b4d
SM
1802017-11-19 Simon Marchi <simon.marchi@ericsson.com>
181
182 * linux-low.c (resume_status_pending_p): Return bool, remove
183 flag_p argument.
184 (linux_resume): Use find_thread.
185
5fdda392
SM
1862017-11-19 Simon Marchi <simon.marchi@ericsson.com>
187
188 * linux-low.c (struct thread_resume_array): Remove.
189 (linux_set_resume_request): Return void, take arguments
190 directly.
191 (linux_resume): Use for_each_thread.
192
fcb056a5
SM
1932017-11-19 Simon Marchi <simon.marchi@ericsson.com>
194
195 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
196 return bool, remove data argument.
197 (linux_stabilize_threads): Use find_thread.
198
139720c5
SM
1992017-11-19 Simon Marchi <simon.marchi@ericsson.com>
200
201 * linux-low.c (unsuspend_one_lwp): Remove.
202 (unsuspend_all_lwps): Use for_each_thread, inline code from
203 unsuspend_one_lwp.
204
6d1e5673
SM
2052017-11-19 Simon Marchi <simon.marchi@ericsson.com>
206
207 * gdbthread.h (find_thread): Add overload with ptid_t filter.
208 * linux-low.c (struct iterate_over_lwps_args): Remove.
209 (iterate_over_lwps_filter): Remove.
210 (iterate_over_lwps): Use find_thread.
211
bbf550d5
SM
2122017-11-19 Simon Marchi <simon.marchi@ericsson.com>
213
214 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
215 (linux_handle_new_gdb_connection): Use for_each_thread, inline
216 code from reset_lwp_ptrace_options_callback.
217
00192f77
SM
2182017-11-19 Simon Marchi <simon.marchi@ericsson.com>
219
220 * linux-arm-low.c (struct update_registers_data): Remove.
221 (update_registers_callback): Return void, take arguments
222 directly, don't check thread's pid.
223 (arm_insert_point, arm_remove_point): Use for_each_thread.
224
2bee2b6c
SM
2252017-11-19 Simon Marchi <simon.marchi@ericsson.com>
226
227 * win32-low.c (continue_one_thread): Return void, take argument
228 directly.
229 (child_continue): Use for_each_thread.
230
0b360f19
SM
2312017-11-19 Simon Marchi <simon.marchi@ericsson.com>
232
233 * win32-i386-low.c (update_debug_registers_callback): Rename
234 to ...
235 (update_debug_registers): ... this, return void, remove pid_p arg.
236 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
237
f27866ba
SM
2382017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
239
240 * inferiors.h (struct process_info): Add constructor, initialize
241 fields..
242 <syscalls_to_catch>: Change type to std::vector<int>.
243 * inferiors.c (add_process): Allocate process_info with new.
244 (remove_process): Free process_info with delete.
245 * linux-low.c (handle_extended_wait): Adjust.
246 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
247 * server.c (handle_general_set): Adjust.
248
e849ea89
PA
2492017-11-16 Pedro Alves <palves@redhat.com>
250
251 * remote-utils.c (remote_close): Block SIGIO signals instead of
252 uninstalling the SIGIO handler.
253
1d0aa65c
AH
2542017-11-16 Alan Hayward <alan.hayward@arm.com>
255
256 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
257
3491a34c
YQ
2582017-11-16 Yao Qi <yao.qi@linaro.org>
259
260 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
261 (tic6x_store_gregset): Likewise.
262 (tic6x_usrregs_info): Move it up.
263
a602f924
AH
2642017-11-15 Alan Hayward <alan.hayward@arm.com>
265
266 * Makefile.in: Update arch rules.
267 * configure.srv: Explicitly mark arch/ files.
268
5616b6c3
AS
2692017-11-13 Andreas Schwab <schwab@suse.de>
270
271 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
272 function.
273 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
274
d1928160
PA
2752017-11-06 Pedro Alves <palves@redhat.com>
276
277 * config.in, configure: Regenerate.
278
bac608e7
SM
2792017-10-27 Simon Marchi <simon.marchi@ericsson.com>
280
281 * target.c (struct thread_search): Remove.
282 (thread_search_callback): Remove.
283 (prepare_to_access_memory): Use for_each_thread instead of
284 find_inferior. Inline code from thread_search_callback.
285
eaddb425
SM
2862017-10-27 Simon Marchi <simon.marchi@ericsson.com>
287
288 * server.c (struct visit_actioned_threads_data): Remove.
289 (visit_actioned_threads): Change prototype to take arguments
290 directly.
291 (resume): Use find_thread instead of find_inferior.
292
99078d34
SM
2932017-10-27 Simon Marchi <simon.marchi@ericsson.com>
294
295 * server.c (queue_stop_reply_callback): Change prototype, return
296 void.
297 (find_status_pending_thread_callback): Remove.
298 (handle_status): Replace find_inferior with find_thread and
299 for_each_thread.
300
cc628f3d
AH
3012017-10-25 Alan Hayward <alan.hayward@arm.com>
302
303 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
304 with REGNO.
305 (aarch64_store_gregset): Likewise.
306 (aarch64_fill_fpregset): Likewise.
307 (aarch64_store_fpregset): Likewise.
308
4d3bb80e
SM
3092017-10-21 Simon Marchi <simon.marchi@ericsson.com>
310
311 * gdbthread.h (find_thread, for_each_thread): New functions.
312 * inferiors.c (thread_of_pid): Remove.
313 (find_any_thread_of_pid): Use find_thread.
314 * linux-low.c (num_lwps): Use for_each_thread.
315
7a7cdfa0
YQ
3162017-10-17 Yao Qi <yao.qi@linaro.org>
317
318 * Makefile.in: Remove one rule.
319 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
320
e675d170
YQ
3212017-10-17 Yao Qi <yao.qi@linaro.org>
322
323 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
324 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
325
7eb4e0f9
YQ
3262017-10-17 Yao Qi <yao.qi@linaro.org>
327
328 * configure.srv: Rename arm.o with arch/arm.o.
329
60d6cfc9
YQ
3302017-10-17 Yao Qi <yao.qi@linaro.org>
331
332 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
333 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
334 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
335 (arch-i386.o, arch-amd64.o): Remove rules.
336 (arch/%.o): New rule.
337 Update POSTCOMPILE and COMPILE.pre.
338 * configure.ac: Invoke AC_CONFIG_COMMANDS.
339 * configure: Re-generated.
340 * configure.srv: Replace arch-i386.o with arch/i386.o.
341 Replace arch-amd64.o with arch/amd64.o.
342
5bfda255
YQ
3432017-10-16 Yao Qi <yao.qi@linaro.org>
344
345 * configure: Regenerated.
346
9c80ecd6
SM
3472017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
348
349 * inferiors.h: (struct inferior_list): Remove.
350 (struct inferior_list_entry); Remove.
351 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
352 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
353 get_first_inferior): Remove.
354 (for_each_inferior, for_each_inferior_with_data, find_inferior,
355 find_inferior_id, find_inferior_in_random): Change signature.
356 * inferiors.c (all_threads): Change type to
357 std::list<thread_info *>.
358 (get_thread): Remove macro.
359 (find_inferior, find_inferior_id): Change signature, implement
360 using find_thread.
361 (find_inferior_in_random): Change signature, implement using
362 find_thread_in_random.
363 (for_each_inferior, for_each_inferior_with_data): Change
364 signature, implement using for_each_thread.
365 (add_inferior_to_list, remove_inferior): Remove.
366 (add_thread, get_first_thread, thread_of_pid,
367 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
368 (get_first_inferior, one_inferior_p, clear_inferior_list):
369 Remove.
370 (clear_inferiors, get_thread_process): Update.
371 * gdbthread.h: Include <list>.
372 (struct thread_info) <entry>: Remove field.
373 <id>: New field.
374 (all_threads): Change type to std::list<thread_info *>.
375 (get_first_inferior): Add doc.
376 (find_thread, for_each_thread, find_thread_in_random): New
377 functions.
378 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
379 * linux-arm-low.c (update_registers_callback): Update.
380 * linux-low.c (second_thread_of_pid_p): Update.
381 (kill_one_lwp_callback, linux_detach_lwp_callback,
382 delete_lwp_callback, status_pending_p_callback, same_lwp,
383 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
384 iterate_over_lwps, not_stopped_callback,
385 resume_stopped_resumed_lwps, count_events_callback,
386 select_singlestep_lwp_callback, select_event_lwp_callback,
387 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
388 suspend_and_send_sigstop_callback, wait_for_sigstop,
389 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
390 lwp_running, linux_set_resume_request, resume_status_pending_p,
391 need_step_over_p, start_step_over, linux_resume_one_thread,
392 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
393 reset_lwp_ptrace_options_callback): Update.
394 * linux-mips-low.c (update_watch_registers_callback): Update.
395 * regcache.c (regcache_invalidate_one, regcache_invalidate):
396 Update.
397 (free_register_cache_thread_one): Remove.
398 (regcache_release): Update.
399 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
400 handle_qxfer_threads_worker): Update.
401 (handle_query): Update, use list iterator.
402 (visit_actioned_threads, handle_pending_status,
403 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
404 clear_pending_status_callback, set_pending_status_callback,
405 find_status_pending_thread_callback, handle_status,
406 process_serial_event): Update.
407 * target.c (thread_search_callback): Update.
408 * thread-db.c (thread_db_get_tls_address): Update.
409 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
410 Update.
411 * win32-i386-low.c (update_debug_registers_callback): Update.
412 * win32-low.c (delete_thread_info, child_delete_thread,
413 continue_one_thread, suspend_one_thread,
414 get_child_debug_event): Adjust.
415
9179355e
SM
4162017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
417
418 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
419 * inferiors.h: Include <list>.
420 (struct process_info) <entry>: Remove field.
421 <pid>: New field.
422 (pid_of): Change macro to function.
423 (ptid_of, lwpid_of): Remove macro.
424 (all_processes): Change type to std::list<process_info *>.
425 (ALL_PROCESSES): Remove macro.
426 (for_each_process, find_process): New function.
427 * inferiors.c (all_processes): Change type to
428 std::list<process_info *>.
429 (find_thread_process): Adjust.
430 (add_process): Likewise.
431 (remove_process): Likewise.
432 (find_process_pid): Likewise.
433 (get_first_process): Likewise.
434 (started_inferior_callback): Remove.
435 (have_started_inferiors_p): Adjust.
436 (attached_inferior_callback): Remove.
437 (have_attached_inferiors_p): Adjust.
438 * linux-low.c (check_zombie_leaders): Likewise.
439 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
440 (x86_linux_update_xmltarget): Adjust.
441 * server.c (handle_query): Likewise.
442 (gdb_reattached_process): Remove.
443 (handle_status): Adjust.
444 (kill_inferior_callback): Likewise.
445 (detach_or_kill_inferior): Remove.
446 (print_started_pid): Likewise.
447 (print_attached_pid): Likewise.
448 (detach_or_kill_for_exit): Update.
449 (process_serial_event): Likewise.
450 * linux-arm-low.c (arm_new_fork): Likewise.
451
c9cb8905
SM
4522017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
453
454 * dll.h: Include <list>.
455 (struct dll_info): Add constructor.
456 <entry>: Remove field.
457 (all_dlls): Change type to std::list<dll_info>.
458 * dll.c: Include <algorithm>.
459 (get_dll): Remove macro.
460 (all_dlls): Change type to std::list<dll_info *>.
461 (free_one_dll): Remove.
462 (match_dll): Likewise.
463 (loaded_dll): Adjust.
464 (unloaded_dll): Adjust to all_dlls type change, use
465 std::find_if. Inline code from match_dll.
466 (clear_dlls): Adjust to all_dlls type change.
467 * server.c (emit_dll_description): Remove.
468 (handle_qxfer_libraries): Adjust to all_dlls type change,
469 integrate emit_dll_description's functionality.
470
04ec7890
SM
4712017-10-12 Simon Marchi <simon.marchi@ericsson.com>
472
473 * linux-low.h (struct linux_target_ops) <delete_process>: New
474 field.
475 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
476 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
477 (struct linux_target_ops): Add delete_process callback.
478 * linux-arm-low.c (arm_delete_process): New.
479 (struct linux_target_ops): Add delete_process callback.
480 * linux-bfin-low.c (struct linux_target_ops): Likewise.
481 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
482 * linux-m32r-low.c (struct linux_target_ops): Likewise.
483 * linux-mips-low.c (mips_linux_delete_process): New.
484 (struct linux_target_ops): Add delete_process callback.
485 * linux-ppc-low.c (struct linux_target_ops): Likewise.
486 * linux-s390-low.c (struct linux_target_ops): Likewise.
487 * linux-sh-low.c (struct linux_target_ops): Likewise.
488 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
489 * linux-tile-low.c (struct linux_target_ops): Likewise.
490 * linux-x86-low.c (x86_linux_delete_process): New.
491 (struct linux_target_ops): Add delete_process callback.
492 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
493
466eecee
SM
4942017-10-12 Simon Marchi <simon.marchi@ericsson.com>
495
496 * linux-aarch64-low.c (the_low_target): Add thread delete
497 callback.
498 * linux-arm-low.c (arm_delete_thread): New function.
499 (the_low_target): Add thread delete callback.
500 * linux-bfin-low.c (the_low_target): Likewise.
501 * linux-crisv32-low.c (the_low_target): Likewise.
502 * linux-low.c (delete_lwp): Invoke delete_thread callback if
503 set.
504 * linux-low.h (struct linux_target_ops) <delete_thread>: New
505 field.
506 * linux-m32r-low.c (the_low_target): Add thread delete callback.
507 * linux-mips-low.c (mips_linux_delete_thread): New function.
508 (the_low_target): Add thread delete callback.
509 * linux-ppc-low.c (the_low_target): Likewise.
510 * linux-s390-low.c (the_low_target): Likewise.
511 * linux-sh-low.c (the_low_target): Likewise.
512 * linux-tic6x-low.c (the_low_target): Likewise.
513 * linux-tile-low.c (the_low_target): Likewise.
514 * linux-x86-low.c (the_low_target): Likewise.
515 * linux-xtensa-low.c (the_low_target): Likewise.
516
b79f7801
YZ
5172017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
518
519 * win32-low.c: Include "common-inferior.h".
520
bc3b087d
SDJ
5212017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
522
523 * inferiors.c (set_inferior_cwd): New function.
524 * server.c (handle_general_set): Handle QSetWorkingDir packet.
525 (handle_query): Inform that QSetWorkingDir is supported.
526 * win32-low.c (create_process): Pass the inferior's cwd to
527 CreateProcess.
528
d092c5a2
SDJ
5292017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
530
531 * inferiors.c (current_inferior_cwd): New global variable.
532 (get_inferior_cwd): New function.
533 * inferiors.h (struct process_info) <cwd>: New field.
534
7da0a886
SDJ
5352017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
536
537 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
538 (OBS): Add gdb_tilde_expand.o.
539
289a6840
SM
5402017-10-02 Simon Marchi <simon.marchi@ericsson.com>
541
542 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
543 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
544
256642e8
PA
5452017-09-29 Pedro Alves <palves@redhat.com>
546
547 * ax.c (gdb_parse_agent_expr): Constify.
548 * ax.h (gdb_parse_agent_expr): Constify.
549 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
550 Constify.
551 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
552 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
553 * remote-utils.h (read_ptid): Constify.
554 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
555 (process_point_options, process_serial_event): Constify.
556 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
557 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
558 (cmd_qtbuffer): Constify.
559
5b9ca4d4
PA
5602017-09-29 Pedro Alves <palves@redhat.com>
561
562 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
563 fails.
564
94c207e0
PA
5652017-09-29 Pedro Alves <palves@redhat.com>
566
567 * linux-low.c (handle_extended_wait): Pass parent thread instead
568 of process to thread_db_notice_clone.
569 * linux-low.h (thread_db_notice_clone): Replace parent process
570 parameter with parent thread parameter.
571 * thread-db.c (find_one_thread): Add comment.
572 (thread_db_notice_clone): Replace parent process parameter with
573 parent thread parameter. Temporarily switch to the parent thread.
574
75352e28
SDJ
5752017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
576
577 * gdbthread.h: Include "common-gdbthread.h".
578 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
579 "if" when validating the ptid.
580 * remote-utils.c: Include "gdbthread.h".
581 (prepare_resume_reply): Use "switch_to_thread".
582 * target.c (done_accessing_memory): Likewise.
583
ad339634
AA
5842017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
585
586 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
587 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
588 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
589 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
590 s390x-gs-linux64-ipa.o to ipa_obj.
591 * linux-s390-low.c (HWCAP_S390_GS): New define.
592 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
593 New functions.
594 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
595 (s390_arch_setup): Check for guarded-storage support and choose
596 appropriate tdesc.
597 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
598 init_registers_s390x_gs_linux64.
599 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
600 enum value.
601 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
602 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
603
cc4d742f
SM
6042017-09-22 Simon Marchi <simon.marchi@ericsson.com>
605
606 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
607
f6327dcb
KB
6082017-09-21 Kevin Buettner <kevinb@redhat.com>
609
610 * linux-low.h (struct lwp_info): Add new field, thread_handle.
611 (thread_db_thread_handle): Declare.
612 * linux-low.c (linux_target_ops): Initialize thread_handle.
613 * server.c (handle_qxfer_threads_worker): Add support for
614 "handle" attribute.
615 * target.h (struct target_ops): Add new function pointer,
616 thread_handle.
617 (target_thread_handle): Define.
618 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
619 field in lwp.
620 (thread_db_thread_handle): New function.
621
86299109
KB
6222017-09-21 Kevin Buettner <kevinb@redhat.com>
623
624 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
625 * linux-low.h (thread_db_notice_clone): Declare.
626 * thread-db.c (thread_db_notice_clone): New function.
627
f557a88a
PA
6282017-09-21 Pedro Alves <palves@redhat.com>
629
630 * server.c (gdb_read_memory, handle_status, process_serial_event)
631 (handle_serial_event, handle_target_event): Adjust to
632 set_desired_thread prototype change.
633 * target.c (set_desired_thread): Remove 'use_general' parameter
634 and adjust.
635 * target.h (set_desired_thread): Remove 'use_general' parameter.
636
223ffa71
TT
6372017-09-20 Tom Tromey <tom@tromey.com>
638
639 * target.c (target_terminal::terminal_state): Define.
640 (target_terminal::init): Rename from target_terminal_init.
641 (target_terminal::inferior): Rename from
642 target_terminal_inferior.
643 (target_terminal::ours): Rename from target_terminal_ours.
644 (target_terminal::ours_for_output, target_terminal::info): New.
645
04fd3ba9
SM
6462017-09-16 Simon Marchi <simon.marchi@ericsson.com>
647
648 * server.c (accumulate_file_name_length): Remove.
649 (emit_dll_description): Adjust to std::string change.
650 (handle_qxfer_libraries): Use std::string to hold document.
651
5e187554
SM
6522017-09-16 Simon Marchi <simon.marchi@ericsson.com>
653
654 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
655 return type of xml_escape_text.
656 * server.c (emit_dll_description): Likewise.
657
1526853e
SM
6582017-09-16 Simon Marchi <simon.marchi@ericsson.com>
659
660 * server.c (captured_main): Accept argument for --selftest.
661 Update run_tests call.
662 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
663 when registering selftests.
664
c4dfafab
SDJ
6652017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
666
667 * regcache.c (get_thread_regcache): Update code to use "std::vector"
668 instead of "VEC" for "target_desc.reg_defs".
669 (regcache_cpy): Likewise.
670 (registers_to_string): Likewise.
671 (registers_from_string): Likewise.
672 (find_regno): Likewise.
673 (supply_regblock): Likewise.
674 (regcache_raw_read_unsigned): Likewise.
675 * tdesc.c (init_target_desc): Likewise.
676 (tdesc_create_reg): Likewise.
677 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
678 (struct target_desc) <reg_defs>: Convert to "std::vector".
679 (target_desc): Do not initialize "reg_defs".
680 (~target_desc): Update code to use "std::vector" instead of "VEC"
681 for "target_desc.reg_defs".
682 (operator==): Likewise.
683
124aceb4
SM
6842017-09-15 Simon Marchi <simon.marchi@ericsson.com>
685
686 * inferiors.h (thread_to_gdb_id): Remove.
687 * inferiors.c (thread_to_gdb_id): Remove.
688 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
689 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
690 lynx_store_registers, lynx_read_memory, lynx_write_memory):
691 Likewise.
692 * nto-low.c (nto_fetch_registers, nto_store_registers,
693 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
694
96cde54f
SM
6952017-09-15 Simon Marchi <simon.marchi@ericsson.com>
696
697 * inferiors.h (gdb_id_to_thread_id): Remove.
698 * inferiors.c (gdb_id_to_thread_id): Remove.
699 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
700 removal. Move pid declaration closer to where it's used.
701
e8ca139e
SM
7022017-09-15 Simon Marchi <simon.marchi@ericsson.com>
703
704 * server.c (handle_detach): New function.
705 (process_serial_event): Move code out, call handle_detach.
706
f8a4e119
SM
7072017-09-15 Simon Marchi <simon.marchi@ericsson.com>
708
709 * server.c (require_running): Rename to ...
710 (require_running_or_return): ... this ...
711 (require_running_or_break): ... and this.
712 (handle_query, process_serial_event): Adjust.
713
0eb0a407
SM
7142017-09-15 Simon Marchi <simon.marchi@ericsson.com>
715
716 * linux-low.c (linux_set_resume_request): Remove unused
717 variables.
718
785922a5
SM
7192017-09-15 Simon Marchi <simon.marchi@ericsson.com>
720
721 * server.c (first_thread_of): Remove.
722 (process_serial_event): Replace usage of first_thread_of with
723 find_any_thread_of_pid.
724 * tracepoint.c (same_process_p): Remove.
725 (gdb_agent_about_to_close): Replace usage of same_process_p with
726 find_any_thread_of_pid.
727 * linux-x86-low.c (same_process_callback): Remove.
728 (x86_arch_setup_process_callback): Replace usage of
729 same_process_callback with find_any_thread_of_pid.
730 * thread-db.c (any_thread_of): Remove.
731 (switch_to_process): Replace usage of any_thread_of with
732 find_any_thread_of_pid.
733 * inferiors.c (thread_pid_matches_callback): Remove.
734 (find_thread_process): Adjust to use find_any_thread_of_pid.
735
a059f00c
SDJ
7362017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
737
738 * regcache.c (get_thread_regcache): Guard calls to "memset"
739 with "!VEC_empty".
740
cc397f3a
SDJ
7412017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
742
743 * linux-low.c (handle_extended_wait): Use
744 "allocate_target_description" instead of "XNEW".
745 * linux-x86-low.c (initialize_low_arch): Likewise.
746
22916b07
YQ
7472017-09-05 Yao Qi <yao.qi@linaro.org>
748
749 * configure.srv (srv_i386_regobj): Remove.
750 (srv_amd64_regobj): Remove.
751 (srv_regobj): Set it to "" for x86 non-linux targets.
752 * linux-x86-tdesc.c (i386_linux_read_description):
753 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
754 (init_registers_i386): Remove the declaration.
755 (tdesc_i386): Remove the declaration.
756 (lynx_i386_arch_setup): Call i386_create_target_description.
757 * nto-x86-low.c: Likewise.
758 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
759 [!__x86_64__]: include arch/i386.h.
760 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
761
38602d55
YQ
7622017-09-05 Yao Qi <yao.qi@linaro.org>
763
764 * configure.srv (srv_amd64_linux_xmlfiles): Remove
765 i386/amd64-XXX-linux from it.
766
44b886ff
YQ
7672017-09-05 Yao Qi <yao.qi@linaro.org>
768
769 * configure.srv: Empty srv_amd64_linux_regobj if $development is
770 false.
771 (ipa_amd64_linux_regobj): Remove.
772 (ipa_x32_linux_regobj): Remove.
773
b4570e4b
YQ
7742017-09-05 Yao Qi <yao.qi@linaro.org>
775
776 * Makefile.in (arch-amd64.o): New rule.
777 * configure.srv: Append arch-amd64.o.
778 * linux-amd64-ipa.c: Include common/x86-xstate.h.
779 (get_ipa_tdesc): Call amd64_linux_read_description.
780 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
781 and init_registers_amd64_XXX.
782 * linux-x86-low.c (x86_linux_read_description): Call
783 amd64_linux_read_description.
784 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
785 (initialize_low_arch): Don't call init_registers_x32_XXX and
786 init_registers_amd64_XXX.
787 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
788 and tdesc_amd64_XXX.
789 [__x86_64__] (amd64_tdesc_test): New function.
790 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
791 and init_registers_amd64_XXX.
792 * linux-x86-tdesc.c: Include arch/amd64.h.
793 (xcr0_to_tdesc_idx): New function.
794 (i386_linux_read_description): New function.
795 (amd64_get_ipa_tdesc_idx): New function.
796 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
797 (amd64_get_ipa_tdesc): Declare.
798
d1f28ea2
YQ
7992017-09-05 Yao Qi <yao.qi@linaro.org>
800
801 * configure.srv (srv_i386_linux_xmlfiles): Remove
802 i386/i386-XXX-linux.xml from it.
803
25a93583
YQ
8042017-09-05 Yao Qi <yao.qi@linaro.org>
805
806 * configure.srv: Set srv_i386_linux_regobj empty if $development
807 is false.
808 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
809 initialize_low_tdesc.
810 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
811 with #if initialize_low_tdesc.
812 * linux-x86-tdesc-selftest.c: New file.
813 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
814
5f035c07
YQ
8152017-09-05 Yao Qi <yao.qi@linaro.org>
816
817 * Makefile.in (arch-i386.o): New rule.
818 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
819 (x86_64-*-linux*): Likewise.
820 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
821 include arch/i386.h.
822 (i386_linux_read_description): Remove code and call
823 i386_create_target_description.
824 * tdesc.c (allocate_target_description): New function.
825 * tdesc.h (set_tdesc_architecture): Remove declaration.
826 (set_tdesc_osabi): Likewise.
827
0abe8a89
YQ
8282017-09-05 Yao Qi <yao.qi@linaro.org>
829
830 * linux-x86-tdesc.c: Don't include <inttypes.h>.
831 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
832 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
833 .xmltarget.
834 * server.c (get_features_xml): Call tdesc_get_features_xml.
835 * tdesc.c (set_tdesc_architecture): New function.
836 (set_tdesc_osabi): New function.
837 (tdesc_get_features_xml): New function.
838 (tdesc_create_feature): Add an argument.
839 * tdesc.h (struct target_desc) <features>: New field.
840 <arch, osabi>: New field.
841 (~target_desc): xfree features, arch, and osabi.
842 (target_desc::oerator==): Don't compare .xmltarget.
843 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
844 (set_tdesc_osabi): Likewise.
845 (tdesc_get_features_xml): Likewise.
846
0a188386
YQ
8472017-09-05 Yao Qi <yao.qi@linaro.org>
848
849 * linux-x86-tdesc.c: Include selftest.h.
850 (i386_tdesc_test): New function.
851 (initialize_low_tdesc): Call selftests::register_test.
852 * tdesc.h: Include regdef.h.
853 (target_desc): Override operator == and !=.
854
f49ff000
YQ
8552017-09-05 Yao Qi <yao.qi@linaro.org>
856
857 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
858 (ipa_obj): Likewise.
859 * linux-i386-ipa.c: Include common/x86-xstate.h
860 (get_ipa_tdesc): Call i386_linux_read_description.
861 (initialize_low_tracepoint): Don't call init_registers_XXX
862 functions, call initialize_low_tdesc instead.
863 * linux-x86-low.c (x86_linux_read_description): Call
864 i386_linux_read_description.
865 (initialize_low_arch): Don't call init_registers_i386_XXX
866 functions, call initialize_low_tdesc.
867 * linux-x86-tdesc.c: New file.
868 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
869 (i386_get_ipa_tdesc_idx): Declare.
870 (i386_get_ipa_tdesc): Declare.
871 (initialize_low_tdesc): Declare.
872
2b68ef2f
YQ
8732017-09-05 Yao Qi <yao.qi@linaro.org>
874
875 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
876 instead of 0.
877
f7000548
YQ
8782017-09-05 Yao Qi <yao.qi@linaro.org>
879
880 * Makefile.in (IPA_OBJS): Add vec-ipa.o
881 * regcache.c (get_thread_regcache): Use VEC_length.
882 (init_register_cache): Likewise.
883 (regcache_cpy): Likewise.
884 (registers_to_string): Iterate reg_defs via VEC_iterate.
885 (find_regno): Likewise.
886 (find_register_by_number): Use VEC_index.
887 (register_size): Call find_register_by_number.
888 (register_data): Call find_register_by_number.
889 (supply_regblock): Use VEC_length.
890 (regcache_raw_read_unsigned): Likewise.
891 * tdesc.c (init_target_desc): Iterate reg_defs via
892 VEC_iterate.
893 (default_description): Update initializer.
894 (copy_target_description): Don't update field num_registers.
895 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
896 <num_registers>: Remove.
897
50a421ac
SM
8982017-09-04 Simon Marchi <simon.marchi@ericsson.com>
899
900 * Makefile.in (.SECONDARY): Define target.
901
23fdd69e
SM
9022017-09-03 Simon Marchi <simon.marchi@ericsson.com>
903
904 * linux-low.c (linux_wait_1): Adjust.
905 * server.c (queue_stop_reply_callback): Adjust.
906
0a2dde4a
SDJ
9072017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
908
909 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
910 QEnvironmentUnset and QEnvironmentReset packets.
911 (handle_query): Inform remote that QEnvironmentHexEncoded,
912 QEnvironmentUnset and QEnvironmentReset are supported.
913
6afd337d
SM
9142017-08-25 Simon Marchi <simon.marchi@ericsson.com>
915
916 * inferiors.h (inferior_target_data): Rename to ...
917 (thread_target_data): ... this.
918 (inferior_regcache_data): Rename to ...
919 (thread_regcache_data): ... this.
920 (set_inferior_regcache_data): Rename to ...
921 (set_thread_regcache_data): ... this.
922 * inferiors.c (inferior_target_data): Rename to ...
923 (thread_target_data): ... this.
924 (inferior_regcache_data): Rename to ...
925 (thread_regcache_data): ... this.
926 (set_inferior_regcache_data): Rename to ...
927 (set_thread_regcache_data): ... this.
928 (free_one_thread): Update.
929 * linux-low.h (get_thread_lwp): Update.
930 * regcache.c (get_thread_regcache): Update.
931 (regcache_invalidate_thread): Update.
932 (free_register_cache_thread): Update.
933 * win32-i386-low.c (update_debug_registers_callback): Update.
934 (win32_get_current_dr): Update.
935 * win32-low.c (thread_rec): Update.
936 (delete_thread_info): Update.
937 (continue_one_thread): Update.
938 (suspend_one_thread): Update.
939
a160cc46
SM
9402017-08-24 Simon Marchi <simon.marchi@ericsson.com>
941
942 * inferiors.c (set_inferior_target_data): Remove.
943 * inferiors.h (set_inferior_target_data): Remove.
944
6d580b63
YQ
9452017-08-18 Yao Qi <yao.qi@linaro.org>
946
947 * Makefile.in (OBS): Add selftest.o.
948 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
949 * configure, config.in: Re-generated.
950 * server.c: Include common/sefltest.h.
951 (captured_main): Handle option --selftest.
952
f5a29eb0
YQ
9532017-08-09 Yao Qi <yao.qi@linaro.org>
954
955 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
956 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
957 i386-avx-mpx.o and i386-mmx.o.
958 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
959 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
960 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
961 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
962 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
963 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
964 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
965 i386/amd64-avx-mpx.xml.
966
57757c2f
YQ
9672017-08-09 Yao Qi <yao.qi@linaro.org>
968
969 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
970 and x32-avx-avx512.o.
971 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
972 i386/x32-avx-avx512.xml.
973
229d26fc
SM
9742017-07-26 Simon Marchi <simon.marchi@ericsson.com>
975
976 * tracepoint.h (enum class fast_tpoint_collect_result): New
977 enumeration.
978 (fast_tracepoint_collecting): Change return type to
979 fast_tpoint_collect_result.
980 * tracepoint.c (fast_tracepoint_collecting): Likewise.
981 * linux-low.h: Include tracepoint.h.
982 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
983 fast_tpoint_collect_result.
984 * linux-low.c (handle_tracepoints): Adjust.
985 (linux_fast_tracepoint_collecting): Change return type to
986 fast_tpoint_collect_result.
987 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
988 linux_wait_1, stuck_in_jump_pad_callback,
989 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
990 proceed_one_lwp): Adjust to type change.
991
2e1e43e1
YQ
9922017-07-10 Yao Qi <yao.qi@linaro.org>
993
994 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
995
adc764e7
YQ
9962017-06-29 Yao Qi <yao.qi@linaro.org>
997
998 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
999 Remove.
1000 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1001
a206891a
SM
10022017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1003
1004 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1005
9a6c7d9c
SDJ
10062017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1007
1008 * linux-low.c (linux_create_inferior): Adjust code to access the
1009 environment information via 'gdb_environ' class.
1010 * lynx-low.c (lynx_create_inferior): Likewise.
1011 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1012 (get_environ): Return a pointer to 'our_environ'.
1013 (captured_main): Initialize 'our_environ'.
1014 * server.h (get_environ): Adjust prototype.
1015 * spu-low.c (spu_create_inferior): Adjust code to access the
1016 environment information via 'gdb_environ' class.
1017
ae3e2ccf
SM
10182017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1019
1020 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1021 usage of "register" keyword.
1022
3e019bdc
SM
10232017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1024
1025 * configure: Re-generate.
1026
8465943a
SM
10272017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1028
1029 * configure: Re-generate.
1030
cf0dd6f0
SM
10312017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1032
1033 * Makefile.in (COMPILE.pre): Add "-x c++".
1034
9845682b
SDJ
10352017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1036
1037 * fork-child.c: Conditionally include <signal.h>.
1038
aefd8b33
SDJ
10392017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1040
1041 * server.c (handle_general_set): Handle new packet
1042 "QStartupWithShell".
1043 (handle_query): Add "QStartupWithShell" to the list of supported
1044 packets.
1045 (gdbserver_usage): Add help text explaining the
1046 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1047 options.
1048 (captured_main): Recognize and act upon the presence of the new
1049 CLI options.
1050
2090129c
SDJ
10512017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1052 Pedro Alves <palves@redhat.com>
1053
1054 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1055 * configure: Regenerate.
1056 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1057 "fork-inferior.o".
1058 (i[34567]86-*-lynxos*): Likewise.
1059 (spu*-*-*): Likewise.
1060 * fork-child.c: New file.
1061 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1062 and "environ.h".
1063 (linux_ptrace_fun): New function.
1064 (linux_create_inferior): Adjust function prototype to reflect
1065 change on "target.h". Adjust function code to use
1066 "fork_inferior".
1067 (linux_request_interrupt): Delete "signal_pid".
1068 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1069 (lynx_ptrace_fun): New function.
1070 (lynx_create_inferior): Adjust function prototype to reflect
1071 change on "target.h". Adjust function code to use
1072 "fork_inferior".
1073 * nto-low.c (nto_create_inferior): Adjust function prototype and
1074 code to reflect change on "target.h". Update comments.
1075 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1076 "common-terminal.h" and "environ.h".
1077 (terminal_fd): Moved to fork-child.c.
1078 (old_foreground_pgrp): Likewise.
1079 (restore_old_foreground_pgrp): Likewise.
1080 (last_status): Make it global.
1081 (last_ptid): Likewise.
1082 (our_environ): New variable.
1083 (startup_with_shell): Likewise.
1084 (program_name): Likewise.
1085 (program_argv): Rename to...
1086 (program_args): ...this.
1087 (wrapper_argv): New variable.
1088 (start_inferior): Delete function.
1089 (get_exec_wrapper): New function.
1090 (get_exec_file): Likewise.
1091 (get_environ): Likewise.
1092 (prefork_hook): Likewise.
1093 (post_fork_inferior): Likewise.
1094 (postfork_hook): Likewise.
1095 (postfork_child_hook): Likewise.
1096 (handle_v_run): Update code to deal with arguments coming from the
1097 remote host. Update calls from "start_inferior" to
1098 "create_inferior".
1099 (captured_main): Likewise. Initialize environment variable. Call
1100 "have_job_control".
1101 * server.h (post_fork_inferior): New prototype.
1102 (get_environ): Likewise.
1103 (last_status): Declare.
1104 (last_ptid): Likewise.
1105 (signal_pid): Likewise.
1106 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1107 (spu_ptrace_fun): New function.
1108 (spu_create_inferior): Adjust function prototype to reflect change
1109 on "target.h". Adjust function code to use "fork_inferior".
1110 * target.c (target_terminal_init): New function.
1111 (target_terminal_inferior): Likewise.
1112 (target_terminal_ours): Likewise.
1113 * target.h: Include <vector>.
1114 (struct target_ops) <create_inferior>: Update prototype.
1115 (create_inferior): Update macro.
1116 * utils.c (gdb_flush_out_err): New function.
1117 * win32-low.c (win32_create_inferior): Adjust function prototype
1118 and code to reflect change on "target.h".
1119
043a4934
SDJ
11202017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1121
1122 * inferiors.c (switch_to_thread): New function.
1123
15652511
SDJ
11242017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1125
1126 * Makefile.in (SFILE): Add "common/job-control.c".
1127 (OBS): Add "job-control.o".
1128
21ea5acd
SDJ
11292017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1130
1131 * Makefile: Remove "@host_makefile_frag@".
1132
e13cb306
PA
11332017-05-05 Pedro Alves <palves@redhat.com>
1134
1135 * configure: Regenerate.
1136
c94fee56
SDJ
11372017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1138
1139 * configure: Regenerate.
1140
a0ff9e1a
SM
11412017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1142
1143 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1144 software_single_step change of return type to
1145 std::vector<CORE_ADDR>.
1146 * linux-low.c (install_software_single_step_breakpoints):
1147 Likewise.
1148 * linux-low.h (install_software_single_step_breakpoints):
1149 Likewise.
1150
be628ab8
SDJ
11512017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1152
1153 * remote-utils.c: Include "gdb_termios.h" instead of
1154 "terminal.h".
1155 * terminal.h: Delete file.
1156
7c5ded6a
SDJ
11572017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1158
1159 * server.c: Include <vector>.
1160 <program_argv, wrapper_argv>: Convert to std::vector.
1161 (start_inferior): Rewrite function to use C++.
1162 (handle_v_run): Likewise. Update code that calculates the argv
1163 based on the vRun packet; use C++.
1164 (captured_main): Likewise.
1165
436252de
SM
11662017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1167
1168 * server.c (handle_v_cont): Initialize thread_resume::thread
1169 with null_ptid.
1170
9bf2a700
PA
11712017-04-05 Pedro Alves <palves@redhat.com>
1172
1173 * configure: Regenerate.
1174
a121b7c1
PA
11752017-04-05 Pedro Alves <palves@redhat.com>
1176
1177 * gdbreplay.c (sync_error): Constify.
1178 * linux-x86-low.c (push_opcode): Constify.
1179
21c8a587
PA
11802017-04-05 Pedro Alves <palves@redhat.com>
1181
1182 * win32-low.c (get_child_debug_event)
1183 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1184 Report TARGET_WAITKIND_SPURIOUS instead.
1185
fb32b4f7
PA
11862017-04-05 Pedro Alves <palves@redhat.com>
1187
1188 * remote-utils.c (remote_prepare, remote_open): Constify.
1189 * remote-utils.h (remote_prepare, remote_open): Constify.
1190 * server.c (captured_main): Constify 'port' handling.
1191
65dd1e59
SM
11922017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1193
1194 * Makefile.in (clean): Clear .deps.
1195
8fa5b777
SM
11962017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1197
1198 * .gitignore: Remove generated files, replace with wildcard.
1199 * (clean): Replace removal of generated files with wildcard.
1200 (version.c): Replace with...
1201 (version-generated.c): ...this.
1202 (xml-builtin.c): Replace with...
1203 (xml-builtin-generated.c): ...this.
1204 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1205 (%.c: *regformats*): Replace with...
1206 (%-generated.c: *regformats*): ...this.
1207
a12e714b
MF
12082017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1209
1210 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1211 (xtensa_fill_gregset): Call collect_register_by_name for
1212 threadptr register.
1213 (xtensa_store_gregset): Call supply_register_by_name for
1214 threadptr register.
1215
1a09b50a
MF
12162017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1217
1218 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1219 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1220 (xtensa_store_gregset): Call supply_register for all registers in
1221 a0_regnum..a0_regnum + C0_NREGS range.
1222
1a01e7c6
SM
12232017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1224
1225 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1226 (ax-ipa.o: ax.c): Remove.
1227 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1228 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1229 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1230 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1231 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1232
36bc18a8
SM
12332017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1234
1235 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1236 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1237 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1238 (errors-ipa.o: ../common/errors.c): Remove.
1239 (format-ipa.o: ../common/format.c): Remove.
1240 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1241
a8ebe3d5
SM
12422017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1243
1244 * Makefile.in (%-ipa.o: %.c): New rule.
1245 (tracepoint-ipa.o: tracepoint.c): Remove.
1246 (utils-ipa.o: utils.c): Remove.
1247 (remote-utils-ipa.o: remote-utils.c): Remove.
1248 (regcache-ipa.o: regcache.c): Remove.
1249 (i386-linux-ipa.o: i386-linux.c): Remove.
1250 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1251 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1252 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1253 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1254 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1255 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1256 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1257 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1258 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1259 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1260 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1261 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1262 (aarch64-ipa.o: aarch64.c): Remove.
1263 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1264 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1265 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1266 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1267 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1268 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1269 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1270 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1271 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1272 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1273 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1274 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1275 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1276 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1277 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1278 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1279 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1280 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1281 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1282 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1283 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1284 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1285 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1286 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1287 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1288 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1289 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1290 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1291 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1292 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1293 (tdesc-ipa.o: tdesc.c): Remove.
1294 (x32-linux-ipa.o: x32-linux.c): Remove.
1295 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1296 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1297
50cfacb7
SM
12982017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1299
1300 * Makefile.in (%.o: ../arch/%.c): New rule.
1301 (arm.o: ../arch/arm.c): Remove.
1302 (arm-linux.o: ../arch/arm-linux.c): Remove.
1303 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1304 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1305
c5a22423
SM
13062017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1307
1308 * Makefile.in (%.o: ../nat/%.c): New rule.
1309 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1310 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1311 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1312 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1313 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1314 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1315 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1316 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1317 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1318 (linux-personality.o: ../nat/linux-personality.c): Remove.
1319 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1320 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1321 (x86-linux.o: ../nat/x86-linux.c): Remove.
1322 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1323 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1324
6bda016b
SM
13252017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1326
1327 * Makefile.in (%.o: ../common/%.c): New rule.
1328 (signals.o: ../common/signals.c): Remove.
1329 (print-utils.o: ../common/print-utils.c): Remove.
1330 (rsp-low.o: ../common/rsp-low.c): Remove.
1331 (common-utils.o: ../common/common-utils.c): Remove.
1332 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1333 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1334 (vec.o: ../common/vec.c): Remove.
1335 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1336 (xml-utils.o: ../common/xml-utils.c): Remove.
1337 (ptid.o: ../common/ptid.c): Remove.
1338 (buffer.o: ../common/buffer.c): Remove.
1339 (format.o: ../common/format.c): Remove.
1340 (filestuff.o: ../common/filestuff.c): Remove.
1341 (agent.o: ../common/agent.c): Remove.
1342 (errors.o: ../common/errors.c): Remove.
1343 (environ.o: ../common/environ.c): Remove.
1344 (common-debug.o: ../common/common-debug.c): Remove.
1345 (cleanups.o: ../common/cleanups.c): Remove.
1346 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1347 (fileio.o: ../common/fileio.c): Remove.
1348 (common-regcache.o: ../common/common-regcache.c): Remove.
1349 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1350 (new-op.o: ../common/new-op.c): Remove.
1351 (btrace-common.o: ../common/btrace-common.c): Remove.
1352
21122961
SM
13532017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1354
1355 * Makefile.in (%.o: ../target/%.c): New rule.
1356 (waitstatus.o: ../target/waitstatus.c): Remove.
1357
c362e621
SM
13582017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1359
1360 * Makefile.in
1361 (%.c: ../regformats/%.dat,
1362 (%.c: ../regformats/arm/%.dat,
1363 (%.c: ../regformats/i386/%.dat,
1364 (%.c: ../regformats/rs6000/%.dat): New rules.
1365 (aarch64.c): Remove.
1366 (reg-arm.c): Remove.
1367 (arm-with-iwmmxt.c): Remove.
1368 (arm-with-vfpv2.c): Remove.
1369 (arm-with-vfpv3.c): Remove.
1370 (arm-with-neon.c): Remove.
1371 (reg-bfin.c): Remove.
1372 (reg-cris.c): Remove.
1373 (reg-crisv32.c): Remove.
1374 (i386.c): Remove.
1375 (i386-linux.c): Remove.
1376 (i386-avx.c): Remove.
1377 (i386-avx-linux.c): Remove.
1378 (i386-avx-avx512.c): Remove.
1379 (i386-avx-avx512-linux.c): Remove.
1380 (i386-mpx.c): Remove.
1381 (i386-mpx-linux.c): Remove.
1382 (i386-avx-mpx-avx512-pku.c): Remove.
1383 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1384 (i386-avx-mpx.c): Remove.
1385 (i386-avx-mpx-linux.c): Remove.
1386 (i386-mmx.c): Remove.
1387 (i386-mmx-linux.c): Remove.
1388 (reg-ia64.c): Remove.
1389 (reg-m32r.c): Remove.
1390 (reg-m68k.c): Remove.
1391 (reg-cf.c): Remove.
1392 (mips-linux.c): Remove.
1393 (mips-dsp-linux.c): Remove.
1394 (mips64-linux.c): Remove.
1395 (mips64-dsp-linux.c): Remove.
1396 (nios2-linux.c): Remove.
1397 (powerpc-32.c): Remove.
1398 (powerpc-32l.c): Remove.
1399 (powerpc-altivec32l.c): Remove.
1400 (powerpc-cell32l.c): Remove.
1401 (powerpc-vsx32l.c): Remove.
1402 (powerpc-isa205-32l.c): Remove.
1403 (powerpc-isa205-altivec32l.c): Remove.
1404 (powerpc-isa205-vsx32l.c): Remove.
1405 (powerpc-e500l.c): Remove.
1406 (powerpc-64l.c): Remove.
1407 (powerpc-altivec64l.c): Remove.
1408 (powerpc-cell64l.c): Remove.
1409 (powerpc-vsx64l.c): Remove.
1410 (powerpc-isa205-64l.c): Remove.
1411 (powerpc-isa205-altivec64l.c): Remove.
1412 (powerpc-isa205-vsx64l.c): Remove.
1413 (s390-linux32.c): Remove.
1414 (s390-linux32v1.c): Remove.
1415 (s390-linux32v2.c): Remove.
1416 (s390-linux64.c): Remove.
1417 (s390-linux64v1.c): Remove.
1418 (s390-linux64v2.c): Remove.
1419 (s390-te-linux64.c): Remove.
1420 (s390-vx-linux64.c): Remove.
1421 (s390-tevx-linux64.c): Remove.
1422 (s390x-linux64.c): Remove.
1423 (s390x-linux64v1.c): Remove.
1424 (s390x-linux64v2.c): Remove.
1425 (s390x-te-linux64.c): Remove.
1426 (s390x-vx-linux64.c): Remove.
1427 (s390x-tevx-linux64.c): Remove.
1428 (tic6x-c64xp-linux.c): Remove.
1429 (tic6x-c64x-linux.c): Remove.
1430 (tic6x-c62x-linux.c): Remove.
1431 (reg-sh.c): Remove.
1432 (reg-sparc64.c): Remove.
1433 (reg-spu.c): Remove.
1434 (amd64.c): Remove.
1435 (amd64-linux.c): Remove.
1436 (amd64-avx.c): Remove.
1437 (amd64-avx-linux.c): Remove.
1438 (amd64-avx-avx512.c): Remove.
1439 (amd64-avx-avx512-linux.c): Remove.
1440 (amd64-mpx.c): Remove.
1441 (amd64-mpx-linux.c): Remove.
1442 (amd64-avx-mpx-avx512-pku.c): Remove.
1443 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1444 (amd64-avx-mpx.c): Remove.
1445 (amd64-avx-mpx-linux.c): Remove.
1446 (x32.c): Remove.
1447 (x32-linux.c): Remove.
1448 (x32-avx.c): Remove.
1449 (x32-avx-linux.c): Remove.
1450 (x32-avx-avx512.c): Remove.
1451 (x32-avx-avx512-linux.c): Remove.
1452 (reg-xtensa.c): Remove.
1453 (reg-tilegx.c): Remove.
1454 (reg-tilegx32.c): Remove.
1455
1672e0d9
SDJ
14562017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1457
1458 * Makefile.in (SFILES): Add "common/environ.c".
1459 (OBJS): Add "common/environ.h".
1460
239b6d10
WT
14612017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1462
1463 * configure.ac: Check if the fs_base and gs_base members of
1464 `struct user_regs_struct' exist.
1465 * config.in: Regenerated.
1466 * configure: Likewise.
1467
694b382c
AT
14682017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1469
1470 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1471 target_read_memory.
1472 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1473 (get_next_pcs_syscall_next_pc): Likewise.
1474
7dc53023
LM
14752016-12-23 Luis Machado <lgustavo@codesourcery.com>
1476
1477 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1478 * nto-x86-low.c: Likewise.
1479
ad02e4fe
SM
14802016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1481
1482 * Makefile.in: Include disable-implicit-rules.mk.
1483
dcb07cfa
PA
14842016-11-23 Pedro Alves <palves@redhat.com>
1485
1486 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1487 (debug_vprintf): Use std::chrono::steady_clock instead of
1488 gettimeofday. Use '.' instead of ':'.
1489 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1490 (get_timestamp): Use std::chrono::steady_clock instead of
1491 gettimeofday.
1492
8629c02c
SM
14932016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1494
1495 * Makefile.in: Fix whitespace formatting.
1496
b593ecca
SM
14972016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1498
1499 * Makefile.in (SFILES, OBS): Flatten list and order
1500 alphabetically.
1501
9986ba08
PA
15022016-11-23 Pedro Alves <palves@redhat.com>
1503
1504 * event-loop.c (handle_file_event): Use warning.
1505 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1506 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1507 Use warning.
1508
4eefa7bc
PA
15092016-11-23 Pedro Alves <palves@redhat.com>
1510
1511 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1512 output.
1513 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1514 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1515 debug_printf and debug_flush for debug output.
1516 * server.c (handle_general_set): Likewise.
1517 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1518 output.
1519
5443506e
SM
15202016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1521
1522 * Makefile.in (.c.o): Replace rule with ...
1523 (%.o: %.c): ... this one.
1524
3b165252
SM
15252016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1526
1527 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1528 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1529 make.
1530 * configure.ac: Remove checks for the make program.
1531 * configure: Re-generate.
1532
0bcda685
PA
15332016-10-28 Pedro Alves <palves@redhat.com>
1534
1535 * Makefile.in (CXX_DIALECT): Get from configure.
1536 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1537 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1538 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1539 * config.in: Regenerate.
1540 * configure: Regenerate.
1541
c3805894
YQ
15422016-10-27 Yao Qi <yao.qi@linaro.org>
1543
1544 * linux-low.c (linux_supports_range_stepping): Return true if
1545 can_software_single_step return true.
1546
89342618
YQ
15472016-10-27 Yao Qi <yao.qi@linaro.org>
1548
1549 * inferiors.c (find_inferior_in_random): New function.
1550 * inferiors.h (find_inferior_in_random): Declare.
1551 * linux-low.c (linux_wait_for_event_filtered): Call
1552 find_inferior_in_random instead of find_inferior.
1553
e3652c84
YQ
15542016-10-27 Yao Qi <yao.qi@linaro.org>
1555
1556 * linux-low.c (linux_wait_1): If single-step breakpoints are
1557 inserted, remove them.
1558
5a04c4cf
PA
15592016-10-26 Pedro Alves <palves@redhat.com>
1560
1561 * linux-low.c (handle_extended_wait): Link parent/child fork
1562 threads.
1563 (linux_wait_1): Unlink them.
1564 (linux_set_resume_request): Ignore resume requests for
1565 already-resumed and unhandled fork child threads.
1566 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1567 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1568 New functions.
1569 (handle_v_requests) <vCont>: Don't call require_running.
1570 * server.h (in_queued_stop_replies): New declaration.
1571
cb93dc7f
YQ
15722016-10-24 Yao Qi <yao.qi@linaro.org>
1573
1574 PR server/20733
1575 * linux-aarch64-low.c (append_insns): Cast the return value to
1576 'uint32_t *'.
1577
a1078bea
YQ
15782016-10-10 Yao Qi <yao.qi@linaro.org>
1579
1580 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1581
1fb77080
SDJ
15822016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1583
1584 * target.c (target_supports_multi_process): New function, moved
1585 from...
1586 * target.h (target_supports_multi_process): ... here. Remove
1587 macro.
1588
39b5a3b9
TT
15892016-10-05 Tom Tromey <tom@tromey.com>
1590
1591 PR remote/20655:
1592 * tracepoint.c (handle_tracepoint_bkpts): Check
1593 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1594
c1d0b70a
YQ
15952016-10-05 Yao Qi <yao.qi@linaro.org>
1596
1597 * configure.srv: Update the path of arm-*.xml files.
1598
0a69eedb
YQ
15992016-10-05 Terry Guo <terry.guo@arm.com>
1600 Yao Qi <yao.qi@linaro.org>
1601
1602 * Makefile.in: Adjust the path of rules.
1603 * configure.srv: Update the path of xml files.
1604 * regformats/arm-with-iwmmxt.dat: Regenerated.
1605 * regformats/arm-with-neon.dat: Likewise.
1606 * regformats/arm-with-vfpv2.dat: Likewise.
1607 * regformats/arm-with-vfpv3.dat Likewise.
1608
17e16485
YQ
16092016-09-30 Yao Qi <yao.qi@linaro.org>
1610
1611 PR gdbserver/20627
1612 * target.c (target_stop_and_wait): Don't call
1613 target_continue_no_signal, use resume_stop instead.
1614
edeeb602
YQ
16152016-09-26 Yao Qi <yao.qi@linaro.org>
1616
1617 * linux-low.c (linux_wait_1): Call debug_exit.
1618
503b1c39
PA
16192016-09-23 Pedro Alves <palves@redhat.com>
1620
1621 * Makefile.in (SFILES): Add common/new-op.c.
1622 (OBS): Add common/new-op.o.
1623 (new-op.o): New rule.
1624
74172ecf
SM
16252016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1626
1627 * .gitinore: Ignore more files.
1628
fc6cda2e
YQ
16292016-09-21 Yao Qi <yao.qi@linaro.org>
1630
1631 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1632 23.
1633
bc1e6c81
SDJ
16342016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1635
1636 * server.c (start_inferior): Call target_mourn_inferior instead of
1637 mourn_inferior; pass ptid_t argument to it.
1638 (resume): Likewise.
1639 (handle_target_event): Likewise.
1640 * target.c (target_mourn_inferior): New function.
1641 * target.h (mourn_inferior): Delete macro.
1642
0e00e962
AA
16432016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1644
1645 * linux-low.c (lwp_is_stepping): New function.
1646
1d8cb77d
CL
16472016-09-06 Carl Love <cel@us.ibm.com>
1648
1649 * server.c (start_inferior): Fixed comment, requested comment change
1650 didn't get updated correctly. Removed reference to ptrace () call as
1651 it is only true on Linux systems.
1652
7313bced
CL
16532016-09-06 Carl Love <cel@us.ibm.com>
1654
1655 * server.c (start_inferior): Do not call
1656 function target_post_create_inferior () if the
1657 inferior process has already exited.
1658
cf6de44d
PA
16592016-09-05 Pedro Alves <palves@redhat.com>
1660
1661 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1662 (COMPILE.pre, CC_LD): Use CXX directly.
1663 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1664 * acinclude.m4: Don't include build-with-cxx.m4.
1665 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1666 * configure: Regenerate.
1667
c1da6748
AT
16682016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1669
1670 PR gdb/19495
1671 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1672 call writing data to own_buf.
1673
f2b9e3df
SDJ
16742016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1675
1676 * target.c (mywait): Call target_wait instead of
1677 the_target->wait.
1678 (target_wait): New function.
1679
049a8570
SDJ
16802016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1681
1682 * server.c (start_inferior): New variable 'ptid'. Replace calls
1683 to the_target->resume by target_continue{,_no_signal}, depending
1684 on the case.
1685 * target.c (target_stop_and_wait): Call target_continue_no_signal
1686 instead of the_target->resume.
1687 (target_continue): New function.
1688
3aa5cfa0
AT
16892016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1690
1691 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1692
754653a7
AZ
16932016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1694
1695 PR server/20491
1696 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1697 ps_prochandle.
1698 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1699 * linux-arm-low.c (ps_get_thread_area): Likewise.
1700 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1701 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1702 * linux-mips-low.c (ps_get_thread_area): Likewise.
1703 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1704 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1705 * linux-x86-low.c (ps_get_thread_area): Likewise.
1706 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1707
ed036b40
PA
17082016-08-19 Pedro Alves <palves@redhat.com>
1709
1710 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1711
c8ef42ee
PA
17122016-08-19 Pedro Alves <palves@redhat.com>
1713
1714 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1715 comment. Use memcpy instead of casting through unsigned long.
1716
9c235a72
PA
17172016-08-19 Pedro Alves <palves@redhat.com>
1718
1719 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1720 allocating around 0x80000000.
1721
201506da
PA
17222016-08-19 Pedro Alves <palves@redhat.com>
1723
1724 PR gdb/20415
1725 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1726 (x32-avx512-linux-ipa.o): New rules.
1727 * configure.ac (x86_64-*-linux*): New x32 check.
1728 * configure.srv (ipa_x32_linux_regobj): New.
1729 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1730 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1731 descriptions.
1732 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1733 descriptions.
1734 * configure: Regenerate.
1735
f348d89a
PA
17362016-08-09 Pedro Alves <palves@redhat.com>
1737
1738 PR gdb/18653
1739 * Makefile.in (OBS): Add signals-state-save-restore.o.
1740 (signals-state-save-restore.o): New rule.
1741 * config.in: Regenerate.
1742 * configure: Regenerate.
1743 * linux-low.c: Include "signals-state-save-restore.h".
1744 (linux_create_inferior): Call
1745 restore_original_signals_state.
1746 * server.c: Include "dispositions-save-restore.h".
1747 (captured_main): Call save_original_signals_state.
1748
1baf5149
PA
17492016-08-05 Pedro Alves <palves@redhat.com>
1750
1751 * configure: Regenerate.
1752
fcd4a73d
YQ
17532016-08-04 Yao Qi <yao.qi@linaro.org>
1754
1755 * linux-low.c (regsets_fetch_inferior_registers): Check
1756 errno is ESRCH or not.
1757
979659d0
YQ
17582016-08-02 Yao Qi <yao.qi@linaro.org>
1759
1760 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1761 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1762 (thread_db_load_search): Update.
1763 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1764 td_ta_set_event and td_ta_event_getmsg.
1765
6598661d
PA
17662016-07-26 Pedro Alves <palves@redhat.com>
1767
1768 PR server/20414
1769 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1770 of unsigned long for 64-bit registers and use uint32_t instead of
1771 unsigned int for 32-bit registers.
1772
9cf12d57
PA
17732016-07-26 Pedro Alves <palves@redhat.com>
1774
1775 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1776 to 'ptrace'.
1777
305450ed
TT
17782016-07-21 Tom Tromey <tom@tromey.com>
1779
1780 * configure: Rebuild.
1781
2583da7c
YQ
17822016-07-21 Yao Qi <yao.qi@linaro.org>
1783
1784 * mem-break.c (find_gdb_breakpoint): Cast bp to
1785 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1786
21536b36
YQ
17872016-07-21 Yao Qi <yao.qi@linaro.org>
1788
1789 * server.c (handle_v_requests): Support s and S actions
1790 if target_supports_software_single_step return true.
1791
8901d193
YQ
17922016-07-21 Yao Qi <yao.qi@linaro.org>
1793
1794 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1795 is resume_step, call maybe_hw_step.
1796 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1797 and unstop them.
1798 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1799 breakpoints or not.
1800 (proceed_one_lwp): If resume request is resume_step, install
1801 reinsert breakpoints and call maybe_hw_step.
1802
0e9a339e
YQ
18032016-07-21 Yao Qi <yao.qi@linaro.org>
1804
1805 * linux-low.c (proceed_one_lwp): Declare.
1806 (linux_resume_one_thread): Remove local variable 'step'.
1807 Lift code enqueue signal. Call proceed_one_lwp instead of
1808 linux_resume_one_lwp.
1809
4281b351
YQ
18102016-07-21 Yao Qi <yao.qi@linaro.org>
1811
1812 * linux-low.c (linux_resume_one_thread): Call
1813 enqueue_pending_signal.
1814
984a2c04
YQ
18152016-07-21 Yao Qi <yao.qi@linaro.org>
1816
1817 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1818 * inferiors.c (do_restore_current_thread_cleanup): New function.
1819 (make_cleanup_restore_current_thread): Likewise.
1820 * linux-low.c (install_software_single_step_breakpoints): Call
1821 make_cleanup_restore_current_thread. Switch current_thread to
1822 thread.
1823
bec903c9
YQ
18242016-07-21 Yao Qi <yao.qi@linaro.org>
1825
1826 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1827 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1828 (clone_one_breakpoint): Likewise.
1829 (delete_reinsert_breakpoints): Change parameter to thread.
1830 Callers updated.
1831 (has_reinsert_breakpoints): Likewise.
1832 (uninsert_reinsert_breakpoints): Likewise.
1833 (reinsert_reinsert_breakpoints): Likewise.
1834 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1835 (delete_reinsert_breakpoints): Likewise.
1836 (reinsert_reinsert_breakpoints): Likewise.
1837 (uninsert_reinsert_breakpoints): Likewise.
1838 (has_reinsert_breakpoints): Likewise.
1839
63c40ec7
YQ
18402016-07-21 Yao Qi <yao.qi@linaro.org>
1841
1842 * inferiors.c (get_thread_process): Make parameter const.
1843 * inferiors.h (get_thread_process): Update declaration.
1844 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1845 Add new parameters child_thread and parent_thread. Callers
1846 updated.
1847 * mem-break.h (clone_all_breakpoints): Update declaration.
1848
9aa76cd0
YQ
18492016-07-21 Yao Qi <yao.qi@linaro.org>
1850
1851 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1852 <command_list, handler>: Remove.
1853 (struct gdb_breakpoint): New.
1854 (struct other_breakpoint): New.
1855 (struct reinsert_breakpoint): New.
1856 (is_gdb_breakpoint): New function.
1857 (any_persistent_commands): Update command_list if
1858 is_gdb_breakpoint returns true.
1859 (set_breakpoint): Create breakpoints according to their types.
1860 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1861 (set_gdb_breakpoint_1): Likewise.
1862 (set_gdb_breakpoint): Likewise.
1863 (clear_breakpoint_conditions): Change parameter type to
1864 'struct gdb_breakpoint *'.
1865 (clear_breakpoint_commands): Likewise.
1866 (clear_breakpoint_conditions_and_commands): Likewise.
1867 (add_condition_to_breakpoint): Likewise.
1868 (add_breakpoint_condition): Likewise.
1869 (add_commands_to_breakpoint): Likewise.
1870 (check_breakpoints): Check other_breakpoint.
1871 (clone_one_breakpoint): Clone breakpopint according to its type.
1872 * mem-break.h (struct gdb_breakpoint): Declare.
1873 (set_gdb_breakpoint): Update declaration.
1874 (clear_breakpoint_conditions_and_commands): Likewise.
1875 (add_breakpoint_condition): Likewise.
1876 (add_breakpoint_commands): Likewise.
1877 * server.c (process_point_options): Change parameter type to
1878 'struct gdb_breakpoint *'.
1879
811f8301
YQ
18802016-07-21 Yao Qi <yao.qi@linaro.org>
1881
1882 * mem-break.c (set_breakpoint_at): Rename it to ...
1883 (set_breakpoint_type_at): ... it.
1884 (set_breakpoint_at): Call set_breakpoint_type_at.
1885 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1886 * mem-break.h (set_breakpoint_at): Update comments.
1887
b1c51e36
CLT
18882016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1889
1890 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1891 to buf parameter.
1892 (nios2_store_gregset): Likewise.
1893
ced2dffb
PA
18942016-07-01 Pedro Alves <palves@redhat.com>
1895 Antoine Tremblay <antoine.tremblay@ericsson.com>
1896
1897 * linux-low.c: Change interface to take the target lwp_info
1898 pointer directly and return void. Handle detaching from a zombie
1899 thread.
1900 (linux_detach_lwp_callback): New function.
1901 (linux_detach): Detach from the leader thread after detaching from
1902 the clone threads.
1903
2ac09a5b
YQ
19042016-06-28 Yao Qi <yao.qi@linaro.org>
1905
1906 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1907 for variable new_offset.
1908 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1909 (aarch64_ftrace_insn_reloc_cb): Likewise.
1910 (aarch64_ftrace_insn_reloc_tb): Likewise.
1911 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1912 PRIx64 instead of PRIx32.
1913
79e7fd4f
YQ
19142016-06-28 Yao Qi <yao.qi@linaro.org>
1915
1916 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1917 (the_low_target): Install arm_get_syscall_trapinfo.
1918
061fc021
YQ
19192016-06-28 Yao Qi <yao.qi@linaro.org>
1920
1921 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1922 function.
1923 (the_low_target): Install aarch64_get_syscall_trapinfo.
1924
4cc32bec
YQ
19252016-06-28 Yao Qi <yao.qi@linaro.org>
1926
1927 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1928 Callers updated.
1929 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1930 Remove parameter sysno.
1931 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1932 sysret.
1933
782c1122
AA
19342016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1935
1936 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1937 (s390_emit_ne_goto): Likewise.
1938 (s390_emit_lt_goto): Likewise.
1939 (s390_emit_le_goto): Likewise.
1940 (s390_emit_gt_goto): Likewise.
1941 (s390_emit_ge_goto): Likewise.
1942 (s390x_emit_eq_goto): Likewise.
1943 (s390x_emit_ne_goto): Likewise.
1944 (s390x_emit_lt_goto): Likewise.
1945 (s390x_emit_le_goto): Likewise.
1946 (s390x_emit_gt_goto): Likewise.
1947 (s390x_emit_ge_goto): Likewise.
1948 (s390_emit_ops_impl): Mark variable static.
1949 (s390x_emit_ops): Likewise.
1950
2e7b624b
YQ
19512016-06-17 Yao Qi <yao.qi@linaro.org>
1952
1953 * linux-low.c (handle_extended_wait): Call
1954 uninsert_reinsert_breakpoints for the parent process. Remove
1955 reinsert breakpoints from the child process. Reinsert them to
1956 the parent process when vfork is done.
1957 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1958 (reinsert_reinsert_breakpoints): New function.
1959 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1960 (reinsert_reinsert_breakpoints): Declare.
1961
8a81c5d7
YQ
19622016-06-17 Yao Qi <yao.qi@linaro.org>
1963
1964 * linux-low.c (handle_extended_wait): If the parent is doing
1965 step-over, remove the reinsert breakpoints from the forked child.
1966
f50bf8e5
YQ
19672016-06-17 Yao Qi <yao.qi@linaro.org>
1968
1969 * linux-low.c (unsuspend_all_lwps): Declare.
1970 (linux_low_filter_event): If thread exited, call finish_step_over.
1971 If step-over is finished, unsuspend other threads.
1972
8376a3cb
YQ
19732016-06-17 Yao Qi <yao.qi@linaro.org>
1974
1975 * linux-low.c (linux_resume_one_lwp_throw): Assert
1976 has_reinsert_breakpoints returns false.
1977 * mem-break.c (delete_disabled_breakpoints): Assert
1978 bp type isn't reinsert_breakpoint.
1979
f79b145d
YQ
19802016-06-17 Yao Qi <yao.qi@linaro.org>
1981
1982 * linux-low.c (maybe_hw_step): New function.
1983 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1984 (finish_step_over): Switch current_thread to lwp temporarily,
1985 and assert has_reinsert_breakpoints returns true.
1986 (proceed_one_lwp): Call maybe_hw_step.
1987 * mem-break.c (has_reinsert_breakpoints): New function.
1988 * mem-break.h (has_reinsert_breakpoints): Declare.
1989
0ae534d2
JT
19902016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1991
1992 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1993
fcdad592
YQ
19942016-05-17 Yao Qi <yao.qi@linaro.org>
1995
1996 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1997 instead of find_inferior.
1998
9e784964
YQ
19992016-05-05 Yao Qi <yao.qi@linaro.org>
2000
2001 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2002 Initialize res to zero.
2003
cf2ebb6e
YQ
20042016-05-05 Yao Qi <yao.qi@linaro.org>
2005
2006 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2007 to uint32_t.
2008
c1aebf87
UW
20092016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2010
2011 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2012 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2013 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2014
35fd2deb 20152016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2016 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2017
2018 * tracepoint.c (write_inferior_int8): New function.
2019 (cmd_qtenable_disable): Write enable flag using
2020 write_inferior_int8.
2021
484b3c32
YQ
20222016-04-25 Yao Qi <yao.qi@linaro.org>
2023
2024 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2025 (need_step_over_p): Return zero if the LWP has pending signals
2026 can be delivered on software single step target.
2027
85ba7d86
YQ
20282016-04-25 Yao Qi <yao.qi@linaro.org>
2029
2030 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2031 return instead of error.
2032
3539aa13
YQ
20332016-04-22 Yao Qi <yao.qi@linaro.org>
2034
2035 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2036 to 23.
2037
5b061e98
YQ
20382016-04-22 Yao Qi <yao.qi@linaro.org>
2039
2040 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2041 signal when stepping over breakpoint with software single
2042 step.
2043
3451269c
PA
20442016-04-21 Pedro Alves <palves@redhat.com>
2045
2046 * linux-s390-low.c (s390_collect_ptrace_register)
2047 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2048 add casts.
2049 (s390_check_regset): Use void * instead of gdb_byte *.
2050
a2358508
PA
20512016-04-20 Pedro Alves <palves@redhat.com>
2052
2053 * configure: Renegerate.
2054
6885166d
YQ
20552016-04-20 Yao Qi <yao.qi@linaro.org>
2056
2057 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2058 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2059 number 16.
2060 (arm_store_gregset): Likewise.
2061
2b863f51
WT
20622016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2063
2064 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2065 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2066 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2067 (amd64-avx-mpx-linux.c): New rules.
2068 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2069 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2070 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2071 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2072 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2073 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2074 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2075 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2076 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2077 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2078 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2079 * linux-x86-low.c (x86_linux_read_description): Add case for
2080 X86_XSTATE_AVX_MPX_MASK.
2081 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2082 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2083 init_registers_i386_avx_mpx_linux.
2084 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2085 (initialize_low_tracepoint): Call
2086 init_registers_i386_avx_mpx_linux.
2087 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2088 (initialize_low_tracepoint): Call
2089 init_registers_amd64_avx_mpx_linux.
2090 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2091 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2092 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2093 declarations.
2094
9b30624b
PA
20952016-04-18 Pedro Alves <palves@redhat.com>
2096
2097 * configure: Regenerate.
2098
45e3745e
AT
20992016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2100
2101 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2102 (aarch64_emit_sub): Likewise.
2103
2afc13ff
PA
21042016-04-12 Pedro Alves <palves@redhat.com>
2105
2106 * utils.c (prepare_to_throw_exception): Delete.
2107
6e774b13
SM
21082016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2109
2110 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2111
4dca19f8
MK
21122016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2113
2114 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2115
d0a9981f
MK
21162016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2117
2118 * linux-aarch64-ipa.c: Add <elf.h> include.
2119 * linux-ppc-ipa.c: Add <elf.h> include.
2120 * linux-s390-ipa.c: Add <elf.h> include.
2121
252db07e
MK
21222016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2123
2124 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2125 (get_raw_reg_ptr): Likewise.
2126 (get_trace_state_variable_value_ptr): Likewise.
2127 (set_trace_state_variable_value_ptr): Likewise.
2128 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2129 char *.
2130
14e2b6d9
MK
21312016-03-31 Wei-cheng Wang <cole945@gmail.com>
2132 Marcin Kościelnicki <koriakin@0x04.net>
2133
2134 PR/17221
2135 * linux-ppc-low.c (emit_insns): New function.
2136 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2137 (ppc_emit_prologue): New function.
2138 (ppc_emit_epilogue): New function.
2139 (ppc_emit_add): New function.
2140 (ppc_emit_sub): New function.
2141 (ppc_emit_mul): New function.
2142 (ppc_emit_lsh): New function.
2143 (ppc_emit_rsh_signed): New function.
2144 (ppc_emit_rsh_unsigned): New function.
2145 (ppc_emit_ext): New function.
2146 (ppc_emit_zero_ext): New function.
2147 (ppc_emit_log_not): New function.
2148 (ppc_emit_bit_and): New function.
2149 (ppc_emit_bit_or): New function.
2150 (ppc_emit_bit_xor): New function.
2151 (ppc_emit_bit_not): New function.
2152 (ppc_emit_equal): New function.
2153 (ppc_emit_less_signed): New function.
2154 (ppc_emit_less_unsigned): New function.
2155 (ppc_emit_ref): New function.
2156 (ppc_emit_const): New function.
2157 (ppc_emit_reg): New function.
2158 (ppc_emit_pop): New function.
2159 (ppc_emit_stack_flush): New function.
2160 (ppc_emit_swap): New function.
2161 (ppc_emit_stack_adjust): New function.
2162 (ppc_emit_call): New function.
2163 (ppc_emit_int_call_1): New function.
2164 (ppc_emit_void_call_2): New function.
2165 (ppc_emit_if_goto): New function.
2166 (ppc_emit_goto): New function.
2167 (ppc_emit_eq_goto): New function.
2168 (ppc_emit_ne_goto): New function.
2169 (ppc_emit_lt_goto): New function.
2170 (ppc_emit_le_goto): New function.
2171 (ppc_emit_gt_goto): New function.
2172 (ppc_emit_ge_goto): New function.
2173 (ppc_write_goto_address): New function.
2174 (ppc_emit_ops_impl): New static variable.
2175 (ppc64v1_emit_prologue): New function.
2176 (ppc64v2_emit_prologue): New function.
2177 (ppc64_emit_epilogue): New function.
2178 (ppc64_emit_add): New function.
2179 (ppc64_emit_sub): New function.
2180 (ppc64_emit_mul): New function.
2181 (ppc64_emit_lsh): New function.
2182 (ppc64_emit_rsh_signed): New function.
2183 (ppc64_emit_rsh_unsigned): New function.
2184 (ppc64_emit_ext): New function.
2185 (ppc64_emit_zero_ext): New function.
2186 (ppc64_emit_log_not): New function.
2187 (ppc64_emit_bit_and): New function.
2188 (ppc64_emit_bit_or): New function.
2189 (ppc64_emit_bit_xor): New function.
2190 (ppc64_emit_bit_not): New function.
2191 (ppc64_emit_equal): New function.
2192 (ppc64_emit_less_signed): New function.
2193 (ppc64_emit_less_unsigned): New function.
2194 (ppc64_emit_ref): New function.
2195 (ppc64_emit_const): New function.
2196 (ppc64v1_emit_reg): New function.
2197 (ppc64v2_emit_reg): New function.
2198 (ppc64_emit_pop): New function.
2199 (ppc64_emit_stack_flush): New function.
2200 (ppc64_emit_swap): New function.
2201 (ppc64v1_emit_call): New function.
2202 (ppc64v2_emit_call): New function.
2203 (ppc64v1_emit_int_call_1): New function.
2204 (ppc64v2_emit_int_call_1): New function.
2205 (ppc64v1_emit_void_call_2): New function.
2206 (ppc64v2_emit_void_call_2): New function.
2207 (ppc64_emit_if_goto): New function.
2208 (ppc64_emit_eq_goto): New function.
2209 (ppc64_emit_ne_goto): New function.
2210 (ppc64_emit_lt_goto): New function.
2211 (ppc64_emit_le_goto): New function.
2212 (ppc64_emit_gt_goto): New function.
2213 (ppc64_emit_ge_goto): New function.
2214 (ppc64v1_emit_ops_impl): New static variable.
2215 (ppc64v2_emit_ops_impl): New static variable.
2216 (ppc_emit_ops): New function.
2217 (linux_low_target): Wire in ppc_emit_ops.
2218
a2174ba4
MK
22192016-03-31 Wei-cheng Wang <cole945@gmail.com>
2220 Marcin Kościelnicki <koriakin@0x04.net>
2221
2222 PR/17221
2223 * Makefile.in: Add powerpc-*-ipa.o
2224 * configure.srv: Add ipa_obj for powerpc*-linux.
2225 * linux-ppc-ipa.c: New file.
2226 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2227 includes.
2228 (PPC_FIELD): New macro.
2229 (PPC_SEXT): New macro.
2230 (PPC_OP6): New macro.
2231 (PPC_BO): New macro.
2232 (PPC_LI): New macro.
2233 (PPC_BD): New macro.
2234 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2235 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2236 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2237 (ppc_get_thread_area): New function.
2238 (is_elfv2_inferior): New function.
2239 (gen_ds_form): New function.
2240 (GEN_STD): New macro.
2241 (GEN_STDU): New macro.
2242 (GEN_LD): New macro.
2243 (GEN_LDU): New macro.
2244 (gen_d_form): New function.
2245 (GEN_ADDI): New macro.
2246 (GEN_ADDIS): New macro.
2247 (GEN_LI): New macro.
2248 (GEN_LIS): New macro.
2249 (GEN_ORI): New macro.
2250 (GEN_ORIS): New macro.
2251 (GEN_LWZ): New macro.
2252 (GEN_STW): New macro.
2253 (GEN_STWU): New macro.
2254 (gen_xfx_form): New function.
2255 (GEN_MFSPR): New macro.
2256 (GEN_MTSPR): New macro.
2257 (GEN_MFCR): New macro.
2258 (GEN_MTCR): New macro.
2259 (GEN_SYNC): New macro.
2260 (GEN_LWSYNC): New macro.
2261 (gen_x_form): New function.
2262 (GEN_OR): New macro.
2263 (GEN_MR): New macro.
2264 (GEN_LWARX): New macro.
2265 (GEN_STWCX): New macro.
2266 (GEN_CMPW): New macro.
2267 (gen_md_form): New function.
2268 (GEN_RLDICL): New macro.
2269 (GEN_RLDICR): New macro.
2270 (gen_i_form): New function.
2271 (GEN_B): New macro.
2272 (GEN_BL): New macro.
2273 (gen_b_form): New function.
2274 (GEN_BNE): New macro.
2275 (GEN_LOAD): New macro.
2276 (GEN_STORE): New macro.
2277 (gen_limm): New function.
2278 (gen_atomic_xchg): New function.
2279 (gen_call): New function.
2280 (ppc_relocate_instruction): New function.
2281 (ppc_install_fast_tracepoint_jump_pad): New function.
2282 (ppc_get_min_fast_tracepoint_insn_len): New function.
2283 (ppc_get_ipa_tdesc_idx): New function.
2284 (the_low_target): Wire in the new functions.
2285 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2286 tdescs.
2287 * linux-ppc-tdesc.h: New file.
2288
a13c4696
MK
22892016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2290
2291 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2292 (alloc_jump_pad_buffer): New function.
2293 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2294 (alloc_jump_pad_buffer): New function.
2295 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2296 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2297 (alloc_jump_pad_buffer): New function.
2298 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2299 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2300 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2301 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2302
1cda1512
MK
23032016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2304
2305 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2306 * linux-amd64-ipa.c: Likewise.
2307 * linux-i386-ipa.c: Likewise.
2308 * linux-s390-ipa.c: Likewise.
2309 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2310 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2311 set_trace_state_variable_value_ptr.
2312 (struct ipa_sym_addresses): Likewise.
2313 (symbol_list): Likewise.
2314 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2315 accessing gdb_collect directly.
2316 (gdb_collect_ptr_type): New typedef.
2317 (get_raw_reg_ptr_type): New typedef.
2318 (get_trace_state_variable_value_ptr_type): New typedef.
2319 (set_trace_state_variable_value_ptr_type): New typedef.
2320 (gdb_collect_ptr): New global.
2321 (get_raw_reg_ptr): New global.
2322 (get_trace_state_variable_value_ptr): New global.
2323 (set_trace_state_variable_value_ptr): New global.
2324 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2325 accessing get_raw_reg directly.
2326 (get_get_tsv_func_addr): Likewise for
2327 get_trace_state_variable_value_ptr.
2328 (get_set_tsv_func_addr): Likewise for
2329 set_trace_state_variable_value_ptr.
2330 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2331
72fb5488
SM
23322016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2333
2334 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2335
28170b88
MK
23362016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2337
2338 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2339 packets.
2340 (relocate_instruction): Remove own_buf.
2341 * server.c (own_buf): Make global.
2342 (handle_v_requests): Make global.
2343 * server.h (own_buf): New declaration.
2344 (handle_v_requests): New prototype.
2345
f39e8743
MK
23462016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2347
2348 PR 18377
2349 * linux-s390-low.c (add_insns): New function.
2350 (s390_emit_prologue): New function.
2351 (s390_emit_epilogue): New function.
2352 (s390_emit_add): New function.
2353 (s390_emit_sub): New function.
2354 (s390_emit_mul): New function.
2355 (s390_emit_lsh): New function.
2356 (s390_emit_rsh_signed): New function.
2357 (s390_emit_rsh_unsigned): New function.
2358 (s390_emit_ext): New function.
2359 (s390_emit_log_not): New function.
2360 (s390_emit_bit_and): New function.
2361 (s390_emit_bit_or): New function.
2362 (s390_emit_bit_xor): New function.
2363 (s390_emit_bit_not): New function.
2364 (s390_emit_equal): New function.
2365 (s390_emit_less_signed): New function.
2366 (s390_emit_less_unsigned): New function.
2367 (s390_emit_ref): New function.
2368 (s390_emit_if_goto): New function.
2369 (s390_emit_goto): New function.
2370 (s390_write_goto_address): New function.
2371 (s390_emit_litpool): New function.
2372 (s390_emit_const): New function.
2373 (s390_emit_call): New function.
2374 (s390_emit_reg): New function.
2375 (s390_emit_pop): New function.
2376 (s390_emit_stack_flush): New function.
2377 (s390_emit_zero_ext): New function.
2378 (s390_emit_swap): New function.
2379 (s390_emit_stack_adjust): New function.
2380 (s390_emit_set_r2): New function.
2381 (s390_emit_int_call_1): New function.
2382 (s390_emit_void_call_2): New function.
2383 (s390_emit_eq_goto): New function.
2384 (s390_emit_ne_goto): New function.
2385 (s390_emit_lt_goto): New function.
2386 (s390_emit_le_goto): New function.
2387 (s390_emit_gt_goto): New function.
2388 (s390_emit_ge_goto): New function.
2389 (s390x_emit_prologue): New function.
2390 (s390x_emit_epilogue): New function.
2391 (s390x_emit_add): New function.
2392 (s390x_emit_sub): New function.
2393 (s390x_emit_mul): New function.
2394 (s390x_emit_lsh): New function.
2395 (s390x_emit_rsh_signed): New function.
2396 (s390x_emit_rsh_unsigned): New function.
2397 (s390x_emit_ext): New function.
2398 (s390x_emit_log_not): New function.
2399 (s390x_emit_bit_and): New function.
2400 (s390x_emit_bit_or): New function.
2401 (s390x_emit_bit_xor): New function.
2402 (s390x_emit_bit_not): New function.
2403 (s390x_emit_equal): New function.
2404 (s390x_emit_less_signed): New function.
2405 (s390x_emit_less_unsigned): New function.
2406 (s390x_emit_ref): New function.
2407 (s390x_emit_if_goto): New function.
2408 (s390x_emit_const): New function.
2409 (s390x_emit_call): New function.
2410 (s390x_emit_reg): New function.
2411 (s390x_emit_pop): New function.
2412 (s390x_emit_stack_flush): New function.
2413 (s390x_emit_zero_ext): New function.
2414 (s390x_emit_swap): New function.
2415 (s390x_emit_stack_adjust): New function.
2416 (s390x_emit_int_call_1): New function.
2417 (s390x_emit_void_call_2): New function.
2418 (s390x_emit_eq_goto): New function.
2419 (s390x_emit_ne_goto): New function.
2420 (s390x_emit_lt_goto): New function.
2421 (s390x_emit_le_goto): New function.
2422 (s390x_emit_gt_goto): New function.
2423 (s390x_emit_ge_goto): New function.
2424 (s390_emit_ops): New function.
2425 (struct linux_target_ops): Fill in emit_ops hook.
2426
abd9baf9
MK
24272016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2428
2429 PR 18377
2430 * Makefile.in: Add s390 IPA files.
2431 * configure.srv: Build IPA for s390.
2432 * linux-s390-ipa.c: New file.
2433 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2434 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2435 (tdesc_s390_linux32): Likewise.
2436 (init_registers_s390_linux32v1): Likewise.
2437 (tdesc_s390_linux32v1): Likewise.
2438 (init_registers_s390_linux32v2): Likewise.
2439 (tdesc_s390_linux32v2): Likewise.
2440 (init_registers_s390_linux64): Likewise.
2441 (tdesc_s390_linux64): Likewise.
2442 (init_registers_s390_linux64v1): Likewise.
2443 (tdesc_s390_linux64v1): Likewise.
2444 (init_registers_s390_linux64v2): Likewise.
2445 (tdesc_s390_linux64v2): Likewise.
2446 (init_registers_s390_te_linux64): Likewise.
2447 (tdesc_s390_te_linux64): Likewise.
2448 (init_registers_s390_vx_linux64): Likewise.
2449 (tdesc_s390_vx_linux64): Likewise.
2450 (init_registers_s390_tevx_linux64): Likewise.
2451 (tdesc_s390_tevx_linux64): Likewise.
2452 (init_registers_s390x_linux64): Likewise.
2453 (tdesc_s390x_linux64): Likewise.
2454 (init_registers_s390x_linux64v1): Likewise.
2455 (tdesc_s390x_linux64v1): Likewise.
2456 (init_registers_s390x_linux64v2): Likewise.
2457 (tdesc_s390x_linux64v2): Likewise.
2458 (init_registers_s390x_te_linux64): Likewise.
2459 (tdesc_s390x_te_linux64): Likewise.
2460 (init_registers_s390x_vx_linux64): Likewise.
2461 (tdesc_s390x_vx_linux64): Likewise.
2462 (init_registers_s390x_tevx_linux64): Likewise.
2463 (tdesc_s390x_tevx_linux64): Likewise.
2464 (have_hwcap_s390_vx): New static variable.
2465 (s390_arch_setup): Fill have_hwcap_s390_vx.
2466 (s390_get_thread_area): New function.
2467 (s390_ft_entry_gpr_esa): New const.
2468 (s390_ft_entry_gpr_zarch): New const.
2469 (s390_ft_entry_misc): New const.
2470 (s390_ft_entry_fr): New const.
2471 (s390_ft_entry_vr): New const.
2472 (s390_ft_main_31): New const.
2473 (s390_ft_main_64): New const.
2474 (s390_ft_exit_fr): New const.
2475 (s390_ft_exit_vr): New const.
2476 (s390_ft_exit_misc): New const.
2477 (s390_ft_exit_gpr_esa): New const.
2478 (s390_ft_exit_gpr_zarch): New const.
2479 (append_insns): New function.
2480 (s390_relocate_instruction): New function.
2481 (s390_install_fast_tracepoint_jump_pad): New function.
2482 (s390_get_min_fast_tracepoint_insn_len): New function.
2483 (s390_get_ipa_tdesc_idx): New function.
2484 (struct linux_target_ops): Wire in the above functions.
2485 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2486 * linux-s390-tdesc.h: New file.
2487
a4105d04
MK
24882016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2489
2490 * linux-s390-low.c (s390_supports_tracepoints): New function.
2491 (struct linux_target_ops): Fill supports_tracepoints hook.
2492
35ac8b3e
YQ
24932016-03-18 Yao Qi <yao.qi@linaro.org>
2494
2495 * linux-low.c (lwp_signal_can_be_delivered): New function.
2496 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2497
94610ec4
YQ
24982016-03-18 Yao Qi <yao.qi@linaro.org>
2499
2500 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2501 0 if signal is enqueued. Remove 'signal' from one debugging
2502 message. Move one debugging message to some lines below.
2503 Remove code setting 'signal' to 0.
2504
80aea927
YQ
25052016-03-18 Yao Qi <yao.qi@linaro.org>
2506
2507 * linux-low.c (linux_low_filter_event): Remove redundant
2508 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2509
b04fd3be
MK
25102016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2511
2512 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2513 (struct linux_target_ops): Wire in the above.
2514
c40c8d4b
YQ
25152016-03-03 Yao Qi <yao.qi@linaro.org>
2516
2517 * linux-low.c: Update comments to start_step_over.
2518
0f8288ae
YQ
25192016-03-03 Yao Qi <yao.qi@linaro.org>
2520
2521 PR server/19736
2522 * linux-low.c (handle_extended_wait): Set child suspended
2523 if event_lwp->bp_reinsert isn't zero.
2524
fdbd04a8
YQ
25252016-03-02 Yao Qi <yao.qi@linaro.org>
2526
2527 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2528 enqueue_pending_signal.
2529
6896a8fa
MK
25302016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2531
2532 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2533 is actually loaded.
2534
ab503087
MK
25352016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2536
2537 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2538 (s390_regmap_3264) [!__s390x__]: New global.
2539 (s390_collect_ptrace_register): Skip map entries containing -1.
2540 (s390_supply_ptrace_register): Ditto.
2541 (s390_fill_gprs_high): New function.
2542 (s390_store_gprs_high): New function.
2543 (s390_regsets): Add NT_S390_HIGH_GPRS.
2544 (s390_get_hwcap): Enable on 31-bit.
2545 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2546 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2547 Detect NT_S390_HIGH_GPRS.
2548 (s390_usrregs_info_3264): Enable on 31-bit.
2549 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2550 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2551
ae91f625
MK
25522016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2553
2554 PR gdb/13808
2555 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2556 * configure.srv: Ditto.
2557 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2558 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2559 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2560 (init_registers_amd64_linux): Remove prototype.
2561 (tdesc_amd64_linux): Remove declaration.
2562 (get_ipa_tdesc): New function.
2563 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2564 initialize remaining tdescs.
2565 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2566 (init_registers_i386_linux): Remove prototype.
2567 (tdesc_i386_linux): Remove declaration.
2568 (get_ipa_tdesc): New function.
2569 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2570 initialize remaining tdescs.
2571 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2572 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2573 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2574 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2575 (x86_get_ipa_tdesc_idx): New function.
2576 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2577 * linux-x86-tdesc.h: New file.
2578 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2579 (target_get_ipa_tdesc_idx): New macro.
2580 * tracepoint.c (ipa_tdesc_idx): New macro.
2581 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2582 (symbol_list): Add ipa_tdesc_idx.
2583 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2584 (ipa_tdesc): Remove.
2585 (ipa_tdesc_idx): New variable.
2586 (get_context_regcache): Use get_ipa_tdesc.
2587 (gdb_collect): Ditto.
2588 (gdb_probe): Ditto.
2589 * tracepoint.h (get_ipa_tdesc): New prototype.
2590 (ipa_tdesc): Remove.
2591
e7ad2f14
PA
25922016-02-24 Pedro Alves <palves@redhat.com>
2593
2594 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2595 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2596 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2597 Factor out common code between the USE_SIGTRAP_SIGINFO and
2598 !USE_SIGTRAP_SIGINFO blocks.
2599 (linux_low_filter_event): Call save_stop_reason instead of
2600 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2601 Update comments.
2602 (linux_wait_1): Update comments.
2603
657f9cde
WW
26042016-02-24 Wei-cheng Wang <cole945@gmail.com>
2605
2606 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2607 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2608 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2609 ppc_insert_point, ppc_remove_point.
2610
b00b61e1
MK
26112016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2612
2613 * linux-s390-low.c (s390_supports_z_point_type): New function.
2614 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2615
553cb527
YQ
26162016-02-16 Yao Qi <yao.qi@linaro.org>
2617
2618 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2619 PC. Get pc from regcache_read_pc.
2620
a5652c21
YQ
26212016-02-12 Yao Qi <yao.qi@linaro.org>
2622
2623 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2624 or linux_get_pc_32bit.
2625 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2626
ed443b61
YQ
26272016-02-12 Yao Qi <yao.qi@linaro.org>
2628
2629 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2630 arm_linux_get_next_pcs_fixup.
2631
020ecd38
MK
26322016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2633
2634 * tracepoint.c (x_tracepoint_action_download): Change
2635 write_inferior_data_ptr to write_inferior_data_pointer.
2636 (cmd_qtstart): Likewise.
2637 (write_inferior_data_ptr): Remove.
2638 (download_agent_expr): Change write_inferior_data_ptr to
2639 write_inferior_data_pointer.
2640 (download_tracepoint_1): Likewise.
2641 (download_tracepoint): Likewise.
2642 (download_trace_state_variables): Likewise.
2643
7cae9051
WW
26442016-02-11 Wei-cheng Wang <cole945@gmail.com>
2645 Marcin Kościelnicki <koriakin@0x04.net>
2646
2647 * tracepoint.c (struct tracepoint_action_ops): Remove.
2648 (struct tracepoint_action): Remove ops.
2649 (m_tracepoint_action_download, r_tracepoint_action_download)
2650 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2651 size and offset accordingly.
2652 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2653 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2654 (tracepoint_action_send, tracepoint_action_download): New functions.
2655 Helpers for trace action handlers.
2656 (add_tracepoint_action): Remove setup actions ops.
2657 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2658
9f6a71b4
YQ
26592016-02-10 Yao Qi <yao.qi@linaro.org>
2660
2661 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2662
1e94266c
SM
26632016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2664
2665 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2666 to AC_OUTPUT.
2667 * configure: Regenerate.
2668
8adce034
SM
26692016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2670
2671 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2672 void * to gdb_byte *.
2673 * linux-low.c (siginfo_fixup): Likewise.
2674 (linux_xfer_siginfo): Likewise.
2675 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2676 Likewise.
2677 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2678
93813b37
WT
26792016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2680
2681 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2682 to srv_tgtobj.
2683 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2684 to srv_tgtobj.
2685 * linux-x86-low.c [__x86_64__]: Include
2686 "nat/amd64-linux-siginfo.h".
2687 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2688 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2689 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2690 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2691 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2692 (cpt_si_fd, si_timerid, si_overrun): Move from
2693 nat/amd64-linux-siginfo.c.
2694 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2695
8424cc97
SM
26962016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2697
2698 * server.c (skip_to_semicolon): Remove.
2699 (process_point_options): Use strchrnul instead of
2700 skip_to_semicolon.
2701
4d18591b
YQ
27022016-01-26 Yao Qi <yao.qi@linaro.org>
2703
2704 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2705 * linux-low.c (install_software_single_step_breakpoints): Don't
2706 call regcache_read_pc.
2707 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2708 argument pc.
2709
d8020970
YQ
27102016-01-26 Yao Qi <yao.qi@linaro.org>
2711
2712 * linux-low.c (install_software_single_step_breakpoints): Call
2713 regcache_read_pc instead of get_pc.
2714
8b207339
YQ
27152016-01-26 Yao Qi <yao.qi@linaro.org>
2716
2717 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2718 (unblock_async_io): Rename to ...
2719 (block_unblock_async_io): ... it. New function.
2720 (enable_async_io): Don't install SIGIO handler. Unblock it
2721 instead.
2722 (disable_async_io): Don't ignore SIGIO. Block it instead.
2723 (initialize_async_io): Install SIGIO handler. Don't call
2724 unblock_async_io.
2725
18879fef
YQ
27262016-01-26 Yao Qi <yao.qi@linaro.org>
2727
2728 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2729 first character is '\003', call *the_target->request_interrupt.
2730
a0f8e08a
YQ
27312016-01-25 Yao Qi <yao.qi@linaro.org>
2732
2733 * remote-utils.c (new_thread_notify): Remove.
2734 (dead_thread_notify): Likewise.
2735 * remote-utils.h (new_thread_notify): Remove declaration.
2736 (dead_thread_notify): Likewise.
2737
cc5fd9ab
MK
27382016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2739
2740 * gdb.trace/pending.exp: Fix expected message on continue.
2741
99e8eb11
MK
27422016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2743
2744 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2745 it works properly on big-endian machines where sizeof (CORE_ADDR)
2746 != sizeof (void *).
2747
a994041d
PA
27482016-01-21 Pedro Alves <palves@redhat.com>
2749
2750 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2751 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2752 * configure: Regenerate.
2753
f7a6a40d
YQ
27542016-01-21 Yao Qi <yao.qi@linaro.org>
2755
2756 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2757 is_thumb and set it according to CPSR saved on the stack.
2758 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2759 arm_sigreturn_next_pc.
2760
6f69e520
YQ
27612016-01-18 Yao Qi <yao.qi@linaro.org>
2762
2763 * linux-low.c (linux_set_pc_64bit): New function.
2764 (linux_get_pc_64bit): New function.
2765 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2766 Declare.
2767 * linux-sparc-low.c (debug_threads): Remove declaration.
2768 (sparc_get_pc): Remove.
2769 (the_low_target): Use linux_get_pc_64bit instead of
2770 sparc_get_pc.
2771 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2772 (the_low_target): Use linux_get_pc_64bit and
2773 linux_set_pc_64bit.
2774
276d4552
YQ
27752016-01-18 Yao Qi <yao.qi@linaro.org>
2776
2777 * linux-arm-low.c (debug_threads): Remove declaration.
2778 (arm_get_pc, arm_set_pc): Remove.
2779 (the_low_target): Use linux_get_pc_32bit and
2780 linux_set_pc_32bit.
2781 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2782 (the_low_target): Use linux_get_pc_32bit and
2783 linux_set_pc_32bit.
2784 * linux-cris-low.c (debug_threads): Remove declaration.
2785 (cris_get_pc, cris_set_pc,): Remove.
2786 (the_low_target): Use linux_get_pc_32bit and
2787 linux_set_pc_32bit.
2788 * linux-crisv32-low.c (debug_threads): Remove declaration.
2789 (cris_get_pc, cris_set_pc): Remove.
2790 (the_low_target): Use linux_get_pc_32bit and
2791 linux_set_pc_32bit.
2792 * linux-low.c: Include inttypes.h.
2793 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2794 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2795 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2796 (the_low_target): Use linux_get_pc_32bit and
2797 linux_set_pc_32bit.
2798 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2799 (the_low_target): Use linux_get_pc_32bit and
2800 linux_set_pc_32bit.
2801 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2802 (the_low_target): Use linux_get_pc_32bit and
2803 linux_set_pc_32bit.
2804 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2805 (the_low_target): Use linux_get_pc_32bit and
2806 linux_set_pc_32bit.
2807 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2808 (the_low_target): Use linux_get_pc_32bit and
2809 linux_set_pc_32bit.
2810
eb0edac8
GB
28112016-01-18 Gary Benson <gbenson@redhat.com>
2812
2813 * configure.ac (AC_FUNC_FORK): New check.
2814 * config.in: Regenerate.
2815 * configure: Likewise.
2816
1b451dda
YQ
28172016-01-14 Yao Qi <yao.qi@linaro.org>
2818
2819 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2820 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2821 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2822 arm_get_next_pcs_ctor.
2823
82075af2
JS
28242016-01-12 Josh Stone <jistone@redhat.com>
2825 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2826
2827 * inferiors.h: Include "gdb_vecs.h".
2828 (struct process_info): Add syscalls_to_catch.
2829 * inferiors.c (remove_process): Free syscalls_to_catch.
2830 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2831 syscall_return stops.
2832 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2833 * server.c (handle_general_set): Handle QCatchSyscalls.
2834 (handle_query): Report support for QCatchSyscalls.
2835 * target.h (struct target_ops): Add supports_catch_syscall.
2836 (target_supports_catch_syscall): New macro.
2837 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2838 (struct lwp_info): Add syscall_state.
2839 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2840 Maintain syscall_state and syscalls_to_catch across exec.
2841 (get_syscall_trapinfo): New function, proxy to the_low_target.
2842 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2843 (linux_low_filter_event): Toggle syscall_state entry/return for
2844 syscall traps, and set it ignored for all others.
2845 (gdb_catching_syscalls_p): New function.
2846 (gdb_catch_this_syscall_p): New function.
2847 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2848 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2849 (linux_supports_catch_syscall): New function.
2850 (linux_target_ops): Install it.
2851 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2852 (the_low_target): Install it.
2853
8f13a3ce
MF
28542016-01-12 Mike Frysinger <vapier@gentoo.org>
2855
2856 * acinclude.m4: Include new ../warning.m4 file.
2857 * configure: Regenerated.
2858 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2859
5b3da067
MF
28602016-01-12 Mike Frysinger <vapier@gentoo.org>
2861
2862 * ax.c (is_goto_target): Mark static.
2863 * linux-low.c (register_addr): Likewise.
2864 (linux_fetch_registers, linux_store_registers): Likewise.
2865 * mem-break.c (any_persistent_commands): Fix old prototype.
2866 (add_commands_to_breakpoint): Mark static.
2867 * regcache.c (find_register_by_name): Delete unused func.
2868 * remote-utils.c (hex_or_minus_one): Mark static.
2869 * server.c (monitor_show_help): Mark static.
2870 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2871 handle_v_requests): Likewise.
2872
bc504a31
PA
28732016-01-12 Pedro Alves <palves@redhat.com>
2874
2875 Remove use of the registered trademark symbol throughout.
2876
5a0dd67a
YQ
28772016-01-08 Yao Qi <yao.qi@linaro.org>
2878
2879 * remote-utils.c (getpkt): If c is '\003', call target hook
2880 request_interrupt.
2881
b2ca446f
YQ
28822016-01-06 Yao Qi <yao.qi@linaro.org>
2883
2884 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2885 linux-aarch32-low.c.
2886 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2887 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2888 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2889 (thumb2_breakpoint): Declare.
2890 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2891 linux-aarch32-low.h.
2892 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2893 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2894 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2895
edd88788
JB
28962016-01-01 Joel Brobecker <brobecker@adacore.com>
2897
2898 * gdbreplay.c (gdbreplay_version): Change copyright year in
2899 version message.
2900 * server.c (gdbserver_version): Likewise.
2901
65da7f14
PP
29022015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2903
2904 * server.c (crc32_table): Delete.
2905 (crc32): Use libiberty's xcrc32 function.
2906
4abd5ed2
JB
29072015-12-22 Joel Brobecker <brobecker@adacore.com>
2908
2909 * lynx-low.c (lynx_delete_thread_callback): New function.
2910 (lynx_mourn): Properly delete our process and all of its
2911 threads. Remove call to clear_inferiors.
2912
0e50fe5c
JB
29132015-12-22 Joel Brobecker <brobecker@adacore.com>
2914
2915 * target.c (thread_search_callback): Add check that
2916 the thread_stopped target callback is not NULL before
2917 calling it.
2918
35adc03f
YQ
29192015-12-21 Yao Qi <yao.qi@linaro.org>
2920
2921 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2922 arm breakpoint.
2923
bd2b2909
AT
29242015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2925
2926 * server.c (handle_query): Call target_supports_software_single_step.
2927
7fe5e27e
AT
29282015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2929
2930 * linux-low.c (single_step): New function.
2931 (linux_resume_one_lwp_throw): Call single_step.
2932 (start_step_over): Likewise.
2933
d9311bfa
AT
29342015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2935
2936 * Makefile.in (SFILES): Append arch/arm-linux.c,
2937 arch/arm-get-next-pcs.c.
2938 (arm-linux.o): New rule.
2939 (arm-get-next-pcs.o): New rule.
2940 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2941 arm-linux.o.
2942 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2943 to linux-aarch32-low.c.
2944 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2945 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2946 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2947 (thumb2_breakpoint_len): Likewise.
2948 (arm_is_thumb_mode): Make non-static.
2949 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2950 from linux-aarch32-low.c.
2951 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2952 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2953 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2954 (thumb2_breakpoint_len): Likewise.
2955 (arm_is_thumb_mode): New declaration.
2956 * linux-arm-low.c: Include arch/arm-linux.h
2957 aarch/arm-get-next-pcs.h, sys/syscall.h.
2958 (get_next_pcs_ops): New struct.
2959 (get_next_pcs_addr_bits_remove): New function.
2960 (get_next_pcs_is_thumb): New function.
2961 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2962 (arm_sigreturn_next_pc): Likewise.
2963 (get_next_pcs_syscall_next_pc): Likewise.
2964 (arm_gdbserver_get_next_pcs): Likewise.
2965 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2966 Initialize.
2967 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2968 * server.h: Include gdb_vecs.h.
2969
68ce2059
AT
29702015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2971
2972 * Makefile.in (SFILES): Append common/common-regcache.c.
2973 (OBS): Append common-regcache.o.
2974 (common-regcache.o): New rule.
2975 * regcache.c (init_register_cache): Initialize cache to
2976 REG_UNAVAILABLE.
2977 (regcache_raw_read_unsigned): New function.
2978 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2979 register_status enum.
2980
fa5308bd
AT
29812015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2982
2983 * linux-aarch64-low.c (the_low_targets): Rename
2984 breakpoint_reinsert_addr to get_next_pcs.
2985 * linux-arm-low.c (the_low_targets): Likewise.
2986 * linux-bfin-low.c (the_low_targets): Likewise.
2987 * linux-cris-low.c (the_low_targets): Likewise.
2988 * linux-crisv32-low.c (the_low_targets): Likewise.
2989 * linux-low.c (can_software_single_step): Likewise.
2990 (install_software_single_step_breakpoints): New function.
2991 (start_step_over): Use install_software_single_step_breakpoints.
2992 * linux-low.h: New CORE_ADDR vector.
2993 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2994 get_next_pcs.
2995 * linux-mips-low.c (the_low_targets): Likewise.
2996 * linux-nios2-low.c (the_low_targets): Likewise.
2997 * linux-sparc-low.c (the_low_targets): Likewise.
2998
4a6ed09b
PA
29992015-12-17 Pedro Alves <palves@redhat.com>
3000
3001 * linux-low.c (linux_kill_one_lwp): Remove references to
3002 LinuxThreads.
3003 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3004 to 'kill'.
3005 (linux_init_signals): Delete.
3006 (initialize_low): Adjust.
3007 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3008
7544db95
PA
30092015-12-16 Pedro Alves <palves@redhat.com>
3010
3011 * configure.ac (compiler warning flags): When testing a
3012 -Wno-foo option, check whether -Wfoo works instead.
3013 * configure: Regenerate.
3014
8020350c
DB
30152015-12-11 Don Breazeal <donb@codesourcery.com>
3016
3017 * server.c (process_serial_event): Don't exit from gdbserver
3018 in remote mode if there are still active inferiors.
3019
db91f502
YQ
30202015-12-11 Yao Qi <yao.qi@linaro.org>
3021
3022 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3023 arm_breakpoint_at if the process is 32-bit.
3024
b37a6290
YQ
30252015-12-11 Yao Qi <yao.qi@linaro.org>
3026
3027 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3028 arm breakpoint.
3029
17b1509a
YQ
30302015-12-07 Yao Qi <yao.qi@linaro.org>
3031
3032 * configure.srv: Append arm.o to srv_tgtobj for
3033 aarch64*-*-linux* target.
3034 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3035 from linux-arm-low.c.
3036 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3037 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3038 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3039 (thumb2_breakpoint_len): Likewise.
3040 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3041 (arm_breakpoint_kinds): Likewise.
3042 (arm_breakpoint_kind_from_pc): Likewise.
3043 (arm_sw_breakpoint_from_kind): Likewise.
3044 (arm_breakpoint_kind_from_current_state): Likewise.
3045 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3046 (arm_sw_breakpoint_from_kind): Declare.
3047 (arm_breakpoint_kind_from_current_state): Declare.
3048 (arm_breakpoint_at): Declare.
3049 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3050 arm_sw_breakpoint_from_kind if process is 32-bit.
3051 (aarch64_breakpoint_kind_from_pc): New function.
3052 (aarch64_breakpoint_kind_from_current_state): New function.
3053 (the_low_target): Initialize fields breakpoint_kind_from_pc
3054 and breakpoint_kind_from_current_state.
3055 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3056 linux-aarch32-low.c.
3057 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3058 (arm_breakpoint, arm_breakpoint_len): Likewise.
3059 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3060 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3061 (arm_is_thumb_mode): Likewise.
3062 (arm_breakpoint_at): Likewise.
3063 (arm_breakpoint_kind_from_pc): Likewise.
3064 (arm_sw_breakpoint_from_kind): Likewise.
3065 (arm_breakpoint_kind_from_current_state): Likewise.
3066
3067 Revert:
3068 2015-08-04 Yao Qi <yao.qi@linaro.org>
3069
3070 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3071 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3072 * server.c (extended_protocol): Remove "static".
3073 * server.h (extended_protocol): Declare it.
3074
ece66d65
JS
30752015-12-04 Josh Stone <jistone@redhat.com>
3076
3077 * target.h (struct target_ops) <arch_setup>: Rename to ...
3078 (struct target_ops) <post_create_inferior>: ... this.
3079 (target_arch_setup): Rename to ...
3080 (target_post_create_inferior): ... this, calling post_create_inferior.
3081 * server.c (start_inferior): Update target_arch_setup calls to
3082 target_post_create_inferior.
3083 * linux-low.c (linux_low_ptrace_options): Forward declare.
3084 (linux_arch_setup): Update its comment for general use.
3085 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3086 (struct linux_target_ops): Use linux_post_create_inferior.
3087 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3088 to post_create_inferior.
3089 * nto-low.c (struct nto_target_ops): Likewise.
3090 * spu-low.c (struct spu_target_ops): Likewise.
3091 * win32-low.c (struct win32_target_ops): Likewise.
3092
e58c48b4
AT
30932015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3094
3095 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3096
fbec8956
AT
30972015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3098
3099 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3100 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3101 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3102 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3103 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3104 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3105 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3106 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3107 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3108 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3109 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3110 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3111
9b4c5f87
AT
31122015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3113
3114 * linux-low.c (linux_look_up_symbols): Don't call
3115 linux_supports_traceclone.
3116 * linux-low.h (thread_db_init): Remove use_events argument.
3117 * thread-db.c (thread_db_use_event): Remove global variable.
3118 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3119 (struct thread_db) <td_create_bp>: Remove field.
3120 (thread_db_create_event): Remove function.
3121 (thread_db_enable_reporting): Likewise.
3122 (find_one_thread): Don't check for thread_db_use_events.
3123 (attach_thread): Likewise.
3124 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3125 (try_thread_db_load_1): Don't check for thread_db_use_events.
3126 (thread_db_init): Remove use_events argument and thread events
3127 handling.
3128 (remove_thread_event_breakpoints): Remove function.
3129 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3130
7d00775e
AT
31312015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3132
3133 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3134 New function.
3135 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3136 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3137 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3138 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3139 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3140 Initialize.
3141 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3142 New function.
3143 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3144 * linux-low.c (can_hardware_single_step): Use
3145 supports_hardware_single_step.
3146 (can_software_single_step): New function.
3147 (start_step_over): Call can_software_single_step.
3148 (linux_supports_hardware_single_step): New function.
3149 (struct target_ops) <supports_software_single_step>: Initialize.
3150 * linux-low.h (struct linux_target_ops)
3151 <supports_hardware_single_step>: Initialize.
3152 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3153 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3154 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3155 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3156 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3157 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3158 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3159 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3160 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3161 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3162 Initialize.
3163 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3164 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3165 Initialize.
3166 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3167 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3168 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3169 New function.
3170 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3171 * target.h (struct target_ops): <supports_software_single_step>:
3172 New field.
3173 (target_supports_software_single_step): New macro.
3174
2d97cd35
AT
31752015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3176
3177 * linux-low.c (linux_wait_1): Fix pc advance condition.
3178 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3179 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3180
769ef81f
AT
31812015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3182
3183 * linux-arm-low.c (arm_is_thumb_mode): New function.
3184 (arm_breakpoint_at): Use arm_is_thumb_mode.
3185 (arm_breakpoint_kind_from_current_state): New function.
3186 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3187 Initialize.
3188 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3189 (linux_breakpoint_kind_from_current_state): New function.
3190 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3191 * linux-low.h (struct linux_target_ops)
3192 <breakpoint_kind_from_current_state>: New field.
3193 * target.h (struct target_ops): Likewise.
3194 (target_breakpoint_kind_from_current_state): New macro.
3195
1bebeeca
PA
31962015-11-30 Pedro Alves <palves@redhat.com>
3197
3198 * linux-low.c (linux_resume): Wake up the event loop before
3199 returning.
3200
a67a9fae
PA
32012015-11-30 Pedro Alves <palves@redhat.com>
3202
3203 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3204 check.
3205 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3206 to -1.
3207 * target.c (struct thread_search): New structure.
3208 (thread_search_callback): New function.
3209 (prev_general_thread): New global.
3210 (prepare_to_access_memory, done_accessing_memory): New functions.
3211 * target.h (prepare_to_access_memory, done_accessing_memory):
3212 Replace macros with function declarations.
3213
f2faf941
PA
32142015-11-30 Pedro Alves <palves@redhat.com>
3215
3216 PR 14618
3217 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3218 report TARGET_WAITKIND_NO_RESUMED.
3219 * remote-utils.c (prepare_resume_reply): Handle
3220 TARGET_WAITKIND_NO_RESUMED.
3221 * server.c (report_no_resumed): New global.
3222 (handle_query) <qSupported>: Handle "no-resumed+". Report
3223 "no-resumed+" support.
3224 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3225 return error if the client doesn't support no-resumed events.
3226 (push_stop_notification): New function.
3227 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3228 events if the client supports them.
3229
a681f9c9
PA
32302015-11-30 Pedro Alves <palves@redhat.com>
3231
3232 * linux-low.c (thread_still_has_status_pending_p): Don't check
3233 vCont;t here.
3234 (lwp_resumed): New function.
3235 (status_pending_p_callback): Return early if the LWP is not
3236 supposed to be resumed.
3237
65706a29
PA
32382015-11-30 Pedro Alves <palves@redhat.com>
3239
3240 * linux-low.c (handle_extended_wait): Assert that the LWP's
3241 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3242 thread create events, leave the new child's status pending.
3243 (linux_low_filter_event): If GDB wants to hear about thread exit
3244 events, leave the LWP marked dead and don't delete it.
3245 (linux_wait_for_event_filtered): Don't check for thread exit.
3246 (filter_exit_event): New function.
3247 (linux_wait_1): Use it, when returning an exit event.
3248 (linux_resume_one_lwp_throw): Assert that the LWP's
3249 waitstatus is TARGET_WAITKIND_IGNORE.
3250 * remote-utils.c (prepare_resume_reply): Handle
3251 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3252 * server.c (report_thread_events): New global.
3253 (handle_general_set): Handle QThreadEvents.
3254 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3255 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3256 TARGET_WAITKIND_THREAD_EXITED.
3257 * server.h (report_thread_events): Declare.
3258
56cf4bed
PA
32592015-11-30 Pedro Alves <palves@redhat.com>
3260
3261 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3262 the thread's last_resume_kind was resume_stop.
3263
500c1d85
PA
32642015-11-30 Pedro Alves <palves@redhat.com>
3265
3266 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3267 before returning.
3268
de979965
PA
32692015-11-30 Pedro Alves <palves@redhat.com>
3270
3271 * server.c (handle_v_requests): Handle vCtrlC.
3272
34c65914
PA
32732015-11-30 Pedro Alves <palves@redhat.com>
3274
3275 * gdbthread.h (find_any_thread_of_pid): Declare.
3276 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3277 functions.
3278 * server.c (handle_query): If current_thread is NULL, look for
3279 another thread of the selected process.
3280
79efa585 32812015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3282 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3283
3284 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3285 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3286 name in reply.
3287 * target.h (struct target_ops) <thread_name>: New field.
3288 (target_thread_name): New macro.
3289
80d82c19
JB
32902015-11-23 Joel Brobecker <brobecker@adacore.com>
3291
3292 * regcache.h (regcache_invalidate_pid): Add declaration.
3293 * regcache.c (regcache_invalidate_pid): New function, extracted
3294 from regcache_invalidate.
3295 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3296 Add trivial documentation comment.
3297 * lynx-low.c: Use regcache_invalidate_pid instead of
3298 regcache_invalidate.
3299
64da5dd5
JB
33002015-11-23 Joel Brobecker <brobecker@adacore.com>
3301
3302 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3303 and Elf64_auxv_t if the target is Android.
3304
37ce4055
DE
33052015-11-22 Doug Evans <xdje42@gmail.com>
3306
3307 * target.h: #include <sys/types.h>.
3308
06e03fff
PA
33092015-11-19 Pedro Alves <palves@redhat.com>
3310
3311 * linux-low.c (linux_process_qsupported): Change prototype.
3312 Adjust.
3313 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3314 Change prototype.
3315 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3316 and adjust to loop over all features.
3317 * server.c (handle_query) <qSupported>: Adjust to call
3318 target_process_qsupported once, passing it a vector of unprocessed
3319 features.
3320 * target.h (struct target_ops) <process_qsupported>: Change
3321 prototype.
3322 (target_process_qsupported): Adjust.
3323
9a084706
PA
33242015-11-19 Pedro Alves <palves@redhat.com>
3325
3326 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3327 mode.
3328 * configure: Regenerate.
3329
dad44a1f
PA
33302015-11-19 Pedro Alves <palves@redhat.com>
3331
3332 * configure: Regenerate.
3333
231c0592
YQ
33342015-11-19 Yao Qi <yao.qi@linaro.org>
3335
3336 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3337 type to uint32_t.
3338
6c1c9a8b
YQ
33392015-11-19 Yao Qi <yao.qi@linaro.org>
3340
3341 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3342 (struct aarch64_operand): Move enum out.
3343
9caa3311
YQ
33442015-11-19 Yao Qi <yao.qi@linaro.org>
3345
3346 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3347 struct user_fpsimd_state *.
3348 (aarch64_store_fpregset): Likewise.
3349
6a69a054
YQ
33502015-11-19 Yao Qi <yao.qi@linaro.org>
3351
3352 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3353 struct user_pt_regs *.
3354 (aarch64_store_gregset): Likewise.
3355
1798301e
PA
33562015-11-18 Pedro Alves <palves@redhat.com>
3357
3358 * Makefile.in (all_object_files): Add $IPA_OBJS.
3359
ce7715e2
PA
33602015-11-17 Pedro Alves <palves@redhat.com>
3361
3362 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3363 GDB_SIGNAL_0 and gdb_signal_to_string.
3364
c0879059
PA
33652015-11-17 Pedro Alves <palves@redhat.com>
3366
3367 * win32-low.c (handle_output_debug_string): Remove parameter.
3368 (win32_kill): Remove our_status local and adjust call to
3369 handle_output_debug_string.
3370 (get_child_debug_event): Adjust call to
3371 handle_output_debug_string.
3372
1996e237
SM
33732015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3374
3375 * linux-mips-low.c (mips_fill_gregset): Add cast.
3376 (mips_store_gregset): Likewise.
3377 (mips_fill_fpregset): Likewise.
3378 (mips_store_fpregset): Likewise.
3379
cbec665b
SM
33802015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3381
3382 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3383 priv.
3384
eb3e3c67
SM
33852015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3386
3387 * linux-mips-low.c (mips_linux_new_thread): Change type of
3388 watch_type to enum target_hw_bp_type.
3389
171de4b8
SM
33902015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3391
3392 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3393 Change return type to arm_hwbp_type.
3394
04248ead
SM
33952015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3396
3397 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3398 (arm_store_gregset): Likewise.
3399 * linux-arm-low.c (arm_get_hwcap): Likewise.
3400 (arm_read_description): Likewise.
3401
04b3479c
SM
34022015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3403
3404 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3405
2bc84e8a
SM
34062015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3407
3408 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3409 (ppc_fill_vsxregset): Likewise.
3410 (ppc_store_vsxregset): Likewise.
3411 (ppc_fill_vrregset): Likewise.
3412 (ppc_store_vrregset): Likewise.
3413 (ppc_fill_evrregset): Likewise.
3414 (ppc_store_evrregset): Likewise.
3415
e6c5bb05
SM
34162015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3417
3418 * linux-ppc-low.c (ppc_usrregs_info): Remove
3419 forward-declaration.
3420 (ppc_arch_setup): Move lower in file.
3421
7ea45d72
SM
34222015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3423
3424 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3425 (ps_pdwrite): Likewise.
3426
69291610
HW
34272015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3428
3429 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3430 to after assert checks.
3431
b42945fd
SM
34322015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3433
3434 * proc-service.c (ps_pdread): Add/adjust casts.
3435 (ps_pdwrite): Add/adjust casts.
3436
d6f85c84
SM
34372015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3438
3439 * server.c (handle_search_memory_1): Cast return value of
3440 memmem.
3441
f98cd059
SM
34422015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3443
3444 * server.c (write_qxfer_response): Change type of data to
3445 gdb_byte *.
3446
d2412fa5
PA
34472015-10-29 Pedro Alves <palves@redhat.com>
3448
3449 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3450
c17414a2
PA
34512015-10-29 Pedro Alves <palves@redhat.com>
3452
3453 * tracepoint.c (clear_installed_tracepoints): Add casts.
3454
e053fbc4
PA
34552015-10-29 Pedro Alves <palves@redhat.com>
3456
3457 * server.c (handle_v_cont, process_serial_event): Add enum
3458 gdb_signal casts to signal parsing code.
3459
add67df8
PA
34602015-10-29 Pedro Alves <palves@redhat.com>
3461
3462 * linux-low.h (NULL_REGSET): Define.
3463 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3464 * linux-arm-low.c (arm_regsets): Likewise.
3465 * linux-crisv32-low.c (cris_regsets): Likewise.
3466 * linux-m68k-low.c (m68k_regsets): Likewise.
3467 * linux-mips-low.c (mips_regsets): Likewise.
3468 * linux-nios2-low.c (nios2_regsets): Likewise.
3469 * linux-ppc-low.c (ppc_regsets): Likewise.
3470 * linux-s390-low.c (s390_regsets): Likewise.
3471 * linux-sh-low.c (sh_regsets): Likewise.
3472 * linux-sparc-low.c (sparc_regsets): Likewise.
3473 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3474 * linux-tile-low.c (tile_regsets): Likewise.
3475 * linux-x86-low.c (x86_regsets): Likewise.
3476 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3477
50bc912a
PA
34782015-10-29 Pedro Alves <palves@redhat.com>
3479
3480 * linux-low.h (NULL_REGSET): Define.
3481 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3482 * linux-arm-low.c (arm_regsets): Likewise.
3483 * linux-crisv32-low.c (cris_regsets): Likewise.
3484 * linux-m68k-low.c (m68k_regsets): Likewise.
3485 * linux-mips-low.c (mips_regsets): Likewise.
3486 * linux-nios2-low.c (nios2_regsets): Likewise.
3487 * linux-ppc-low.c (ppc_regsets): Likewise.
3488 * linux-s390-low.c (s390_regsets): Likewise.
3489 * linux-sh-low.c (sh_regsets): Likewise.
3490 * linux-sparc-low.c (sparc_regsets): Likewise.
3491 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3492 * linux-tile-low.c (tile_regsets): Likewise.
3493 * linux-x86-low.c (x86_regsets): Likewise.
3494 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3495
682b2546
DE
34962015-10-26 Doug Evans <dje@google.com>
3497
3498 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3499
963843d4
DE
35002015-10-26 Doug Evans <dje@google.com>
3501
3502 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3503
d41401ac
DE
35042015-10-26 Doug Evans <dje@google.com>
3505
3506 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3507 for debug_printf.
3508 (attach_thread, find_new_threads_callback): Ditto.
3509
3db28855
AT
35102015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3511
3512 * mem-break.h (set_breakpoint_data): Remove.
3513
fb78e89c
AT
35142015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3515
3516 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3517 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3518 (initialize_low): Remove set_breakpoint_data call.
3519 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3520 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3521 (initialize_low): Remove set_breakpoint_data call.
3522 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3523 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3524 (initialize_low): Remove set_breakpoint_data call.
3525
2e6ee069
AT
35262015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3527
3528 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3529 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3530 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3531 * target.h (target_breakpoint_kind_from_pc): New macro.
3532
1652a986
AT
35332015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3534
3535 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3536 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3537 the default breakpoint kind.
3538
abeead09
AT
35392015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3540
3541 * linux-arm-low.c (arm_supports_z_point_type): Add software
3542 breakpoint support.
3543
b0b4b501
AT
35442015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3545
3546 * linux-arm-low.c: Refactor breakpoint definitions.
3547 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3548 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3549
8689682c
AT
35502015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3551
3552 * Makefile.in: Add arm.c/o.
3553 * configure.srv: Likewise.
3554 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3555 (arm_breakpoint_kind_from_pc): New function.
3556 (arm_sw_breakpoint_from_kind): Return proper kind.
3557 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3558
27165294
AT
35592015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3560
3561 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3562 removal.
3563 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3564 (struct raw_breakpoint) <size>: Remove.
3565 (struct raw_breakpoint) <kind>: Add.
3566 (bp_size): New function.
3567 (bp_opcode): Likewise.
3568 (find_raw_breakpoint_at): Adjust for kind.
3569 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3570 (remove_memory_breakpoint): Adjust for kind call bp_size.
3571 (set_raw_breakpoint_at): Adjust for kind.
3572 (set_breakpoint): Likewise.
3573 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3574 (delete_raw_breakpoint): Adjust for kind.
3575 (delete_breakpoint): Likewise.
3576 (find_gdb_breakpoint): Likewise.
3577 (set_gdb_breakpoint_1): Likewise.
3578 (set_gdb_breakpoint): Likewise.
3579 (delete_gdb_breakpoint_1): Likewise.
3580 (delete_gdb_breakpoint): Likewise.
3581 (uninsert_raw_breakpoint): Likewise.
3582 (reinsert_raw_breakpoint): Likewise.
3583 (set_breakpoint_data): Remove.
3584 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3585 (check_mem_read): Adjust for kind call bp_size.
3586 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3587 (clone_one_breakpoint): Adjust for kind.
3588 * mem-break.h (set_gdb_breakpoint): Likewise.
3589 (delete_gdb_breakpoint): Likewise.
3590 * server.c (process_serial_event): Likewise.
3591
dd373349
AT
35922015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3593
3594 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3595 (struct linux_target_ops) <breakpoint>: Remove.
3596 (struct linux_target_ops) <breakpoint_len>: Remove.
3597 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3598 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3599 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3600 (arm_sw_breakpoint_from_kind): New function.
3601 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3602 (struct linux_target_ops) <breakpoint>: Remove.
3603 (struct linux_target_ops) <breakpoint_len>: Remove.
3604 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3605 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3606 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3607 (struct linux_target_ops) <breakpoint>: Remove.
3608 (struct linux_target_ops) <breakpoint_len>: Remove.
3609 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3610 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3611 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3612 (struct linux_target_ops) <breakpoint>: Remove.
3613 (struct linux_target_ops) <breakpoint_len>: Remove.
3614 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3615 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3616 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3617 and sw_breakpoint_from_kind to increment the pc.
3618 (linux_breakpoint_kind_from_pc): New function.
3619 (linux_sw_breakpoint_from_kind): New function.
3620 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3621 (initialize_low): Call breakpoint_kind_from_pc and
3622 sw_breakpoint_from_kind to replace breakpoint_data/len.
3623 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3624 New field.
3625 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3626 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3627 (struct linux_target_ops) <breakpoint>: Remove.
3628 (struct linux_target_ops) <breakpoint_len>: Remove.
3629 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3630 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3631 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3632 (struct linux_target_ops) <breakpoint>: Remove.
3633 (struct linux_target_ops) <breakpoint_len>: Remove.
3634 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3635 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3636 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3637 (struct linux_target_ops) <breakpoint>: Remove.
3638 (struct linux_target_ops) <breakpoint_len>: Remove.
3639 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3640 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3641 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3642 (struct linux_target_ops) <breakpoint>: Remove.
3643 (struct linux_target_ops) <breakpoint_len>: Remove.
3644 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3645 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3646 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3647 (struct linux_target_ops) <breakpoint>: Remove.
3648 (struct linux_target_ops) <breakpoint_len>: Remove.
3649 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3650 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3651 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3652 (struct linux_target_ops) <breakpoint>: Remove.
3653 (struct linux_target_ops) <breakpoint_len>: Remove.
3654 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3655 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3656 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3657 (struct linux_target_ops) <breakpoint>: Remove.
3658 (struct linux_target_ops) <breakpoint_len>: Remove.
3659 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3660 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3661 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3662 (struct linux_target_ops) <breakpoint>: Remove.
3663 (struct linux_target_ops) <breakpoint_len>: Remove.
3664 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3665 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3666 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3667 (struct linux_target_ops) <breakpoint>: Remove.
3668 (struct linux_target_ops) <breakpoint_len>: Remove.
3669 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3670 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3671 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3672 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3673 (struct linux_target_ops) <breakpoint>: Remove.
3674 (struct linux_target_ops) <breakpoint_len>: Remove.
3675 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3676 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3677 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3678 (struct linux_target_ops) <breakpoint>: Remove.
3679 (struct linux_target_ops) <breakpoint_len>: Remove.
3680 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3681 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3682
4cd98a19
AT
36832015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3684
3685 * linux-cris-low.c (cris_get_pc): Remove void arg.
3686
774ee6d2
AR
36872015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3688
3689 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3690 variable name.
3691
833dcd29
AR
36922015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3693
3694 * inferiors.c (thread_pid_matches_callback): New function.
3695 (find_thread_process): New function.
3696 (remove_thread): Reset current_thread.
3697 (remove_process): Assert threads have been removed first.
3698
8d689ee5
YQ
36992015-10-15 Yao Qi <yao.qi@linaro.org>
3700
3701 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3702 if it is 3.
3703 (aarch64_remove_point): Likewise.
3704 * regcache.c (regcache_register_size): New function.
3705
1c2e1515
YQ
37062015-10-12 Yao Qi <yao.qi@linaro.org>
3707
3708 * linux-aarch64-low.c: Update all callers as emit_load_store
3709 is renamed to aarch64_emit_load_store.
3710
e1c587c3
YQ
37112015-10-12 Yao Qi <yao.qi@linaro.org>
3712
3713 * linux-aarch64-low.c: Update all callers of function renaming
3714 from emit_insn to aarch64_emit_insn.
3715
b6542f81
YQ
37162015-10-12 Yao Qi <yao.qi@linaro.org>
3717
3718 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3719 arch/aarch64-insn.h.
3720 (struct aarch64_memory_operand): Likewise.
3721 (ENCODE): Likewise.
3722 (emit_insn): Move to arch/aarch64-insn.c.
3723 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3724 (emit_load_store): Move to arch/aarch64-insn.c.
3725 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3726 (can_encode_int32): Remove.
3727
246994ce
YQ
37282015-10-12 Yao Qi <yao.qi@linaro.org>
3729
3730 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3731 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3732 (aarch64_relocate_instruction): Likewise.
3733 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3734 (struct aarch64_insn_visitor): Likewise.
3735
0badd99f
YQ
37362015-10-12 Yao Qi <yao.qi@linaro.org>
3737
3738 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3739 (struct aarch64_insn_visitor): New.
3740 (struct aarch64_insn_relocation_data): New.
3741 (aarch64_ftrace_insn_reloc_b): New function.
3742 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3743 (aarch64_ftrace_insn_reloc_cb): Likewise.
3744 (aarch64_ftrace_insn_reloc_tb): Likewise.
3745 (aarch64_ftrace_insn_reloc_adr): Likewise.
3746 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3747 (aarch64_ftrace_insn_reloc_others): Likewise.
3748 (visitor): New.
3749 (aarch64_relocate_instruction): Use visitor.
3750
dfaffe9d
YQ
37512015-10-12 Yao Qi <yao.qi@linaro.org>
3752
3753 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3754 int. Add argument buf.
3755 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3756 aarch64_relocate_instruction.
3757
70b439f0
YQ
37582015-10-12 Yao Qi <yao.qi@linaro.org>
3759
3760 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3761 argument insn. Remove local variable insn. Don't call
3762 target_read_uint32.
3763 (aarch64_install_fast_tracepoint_jump_pad): Call
3764 target_read_uint32.
3765
7781c06f
YQ
37662015-09-30 Yao Qi <yao.qi@linaro.org>
3767
3768 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3769 (emit_load_store_pair): Likewise.
3770
9a3c8263
SM
37712015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3772
3773 * dll.c (match_dll): Add cast(s).
3774 (unloaded_dll): Likewise.
3775 * linux-low.c (second_thread_of_pid_p): Likewise.
3776 (delete_lwp_callback): Likewise.
3777 (count_events_callback): Likewise.
3778 (select_event_lwp_callback): Likewise.
3779 (linux_set_resume_request): Likewise.
3780 * server.c (accumulate_file_name_length): Likewise.
3781 (emit_dll_description): Likewise.
3782 (handle_qxfer_threads_worker): Likewise.
3783 (visit_actioned_threads): Likewise.
3784 * thread-db.c (any_thread_of): Likewise.
3785 * tracepoint.c (same_process_p): Likewise.
3786 (match_blocktype): Likewise.
3787 (build_traceframe_info_xml): Likewise.
3788
224c3ddb
SM
37892015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3790
3791 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3792 assignment.
3793 (gdb_unparse_agent_expr): Likewise.
3794 * hostio.c (require_data): Likewise.
3795 (handle_pread): Likewise.
3796 * linux-low.c (disable_regset): Likewise.
3797 (fetch_register): Likewise.
3798 (store_register): Likewise.
3799 (get_dynamic): Likewise.
3800 (linux_qxfer_libraries_svr4): Likewise.
3801 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3802 (set_fast_tracepoint_jump): Likewise.
3803 (uninsert_fast_tracepoint_jumps_at): Likewise.
3804 (reinsert_fast_tracepoint_jumps_at): Likewise.
3805 (validate_inserted_breakpoint): Likewise.
3806 (clone_agent_expr): Likewise.
3807 * regcache.c (init_register_cache): Likewise.
3808 * remote-utils.c (putpkt_binary_1): Likewise.
3809 (decode_M_packet): Likewise.
3810 (decode_X_packet): Likewise.
3811 (look_up_one_symbol): Likewise.
3812 (relocate_instruction): Likewise.
3813 (monitor_output): Likewise.
3814 * server.c (handle_search_memory): Likewise.
3815 (handle_qxfer_exec_file): Likewise.
3816 (handle_qxfer_libraries): Likewise.
3817 (handle_qxfer): Likewise.
3818 (handle_query): Likewise.
3819 (handle_v_cont): Likewise.
3820 (handle_v_run): Likewise.
3821 (captured_main): Likewise.
3822 * target.c (write_inferior_memory): Likewise.
3823 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3824 * tracepoint.c (init_trace_buffer): Likewise.
3825 (add_tracepoint_action): Likewise.
3826 (add_traceframe): Likewise.
3827 (add_traceframe_block): Likewise.
3828 (cmd_qtdpsrc): Likewise.
3829 (cmd_qtdv): Likewise.
3830 (cmd_qtstatus): Likewise.
3831 (response_source): Likewise.
3832 (response_tsv): Likewise.
3833 (cmd_qtnotes): Likewise.
3834 (gdb_collect): Likewise.
3835 (initialize_tracepoint): Likewise.
3836
afbe19f8
PL
38372015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3838
3839 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3840 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3841 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3842 <NOP>: New.
3843 (enum aarch64_condition_codes): New enum.
3844 (w0): New static global.
3845 (fp): Likewise.
3846 (lr): Likewise.
3847 (struct aarch64_memory_operand) <type>: New
3848 MEMORY_OPERAND_POSTINDEX type.
3849 (postindex_memory_operand): New helper function.
3850 (emit_ret): New function.
3851 (emit_load_store_pair): New function, factored out of emit_stp
3852 with support for MEMORY_OPERAND_POSTINDEX.
3853 (emit_stp): Rewrite using emit_load_store_pair.
3854 (emit_ldp): New function.
3855 (emit_load_store): Likewise.
3856 (emit_ldr): Mention post-index instruction in comment.
3857 (emit_ldrh): New function.
3858 (emit_ldrb): New function.
3859 (emit_ldrsw): Mention post-index instruction in comment.
3860 (emit_str): Likewise.
3861 (emit_subs): New function.
3862 (emit_cmp): Likewise.
3863 (emit_and): Likewise.
3864 (emit_orr): Likewise.
3865 (emit_orn): Likewise.
3866 (emit_eor): Likewise.
3867 (emit_mvn): Likewise.
3868 (emit_lslv): Likewise.
3869 (emit_lsrv): Likewise.
3870 (emit_asrv): Likewise.
3871 (emit_mul): Likewise.
3872 (emit_sbfm): Likewise.
3873 (emit_sbfx): Likewise.
3874 (emit_ubfm): Likewise.
3875 (emit_ubfx): Likewise.
3876 (emit_csinc): Likewise.
3877 (emit_cset): Likewise.
3878 (emit_nop): Likewise.
3879 (emit_ops_insns): New helper function.
3880 (emit_pop): Likewise.
3881 (emit_push): Likewise.
3882 (aarch64_emit_prologue): New function.
3883 (aarch64_emit_epilogue): Likewise.
3884 (aarch64_emit_add): Likewise.
3885 (aarch64_emit_sub): Likewise.
3886 (aarch64_emit_mul): Likewise.
3887 (aarch64_emit_lsh): Likewise.
3888 (aarch64_emit_rsh_signed): Likewise.
3889 (aarch64_emit_rsh_unsigned): Likewise.
3890 (aarch64_emit_ext): Likewise.
3891 (aarch64_emit_log_not): Likewise.
3892 (aarch64_emit_bit_and): Likewise.
3893 (aarch64_emit_bit_or): Likewise.
3894 (aarch64_emit_bit_xor): Likewise.
3895 (aarch64_emit_bit_not): Likewise.
3896 (aarch64_emit_equal): Likewise.
3897 (aarch64_emit_less_signed): Likewise.
3898 (aarch64_emit_less_unsigned): Likewise.
3899 (aarch64_emit_ref): Likewise.
3900 (aarch64_emit_if_goto): Likewise.
3901 (aarch64_emit_goto): Likewise.
3902 (aarch64_write_goto_address): Likewise.
3903 (aarch64_emit_const): Likewise.
3904 (aarch64_emit_call): Likewise.
3905 (aarch64_emit_reg): Likewise.
3906 (aarch64_emit_pop): Likewise.
3907 (aarch64_emit_stack_flush): Likewise.
3908 (aarch64_emit_zero_ext): Likewise.
3909 (aarch64_emit_swap): Likewise.
3910 (aarch64_emit_stack_adjust): Likewise.
3911 (aarch64_emit_int_call_1): Likewise.
3912 (aarch64_emit_void_call_2): Likewise.
3913 (aarch64_emit_eq_goto): Likewise.
3914 (aarch64_emit_ne_goto): Likewise.
3915 (aarch64_emit_lt_goto): Likewise.
3916 (aarch64_emit_le_goto): Likewise.
3917 (aarch64_emit_gt_goto): Likewise.
3918 (aarch64_emit_ge_got): Likewise.
3919 (aarch64_emit_ops_impl): New static global variable.
3920 (aarch64_emit_ops): New target function, return
3921 &aarch64_emit_ops_impl.
3922 (struct linux_target_ops): Install it.
3923
bb903df0
PL
39242015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3925
3926 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3927 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3928 aarch64-ipa.o.
3929 * linux-aarch64-ipa.c: New file.
3930 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3931 and endian.h.
3932 (aarch64_get_thread_area): New target method.
3933 (extract_signed_bitfield): New helper function.
3934 (aarch64_decode_ldr_literal): New function.
3935 (enum aarch64_opcodes): New enum.
3936 (struct aarch64_register): New struct.
3937 (struct aarch64_operand): New struct.
3938 (x0): New static global.
3939 (x1): Likewise.
3940 (x2): Likewise.
3941 (x3): Likewise.
3942 (x4): Likewise.
3943 (w2): Likewise.
3944 (ip0): Likewise.
3945 (sp): Likewise.
3946 (xzr): Likewise.
3947 (aarch64_register): New helper function.
3948 (register_operand): Likewise.
3949 (immediate_operand): Likewise.
3950 (struct aarch64_memory_operand): New struct.
3951 (offset_memory_operand): New helper function.
3952 (preindex_memory_operand): Likewise.
3953 (enum aarch64_system_control_registers): New enum.
3954 (ENCODE): New macro.
3955 (emit_insn): New helper function.
3956 (emit_b): New function.
3957 (emit_bcond): Likewise.
3958 (emit_cb): Likewise.
3959 (emit_tb): Likewise.
3960 (emit_blr): Likewise.
3961 (emit_stp): Likewise.
3962 (emit_ldp_q_offset): Likewise.
3963 (emit_stp_q_offset): Likewise.
3964 (emit_load_store): Likewise.
3965 (emit_ldr): Likewise.
3966 (emit_ldrsw): Likewise.
3967 (emit_str): Likewise.
3968 (emit_ldaxr): Likewise.
3969 (emit_stxr): Likewise.
3970 (emit_stlr): Likewise.
3971 (emit_data_processing_reg): Likewise.
3972 (emit_data_processing): Likewise.
3973 (emit_add): Likewise.
3974 (emit_sub): Likewise.
3975 (emit_mov): Likewise.
3976 (emit_movk): Likewise.
3977 (emit_mov_addr): Likewise.
3978 (emit_mrs): Likewise.
3979 (emit_msr): Likewise.
3980 (emit_sevl): Likewise.
3981 (emit_wfe): Likewise.
3982 (append_insns): Likewise.
3983 (can_encode_int32_in): New helper function.
3984 (aarch64_relocate_instruction): New function.
3985 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3986 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3987 (struct linux_target_ops): Install aarch64_get_thread_area,
3988 aarch64_install_fast_tracepoint_jump_pad and
3989 aarch64_get_min_fast_tracepoint_insn_len.
3990
787749ea
PL
39912015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3992
3993 * Makefile.in (aarch64-insn.o): New rule.
3994 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3995
9812b2e6
YQ
39962015-09-21 Yao Qi <yao.qi@linaro.org>
3997
3998 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3999
18fe412b
YQ
40002015-09-21 Yao Qi <yao.qi@linaro.org>
4001
4002 * tracepoint.c (max_jump_pad_size): Remove.
4003
a0cc84cd
YQ
40042015-09-18 Yao Qi <yao.qi@linaro.org>
4005
4006 * linux-aarch64-low.c: Don't include sys/uio.h.
4007 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4008
d78908cf
WW
40092015-09-16 Wei-cheng Wang <cole945@gmail.com>
4010
4011 * tracepoint.c (eval_result_type): Change prototype.
4012 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4013
d57e0d50
PA
40142015-09-15 Pedro Alves <palves@redhat.com>
4015
4016 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4017 Check whether to report exec events instead of checking whether
4018 multiprocess is enabled.
4019
5a676acc
PA
40202015-09-15 Pedro Alves <palves@redhat.com>
4021
4022 PR remote/18965
4023 * remote-utils.c (prepare_resume_reply): Merge
4024 TARGET_WAITKIND_VFORK_DONE switch case with the
4025 TARGET_WAITKIND_FORKED case.
4026
7c5d0fad
YQ
40272015-09-15 Yao Qi <yao.qi@linaro.org>
4028
4029 * server.c (handle_query): Check string comparison using
4030 "else if" instead of "if".
4031
750ce8d1
YQ
40322015-09-15 Yao Qi <yao.qi@linaro.org>
4033
4034 * server.c (vCont_supported): New global variable.
4035 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4036 matches. Append ";vContSupported+" to own_buf.
4037 (handle_v_requests): Append ";s;S" to own_buf if target supports
4038 hardware single step or vCont_supported is false.
4039 (capture_main): Set vCont_supported to zero.
4040
70b90b91
YQ
40412015-09-15 Yao Qi <yao.qi@linaro.org>
4042
4043 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4044 it to ...
4045 (linux_supports_hardware_single_step): ... New function.
4046 (linux_target_ops): Update.
4047 * lynx-low.c (lynx_target_ops): Set field
4048 supports_hardware_single_step to target_can_do_hardware_single_step.
4049 * nto-low.c (nto_target_ops): Likewise.
4050 * spu-low.c (spu_target_ops): Likewise.
4051 * win32-low.c (win32_target_ops): Likewise.
4052 * target.c (target_can_do_hardware_single_step): New function.
4053 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4054 Remove. <supports_hardware_single_step>: New field.
4055 (target_supports_conditional_breakpoints): Remove.
4056 (target_supports_hardware_single_step): New macro.
4057 (target_can_do_hardware_single_step): Declare.
4058 * server.c (handle_query): Use target_supports_hardware_single_step
4059 instead of target_supports_conditional_breakpoints.
4060
ade90bde
YQ
40612015-09-15 Yao Qi <yao.qi@linaro.org>
4062
4063 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4064 function.
4065 (struct linux_target_ops the_low_target): Install
4066 aarch64_linux_siginfo_fixup.
4067
94585166
DB
40682015-09-11 Don Breazeal <donb@codesourcery.com>
4069 Luis Machado <lgustavo@codesourcery.com>
4070
4071 * linux-low.c (linux_mourn): Static declaration.
4072 (linux_arch_setup): Move in front of
4073 handle_extended_wait.
4074 (linux_arch_setup_thread): New function.
4075 (handle_extended_wait): Handle exec events. Call
4076 linux_arch_setup_thread. Make event_lwp argument a
4077 pointer-to-a-pointer.
4078 (check_zombie_leaders): Do not check stopped threads.
4079 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4080 (linux_low_filter_event): Add lwp and thread for exec'ing
4081 non-leader thread if leader thread has been deleted.
4082 Refactor code into linux_arch_setup_thread and call it.
4083 Pass child lwp pointer by reference to handle_extended_wait.
4084 (linux_wait_for_event_filtered): Update comment.
4085 (linux_wait_1): Prevent clobbering exec event status.
4086 (linux_supports_exec_events): New function.
4087 (linux_target_ops) <supports_exec_events>: Initialize new member.
4088 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4089 new member.
4090 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4091 * server.c (report_exec_events): New global variable.
4092 (handle_query): Handle qSupported query for exec-events feature.
4093 (captured_main): Initialize report_exec_events.
4094 * server.h (report_exec_events): Declare new global variable.
4095 * target.h (struct target_ops) <supports_exec_events>: New
4096 member.
4097 (target_supports_exec_events): New macro.
4098 * win32-low.c (win32_target_ops) <supports_exec_events>:
4099 Initialize new member.
4100
0568462b
MM
41012015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4102
4103 * linux-low.c (linux_low_enable_btrace): Remove.
4104 (linux_target_ops): Replace linux_low_enable_btrace with
4105 linux_enable_btrace.
4106
39edd165
YQ
41072015-09-03 Yao Qi <yao.qi@linaro.org>
4108
4109 * linux-aarch64-low.c (aarch64_insert_point): Call
4110 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4111 returns true.
4112
1db33b5a
UW
41132015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4114
4115 * linux-low.c (check_stopped_by_breakpoint): Use
4116 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4117
ab290430
PA
41182015-08-27 Pedro Alves <palves@redhat.com>
4119
4120 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4121
8d749320
SM
41222015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4123
6711b7f8
SM
4124 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4125 the XNEW-family equivalent.
8d749320
SM
4126 (compile_bytecodes): Likewise.
4127 * dll.c (loaded_dll): Likewise.
4128 * event-loop.c (append_callback_event): Likewise.
4129 (create_file_handler): Likewise.
4130 (create_file_event): Likewise.
4131 * hostio.c (handle_open): Likewise.
4132 * inferiors.c (add_thread): Likewise.
4133 (add_process): Likewise.
4134 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4135 * linux-arm-low.c (arm_new_process): Likewise.
4136 (arm_new_thread): Likewise.
4137 * linux-low.c (add_to_pid_list): Likewise.
4138 (linux_add_process): Likewise.
4139 (handle_extended_wait): Likewise.
4140 (add_lwp): Likewise.
4141 (enqueue_one_deferred_signal): Likewise.
4142 (enqueue_pending_signal): Likewise.
4143 (linux_resume_one_lwp_throw): Likewise.
4144 (linux_resume_one_thread): Likewise.
4145 (linux_read_memory): Likewise.
4146 (linux_write_memory): Likewise.
4147 * linux-mips-low.c (mips_linux_new_process): Likewise.
4148 (mips_linux_new_thread): Likewise.
4149 (mips_add_watchpoint): Likewise.
4150 * linux-x86-low.c (initialize_low_arch): Likewise.
4151 * lynx-low.c (lynx_add_process): Likewise.
4152 * mem-break.c (set_raw_breakpoint_at): Likewise.
4153 (set_breakpoint): Likewise.
4154 (add_condition_to_breakpoint): Likewise.
4155 (add_commands_to_breakpoint): Likewise.
4156 (clone_agent_expr): Likewise.
4157 (clone_one_breakpoint): Likewise.
4158 * regcache.c (new_register_cache): Likewise.
4159 * remote-utils.c (look_up_one_symbol): Likewise.
4160 * server.c (queue_stop_reply): Likewise.
4161 (start_inferior): Likewise.
4162 (queue_stop_reply_callback): Likewise.
4163 (handle_target_event): Likewise.
4164 * spu-low.c (fetch_ppc_memory): Likewise.
4165 (store_ppc_memory): Likewise.
4166 * target.c (set_target_ops): Likewise.
4167 * thread-db.c (thread_db_load_search): Likewise.
4168 (try_thread_db_load_1): Likewise.
4169 * tracepoint.c (add_tracepoint): Likewise.
4170 (add_tracepoint_action): Likewise.
4171 (create_trace_state_variable): Likewise.
4172 (cmd_qtdpsrc): Likewise.
4173 (cmd_qtro): Likewise.
4174 (add_while_stepping_state): Likewise.
4175 * win32-low.c (child_add_thread): Likewise.
4176 (get_image_name): Likewise.
4177
ed8b7b42
YQ
41782015-08-25 Yao Qi <yao.qi@linaro.org>
4179
4180 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4181
db3cb7cb
YQ
41822015-08-25 Yao Qi <yao.qi@linaro.org>
4183
4184 * Makefile.in (aarch64-linux.o): New rule.
4185 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4186 srv_tgtobj.
4187 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4188 (aarch64_init_debug_reg_state): Make it extern.
4189 (aarch64_linux_prepare_to_resume): Remove.
4190
f6011a1c
YQ
41912015-08-25 Yao Qi <yao.qi@linaro.org>
4192
4193 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4194 lwp_arch_private_info and ptid_of_lwp.
4195
88e2cf7e
YQ
41962015-08-25 Yao Qi <yao.qi@linaro.org>
4197
4198 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4199 Find proc_info by find_process_pid. All callers updated.
4200
5e35436e
YQ
42012015-08-25 Yao Qi <yao.qi@linaro.org>
4202
4203 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4204 Remove.
4205 (debug_reg_change_callback): Remove.
4206 (aarch64_notify_debug_reg_change): Remove.
4207
4a8a7965
YQ
42082015-08-25 Yao Qi <yao.qi@linaro.org>
4209
4210 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4211 Call current_lwp_ptid.
4212
32a271ee
YQ
42132015-08-25 Yao Qi <yao.qi@linaro.org>
4214
4215 * linux-aarch64-low.c (debug_reg_change_callback): Use
4216 debug_printf.
4217
0d51c8d7
YQ
42182015-08-25 Yao Qi <yao.qi@linaro.org>
4219
4220 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4221
31a43dd5
YQ
42222015-08-25 Yao Qi <yao.qi@linaro.org>
4223
4224 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4225
8ee52567
YQ
42262015-08-25 Yao Qi <yao.qi@linaro.org>
4227
4228 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4229 the code.
4230
ff3f0f45
YQ
42312015-08-25 Yao Qi <yao.qi@linaro.org>
4232
4233 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4234 Remove.
4235 (debug_reg_change_callback): Remove argument entry and add argument
4236 lwp. Remove local variable thread. Don't print thread id in the
4237 debugging output. Don't check whether pid of thread equals to pid.
4238 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4239 iterate_over_lwps instead find_inferior.
4240
3d40fbb5
PA
42412015-08-24 Pedro Alves <palves@redhat.com>
4242
4243 * inferiors.c (get_first_process): New function.
4244 * inferiors.h (get_first_process): New declaration.
4245 * remote-utils.c (read_ptid): Default to the first process in the
4246 list, instead of to the current thread's process.
4247
438e1e42
PA
42482015-08-24 Pedro Alves <palves@redhat.com>
4249
4250 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4251 * event-loop.c: Likewise.
4252 * remote-utils.c: Likewise.
4253 * tracepoint.c: Likewise.
4254
a8c6d4fc
PA
42552015-08-24 Pedro Alves <palves@redhat.com>
4256
4257 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4258 ptid_get_lwp.
4259
99b0bb12
PA
42602015-08-21 Pedro Alves <palves@redhat.com>
4261
4262 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4263 instead of literal 1.
4264
f8904751
PA
42652015-08-21 Pedro Alves <palves@redhat.com>
4266
4267 * tdesc.c (default_description): Explicitly zero-initialize.
4268
465a859e
PA
42692015-08-21 Pedro Alves <palves@redhat.com>
4270
4271 PR gdb/18749
4272 * inferiors.c (remove_thread): Discard any pending stop reply for
4273 this thread.
4274 * server.c (remove_all_on_match_pid): Rename to ...
4275 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4276 instead of a pid.
4277 (discard_queued_stop_replies): Change parameter to a ptid. Now
4278 extern.
4279 (handle_v_kill, kill_inferior_callback, captured_main)
4280 (process_serial_event): Adjust.
4281 * server.h (discard_queued_stop_replies): Declare.
4282
f0db101d
PA
42832015-08-21 Pedro Alves <palves@redhat.com>
4284
4285 * linux-low.c (wait_for_sigstop): Always switch to no thread
4286 selected if the previously current thread dies.
4287 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4288 process instead of the current thread's.
4289 * remote-utils.c (input_interrupt): Don't check if there's no
4290 current thread.
4291 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4292 current thread to the general thread fails, error out.
4293 (handle_qxfer_auxv, handle_qxfer_libraries)
4294 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4295 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4296 (handle_query): Check if there's a thread selected instead of
4297 checking whether there's any thread in the thread list.
4298 (handle_qxfer_threads, handle_qxfer_btrace)
4299 (handle_qxfer_btrace_conf): Don't error out early if there's no
4300 thread in the thread list.
4301 (handle_v_cont, myresume): Don't set the current thread to the
4302 continue thread.
4303 (process_serial_event) <Hg handling>: Also set thread_id if the
4304 previous general thread is still alive.
4305 (process_serial_event) <g/G handling>: If setting the current
4306 thread to the general thread fails, error out.
4307 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4308 thread's lwp instead of the current thread's.
4309 * target.c (set_desired_thread): If the desired thread was not
4310 found, leave the current thread pointing to NULL. Return an int
4311 (boolean) indicating success.
4312 * target.h (set_desired_thread): Change return type to int.
4313
40045d91
MF
43142015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4315
4316 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4317 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4318 #includes.
4319 (ps_get_thread_area): New function.
4320
45face3b
GB
43212015-08-19 Gary Benson <gbenson@redhat.com>
4322
4323 * hostio.c (handle_pread): Do not attempt to read more data
4324 than hostio_reply_with_data can fit in a packet.
4325
16d5f642
JB
43262015-08-18 Joel Brobecker <brobecker@adacore.com>
4327
4328 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4329
a738da3a
MF
43302015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4331
4332 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4333
33ebda9d
PA
43342015-08-06 Pedro Alves <palves@redhat.com>
4335
4336 * tracepoint.c (expr_eval_result): Now an int.
4337
a44892be
PA
43382015-08-06 Pedro Alves <palves@redhat.com>
4339
4340 * gdbthread.h (struct regcache): Forward declare.
4341 (struct thread_info) <regcache_data>: Now a struct regcache
4342 pointer.
4343 * inferiors.c (inferior_regcache_data)
4344 (set_inferior_regcache_data): Now work with struct regcache
4345 pointers.
4346 * inferiors.h (struct regcache): Forward declare.
4347 (inferior_regcache_data, set_inferior_regcache_data): Now work
4348 with struct regcache pointers.
4349 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4350 (free_register_cache_thread): Remove struct regcache pointer
4351 casts.
4352
608a1e46
PA
43532015-08-06 Pedro Alves <palves@redhat.com>
4354
4355 * server.c (captured_main): On error, print the exception message
4356 to stderr, and if run_once is set, throw a quit.
4357
f0ce0d3a
PA
43582015-08-06 Pedro Alves <palves@redhat.com>
4359
4360 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4361 the current thread.
4362
bf47e248
PA
43632015-08-06 Pedro Alves <palves@redhat.com>
4364
4365 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4366 reading beyond the passed in buffer length.
4367
b6b9ffcc
PL
43682015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4369
4370 * tracepoint.c (symbol_list) <required>: Remove.
4371
863d01bd
PA
43722015-08-06 Pedro Alves <palves@redhat.com>
4373
4374 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4375 count if stopping and suspending threads.
4376 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4377 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4378 (linux_detach): Complete an ongoing step-over.
4379 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4380 throughout.
4381 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4382 (linux_wait_1): If passing a signal to the inferior after
4383 finishing a step-over, unsuspend and re-resume all lwps. If we
4384 see a single-step event but the thread should be continuing, don't
4385 pass the trap to gdb.
4386 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4387 internal_error instead of gdb_assert.
4388 (enqueue_pending_signal): New function.
4389 (check_ptrace_stopped_lwp_gone): Add debug output.
4390 (start_step_over): Use internal_error instead of gdb_assert.
4391 (complete_ongoing_step_over): New function.
4392 (linux_resume_one_thread): Don't resume a suspended thread.
4393 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4394 it stepping.
4395
00db26fa
PA
43962015-08-06 Pedro Alves <palves@redhat.com>
4397
4398 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4399 (linux_thread_alive): Use lwp_is_marked_dead.
4400 (extended_event_reported): Delete.
4401 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4402 instead of extended_event_reported.
4403 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4404 as well.
4405 (lwp_is_marked_dead): New function.
4406 (lwp_running): Use lwp_is_marked_dead.
4407 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4408 comment.
4409
ad071a30
PA
44102015-08-06 Pedro Alves <palves@redhat.com>
4411
4412 * linux-low.c (linux_wait_1): Move fork event output out of the
4413 !report_to_gdb check. Pass event_child->waitstatus to
4414 target_waitstatus_to_string instead of ourstatus.
4415
524b57e6
YQ
44162015-08-04 Yao Qi <yao.qi@linaro.org>
4417
4418 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4419 if current_thread is 32 bit.
4420
6085d6f6
YQ
44212015-08-04 Yao Qi <yao.qi@linaro.org>
4422
4423 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4424 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4425 * server.c (extended_protocol): Remove "static".
4426 * server.h (extended_protocol): Declare it.
4427
8a7e4587
YQ
44282015-08-04 Yao Qi <yao.qi@linaro.org>
4429
4430 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4431 both aarch64 and aarch32.
4432 (aarch64_set_pc): Likewise.
4433
3b53ae99
YQ
44342015-08-04 Yao Qi <yao.qi@linaro.org>
4435
4436 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4437 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4438 arm-with-neon.xml to srv_xmlfiles.
4439 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4440 (is_64bit_tdesc): New function.
4441 (aarch64_linux_read_description): New function.
4442 (aarch64_arch_setup): Call aarch64_linux_read_description.
4443 (regs_info): Rename to regs_info_aarch64.
4444 (aarch64_regs_info): Return right regs_info.
4445 (initialize_low_arch): Call initialize_low_arch_aarch32.
4446
bd9e6534
YQ
44472015-08-04 Yao Qi <yao.qi@linaro.org>
4448
4449 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4450 * linux-aarch32-low.c: New file.
4451 * linux-aarch32-low.h: New file.
4452 * linux-arm-low.c (arm_fill_gregset): Move it to
4453 linux-aarch32-low.c.
4454 (arm_store_gregset): Likewise.
4455 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4456 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4457 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4458 (regs_info): Rename to regs_info_arm.
4459 (arm_regs_info): Return regs_info_aarch32 if
4460 have_ptrace_getregset is 1 and target description is
4461 arm_with_neon or arm_with_vfpv3.
4462 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4463 Call initialize_low_arch_aarch32 instead.
4464
ded48a5e
YQ
44652015-08-04 Yao Qi <yao.qi@linaro.org>
4466
4467 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4468 * linux-low.c: ... here.
4469 * linux-low.h (have_ptrace_getregset): Declare it.
4470
96e9210f
PA
44712015-08-04 Pedro Alves <palves@redhat.com>
4472
4473 * thread-db.c (struct thread_db): Use new typedefs.
4474 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4475 CHK calls.
4476 (disable_thread_event_reporting): Cast result of dlsym to
4477 destination function pointer type.
4478 (thread_db_mourn): Use td_ta_delete_ftype.
4479
af60a1ef
SL
44802015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4481
4482 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4483 arch variant.
4484 (CDX_BREAKPOINT): Define for R2.
4485 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4486 (the_low_target): Add comments.
4487
e8b41681
YQ
44882015-07-30 Yao Qi <yao.qi@linaro.org>
4489
4490 * linux-arm-low.c (arm_hwcap): Remove it.
4491 (arm_read_description): New local variable arm_hwcap. Don't
4492 set arm_hwcap to zero.
4493
89abb039
YQ
44942015-07-30 Yao Qi <yao.qi@linaro.org>
4495
4496 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4497 Use regcache->tdesc instead.
4498 (arm_store_wmmxregset): Likewise.
4499 (arm_fill_vfpregset): Likewise.
4500 (arm_store_vfpregset): Likewise.
4501
deca266c
YQ
45022015-07-30 Yao Qi <yao.qi@linaro.org>
4503
4504 * linux-arm-low.c: Include arch/arm.h.
4505 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4506 (arm_store_gregset): Likewise.
4507
aa58a496
SM
45082015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4509
4510 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4511 ptrace's 4th parameter.
4512
50904b25
YQ
45132015-07-27 Yao Qi <yao.qi@linaro.org>
4514
4515 * configure.srv (case aarch64*-*-linux*): Don't set
4516 srv_linux_usrregs.
4517
5826e159
PA
45182015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4519
4520 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4521 sys/ptrace.h.
4522 * linux-arm-low.c: Likewise.
4523 * linux-cris-low.c: Likewise.
4524 * linux-crisv32-low.c: Likewise.
4525 * linux-low.c: Likewise.
4526 * linux-m68k-low.c: Likewise.
4527 * linux-mips-low.c: Likewise.
4528 * linux-nios2-low.c: Likewise.
4529 * linux-s390-low.c: Likewise.
4530 * linux-sparc-low.c: Likewise.
4531 * linux-tic6x-low.c: Likewise.
4532 * linux-tile-low.c: Likewise.
4533 * linux-x86-low.c: Likewise.
4534
54019719
PA
45352015-07-24 Pedro Alves <palves@redhat.com>
4536
4537 * config.in: Regenerate.
4538 * configure: Regenerate.
4539
eb7aa561
PA
45402015-07-24 Pedro Alves <palves@redhat.com>
4541
4542 * acinclude.m4: Include ../ptrace.m4.
4543 * configure.ac: Call GDB_AC_PTRACE.
4544 * config.in, configure: Regenerate.
4545
55d7b841
YQ
45462015-07-24 Yao Qi <yao.qi@linaro.org>
4547
4548 * linux-low.c (linux_create_inferior): Remove setting to
4549 proc->priv->new_inferior.
4550 (linux_attach): Likewise.
4551 (linux_low_filter_event): Likewise.
4552 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4553
c06cbd92
YQ
45542015-07-24 Yao Qi <yao.qi@linaro.org>
4555
4556 * linux-low.c (linux_arch_setup): New function.
4557 (linux_low_filter_event): If proc->tdesc is NULL and
4558 proc->attached is true, call the_low_target.arch_setup.
4559 Otherwise, keep status pending, and return.
4560 (linux_resume_one_lwp_throw): Don't call get_pc if
4561 thread->while_stepping isn't NULL. Don't call
4562 get_thread_regcache if proc->tdesc is NULL.
4563 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4564 (linux_target_ops): Install arch_setup.
4565 * server.c (start_inferior): Call the_target->arch_setup.
4566 * target.h (struct target_ops) <arch_setup>: New field.
4567 (target_arch_setup): New marco.
4568 * lynx-low.c (lynx_target_ops): Update.
4569 * nto-low.c (nto_target_ops): Update.
4570 * spu-low.c (spu_target_ops): Update.
4571 * win32-low.c (win32_target_ops): Update.
4572
5ae3ebba
YQ
45732015-07-24 Yao Qi <yao.qi@linaro.org>
4574
4575 * linux-low.c (linux_add_process): Don't set
4576 proc->priv->new_inferior.
4577 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4578 (linux_attach): Likewise.
4579
eb97750b
YQ
45802015-07-24 Yao Qi <yao.qi@linaro.org>
4581
4582 * server.c (start_inferior): Code refactor.
4583
51aee833
YQ
45842015-07-24 Yao Qi <yao.qi@linaro.org>
4585
4586 * server.c (process_serial_event): Set general_thread.
4587
af1b22f3
YQ
45882015-07-21 Yao Qi <yao.qi@linaro.org>
4589
4590 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4591 aarch64_linux_get_debug_reg_capacity.
4592
554717a3
YQ
45932015-07-17 Yao Qi <yao.qi@linaro.org>
4594
4595 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4596 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4597 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4598 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4599 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4600 (AARCH64_HWP_ALIGNMENT): Likewise.
4601 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4602 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4603 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4604 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4605 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4606 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4607 (struct aarch64_debug_reg_state): Likewise.
4608 (struct arch_lwp_info): Likewise.
4609 (aarch64_align_watchpoint): Likewise.
4610 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4611 (aarch64_watchpoint_length): Likewise.
4612 (aarch64_point_encode_ctrl_reg): Likewise
4613 (aarch64_point_is_aligned): Likewise.
4614 (aarch64_align_watchpoint): Likewise.
4615 (aarch64_linux_set_debug_regs):
4616 (aarch64_dr_state_insert_one_point): Likewise.
4617 (aarch64_dr_state_remove_one_point): Likewise.
4618 (aarch64_handle_breakpoint): Likewise.
4619 (aarch64_handle_aligned_watchpoint): Likewise.
4620 (aarch64_handle_unaligned_watchpoint): Likewise.
4621 (aarch64_handle_watchpoint): Likewise.
4622
c67ca4de
YQ
46232015-07-17 Yao Qi <yao.qi@linaro.org>
4624
4625 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4626 and don't aarch64_get_debug_reg_state. All callers update.
4627 (aarch64_handle_aligned_watchpoint): Likewise.
4628 (aarch64_handle_unaligned_watchpoint): Likewise.
4629 (aarch64_handle_watchpoint): Likewise.
4630 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4631 (aarch64_remove_point): Likewise.
4632
25abf979
YQ
46332015-07-17 Yao Qi <yao.qi@linaro.org>
4634
4635 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4636 debug_printf.
4637 (aarch64_handle_unaligned_watchpoint): Likewise.
4638
db1ff28b
JK
46392015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4640
4641 Revert the previous 3 commits:
4642 Move gdb_regex* to common/
4643 Move linux_find_memory_regions_full & co.
4644 gdbserver build-id attribute generator
4645
700ca40f
JK
46462015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4647 Jan Kratochvil <jan.kratochvil@redhat.com>
4648
4649 gdbserver build-id attribute generator.
4650 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4651 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4652 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4653 (find_phdr): New.
4654 (get_dynamic): Use find_pdhr to traverse program headers.
4655 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4656 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4657 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4658 (get_hex_build_id): New.
4659 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4660 to reply XML document.
4661
9904185c
JK
46622015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4663 Jan Kratochvil <jan.kratochvil@redhat.com>
4664
4665 * target.c: Include target/target-utils.h and fcntl.h.
4666 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4667 (target_fileio_read_stralloc): New functions.
4668
6e5b4429
JK
46692015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4670
4671 * Makefile.in (OBS): Add gdb_regex.o.
4672 (gdb_regex.o): New.
4673 * config.in: Rebuilt.
4674 * configure: Rebuilt.
4675
ddc98fbf
JK
46762015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4677 Jan Kratochvil <jan.kratochvil@redhat.com>
4678
4679 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4680 * Makefile.in (OBS): Add target-utils.o.
4681 (linux-maps.o, target-utils.o): New.
4682 * configure.srv (srv_linux_obj): Add linux-maps.o.
4683
e57bb7a0
PL
46842015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4685
4686 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4687 function, return 1.
4688 (the_low_target): Install it.
4689
586b02a9
PA
46902015-07-14 Pedro Alves <palves@redhat.com>
4691
4692 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4693 Instead, ignore ECHILD, and throw an error for other errnos.
4694
58c1b36c
PA
46952015-07-10 Pedro Alves <palves@redhat.com>
4696
4697 * event-loop.c (struct callback_event) <data>: Change type to
4698 gdb_client_data instance instead of gdb_client_data pointer.
4699 (append_callback_event): Adjust.
4700
421530db
PL
47012015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4702
4703 * linux-aarch64-low.c: Add comments for each linux_target_ops
4704 method. Remove comments already covered in target_ops and
4705 linux_target_ops definitions.
4706 (the_low_target): Add comments for each unimplemented method.
4707
c2d65f38
YQ
47082015-07-09 Yao Qi <yao.qi@linaro.org>
4709
4710 * linux-aarch64-low.c (aarch64_regmap): Remove.
4711 (aarch64_usrregs_info): Remove.
4712 (regs_info): Set field usrregs to NULL.
4713
b20a6524
MM
47142015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4715
4716 * linux-low.c: Include "rsp-low.h"
4717 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4718 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4719 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4720 (handle_btrace_enable_pt): New.
4721 (handle_btrace_general_set): Support "pt".
4722 (handle_btrace_conf_general_set): Support "pt:size".
4723
96c97461
PL
47242015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4725
4726 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4727 Z_PACKET_SW_BP.
4728
37d66942
PL
47292015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4730
4731 * linux-aarch64-low.c: Remove comment about endianness.
4732 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4733 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4734 memcmp.
4735
dc06243f
GB
47362015-06-24 Gary Benson <gbenson@redhat.com>
4737
4738 * linux-i386-ipa.c (stdint.h): Do not include.
4739 * lynx-i386-low.c (stdint.h): Likewise.
4740 * lynx-ppc-low.c (stdint.h): Likewise.
4741 * mem-break.c (stdint.h): Likewise.
4742 * thread-db.c (stdint.h): Likewise.
4743 * tracepoint.c (stdint.h): Likewise.
4744 * win32-low.c (stdint.h): Likewise.
4745
124e13d9
SM
47462015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4747
4748 * server.c (write_qxfer_response): Update call to
4749 remote_escape_output.
4750
909c2cda
JK
47512015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4752 Jan Kratochvil <jan.kratochvil@redhat.com>
4753
4754 Merge multiple hex conversions.
4755 * gdbreplay.c (tohex): Rename to 'fromhex'.
4756 (logchar): Use fromhex.
4757
24c05f46
JK
47582015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4759
4760 * server.c (handle_qxfer_libraries): Set `version' attribute for
4761 <library-list>.
4762
14d2069a
GB
47632015-06-10 Gary Benson <gbenson@redhat.com>
4764
4765 * target.h (struct target_ops) <multifs_open>: New field.
4766 <multifs_unlink>: Likewise.
4767 <multifs_readlink>: Likewise.
4768 * linux-low.c (nat/linux-namespaces.h): New include.
4769 (linux_target_ops): Initialize the_target->multifs_open,
4770 the_target->multifs_unlink and the_target->multifs_readlink.
4771 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4772 * hostio.c (hostio_fs_pid): New static variable.
4773 (hostio_handle_new_gdb_connection): New function.
4774 (handle_setfs): Likewise.
4775 (handle_open): Use the_target->multifs_open as appropriate.
4776 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4777 (handle_readlink): Use the_target->multifs_readlink as
4778 appropriate.
4779 (handle_vFile): Handle vFile:setfs packets.
4780 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4781 after target_handle_new_gdb_connection.
4782
4b8b5e72
GB
47832015-06-10 Gary Benson <gbenson@redhat.com>
4784
4785 * configure.ac (AC_CHECK_FUNCS): Add setns.
4786 * config.in: Regenerate.
4787 * configure: Likewise.
4788 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4789 (linux-namespaces.o): New rule.
4790 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4791
3ac2e371
GB
47922015-06-09 Gary Benson <gbenson@redhat.com>
4793
4794 * hostio.c (handle_open): Process mode argument with
4795 fileio_to_host_mode.
4796
ca9b78ce
YQ
47972015-06-01 Yao Qi <yao.qi@linaro.org>
4798
4799 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4800 * linux-x86-low.c: Likewise.
4801
bfacd19d
DB
48022015-05-28 Don Breazeal <donb@codesourcery.com>
4803
4804 * linux-low.c (handle_extended_wait): Initialize
4805 thread_info.last_resume_kind for new fork children.
4806
452003ef
PA
48072015-05-15 Pedro Alves <palves@redhat.com>
4808
4809 * target.h (target_handle_new_gdb_connection): Rewrite using if
4810 wrapped in do/while.
4811
1041a03c
JB
48122015-05-14 Joel Brobecker <brobecker@adacore.com>
4813
4814 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4815 * configure, config.in: Regenerate.
4816 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4817 Declare typedef.
4818
c269dbdb
DB
48192015-05-12 Don Breazeal <donb@codesourcery.com>
4820
4821 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4822 PTRACE_EVENT_VFORK_DONE.
4823 (linux_low_ptrace_options, extended_event_reported): Add vfork
4824 events.
4825 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4826 and "vforkdone" for RSP 'T' Stop Reply Packet.
4827 * server.h (report_vfork_events): Declare
4828 global variable.
4829
3a8a0396
DB
48302015-05-12 Don Breazeal <donb@codesourcery.com>
4831
4832 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4833 (the_low_target) <new_fork>: Initialize new member.
4834 * linux-arm-low.c (arm_new_fork): New function.
4835 (the_low_target) <new_fork>: Initialize new member.
4836 * linux-low.c (handle_extended_wait): Call new target function
4837 new_fork.
4838 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4839 * linux-mips-low.c (mips_add_watchpoint): New function
4840 extracted from mips_insert_point.
4841 (the_low_target) <new_fork>: Initialize new member.
4842 (mips_linux_new_fork): New function.
4843 (mips_insert_point): Call mips_add_watchpoint.
4844 * linux-x86-low.c (x86_linux_new_fork): New function.
4845 (the_low_target) <new_fork>: Initialize new member.
4846
de0d863e
DB
48472015-05-12 Don Breazeal <donb@codesourcery.com>
4848
4849 * linux-low.c (handle_extended_wait): Implement return value,
4850 rename argument 'event_child' to 'event_lwp', handle
4851 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4852 (linux_low_ptrace_options): New function.
4853 (linux_low_filter_event): Call linux_low_ptrace_options,
4854 use different argument fo linux_enable_event_reporting,
4855 use return value from handle_extended_wait.
4856 (extended_event_reported): New function.
4857 (linux_wait_1): Call extended_event_reported and set
4858 status to report fork events.
4859 (linux_write_memory): Add pid to debug message.
4860 (reset_lwp_ptrace_options_callback): New function.
4861 (linux_handle_new_gdb_connection): New function.
4862 (linux_target_ops): Initialize new structure member.
4863 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4864 * lynx-low.c: Initialize new structure member.
4865 * remote-utils.c (prepare_resume_reply): Implement stop reason
4866 "fork" for "T" stop message.
4867 * server.c (handle_query): Call handle_new_gdb_connection.
4868 * server.h (report_fork_events): Declare global flag.
4869 * target.h (struct target_ops) <handle_new_gdb_connection>:
4870 New member.
4871 (target_handle_new_gdb_connection): New macro.
4872 * win32-low.c: Initialize new structure member.
4873
ddcbc397
DB
48742015-05-12 Don Breazeal <donb@codesourcery.com>
4875
4876 * mem-break.c (APPEND_TO_LIST): Define macro.
4877 (clone_agent_expr): New function.
4878 (clone_one_breakpoint): New function.
4879 (clone_all_breakpoints): New function.
4880 * mem-break.h: Declare new functions.
4881
89245bc0
DB
48822015-05-12 Don Breazeal <donb@codesourcery.com>
4883
4884 * linux-low.c (linux_supports_fork_events): New function.
4885 (linux_supports_vfork_events): New function.
4886 (linux_target_ops): Initialize new structure members.
4887 (initialize_low): Call linux_check_ptrace_features.
4888 * lynx-low.c (lynx_target_ops): Initialize new structure
4889 members.
4890 * server.c (report_fork_events, report_vfork_events):
4891 New global flags.
4892 (handle_query): Add new features to qSupported packet and
4893 response.
4894 (captured_main): Initialize new global variables.
4895 * target.h (struct target_ops) <supports_fork_events>:
4896 New member.
4897 <supports_vfork_events>: New member.
4898 (target_supports_fork_events): New macro.
4899 (target_supports_vfork_events): New macro.
4900 * win32-low.c (win32_target_ops): Initialize new structure
4901 members.
4902
835205d0
GB
49032015-05-12 Gary Benson <gbenson@redhat.com>
4904
4905 * server.c (handle_qxfer_exec_file): Use current process
4906 if annex is empty.
4907
21e94bd9
SL
49082015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4909
4910 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4911 Remove HAVE_PTRACE_GETREGS conditionals.
4912 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4913 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4914
45614f15
YQ
49152015-05-08 Yao Qi <yao.qi@linaro.org>
4916
4917 * linux-low.c (linux_supports_conditional_breakpoints): New
4918 function.
4919 (linux_target_ops): Install new target method.
4920 * lynx-low.c (lynx_target_ops): Install NULL hook for
4921 supports_conditional_breakpoints.
4922 * nto-low.c (nto_target_ops): Likewise.
4923 * spu-low.c (spu_target_ops): Likewise.
4924 * win32-low.c (win32_target_ops): Likewise.
4925 * server.c (handle_query): Check
4926 target_supports_conditional_breakpoints.
4927 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4928 New field.
4929 (target_supports_conditional_breakpoints): New macro.
4930
80ad801e
PA
49312015-05-06 Pedro Alves <palves@redhat.com>
4932
4933 PR server/18081
4934 * server.c (start_inferior): If the process exits, mourn it.
4935
819843c7
GB
49362015-04-21 Gary Benson <gbenson@redhat.com>
4937
4938 * hostio.c (fileio_open_flags_to_host): Factored out to
4939 fileio_to_host_openflags in common/fileio.c. Single use
4940 updated.
4941
a2d5a9d7
MF
49422015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4943
4944 * linux-xtensa-low.c (xtensa_fill_gregset)
4945 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4946 XCHAL_HAVE_LOOP.
4947
deb44829
MF
49482015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4949
4950 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4951 (regs_info): Replace usrregs pointer with NULL.
4952
e57f1de3
GB
49532015-04-17 Gary Benson <gbenson@redhat.com>
4954
4955 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4956 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4957 * server.c (handle_qxfer_exec_file): New function.
4958 (qxfer_packets): Add exec-file entry.
4959 (handle_query): Report qXfer:exec-file:read as supported packet.
4960
62828379
RN
49612015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4962
4963 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4964
b88bb450
GB
49652015-04-09 Gary Benson <gbenson@redhat.com>
4966
4967 * hostio-errno.c (errno_to_fileio_error): Remove function.
4968 Update caller to use remote_fileio_to_fio_error.
4969
c8f4bfdd
YQ
49702015-04-09 Yao Qi <yao.qi@linaro.org>
4971
4972 * linux-low.c (linux_insert_point): Call
4973 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4974 (linux_remove_point): Call remove_memory_breakpoint if type is
4975 raw_bkpt_type_sw.
4976 * linux-x86-low.c (x86_insert_point): Don't call
4977 insert_memory_breakpoint.
4978 (x86_remove_point): Don't call remove_memory_breakpoint.
4979
41f98f02
PA
49802015-04-01 Pedro Alves <palves@redhat.com>
4981 Cleber Rosa <crosa@redhat.com>
4982
4983 * server.c (gdbserver_usage): Reorganize and extend the usage
4984 message.
4985
2bf6fb9d
PA
49862015-03-24 Pedro Alves <palves@redhat.com>
4987
4988 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4989 output. Also dump TRAP_TRACE.
4990 (linux_low_filter_event): In debug output, distinguish a
4991 resume_stop SIGSTOP from a delayed SIGSTOP.
4992
369f6daa
GB
49932015-03-24 Gary Benson <gbenson@redhat.com>
4994
4995 * linux-x86-low.c (x86_linux_new_thread): Moved to
4996 nat/x86-linux.c.
4997 (x86_linux_prepare_to_resume): Likewise.
4998
8e5d4070
GB
49992015-03-24 Gary Benson <gbenson@redhat.com>
5000
5001 * Makefile.in (x86-linux-dregs.o): New rule.
5002 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5003 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5004 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5005 (x86_linux_dr_get): Likewise.
5006 (x86_linux_dr_set): Likewise.
5007 (update_debug_registers_callback): Likewise.
5008 (x86_linux_dr_set_addr): Likewise.
5009 (x86_linux_dr_get_addr): Likewise.
5010 (x86_linux_dr_set_control): Likewise.
5011 (x86_linux_dr_get_control): Likewise.
5012 (x86_linux_dr_get_status): Likewise.
5013 (x86_linux_update_debug_registers): Likewise.
5014
2b95d440
GB
50152015-03-24 Gary Benson <gbenson@redhat.com>
5016
5017 * linux-x86-low.c (x86_linux_update_debug_registers):
5018 New function, factored out from...
5019 (x86_linux_prepare_to_resume): ...this.
5020
14b0bc68
GB
50212015-03-24 Gary Benson <gbenson@redhat.com>
5022
5023 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5024 (x86_linux_dr_set): Likewise.
5025 (update_debug_registers_callback): Likewise.
5026 (x86_linux_dr_set_addr): Likewise.
5027 (x86_linux_dr_get_addr): Likewise.
5028 (x86_linux_dr_set_control): Likewise.
5029 (x86_linux_dr_get_control): Likewise.
5030 (x86_linux_dr_get_status): Likewise.
5031 (x86_linux_prepare_to_resume): Likewise.
5032
5dfe6ca8
GB
50332015-03-24 Gary Benson <gbenson@redhat.com>
5034
5035 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5036 Use perror_with_name. Pass string through gettext.
5037 (x86_linux_dr_set): Likewise.
5038
d33472ad
GB
50392015-03-24 Gary Benson <gbenson@redhat.com>
5040
5041 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5042 (x86_linux_dr_set_addr): ...this.
5043 (x86_dr_low_get_addr): Rename to...
5044 (x86_linux_dr_get_addr): ...this.
5045 (x86_dr_low_set_control): Rename to...
5046 (x86_linux_dr_set_control): ...this.
5047 (x86_dr_low_get_control): Rename to...
5048 (x86_linux_dr_get_control): ...this.
5049 (x86_dr_low_get_status): Rename to...
5050 (x86_linux_dr_get_status): ...this.
5051 (x86_dr_low): Update with new function names.
5052
4b134ca1
GB
50532015-03-24 Gary Benson <gbenson@redhat.com>
5054
5055 * Makefile.in (x86-linux.o): New rule.
5056 * configure.srv: Add x86-linux.o to relevant targets.
5057 * linux-low.c (lwp_set_arch_private_info): New function.
5058 (lwp_arch_private_info): Likewise.
5059 * linux-x86-low.c: Include nat/x86-linux.h.
5060 (arch_lwp_info): Removed structure.
5061 (update_debug_registers_callback):
5062 Use lwp_set_debug_registers_changed.
5063 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5064 and lwp_set_debug_registers_changed.
5065 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5066
34c703da
GB
50672015-03-24 Gary Benson <gbenson@redhat.com>
5068
5069 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5070 * linux-arm-low.c (arm_new_thread): Likewise.
5071 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5072 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5073 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5074 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5075
cff068da
GB
50762015-03-24 Gary Benson <gbenson@redhat.com>
5077
5078 * linux-low.c (ptid_of_lwp): New function.
5079 (lwp_is_stopped): Likewise.
5080 (lwp_stop_reason): Likewise.
5081 * linux-x86-low.c (update_debug_registers_callback):
5082 Use lwp_is_stopped.
5083 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5084 lwp_stop_reason.
5085
b2f7c7e8
GB
50862015-03-24 Gary Benson <gbenson@redhat.com>
5087
5088 * linux-low.h (linux_stop_lwp): Remove declaration.
5089
6d4ee8c6
GB
50902015-03-24 Gary Benson <gbenson@redhat.com>
5091
5092 * linux-low.h: Include nat/linux-nat.h.
5093 * linux-low.c (iterate_over_lwps_args): New structure.
5094 (iterate_over_lwps_filter): New function.
5095 (iterate_over_lwps): Likewise.
5096 * linux-x86-low.c (update_debug_registers_callback):
5097 Update signature to what iterate_over_lwps expects.
5098 Remove PID check that iterate_over_lwps now performs.
5099 (x86_dr_low_set_addr): Use iterate_over_lwps.
5100 (x86_dr_low_set_control): Likewise.
5101
70a0bb6b
GB
51022015-03-24 Gary Benson <gbenson@redhat.com>
5103
5104 * linux-x86-low.c (x86_debug_reg_state): New function.
5105 (x86_linux_prepare_to_resume): Use the above.
5106
7b669087
GB
51072015-03-24 Gary Benson <gbenson@redhat.com>
5108
5109 * linux-low.c (current_lwp_ptid): New function.
5110 * linux-x86-low.c: Include nat/linux-nat.h.
5111 (x86_dr_low_get_addr): Use current_lwp_ptid.
5112 (x86_dr_low_get_control): Likewise.
5113 (x86_dr_low_get_status): Likewise.
5114
eef49a3d
PA
51152015-03-20 Pedro Alves <palves@redhat.com>
5116
5117 * tracepoint.c (cmd_qtstatus): Make "str" const.
5118
b2333d22
PA
51192015-03-20 Pedro Alves <palves@redhat.com>
5120
5121 * server.c (handle_general_set): Make "req_str" const.
5122
23f238d3
PA
51232015-03-19 Pedro Alves <palves@redhat.com>
5124
5125 * linux-low.c (linux_resume_one_lwp): Rename to ...
5126 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5127 instead call perror_with_name.
5128 (check_ptrace_stopped_lwp_gone): New function.
5129 (linux_resume_one_lwp): Reimplement as wrapper around
5130 linux_resume_one_lwp_throw that swallows errors if the LWP is
5131 gone.
5132
91baf43f
PA
51332015-03-19 Pedro Alves <palves@redhat.com>
5134
5135 * linux-low.c (count_events_callback, select_event_lwp_callback):
5136 No longer check whether the thread has resume_stop as last resume
5137 kind.
5138
8bf3b159
PA
51392015-03-19 Pedro Alves <palves@redhat.com>
5140
5141 * linux-low.c (count_events_callback, select_event_lwp_callback):
5142 Use the lwp's status_pending_p field, not the thread's.
5143
b90fc188
PA
51442015-03-19 Pedro Alves <palves@redhat.com>
5145
5146 * linux-low.c (select_event_lwp_callback): Update comments to
5147 no longer mention SIGTRAP.
5148
464b0089
GB
51492015-03-18 Gary Benson <gbenson@redhat.com>
5150
5151 * server.c (handle_query): Do not report vFile:fstat as supported.
5152
aa9e327f
GB
51532015-03-11 Gary Benson <gbenson@redhat.com>
5154
5155 * hostio.c (sys/types.h): New include.
5156 (sys/stat.h): Likewise.
5157 (common-remote-fileio.h): Likewise.
5158 (handle_fstat): New function.
5159 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5160
791c0056
GB
51612015-03-11 Gary Benson <gbenson@redhat.com>
5162
5163 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5164 struct stat.st_blocks and struct stat.st_blksize.
5165 * configure: Regenerate.
5166 * config.in: Likewise.
5167 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5168 (OBS): Add common-remote-fileio.o.
5169 (common-remote-fileio.o): New rule.
5170
9a9df970
PA
51712015-03-09 Pedro Alves <palves@redhat.com>
5172
5173 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5174 'struct sockaddr' pointer in 'accept' call.
5175
9eb1356e
PA
51762015-03-09 Pedro Alves <palves@redhat.com>
5177
5178 Revert:
5179 2015-03-07 Pedro Alves <palves@redhat.com>
5180 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5181 or <winsock2.h> here. Instead include "gdb_socket.h".
5182 (remote_open): Use union gdb_sockaddr_u.
5183 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5184 or <winsock2.h> here. Instead include "gdb_socket.h".
5185 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5186 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5187 or <sys/un.h>.
5188 (init_named_socket, gdb_agent_helper_thread): Use union
5189 gdb_sockaddr_u.
5190
aac331e4
PA
51912015-03-07 Pedro Alves <palves@redhat.com>
5192
5193 * configure.ac (build_warnings): Move
5194 -Wdeclaration-after-statement to the C-specific set.
5195 * configure: Regenerate.
5196
366c75fc
PA
51972015-03-07 Pedro Alves <palves@redhat.com>
5198
5199 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5200 or <winsock2.h> here. Instead include "gdb_socket.h".
5201 (remote_open): Use union gdb_sockaddr_u.
5202 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5203 or <winsock2.h> here. Instead include "gdb_socket.h".
5204 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5205 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5206 or <sys/un.h>.
5207 (init_named_socket, gdb_agent_helper_thread): Use union
5208 gdb_sockaddr_u.
5209
492d29ea
PA
52102015-03-07 Pedro Alves <palves@redhat.com>
5211
5212 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5213 instead.
5214
60a191ed
YQ
52152015-03-06 Yao Qi <yao.qi@linaro.org>
5216
5217 * linux-aarch64-low.c (aarch64_insert_point): Use
5218 show_debug_regs as a boolean.
5219 (aarch64_remove_point): Likewise.
5220
f5771b1d
PA
52212015-03-05 Pedro Alves <palves@redhat.com>
5222
5223 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5224 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5225 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5226 * nto-low.c (nto_target_ops): Likewise.
5227 * spu-low.c (spu_target_ops): Likewise.
5228 * win32-low.c (win32_target_ops): Likewise.
5229
3e572f71
PA
52302015-03-04 Pedro Alves <palves@redhat.com>
5231
72f4393d 5232 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5233 Decide whether a breakpoint triggered based on the SIGTRAP's
5234 siginfo.si_code.
72f4393d
L
5235 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5236 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5237 (linux_low_filter_event): Check for breakpoints before checking
5238 watchpoints.
5239 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5240 siginfo.si_code.
72f4393d
L
5241 (linux_stopped_by_sw_breakpoint)
5242 (linux_supports_stopped_by_sw_breakpoint)
5243 (linux_stopped_by_hw_breakpoint)
5244 (linux_supports_stopped_by_hw_breakpoint): New functions.
5245 (linux_target_ops): Install new target methods.
3e572f71 5246
1ec68e26
PA
52472015-03-04 Pedro Alves <palves@redhat.com>
5248
5249 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5250 * server.c (swbreak_feature, hwbreak_feature): New globals.
5251 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5252 (captured_main): Clear swbreak_feature and hwbreak_feature.
5253 * server.h (swbreak_feature, hwbreak_feature): Declare.
5254 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5255 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5256 supports_stopped_by_hw_breakpoint>: New fields.
5257 (target_supports_stopped_by_sw_breakpoint)
5258 (target_stopped_by_sw_breakpoint)
5259 (target_supports_stopped_by_hw_breakpoint)
5260 (target_stopped_by_hw_breakpoint): Declare.
5261
15c66dd6
PA
52622015-03-04 Pedro Alves <palves@redhat.com>
5263
5264 enum lwp_stop_reason -> enum target_stop_reason
5265 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5266 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5267 (linux_wait_1, stuck_in_jump_pad_callback)
5268 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5269 (linux_stopped_by_watchpoint):
5270 * linux-low.h (enum lwp_stop_reason): Delete.
5271 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5272 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5273
98fc70d6
YQ
52742015-03-04 Yao Qi <yao.qi@linaro.org>
5275
5276 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5277
dd2ac174
GB
52782015-03-03 Gary Benson <gbenson@redhat.com>
5279
5280 * hostio.c (handle_vFile): Fix prefix lengths.
5281
d68e53f4
MM
52822015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5283
5284 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5285 ptr_bits.
5286
bf2d68ab
AA
52872015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5288
5289 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5290 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5291 (clean): Add "rm -f" for above C files.
5292 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5293 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5294 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5295 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5296 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5297 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5298 (init_registers_s390x_vx_linux64)
5299 (init_registers_s390x_tevx_linux64)
5300 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5301 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5302 declarations.
5303 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5304 (s390_store_vxrs_high): New functions.
5305 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5306 NT_S390_VXRS_HIGH.
5307 (s390_arch_setup): Add logic for selecting one of the new target
5308 descriptions. Activate the new vector regsets if applicable.
5309 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5310 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5311 and init_registers_s390x_tevx_linux64.
5312
c966a859
PA
53132015-03-01 Pedro Alves <palves@redhat.com>
5314
5315 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5316 parameter.
5317
4180215b
PA
53182015-02-27 Pedro Alves <palves@redhat.com>
5319
5320 * linux-x86-low.c (u_debugreg_offset): New function.
5321 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5322
749bab01
PA
53232015-02-27 Pedro Alves <palves@redhat.com>
5324
5325 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5326 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5327 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5328 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5329 (ps_lsetfpregs, ps_getpid)
5330 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5331 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5332 (ps_lsetxregs, ps_plog): Declare.
5333
3c14e5a3
PA
53342015-02-27 Pedro Alves <palves@redhat.com>
5335
5336 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5337 IP_AGENT_EXPORT_FUNC.
5338 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5339 IP_AGENT_EXPORT_FUNC.
5340 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5341 (IP_AGENT_EXPORT): Delete.
5342 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5343 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5344 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5345 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5346 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5347 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5348 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5349 (traceframe_read_count, traceframe_write_count)
5350 (traceframes_created, trace_state_variables, get_raw_reg)
5351 (get_trace_state_variable_value, set_trace_state_variable_value)
5352 (ust_loaded, helper_thread_id, cmd_buf): Use
5353 IPA_SYM_EXPORTED_NAME.
5354 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5355 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5356 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5357 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5358 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5359 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5360 EXTERN_C_PUSH/EXTERN_C_POP.
5361 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5362 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5363 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5364 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5365 (traceframe_write_count, traceframe_read_count)
5366 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5367 (about_to_request_buffer_space, get_trace_state_variable_value)
5368 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5369 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5370 EXTERN_C_PUSH/EXTERN_C_POP.
5371 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5372 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5373 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5374 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5375 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5376 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5377 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5378 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5379 Define.
5380 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5381 (IP_AGENT_EXPORT_VAR_DECL): Define.
5382 (tracing): Declare.
5383 (gdb_agent_get_raw_reg): Declare.
5384
fe978cb0
PA
53852015-02-27 Tom Tromey <tromey@redhat.com>
5386 Pedro Alves <palves@redhat.com>
5387
5388 Rename symbols whose names are reserved C++ keywords throughout.
5389
3bc3d82a
PA
53902015-02-27 Pedro Alves <palves@redhat.com>
5391
5392 * Makefile.in (COMPILER): New, get it from autoconf.
5393 (CXX): Get from autoconf instead.
5394 (COMPILE.pre): Use COMPILER.
5395 (CC-LD): Rename to ...
5396 (CC_LD): ... this. Use COMPILER.
5397 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5398 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5399 * acinclude.m4: Include build-with-cxx.m4.
5400 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5401 Disable -Werror by default if building in C++ mode.
5402 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5403 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5404 the C++ compiler. Save/restore CXXFLAGS too.
5405 * configure: Regenerate.
5406
07697489
PA
54072015-02-27 Pedro Alves <palves@redhat.com>
5408
5409 * acinclude.m4: Include libiberty.m4.
5410 * configure.ac: Call libiberty_INIT.
5411 * config.in, configure: Regenerate.
5412
9beb7c4e
PA
54132015-02-26 Pedro Alves <palves@redhat.com>
5414
5415 * linux-low.c (linux_wait_1): When incrementing the PC past a
5416 program breakpoint always use the_low_target.breakpoint_len as
5417 increment, rather than the maximum between that and
5418 the_low_target.decr_pc_after_break.
5419
8090aef2
PA
54202015-02-23 Pedro Alves <palves@redhat.com>
5421
5422 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5423 thread was doing a step-over; always adjust the PC if
5424 we stepped over a permanent breakpoint.
5425 (linux_wait_1): If we stepped over breakpoint that was on top of a
5426 permanent breakpoint, manually advance the PC past it.
5427
bc9540e8
PA
54282015-02-23 Pedro Alves <palves@redhat.com>
5429
5430 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5431 modes.
5432 (x86_fill_gregset, x86_store_gregset): Use it when handling
5433 $orig_eax.
5434
2db9a427
PA
54352015-02-20 Pedro Alves <palves@redhat.com>
5436
5437 * thread-db.c: Include "nat/linux-procfs.h".
5438 (thread_db_init): Skip listing new threads if the kernel supports
5439 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5440
afa8d396
PA
54412015-02-20 Pedro Alves <palves@redhat.com>
5442
5443 * linux-low.c (status_pending_p_callback): Use ptid_match.
5444
c9587f88
AT
54452015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5446
5447 PR breakpoints/16812
5448 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5449 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5450 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5451
b05ec7a5
AT
54522015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5453
5454 PR breakpoints/15956
5455 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5456
d33501a5
MM
54572015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5458
5459 * linux-low.c (linux_low_btrace_conf): Print size.
5460 * server.c (handle_btrace_conf_general_set): New.
5461 (hanle_general_set): Call handle_btrace_conf_general_set.
5462 (handle_query): Report Qbtrace-conf:bts:size as supported.
5463
f4abbc16
MM
54642015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5465
5466 * linux-low.c (linux_low_enable_btrace): Update parameters.
5467 (linux_low_btrace_conf): New.
5468 (linux_target_ops)<to_btrace_conf>: Initialize.
5469 * server.c (current_btrace_conf): New.
5470 (handle_btrace_enable): Rename to ...
5471 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5472 to target_enable_btrace. Update comment. Update users.
5473 (handle_qxfer_btrace_conf): New.
5474 (qxfer_packets): Add btrace-conf entry.
5475 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5476 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5477 (target_ops)<read_btrace_conf>: New.
5478 (target_enable_btrace): Update parameters.
5479 (target_read_btrace_conf): New.
5480
043c3577
MM
54812015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5482
5483 * server.c (handle_btrace_general_set): Remove call to
5484 target_supports_btrace.
5485 (supported_btrace_packets): New.
5486 (handle_query): Call supported_btrace_packets.
5487 * target.h: include btrace-common.h.
5488 (btrace_target_info): Removed.
5489 (supports_btrace, target_supports_btrace): Update parameters.
5490
734b0e4b
MM
54912015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5492
5493 * Makefile.in (SFILES): Add common/btrace-common.c.
5494 (OBS): Add common/btrace-common.o.
5495 (btrace-common.o): Add build rules.
5496 * linux-low: Include btrace-common.h.
5497 (linux_low_read_btrace): Use struct btrace_data. Call
5498 btrace_data_init and btrace_data_fini.
5499
d6c146e9
PA
55002015-02-06 Pedro Alves <palves@redhat.com>
5501
5502 * thread-db.c (find_new_threads_callback): Add debug output.
5503
20ba1ce6
PA
55042015-02-04 Pedro Alves <palves@redhat.com>
5505
5506 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5507 (resume_stopped_resumed_lwps): New function.
5508 (linux_wait_for_event_filtered): Use it.
5509
8cc73a39
SDJ
55102015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5511
5512 * Makefile.in (SFILES): Add linux-personality.c.
5513 (linux-personality.o): New rule.
5514 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5515 list of objects to be built.
5516 * linux-low.c: Include nat/linux-personality.h.
5517 (linux_create_inferior): Remove code to disable address space
5518 randomization (moved to ../nat/linux-personality.c). Create
5519 cleanup to disable address space randomization.
5520
fb23d554
SDJ
55212015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5522
5523 * Makefile.in (posix-strerror.o): New rule.
5524 (mingw-strerror.o): Likewise.
5525 * configure: Regenerated.
5526 * configure.ac: Source file ../common/common.host. Initialize new
5527 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5528
cdf43629
YQ
55292015-01-14 Yao Qi <yao@codesourcery.com>
5530
5531 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5532 (ppc-linux.o): New rule.
5533 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5534 * configure.ac: AC_CHECK_FUNCS(getauxval).
5535 * config.in: Re-generated.
5536 * configure: Re-generated.
5537 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5538 ppc64_64bit_inferior_p
5539
514c5338
YQ
55402015-01-14 Yao Qi <yao@codesourcery.com>
5541
5542 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5543 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5544 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5545 (PT_ORIG_R3, PT_TRAP): Likewise.
5546 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5547 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5548 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5549
3368c1e5
JB
55502015-01-10 Joel Brobecker <brobecker@adacore.com>
5551
5552 * i387-fp.c (i387_cache_to_xsave): In look over
5553 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5554 zmmh_low_space field by use of zmmh_high_space.
5555
582511be
PA
55562015-01-09 Pedro Alves <palves@redhat.com>
5557
5558 * linux-low.c (step_over_bkpt): Move higher up in the file.
5559 (handle_extended_wait): Don't store the stop_pc here.
5560 (get_stop_pc): Adjust comments and rename to ...
5561 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5562 stopped for a software breakpoint or hardware breakpoint.
5563 (thread_still_has_status_pending_p): New function.
5564 (status_pending_p_callback): Use
5565 thread_still_has_status_pending_p. If the event is no longer
5566 interesting, resume the LWP.
5567 (handle_tracepoints): Add assert.
5568 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5569 (wstatus_maybe_breakpoint): New function.
5570 (cancel_breakpoint): Delete function.
5571 (check_stopped_by_watchpoint): New function, factored out from
5572 linux_low_filter_event.
5573 (lp_status_maybe_breakpoint): Delete function.
5574 (linux_low_filter_event): Remove filter_ptid argument.
5575 Leave thread group exits pending here. Store the LWP's stop PC.
5576 Always leave events pending.
5577 (linux_wait_for_event_filtered): Pull all events out of the
5578 kernel, and leave them all pending.
5579 (count_events_callback, select_event_lwp_callback): Consider all
5580 events.
5581 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5582 (select_event_lwp): Only give preference to the stepping LWP in
5583 all-stop mode. Adjust comments.
5584 (ignore_event): New function.
5585 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5586 references to cancel_breakpoints. Adjust to renames. Also give
5587 equal priority to all LWPs that have had events in non-stop mode.
5588 If reporting a software breakpoint event, unadjust the LWP's PC.
5589 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5590 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5591 Adjust.
5592 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5593 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5594 (linux_stopped_by_watchpoint): Adjust.
5595 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5596 * linux-low.h (enum lwp_stop_reason): New.
5597 (struct lwp_info) <stop_pc>: Adjust comment.
5598 <stopped_by_watchpoint>: Delete field.
5599 <stop_reason>: New field.
5600 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5601 * mem-break.c (software_breakpoint_inserted_here)
5602 (hardware_breakpoint_inserted_here): New function.
5603 * mem-break.h (software_breakpoint_inserted_here)
5604 (hardware_breakpoint_inserted_here): Declare.
5605 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5606 (cancel_breakpoints): Delete.
5607 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5608 (upload_fast_traceframes): Remove references to
5609 cancel_breakpoints.
5610
a33e3959
PA
56112015-01-09 Pedro Alves <palves@redhat.com>
5612
5613 * thread-db.c (find_new_threads_callback): Ignore thread if the
5614 kernel thread ID is -1.
5615
8784d563
PA
56162015-01-09 Pedro Alves <palves@redhat.com>
5617
5618 * linux-low.c (linux_attach_fail_reason_string): Move to
5619 nat/linux-ptrace.c, and rename.
5620 (linux_attach_lwp): Update comment.
5621 (attach_proc_task_lwp_callback): New function.
5622 (linux_attach): Adjust to rename and use
5623 linux_proc_attach_tgid_threads.
5624 (linux_attach_fail_reason_string): Delete declaration.
5625
76f2b779
JB
56262015-01-01 Joel Brobecker <brobecker@adacore.com>
5627
5628 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5629 * server.c (gdbserver_version): Likewise.
5630
fafcc06a
SDJ
56312014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5632
5633 * remote-utils.c: Include ctype.h.
5634 (input_interrupt): Explicitly handle the case when the char
5635 received is the NUL byte. Improve the printing of non-ASCII
5636 characters.
5637
beed38b8
JB
56382014-12-16 Joel Brobecker <brobecker@adacore.com>
5639
5640 * linux-low.c (linux_low_filter_event): Update call to
5641 linux_enable_event_reporting following the addition of
5642 a new parameter to that function.
5643
bf330350
CU
56442014-12-16 Catalin Udma <catalin.udma@freescale.com>
5645
5646 PR server/17457
5647 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5648 (AARCH64_FPCR_REGNO): Likewise.
5649 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5650 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5651 (aarch64_store_fpregset): Likewise.
5652
5227d625
JB
56532014-12-15 Joel Brobecker <brobecker@adacore.com>
5654
5655 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5656 Remove FIXME comment about assumption about N.
5657
f93b65a0
JB
56582014-12-13 Joel Brobecker <brobecker@adacore.com>
5659
5660 * configure.ac: If large-file support is disabled in GDBserver,
5661 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5662 * configure: Regenerate.
5663
e5a9158d
AA
56642014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5665
5666 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5667 warning upon ENODATA from ptrace.
5668 * linux-s390-low.c (s390_store_tdb): New.
5669 (s390_regsets): Add regset for NT_S390_TDB.
5670
feea5f36
AA
56712014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5672
5673 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5674 without a fill_function.
5675 * linux-s390-low.c (s390_fill_last_break): Remove.
5676 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5677 (s390_arch_setup): Use regset's size instead of fill_function for
5678 loop end condition.
5679
098dbe61
AA
56802014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5681
5682 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5683 the regset's store function when ptrace returned an error.
5684 * regcache.c (get_thread_regcache): Invalidate register cache
5685 before fetching inferior's registers.
5686
28eef672
AA
56872014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5688
5689 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5690 while-loop as for-loop.
5691 (regsets_store_inferior_registers): Likewise.
5692
bdca27a2
YQ
56932014-11-28 Yao Qi <yao@codesourcery.com>
5694
5695 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5696 * config.in, configure: Re-generate.
5697 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5698 is defined.
5699
9c232dda
YQ
57002014-11-21 Yao Qi <yao@codesourcery.com>
5701
5702 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5703 (AC_CHECK_HEADERS): Remove malloc.h.
5704 * configure: Re-generated.
5705 * config.in: Re-generated.
5706 * server.h: Don't include alloca.h and malloc.h.
5707 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5708 Don't include malloc.h.
5709
43968415
JB
57102014-11-17 Joel Brobecker <brobecker@adacore.com>
5711
5712 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5713 corresponding ERRNO check in same block.
5714
40e91bc7
PA
57152014-11-12 Pedro Alves <palves@redhat.com>
5716
5717 * server.c (cont_thread): Update comment.
5718 (start_inferior, attach_inferior): No longer clear cont_thread.
5719 (handle_v_cont): No longer set cont_thread.
5720 (captured_main): Clear cont_thread each time a GDB connects.
5721
c2c118cf
PA
57222014-11-12 Pedro Alves <palves@redhat.com>
5723
5724 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5725 thread, and don't resume all threads if the Hc thread has exited.
5726
78708b7c
PA
57272014-11-12 Pedro Alves <palves@redhat.com>
5728
5729 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5730 the process group instead of to a specific LWP.
5731
a2abc7de
PA
57322014-10-15 Pedro Alves <palves@redhat.com>
5733
5734 PR server/17487
5735 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5736 parameter.
5737 (arm_set_thread_context): Delete.
5738 (the_low_target): Adjust.
5739 * win32-i386-low.c (debug_registers_changed)
5740 (debug_registers_used): Delete.
5741 (update_debug_registers_callback): New function.
5742 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5743 needing to update their debug registers.
5744 (win32_get_current_dr): New function.
5745 (x86_dr_low_get_addr, x86_dr_low_get_control)
5746 (x86_dr_low_get_status): Fetch the debug register from the thread
5747 record's context.
5748 (i386_initial_stuff): Adjust.
5749 (i386_get_thread_context): Remove current_event parameter. Don't
5750 clear debug_registers_changed nor copy DR values to
5751 debug_reg_state.
5752 (i386_set_thread_context): Delete.
5753 (i386_prepare_to_resume): New function.
5754 (i386_thread_added): Mark the thread as needing to update irs
5755 debug registers.
5756 (the_low_target): Remove i386_set_thread_context and install
5757 i386_prepare_to_resume.
5758 * win32-low.c (win32_get_thread_context): Adjust.
5759 (win32_set_thread_context): Use SetThreadContext
5760 directly.
5761 (win32_prepare_to_resume): New function.
5762 (win32_require_context): New function, factored out from ...
5763 (thread_rec): ... this.
5764 (continue_one_thread): Call win32_prepare_to_resume on each thread
5765 we're about to continue.
5766 (win32_resume): Call win32_prepare_to_resume on the event thread.
5767 * win32-low.h (struct win32_thread_info)
5768 <debug_registers_changed>: New field.
5769 (struct win32_target_ops): Change prototype of set_thread_context,
5770 delete set_thread_context and add prepare_to_resume.
5771 (win32_require_context): New declaration.
5772
a442d071
GB
57732014-10-08 Gary Benson <gbenson@redhat.com>
5774
5775 * server.h: Do not include common-exceptions.h.
5776
6f1947e8
GB
57772014-10-08 Gary Benson <gbenson@redhat.com>
5778
5779 * server.h: Do not include cleanups.h.
5780
63b434a4
JH
57812014-09-30 James Hogan <james.hogan@imgtec.com>
5782
5783 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5784 mips64-dsp-linux.c.
5785
c4d9ceb6
YQ
57862014-09-23 Yao Qi <yao@codesourcery.com>
5787
5788 * linux-low.c (lp_status_maybe_breakpoint): New function.
5789 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5790 (count_events_callback): Likewise.
5791 (select_event_lwp_callback): Likewise.
5792 (cancel_breakpoints_callback): Likewise.
5793
89a5711c
DB
57942014-09-19 Don Breazeal <donb@codesourcery.com>
5795
5796 * linux-low.c (handle_extended_wait): Call
5797 linux_ptrace_get_extended_event.
5798 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5799 linux_is_extended_waitstatus.
5800
bffc0964
JB
58012014-09-16 Joel Brobecker <brobecker@adacore.com>
5802
5803 * Makefile.in (CPPFLAGS): Define.
5804 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5805 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5806
0bfdf32f
GB
58072014-09-16 Gary Benson <gbenson@redhat.com>
5808
5809 * inferiors.h (current_inferior): Renamed as...
5810 (current_thread): New variable. All uses updated.
5811 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5812 (maybe_move_out_of_jump_pad): Likewise.
5813 (cancel_breakpoint): Likewise.
5814 (linux_low_filter_event): Likewise.
5815 (wait_for_sigstop): Likewise.
5816 (linux_resume_one_lwp): Likewise.
5817 (need_step_over_p): Likewise.
5818 (start_step_over): Likewise.
5819 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5820 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5821 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5822 and save_inferior as saved_thread.
5823 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5824 saved_thread.
5825 (regcache_invalidate_thread): Likewise.
5826 * remote-utils.c (prepare_resume_reply): Likewise.
5827 * thread-db.c (thread_db_get_tls_address): Likewise.
5828 (disable_thread_event_reporting): Likewise.
5829 (remove_thread_event_breakpoints): Likewise.
5830 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5831 as saved_thread.
5832 * target.h (set_desired_inferior): Renamed as...
5833 (set_desired_thread): New declaration. All uses updated.
5834 * server.c (myresume): Updated comment to reference thread instead
5835 of inferior.
5836 (handle_serial_event): Likewise.
5837 (handle_target_event): Likewise.
5838
361c8ade
GB
58392014-09-12 Tom Tromey <tromey@redhat.com>
5840 Gary Benson <gbenson@redhat.com>
5841
5842 * regcache.h: Include common-regcache.h.
5843 (regcache_read_pc): Don't declare.
5844 * regcache.c (get_thread_regcache_for_ptid): New function.
5845
bd9269f7
GB
58462014-09-11 Tom Tromey <tromey@redhat.com>
5847 Gary Benson <gbenson@redhat.com>
5848
5849 * symbol.c: New file.
5850 * Makefile.in (SFILES): Add symbol.c.
5851 (OBS): Add symbol.o.
5852
f8c1d06b
GB
58532014-09-11 Gary Benson <gbenson@redhat.com>
5854
5855 * target.c (target_stop_ptid, target_continue_ptid): New
5856 functions.
5857
721ec300
GB
58582014-09-11 Tom Tromey <tromey@redhat.com>
5859 Gary Benson <gbenson@redhat.com>
5860
5861 * target.h: Include target/target.h.
5862 * target.c (target_read_memory, target_read_uint32)
5863 (target_write_memory): New functions.
5864
c5e92cca
GB
58652014-09-11 Gary Benson <gbenson@redhat.com>
5866
5867 * server.h (debug_hw_points): Don't declare.
5868 * server.c (debug_hw_points): Don't define. Replace all uses
5869 with show_debug_regs.
5870 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5871 all uses with show_debug_regs.
5872
2e4bb98a
EBM
58732014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5874
5875 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5876 endianness into account.
5877 (ppc_supply_ptrace_register): Likewise.
5878
ac740bc7
JH
58792014-09-03 James Hogan <james.hogan@imgtec.com>
5880
5881 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5882 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5883
97ea6506
GB
58842014-09-03 Gary Benson <gbenson@redhat.com>
5885
5886 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5887 ALL_DEBUG_ADDRESS_REGISTERS.
5888
df7e5265
GB
58892014-09-02 Gary Benson <gbenson@redhat.com>
5890
5891 * i386-low.h: Renamed as...
5892 * x86-low.h: New file. All type, function and variable name
5893 prefixes changed from "i386_" to "x86_". All references updated.
5894 * i386-low.c: Renamed as...
5895 * x86-low.c: New file. All type, function and variable name
5896 prefixes changed from "i386_" to "x86_". All references updated.
5897
ed859da7
GB
58982014-09-02 Gary Benson <gbenson@redhat.com>
5899
5900 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5901 (x86_linux_new_thread): Likewise.
5902
860789c7
GB
59032014-08-29 Gary Benson <gbenson@redhat.com>
5904
5905 * server.h (setjmp.h): Do not include.
5906 (toplevel): Do not declare.
5907 (common-exceptions.h): Include.
5908 (cleanups.h): Likewise.
5909 * server.c (toplevel): Do not define.
5910 (exit_code): New static global.
5911 (detach_or_kill_for_exit_cleanup): New function.
5912 (main): New function. Original main renamed to...
5913 (captured_main): New function.
5914 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5915
ff55e1b5
GB
59162014-08-29 Gary Benson <gbenson@redhat.com>
5917
5918 * Makefile.in (SFILES): Add common/common-exceptions.c.
5919 (OBS): Add common-exceptions.o.
5920 (common-exceptions.o): New rule.
5921 * utils.c (prepare_to_throw_exception): New function.
5922
e9bcb658
GB
59232014-08-29 Gary Benson <gbenson@redhat.com>
5924
5925 * config.in: Regenerate.
5926 * configure: Likewise.
5927
e3180625
GB
59282014-08-29 Gary Benson <gbenson@redhat.com>
5929
5930 * Makefile.in (SFILES): Add common/cleanups.c.
5931 (OBS): cleanups.o.
5932 (cleanups.o): New rule.
5933
e3d6ba5d
GB
59342014-08-29 Gary Benson <gbenson@redhat.com>
5935
5936 * utils.c (internal_vwarning): New function.
5937
7096e886
GB
59382014-08-28 Gary Benson <gbenson@redhat.com>
5939
5940 * utils.h (fatal): Remove declaration.
5941 * utils.c (fatal): Remove function.
5942
14ce3192
GB
59432014-08-28 Gary Benson <gbenson@redhat.com>
5944
5945 * tracepoint.c (gdb_agent_init): Replace fatal with
5946 perror_with_name.
5947 (initialize_tracepoint): Likewise.
5948
50278d59
GB
59492014-08-28 Gary Benson <gbenson@redhat.com>
5950
5951 * remote-utils.c (remote_prepare): Replace fatal with error.
5952
aa96c426
GB
59532014-08-28 Gary Benson <gbenson@redhat.com>
5954
5955 * linux-low.c (linux_async): Replace fatal with warning.
5956 Tidy up and return.
5957 (linux_start_non_stop): Return -1 if linux_async failed.
5958
f7160e97
GB
59592014-08-28 Gary Benson <gbenson@redhat.com>
5960
5961 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5962 gdb_assert.
5963 (i386_dr_low_get_addr): Remove vague comment.
5964 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5965 gdb_assert.
5966
38e08fca
GB
59672014-08-28 Gary Benson <gbenson@redhat.com>
5968
5969 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5970 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5971 internal_error.
5972 (linux_resume_one_lwp): Likewise.
5973 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5974 gdb_assert.
5975 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5976 with internal_error.
5977 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5978 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5979 (find_register_by_name): Replace fatal with internal_error.
5980 (find_regno): Likewise.
5981 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5982 * thread-db.c (thread_db_create_event): Likewise.
5983 (thread_db_load_search): Likewise.
5984 (try_thread_db_load_1): Likewise.
5985 * tracepoint.c (get_jump_space_head): Replace fatal with
5986 internal_error.
5987 (claim_trampoline_space): Likewise.
5988 (have_fast_tracepoint_trampoline_buffer): Likewise.
5989 (cmd_qtstart): Likewise.
5990 (stop_tracing): Likewise.
5991 (fast_tracepoint_collecting): Likewise.
5992 (target_malloc): Likewise.
5993 (download_tracepoint): Likewise.
5994 (download_trace_state_variables): Replace check with gdb_assert.
5995 (upload_fast_traceframes): Replace fatal with internal_error.
5996
34abf635
GB
59972014-08-19 Tom Tromey <tromey@redhat.com>
5998 Gary Benson <gbenson@redhat.com>
5999
6000 * Makefile.in (SFILES): Add common/common-debug.c.
6001 (OBS): Add common-debug.o.
6002 (common-debug.o): New rule.
6003 * debug.h (debug_printf): Don't declare.
6004 * debug.c (debug_printf): Renamed and rewritten as...
6005 (debug_vprintf): New function.
6006
f6e94d78
GB
60072014-08-19 Gary Benson <gbenson@redhat.com>
6008
6009 * utils.h: Do not include print-utils.h.
6010
9239eeab
GB
60112014-08-19 Tom Tromey <tromey@redhat.com>
6012 Gary Benson <gbenson@redhat.com>
6013
6014 * server.h: Add static assertion.
6015 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6016
ef87c8bb
GB
60172014-08-19 Tom Tromey <tromey@redhat.com>
6018 Gary Benson <gbenson@redhat.com>
6019
6020 * Makefile.in (SFILES): Add common/errors.c.
6021 (OBS): Add errors.o.
6022 (IPA_OBS): Add errors-ipa.o.
6023 (errors.o): New rule.
6024 (errors-ipa.o): Likewise.
6025 * utils.h (perror_with_name, error, warning): Don't declare.
6026 * utils.c (warning): Renamed and rewritten as...
6027 (vwarning): New function.
6028 (error): Renamed and rewritten as...
6029 (verror): New function.
6030 (internal_error): Renamed and rewritten as...
6031 (internal_verror): New function.
6032
bb974a24
GB
60332014-08-07 Gary Benson <gbenson@redhat.com>
6034
6035 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6036 * configure: Regenerate.
6037 * config.in: Likewise.
6038 * server.h: Do not include errno.h.
6039 * event-loop.c: Likewise.
6040 * hostio-errno.c: Likewise.
6041 * linux-low.c: Likewise.
6042 * remote-utils.c: Likewise.
6043 * spu-low.c: Likewise.
6044 * utils.c: Likewise.
6045 * gdbreplay.c: Unconditionally include errno.h.
6046
6d3d12eb
GB
60472014-08-07 Gary Benson <gbenson@redhat.com>
6048
6049 * server.h: Do not include string.h.
6050 * event-loop.c: Likewise.
6051 * linux-low.c: Likewise.
6052 * regcache.c: Likewise.
6053 * remote-utils.c: Likewise.
6054 * spu-low.c: Likewise.
6055 * utils.c: Likewise.
6056
dccbb609
GB
60572014-08-07 Gary Benson <gbenson@redhat.com>
6058
6059 * server.h: Do not include gdb_assert.h.
6060
e76df0d0
GB
60612014-08-07 Gary Benson <gbenson@redhat.com>
6062
6063 * server.h: Do not include common-utils.h.
6064
4cb9c816
GB
60652014-08-07 Gary Benson <gbenson@redhat.com>
6066
6067 * server.h: Do not include ptid.h.
6068 * notif.h: Likewise.
6069
3995eeee
GB
60702014-08-07 Gary Benson <gbenson@redhat.com>
6071
6072 * server.h: Do not include gdb_locale.h.
6073
cb9f1a9b
GB
60742014-08-07 Gary Benson <gbenson@redhat.com>
6075
6076 * server.h: Do not include gdb/signals.h.
6077 * win32-low.c: Likewise.
6078
a5fceff8
GB
60792014-08-07 Gary Benson <gbenson@redhat.com>
6080
6081 * server.h: Do not include pathmax.h.
6082
b9391142
GB
60832014-08-07 Gary Benson <gbenson@redhat.com>
6084
6085 * server.h: Do not include libiberty.h.
6086 * linux-bfin-low.c: Likewise.
6087
0e443c87
GB
60882014-08-07 Gary Benson <gbenson@redhat.com>
6089
6090 * server.h: Do not include ansidecl.h.
6091
8ebb3f56
GB
60922014-08-07 Gary Benson <gbenson@redhat.com>
6093
6094 * linux-x86-low.c: Do not include stddef.h.
6095 * lynx-ppc-low.c: Likewise.
6096 * tracepoint.c: Likewise.
6097
8980bdf6
GB
60982014-08-07 Gary Benson <gbenson@redhat.com>
6099
6100 * server.h: Do not include stdarg.h.
6101 * nto-low.c: Likewise.
6102
d7096f71
GB
61032014-08-07 Gary Benson <gbenson@redhat.com>
6104
6105 * server.h: Do not include stdlib.h.
6106 * inferiors.c: Likewise.
6107 * linux-low.c: Likewise.
6108 * regcache.c: Likewise.
6109 * spu-low.c: Likewise.
6110 * tracepoint.c: Likewise.
6111 * utils.c: Likewise.
6112
d02f550d
GB
61132014-08-07 Gary Benson <gbenson@redhat.com>
6114
6115 * server.h: Do not include stdio.h.
6116 * linux-low.c: Likewise.
6117 * remote-utils.c: Likewise.
6118 * spu-low.c: Likewise.
6119 * utils.c: Likewise.
6120 * wincecompat.c: Likewise.
6121
87f6c4e3
GB
61222014-08-06 Gary Benson <gbenson@redhat.com>
6123
6124 * regcache.c (init_register_cache): Move conditionals inside if.
6125
7089dca4
GB
61262014-08-06 Gary Benson <gbenson@redhat.com>
6127
6128 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6129
462f517e
GB
61302014-07-31 Gary Benson <gbenson@redhat.com>
6131
6132 * ax.h: Do not include server.h.
6133 * gdbthread.h: Likewise.
6134 * lynx-low.h: Likewise.
6135 * notif.h: Likewise.
6136
976411d6
GB
61372014-07-30 Gary Benson <gbenson@redhat.com>
6138
6139 * server.h: Include common-defs.h.
6140 Do not include config.h or build-gnulib-gdbserver/config.h.
6141
d41f6d8e
GB
61422014-07-30 Gary Benson <gbenson@redhat.com>
6143
6144 * hostio-errno.c: Move server.h to top of includes list.
6145 * inferiors.c: Likewise.
6146 * linux-x86-low.c: Likewise.
6147 * notif.c: Include server.h.
6148
314c6a35
TT
61492014-07-24 Tom Tromey <tromey@redhat.com>
6150 Gary Benson <gbenson@redhat.com>
6151
6152 * server.h (CORE_ADDR): Now unsigned.
6153
69ff6be5
PA
61542014-07-16 Pedro Alves <palves@redhat.com>
6155
6156 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6157
ce9e3fe7
PA
61582014-07-15 Pedro Alves <palves@redhat.com>
6159
6160 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6161 copy.
6162
e76126e8
PA
61632014-07-11 Pedro Alves <palves@redhat.com>
6164
6165 * linux-low.c (kill_wait_lwp): New function, based on
6166 kill_one_lwp_callback, but use my_waitpid directly.
6167 (kill_one_lwp_callback, linux_kill): Use it.
6168
8e9db26e
PA
61692014-06-23 Pedro Alves <palves@redhat.com>
6170
6171 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6172 before setting DR0..DR3.
6173
698b3e08
GB
61742014-06-20 Gary Benson <gbenson@redhat.com>
6175
6176 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6177 * configure: Regenerated.
6178 * config.in: Likewise.
6179
125f8a3d
GB
61802014-06-20 Gary Benson <gbenson@redhat.com>
6181
6182 * Makefile.in (SFILES): Update locations for files moved
6183 from common to nat.
6184 (object file files): Reordered.
6185
42995dbd
GB
61862014-06-20 Gary Benson <gbenson@redhat.com>
6187
6188 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6189 (i386_dr_low_set_addr): Likewise.
6190 (i386_dr_low_get_addr): Likewise.
6191 (i386_dr_low_can_set_control): Likewise.
6192 (i386_dr_low_set_control): Likewise.
6193 (i386_dr_low_get_control): Likewise.
6194 (i386_dr_low_get_status): Likewise.
6195 (i386_get_debug_register_length): Likewise.
6196 * linux-x86-low.c (i386_dr_low_set_addr):
6197 Changed signature. Made static.
6198 (i386_dr_low_get_addr): Likewise.
6199 (i386_dr_low_set_control): Likewise.
6200 (i386_dr_low_get_control): Likewise.
6201 (i386_dr_low_get_status): Likewise.
6202 (i386_dr_low): New global variable.
6203 * win32-i386-low.c (i386_dr_low_set_addr):
6204 Changed signature. Made static.
6205 (i386_dr_low_get_addr): Likewise.
6206 (i386_dr_low_set_control): Likewise.
6207 (i386_dr_low_get_control): Likewise.
6208 (i386_dr_low_get_status): Likewise.
6209 (i386_dr_low): New global variable.
6210
e1d2394b
MS
62112014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6212
6213 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6214 * Makefile.in (AR, AR_FLAGS): Define.
6215 * configure: Regenerate.
6216
3a8ee006
GB
62172014-06-19 Gary Benson <gbenson@redhat.com>
6218
6219 * Makefile.in (i386-dregs.o): New rule.
6220 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6221 * i386-low.c (target.h): Remove include.
6222 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6223 (DR_CONTROL_SHIFT): Likewise.
6224 (DR_CONTROL_SIZE): Likewise.
6225 (DR_RW_EXECUTE): Likewise.
6226 (DR_RW_WRITE): Likewise.
6227 (DR_RW_READ): Likewise.
6228 (DR_RW_IORW): Likewise.
6229 (DR_LEN_1): Likewise.
6230 (DR_LEN_2): Likewise.
6231 (DR_LEN_4): Likewise.
6232 (DR_LEN_8): Likewise.
6233 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6234 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6235 (DR_ENABLE_SIZE): Likewise.
6236 (DR_LOCAL_SLOWDOWN): Likewise.
6237 (DR_GLOBAL_SLOWDOWN): Likewise.
6238 (DR_CONTROL_RESERVED): Likewise.
6239 (I386_DR_CONTROL_MASK): Likewise.
6240 (I386_DR_VACANT): Likewise.
6241 (I386_DR_LOCAL_ENABLE): Likewise.
6242 (I386_DR_GLOBAL_ENABLE): Likewise.
6243 (I386_DR_DISABLE): Likewise.
6244 (I386_DR_SET_RW_LEN): Likewise.
6245 (I386_DR_GET_RW_LEN): Likewise.
6246 (I386_DR_WATCH_HIT): Likewise.
6247 (i386_wp_op_t): Likewise.
6248 (i386_show_dr): Likewise.
6249 (i386_length_and_rw_bits): Likewise.
6250 (i386_insert_aligned_watchpoint): Likewise.
6251 (i386_remove_aligned_watchpoint): Likewise.
6252 (i386_handle_nonaligned_watchpoint): Likewise.
6253 i386_update_inferior_debug_regs(): Likewise.
6254 (i386_dr_insert_watchpoint): Likewise.
6255 (i386_dr_remove_watchpoint): Likewise.
6256 (i386_dr_region_ok_for_watchpoint): Likewise.
6257 (i386_dr_stopped_data_address): Likewise.
6258 (i386_dr_stopped_by_watchpoint): Likewise.
6259
8f26655c
GB
62602014-06-19 Gary Benson <gbenson@redhat.com>
6261
6262 * i386-low.c (i386_dr_show): Renamed to
6263 i386_show_dr and made static. All uses updated.
6264 (i386_dr_length_and_rw_bits): Renamed to
6265 i386_length_and_rw_bits and made static.
6266 All uses updated.
6267 (i386_dr_insert_aligned_watchpoint): Renamed to
6268 i386_insert_aligned_watchpoint and made static.
6269 All uses updated.
6270 (i386_dr_remove_aligned_watchpoint): Renamed to
6271 i386_remove_aligned_watchpoint and made static.
6272 All uses updated.
6273 (i386_dr_update_inferior_debug_regs): Renamed to
6274 i386_update_inferior_debug_regs and made static.
6275 All uses updated.
6276
b9228891
GB
62772014-06-18 Gary Benson <gbenson@redhat.com>
6278
5171def3
GB
6279 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6280 (i386_dr_low_can_set_control): Likewise.
6281 (i386_get_debug_register_length): Likewise.
6282 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6283 (i386_dr_low_can_set_control): Likewise.
6284 (i386_get_debug_register_length): Likewise.
6285
62862014-06-17 Gary Benson <gbenson@redhat.com>
6287
b9228891
GB
6288 * i386-low.h (i386-dregs.h): New include.
6289 (DR_FIRSTADDR): Now in i386-dregs.h.
6290 (DR_LASTADDR): Likewise.
6291 (DR_NADDR): Likewise.
6292 (DR_STATUS): Likewise.
6293 (DR_CONTROL): Likewise.
6294 (i386_debug_reg_state): Likewise.
6295 (i386_dr_insert_watchpoint): Likewise.
6296 (i386_dr_remove_watchpoint): Likewise.
6297 (i386_dr_region_ok_for_watchpoint): Likewise.
6298 (i386_dr_stopped_data_address): Likewise.
6299 (i386_dr_stopped_by_watchpoint): Likewise.
6300 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6301
4be83cc2
GB
63022014-06-18 Gary Benson <gbenson@redhat.com>
6303
6304 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6305 i386_dr_insert_watchpoint.
6306 (i386_low_remove_watchpoint): Renamed to
6307 i386_dr_remove_watchpoint.
6308 (i386_low_region_ok_for_watchpoint): Renamed to
6309 i386_dr_region_ok_for_watchpoint.
6310 (i386_low_stopped_data_address): Renamed to
6311 i386_dr_stopped_data_address.
6312 (i386_low_stopped_by_watchpoint): Renamed to
6313 i386_dr_stopped_by_watchpoint.
6314 * i386-low.c (i386_show_dr): Renamed to
6315 i386_dr_show and made nonstatic. All uses updated.
6316 (i386_length_and_rw_bits): Renamed to
6317 i386_dr_length_and_rw_bits and made nonstatic.
6318 All uses updated.
6319 (i386_insert_aligned_watchpoint): Renamed to
6320 i386_dr_insert_aligned_watchpoint and made nonstatic.
6321 All uses updated.
6322 (i386_remove_aligned_watchpoint): Renamed to
6323 i386_dr_remove_aligned_watchpoint and made nonstatic.
6324 All uses updated.
6325 (i386_update_inferior_debug_regs): Renamed to
6326 i386_dr_update_inferior_debug_regs and made nonstatic.
6327 All uses updated.
6328 (i386_low_insert_watchpoint): Renamed to
6329 i386_dr_insert_watchpoint. All uses updated.
6330 (i386_low_remove_watchpoint): Renamed to
6331 i386_dr_remove_watchpoint. All uses updated.
6332 (i386_low_region_ok_for_watchpoint): Renamed to
6333 i386_dr_region_ok_for_watchpoint. All uses updated.
6334 (i386_low_stopped_data_address): Renamed to
6335 i386_dr_stopped_data_address. All uses updated.
6336 (i386_low_stopped_by_watchpoint): Renamed to
6337 i386_dr_stopped_by_watchpoint. All uses updated.
6338
131aa0d4
GB
63392014-06-18 Gary Benson <gbenson@redhat.com>
6340
6341 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6342 (i386_dr_low_can_set_control): Likewise.
6343 (i386_insert_aligned_watchpoint): New check.
6344
d9305f7f
GB
63452014-06-18 Gary Benson <gbenson@redhat.com>
6346
6347 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6348 Renamed to state.
6349
e927c9fc
GB
63502014-06-18 Gary Benson <gbenson@redhat.com>
6351
6352 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6353 instead of fatal and error.
6354 (i386_handle_nonaligned_watchpoint): Likewise.
6355
1b6d4134
GB
63562014-06-18 Gary Benson <gbenson@redhat.com>
6357
6358 * i386-low.c (i386_get_debug_register_length): New macro.
6359 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6360 (i386_show_dr): Use debug_printf instead of fprintf. Use
6361 phex to format values.
6362
6e62758f
GB
63632014-06-18 Gary Benson <gbenson@redhat.com>
6364
6365 * i386-low.h: Comment changes.
6366 * i386-low.c: Likewise.
6367
fc6e2f03
GB
63682014-06-18 Gary Benson <gbenson@redhat.com>
6369
6370 * i386-low.c: Whitespace changes.
6371
f9d1eeed
TT
63722014-06-12 Tom Tromey <tromey@redhat.com>
6373
6374 * utils.c (freeargv): Remove.
6375
0b04e523
TT
63762014-06-12 Tom Tromey <tromey@redhat.com>
6377
6378 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6379 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6380 (parse_debug_format_options): Likewise.
6381 (gdbserver_usage): Likewise.
6382 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6383 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6384 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6385 against libiberty.
6386 ($(LIBGNU)): Depend on libiberty.
6387 (all-lib): Recurse into all subdirs.
6388 (install-only): Invoke "install" target in subdirs.
6389 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6390 targets.
6391 * configure: Rebuild.
6392 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6393 for vasprintf, vsnprintf, or gettimeofday.
6394 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6395 srv_tgtobj.
6396
270c9937
JB
63972014-06-05 Joel Brobecker <brobecker@adacore.com>
6398
6399 * development.sh: Delete.
6400 * Makefile.in (config.status): Adjust dependency on development.sh.
6401 * configure.ac: Adjust development.sh source call.
6402 * configure: Regenerate.
6403
0a261ed8
PA
64042014-06-02 Pedro Alves <palves@redhat.com>
6405
6406 * ax.c (gdb_free_agent_expr): New function.
6407 * ax.h (gdb_free_agent_expr): New declaration.
6408 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6409 list.
6410 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6411 static.
6412 (clear_breakpoint_conditions_and_commands): New function.
6413 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6414 (clear_breakpoint_conditions_and_commands): New declaration.
6415
e9dae05e
RR
64162014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6417
6418 * linux-aarch64-low.c (asm/ptrace.h): Include.
6419
5876f503
JK
64202014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6421
6422 Fix TLS access for -static -pthread.
6423 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6424 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6425 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6426
802e8e6d
PA
64272014-05-20 Pedro Alves <palves@redhat.com>
6428
6429 * linux-aarch64-low.c (aarch64_insert_point)
6430 (aarch64_remove_point): No longer check whether the type is
6431 supported here. Adjust to new interface.
6432 (the_low_target): Install aarch64_supports_z_point_type as
6433 supports_z_point_type method.
6434 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6435 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6436 instead of a Z packet char. Adjust.
6437 (arm_supports_z_point_type): New function.
6438 (arm_insert_point, arm_remove_point): Adjust to new interface.
6439 (the_low_target): Install arm_supports_z_point_type.
6440 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6441 (cris_insert_point, cris_remove_point): Adjust to new interface.
6442 Don't check whether the type is supported here.
6443 (the_low_target): Install cris_supports_z_point_type.
6444 * linux-low.c (linux_supports_z_point_type): New function.
6445 (linux_insert_point, linux_remove_point): Adjust to new interface.
6446 * linux-low.h (struct linux_target_ops) <insert_point,
6447 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6448 raw_breakpoint pointer parameter.
6449 <supports_z_point_type>: New method.
6450 * linux-mips-low.c (mips_supports_z_point_type): New function.
6451 (mips_insert_point, mips_remove_point): Adjust to new interface.
6452 Use mips_supports_z_point_type.
6453 (the_low_target): Install mips_supports_z_point_type.
6454 * linux-ppc-low.c (the_low_target): Install NULL as
6455 supports_z_point_type method.
6456 * linux-s390-low.c (the_low_target): Install NULL as
6457 supports_z_point_type method.
6458 * linux-sparc-low.c (the_low_target): Install NULL as
6459 supports_z_point_type method.
6460 * linux-x86-low.c (x86_supports_z_point_type): New function.
6461 (x86_insert_point): Adjust to new insert_point interface. Use
6462 insert_memory_breakpoint. Adjust to new
6463 i386_low_insert_watchpoint interface.
6464 (x86_remove_point): Adjust to remove_point interface. Use
6465 remove_memory_breakpoint. Adjust to new
6466 i386_low_remove_watchpoint interface.
6467 (the_low_target): Install x86_supports_z_point_type.
6468 * lynx-low.c (lynx_target_ops): Install NULL as
6469 supports_z_point_type callback.
6470 * nto-low.c (nto_supports_z_point_type): New.
6471 (nto_insert_point, nto_remove_point): Adjust to new interface.
6472 (nto_target_ops): Install nto_supports_z_point_type.
6473 * mem-break.c: Adjust intro comment.
6474 (struct raw_breakpoint) <raw_type, size>: New fields.
6475 <inserted>: Update comment.
6476 <shlib_disabled>: Delete field.
6477 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6478 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6479 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6480 (raw_bkpt_type_to_target_hw_bp_type): New function.
6481 (find_enabled_raw_code_breakpoint_at): New function.
6482 (find_raw_breakpoint_at): New type and size parameters. Use them.
6483 (insert_memory_breakpoint): New function, based off
6484 set_raw_breakpoint_at.
6485 (remove_memory_breakpoint): New function.
6486 (set_raw_breakpoint_at): Reimplement.
6487 (set_breakpoint): New, based on set_breakpoint_at.
6488 (set_breakpoint_at): Reimplement.
6489 (delete_raw_breakpoint): Go through the_target->remove_point
6490 instead of assuming memory breakpoints.
6491 (find_gdb_breakpoint_at): Delete.
6492 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6493 (find_gdb_breakpoint): New function.
6494 (set_gdb_breakpoint_at): Delete.
6495 (z_type_supported): New function.
6496 (set_gdb_breakpoint_1): New function, loosely based off
6497 set_gdb_breakpoint_at.
6498 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6499 (delete_gdb_breakpoint_at): Delete.
6500 (delete_gdb_breakpoint_1): New function, loosely based off
6501 delete_gdb_breakpoint_at.
6502 (delete_gdb_breakpoint): New function.
6503 (clear_gdb_breakpoint_conditions): Rename to ...
6504 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6505 breakpoint.
6506 (add_condition_to_breakpoint): Make static.
6507 (add_breakpoint_condition): Take a struct breakpoint pointer
6508 instead of an address. Adjust.
6509 (gdb_condition_true_at_breakpoint): Rename to ...
6510 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6511 z_type parameter.
6512 (gdb_condition_true_at_breakpoint): Reimplement.
6513 (add_breakpoint_commands): Take a struct breakpoint pointer
6514 instead of an address. Adjust.
6515 (gdb_no_commands_at_breakpoint): Rename to ...
6516 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6517 parameter. Return true if no breakpoint was found. Change debug
6518 output.
6519 (gdb_no_commands_at_breakpoint): Reimplement.
6520 (run_breakpoint_commands): Rename to ...
6521 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6522 and change return type to boolean.
6523 (run_breakpoint_commands): New function.
6524 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6525 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6526 breakpoint. Go through the_target->remove_point instead of
6527 assuming memory breakpoint.
6528 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6529 software and hardware breakpoints.
6530 (reinsert_raw_breakpoint): Go through the_target->insert_point
6531 instead of assuming memory breakpoint.
6532 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6533 software and hardware breakpoints.
6534 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6535 Check both software and hardware breakpoints.
6536 (validate_inserted_breakpoint): Assert the breakpoint is a
6537 software breakpoint. Set the inserted flag to -1 instead of
6538 setting shlib_disabled.
6539 (delete_disabled_breakpoints): Adjust.
6540 (validate_breakpoints): Only validate software breakpoints.
6541 Adjust to inserted flag change.
6542 (check_mem_read, check_mem_write): Skip breakpoint types other
6543 than software breakpoints. Adjust to inserted flag change.
6544 * mem-break.h (enum raw_bkpt_type): New enum.
6545 (raw_breakpoint, struct process_info): Forward declare.
6546 (Z_packet_to_target_hw_bp_type): Delete declaration.
6547 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6548 (set_gdb_breakpoint, delete_gdb_breakpoint)
6549 (clear_breakpoint_conditions): New declarations.
6550 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6551 (breakpoint_inserted_here): Update comment.
6552 (add_breakpoint_condition, add_breakpoint_commands): Replace
6553 address parameter with a breakpoint pointer parameter.
6554 (gdb_breakpoint_here): Update comment.
6555 (delete_gdb_breakpoint_at): Delete.
6556 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6557 * server.c (process_point_options): Take a struct breakpoint
6558 pointer instead of an address. Adjust.
6559 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6560 delete_gdb_breakpoint.
6561 * spu-low.c (spu_target_ops): Install NULL as
6562 supports_z_point_type method.
6563 * target.h: Include mem-break.h.
6564 (struct target_ops) <prepare_to_access_memory>: Update comment.
6565 <supports_z_point_type>: New field.
6566 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6567 instead of a char. Also take a raw breakpoint pointer.
6568 * win32-arm-low.c (the_low_target): Install NULL as
6569 supports_z_point_type.
6570 * win32-i386-low.c (i386_supports_z_point_type): New function.
6571 (i386_insert_point, i386_remove_point): Adjust to new interface.
6572 (the_low_target): Install i386_supports_z_point_type.
6573 * win32-low.c (win32_supports_z_point_type): New function.
6574 (win32_insert_point, win32_remove_point): Adjust to new interface.
6575 (win32_target_ops): Install win32_supports_z_point_type.
6576 * win32-low.h (struct win32_target_ops):
6577 <supports_z_point_type>: New method.
6578 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6579 instead of a char. Also take a raw breakpoint pointer.
6580
932539e3
PA
65812014-05-20 Pedro Alves <palves@redhat.com>
6582
6583 * mem-break.h: Include break-common.h.
6584 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6585 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6586 (Z_packet_to_target_hw_bp_type): New declaration.
6587 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6588 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6589 (Z_PACKET_ACCESS_WP): Delete macros.
6590 (Z_packet_to_hw_type): Delete function.
6591 * i386-low.h: Don't include break-common.h here.
6592 (Z_packet_to_hw_type): Delete declaration.
6593 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6594 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6595 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6596 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6597 * linux-aarch64-low.c: Don't include break-common.h here.
6598 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6599 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6600 (Z_packet_to_target_hw_bp_type): Delete function.
6601 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6602 function.
6603 (mips_insert_point, mips_remove_point): Use
6604 Z_packet_to_target_hw_bp_type.
6605
4ff0d3d8
PA
66062014-05-20 Pedro Alves <palves@redhat.com>
6607
6608 * linux-aarch64-low.c: Include break-common.h.
6609 (enum target_point_type): Delete.
6610 (Z_packet_to_point_type): Rename to ...
6611 (Z_packet_to_target_hw_bp_type): ... this, and return a
6612 target_hw_bp_type instead.
6613 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6614 instead of an enum target_point_type.
6615 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6616 breakpoint type.
6617 (aarch64_dr_state_insert_one_point)
6618 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6619 (aarch64_handle_aligned_watchpoint)
6620 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6621 Take an enum target_hw_bp_type instead of an enum
6622 target_point_type.
6623 (aarch64_supports_z_point_type): New function.
6624 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6625 use Z_packet_to_target_hw_bp_type.
6626
786dc519
JB
66272014-05-20 Joel Brobecker <brobecker@adacore.com>
6628
6629 * configure.ac: Only use -Werror by default when DEVELOPMENT
6630 is true.
6631 * configure: Regenerate.
6632
9e0aa64f
JK
66332014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6634
6635 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6636 * linux-x86-low.c (X86_64_USER_REGS): New.
6637 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6638
2b577b92
YQ
66392014-04-28 Yao Qi <yao@codesourcery.com>
6640
6641 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6642 name.
6643
94611da2
PA
66442014-04-25 Pedro Alves <palves@redhat.com>
6645
6646 PR server/16255
6647 * linux-low.c (linux_attach_fail_reason_string): New function.
6648 (linux_attach_lwp): Delete.
6649 (linux_attach_lwp_1): Rename to ...
6650 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6651 argument. Remove "initial" parameter. Return int instead of
6652 void. Don't error or warn here.
6653 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6654 failure to attach to the tgid. Call warning when failing to
6655 attach to an lwp.
6656 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6657 argument. Remove "initial" parameter. Return int instead of
6658 void. Don't error or warn here.
6659 (linux_attach_fail_reason_string): New declaration.
6660 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6661 interface change. Use linux_attach_fail_reason_string.
6662
01f9f808
MS
66632014-04-24 Michael Sturm <michael.sturm@mintel.com>
6664 Walfred Tedeschi <walfred.tedeschi@intel.com>
6665
6666 * Makefile.in: Added rules to handle new files
6667 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6668 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6669 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6670 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6671 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6672 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6673 x32-avx512-linux.o.
6674 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6675 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6676 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6677 i386/x32-avx512.xml.
6678 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6679 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6680 i386/x32-avx512-linux.xml.
6681 * i387-fp.c (num_avx512_k_registers): New constant for number
6682 of K registers.
6683 (num_avx512_zmmh_low_registers): New constant for number of
6684 lower ZMM registers (0-15).
6685 (num_avx512_zmmh_high_registers): New constant for number of
6686 higher ZMM registers (16-31).
6687 (num_avx512_ymmh_registers): New contant for number of higher
6688 YMM registers (ymm16-31 added by avx521 on x86_64).
6689 (num_avx512_xmm_registers): New constant for number of higher
6690 XMM registers (xmm16-31 added by AVX512 on x86_64).
6691 (struct i387_xsave): Add space for AVX512 registers.
6692 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6693 Add code to handle AVX512 registers.
6694 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6695 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6696 prototypei from generated file.
6697 (tdesc_amd64_avx512_linux): Likewise.
6698 (init_registers_x32_avx512_linux): Likewise.
6699 (tdesc_x32_avx512_linux): Likewise.
6700 (init_registers_i386_avx512_linux): Likewise.
6701 (tdesc_i386_avx512_linux): Likewise.
6702 (x86_64_regmap): Add AVX512 registers.
6703 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6704 mask.
6705 (initialize_low_arch): Add code to initialize AVX512 registers.
6706
51aa91f9
PA
67072014-04-23 Pedro Alves <palves@redhat.com>
6708
6709 * mem-break.c (find_gdb_breakpoint_at): Make static.
6710 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6711
a4165e94
PA
67122014-04-23 Pedro Alves <palves@redhat.com>
6713
6714 * i386-low.c: Don't include break-common.h here.
6715 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6716 prototype to take target_hw_bp_type as argument instead of a Z
6717 packet char.
6718 * i386-low.h: Include break-common.h here.
6719 (Z_packet_to_hw_type): Declare.
6720 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6721 prototypes.
6722 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6723 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6724 (x86_remove_point): Convert the packet number to a
6725 target_hw_bp_type before calling i386_low_remove_watchpoint.
6726 * win32-i386-low.c (i386_insert_point): Convert the packet number
6727 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6728 (i386_remove_point): Convert the packet number to a
6729 target_hw_bp_type before calling i386_low_remove_watchpoint.
6730
b8acf843
PA
67312014-04-23 Pedro Alves <palves@redhat.com>
6732
6733 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6734
d708bcd1
PA
67352014-04-10 Pedro Alves <palves@redhat.com>
6736
6737 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6738 Check if the condition or command is NULL before checking if the
6739 breakpoint is known. On success, return true.
6740 * mem-break.h (add_breakpoint_condition): Document return.
6741 (add_breakpoint_commands): Add describing comment.
6742 * server.c (skip_to_semicolon): New function.
6743 (process_point_options): Use it.
6744
2eec7d5b
PA
67452014-04-09 Pedro Alves <palves@redhat.com>
6746
6747 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6748 to lwpid_of.
6749
fa96cb38
PA
67502014-02-27 Pedro Alves <palves@redhat.com>
6751
6752 PR 12702
6753 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6754 macros.
6755 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6756 output.
6757 (last_thread_of_process_p): Take a PID argument instead of a
6758 thread pointer.
6759 (linux_wait_for_lwp): Delete.
6760 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6761 functions.
6762 (linux_low_filter_event): New function, party factored out from
6763 linux_wait_for_event.
6764 (linux_wait_for_event): Rename to ...
6765 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6766 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6767 sigsuspend. Check for zombie leaders.
6768 (linux_wait_for_event): Reimplement as wrapper around
6769 linux_wait_for_event_filtered.
6770 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6771 a normal or signal exit is seen, it's the whole process exiting.
6772 (wait_for_sigstop): No longer a for_each_inferior callback.
6773 Rewrite on top of linux_wait_for_event_filtered.
6774 (stop_all_lwps): Call wait_for_sigstop directly.
6775 * server.c (resume, handle_target_event): Handle
6776 TARGET_WAITKIND_NO_RESUMED.
6777
d763de10
JB
67782014-02-26 Joel Brobecker <brobecker@adacore.com>
6779
6780 * win32-low.c (psapi_get_dll_name,
6781 * win32_CreateToolhelp32Snapshot): Delete.
6782 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6783 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6784 Delete.
6785 (handle_load_dll): Add function description.
6786 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6787
850a0f76
JB
67882014-02-26 Joel Brobecker <brobecker@adacore.com>
6789
6790 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6791 Add comment.
6792 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6793 base address when calling win32_add_one_solib.
6794 (handle_load_dll): Delete local variable load_addr.
6795 Remove 0x1000 offset applied to DLL base address when calling
6796 win32_add_one_solib.
6797 (handle_unload_dll): Add comment.
6798
f25b3fc3
JB
67992014-02-26 Joel Brobecker <brobecker@adacore.com>
6800
6801 * win32-low.c (win32_add_all_dlls): Renames
6802 win32_ensure_ntdll_loaded. Rewrite function documentation.
6803 Adjust implementation to always load all DLLs.
6804 Add 0x1000 offset to DLL base address when calling
6805 win32_add_one_solib.
6806 (child_initialization_done): New static global.
6807 (do_initial_child_stuff): Set child_initialization_done to
6808 zero during child initialization, and 1 after. Replace call
6809 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6810 Add comment.
6811 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6812 (handle_unload_dll): Add function documentation.
6813 (get_child_debug_event): Ignore load and unload DLL events
6814 during child initialization.
6815
d86d4aaf
DE
68162014-02-20 Doug Evans <dje@google.com>
6817
3bc32da3 6818 Remove global all_lwps.
d86d4aaf
DE
6819 * inferiors.h (ptid_of): Move here from linux-low.h.
6820 (pid_of, lwpid_of): Ditto.
6821 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6822 parameter is a struct thread_info * now.
6823 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6824 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6825 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6826 directly.
6827 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6828 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6829 * linux-arm-low.c (update_registers_callback): Update, "entry"
6830 parameter is a struct thread_info * now.
6831 Fetch lwpid from current_inferior directly.
6832 (arm_insert_point): Pass &all_threads to find_inferior instead of
6833 &all_lwps.
6834 (arm_remove_point): Ditto.
6835 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6836 (arm_prepare_to_resume): Fetch pid from thread.
6837 (arm_read_description): Fetch lwpid from current_inferior directly.
6838 * linux-low.c (all_lwps): Delete.
6839 (delete_lwp): Delete call to remove_inferior.
6840 (handle_extended_wait): Fetch lwpid from thread.
6841 (add_lwp): Don't set lwp->entry.id. Remove call to
6842 add_inferior_to_list.
6843 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6844 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6845 (kill_one_lwp_callback): Ditto.
6846 (linux_kill): Don't dereference NULL pointer.
6847 Fetch ptid,lwpid from thread.
6848 (get_detach_signal): Fetch ptid from thread.
6849 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6850 Simplify call to regcache_invalidate_thread.
6851 (delete_lwp_callback): Update, "entry" parameter is a
6852 struct thread_info * now. Fetch pid from thread.
6853 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6854 (status_pending_p_callback): Update, "entry" parameter is a
6855 struct thread_info * now. Fetch ptid from thread.
6856 (find_lwp_pid): Update, "entry" parameter is a
6857 struct thread_info * now.
6858 (linux_wait_for_lwp): Fetch pid from thread.
6859 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6860 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6861 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6862 (dequeue_one_deferred_signal): Ditto.
6863 (cancel_breakpoint): Fetch ptid from current_inferior.
6864 (linux_wait_for_event): Pass &all_threads to find_inferior,
6865 not &all_lwps. Fetch ptid, lwpid from thread.
6866 (count_events_callback): Update, "entry" parameter is a
6867 struct thread_info * now.
6868 (select_singlestep_lwp_callback): Ditto.
6869 (select_event_lwp_callback): Ditto.
6870 (cancel_breakpoints_callback): Ditto.
6871 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6872 not &all_lwps.
6873 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6874 (unsuspend_one_lwp): Update, "entry" parameter is a
6875 struct thread_info * now.
6876 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6877 not &all_lwps.
6878 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6879 Fetch lwpid from thread, not lwp.
6880 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6881 Pass &all_threads to find_inferior, not &all_lwps.
6882 (send_sigstop): Fetch lwpid from thread, not lwp.
6883 (send_sigstop_callback): Update, "entry" parameter is a
6884 struct thread_info * now.
6885 (suspend_and_send_sigstop_callback): Ditto.
6886 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6887 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6888 struct thread_info * now.
6889 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6890 from thread, lwp.
6891 (lwp_running): Update, "entry" parameter is a
6892 struct thread_info * now.
6893 (stop_all_lwps): Fetch ptid from thread.
6894 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6895 (linux_resume_one_lwp): Fetch lwpid from thread.
6896 (linux_set_resume_request): Update, "entry" parameter is a
6897 struct thread_info * now. Fetch pid, lwpid from thread.
6898 (resume_status_pending_p): Update, "entry" parameter is a
6899 struct thread_info * now.
6900 (need_step_over_p): Ditto. Fetch lwpid from thread.
6901 (start_step_over): Fetch lwpid from thread.
6902 (linux_resume_one_thread): Update, "entry" parameter is a
6903 struct thread_info * now. Fetch lwpid from thread.
6904 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6905 (proceed_one_lwp): Update, "entry" parameter is a
6906 struct thread_info * now. Fetch lwpid from thread.
6907 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6908 struct thread_info * now.
6909 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6910 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6911 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6912 directly.
6913 (regsets_store_inferior_registers): Ditto.
6914 (fetch_register, store_register): Ditto.
6915 (linux_read_memory, linux_write_memory): Ditto.
6916 (linux_request_interrupt): Ditto.
6917 (linux_read_auxv): Ditto.
6918 (linux_xfer_siginfo): Ditto.
6919 (linux_qxfer_spu): Ditto.
6920 (linux_qxfer_libraries_svr4): Ditto.
6921 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6922 moved to inferiors.h.
6923 (get_lwp): Delete.
6924 (get_thread_lwp): Update.
6925 (struct lwp_info): Delete member "entry". Simplify comment for
6926 member "thread".
6927 (all_lwps): Delete.
6928 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6929 current_inferior directly.
6930 (update_watch_registers_callback): Update, "entry" parameter is a
6931 struct thread_info * now. Fetch pid from thread.
6932 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6933 (mips_insert_point): Fetch lwpid from current_inferior.
6934 Pass &all_threads to find_inferior, not &all_lwps.
6935 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6936 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6937 directly.
6938 (mips_stopped_data_address): Ditto.
6939 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6940 directly.
6941 * linux-tile-low.c (tile_arch_setup): Ditto.
6942 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6943 (update_debug_registers_callback): Update, "entry" parameter is a
6944 struct thread_info * now. Fetch pid from thread.
6945 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6946 Pass &all_threads to find_inferior, not &all_lwps.
6947 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6948 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6949 Pass &all_threads to find_inferior, not &all_lwps.
6950 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6951 (i386_dr_low_get_status): Ditto.
6952 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6953 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6954 (x86_linux_read_description): Ditto.
6955 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6956
3b8361aa
DE
69572014-02-20 Doug Evans <dje@google.com>
6958
6959 * inferiors.c (get_first_inferior): Fix buglet.
6960
f7667f0d
DE
69612014-02-19 Doug Evans <dje@google.com>
6962
6963 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6964 * inferiors.c (add_thread): Change result type to struct thread_info *.
6965 All callers updated.
6966 (add_lwp): Call add_thread here instead of in callers.
6967 All callers updated.
6968 * linux-low.h (get_lwp_thread): Rewrite.
6969 (struct lwp_info): New member "thread".
6970
b3312d80
DE
69712014-02-19 Doug Evans <dje@google.com>
6972
6973 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6974 All callers updated.
6975
ecc6f45c
DE
69762014-02-19 Doug Evans <dje@google.com>
6977
6978 * inferiors.c (add_thread): Fix whitespace.
6979
649ebbca
DE
69802014-02-19 Doug Evans <dje@google.com>
6981
6982 * dll.c (clear_dlls): Replace accessing list implemention details
6983 with API function.
6984 * gdbthread.h (get_first_thread): Declare.
6985 * inferiors.c (for_each_inferior_with_data): New function.
6986 (get_first_thread): New function.
6987 (find_thread_ptid): Simplify.
6988 (get_first_inferior): New function.
6989 (clear_list): Delete.
6990 (one_inferior_p): New function.
6991 (clear_inferior_list): New function.
6992 (clear_inferiors): Update.
6993 * inferiors.h (for_each_inferior_with_data): Declare.
6994 (clear_inferior_list): Declare.
6995 (one_inferior_p): Declare.
6996 (get_first_inferior): Declare.
6997 * linux-low.c (linux_wait_for_event): Replace accessing list
6998 implemention details with API function.
6999 * server.c (target_running): Ditto.
7000 (accumulate_file_name_length): New function.
7001 (emit_dll_description): New function.
7002 (handle_qxfer_libraries): Replace accessing list implemention
7003 details with API function.
7004 (handle_qxfer_threads_worker): New function.
7005 (handle_qxfer_threads_proper): Replace accessing list implemention
7006 details with API function.
7007 (handle_query): Ditto.
7008 (visit_actioned_threads_callback_ftype): New typedef.
7009 (visit_actioned_threads_data): New struct.
7010 (visit_actioned_threads): Rewrite to be find_inferior callback.
7011 (resume): Call find_inferior.
7012 (handle_status): Replace accessing list implemention
7013 details with API function.
7014 (process_serial_event): Replace accessing list implemention details
7015 with API function.
7016 * target.c (set_desired_inferior): Replace accessing list implemention
7017 details with API function.
7018 * tracepoint.c (same_process_p): New function.
7019 (gdb_agent_about_to_close): Replace accessing list implemention
7020 details with API function.
7021 * win32-low.c (child_delete_thread): Replace accessing list
7022 implemention details with API function.
7023 (match_dll_by_basename): New function.
7024 (dll_is_loaded_by_basename): New function.
7025 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7026 details call to dll_is_loaded_by_basename.
7027
80894984
DE
70282014-02-19 Doug Evans <dje@google.com>
7029
7030 * dll.h (struct dll_info): Add comment.
7031 * gdbthread.h (struct thread_info): Add comment.
7032 (current_ptid): Simplify.
7033 * inferiors.c (add_process): Update.
7034 (remove_process): Update.
7035 * inferiors.h (struct process_info): Rename member "head" to "entry".
7036 * linux-low.c (delete_lwp): Update.
7037 (add_lwp): Update.
7038 (last_thread_of_process_p): Update.
7039 (kill_one_lwp_callback, linux_kill): Update.
7040 (status_pending_p_callback): Update.
7041 (wait_for_sigstop): Update. Simplify read of ptid.
7042 (start_step_over): Update.
7043 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7044 (get_lwp_thread): Update.
7045 (struct lwp_info): Rename member "head" to "entry".
7046 * regcache.h (inferior_list_entry): Delete.
7047 * server.c (kill_inferior_callback): Update.
7048 (detach_or_kill_inferior_callback): Update.
7049 (print_started_pid): Update.
7050 (print_attached_pid): Update.
7051 (process_serial_event): Simplify read of ptid.
7052 * thread-db.c (thread_db_create_event): Update.
7053 (thread_db_get_tls_address): Update.
7054 * win32-low.c (current_inferior_ptid): Simplify.
7055
46917d26
TT
70562014-02-19 Tom Tromey <tromey@redhat.com>
7057
7058 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7059 argument.
7060 (target_supports_btrace): Update.
7061
0759a81e
YQ
70622014-02-14 Yao Qi <yao@codesourcery.com>
7063
7064 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7065 (rsp-low-ipa.o): New target.
7066
a7191e8b
TT
70672014-02-12 Tom Tromey <tromey@redhat.com>
7068
7069 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7070 convert_ascii_to_int.
7071 * regcache.c (registers_to_string): Likewise.
7072 * remote-utils.c (decode_M_packet): Likewise.
7073 * server.c (process_serial_event): Likewise.
7074
ff0e980e
TT
70752014-02-12 Tom Tromey <tromey@redhat.com>
7076
7077 * server.c (handle_query, handle_v_run): Use hex2bin, not
7078 unhexify.
7079 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7080
e9371aff
TT
70812014-02-12 Tom Tromey <tromey@redhat.com>
7082
7083 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7084 convert_int_to_ascii.
7085 * regcache.c (registers_to_string, collect_register_as_string):
7086 Likewise.
7087 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7088 Likewise.
7089 * server.c (process_serial_event): Likewise.
7090 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7091 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7092
971dc0b8
TT
70932014-02-12 Tom Tromey <tromey@redhat.com>
7094
7095 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7096 bin2hex, not hexify.
7097 * tracepoint.c (cmd_qtstatus): Likewise.
7098
0a822afb
TT
70992014-02-12 Tom Tromey <tromey@redhat.com>
7100
7101 * remote-utils.c (monitor_output): Pass explicit length to
7102 hexify.
7103
9c3d6531
TT
71042014-02-12 Tom Tromey <tromey@redhat.com>
7105
7106 * tracepoint.c: Include rsp-low.h.
7107 * server.c: Include rsp-low.h.
7108 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7109 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7110 declare.
7111 * remote-utils.c: Include rsp-low.h.
7112 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7113 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7114 (convert_int_to_ascii, convert_ascii_to_int): Move to
7115 common/rsp-low.c.
7116 * regcache.c: Include rsp-low.h.
7117 * ax.c: Include rsp-low.h.
7118 * Makefile.in (SFILES): Add common/rsp-low.c.
7119 (OBS): Add rsp-low.o.
7120 (rsp-low.o): New target.
7121
01fd3ea5
TT
71222014-02-12 Tom Tromey <tromey@redhat.com>
7123
7124 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7125 Include print-utils.h.
7126 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7127 (plongest, thirty_two, phex_nz): Remove.
7128 * Makefile.in (SFILES): Add common/print-utils.c.
7129 (OBS): Add print-utils.o.
7130 (print-utils-ipa.o): New target.
7131 (print-utils.o): New target.
7132 (IPA_OBJS): Add print-utils-ipa.o.
7133
e99dc820
TT
71342014-02-06 Tom Tromey <tromey@redhat.com>
7135
7136 * Makefile.in (SFILES): Fix indentation.
7137
ee1e2d4f
DE
71382014-02-05 Doug Evans <dje@google.com>
7139
7140 * linux-low.c (linux_wait_for_event): Improve comment.
7141 (linux_wait_1): Keep current_inferior in sync with event_child.
7142
f5a02773
DE
71432014-01-22 Doug Evans <dje@google.com>
7144
7145 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7146
87ce2a04
DE
71472014-01-22 Doug Evans <dje@google.com>
7148
7149 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7150 * configure: Regenerate.
7151 * config.in: Regenerate.
7152 * Makefile.in (SFILES): Add debug.c.
7153 (OBS): Add debug.o.
7154 * debug.c: New file.
7155 * debug.h: New file.
7156 * linux-aarch64-low.c (*): Update all debugging printfs to use
7157 debug_printf instead of fprintf.
7158 * linux-arm-low.c (*): Ditto.
7159 * linux-cris-low.c (*): Ditto.
7160 * linux-crisv32-low.c (*): Ditto.
7161 * linux-m32r-low.c (*): Ditto.
7162 * linux-sparc-low.c (*): Ditto.
7163 * linux-x86.c (*): Ditto.
7164 * linux-low.c (*): Ditto.
7165 (linux_wait_1): Add calls to debug_enter, debug_exit.
7166 (linux_wait): Remove redundant debugging printf.
7167 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7168 (linux_resume, unstop_all_lwps): Ditto.
7169 * mem-break.c (*): Update all debugging printfs to use
7170 debug_printf instead of fprintf.
7171 * remote-utils.c (*): Ditto.
7172 * thread-db.c (*): Ditto.
7173 * server.c #include <ctype.h>, "gdb_vecs.h".
7174 (debug_threads): Moved to debug.c.
7175 (*): Update all debugging printfs to use debug_printf instead of
7176 fprintf.
7177 (start_inferior): Replace call to fflush with call to debug_flush.
7178 (monitor_show_help): Mention set debug-format.
7179 (parse_debug_format_options): New function.
7180 (handle_monitor_command): Handle "monitor set debug-format".
7181 (gdbserver_usage): Mention --debug-format.
7182 (main): Parse --debug-format.
7183 * server.h (debug_threads): Declaration moved to debug.h.
7184 #include "debug.h".
7185 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7186 trace_debug_1 that uses debug_printf.
7187 (tracepoint_look_up_symbols): Update all debugging printfs to use
7188 debug_printf instead of fprintf.
7189
e671835b
BS
71902014-01-20 Baruch Siach <baruch@tkos.co.il>
7191
7192 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7193 sys/ptrace.h.
7194
b5737fa9
PA
71952014-01-17 Pedro Alves <palves@redhat.com>
7196
ea38d2a9 7197 PR build/16445
c7faa97a
PA
7198 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7199 defined after including gdb_proc_service.h.
b5737fa9 7200
40ed484e
DE
72012014-01-16 Doug Evans <dje@google.com>
7202
7203 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7204 (match_dll): Use it.
7205
969c39fb
MM
72062014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7207
7208 * target.h (target_ops) <read_btrace>: Change parameters and
7209 return type to allow error reporting.
7210 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7211 trace reading errors on.
7212 * linux-low.c (linux_low_read_btrace): Pass trace reading
7213 errors on.
7214 (linux_low_disable_btrace): New.
7215
ab7f45ba
DE
72162014-01-15 Doug Evans <dje@google.com>
7217
7218 * inferiors.c (thread_id_to_gdb_id): Delete.
7219 * inferiors.h (thread_id_to_gdb_id): Delete.
7220
66af0f44
EZ
72212014-01-13 Eli Zaretskii <eliz@gnu.org>
7222
7223 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7224 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7225 versions.
7226
9939e131
PA
72272014-01-08 Pedro Alves <palves@redhat.com>
7228
7229 * server.c (handle_status): Don't discard previous queued stop
7230 replies or thread's pending status here.
7231 (main) <disconnection>: Do it here instead.
7232
b7ea362b
PA
72332014-01-08 Pedro Alves <palves@redhat.com>
7234
7235 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7236 * server.c (visit_actioned_threads, handle_pending_status): New
7237 function.
7238 (handle_v_cont): Factor out parts to ...
7239 (resume): ... this new function. If in all-stop, and a thread
7240 being resumed has a pending status, report it without actually
7241 resuming.
7242 (myresume): Adjust to use the new 'resume' function.
7243 (clear_pending_status_callback, set_pending_status_callback)
7244 (find_status_pending_thread_callback): New functions.
7245 (handle_status): Handle the case of multiple threads having
7246 interesting statuses to report. Report threads' real last signal
7247 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7248 with an interesting thread to report the status for, instead of
7249 always reporting the status of the first thread.
7250
28498c42
JB
72512014-01-01 Joel Brobecker <brobecker@adacore.com>
7252
7253 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7254 * gdbreplay.c (gdbreplay_version): Likewise.
7255
f45c82da
YZ
72562013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7257
7258 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7259 iov.iov_len with the real length in use.
7260
379a5e2d
JB
72612013-12-13 Joel Brobecker <brobecker@adacore.com>
7262
7263 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7264 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7265 for all targets that use win32-low.c.
7266 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7267 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7268
4210d83e
PA
72692013-12-13 Pedro Alves <palves@redhat.com>
7270
7271 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7272 if equal to TARGET_WAITKIND_LOADED.
7273 * win32-low.c (cached_status): New static global.
7274 (win32_wait): Add declaration.
7275 (do_initial_child_stuff): Flush all initial pending debug events
7276 up to the initial breakpoint.
7277 (win32_wait): If CACHED_STATUS was set, return that instead
7278 of doing a real wait. Remove the code resuming the execution
7279 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7280 during the initial phase. Also remove the code changing
7281 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7282 TARGET_WAITKIND_STOPPED.
7283
e7f0d979
YQ
72842013-12-11 Yao Qi <yao@codesourcery.com>
7285
7286 * notif.c (handle_notif_ack): Return 0 if no notification
7287 matches.
7288
ebcf782c
DE
72892013-11-20 Doug Evans <dje@google.com>
7290
7291 * linux-low.c (linux_set_resume_request): Fix comment.
7292
20ad9378
DE
72932013-11-20 Doug Evans <dje@google.com>
7294
7295 * linux-low.c (resume_status_pending_p): Tweak comment.
7296
a196ebeb
WT
72972013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7298
7299 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7300 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7301 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7302 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7303 (srv_amd64_regobj): Add amd64-mpx.o.
7304 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7305 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7306 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7307 * i387-fp.c (num_pl_bnd_register) Added constant.
7308 (num_pl_bnd_cfg_registers) Added constant.
7309 (struct i387_xsave) Added reserved area and MPX fields.
7310 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7311 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7312 function.
7313 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7314 (init_registers_amd64_mpx_linux): Declare new function.
7315 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7316 (x86_64_regmap): Add MPX registers.
7317 (x86_linux_read_description): Add MPX case.
7318 (initialize_low_arch): Initialize MPX targets.
7319
0080a2f6
TT
73202013-11-18 Tom Tromey <tromey@redhat.com>
7321
7322 * configure: Rebuild.
7323 * configure.ac: Don't check for stdlib.h.
7324 * gdbreplay.c: Unconditionally include stdlib.h.
7325
2978b111
TT
73262013-11-18 Tom Tromey <tromey@redhat.com>
7327
7328 * config.in: Rebuild.
7329 * configure: Rebuild.
7330 * configure.ac: Don't use AC_HEADER_DIRENT.
7331
a3d08894
TT
73322013-11-18 Tom Tromey <tromey@redhat.com>
7333
7334 * server.h: Don't check HAVE_STRING_H.
7335 * gdbreplay.c: Don't check HAVE_STRING_H.
7336 * configure: Rebuild.
7337
0a5dd17d
TT
73382013-11-18 Tom Tromey <tromey@redhat.com>
7339
7340 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7341 LIBGNU.
7342
1bd2f0ba
TT
73432013-11-08 Tom Tromey <tromey@redhat.com>
7344
7345 * configure, config.in: Rebuild.
7346 * configure.ac: Remove unused configury.
7347
3266f10b
TT
73482013-11-08 Tom Tromey <tromey@redhat.com>
7349
7350 * acinclude.m4: Include common.m4, codeset.m4.
7351 * configure, config.in: Rebuild.
7352 * configure.ac: Use GDB_AC_COMMON.
7353
6682d959
AA
73542013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7355
7356 * linux-s390-low.c (HWCAP_S390_TE): New define.
7357 (s390_arch_setup): Consider the TE field in the HWCAP for
7358 determining 'have_regset_tdb'.
7359
fd0a4d76
SDJ
73602013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7361
7362 PR gdb/16014
7363 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7364 call to sizeof.
7365
1a3d890b
PA
73662013-10-02 Pedro Alves <palves@redhat.com>
7367
7368 * server.c (process_serial_event): Don't output "GDBserver
7369 exiting" if GDB is connected through stdio.
7370 * target.c (mywait): Likewise, be silent if GDB is connected
7371 through stdio.
7372
97ad4581
JB
73732013-10-01 Joel Brobecker <brobecker@adacore.com>
7374
7375 * lynx-low.c (lynx_add_threads_after_attach): New function.
7376 (lynx_attach): Remove call to add_thread. Add call to
7377 lynx_add_threads_after_attach instead.
7378
5b4e221c
MF
73792013-09-28 Mike Frysinger <vapier@gentoo.org>
7380
7381 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7382 * config.in, configure: Regenerated.
7383
ee47b2f8
YQ
73842013-09-18 Yao Qi <yao@codesourcery.com>
7385
7386 PR server/15959
7387 * server.c (start_inferior): Clear 'resume_info'.
7388
d6707650 73892013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7390
d6707650
JW
7391 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7392 for each register.
7393
9243dd0e 73942013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7395
9243dd0e
JW
7396 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7397 linux-tile-low.o to srv_tgtobj.
7398
c623a6ef
WN
73992013-09-16 Will Newton <will.newton@linaro.org>
7400
7401 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7402 out regs.
7403
fb71d39e
PA
74042013-09-06 Pedro Alves <palves@redhat.com>
7405
7406 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7407 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7408 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7409 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7410 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7411 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7412
8e7e9910
PA
74132013-09-06 Pedro Alves <palves@redhat.com>
7414
7415 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7416 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7417
7c3a12ca
PA
74182013-09-06 Pedro Alves <palves@redhat.com>
7419
7420 * linux-amd64-ipa.c: Include tracepoint.h.
7421 * linux-i386-ipa.c: Include tracepoint.h.
7422
8eb3d7b6
RW
74232013-09-06 Ricard Wanderlof <ricardw@axis.com>
7424
7425 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7426 (ps_get_thread_area): New function.
7427
eddddb9d
RW
74282013-09-06 Ricard Wanderlof <ricardw@axis.com>
7429
7430 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7431 (initialize_low_arch): Call init_registers_crisv32 rather than
7432 init_register_crisv32.
7433
533b0600
PA
74342013-09-05 Pedro Alves <palves@redhat.com>
7435
7436 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7437 to ...
7438 * hostio.h: ... this new file.
7439 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7440 win32-low.c: Include hostio.h.
7441
0ce3d3b5
PA
74422013-09-05 Pedro Alves <palves@redhat.com>
7443
7444 * server.h (gdb_client_data, handler_func, callback_handler_func)
7445 (delete_file_handler, add_file_handler, append_callback_event)
7446 (delete_callback_event, start_event_loop, initialize_event_loop):
7447 Move to event-loop.h and include it.
7448 * event-loop.h: New file.
7449
799cdc37
PA
74502013-09-05 Pedro Alves <palves@redhat.com>
7451
7452 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7453 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7454 (loaded_dll, unloaded_dll): Move to ...
7455 * dll.h: ... this new file.
7456 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7457
6a6bbd9d
PA
74582013-09-05 Pedro Alves <palves@redhat.com>
7459
7460 * server.h (current_process, get_thread_process, all_processes)
7461 (add_inferior_to_list, for_each_inferior, current_inferior)
7462 (remove_inferior, add_process, remove_process, find_process_pid)
7463 (have_started_inferiors_p, have_attached_inferiors_p)
7464 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7465 (clear_inferiors, find_inferior, find_inferior_id)
7466 (inferior_target_data, set_inferior_target_data)
7467 (inferior_regcache_data, set_inferior_regcache_data): Move to
7468 inferiors.h, and include it.
7469 * inferiors.h: New file.
7470
f699aaba
PA
74712013-09-05 Pedro Alves <palves@redhat.com>
7472
7473 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7474 Move ...
72f4393d 7475 * ax.h: ... here.
f699aaba 7476
c144c7a0
PA
74772013-09-05 Pedro Alves <palves@redhat.com>
7478
7479 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7480 tracepoint.h.
7481 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7482 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7483 (handle_tracepoint_general_set, handle_tracepoint_query)
7484 (tracepoint_finished_step, tracepoint_was_hit)
7485 (release_while_stepping_state_list, current_traceframe)
7486 (in_readonly_region, traceframe_read_mem)
7487 (fetch_traceframe_registers, traceframe_read_sdata)
7488 (traceframe_read_info, struct fast_tpoint_collect_status)
7489 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7490 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7491 (supply_fast_tracepoint_registers)
7492 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7493 (ipa_tdesc, claim_trampoline_space)
7494 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7495 (agent_mem_read, agent_get_trace_state_variable_value)
7496 (agent_set_trace_state_variable_value, agent_tsv_read)
7497 (agent_mem_read_string, get_raw_reg_func_addr)
7498 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7499 * tracepoint.h: ... this new file.
7500
ff42e6ab
PA
75012013-09-05 Pedro Alves <palves@redhat.com>
7502
7503 * server.h (perror_with_name, error, fatal, warning, paddress)
7504 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7505 include it.
7506 * utils.h: New file.
7507
541af0f4
PA
75082013-09-05 Pedro Alves <palves@redhat.com>
7509
7510 * server.h (remote_debug, noack_mode, transport_is_reliable)
7511 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7512 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7513 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7514 (write_enn, initialize_async_io, enable_async_io)
7515 (disable_async_io, check_remote_input_interrupt_request)
7516 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7517 (dead_thread_notify, prepare_resume_reply)
7518 (decode_address_to_semicolon, decode_address, decode_m_packet)
7519 (decode_M_packet, decode_X_packet, decode_xfer_write)
7520 (decode_search_memory_packet, unhexify, hexify)
7521 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7522 (look_up_one_symbol, relocate_instruction)
7523 (monitor_output): Move to remote-utils.h, and include it.
7524 * remote-utils.h: New file.
7525
eebdf26b
PA
75262013-09-05 Pedro Alves <palves@redhat.com>
7527
7528 * server.h (_): Delete.
7529
3aafd2ff
PA
75302013-09-02 Pedro Alves <palves@redhat.com>
7531
7532 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7533 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7534 allocated.
7535 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7536
cee83bcb
PM
75372013-09-02 Pierre Muller <muller@sourceware.org>
7538
7539 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7540 or WriteProcessMemory complete successfully and handle
7541 ERROR_PARTIAL_COPY error.
7542
9a13b2fa
PA
75432013-09-02 Pedro Alves <palves@redhat.com>
7544
7545 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7546 error instead of EIO.
7547
602e3198
JK
75482013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7549
7550 PR server/15604
7551 * linux-low.c: Include filestuff.h.
7552 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7553 * lynx-low.c: Include filestuff.h.
7554 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7555 * server.c: Include filestuff.h.
7556 (main): Call notice_open_fds.
7557 * spu-low.c: Include filestuff.h.
7558 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7559
96d7229d
LM
75602013-08-22 Luis Machado <lgustavo@codesourcery.com>
7561
7562 * Makefile.in: Explain why ../target and ../nat are not
7563 listed as include file search paths.
7564 (linux-waitpid.o): New object file rule.
7565 * configure.srv (srv_native_linux_obj): New variable.
7566 Replace all occurrences of linux native object files with
7567 $srv_native_linux_obj.
7568 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7569 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7570 (linux_enable_event_reporting): Remove declaration.
7571 (my_waitpid): Moved to common/linux-waitpid.c.
7572 (linux_wait_for_event): Pass ptid when calling
7573 linux_enable_event_reporting.
7574 (linux_supports_tracefork_flag): Remove.
7575 (linux_enable_event_reporting): Likewise.
7576 (linux_tracefork_grandchild): Remove.
7577 (STACK_SIZE): Moved to common/linux-ptrace.c.
7578 (linux_tracefork_child): Remove.
7579 (linux_test_for_tracefork): Remove.
7580 (linux_look_up_symbols): Call linux_supports_traceclone.
7581 (initialize_low): Remove call to linux_test_for_tracefork.
7582 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7583 common/linux-ptrace.h.
7584 (PTRACE_TYPE_ARG4): Likewise.
7585 Include linux-ptrace.h.
7586
32940073
PA
75872013-08-21 Pedro Alves <palves@redhat.com>
7588
7589 * config.in: Renegerate.
7590
33b60d58 75912013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7592
33b60d58
LM
7593 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7594 (SFILES): Remove $(srcdir)/common/target-common.c and
7595 add $(srcdir)/target/waitstatus.c.
7596 (OBS): Remove target-common.o and add waitstatus.o.
7597 (server_h): Remove $(srcdir)/../common/target-common.h and
7598 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7599 and $(srcdir)/../target/waitstatus.h.
7600 (target-common.o): Remove.
7601 (waitstatus.o): New target object file.
7602 * target.h: Do not include target-common.h and
7603 include target/resume.h, target/wait.h and
7604 target/waitstatus.h.
7605
b8e1b30e
LM
76062013-08-13 Luis Machado <lgustavo@codesourcery.com>
7607
7608 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7609 to PTRACE_TYPE_ARG3.
7610 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7611 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7612 PTRACE_TYPE_ARG4.
7613 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7614 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7615
7a60ad40
YQ
76162013-07-27 Jie Zhang <jie@codesourcery.com>
7617 Daniel Jacobowitz <dan@codesourcery.com>
7618 Yao Qi <yao@codesourcery.com>
7619
7620 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7621 (mips-linux-watch.o): New rule.
7622 (mips_linux_watch_h): New variable.
7623 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7624 srv_tgtobj.
7625 * linux-mips-low.c: Include mips-linux-watch.h.
7626 (struct arch_process_info, struct arch_lwp_info): New.
7627 (update_watch_registers_callback): New function.
7628 (mips_linux_new_process, mips_linux_new_thread) New functions.
7629 (mips_linux_prepare_to_resume, mips_insert_point): New
7630 functions.
7631 (mips_remove_point, mips_stopped_by_watchpoint): New
7632 functions.
7633 (rsp_bp_type_to_target_hw_bp_type): New function.
7634 (mips_stopped_data_address): New function.
7635 (the_low_target): Add watchpoint support functions.
7636
de6f69ad
YQ
76372013-07-27 Yao Qi <yao@codesourcery.com>
7638
7639 * i386-low.c: Include break-common.h.
7640 (enum target_hw_bp_type): Remove.
7641
3360c0bf
LM
76422013-07-24 Luis Machado <lgustavo@codesourcery.com>
7643
7644 * Makefile.in (SFILES): /common/target-common.c.
7645 (OBS): Add target-common.o.
7646 (server_h): Add $(srcdir)/../common/target-common.h.
7647 (target-common.o): New target.
7648 * server.c (queue_stop_reply_callback): Free
7649 status string after use.
7650 * target.c (target_waitstatus_to_string): Remove.
7651 * target.h: Include target-common.h.
7652 (resume_kind): Likewise.
7653 (target_waitkind): Likewise.
7654 (target_waitstatus): Likewise.
7655 (TARGET_WNOHANG): Likewise.
7656
bd885420
YQ
76572013-07-04 Yao Qi <yao@codesourcery.com>
7658
7659 * Makefile.in (host_alias): Use @host_noncanonical@.
7660 (target_alias): Use @target_noncanonical@.
7661 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7662 ACX_NONCANONICAL_HOST.
7663 * configure: Regenerated.
7664
7665 Revert:
7666 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7667
7668 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7669 * configure: Rebuild.
7670 * Makefile.in (version_host, version_target): Get from configure.
7671 (version.c): Use $(version_host) and $(version_target).
7672
17ef446e
PA
76732013-07-03 Pedro Alves <palves@redhat.com>
7674
7675 * Makefile.in (config.status): Depend on development.sh.
7676 * acinclude.m4: Include libmcheck.m4.
7677 * configure: Regenerate.
7678
7a9a7487
MG
76792013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7680
7681 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7682 attribute inside the parentheses.
7683 (winapi_DebugSetProcessKillOnExit): Ditto.
7684 (winapi_DebugBreakProcess): Ditto.
7685 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7686
49b64de6
MG
76872013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7688
7689 * notif.h (notif_event): Add a dummy member to avoid compiler
7690 errors.
7691
d5749ee7
PA
76922013-07-01 Pedro Alves <palves@redhat.com>
7693
7694 * hostio.c (HOSTIO_PATH_MAX): Define.
7695 (require_filename, handle_open, handle_unlink, handle_readlink):
7696 Use it.
7697
d8d2a3ee
PA
76982013-07-01 Pedro Alves <palves@redhat.com>
7699
7700 * server.h: Include "pathmax.h".
7701 * linux-low.c: Don't include sys/param.h.
7702 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7703 MAXPATHLEN.
7704 * win32-low.c: Don't include sys/param.h.
7705 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7706
bc7dea8d
PA
77072013-07-01 Pedro Alves <palves@redhat.com>
7708
7709 * event-loop.c: Don't check HAVE_UNISTD_H before including
7710 <unistd.h>.
7711 * gdbreplay.c: Likewise.
7712 * remote-utils.c: Likewise.
7713 * server.c: Likewise.
7714 * configure.ac: Don't check for unistd.h.
7715 * configure: Regenerate.
7716
d6c2da54
TT
77172013-06-28 Tom Tromey <tromey@redhat.com>
7718
7719 * Makefile.in (version.c): Use version.in, not
7720 common/version.in.
7721
257b6bec
MG
77222013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7723
7724 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7725 * configure: Rebuild.
7726 * Makefile.in (version_host, version_target): Get from configure.
7727 (version.c): Use $(version_host) and $(version_target).
7728
86ebe149
DK
77292013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7730
7731 Fix trace-status to output user name without trailing colon.
7732 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7733
f30aa5af
DK
77342013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7735
7736 Fix trace-status to output proper start-time and stop-time.
7737 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7738 output start time and stop time in hex as gdb expects.
7739
28a93511
YQ
77402013-06-26 Pedro Alves <pedro@codesourcery.com>
7741
7742 * tracepoint.c (build_traceframe_info_xml): Output trace state
7743 variables present in the trace buffer.
7744
01208463
TT
77452013-06-24 Tom Tromey <tromey@redhat.com>
7746
7747 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7748 create-version.sh.
7749 (version.o): Remove.
7750 * gdbreplay.c: Include version.h.
7751 (version, host_name): Don't declare.
7752 * server.h: Include version.h.
7753 (version, host_name): Don't declare.
7754
760256f9
PA
77552013-06-12 Pedro Alves <palves@redhat.com>
7756
7757 * linux-x86-low.c (linux_is_elf64): Delete global.
7758 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7759 with local linux_pid_exe_is_elf_64_file use.
7760
030031ee
PA
77612013-06-11 Pedro Alves <palves@redhat.com>
7762
7763 * linux-low.c (regset_disabled, disable_regset): New functions.
7764 (regsets_fetch_inferior_registers)
7765 (regsets_store_inferior_registers): Use them.
7766 (initialize_regsets_info); Don't allocate the disabled_regsets
7767 array here.
7768 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7769 comment.
7770
5da6eb0a
PA
77712013-06-11 Pedro Alves <palves@redhat.com>
7772
7773 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7774 xmalloc.
7775
7e5aaa09
PA
77762013-06-11 Pedro Alves <palves@redhat.com>
7777
7778 * linux-x86-low.c (initialize_low_arch): Call
7779 init_registers_x32_avx_linux.
7780
d878444c
JK
77812013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7782
7783 Fix compatibility with Android Bionic.
7784 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7785 it is not empty.
7786
3aee8918
PA
77872013-06-07 Pedro Alves <palves@redhat.com>
7788
5f2b57b5 7789 PR server/14823
3aee8918
PA
7790 * Makefile.in (OBS): Add tdesc.o.
7791 (IPA_OBJS): Add tdesc-ipa.o.
7792 (tdesc-ipa.o): New rule.
7793 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7794 interface.
7795 * linux-low.c (new_inferior): Delete.
7796 (disabled_regsets, num_regsets): Delete.
7797 (linux_add_process): Adjust to set the new per-process
7798 new_inferior flag.
7799 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7800 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7801 was a stop. When calling arch_setup, switch the current inferior
7802 to the thread that got an event.
7803 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7804 (regsets_fetch_inferior_registers)
7805 (regsets_store_inferior_registers): New regsets_info parameter.
7806 Adjust to use it.
7807 (linux_register_in_regsets): New regs_info parameter. Adjust to
7808 use it.
7809 (register_addr, fetch_register, store_register): New usrregs_info
7810 parameter. Adjust to use it.
7811 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7812 parameter regs_info. Adjust to use it.
7813 (linux_fetch_registers): Get the current inferior's regs_info, and
7814 adjust to use it.
7815 (linux_store_registers): Ditto.
7816 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7817 (initialize_low): Don't initialize the target_regsets here. Call
7818 initialize_low_arch.
7819 * linux-low.h (target_regsets): Delete declaration.
7820 (struct regsets_info): New.
7821 (struct usrregs_info): New.
7822 (struct regs_info): New.
7823 (struct process_info_private) <new_inferior>: New field.
7824 (struct linux_target_ops): Delete the num_regs, regmap, and
7825 regset_bitmap fields. New field regs_info.
7826 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7827 * i387-fp.c (num_xmm_registers): Delete.
7828 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7829 calls to new interface.
7830 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7831 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7832 Infer the number of xmm registers from the regcache's target
7833 description.
7834 * i387-fp.h (num_xmm_registers): Delete.
7835 * inferiors.c (add_thread): Don't install the thread's regcache
7836 here.
7837 * proc-service.c (gregset_info): Fetch the current inferior's
7838 regs_info. Adjust to use it.
7839 * regcache.c: Include tdesc.h.
7840 (register_bytes, reg_defs, num_registers)
7841 (gdbserver_expedite_regs): Delete.
7842 (get_thread_regcache): If the thread doesn't have a regcache yet,
7843 create one, instead of aborting gdbserver.
7844 (regcache_invalidate_one): Rename to ...
7845 (regcache_invalidate_thread): ... this.
7846 (regcache_invalidate_one): New.
7847 (regcache_invalidate): Only invalidate registers of the current
7848 process.
7849 (init_register_cache): Add target_desc parameter, and use it.
7850 (new_register_cache): Ditto. Assert the target description has a
7851 non zero registers_size.
7852 (regcache_cpy): Add assertions. Adjust.
7853 (realloc_register_cache, set_register_cache): Delete.
7854 (registers_to_string, registers_from_string): Adjust.
7855 (find_register_by_name, find_regno, find_register_by_number)
7856 (register_cache_size): Add target_desc parameter, and use it.
7857 (free_register_cache_thread, free_register_cache_thread_one)
7858 (regcache_release, register_cache_size): New.
7859 (register_size): Add target_desc parameter, and use it.
7860 (register_data, supply_register, supply_register_zeroed)
7861 (supply_regblock, supply_register_by_name, collect_register)
7862 (collect_register_as_string, collect_register_by_name): Adjust.
7863 * regcache.h (struct target_desc): Forward declare.
7864 (struct regcache) <tdesc>: New field.
7865 (init_register_cache, new_register_cache): Add target_desc
7866 parameter.
7867 (regcache_invalidate_thread): Declare.
7868 (regcache_invalidate_one): Delete declaration.
7869 (regcache_release): Declare.
7870 (find_register_by_number, register_cache_size, register_size)
7871 (find_regno): Add target_desc parameter.
7872 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7873 declarations.
7874 * remote-utils.c: Include tdesc.h.
7875 (outreg, prepare_resume_reply): Adjust.
7876 * server.c: Include tdesc.h.
7877 (gdbserver_xmltarget): Delete declaration.
7878 (get_features_xml, process_serial_event): Adjust.
7879 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7880 declare.
7881 (struct process_info) <tdesc>: New field.
7882 (ipa_tdesc): Declare.
7883 * tdesc.c: New file.
7884 * tdesc.h: New file.
7885 * tracepoint.c: Include tdesc.h.
7886 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7887 (get_context_regcache): Adjust to pass ipa_tdesc down.
7888 (do_action_at_tracepoint): Adjust to get the register cache size
7889 from the context regcache's description.
7890 (traceframe_walk_blocks): Adjust to get the register cache size
7891 from the current trace frame's description.
7892 (traceframe_get_pc): Adjust to get current trace frame's
7893 description and pass it down.
7894 (gdb_collect): Adjust to get the register cache size from the
7895 IPA's description.
7896 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7897 (gdbserver_xmltarget): Delete.
7898 (initialize_low_tracepoint): Set the ipa's target description.
7899 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7900 (initialize_low_tracepoint): Set the ipa's target description.
7901 * linux-x86-low.c: Include tdesc.h.
7902 [__x86_64__] (is_64bit_tdesc): New.
7903 (ps_get_thread_area, x86_get_thread_area): Use it.
7904 (i386_cannot_store_register): Rename to ...
7905 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7906 (i386_cannot_fetch_register): Rename to ...
7907 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7908 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7909 to new interface.
7910 (target_regsets): Rename to ...
7911 (x86_regsets): ... this.
7912 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7913 interface.
7914 (x86_siginfo_fixup): Use is_64bit_tdesc.
7915 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7916 (tdesc_x32_avx_linux, tdesc_x32_linux)
7917 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7918 Declare.
7919 (x86_linux_update_xmltarget): Delete.
7920 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7921 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7922 (AMD64_LINUX_USER64_CS): New.
7923 (x86_linux_read_description): New, based on
7924 x86_linux_update_xmltarget.
7925 (same_process_callback): New.
7926 (x86_arch_setup_process_callback): New.
7927 (x86_linux_update_xmltarget): New.
7928 (x86_regsets_info): New.
7929 (amd64_linux_regs_info): New.
7930 (i386_linux_usrregs_info): New.
7931 (i386_linux_regs_info): New.
7932 (x86_linux_regs_info): New.
7933 (x86_arch_setup): Reimplement.
7934 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7935 (x86_emit_ops): Ditto.
7936 (the_low_target): Adjust. Install x86_linux_regs_info,
7937 x86_cannot_fetch_register, and x86_cannot_store_register.
7938 (initialize_low_arch): New.
7939 * linux-ia64-low.c (tdesc_ia64): Declare.
7940 (ia64_fetch_register): Adjust.
7941 (ia64_usrregs_info, regs_info): New globals.
7942 (ia64_regs_info): New function.
7943 (the_low_target): Adjust.
7944 (initialize_low_arch): New function.
7945 * linux-sparc-low.c (tdesc_sparc64): Declare.
7946 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7947 Adjust.
7948 (sparc_arch_setup): New function.
7949 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7950 (the_low_target): Adjust.
7951 (initialize_low_arch): New function.
7952 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7953 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7954 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7955 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7956 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7957 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7958 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7959 (tdesc_powerpc_isa205_vsx64l): Declare.
7960 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7961 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7962 (ppc_set_pc, ppc_get_hwcap): Adjust.
7963 (ppc_usrregs_info): Forward declare.
7964 (!__powerpc64__) ppc_regmap_adjusted: New global.
7965 (ppc_arch_setup): Adjust to the current process'es target
7966 description.
7967 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7968 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7969 (ppc_store_evrregset): Adjust.
7970 (target_regsets): Rename to ...
7971 (ppc_regsets): ... this, and make static.
7972 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7973 (ppc_regs_info): New function.
7974 (the_low_target): Adjust.
7975 (initialize_low_arch): New function.
7976 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7977 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7978 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7979 (tdesc_s390x_linux64v2): Declare.
7980 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7981 (s390_fill_gregset, s390_store_last_break): Adjust.
7982 (target_regsets): Rename to ...
7983 (s390_regsets): ... this, and make static.
7984 (s390_get_pc, s390_set_pc): Adjust.
7985 (s390_get_hwcap): New target_desc parameter, and use it.
7986 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7987 (s390_arch_setup): Adjust to set the current process'es target
7988 description. Don't adjust the regmap.
7989 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7990 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7991 (regs_info_3264): New globals.
7992 (s390_regs_info): New function.
7993 (the_low_target): Adjust.
7994 (initialize_low_arch): New function.
7995 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7996 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7997 [__mips64] (init_registers_mips_linux)
7998 (init_registers_mips_dsp_linux): Delete defines.
7999 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8000 (have_dsp): New global.
8001 (mips_read_description): New, based on mips_arch_setup.
8002 (mips_arch_setup): Reimplement.
8003 (get_usrregs_info): New function.
8004 (mips_cannot_fetch_register, mips_cannot_store_register)
8005 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8006 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8007 (target_regsets): Rename to ...
8008 (mips_regsets): ... this, and make static.
8009 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8010 (dsp_regs_info, regs_info): New globals.
8011 (mips_regs_info): New function.
8012 (the_low_target): Adjust.
8013 (initialize_low_arch): New function.
8014 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8015 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8016 Declare.
8017 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8018 (arm_read_description): New, with bits factored from
8019 arm_arch_setup.
8020 (arm_arch_setup): Reimplement.
8021 (target_regsets): Rename to ...
8022 (arm_regsets): ... this, and make static.
8023 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8024 (arm_regs_info): New function.
8025 (the_low_target): Adjust.
8026 (initialize_low_arch): New function.
8027 * linux-m68k-low.c (tdesc_m68k): Declare.
8028 (target_regsets): Rename to ...
8029 (m68k_regsets): ... this, and make static.
8030 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8031 (m68k_regs_info): New function.
8032 (m68k_arch_setup): New function.
8033 (the_low_target): Adjust.
8034 (initialize_low_arch): New function.
8035 * linux-sh-low.c (tdesc_sharch): Declare.
8036 (target_regsets): Rename to ...
8037 (sh_regsets): ... this, and make static.
8038 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8039 (sh_regs_info, sh_arch_setup): New functions.
8040 (the_low_target): Adjust.
8041 (initialize_low_arch): New function.
8042 * linux-bfin-low.c (tdesc_bfin): Declare.
8043 (bfin_arch_setup): New function.
8044 (bfin_usrregs_info, regs_info): New globals.
8045 (bfin_regs_info): New function.
8046 (the_low_target): Adjust.
8047 (initialize_low_arch): New function.
8048 * linux-cris-low.c (tdesc_cris): Declare.
8049 (cris_arch_setup): New function.
8050 (cris_usrregs_info, regs_info): New globals.
8051 (cris_regs_info): New function.
8052 (the_low_target): Adjust.
8053 (initialize_low_arch): New function.
8054 * linux-cris-low.c (tdesc_crisv32): Declare.
8055 (cris_arch_setup): New function.
8056 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8057 (cris_regs_info): New function.
8058 (the_low_target): Adjust.
8059 (initialize_low_arch): New function.
8060 * linux-m32r-low.c (tdesc_m32r): Declare.
8061 (m32r_arch_setup): New function.
8062 (m32r_usrregs_info, regs_info): New globals.
8063 (m32r_regs_info): Adjust.
8064 (initialize_low_arch): New function.
8065 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8066 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8067 (tic6x_usrregs_info): Forward declare.
8068 (tic6x_read_description): New function, based on ...
8069 (tic6x_arch_setup): ... this. Reimplement.
8070 (target_regsets): Rename to ...
8071 (tic6x_regsets): ... this, and make static.
8072 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8073 (tic6x_regs_info): New function.
8074 (the_low_target): Adjust.
8075 (initialize_low_arch): New function.
8076 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8077 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8078 (target_regsets): Rename to ...
8079 (xtensa_regsets): ... this, and make static.
8080 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8081 globals.
8082 (xtensa_arch_setup, xtensa_regs_info): New functions.
8083 (the_low_target): Adjust.
8084 (initialize_low_arch): New function.
8085 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8086 (nios2_arch_setup): Set the current process'es tdesc.
8087 (target_regsets): Rename to ...
8088 (nios2_regsets): ... this.
8089 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8090 (nios2_regs_info): New function.
8091 (the_low_target): Adjust.
8092 (initialize_low_arch): New function.
a261b8f5
PA
8093 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8094 (aarch64_arch_setup): Set the current process'es tdesc.
8095 (target_regsets): Rename to ...
8096 (aarch64_regsets): ... this.
8097 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8098 (aarch64_regs_info): New function.
8099 (the_low_target): Adjust.
8100 (initialize_low_arch): New function.
3aee8918
PA
8101 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8102 globals.
8103 (target_regsets): Rename to ...
8104 (tile_regsets): ... this.
8105 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8106 (tile_regs_info): New function.
8107 (tile_arch_setup): Set the current process'es tdesc.
8108 (the_low_target): Adjust.
8109 (initialize_low_arch): New function.
8110 * spu-low.c (tdesc_spu): Declare.
8111 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8112 * win32-arm-low.c (tdesc_arm): Declare.
8113 (arm_arch_setup): New function.
8114 (the_low_target): Install arm_arch_setup instead of
8115 init_registers_arm.
8116 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8117 (init_windows_x86): Rename to ...
8118 (i386_arch_setup): ... this. Set `win32_tdesc'.
8119 (the_low_target): Adjust.
8120 * win32-low.c (win32_tdesc): New global.
8121 (child_add_thread): Don't create the thread cache here.
8122 (do_initial_child_stuff): Set the new process'es tdesc.
8123 * win32-low.h (struct target_desc): Forward declare.
8124 (win32_tdesc): Declare.
8125 * lynx-i386-low.c (tdesc_i386): Declare global.
8126 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8127 * lynx-low.c (lynx_tdesc): New global.
8128 (lynx_add_process): Set the new process'es tdesc.
8129 * lynx-low.h (struct target_desc): Forward declare.
8130 (lynx_tdesc): Declare global.
8131 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8132 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8133 * nto-low.c (nto_tdesc): New global.
8134 (do_attach): Set the new process'es tdesc.
8135 * nto-low.h (struct target_desc): Forward declare.
8136 (nto_tdesc): Declare.
8137 * nto-x86-low.c (tdesc_i386): Declare.
8138 (nto_x86_arch_setup): Set `nto_tdesc'.
8139
b1fbec62
GB
81402013-06-04 Gary Benson <gbenson@redhat.com>
8141
8142 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8143 to qSupported response when appropriate.
8144 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8145 with nonzero-length annex.
8146 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8147 arguments supplied in annex.
8148
d1ec4ce7
DE
81492013-05-31 Doug Evans <dje@google.com>
8150
ac44adcb 8151 PR server/15594
d1ec4ce7
DE
8152 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8153 64 bits in 64-cross-32 environment.
8154
9b25f2d3
PA
81552013-05-28 Pedro Alves <palves@redhat.com>
8156
8157 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8158 (aarch64-without-fpu.c): Delete rule.
8159 * configure.srv (aarch64*-*-linux*): Remove references to
8160 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8161 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8162 declaration.
8163
6740dc9c
PA
81642013-05-24 Pedro Alves <palves@redhat.com>
8165
8166 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8167 instead of strchr/decode_address. Error if the range isn't split
8168 with a ','. Don't assume there's be a ':' in the action.
8169
c2d6af84
PA
81702013-05-23 Yao Qi <yao@codesourcery.com>
8171 Pedro Alves <palves@redhat.com>
8172
8173 * linux-low.c (lwp_in_step_range): New function.
8174 (linux_wait_1): If the thread was range stepping and stopped
8175 outside the stepping range, report the stop to GDB. Otherwise,
8176 continue stepping. Add range stepping debug output.
8177 (linux_set_resume_request): Copy the step range from the resume
8178 request to the lwp.
8179 (linux_supports_range_stepping): New.
8180 (linux_target_ops) <supports_range_stepping>: Set to
8181 linux_supports_range_stepping.
8182 * linux-low.h (struct linux_target_ops)
8183 <supports_range_stepping>: New field.
8184 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8185 * linux-x86-low.c (x86_supports_range_stepping): New.
8186 (the_low_target) <supports_range_stepping>: Set to
8187 x86_supports_range_stepping.
8188 * server.c (handle_v_cont): Handle 'r' action.
8189 (handle_v_requests): Append ";r" if the target supports range
8190 stepping.
8191 * target.h (struct thread_resume) <step_range_start,
8192 step_range_end>: New fields.
8193 (struct target_ops) <supports_range_stepping>:
8194 New field.
8195 (target_supports_range_stepping): New macro.
8196
58794e1a
JB
81972013-05-17 Joel Brobecker <brobecker@adacore.com>
8198
8199 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8200 confusion in comment.
8201
d631c5a7
JB
82022013-05-17 Joel Brobecker <brobecker@adacore.com>
8203
8204 * lynx-low.c (struct process_info_private): New type.
8205 (lynx_add_process): New function.
8206 (lynx_create_inferior, lynx_attach): Replace calls to
8207 add_process by calls to lynx_add_process.
8208 (lynx_resume): If PTID is null, then try using
8209 current_process()->private->last_wait_event_ptid.
8210 Add comments.
8211 (lynx_clear_inferiors): Delete. The contents of that function
8212 has been inlined in lynx_mourn;
8213 (lynx_wait_1): Save the ptid in the process's private data.
8214 (lynx_mourn): Free the process' private data. Replace call
8215 to lynx_clear_inferiors by call to clear_inferiors.
8216
96f7a20f
YQ
82172013-05-17 Yao Qi <yao@codesourcery.com>
8218
8219 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8220 the right place.
8221
db0dfaa0
LM
82222013-05-16 Luis Machado <lgustavo@codesourcery.com>
8223
8224 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8225 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8226 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8227 PT_TEXT_END_ADDR guards. Update comments.
8228 (linux_target_op) <read_offsets>: Conditionally define to
8229 linux_read_offsets if the target is UCLIBC and if it defines
8230 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8231
68f5f838
SL
82322013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8233 Andrew Jenner <andrew@codesourcery.com>
8234
8235 * Makefile.in (SFILES): Add linux-nios2-low.c.
8236 (clean): Add action to delete nios2-linux.c.
8237 (nios2-linux.c): New rule.
8238 * configure.srv: Add nios2*-*-linux*.
8239 * linux-nios2-low.c: New.
8240
1ebff1fd
HAQ
82412013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8242
8243 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8244
f6150862
HZ
82452013-04-25 Hui Zhu <hui@codesourcery.com>
8246
8247 PR gdb/15186
f6150862
HZ
8248 * ax.c (ax_printf): Add fflush.
8249
614c279d
TT
82502013-04-22 Tom Tromey <tromey@redhat.com>
8251
8252 * Makefile.in (SFILES): Add filestuff.c.
8253 (OBS): Add filestuff.o.
8254 (filestuff.o): New target.
8255 * config.in, configure: Rebuild.
8256 * configure.ac: Check for fdwalk, pipe2.
8257
7d4e5717
PA
82582013-04-17 Pedro Alves <palves@redhat.com>
8259
8260 * configure.ac (USE_THREAD_DB): Delete variable.
8261 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8262 Don't AC_SUBST USE_THREAD_DB.
8263 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8264 * config.in, configure: Regenerate.
8265
d5c93e41
PA
82662013-04-16 Pedro Alves <palves@redhat.com>
8267
8268 * linux-low.h (struct lwp_info) <thread_known>: Move under
8269 the USE_THREAD_DB #ifdef.
8270
04f5fe89
PA
82712013-04-16 Pedro Alves <palves@redhat.com>
8272
8273 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8274 (linux-low.o): Delete rule.
8275 * linux-low.h: Always include "gdb_thread_db.h" instead of
8276 conditionally including thread_db.h.
8277 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8278 HAVE_THREAD_DB_H.
8279
480b27bf
JK
82802013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8281
8282 * Makefile.in (install-only): Fix make install regression.
8283
43662968
JK
82842013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8285
8286 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8287 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8288 installation.
8289 * gdbserver.1: Remove.
8290
3e74e146
PA
82912013-03-22 Pedro Alves <palves@redhat.com>
8292
8293 * linux-low.c (handle_extended_wait): Don't call
8294 linux_enable_event_reporting.
8295
a8347a2a
TT
82962013-03-15 Tony Theodore <tonyt@logyst.com>
8297
8298 PR build/9098:
8299 * Makefile.in (SHELL): Use @SHELL@.
8300
eeb56fa7
SDJ
83012013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8302
8303 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8304 compiler warning.
8305
4fa7e2ff
JB
83062013-03-13 Joel Brobecker <brobecker@adacore.com>
8307
8308 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8309 Remove extraneous NULL element.
8310
8ddb1965
YQ
83112013-03-13 Yao Qi <yao@codesourcery.com>
8312
8313 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8314 'V' block in trace frame.
8315
9accd112
MM
83162013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8317
8318 * target.h (struct target_ops): Add btrace ops.
8319 (target_supports_btrace): New macro.
8320 (target_enable_btrace): New macro.
8321 (target_disable_btrace): New macro.
8322 (target_read_btrace): New macro.
8323 * gdbthread.h (struct thread_info): Add btrace field.
8324 * server.c: Include btrace-common.h.
8325 (handle_btrace_general_set): New function.
8326 (handle_btrace_enable): New function.
8327 (handle_btrace_disable): New function.
8328 (handle_general_set): Call handle_btrace_general_set.
8329 (handle_qxfer_btrace): New function.
8330 (struct qxfer qxfer_packets[]): Add btrace entry.
8331 * inferiors.c (remove_thread): Disable btrace.
8332 * linux-low: Include linux-btrace.h.
8333 (linux_low_enable_btrace): New function.
8334 (linux_low_read_btrace): New function.
8335 (linux_target_ops): Add btrace ops.
8336 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8337 Add srv_linux_btrace=yes.
8338 (x86_64-*-linux*): Add linux-btrace.o.
8339 Add srv_linux_btrace=yes.
8340 * configure.ac: Define HAVE_LINUX_BTRACE.
8341 * config.in: Regenerated.
8342 * configure: Regenerated.
8343
5cc22e4c
MM
83442013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8345
8346 * server.c (handle_qxfer): Preserve error message if -3 is
8347 returned.
8348 (qxfer): Document the -3 return value.
8349
7c97f91e
MM
83502013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8351
8352 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8353 (linux_btrace_h): New variable.
8354 (linux-btrace.o): New rule.
8355
be9a119c 83562013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8357 Hafiz Abid Qadeer <abidh@codesourcery.com>
8358
8359 * tracepoint.c (trace_buffer_size): New global.
8360 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8361 (init_trace_buffer): Change to one-argument function. Allocate
8362 trace buffer memory.
8363 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8364 handle QTBuffer:size packet.
8365 (cmd_bigqtbuffer_size): New function.
8366 (initialize_tracepoint): Call init_trace_buffer with
8367 DEFAULT_TRACE_BUFFER_SIZE.
8368 * server.c (handle_query): Add QTBuffer:size in the
8369 supported packets.
8370
e64f7499
YQ
83712013-03-07 Yao Qi <yao@codesourcery.com>
8372
8373 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8374 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8375 of -1.
8376 (cmd_qtsp): Adjust condition. Do post increment.
8377 Set cur_action and cur_step_action back to 0.
8378
f0ae6fc3
PA
83792013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8380
8381 PR server/15236
8382 * linux-low.c (linux_write_memory): Return early success if LEN is
8383 zero.
8384
b5b0b0af
CV
83852013-03-05 Corinna Vinschen <vinschen@redhat.de>
8386
334ad4a8 8387 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8388
589bc927
TT
83892013-02-28 Tom Tromey <tromey@redhat.com>
8390
8391 * configure.ac: Invoke AC_SYS_LARGEFILE.
8392 * configure, config.in: Rebuild.
8393
dfe07582
CV
83942013-02-28 Corinna Vinschen <vinschen@redhat.com>
8395
8396 * win32-low.c: Throughout, fix format strings and casts of
8397 printf-like functions to avoid type related warnings on all
8398 platforms.
8399 (get_child_debug_event): Print dwDebugEventCode as hex since
8400 that's how it's usually documented.
8401
736cd585
YQ
84022013-02-28 Yao Qi <yao@codesourcery.com>
8403
8404 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8405 pulongest.
8406
e1f58301
JW
84072013-02-27 Jiong Wang <jiwang@tilera.com>
8408
8409 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8410 (reg-tilegx32.c): New rule.
8411 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8412 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8413 different register info initializer according to elf class.
8414 (init_registers_tilgx32): New function. The tilegx32 register info
8415 initializer.
8416 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8417 (tile_store_gregset): Likewise.
8418
d171ca78
YQ
84192013-02-27 Yao Qi <yao@codesourcery.com>
8420
8421 * server.c (process_point_options): Print debug message when
8422 debug_threads is true.
8423
282bbdf3
YQ
84242013-02-26 Yao Qi <yao@codesourcery.com>
8425
8426 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8427
aca22551
PA
84282013-02-19 Pedro Alves <palves@redhat.com>
8429 Kai Tietz <ktietz@redhat.com>
8430
8431 PR gdb/15161
8432
8433 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8434 instead of strtoul to extract address from packet.
8435 (process_serial_event) <'z'>: Likewise.
8436
4f3cee1c
YQ
84372013-02-18 Yao Qi <yao@codesourcery.com>
8438
8439 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8440
8e1d55a3
PA
84412013-02-14 Pedro Alves <palves@redhat.com>
8442
8443 Plug memory leak.
8444
8445 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8446 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8447
458820da
PA
84482013-02-14 Pedro Alves <palves@redhat.com>
8449
8450 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8451
baea0dae
PA
84522013-02-14 Pedro Alves <palves@redhat.com>
8453
8454 * tracepoint.c (save_string): Delete.
8455 (add_tracepoint_action): Use savestring instead of save_string.
8456
0b1afbb3
PA
84572013-02-12 Pedro Alves <palves@redhat.com>
8458
8459 * linux-xtensa-low.c: Ditto.
8460 * xtensa-xtregs.c: Ditto.
8461
8a4ac37e
PA
84622013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8463
8464 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8465 thread_db.
8466
148de6bb
MS
84672013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8468
8469 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8470 aarch64_num_wp_regs and aarch64_num_bp_regs to
8471 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8472
55fac6e0
MS
84732013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8474
8475 * linux-aarch64-low.c (ps_get_thread_area): Replace
8476 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8477
176eb98c
MS
84782013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8479 Marcus Shawcroft <marcus.shawcroft@arm.com>
8480 Nigel Stephens <nigel.stephens@arm.com>
8481 Yufeng Zhang <yufeng.zhang@arm.com>
8482
8483 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8484 (aarch64.c, aarch64-without-fpu.c): New targets.
8485 * configure.srv (aarch64*-*-linux*): New.
8486 * linux-aarch64-low.c: New file.
8487
56f7af9c
MS
84882013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8489
43aaf8b6 8490 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8491 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8492 (dequeue_one_deferred_signal, linux_resume_one_thread)
8493 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8494 (linux_tracefork_grandchild, linux_test_for_tracefork)
8495 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8496 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8497 where the argument is 0.
8498
60f662b0
YQ
84992013-01-25 Yao Qi <yao@codesourcery.com>
8500
8501 * event-loop.c: Include "queue.h".
8502 (gdb_event_p): New typedef.
8503 (struct gdb_event) <next_event>: Remove.
8504 (event_queue): Change to QUEUE(gdb_event_p).
8505 (async_queue_event): Remove.
8506 (gdb_event_xfree): New.
8507 (initialize_event_loop): New.
8508 (process_event): Use API from QUEUE.
8509 (wait_for_event): Likewise.
8510 * server.c (main): Call initialize_event_loop.
8511 * server.h (initialize_event_loop): Declare.
8512
5ae4861a
YQ
85132013-01-18 Yao Qi <yao@codesourcery.com>
8514
8515 * ax.h (struct eval_agent_expr_context): New.
8516 (gdb_eval_agent_expr): Update declaration.
8517 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8518 TFRAME. Add new argument CTX.
8519 * server.h (struct eval_agent_expr_context): Declare.
8520 (agent_mem_read, agent_tsv_read): Update declaration.
8521 (agent_mem_read_string): Likewise.
8522 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8523 (add_traceframe_block): Add new argument TPOINT.
8524 Increase TPOINT->traceframe_usage.
8525 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8526 eval_tracepoint_agent_expr.
8527 (condition_true_at_tracepoint): Likewise.
8528 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8529 (agent_mem_read_string, agent_tsv_read): Likewise.
8530
85e00e85
YQ
85312013-01-16 Yao Qi <yao@codesourcery.com>
8532
8533 * linux-low.c (linux_resume_one_lwp): Don't check
8534 'lwp->bp_reinsert != 0'.
8535
4039cf45
JB
85362013-01-07 Joel Brobecker <brobecker@adacore.com>
8537 Pedro Alves <palves@redhat.com>
8538
8539 * lynx-low.c (ptrace_request_to_str): Define a temporary
8540 macro and use it to simplify this function's implementation.
8541
9044dee2
JB
85422013-01-07 Joel Brobecker <brobecker@adacore.com>
8543
8544 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8545 sets errno.
8546
e6352c8f
JB
85472013-01-07 Joel Brobecker <brobecker@adacore.com>
8548
8549 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8550
50681a27
JB
85512013-01-07 Joel Brobecker <brobecker@adacore.com>
8552
8553 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8554
3f6e77ef
JB
85552013-01-07 Joel Brobecker <brobecker@adacore.com>
8556
8557 * lynx-low.c (lynx_resume): Use the resume_info parameter
8558 to determine the ptid for the lynx_ptrace call, unless
8559 it is equal to minus_one_ptid, in which case we use the
8560 ptid of the current_inferior.
8561 (lynx_wait_1): After having received a thread create/exit
8562 event, resume the inferior's execution using the signaling
8563 thread's ptid, rather than the old ptid.
8564
7fda33ae
JB
85652013-01-07 Joel Brobecker <brobecker@adacore.com>
8566
8567 * lynx-low.c (lynx_resume): Delete variable ret.
8568
b9786c74
JB
85692013-01-01 Joel Brobecker <brobecker@adacore.com>
8570
8571 * gdbreplay.c (gdbreplay_version): Update copyright year.
8572 * server.c (gdbserver_version): Likewise.
8573
8b93d60f
JB
85742012-12-17 Joel Brobecker <brobecker@adacore.com>
8575
8576 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8577 new thread.
8578
037335a7
JB
85792012-12-17 Joel Brobecker <brobecker@adacore.com>
8580
8581 * lynx-low.c (ptrace_request_to_str): Add handling for
8582 PTRACE_GETTRACESIG.
8583
52d4cbd8
JB
85842012-12-17 Joel Brobecker <brobecker@adacore.com>
8585
8586 * lynx-low.c (lynx_attach): Delete variable new_process.
8587
ab8f6ca9
JB
85882012-12-17 Joel Brobecker <brobecker@adacore.com>
8589
8590 * lynx-low.c (lynx_create_inferior): Delete variable
8591 new_process.
8592
78cbc024
JB
85932012-12-17 Joel Brobecker <brobecker@adacore.com>
8594
8595 * lynx-low.c (ptrace_request_to_str): Do not handle
8596 PTRACE_GETTHREADLIST if this macro does not exist.
8597
14a00470
YQ
85982012-12-15 Yao Qi <yao@codesourcery.com>
8599
8600 * Makefile.in (OBS): Add notif.o.
8601 * notif.c, notif.h: New.
8602 * server.c: Include "notif.h".
8603 (struct vstop_notif) <next>: Remove.
8604 <base>: New field.
8605 (queue_stop_reply): Update.
8606 (push_event, send_next_stop_reply): Remove.
8607 (discard_queued_stop_replies): Update.
8608 (notif_stop): New variable.
8609 (handle_v_stopped): Remove.
8610 (handle_v_requests): Don't call handle_v_stopped. Call
8611 handle_ack_notif instead.
8612 (queue_stop_reply_callback): Call notif_event_enque instead
8613 of queue_stop_reply.
8614 (handle_status): Don't call send_next_stop_reply, call
8615 notif_write_event instead.
8616 (kill_inferior_callback): Likewise.
8617 (detach_or_kill_inferior_callback): Likewise.
8618 (main): Call initialize_notif.
8619 (process_serial_event): Call QUEUE_is_empty.
8620 (handle_target_event): Call notif_push instead of push event.
8621 * server.h (push_event): Remove declaration.
8622
61c125b9
TT
86232012-12-10 Tom Tromey <tromey@redhat.com>
8624
8625 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8626 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8627 macros.
8628 (.c.o): Rewrite.
8629 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8630 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8631 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8632 (amd64-linux-ipa.o, ax.o): Rewrite.
8633 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8634 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8635 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8636 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8637 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8638 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8639 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8640 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8641 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8642 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8643 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8644 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8645 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8646 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8647 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8648 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8649 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8650 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8651 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8652 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8653 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8654 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8655 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8656 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8657 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8658 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8659 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8660 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8661 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8662 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8663 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8664 (reg-tilegx.o): Remove.
8665 (all_object_files): New macro.
8666 Include .deps files.
8667 * aclocal.m4, configure: Rebuild.
8668 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8669 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8670 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8671
e90e9ad9
TT
86722012-12-05 Tom Tromey <tromey@redhat.com>
8673
8674 PR gdb/14917:
8675 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8676
02d403bf 86772012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8678
8679 * configure.ac: Check for linux/perf_event.h.
8680 * config.in: Regenerated.
8681 * configure: Regenerated.
8682
0270a750
PA
86832012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8684
8685 * hostio.c (handle_readlink): Decrease buffer size
8686 parameter passed to readlink by one byte.
8687
8c29b58e
YQ
86882012-11-26 Yao Qi <yao@codesourcery.com>
8689
8690 * configure.ac (build_warnings): Append '-Wempty-body'.
8691 * configure: Regenerated.
8692 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8693 body.
8694
8bdce1ff
PM
86952012-11-15 Pierre Muller <muller@sourceware.org>
8696
8697 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8698 * config.in: Regenerate.
8699 * configure: Regenerate.
8700 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8701 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8702 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8703 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8704 header.
8705 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8706 instead of <sys/wait.h> header.
8707 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8708
02d403bf 87092012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8710
8711 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8712 (various make rules): Remove -DGDBSERVER
8713
fbd5db48
YQ
87142012-11-09 Yao Qi <yao@codesourcery.com>
8715
8716 * spu-low.c (current_ptid): Move it to ..
8717 * gdbthread.h: ... here. New.
8718 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8719 * server.c (myresume, process_serial_event): Likewise.
8720 * thread-db.c (thread_db_find_new_threads): Likewise.
8721 * tracepoint.c (run_inferior_command): Likewise.
8722
b3dc46ff
AB
87232012-10-01 Andrew Burgess <aburgess@broadcom.com>
8724
8725 * server.c (handle_search_memory_1): Include access length in
8726 warning message.
8727
07c04788
HPN
87282012-09-05 Michael Brandt <michael.brandt@axis.com>
8729
8730 * linux-crisv32-low.c: Fix compile errors.
8731
918d227b
YQ
87322012-09-04 Yao Qi <yao@codesourcery.com>
8733
8734 * tracepoint.c (cmd_qtsv): Adjust debug message.
8735 Don't check CUR_TPOINT.
8736
18c1b81a
YQ
87372012-08-28 Yao Qi <yao@codesourcery.com>
8738
8739 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8740 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8741 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8742 Remove declarations of xmalloc, xreallloc, xstrdup and
8743 freeargv.
8744 * Makefile.in (libiberty_h): New.
8745 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8746 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8747
dc82f37b
YQ
87482012-08-23 Yao Qi <yao@codesourcery.com>
8749
8750 * server.h: Remove declaration of 'xsnprintf'.
8751
406b1477
KS
87522012-08-22 Keith Seitz <keiths@redhat.com>
8753
8754 * server.h: Include build-gnulib-gbserver/config.h.
8755 * gdbreplay.c: Likewise.
8756
e6712ff1
DE
87572012-08-08 Doug Evans <dje@google.com>
8758
8759 * Makefile.in (SFILES): Add gdb_vecs.c.
8760 (OBS): Add gdb_vecs.o.
8761 (gdb_vecs_h, host_defs_h): New variables.
8762 (thread-db.o): Add $(gdb_vecs_h) dependency.
8763 (gdb_vecs.o): New rule.
8764 * thread-db.c: #include "gdb_vecs.h".
8765 (thread_db_load_search): Use a vector to iterate over path elements.
8766 Handle text appearing after "$pdir".
8767
8768 * configure.ac: Add check for strstr.
8769 * config.in: Regenerate.
8770 * configure: Regenerate.
8771
7c3270ae
UW
87722012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8773
8774 * hostio.c (handle_pread): If pread fails, fall back to attempting
8775 lseek/read.
8776 (handle_pwrite): Likewise for pwrite.
8777
b62e2b27
UW
87782012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8779
8780 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8781 between unsupported TYPE and unimplementable ADDR/LEN combination.
8782 (arm_insert_point): Act on new return value.
8783
78a99e91
PA
87842012-07-31 Pedro Alves <palves@redhat.com>
8785
8786 * server.c (process_point_options): Only skip tokens if we find
8787 one that is unrecognized. Don't treat 'X' specially while
8788 skipping unrecognized tokens.
8789
fcf303ab
UW
87902012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8791
8792 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8793 to 4-byte-align HW breakpoint addresses for Thumb.
8794
7255706c
YQ
87952012-07-27 Yao Qi <yao@codesourcery.com>
8796
8797 PR remote/14161.
8798
8799 * server.h: Declare gdb_agent_about_to_close.
8800 * target.c (kill_inferior): Include "agent.h".
8801 New. Send command 'kill'.
8802 * target.h (kill_inferior): Removed macro.
8803 * tracepoint.c (gdb_agent_about_to_close): New.
8804 (gdb_agent_helper_thread): Handle command 'close'.
8805 Wait endlessly until the inferior stops.
8806 Install gdb_agent_remove_socket to atexit hook.
8807 (agent_socket_name): New static variable.
8808 (gdb_agent_socket_init): Replace local variable 'name' with
8809 'agent_socket_name'.
8810 (gdb_agent_remove_socket): New.
8811
5a3f286f
YQ
88122012-07-27 Yao Qi <yao@codesourcery.com>
8813
8814 * server.c (process_point_options): Stop at 'X' when parsing.
8815
961bd387
ME
88162012-07-19 Michael Eager <eager@eagercon.com>
8817
a261b8f5 8818 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8819 to hw_execute.
8820 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8821 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8822 hardware breakpoint.
8823
aa7c7447
JK
88242012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8825
8826 * gdbserver/linux-low.c (initialize_low): Call
8827 linux_ptrace_init_warnings.
8828
7f216e7c
DE
88292012-07-02 Doug Evans <dje@google.com>
8830
8831 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8832 pointer to int.
8833
d3ce09f5
SS
88342012-07-02 Stan Shebs <stan@codesourcery.com>
8835
8836 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8837 (ax.o): Add it to build rule.
8838 (ax-ipa.o): Ditto.
8839 (OBS): Add format.o.
8840 (IPA_OBS): Add format.o.
8841 * server.c (handle_query): Claim support for breakpoint commands.
8842 (process_point_options): Add command case.
8843 (process_serial_event): Leave running if there are printfs in
8844 effect.
8845 * mem-break.h (any_persistent_commands): Declare.
8846 (add_breakpoint_commands): Declare.
8847 (gdb_no_commands_at_breakpoint): Declare.
8848 (run_breakpoint_commands): Declare.
8849 * mem-break.c (struct point_command_list): New struct.
8850 (struct breakpoint): New field command_list.
8851 (any_persistent_commands): New function.
8852 (add_commands_to_breakpoint): New function.
8853 (add_breakpoint_commands): New function.
8854 (gdb_no_commands_at_breakpoint): New function.
8855 (run_breakpoint_commands): New function.
8856 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8857 locally.
8858 * ax.c: Include format.h.
8859 (ax_printf): New function.
8860 (gdb_eval_agent_expr): Add printf opcode.
8861
2f8f6aed
YQ
88622012-06-13 Yao Qi <yao@codesourcery.com>
8863
8864 * server.c (start_inferior): Remove duplicated writes to fields
8865 'last_resume_kind' and 'last_status' of 'current_inferior'.
8866
0c9070b3
YQ
88672012-06-12 Yao Qi <yao@codesourcery.com>
8868 Pedro Alves <palves@redhat.com>
8869
8870 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8871 comment.
8872 * server.c (handle_v_cont): Extend comment.
8873
c52daf70
YQ
88742012-06-11 Yao Qi <yao@codesourcery.com>
8875
8876 * linux-low.c (linux_attach): Add 'static'.
8877
d38bbb0a
YQ
88782012-06-06 Yao Qi <yao@codesourcery.com>
8879
8880 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8881
89dc0afd
JK
88822012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8883
8884 Fix gcc -flto compilation warning.
8885 * server.c (main): Make variable multi_mode and attach volatile.
8886
75f62ce7
TJB
88872012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8888
8889 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8890 if the platform doesn't know about it.
8891
65f479b6
PA
88922012-05-30 Jeff Kenton <jkenton@tilera.com>
8893
8894 * Makefile.in (SFILES): Add linux-tile-low.c.
8895 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8896 * configure.srv: Handle tilegx-*-linux*.
8897 * linux-tile-low.c: New file.
8898
0c5bf5a9
JK
88992012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8900
8901 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8902
a493e3e2
PA
89032012-05-24 Pedro Alves <palves@redhat.com>
8904
8905 PR gdb/7205
8906
43aaf8b6 8907 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8908
2ea28649
PA
89092012-05-24 Pedro Alves <palves@redhat.com>
8910
8911 PR gdb/7205
8912
8913 Replace target_signal with gdb_signal throughout.
8914
8d409d16
MR
89152012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8916
8917 * linux-low.c (linux_store_registers): Avoid the copying sequence
8918 when no data has been retrieved by ptrace.
8919
23512c01
MGD
89202012-05-22 Will Deacon <will.deacon@arm.com>
8921
8922 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8923 Include asm/ptrace.h.
8924 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8925 already defined.
8926
4934b29e
MR
89272012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8928
8929 * linux-low.c (linux_store_registers): Don't re-retrieve data
8930 with ptrace that has already been obtained from /proc. Always
8931 copy any data retrieved with ptrace to the buffer supplied.
8932
bde24c0a
PA
89332012-05-11 Yao Qi <yao@codesourcery.com>
8934 Pedro Alves <palves@redhat.com>
8935
8936 * linux-low.c (enum stopping_threads_kind): New.
8937 (stopping_threads): Change type to `enum stopping_threads_kind'.
8938 (handle_extended_wait): If stopping and suspending threads, leave
8939 the new_lwp suspended too.
8940 (linux_wait_for_event): Adjust.
8941 (stop_all_lwps): Set `stopping_threads' to
8942 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8943 whether we're suspending threads or just stopping them. Assert no
8944 recursion happens.
8945
623b6bdf
YQ
89462012-04-29 Yao Qi <yao@codesourcery.com>
8947
8948 * server.h: Move some code to ...
8949 * gdbthread.h: ... here. New.
8950 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8951 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8952 (nto-low.o, win32-low.o): Likewise.
8953 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8954 * regcache.c, remote-utils.c, server.c: Likewise.
8955 * target.c, tracepoint.c, win32-low.c: Likewise.
8956
f15f9948
TJB
89572012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8958
8959 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8960 (PTRACE_ARG4_TYPE): Likewise.
8961 (PTRACE_XFER_TYPE): Likewise.
8962 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8963 ptrace to PTRACE_ARG3_TYPE.
8964 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8965 (PTRACE_ARG4_TYPE): Likewise.
8966 (PTRACE_XFER_TYPE): Likewise.
8967 (linux_detach_one_lwp): Cast fourth argument of
8968 ptrace to long then PTRACE_ARG4_TYPE.
8969 (regsets_fetch_inferior_registers): Cast third argument of
8970 ptrace to long then PTRACE_ARG3_TYPE.
8971 (regsets_store_inferior_registers): Likewise.
8972
38ea300a
PA
89732012-04-20 Pedro Alves <palves@redhat.com>
8974
8975 * configure: Regenerate.
8976
c971b7fa
PA
89772012-04-19 Pedro Alves <palves@redhat.com>
8978
43aaf8b6 8979 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8980 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8981 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8982 (all, install-only, uninstall, clean-info, all-lib, clean): No
8983 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8984 (maintainer-clean realclean distclean): Use subdir_do.
8985 (subdir_do): New.
8986 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8987 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8988 * acinclude.m4: Include acx_configure_dir.m4.
8989 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8990 calls. Call AC_PROG_RANLIB. Configure gnulib using
8991 ACX_CONFIGURE_DIR.
8992 (GNULIB): New.
8993 (GNULIB_STDINT_H): Adjust.
8994 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8995 * gdbreplay.c: Include build-gnulib/config.h.
8996 * server.h: Likewise.
8997 * aclocal.m4: Regenerate.
8998 * config.in: Regenerate.
8999 * configure: Regenerate.
c971b7fa 9000
809277f8
PA
90012012-04-19 Pedro Alves <palves@redhat.com>
9002
9003 * Makefile.in (LIBGNU, INCGNU): Adjust.
9004 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9005 (all, install-only, uninstall, clean-info, all-lib, clean)
9006 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9007 * configure.ac: Adjust AC_OUTPUT output.
9008 * aclocal.m4: Regenerate.
9009 * configure: Regenerate.
9010
fd9bb8b8
PA
90112012-04-19 Pedro Alves <palves@redhat.com>
9012
9013 * Makefile.in (generated_files): New.
9014 (server_h): Remove the explicit dependency on config.h, and depend
9015 on $generated_files.
9016
1c298c66
PA
90172012-04-19 Pedro Alves <palves@redhat.com>
9018
9019 * Makefile.in (INCGNU): Add -Ignulib.
9020
57c4b50b
PA
90212012-04-19 Pedro Alves <palves@redhat.com>
9022
9023 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9024 (INCGNU): ... this, and spell out -I here.
9025 (GNULIB_LIB): Rename to ...
9026 (LIBGNU): ... this.
9027 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9028
1030e047
PA
90292012-04-19 Pedro Alves <palves@redhat.com>
9030
9031 * config.in: Regenerate.
9032
447d4319
PA
90332012-04-19 Pedro Alves <palves@redhat.com>
9034
9035 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9036 * server.h (memmem): Remove declaration.
9037 * config.in: Regenerate.
9038 * configure: Regenerate.
9039
aad9eab9
YQ
90402012-04-19 Yao Qi <yao@codesourcery.com>
9041
9042 * Makefile.in (SFILES): Add common/vec.c.
9043 (OBS): Add vec.o.
9044 (vec.o): New rule.
9045
3e10640f
YQ
90462012-04-19 Yao Qi <yao@codesourcery.com>
9047
9048 * remote-utils.c (prepare_resume_reply): Replace with macro
9049 target_core_of_thread.
9050 * server.c (handle_qxfer_threads_proper): Likewise.
9051 * target.h (traget_core_of_thread): New macro.
9052
71622373
PA
90532012-04-18 Pedro Alves <palves@redhat.com>
9054
9055 * aclocal.m4: Regenerate.
9056 * configure: Regenerate.
9057
80d26939
YQ
90582012-04-16 Yao Qi <yao@codesourcery.com>
9059
9060 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9061 duplicated on address.
9062
42476b70
YQ
90632012-04-16 Yao Qi <yao@codesourcery.com>
9064
9065 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9066 (struct tracepoint_action_ops) <send>: New field.
9067 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9068 (agent_expr_send, x_tracepoint_action_send): New.
9069 (l_tracepoint_action_send): New.
9070 (cmd_qtdp): Download and install tracepoint
9071 according to `use_agent'.
9072 (run_inferior_command): Add one more parameter `len'.
9073 Update callers.
9074 (tracepoint_send_agent): New.
9075 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9076
7bc83639
YQ
90772012-04-16 Yao Qi <yao@codesourcery.com>
9078
9079 * tracepoint.c (download_tracepoints): Moved to ...
9080 (cmd_qtstart): ... here.
9081
5f18041e
YQ
90822012-04-14 Yao Qi <yao@codesourcery.com>
9083
9084 * tracepoint.c: Include inttypes.h.
9085 (struct collect_memory_action): Use sized types.
9086 (struct tracepoint): Likewise.
9087 (cmd_qtdp, stop_tracing): Update print specifiers.
9088 (cmd_qtp, response_tracepoint): Likewise.
9089 (collect_data_at_tracepoint): Likewise.
9090 (collect_data_at_step): Likewise.
9091
55a8c076
YQ
90922012-04-14 Yao Qi <yao@codesourcery.com>
9093
9094 Import gnulib module inttypes.
9095 * aclocal.m4, config.in, configure: Regenerated.
9096
dc750257
YQ
90972012-04-14 Yao Qi <yao@codesourcery.com>
9098
9099 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9100 Makefile and config.status at last.
9101
0ab5faf9
YQ
91022012-04-13 Yao Qi <yao@codesourcery.com>
9103
9104 * tracepoint.c: Include stdint.h unconditionally.
9105
18f5fd81
TJB
91062012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9107
9108 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9109 on BFD_HAVE_SYS_PROCFS_TYPE.
9110 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9111 * configure: Regenerate.
9112 * config.in: Likewise.
9113
4d47af5c
L
91142012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9115
9116 * Makefile.in (clean): Also remove x32.c x32-linux.c
9117 x32-avx.c x32-avx-linux.c.
9118 (x32.o): New target.
9119 (x32.c): Likewise.
9120 (x32-linux.o): Likewise.
9121 (x32-linux.c): Likewise.
9122 (x32-avx.o): Likewise.
9123 (x32-avx.c): Likewise.
9124 (x32-avx-linux.o): Likewise.
9125 (x32-avx-linux.c): Likewise.
9126
9127 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9128 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9129 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9130 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9131 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9132 i386/x32-avx-linux.xml.
9133
9134 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9135 (init_registers_x32_avx_linux): Likwise.
9136 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9137 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9138
ecedbe58
PA
91392012-04-13 Pedro Alves <palves@redhat.com>
9140
9141 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9142 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9143 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9144 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9145 the sub-make.
9146
c92b5177
L
91472012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9148
9149 * linux-x86-low.c (compat_x32_clock_t): New.
9150 (compat_x32_siginfo_t): Likewise.
9151 (compat_x32_siginfo_from_siginfo): Likewise.
9152 (siginfo_from_compat_x32_siginfo): Likewise.
9153 (linux_is_elf64): Likewise.
9154 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9155 and siginfo_from_compat_x32_siginfo for x32.
9156 (x86_arch_setup): Set linux_is_elf64.
9157
214d508e
L
91582012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9159
9160 PR gdb/13969
9161 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9162 e_machine field.
9163 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9164 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9165 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9166 compatible with process.
9167
c9a1864a
YQ
91682012-04-12 Yao Qi <yao@codesourcery.com>
9169
9170 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9171 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9172 (install-only, install-info, clean): Handle sub dir gnulib.
9173 (all-lib, am--refresh): New targets.
9174 (memmem.o): Remove target.
9175 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9176 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9177 (AC_REPLACE_FUNCS): Remove memmem.
9178 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9179 (AC_OUTPUT): Generate Makefile in gnulib/.
9180 * aclocal.m4, config.in, configure: Regenerated.
9181
367ba2c2
MR
91822012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9183
9184 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9185
9d236627
PA
91862012-04-05 Pedro Alves <palves@redhat.com>
9187
9188 -Werror=strict-aliasing
9189
9190 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9191 pointer.
9192
111217b3
PA
91932012-04-04 Pedro Alves <palves@redhat.com>
9194
9195 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9196 (sparc_store_gregset_from_stack, sparc_store_gregset)
9197 (sparc_breakpoint_at): Fix formatting.
9198
8365dcf5
TJB
91992012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9200
9201 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9202 are available.
9203 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9204 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9205 * config.in: Regenerate.
9206 * configure: Likewise.
9207
689cc2ae
PA
92082012-03-29 Pedro Alves <palves@redhat.com>
9209
9210 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9211 Correct ptrace arguments.
9212
c14dfd32
PA
92132012-03-28 Pedro Alves <palves@redhat.com>
9214
9215 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9216 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9217 (IA64_FR1_REGNUM): New defines.
9218 (ia64_fetch_register): New.
9219 (the_low_target): Install it.
9220 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9221 field.
9222 * linux-low.c (linux_fetch_registers): Try the
9223 the_low_target.fetch_register hook first.
9224
9225 * linux-arm-low.c (the_low_target): Adjust.
9226 * linux-bfin-low.c (the_low_target): Adjust.
9227 * linux-cris-low.c (the_low_target): Adjust.
9228 * linux-crisv32-low.c (the_low_target): Adjust.
9229 * linux-m32r-low.c (the_low_target): Adjust.
9230 * linux-m68k-low.c (the_low_target): Adjust.
9231 * linux-mips-low.c (the_low_target): Adjust.
9232 * linux-ppc-low.c (the_low_target): Adjust.
9233 * linux-s390-low.c (the_low_target): Adjust.
9234 * linux-sh-low.c (the_low_target): Adjust.
9235 * linux-sparc-low.c (the_low_target): Adjust.
9236 * linux-tic6x-low.c (the_low_target): Adjust.
9237 * linux-x86-low.c (the_low_target): Adjust.
9238 * linux-xtensa-low.c (the_low_target): Adjust.
9239
63c88e13
PA
92402012-03-26 Pedro Alves <palves@redhat.com>
9241
9242 * server.c (handle_qxfer_libraries): Don't bail early if
9243 the_target->qxfer_libraries_svr4 is not NULL.
9244
fb723180
PA
92452012-03-26 Pedro Alves <palves@redhat.com>
9246
9247 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9248
0afae3cf
PA
92492012-03-23 Pedro Alves <palves@redhat.com>
9250
9251 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9252 "library-list-svr4" element's start tag when the the DSO list is
9253 empty.
9254
485f1ee4
PA
92552012-03-23 Pedro Alves <palves@redhat.com>
9256
9257 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9258 a variable whose type size is the same as the inferior's pointer
9259 size.
9260
a5362b9a
TS
92612012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9262
9263 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9264 struct siginfo.
9265 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9266 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9267 * linux-low.h: Include <signal.h>.
9268 (struct siginfo): Remove forward declaration.
9269 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9270 struct siginfo.
9271
d226c142
MF
92722012-03-21 Mike Frysinger <vapier@gentoo.org>
9273
9274 * .gitignore: Ignore more files.
9275
122f36ef
PA
92762012-03-19 Pedro Alves <palves@redhat.com>
9277 Jan Kratochvil <jan.kratochvil@redhat.com>
9278
9279 * server.c (cont_thread, general_thread): Add describing comments.
9280 (start_inferior): Clear `cont_thread'.
9281 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9282 of a process.
9283
fc3e5175
YQ
92842012-03-15 Yao Qi <yao@codesourcery.com>
9285
9286 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9287 handling to ...
9288 (cmd_qtdp): ... here.
9289
8d0d92cd
YQ
92902012-03-15 Yao Qi <yao@codesourcery.com>
9291
9292 * tracepoint.c (struct tracepoint_action_ops): New.
9293 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9294 (m_tracepoint_action_download): New.
9295 (r_tracepoint_action_download): New.
9296 (x_tracepoint_action_download): New.
9297 (l_tracepoint_action_download): New.
9298 (add_tracepoint_action): Install `action->ops' according type.
9299 (download_tracepoint_1): Move code `download' function pointer
9300 of various tracepoint_action_ops.
9301
87b0bb13
JK
93022012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9303
9304 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9305 linux_ptrace_attach_warnings.
9306
5f572dec
JK
93072012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9308
9309 * Makefile.in (linux-ptrace.o): New.
9310 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9311 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9312 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9313 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9314 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9315 of these targets.
9316 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9317
f4647387
YQ
93182012-03-08 Yao Qi <yao@codesourcery.com>
9319 Pedro Alves <palves@redhat.com>
9320
9321 Fix PR server/13392.
9322 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9323 offset of JMP insn.
9324 * tracepoint.c (remove_tracepoint): New.
9325 (cmd_qtdp): Call remove_tracepoint when failed to install.
9326
9b224c5e
PA
93272012-03-07 Pedro Alves <palves@redhat.com>
9328
9329 * linux-low.c (get_detach_signal): New.
9330 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9331 Pass on pending signals to PTRACE_DETACH. Check the result of the
9332 ptrace call.
9333 * server.c (program_signals, program_signals_p): New.
9334 (handle_general_set): Handle QProgramSignals.
9335 * server.h (program_signals, program_signals_p): Declare.
9336
e237a7e2
JK
93372012-03-05 Pedro Alves <palves@redhat.com>
9338 Jan Kratochvil <jan.kratochvil@redhat.com>
9339
9340 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9341 New comment why.
9342
5808517f
YQ
93432012-03-03 Yao Qi <yao@codesourcery.com>
9344
9345 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9346 agent_look_up_symbols.
9347
58b4daa5
YQ
93482012-03-03 Yao Qi <yao@codesourcery.com>
9349
9350 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9351 (linux-x86-low.o): Likewise.
9352 * server.h: Remove in_process_agent_loaded.
9353 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9354 common/agent.c.
9355 Update callers.
9356
8ffcbaaf
YQ
93572012-03-03 Yao Qi <yao@codesourcery.com>
9358
9359 * tracepoint.c (gdb_agent_capability): New global.
9360 (in_process_agent_loaded_ust): Renamed to
9361 `in_process_agent_supports_ust'.
9362 Update callers.
9363 (in_process_agent_supports_ust): Call agent_capability_check.
9364 (clear_installed_tracepoints): Assert that agent supports
9365 agent.
9366
d1feda86
YQ
93672012-03-03 Yao Qi <yao@codesourcery.com>
9368
9369 * linux-low.c (linux_supports_agent): New.
9370 (linux_target_ops): Initialize field `supports_agent' with
9371 linux_supports_agent.
9372 * target.h (struct target_ops) <supports_agent>: New.
9373 (target_supports_agent): New macro.
9374 * server.c (handle_general_set): Handle packet 'QAgent'.
9375 (handle_query): Send `QAgent+'.
9376 * Makefile.in (server.o): Depends on agent.h.
9377
2fa291ac
YQ
93782012-03-03 Yao Qi <yao@codesourcery.com>
9379
9380 * Makefile.in (OBS): Add agent.o.
9381 Add new rule for agent.o.
9382 Track dependence of tracepoint.c on agent.h.
9383 * tracepoint.c (run_inferior_command_1):
9384 (run_inferior_command): Call agent_run_command.
9385 (gdb_ust_connect_sync_socket): Deleted. Move it to
9386 common/agent.c.
9387 (resume_thread, stop_thread): Likewise.
9388 (gdb_ust_socket_init): Renamed to ...
9389 (gdb_agent_socket_init): ... New.
9390 (gdb_ust_thread): Renamed to ...
9391 (gdb_agent_helper_thread): ... New.
9392 (gdb_ust_init): Move some code to ...
9393 (gdb_agent_init): ... here. New.
9394 [HAVE_UST]: Call gdb_ust_init.
9395 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9396 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9397 * config.in, configure: Regenerated.
9398
05044653
PA
93992012-03-02 Pedro Alves <palves@redhat.com>
9400
9401 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9402 * linux-low.c (struct simple_pid_list): New.
9403 (stopped_pids): New a struct simple_pid_list pointer.
9404 (add_to_pid_list, pull_pid_from_list): New.
9405 (handle_extended_wait): Don't assume the first signal new children
9406 report is SIGSTOP. Adjust call to pull_pid_from_list.
9407 (linux_wait_for_lwp): Adjust.
9408
8d00225b
YQ
94092012-03-02 Yao Qi <yao@codesourcery.com>
9410
9411 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9412 debug log.
9413
19560ba5
YQ
94142012-03-02 Yao Qi <yao@codesourcery.com>
9415
9416 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9417 `stop_pc' and `tpoint'. Update caller.
9418
1faeff08
MR
94192012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9420
9421 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9422 * linux-low.c (use_linux_regsets): New macro.
9423 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9424 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9425 (linux_register_in_regsets): New function.
9426 (usr_fetch_inferior_registers): Skip registers covered by
9427 regsets.
9428 (usr_store_inferior_registers): Likewise.
9429 (usr_fetch_inferior_registers): New macro.
9430 (usr_store_inferior_registers): Likewise.
9431 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9432 (linux_store_registers): Likewise.
9433 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9434 prototype.
9435 (init_registers_mips64_dsp_linux): Likewise.
9436 (init_registers_mips_linux): New macro.
9437 (init_registers_mips_dsp_linux): Likewise.
9438 (mips_dsp_num_regs): Likewise.
9439 (DSP_BASE, DSP_CONTROL): New fallback macros.
9440 (mips_base_regs): New macro.
9441 (mips_regmap): Use it. Fix the size.
9442 (mips_dsp_regmap): New variable.
9443 (mips_dsp_regset_bitmap): Likewise.
9444 (mips_arch_setup): New function.
9445 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9446 than mips_regmap.
9447 (mips_cannot_store_register): Likewise.
9448 (the_low_target): Update .arch_setup, .num_regs and .regmap
9449 initializers. Add .regset_bitmap initializer.
9450 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9451 initializer.
9452 * linux-bfin-low.c (the_low_target): Likewise.
9453 * linux-cris-low.c (the_low_target): Likewise.
9454 * linux-crisv32-low.c (the_low_target): Likewise.
9455 * linux-ia64-low.c (the_low_target): Likewise.
9456 * linux-m32r-low.c (the_low_target): Likewise.
9457 * linux-m68k-low.c (the_low_target): Likewise.
9458 * linux-ppc-low.c (the_low_target): Likewise.
9459 * linux-s390-low.c (the_low_target): Likewise.
9460 * linux-sh-low.c (the_low_target): Likewise.
9461 * linux-sparc-low.c (the_low_target): Likewise.
9462 * linux-tic6x-low.c (the_low_target): Likewise.
9463 * linux-x86-low.c (the_low_target): Likewise.
9464 * linux-xtensa-low.c (the_low_target): Likewise.
9465 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9466 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9467 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9468 srv_xmlfiles.
9469 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9470 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9471
c03e6ccc
YQ
94722012-02-29 Yao Qi <yao@codesourcery.com>
9473 Pedro Alves <palves@redhat.com>
9474
9475 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9476 `step_over_finished' is true.
9477
644cebc9
PA
94782012-02-27 Pedro Alves <palves@redhat.com>
9479
9480 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9481 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9482
c14d7ab2
PA
94832012-02-27 Pedro Alves <palves@redhat.com>
9484
9485 PR server/9684
9486 * linux-low.c (pid_is_stopped): New.
9487 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9488
412c89dd
LM
94892012-02-25 Luis Machado <lgustavo@codesourcery.com>
9490
9491 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9492 of conditions.
9493
b745defe
MR
94942012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9495
9496 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9497
9f3a5c85
LM
94982012-02-24 Luis Machado <lgustavo@codesourcery>
9499
9500 * server.c (handle_query): Advertise support for target-side
9501 breakpoint condition evaluation.
9502 (process_point_options): New function.
9503 (process_serial_event): When inserting a breakpoint, check for
9504 a target-side condition that should be evaluated.
9505
9506 * mem-break.c: Include regcache.h and ax.h.
9507 (point_cond_list_t): New data structure.
9508 (breakpoint) <cond_list>: New field.
9509 (find_gdb_breakpoint_at): Make non-static.
9510 (delete_gdb_breakpoint_at): Clear any target-side
9511 conditions.
9512 (clear_gdb_breakpoint_conditions): New function.
9513 (add_condition_to_breakpoint): Likewise.
9514 (add_breakpoint_condition): Likewise.
9515 (gdb_condition_true_at_breakpoint): Likewise.
9516 (gdb_breakpoint_here): Return result directly instead
9517 of going through a local variable.
9518
9519 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9520 (clear_gdb_breakpoint_conditions): Likewise.
9521 (add_breakpoint_condition): Likewise.
9522 (gdb_condition_true_at_breakpoint): Likewise.
9523
9524 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9525 (need_step_over_p): Take target-side breakpoint condition into
9526 consideration.
9527
5e1dc496
LM
95282012-02-24 Luis Machado <lgustavo@codesourcery>
9529
9530 * server.h: Include tracepoint.h.
9531 (agent_mem_read, agent_get_trace_state_variable_value,
9532 agent_set_trace_state_variable_value,
9533 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9534 get_set_tsv_func_addr): New prototypes.
9535
9536 * ax.h: New include file.
9537 * ax.c: New source file.
9538
9539 * tracepoint.c: Include ax.h.
9540 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9541 agent_expr, eval_result_type): Move to ax.h.
9542 (parse_agent_expr): Rename to ...
9543 (gdb_parse_agent_expr): ... this, make it non-static and move
9544 to ax.h.
9545 (unparse_agent_expr) Rename to ...
9546 (gdb_unparse_agent_expr): ... this, make it non-static and move
9547 to ax.h.
9548 (eval_agent_expr): Rename to ...
9549 (eval_tracepoint_agent_expr): ... this.
9550 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9551 forward declarations.
9552 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9553 (agent_get_trace_state_variable_value): New function.
9554 (agent_set_trace_state_variable_value): New function.
9555 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9556 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9557 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9558 (condition_true_at_tracepoint): Likewise.
9559 (parse_agent_expr): Rename to ...
9560 (gdb_parse_agent_expr): ... this and move to ax.c.
9561 (unparse_agent_expr): Rename to ...
9562 (gdb_unparse_agent_expr): ... this and move to ax.c.
9563 (gdb_agent_op_name): Move to ax.c.
9564 (eval_agent_expr): Rename to ...
9565 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9566 and move to ax.c.
9567 (eval_tracepoint_agent_expr): New function.
9568 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9569 non-static.
5e1dc496
LM
9570 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9571 ax.c.
9572 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9573 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9574 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9575 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9576 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9577 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9578 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9579 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9580 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9581 (compile_bytecodes): Remove forward declaration.
9582 (is_goto_target): Move to ax.c.
9583 (compile_bytecodes): Move to ax.c and call
9584 agent_get_trace_state_variable_value (...) and
9585 agent_set_trace_state_variable_value (...).
9586
9587 * Makefile.in: Update ax.c and IPA dependencies.
9588
277e4e52
PA
95892012-02-24 Pedro Alves <palves@redhat.com>
9590
9591 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9592 (cmd_bigqtbuffer_circular): ... this. Only handle
9593 'QTBuffer:circular:'.
9594 (handle_tracepoint_general_set): Adjust.
9595
bf4c19f7
YQ
95962012-02-16 Yao Qi <yao@codesourcery.com>
9597
9598 * inferiors.c: Move code to ...
9599 * dll.c: .... here. New.
9600 * server.h: Declare clear_dlls.
9601 * Makefile.in (SFILES): Add dll.c.
9602 (OBS): Add dll.o
9603 (dll.o): New rule.
9604
d73f2619
YQ
96052012-02-11 Yao Qi <yao@codesourcery.com>
9606
9607 * server.c: (handle_monitor_command): Add a new parameter
9608 `own_buf'.
9609 (handle_query): Update caller.
9610
f8255c2a
JB
96112012-02-09 Joel Brobecker <brobecker@adacore.com>
9612
9613 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9614 * configure, config.in: Regenerate.
9615 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9616 is not defined.
9617
da84f473
PA
96182012-02-02 Pedro Alves <palves@redhat.com>
9619
9620 Try SIGKILL first, then PTRACE_KILL.
9621 * linux-low.c (linux_kill_one_lwp): New.
9622 (linux_kill_one_lwp): Rename to ...
9623 (kill_one_lwp_callback): ... this. Use the new
9624 linux_kill_one_lwp.
9625
e886a173
PA
96262012-02-02 Pedro Alves <palves@redhat.com>
9627
9628 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9629 inferior.
9630
be07f1a2
PA
96312012-01-27 Pedro Alves <palves@redhat.com>
9632
9633 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9634 (elf_64_file_p): Make static.
9635 (linux_pid_exe_is_elf_64_file): New.
9636 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9637 Delete declarations.
9638 (linux_pid_exe_is_elf_64_file): Declare.
9639 * linux-x86-low.c (x86_arch_setup): Use
9640 linux_pid_exe_is_elf_64_file.
9641
d8301ad1
JK
96422012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9643
9644 * linux-low.c (linux_wait_for_event_1): Rename to ...
9645 (linux_wait_for_event): ... here and merge it with former
9646 linux_wait_for_event - new variable wait_ptid, use it.
9647 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9648
01b17894
PA
96492012-01-23 Pedro Alves <palves@redhat.com>
9650
9651 * server.c (main): Avoid yet another case of infinite loop while
9652 detaching/killing after a longjmp.
9653
e825046f
JK
96542012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9655
9656 Code cleanup.
9657 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9658
b9e7b9c3
UW
96592012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9660
9661 * hostio.c (handle_readlink): New function.
9662 (handle_vFile): Call it to handle "vFile:readlink" packets.
9663
901f9912
UW
96642012-01-20 Pedro Alves <palves@redhat.com>
9665 Ulrich Weigand <ulrich.weigand@linaro.org>
9666
9667 * server.c (handle_v_requests): Only support vAttach and vRun to
9668 start multiple processes when in extended protocol mode.
9669
fc1ab1a0
PA
96702012-01-17 Pedro Alves <palves@redhat.com>
9671
9672 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9673 memalign plus mprotect to allocate the scratch buffer.
9674
7d5d4e98
PA
96752012-01-13 Pedro Alves <palves@redhat.com>
9676
9677 * server.c (attach_inferior): Clear `cont_thread'.
9678
f128d5e9
PA
96792012-01-13 Pedro Alves <palves@redhat.com>
9680
9681 * server.c (main): Avoid infinite loop while detaching/killing
9682 after a longjmp.
9683
06db92f0
DE
96842012-01-09 Doug Evans <dje@google.com>
9685
9686 * server.c (start_inferior): Set last_ptid in --wrapper case.
9687
32d92999
YQ
96882012-01-06 Yao Qi <yao@codesourcery.com>
9689
9690 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9691 defined.
9692 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9693
5e0a92a9
YQ
96942012-01-04 Yao Qi <yao@codesourcery.com>
9695
9696 * tracepoint.c (cmd_qtdp): Print debug message
9697 for static tracepoint.
9698
ae639e8c
YQ
96992012-01-04 Yao Qi <yao@codesourcery.com>
9700
9701 * tracepoint.c (trace_vdebug): Differentiate debug message
9702 between gdbserver and IPA.
9703
f72429c5
YQ
97042012-01-03 Yao Qi <yao@codesourcery.com>
9705
9706 * tracepoint.c (tracepoint_was_hit): Don't collect for
9707 static tracepoint.
9708
12c3e59c
JB
97092012-01-02 Joel Brobecker <brobecker@adacore.com>
9710
9711 * terminal.h: Reformat copyright header.
9712
67827812
JB
97132012-01-02 Joel Brobecker <brobecker@adacore.com>
9714
9715 * server.c (gdbserver_version): Update copyright year.
9716 * gdbreplay.c (gdbreplay_version): Likewise.
9717
3e52c33d
JK
97182011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9719
9720 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9721
9722 Revert:
9723 2011-12-18 Hui Zhu <teawater@gmail.com>
9724 * linux-low.c (linux_create_inferior): Save return value to ret.
9725
66f1260e
HZ
97262011-12-18 Hui Zhu <teawater@gmail.com>
9727
9728 * linux-low.c (linux_create_inferior): Save return value to ret.
9729
e77616d7
DE
97302011-12-16 Doug Evans <dje@google.com>
9731
e7b06c57
DE
9732 * linux-low.c (linux_create_inferior): If stdio connection,
9733 redirect stdin from /dev/null, stdout to stderr.
9734 * remote-utils.c (remote_is_stdio): New static global.
9735 (remote_connection_is_stdio): New function.
9736 (remote_prepare): Handle stdio connection.
9737 (remote_open): Ditto.
9738 (remote_close): Don't close stdin for stdio connections.
9739 (read_prim,write_prim): New functions. Replace all calls to
9740 read/write to these.
9741 * server.c (main): Watch for "-" argument. Move call to
9742 remote_prepare before start_inferior.
9743 * server.h (STDIO_CONNECTION_NAME): New macro.
9744 (remote_connection_is_stdio): Declare.
9745
e77616d7
DE
9746 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9747 in debugging output.
9748
82067193
YQ
97492011-12-15 Yao Qi <yao@codesourcery.com>
9750
9751 * tracepoint.c: Include sys/syscall.h.
9752 (gdb_ust_thread): Remove preprocessor conditional.
9753
82bfbe7e
PA
97542011-12-14 Pedro Alves <pedro@codesourcery.com>
9755
9756 * linux-low.c (linux_detach_one_lwp): Call
9757 the_low_target.prepare_to_resume before detaching.
9758
712c6575
YQ
97592011-12-14 Yao Qi <yao@codesourcery.com>
9760
9761 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9762 of write.
9763
d54d1edf
YQ
97642011-12-14 Yao Qi <yao@codesourcery.com>
9765
9766 * i386-low.c (i386_low_stopped_data_address): Initialize local
9767 variable `control'.
9768
6210a125
PA
97692011-12-13 Pedro Alves <pedro@codesourcery.com>
9770
9771 PR remote/13492
9772
9773 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9774 DR_CONTROL unless necessary. Extend comments.
9775 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9776 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9777
2ece8244
YQ
97782011-12-13 Yao Qi <yao@codesourcery.com>
9779
9780 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9781 macros.
9782 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9783
784867a5
JK
97842011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9785
9786 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9787 Print new debug message for such case.
9788
6bf36717
JK
97892011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9790
9791 Fix overlapping memcpy.
9792 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9793 the read_inferior_memory transfer.
9794 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9795 write_inferior_memory transfer.
9796 (set_fast_tracepoint_jump): New variable buf. Use it for the
9797 read_inferior_memory and write_inferior_memory transfers.
9798 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9799 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9800 Use it for the write_inferior_memory transfer.
9801 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9802 buffers.
9803
50275556
MR
98042011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9805
9806 * linux-low.c (fetch_register, store_register): Make code
9807 consistent, fix formatting.
9808
7325beb4
MR
98092011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9810
9811 * linux-low.c (usr_store_inferior_registers): Factor out code
9812 to handle individual registers into...
9813 (store_register): ... this new function.
9814
c642a434
UW
98152011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9816
9817 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9818 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9819 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9820 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9821 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9822 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9823 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9824 (srv_xmlfiles): Add new XML files.
9825
9826 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9827 and <sys/uio.h>.
9828 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9829 (init_registers_s390_linux32v1): Add prototype.
9830 (init_registers_s390_linux32v2): Likewise.
9831 (init_registers_s390_linux64v1): Likewise.
9832 (init_registers_s390_linux64v2): Likewise.
9833 (init_registers_s390x_linux64v1): Likewise.
9834 (init_registers_s390x_linux64v2): Likewise.
9835 (s390_num_regs): Increment to 52.
9836 (s390_regmap): Add orig_r2 register.
9837 (s390_num_regs_3264): Increment to 68.
9838 (s390_regmap_3264): Add orig_r2 register.
9839 (s390_collect_ptrace_register): Handle orig_r2 register.
9840 (s390_supply_ptrace_register): Likewise.
9841 (s390_fill_last_break): New function.
9842 (s390_store_last_break): Likewise.
9843 (s390_fill_system_call): New function.
9844 (s390_store_system_call): Likewise.
9845 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9846 register sets.
9847 (s390_check_regset): New function.
9848 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9849 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9850 Update target_regsets for available register sets.
9851
2268b414
JK
98522011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9853 Jan Kratochvil <jan.kratochvil@redhat.com>
9854
9855 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9856 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9857 New.
9858 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9859 * linux-low.h (struct process_info_private): New member r_debug.
9860 * server.c (handle_qxfer_libraries): Call
9861 the_target->qxfer_libraries_svr4.
9862 (handle_qxfer_libraries_svr4): New function.
9863 (qxfer_packets): New entry "libraries-svr4".
9864 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9865 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9866 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9867 PACKET_qXfer_libraries_svr4.
9868
d6db1fab
UW
98692011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9870
9871 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9872 PSW address/mask between 8-byte and 16-byte formats.
9873 (s390_supply_ptrace_register): Likewise.
9874 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9875 basic addressing mode bit.
9876
242f5f1c
SS
98772011-11-24 Stan Shebs <stan@codesourcery.com>
9878
9879 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9880
f196051f
SS
98812011-11-17 Stan Shebs <stan@codesourcery.com>
9882
9883 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9884 (tracing_start_time): New global.
9885 (tracing_stop_time): New global.
9886 (tracing_user_name): New global.
9887 (tracing_notes): New global.
9888 (tracing_stop_note): New global.
9889 (cmd_qtstart): Set traceframe_usage, start_time.
9890 (stop_tracing): Set stop_time.
9891 (cmd_qtstatus): Report additional status.
9892 (cmd_qtp): New function.
9893 (handle_tracepoint_query): Call it.
9894 (cmd_qtnotes): New function.
9895 (handle_tracepoint_general_set): Call it.
9896 (get_timestamp): Rename from tsv_get_timestamp.
9897
405f8e94
SS
98982011-11-14 Stan Shebs <stan@codesourcery.com>
9899 Kwok Cheung Yeung <kcy@codesourcery.com>
9900
9901 * linux-x86-low.c (small_jump_insn): New.
9902 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9903 trampoline and error message, build a trampoline and issue a small
9904 jump instruction to it.
9905 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9906 trampoline and error message.
9907 (x86_get_min_fast_tracepoint_insn_len): New.
9908 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9909 * linux-low.h (struct linux_target_ops): Add arguments to
9910 install_fast_tracepoint_jump_pad operation, add new operation.
9911 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9912 arguments.
9913 (linux_get_min_fast_tracepoint_insn_len): New function.
9914 (linux_target_op): Add new operation.
9915 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9916 (gdb_trampoline_buffer_end): Ditto.
9917 (gdb_trampoline_buffer_error): Ditto.
9918 (struct ipa_sym_addresses): Add fields for new IPA variables.
9919 (symbol_list): Add entries for new IPA variables.
9920 (struct tracepoint): Add fields to hold the address range of the
9921 trampoline used by the tracepoint.
9922 (trampoline_buffer_head): New static variable.
9923 (trampoline_buffer_tail): Ditto.
9924 (claim_trampoline_space): New function.
9925 (have_fast_tracepoint_trampoline_buffer): New function.
9926 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9927 structure.
9928 (install_fast_tracepoint): Ditto, also add error buffer argument.
9929 (cmd_qtminftpilen): New function.
9930 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9931 (fast_tracepoint_from_trampoline_address): New function.
9932 (fast_tracepoint_collecting): Handle trampoline as part of jump
9933 pad space.
9934 (set_trampoline_buffer_space): New function.
9935 (initialize_tracepoint): Initialize new IPA variables.
9936 * target.h (struct target_ops): Add arguments to
9937 install_fast_tracepoint_jump_pad operation, add new
9938 get_min_fast_tracepoint_insn_len operation.
9939 (target_get_min_fast_tracepoint_insn_len): New.
9940 (install_fast_tracepoint_jump_pad): Add arguments.
9941 * server.h (IPA_BUFSIZ): Define.
9942 * linux-i386-ipa.c: Include extra header files.
9943 (initialize_fast_tracepoint_trampoline_buffer): New function.
9944 (initialize_low_tracepoint): Call it.
9945 * server.h (set_trampoline_buffer_space): Declare.
9946 (claim_trampoline_space): Ditto.
9947 (have_fast_tracepoint_trampoline_buffer): Ditto.
9948
1e4d1764
YQ
99492011-11-14 Yao Qi <yao@codesourcery.com>
9950
9951 * server.c (handle_query): Handle InstallInTrace for qSupported.
9952 * tracepoint.c (add_tracepoint): Sort list.
9953 (install_tracepoint, download_tracepoint): New.
9954 (cmd_qtdp): Call them to install and download tracepoints.
9955 (sort_tracepoints): Removed.
9956 (cmd_qtstart): Update.
9957
5c73ff4e
YQ
99582011-11-14 Yao Qi <yao@codesourcery.com>
9959
9960 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9961 * mem-break.h: Declare.
9962 * tracepoint.c (cmd_qtstart): Move some code to ...
9963 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9964 New.
9965 (download_tracepoints): Move some code to ...
9966 (download_tracepoint_1): ... here. New.
9967
86a30030
YQ
99682011-11-08 Yao Qi <yao@codesourcery.com>
9969
9970 * remote-utils.c (relocate_instruction): A comment fix.
9971
8d26e50c
JB
99722011-11-07 Joel Brobecker <brobecker@adacore.com>
9973
9974 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9975 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9976 dr_status_mirror and dr_control_mirror from debug_reg_state.
9977 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9978 (i386_initial_stuff): Remove use of deleted globals.
9979 (i386_get_thread_context, i386_set_thread_context,
9980 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9981 from debug_reg_state.
9982
a59306a3
YQ
99832011-11-05 Yao Qi <yao@codesourcery.com>
9984
9985 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9986 address as TPOINT's.
9987
3065dfb6
SS
99882011-11-02 Stan Shebs <stan@codesourcery.com>
9989
9990 * tracepoint.c (agent_mem_read_string): New function.
9991 (eval_agent_expr): Call it for tracenz.
9992 * server.c (handle_query): Report support for tracenz.
9993
fd0d8c7c
YQ
99942011-11-02 Yao Qi <yao@codesourcery.com>
9995
9996 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9997
609086b1
YQ
99982011-11-02 Yao Qi <yao@codesourcery.com>
9999
10000 * target.h: Fix a typo in comment.
10001
b9fd1791
PA
100022011-10-31 Pedro Alves <pedro@codesourcery.com>
10003
10004 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10005 clobber the breakpoints' shadows with fast tracepoint jumps.
10006 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10007 * target.c (write_inferior_memory): Also pass MYADDR down to
10008 check_mem_write.
10009
03583c20
UW
100102011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10011
10012 * configure.ac: Check support for personality routine.
10013 * configure: Regenerate.
10014 * config.in: Likewise.
10015 * linux-low.c: Include <sys/personality.h>.
10016 Define ADDR_NO_RANDOMIZE if necessary.
10017 (linux_create_inferior): Disable address space randomization when
10018 forking inferior, if requested.
10019 (linux_supports_disable_randomization): New function.
10020 (linux_target_ops): Install it.
10021 * server.h (disable_randomization): Declare.
10022 * server.c (disable_randomization): New global variable.
10023 (handle_general_set): Handle QDisableRandomization.
10024 (handle_query): Likewise for qSupported.
10025 (main): Support --disable-randomization and --no-disable-randomization
10026 command line arguments.
10027 * target.h (struct target_ops): Add supports_disable_randomization.
10028 (target_supports_disable_randomization): New macro.
10029
723b724b
MF
100302011-09-29 Mike Frysinger <vapier@gentoo.org>
10031
10032 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10033 ifdef check.
10034 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10035 [!PT_GETDSBT] (target_loadmap): New definition.
10036 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10037 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10038 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10039 and PT_GETDSBT to LINUX_LOADMAP.
10040 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10041 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10042
55329a5c 100432011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10044
10045 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10046 (arm_linux_hwbp_cap): New static variable.
10047 (arm_linux_get_hwbp_cap): Replace by ...
10048 (arm_linux_init_hwbp_cap): ... this new function.
10049 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10050 (arm_linux_get_hw_watchpoint_count): Likewise.
10051 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10052 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10053 (arm_prepare_to_resume): Use perror_with_name instead of error.
10054
55329a5c 100552011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10056
10057 * linux-arm-low.c: Include <signal.h>.
10058 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10059 (struct arm_linux_hwbp_cap): New data type.
10060 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10061 (struct arm_linux_hw_breakpoint): New data type.
10062 (MAX_BPTS, MAX_WPTS): Define.
10063 (struct arch_process_info, struct arch_lwp_info): New data types.
10064 (arm_linux_get_hwbp_cap): New function.
10065 (arm_linux_get_hw_breakpoint_count): Likewise.
10066 (arm_linux_get_hw_watchpoint_count): Likewise.
10067 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10068 (arm_hwbp_control_initialize): Likewise.
10069 (arm_hwbp_control_is_enabled): Likewise.
10070 (arm_hwbp_control_is_initialized): Likewise.
10071 (arm_hwbp_control_disable): Likewise.
10072 (arm_linux_hw_breakpoint_equal): Likewise.
10073 (arm_linux_hw_point_initialize): Likewise.
10074 (struct update_registers_data): New data structure.
10075 (update_registers_callback: New function.
10076 (arm_insert_point): Likewise.
10077 (arm_remove_point): Likewise.
10078 (arm_stopped_by_watchpoint): Likewise.
10079 (arm_stopped_data_address): Likewise.
10080 (arm_new_process): Likewise.
10081 (arm_new_thread): Likewise.
10082 (arm_prepare_to_resume): Likewise.
10083 (the_low_target): Register arm_insert_point, arm_remove_point,
10084 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10085 arm_new_thread, and arm_prepare_to_resume.
10086
6b9801d4
SS
100872011-09-15 Stan Shebs <stan@codesourcery.com>
10088
10089 * server.h (struct emit_ops): Add compare-goto fields.
10090 * tracepoint.c (gdb_agent_op_sizes): New table.
10091 (emit_eq_goto): New function.
10092 (emit_ne_goto): New function.
10093 (emit_lt_goto): New function.
10094 (emit_le_goto): New function.
10095 (emit_gt_goto): New function.
10096 (emit_ge_goto): New function.
10097 (is_goto_target): New function.
10098 (compile_bytecodes): Recognize special cases of compare-goto
10099 combinations and call specialized emitters for them.
10100 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10101 (amd64_emit_ne_goto): New function.
10102 (amd64_emit_lt_goto): New function.
10103 (amd64_emit_le_goto): New function.
10104 (amd64_emit_gt_goto): New function.
10105 (amd64_emit_ge_goto): New function.
10106 (amd64_emit_ops): Add the new functions.
10107 (i386_emit_eq_goto): New function.
10108 (i386_emit_ne_goto): New function.
10109 (i386_emit_lt_goto): New function.
10110 (i386_emit_le_goto): New function.
10111 (i386_emit_gt_goto): New function.
10112 (i386_emit_ge_goto): New function.
10113 (i386_emit_ops): Add the new functions.
10114
bf15cbda
SS
101152011-09-08 Stan Shebs <stan@codesourcery.com>
10116
10117 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10118 (i386_emit_epilogue): Restore %ebx.
10119
943ca1dd
JZ
101202011-08-31 Jie Zhang <jzhang918@gmail.com>
10121
10122 * server.c (step_thread): Remove definition.
10123 (process_serial_event): Don't handle Hs.
10124 * server.h (step_thread): Remove declaration.
10125 * target.c (set_desired_inferior): Remove use of step_thread.
10126
e3deef73
LM
101272011-08-24 Luis Machado <lgustavo@codesourcery.com>
10128
10129 * linux-low.c: Include linux-procfs.h.
10130 (linux_attach_lwp_1): Update comments.
10131 (linux_attach): Scan for existing threads when attaching to a
10132 process that is the tgid.
10133 * Makefile.in: Update dependencies.
10134
13da1c97
LM
101352011-08-24 Luis Machado <lgustavo@codesourcery.com>
10136
10137 * configure.srv: Add linux-procfs.o dependencies.
10138
881127c9
YQ
101392011-08-14 Yao Qi <yao@codesourcery.com>
10140
10141 * target.h (struct target_ops): Fix indent.
10142 * win32-low.c (win32_target_ops): Fix comment.
10143
58dbd541
YQ
101442011-08-14 Andrew Jenner <andrew@codesourcery.com>
10145 Yao Qi <yao@codesourcery.com>
10146
10147 * Makefile.in (clean): Remove tic6x-*.c files.
10148 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10149 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10150 (tic6x-c64xp-linux.c): Likewise.
10151 * configure.srv: Add support for tic6x-*-uclinux.
10152 * linux-tic6x-low.c: New.
10153 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10154
78d85199
YQ
101552011-08-14 Andrew Stubbs <ams@codesourcery.com>
10156 Yao Qi <yao@codesourcery.com>
10157
10158 * target.h (struct target_ops): Add read_loadmap.
10159 * linux-low.c (struct target_loadseg): New type.
10160 (struct target_loadmap): New type.
10161 (linux_read_loadmap): New function.
10162 (linux_target_ops): Add linux_read_loadmap.
10163 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10164 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10165 to NULL.
78d85199 10166
a959a88d
EZ
101672011-08-05 Eli Zaretskii <eliz@gnu.org>
10168
10169 * win32-low.c: Include <stdint.h>.
10170
1ced966e
PA
101712011-07-22 Pedro Alves <pedro@codesourcery.com>
10172
10173 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10174 to the inferior here.
10175 (i386_remove_aligned_watchpoint): Ditto.
10176 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10177 fit part of the watchpoint in the debug registers.
10178 (i386_update_inferior_debug_regs): New.
10179 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10180 registers, and only update the inferior on success.
10181 (i386_low_remove_watchpoint): Ditto.
10182
d26e3629
KY
101832011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10184
10185 * linux-low.c (compare_ints, unique, list_threads, show_process,
10186 linux_core_of_thread): Delete.
10187 (linux_target_ops): Change linux_core_of_thread to
10188 linux_common_core_of_thread.
10189 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10190 * utils.c (malloc_failure): Change type of argument.
10191 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10192 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10193 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10194 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10195 (IPA_OBJS): Add common-utils-ipa.o.
10196 (ptid_h, linux_osdata_h): New macros.
10197 (server_h): Add common/common-utils.h, common/xml-utils.h,
10198 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10199 common/ptid.h.
10200 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10201 ptid.o, buffer.o): New rules.
10202 (linux-low.o): Add common/linux-osdata.h as a dependency.
10203 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10204 * configure.ac: Add AC_HEADER_DIRENT check.
10205 * config.in: Regenerate.
10206 * configure: Regenerate.
10207 * remote-utils.c (xml_escape_text): Delete.
10208 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10209 buffer_xml_printf): Move to common/buffer.c.
10210 * server.c (main): Remove call to initialize_inferiors.
10211 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10212 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10213 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10214 internal_error, gdb_assert, gdb_assert_fail): Delete.
10215 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10216 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10217 common/buffer.h.
10218 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10219 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10220 initialize_inferiors): Delete.
10221
2275a1a7
PA
102222011-07-20 Pedro Alves <pedro@codesourcery.com>
10223
10224 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10225 symbol error.
10226
0a5b1e09
PA
102272011-05-31 Pedro Alves <pedro@codesourcery.com>
10228
10229 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10230 assertion.
10231 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10232
6938fd34
YQ
102332011-05-26 Yao Qi <yao@codesourcery.com>
10234
10235 * Makefile.in (thread-db.o): Track dependence to
10236 common/gdb_thread_db.h.
10237 * thread-db.c: include gdb_thread_db.h from right place.
10238
b481f9e0
TT
102392011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10240
10241 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10242 __FILE__ and __LINE__ to internal_error.
10243
98a5dd13
DE
102442011-05-13 Doug Evans <dje@google.com>
10245
10246 * thread-db.c (try_thread_db_load_from_sdir): New function.
10247 (try_thread_db_load_from_dir): New function.
10248 (thread_db_load_search): Handle $sdir, ignore $pdir.
10249 Remove trying of system directories if search of
10250 libthread-db-search-path fails, that is now done via $sdir.
10251
d248b706
KY
102522011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10253
10254 * server.c (handle_query): Add EnableDisableTracepoints to the list
10255 of supported features.
43aaf8b6 10256 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10257 tracepoints.
43aaf8b6
PA
10258 (cmd_qtenable_disable): New.
10259 (cmd_qtstart): Install tracepoints even if disabled.
10260 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10261 receiving a QTEnable or QTDisable packet.
10262 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10263 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10264 tracepoints.
10265 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10266
84e578fb
DE
102672011-05-10 Doug Evans <dje@google.com>
10268
10269 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10270
71f55dd8
DE
102712011-05-04 Doug Evans <dje@google.com>
10272
10273 * linux-low.c (linux_join): Skip process lookup.
10274 * spu-low.c (spu_join): Ditto.
10275 * server.c (join_inferiors_callback): Delete.
10276 (process_serial_event): For 'D' packet (detach) call join_inferior
10277 directly.
10278
4d393d60
JM
102792011-05-04 Joseph Myers <joseph@codesourcery.com>
10280
10281 * README: Don't mention xscale*-*-linux*.
10282 * configure.srv (xscale*-*-linux*): Don't handle target.
10283
b00ad6ff
NF
102842011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10285
10286 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10287 casting pointers.
10288 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10289 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10290 (i386_emit_void_call_2): Likewise.
10291
af96c192
YQ
102922011-04-26 Yao Qi <yao@codesourcery.com>
10293
43aaf8b6
PA
10294 * linux-low.c: Move common macros to linux-ptrace.h.
10295 Include linux-ptrace.h.
af96c192
YQ
10296 * Makefile.in (linux_ptrace_h): New.
10297 (linux-low.o): Depends on linux-ptrace.h.
10298
03f2bd59
JK
102992011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10300
10301 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10302 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10303 (remote_prepare): New function with most of the TCP code from ...
10304 (remote_open): ... here. Detect PORT here unconditionally. Move also
10305 setting transport_is_reliable.
10306 * server.c (run_once): New variable.
10307 (gdbserver_usage): Document it.
10308 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10309 the first run if RUN_ONCE.
10310 * server.h (run_once, remote_prepare): New declarations.
10311
7a9dd1b2
TT
103122011-04-19 Tom Tromey <tromey@redhat.com>
10313
10314 * win32-low.c (handle_load_dll): Remove duplicate "the".
10315
81239425
PM
103162011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10317
10318 Remove support for old Cygwin 1.5 versions.
10319 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10320 function to avoid warning.
10321 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10322 warning.
10323
9e0627f1
PM
103242011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10325
10326 * gdbserver/server.h (Macro _): Define it if not available.
10327
588eebee
MS
103282011-03-14 Michael Snyder <msnyder@vmware.com>
10329
348af9f7 10330 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10331
43f70d4c
JB
103322011-03-10 Joel Brobecker <brobecker@adacore.com>
10333
10334 * Makefile.in (maintainer-clean realclean distclean): Remove
10335 "make ... subdir_do" command.
10336
348af9f7
MS
103372011-03-10 Michael Snyder <msnyder@vmware.com>
10338
10339 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10340
10341 * server.c (handle_v_run): Free alloced buffer on early return.
10342
e637a4f5
YQ
103432011-03-09 Yao Qi <yao@codesourcery.com>
10344
10345 Revert:
10346 2011-03-04 Yao Qi <yao@codesourcery.com>
10347
10348 * Makefile.in: Remove GNU make feature --directory.
10349
10350 2011-03-05 Yao Qi <yao@codesourcery.com>
10351
10352 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10353 (subdir_do): New make target. Copied from gdb/Makefile.
10354 (maintainer-clean, realclean, distclean, clean): Call corresponding
10355 make targets in common/Makefile.
10356
10357 2011-02-11 Yao Qi <yao@codesourcery.com>
10358
10359 * configure.ac: Call AC_PROG_RANLIB.
10360 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10361 * configure: Regenerate.
10362
e6edda56
JK
103632011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10364
10365 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10366
e5141119
JB
103672011-03-06 Yao Qi <yao@codesourcery.com>
10368
10369 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10370
64794aa4
JB
103712011-03-05 Yao Qi <yao@codesourcery.com>
10372
10373 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10374 (subdir_do): New make target. Copied from gdb/Makefile.
10375 (maintainer-clean, realclean, distclean, clean): Call corresponding
10376 make targets in common/Makefile.
10377
7a762829
YQ
103782011-03-04 Yao Qi <yao@codesourcery.com>
10379
10380 * Makefile.in: Remove GNU make feature --directory.
10381
348af9f7
MS
103822011-03-04 Michael Snyder <msnyder@vmware.com>
10383
10384 * server.c (queue_stop_reply): Call xmalloc not malloc.
10385
103862011-03-02 Michael Snyder <msnyder@vmware.com>
10387
10388 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10389
9f72fee2
MS
103902011-02-28 Michael Snyder <msnyder@vmware.com>
10391
588eebee
MS
10392 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10393 (cmd_qtframe): Ditto.
10394 (cmd_qtbuffer): Ditto.
10395 (cmd_bigqtbuffer): Ditto.
10396
9f72fee2
MS
10397 * utils.c (decimal2str): Initialize 'width' to nine, then
10398 don't mess with it.
10399
8040bd49
UW
104002011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10401
10402 * hostio.c (require_data): Free *data, not data.
10403
7e52cbd0
JK
104042011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10405
10406 * hostio.c (require_data): Use free, not xfree.
10407
9130f83e
MS
104082011-02-27 Michael Snyder <msnyder@vmware.com>
10409
4b812f4e
MS
10410 * server.c (handle_query): Discard unused value.
10411
9130f83e
MS
10412 * hostio.c (require_data): Free malloc memory before returning
10413 error.
10414
69d37113
MS
104152011-02-26 Michael Snyder <msnyder@vmware.com>
10416
10417 * linux-low.c (list_threads): Call closedir for dirent.
10418
35f5825a
MS
104192011-02-27 Michael Snyder <msnyder@vmware.com>
10420
2a589cef
MS
10421 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10422 a case statement falls through.
10423
0adea5f7
MS
10424 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10425
35f5825a
MS
10426 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10427 in comparison.
10428
238f1c74
MS
104292011-02-26 Michael Snyder <msnyder@vmware.com>
10430
10431 * utils.c (decimal2str): Eliminate dead code and dead param.
10432 (pulongest): Drop dead param from call to decimal2str.
10433 (plongest): Ditto.
10434
633ff500
JB
104352011-02-24 Joel Brobecker <brobecker@adacore.com>
10436
10437 Revert the following patch (not approved yet):
10438 2011-02-21 Hui Zhu <teawater@gmail.com>
10439 * tracepoint.c (tp_printf): New function.
10440 (eval_agent_expr): Handle gdb_agent_op_printf.
10441
f9c6ff72
HZ
104422011-02-21 Hui Zhu <teawater@gmail.com>
10443
10444 * tracepoint.c (tp_printf): New function.
10445 (eval_agent_expr): Handle gdb_agent_op_printf.
10446
94d5e490
TT
104472011-02-18 Tom Tromey <tromey@redhat.com>
10448
10449 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10450 (tracepoint.o): Likewise.
10451 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10452 (gdb_agent_op_names): Likewise.
10453
c7f96d2b
TT
104542011-02-18 Tom Tromey <tromey@redhat.com>
10455
10456 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10457 gdb_agent_op_rot>: New constants.
10458 (gdb_agent_op_names): Add pick and roll.
10459 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10460 cases.
10461
0feedb2c
JK
104622011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10463
10464 * aclocal.m4: Regenerated with aclocal-1.11.1.
10465
b3b9301e
PA
104662011-02-14 Pedro Alves <pedro@codesourcery.com>
10467
10468 * server.c (handle_qxfer_traceframe_info): New.
10469 (qxfer_packets): Register "traceframe-info".
10470 (handle_query): Report support for qXfer:traceframe-info:read+.
10471 * tracepoint.c (match_blocktype): New.
10472 (traceframe_find_block_type): Rename to ...
10473 (traceframe_walk_blocks): ... this. Add callback filter argument,
10474 and use it.
10475 (traceframe_find_block_type): New, reimplemented on top of
10476 traceframe_walk_blocks.
10477 (build_traceframe_info_xml): New.
10478 (traceframe_read_info): New.
10479 * server.h (traceframe_read_info): Declare.
10480
4f3e6fb7
YQ
104812011-02-11 Yao Qi <yao@codesourcery.com>
10482
10483 * configure.ac: Call AC_PROG_RANLIB.
10484 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10485 * configure: Regenerate.
10486
764880b7
PA
104872011-02-07 Pedro Alves <pedro@codesourcery.com>
10488
10489 * server.c (gdb_read_memory): Change return semantics to allow
10490 partial transfers.
10491 (handle_search_memory_1): Adjust.
10492 (process_serial_event) <'m' packet>: Handle partial transfers.
10493 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10494
1c79eb8a
PA
104952011-01-28 Pedro Alves <pedro@codesourcery.com>
10496
10497 * regcache.c (init_register_cache): Initialize
10498 regcache->register_status.
10499 (free_register_cache): Release regcache->register_status.
10500 (regcache_cpy): Copy register_status.
10501 (registers_to_string): Print 'x's for unavailable registers.
10502 (supply_register): Mark the register's status valid or
10503 unavailable, depending on whether a buffer was passed in or not.
10504 (supply_register_zeroed): New.
10505 (supply_regblock): Mark the registers' status valid or
10506 unavailable, depending on whether a buffer was passed in or not.
10507 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10508 (struct regcache): New `register_status' field.
10509 (supply_register_zeroed): Declare.
10510 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10511 supply_register_zeroed, rather than passing a NULL buffer to
10512 supply_register.
10513 * tracepoint.c (fetch_traceframe_registers): Update comment.
10514
85724a0e
PA
105152011-01-28 Pedro Alves <pedro@codesourcery.com>
10516
10517 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10518 buffer explicit.
10519
d08aafef
PA
105202011-01-25 Pedro Alves <pedro@codesourcery.com>
10521
10522 * server.h (decode_xfer_write): Change prototype.
10523 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10524 and don't extract the annex here.
10525 * server.c (decode_xfer_read): Remove `annex' parameter,
10526 and don't extract the annex here.
10527 (decode_xfer): New.
10528 (struct qxfer): New.
10529 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10530 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10531 (handle_qxfer_statictrace): New functions, abstracted out from
10532 handle_query, and made to use the struct qxfer interface.
10533 (handle_threads_qxfer_proper): Rename to ...
10534 (handle_qxfer_threads_proper): ... this.
10535 (handle_threads_qxfer): Rename to ...
10536 (handle_qxfer_threads): ... this. Adjust.
10537 (qxfer_packets): New array.
10538 (handle_qxfer): New function.
10539 (handle_query): Use handle_qxfer.
10540
493e2a69
MS
105412011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10542
10543 * gdbreplay.c: Shorten lines of >= 80 columns.
10544 * linux-low.c: Ditto.
10545 * linux-ppc-low.c: Ditto.
10546 * linux-s390-low.c: Ditto.
10547 * linux-sparc-low.c: Ditto.
10548 * linux-x86-low.c: Ditto.
10549 * linux-xtensa-low.c: Ditto.
10550 * mem-break.c: Ditto.
10551 * nto-low.c: Ditto.
10552 * regcache.h: Ditto.
10553 * remote-utils.c: Ditto.
10554 * server.c: Ditto.
10555 * server.h: Ditto.
10556 * thread-db.c: Ditto.
10557 * tracepoint.c: Ditto.
10558 * utils.c: Ditto.
10559 * win32-low.h: Ditto.
10560
44944448
JB
105612011-01-05 Joel Brobecker <brobecker@adacore.com>
10562
10563 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10564 update.
10565
71ce852c
JB
105662011-01-01 Joel Brobecker <brobecker@adacore.com>
10567
10568 * server.c (gdbserver_version): Update copyright year in version
10569 output.
10570 * gdbreplay.c (gdbreplay_version): Ditto.
10571
eb826dc6
MF
105722010-12-29 Jie Zhang <jie.zhang@analog.com>
10573
10574 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10575 * linux-bfin-low.c: New file.
10576 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10577 PT_DATA_ADDR for BFIN targets.
10578 * Makefile.in (SFILES): Add linux-bfin-low.c.
10579 (clean): Remove reg-bfin.c.
10580 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10581 * README: Mention supported Blackfin targets.
10582
39ab222a
MF
105832010-12-23 Mike Frysinger <vapier@gentoo.org>
10584
10585 * .gitignore: New file.
10586
a1f2ce7d
MF
105872010-11-16 Mike Frysinger <vapier@gentoo.org>
10588
10589 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10590
f474844c
JZ
105912010-10-22 Jie Zhang <jie@codesourcery.com>
10592
10593 * Makefile.in: Add FLAGS_TO_PASS variable.
10594 (install): Remove dependency of install-only and recursively
10595 invoke make for install-only.
10596
f1048712
DE
105972010-10-04 Doug Evans <dje@google.com>
10598
10599 * Makefile.in (uninstall): Use $(DESTDIR).
10600
b53a1623
PA
106012010-09-24 Pedro Alves <pedro@codesourcery.com>
10602
e6ee044d
PA
10603 PR gdb/11842
10604
b53a1623
PA
10605 * linux-x86-low.c (compat_siginfo_from_siginfo)
10606 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10607 si_code is < 0. Check for si_code == SI_TIMER before checking for
10608 si_code < 0.
10609
fa1bd1e4
JB
106102010-09-13 Joel Brobecker <brobecker@adacore.com>
10611
10612 * lynx-i386-low.c: New file.
10613 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10614
47fac8f8
JB
106152010-09-13 Joel Brobecker <brobecker@adacore.com>
10616
10617 * lynx-low.c (ptrace_request_to_str): Remove handling for
10618 request values that have been removed in LynxOS 5.x.
10619
1adfc54d
JB
106202010-09-13 Joel Brobecker <brobecker@adacore.com>
10621
10622 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10623 <ptrace.h>
10624
c2a66c29
NS
106252010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10626
10627 * configure.ac: Add --enable-inprocess-agent option.
10628 * configure: Rebuilt.
10629
32fcada3
YQ
106302010-09-06 Yao Qi <yao@codesourcery.com>
10631
10632 * linux-low.c (linux_kill): Remove unused variable.
10633 (linux_stabilize_threads): Likewise.
10634 * server.c (start_inferior): Likewise.
10635 (queue_stop_reply_callback): Likewise.
10636 * tracepoint.c (do_action_at_tracepoint): Likewise.
10637
0cccb683
YQ
106382010-09-06 Yao Qi <yao@codesourcery.com>
10639
10640 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10641 on return.
10642
423ec54c
JK
106432010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10644
10645 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10646
12ac6819
PA
106472010-09-06 Pedro Alves <pedro@codesourcery.com>
10648
10649 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10650 "$(IPA_DEPFILES)".
10651
8ed54b31
JB
106522010-09-01 Joel Brobecker <brobecker@adacore.com>
10653
10654 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10655 gdbserver/lynx-ppc-low.c: New files.
10656 * Makefile.in (lynx_low_h): New variable.
10657 (lynx-low.o, lynx-ppc-low.o): New rules.
10658 * configure.ac: On LynxOS, link with -lnetinet.
10659 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10660 * configure: regenerate.
10661
bb0116a4
JB
106622010-09-01 Joel Brobecker <brobecker@adacore.com>
10663
10664 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10665 * configure.ac: Add check for vasprintf and vsnprintf.
10666 * configure, config.in: Regenerate.
10667 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10668
a778ab81 106692010-09-01 Joel Brobecker <brobecker@adacore.com>
10670
10671 * gdbreplay.c: Move include of alloca.h up, next to include of
10672 malloc.h.
10673 * server.h: Add include of malloc.h.
10674 * mem-break.c: Remove include of malloc.h.
10675 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10676
8b034a19 106772010-09-01 Joel Brobecker <brobecker@adacore.com>
10678
10679 * Makefile.in (memmem.o): Build with -Wno-error.
10680
106812010-09-01 Joel Brobecker <brobecker@adacore.com>
10682
10683 * utils.c (xsnprintf): Make non-static.
10684 * server.h: Add xsnprintf declaration.
10685 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10686 replace calls to snprintf by calls to xsnprintf throughout.
10687
106882010-09-01 Joel Brobecker <brobecker@adacore.com>
10689
10690 * configure.ac: Add configure check for alloca.
10691 * configure, config.in: Regenerate.
10692 * server.h: Include alloca.h if it exists.
10693 * gdbreplay.c: Include alloca.h if it exists.
10694
1a981360
PA
106952010-08-28 Pedro Alves <pedro@codesourcery.com>
10696
10697 * linux-low.c (__SIGRTMIN): Define if not already defined.
10698 (linux_create_inferior): Check for __ANDROID__ rather than
10699 __SIGRTMIN.
10700 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10701 are already deferred.
10702 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10703 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10704 stopped and already has a pending signal to report.
10705 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10706 a pending signal to report or is moving out of a jump pad.
10707 (linux_init_signals): Check for __ANDROID__ rather than
10708 __SIGRTMIN.
10709
b4d51a55
PA
107102010-08-28 Pedro Alves <pedro@codesourcery.com>
10711
10712 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10713 debug_threads check. Avoid a linear search when not doing debug
10714 output.
10715
ec48365d
PA
107162010-08-27 Pedro Alves <pedro@codesourcery.com>
10717
10718 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10719 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10720 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10721 (process_event): Change local fd's type to gdb_fildes_t.
10722 (create_file_handler): Adjust prototype.
10723 (delete_file_handler): Adjust prototype.
10724 (handle_file_event): Adjust prototype. Use pfildes.
10725 (create_file_event): Adjsut prototype.
10726 * remote-utils.c (remote_desc, listen_desc): Change type to
10727 gdb_fildes_t.
10728 * server.h: New gdb_fildes_t typedef.
10729 [USE_WIN32API]: Include winsock2.h.
10730 (delete_file_handler, add_file_handler): Adjust prototypes.
10731 (pfildes): Declare.
10732 * utils.c (pfildes): New.
10733
854d88f0
PA
107342010-08-27 Pedro Alves <pedro@codesourcery.com>
10735
10736 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10737 * configure: Regenerate.
10738
0146f85b
PA
107392010-08-27 Pedro Alves <pedro@codesourcery.com>
10740
10741 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10742 (linux_done_accessing_memory): ... this.
10743 (linux_target_ops): Adjust.
10744 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10745 * nto-low.c (nto_target_ops): Adjust comment.
10746 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10747 * spu-low.c (spu_target_ops): Adjust comment.
10748 * target.h (target_ops): Rename unprepare_to_access_memory field
10749 to done_accessing_memory.
10750 (unprepare_to_access_memory): Rename to ...
10751 (done_accessing_memory): ... this.
10752
90d74c30
PA
107532010-08-26 Pedro Alves <pedro@codesourcery.com>
10754
10755 * linux-low.c (linux_prepare_to_access_memory): New.
10756 (linux_unprepare_to_access_memory): New.
10757 (linux_target_ops): Install them.
10758 * server.c (read_memory): Rename to ...
10759 (gdb_read_memory): ... this. Use
10760 prepare_to_access_memory/prepare_to_access_memory.
10761 (write_memory): Rename to ...
10762 (gdb_write_memory): ... this. Use
10763 prepare_to_access_memory/prepare_to_access_memory.
10764 (handle_search_memory_1): Adjust.
10765 (process_serial_event): Adjust.
10766 * target.h (struct target_ops): New fields
10767 prepare_to_access_memory and unprepare_to_access_memory.
10768 (prepare_to_access_memory, unprepare_to_access_memory): New.
10769 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10770 prepare_to_access_memory/prepare_to_access_memory.
10771 * nto-low.c (nto_target_ops): Adjust.
10772 * spu-low.c (spu_target_ops): Adjust.
10773 * win32-low.c (win32_target_ops): Adjust.
10774
fd467969
PA
107752010-08-26 Pedro Alves <pedro@codesourcery.com>
10776
10777 * Makefile.in (WARN_CFLAGS): Get it from configure.
10778 (WERROR_CFLAGS): New.
10779 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10780 * configure.ac: Introduce --enable-werror, which adds -Werror to
10781 the compiler command line. Enabled by default. Disable with
10782 --disable-werror. Add -Wdeclaration-after-statement
10783 Wpointer-arith and -Wformat-nonliteral to warning flags.
10784 * configure: Regenerate.
10785
331e2f5f
PA
107862010-08-26 Pedro Alves <pedro@codesourcery.com>
10787
10788 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10789
e581f2b4
PA
107902010-08-26 Pedro Alves <pedro@codesourcery.com>
10791
10792 * gdbreplay.c (remote_error): New.
10793 (gdbchar): New.
10794 (expect): Use gdbchar. Check for error reading from GDB.
10795 Clarify sync error output.
10796 (play): Check for errors writing to GDB.
10797 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10798 * remote-utils.c (getpkt): Check for errors writing to the remote
10799 descriptor.
10800
3c11dd79
PA
108012010-08-25 Pedro Alves <pedro@codesourcery.com>
10802
10803 * linux-low.c (linux_wait_1): Move non-debugging code out of
10804 `debug_threads' control.
10805
d20a8ad9
PA
108062010-08-25 Pedro Alves <pedro@codesourcery.com>
10807
10808 * linux-low.c (linux_wait_1): Don't set last_status here.
10809 * server.c (push_event, queue_stop_reply_callback): Assert we're
10810 not pushing a TARGET_WAITKIND_IGNORE event.
10811 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10812 (myresume, handle_target_event): Set the thread's last_resume_kind
10813 and last_status from the target returned status.
10814
964e4306
PA
108152010-08-25 Pedro Alves <pedro@codesourcery.com>
10816
10817 PR threads/10729
10818
10819 * linux-x86-low.c (update_debug_registers_callback): New.
10820 (i386_dr_low_set_addr): Use it.
10821 (i386_dr_low_get_addr): New.
10822 (i386_dr_low_set_control): Use update_debug_registers_callback.
10823 (i386_dr_low_get_control): New.
10824 (i386_dr_low_get_status): Adjust.
10825 * linux-low.c (linux_stop_lwp): New.
10826 * linux-low.h (linux_stop_lwp): Declare.
10827
10828 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10829 argument instead of a i386_debug_reg_state.
10830 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10831 a i386_debug_reg_state.
10832 (i386_insert_aligned_watchpoint): Adjust.
10833 (i386_remove_aligned_watchpoint): Adjust.
10834 (i386_low_stopped_data_address): Read the debug registers from the
10835 inferior instead of from the mirrors.
10836 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10837 (i386_dr_low_get_addr): Declare.
10838 (i386_dr_low_get_control): Declare.
10839 (i386_dr_low_get_status): Change prototype.
10840
10841 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10842 (i386_dr_low_get_addr): New.
10843 (i386_dr_low_get_control): New.
10844 (i386_dr_low_get_status): Adjust prototype. Return
10845 dr_status_mirror.
10846 (i386_initial_stuff): Clear dr_status_mirror and
10847 dr_control_mirror.
10848 (i386_get_thread_context): Adjust.
10849 (i386_set_thread_context): Adjust.
10850 (i386_thread_added): Adjust.
10851
5f21a75b
PA
108522010-08-24 Pedro Alves <pedro@codesourcery.com>
10853
10854 * linux-low.h (linux_thread_area): Delete declaration.
10855
3e4c1235
TS
108562010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10857
10858 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10859 after its termination.
10860
1971b033
PA
108612010-08-09 Pedro Alves <pedro@codesourcery.com>
10862
10863 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10864 (gdb_wants_all_stopped): Delete.
10865 (linux_wait_1): Don't call them.
10866 * server.c (handle_v_cont): Tag all threads as want-stopped.
10867 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10868 stopped as "client-wants-stopped".
10869
310444ac
PA
108702010-07-31 Pedro Alves <pedro@codesourcery.com>
10871
10872 * Makefile.in (signals_h): New.
10873 (server_h): Depend on it.
10874 (server.o): Don't depend on $(signals_def).
10875 (signals.o): Depend on $(signals_def).
10876
a19cae16
JK
108772010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10878
10879 * Makefile.in (signals_def): New.
10880 (server_h): Append include/gdb/signals.h and signals_def.
10881 (server.o): Append signals_def.
10882
30d50328
JK
108832010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10884
10885 * server.c (handle_target_event): Use target_signal_to_host for
10886 resume_info.sig initialization.
10887 * target.h (struct thread_resume) <sig>: New comment.
10888
5c3216e2
OS
108892010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10890
c6f46ca0
OS
10891 * server.c (handle_query): strcpy() the returned string from paddress()
10892 instead of sprintf().
5c3216e2
OS
10893 * utils.c (paddress): Return phex_nz().
10894
6bd31874
JB
108952010-07-07 Joel Brobecker <brobecker@adacore.com>
10896
10897 * server.c (handle_v_cont): Call mourn_inferior if process
10898 just exited.
10899 (myresume): Likewise.
10900
0fb4aa4b
PA
109012010-07-01 Pedro Alves <pedro@codesourcery.com>
10902
10903 Static tracepoints, and integration with UST.
10904
10905 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10906 * mem-break.c (uninsert_all_breakpoints)
10907 (reinsert_all_breakpoints): New.
10908 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10909 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10910 (gdb_agent_ust_loaded, helper_thread_id)
10911 (gdb_agent_helper_thread_id): New macros.
10912 (struct ipa_sym_addresses): Add addr_ust_loaded,
10913 addr_helper_thread_id, addr_cmd_buf.
10914 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10915 (in_process_agent_loaded_ust): New.
10916 (write_e_ust_not_loaded): New.
10917 (maybe_write_ipa_ust_not_loaded): New.
10918 (struct collect_static_trace_data_action): New.
10919 (enum tracepoint_type) <static_tracepoint>: New.
10920 (struct tracepoint) <handle>: Mention static tracepoints.
10921 (struct static_tracepoint_ctx): New.
10922 (CMD_BUF_SIZE): New.
10923 (add_tracepoint_action): Handle static tracepoint actions.
10924 (unprobe_marker_at): New.
10925 (clear_installed_tracepoints): Handle static tracepoints.
10926 (cmd_qtdp): Handle static tracepoints.
10927 (probe_marker_at): New.
10928 (cmd_qtstart): Handle static tracepoints.
10929 (response_tracepoint): Handle static tracepoints.
10930 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10931 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10932 (get_context_regcache): Handle static tracepoints.
10933 (do_action_at_tracepoint): Handle static tracepoint actions.
10934 (traceframe_find_block_type): Handle static trace data blocks.
10935 (traceframe_read_sdata): New.
10936 (download_tracepoints): Download static tracepoint actions.
10937 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10938 (GDB_PROBE_NAME): New.
10939 (ust_ops): New.
10940 (GET_UST_SYM): New.
10941 (USTF): New.
10942 (dlsym_ust): New.
10943 (ust_marker_to_static_tracepoint): New.
10944 (gdb_probe): New.
10945 (collect_ust_data_at_tracepoint): New.
10946 (gdb_ust_probe): New.
10947 (UNIX_PATH_MAX, SOCK_DIR): New.
10948 (gdb_ust_connect_sync_socket): New.
10949 (resume_thread, stop_thread): New.
10950 (run_inferior_command): New.
10951 (init_named_socket): New.
10952 (gdb_ust_socket_init): New.
10953 (cstr_to_hexstr): New.
10954 (next_st): New.
10955 (first_marker, next_marker): New.
10956 (response_ust_marker): New.
10957 (cmd_qtfstm, cmd_qtsstm): New.
10958 (unprobe_marker_at, probe_marker_at): New.
10959 (cmd_qtstmat, gdb_ust_thread): New.
10960 (gdb_ust_init): New.
10961 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10962 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10963 (ST_REGENTRY): New.
10964 (x86_64_st_collect_regmap): New.
10965 (X86_64_NUM_ST_COLLECT_GREGS): New.
10966 (AMD64_RIP_REGNUM): New.
10967 (supply_static_tracepoint_registers): New.
10968 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10969 (ST_REGENTRY): New.
10970 (i386_st_collect_regmap): New.
10971 (i386_NUM_ST_COLLECT_GREGS): New.
10972 (supply_static_tracepoint_registers): New.
10973 * server.c (handle_query): Handle qXfer:statictrace:read.
10974 <qSupported>: Report support for StaticTracepoints, and
10975 qXfer:statictrace:read features.
10976 * server.h (traceframe_read_sdata)
10977 (supply_static_tracepoint_registers): Declare.
10978 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10979 (unpack_varlen_hex): Include in IPA build.
10980 * Makefile.in (ustlibs, ustinc): New.
10981 (IPA_OBJS): Add remote-utils-ipa.o.
10982 ($(IPA_LIB)): Link -ldl and -lpthread.
10983 (UST_CFLAGS): New.
10984 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10985 * config.in, configure: Regenerate.
10986
9e4344e5
PA
109872010-06-20 Ian Lance Taylor <iant@google.com>
10988 Pedro Alves <pedro@codesourcery.com>
10989
10990 * linux-x86-low.c (always_true): Delete.
10991 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10992 trying to fool the compiler with always_true.
10993
c6beb2cb
PA
109942010-06-20 Pedro Alves <pedro@codesourcery.com>
10995
10996 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10997 conditions in gdbserver.
10998
d2ed6730
UW
109992010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11000
11001 * spu-low.c (spu_read_memory): Wrap around local store limit.
11002 (spu_write_memory): Likewise.
11003
4e29fb54
PA
110042010-06-15 Pedro Alves <pedro@codesourcery.com>
11005
11006 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11007 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11008 LONGEST uses.
11009 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11010 uses.
11011 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11012 uses with LONGEST uses.
11013
6a271cae
PA
110142010-06-14 Stan Shebs <stan@codesourcery.com>
11015 Pedro Alves <pedro@codesourcery.com>
11016
11017 Bytecode compiler.
11018
11019 * linux-x86-low.c: Include limits.h.
11020 (add_insns): New.
11021 (always_true): New.
11022 (EMIT_ASM): New.
11023 (EMIT_ASM32): New.
11024 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11025 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11026 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11027 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11028 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11029 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11030 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11031 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11032 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11033 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11034 (amd64_emit_void_call_2): New.
11035 (amd64_emit_ops): New.
11036 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11037 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11038 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11039 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11040 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11041 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11042 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11043 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11044 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11045 (i386_emit_stack_adjust, i386_emit_int_call_1)
11046 (i386_emit_void_call_2): New.
11047 (i386_emit_ops): New.
11048 (x86_emit_ops): New.
11049 (the_low_target): Install x86_emit_ops.
11050 * server.h (struct emit_ops): New.
11051 (get_raw_reg_func_addr): Declare.
11052 (current_insn_ptr, emit_error): Declare.
11053 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11054 (set_trace_state_variable_value): New defines.
11055 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11056 addr_get_trace_state_variable_value and
11057 addr_set_trace_state_variable_value.
11058 (symbol_list): New fields for get_raw_reg,
11059 get_trace_state_variable_value and set_trace_state_variable_value.
11060 (condfn): New typedef.
11061 (struct tracepoint): New field `compiled_cond'.
11062 (do_action_at_tracepoint): Clear compiled_cond.
11063 (get_trace_state_variable_value, set_trace_state_variable_value):
11064 Export in the IPA.
11065 (condition_true_at_tracepoint): If there's a compiled condition,
11066 run that.
11067 (current_insn_ptr, emit_error): New globals.
11068 (struct bytecode_address): New.
11069 (get_raw_reg_func_addr): New.
11070 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11071 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11072 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11073 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11074 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11075 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11076 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11077 (compile_tracepoint_condition, compile_bytecodes): New.
11078 * target.h (emit_ops): Forward declare.
11079 (struct target_ops): New field emit_ops.
11080 (target_emit_ops): New.
11081 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11082 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11083 * linux-low.c (linux_emit_ops): New.
11084 (linux_target_ops): Install it.
11085 * linux-low.h (struct linux_target_ops): New field emit_ops.
11086
92b72907
UW
110872010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11088
11089 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11090 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11091
fa593d66
PA
110922010-06-01 Pedro Alves <pedro@codesourcery.com>
11093 Stan Shebs <stan@codesourcery.com>
11094
11095 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11096 (all): Depend on $(extra_libraries).
11097 (install-only): Install the IPA.
11098 (IPA_OBJS, IPA_LIB): New.
11099 (clean): Remove the IPA lib.
11100 (IPAGENT_CFLAGS): New.
11101 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11102 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11103 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11104 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11105 * configure.ac: Check for atomic builtins support in the compiler.
11106 (IPA_DEPFILES, extra_libraries): Define.
11107 * configure.srv (ipa_obj): Add description.
11108 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11109 (i[34567]86-*-linux*): Set ipa_obj.
11110 (x86_64-*-linux*): Set ipa_obj.
11111 * linux-low.c (stabilizing_threads): New.
11112 (supports_fast_tracepoints): New.
11113 (linux_detach): Stabilize threads before detaching.
11114 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11115 the lwp is either not stabilizing, or is moving out of a jump pad.
11116 (linux_fast_tracepoint_collecting): New.
11117 (maybe_move_out_of_jump_pad): New.
11118 (enqueue_one_deferred_signal): New.
11119 (dequeue_one_deferred_signal): New.
11120 (linux_wait_for_event_1): If moving out of a jump pad, defer
11121 pending signals to later.
11122 (linux_stabilize_threads): New.
11123 (linux_wait_1): Check if threads need moving out of jump pads, and
11124 do it if so.
11125 (stuck_in_jump_pad_callback): New.
11126 (move_out_of_jump_pad_callback): New.
11127 (lwp_running): New.
11128 (linux_resume_one_lwp): Handle moving out of jump pads.
11129 (linux_set_resume_request): Dequeue deferred signals.
11130 (need_step_over_p): Also step over fast tracepoint jumps.
11131 (start_step_over): Also uninsert fast tracepoint jumps.
11132 (finish_step_over): Also reinsert fast tracepoint jumps.
11133 (linux_install_fast_tracepoint_jump): New.
11134 (linux_target_ops): Install linux_stabilize_threads and
11135 linux_install_fast_tracepoint_jump_pad.
11136 * linux-low.h (linux_target_ops) <get_thread_area,
11137 install_fast_tracepoint_jump_pad>: New fields.
11138 (struct lwp_info) <collecting_fast_tracepoint,
11139 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11140 (linux_get_thread_area): Declare.
11141 * linux-x86-low.c (jump_insn): New.
11142 (x86_get_thread_area): New.
11143 (append_insns): New.
11144 (push_opcode): New.
11145 (amd64_install_fast_tracepoint_jump_pad): New.
11146 (i386_install_fast_tracepoint_jump_pad): New.
11147 (x86_install_fast_tracepoint_jump_pad): New.
11148 (the_low_target): Install x86_get_thread_area and
11149 x86_install_fast_tracepoint_jump_pad.
11150 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11151 (struct fast_tracepoint_jump): New.
11152 (fast_tracepoint_jump_insn): New.
11153 (fast_tracepoint_jump_shadow): New.
11154 (find_fast_tracepoint_jump_at): New.
11155 (fast_tracepoint_jump_here): New.
11156 (delete_fast_tracepoint_jump): New.
11157 (set_fast_tracepoint_jump): New.
11158 (uninsert_fast_tracepoint_jumps_at): New.
11159 (reinsert_fast_tracepoint_jumps_at): New.
11160 (set_breakpoint_at): Use write_inferior_memory.
11161 (uninsert_raw_breakpoint): Use write_inferior_memory.
11162 (check_mem_read): Mask out fast tracepoint jumps.
11163 (check_mem_write): Mask out fast tracepoint jumps.
11164 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11165 (set_fast_tracepoint_jump): Declare.
11166 (delete_fast_tracepoint_jump)
11167 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11168 (reinsert_fast_tracepoint_jumps_at): Declare.
11169 * regcache.c: Don't compile many functions when building the
11170 in-process agent library.
11171 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11172 the register buffer in the heap.
11173 (free_register_cache): If the register buffer isn't owned by the
11174 regcache, don't free it.
11175 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11176 pre-existing register caches.
11177 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11178 type.
11179 (convert_ascii_to_int): : Constify `from' parameter type.
11180 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11181 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11182 the needed buffer in-place.
11183 (relocate_instruction): New.
11184 * server.c (handle_query) <qSymbols>: If the target supports
11185 tracepoints, give it a chance of looking up symbols. Report
11186 support for fast tracepoints.
11187 (handle_status): Stabilize threads.
11188 (process_serial_event): Adjust.
11189 * server.h (struct fast_tracepoint_jump): Forward declare.
11190 (struct process_info) <fast_tracepoint_jumps>: New field.
11191 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11192 (decode_X_packet, decode_M_packet): Adjust.
11193 (relocate_instruction): Declare.
11194 (in_process_agent_loaded): Declare.
11195 (tracepoint_look_up_symbols): Declare.
11196 (struct fast_tpoint_collect_status): Declare.
11197 (fast_tracepoint_collecting): Declare.
11198 (force_unlock_trace_buffer): Declare.
11199 (handle_tracepoint_bkpts): Declare.
11200 (initialize_low_tracepoint)
11201 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11202 * target.h (struct target_ops) <stabilize_threads,
11203 install_fast_tracepoint_jump_pad>: New fields.
11204 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11205 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11206 [HAVE_STDINT_H]: Include stdint.h.
11207 (trace_debug_1): Rename to ...
11208 (trace_vdebug): ... this.
11209 (trace_debug): Rename to ...
11210 (trace_debug_1): ... this. Add `level' parameter.
11211 (trace_debug): New.
11212 (ATTR_USED, ATTR_NOINLINE): New.
11213 (IP_AGENT_EXPORT): New.
11214 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11215 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11216 (about_to_request_buffer_space, trace_buffer_is_full)
11217 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11218 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11219 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11220 (traceframe_write_count, traceframes_created)
11221 (trace_state_variables)
11222 New renaming defines.
11223 (struct ipa_sym_addresses): New.
11224 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11225 (symbol_list): New.
11226 (ipa_sym_addrs): New.
11227 (all_tracepoint_symbols_looked_up): New.
11228 (in_process_agent_loaded): New.
11229 (write_e_ipa_not_loaded): New.
11230 (maybe_write_ipa_not_loaded): New.
11231 (tracepoint_look_up_symbols): New.
11232 (debug_threads) [IN_PROCESS_AGENT]: New.
11233 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11234 (UNKNOWN_SIDE_EFFECTS): New.
11235 (stop_tracing): New.
11236 (flush_trace_buffer): New.
11237 (stop_tracing_bkpt): New.
11238 (flush_trace_buffer_bkpt): New.
11239 (read_inferior_integer): New.
11240 (read_inferior_uinteger): New.
11241 (read_inferior_data_pointer): New.
11242 (write_inferior_data_pointer): New.
11243 (write_inferior_integer): New.
11244 (write_inferior_uinteger): New.
11245 (struct collect_static_trace_data_action): Delete.
11246 (enum tracepoint_type): New.
11247 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11248 <actions_str, step_actions, step_actions_str>: Only include in
11249 GDBserver.
fa593d66
PA
11250 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11251 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11252 (tracepoints): Use IP_AGENT_EXPORT.
11253 (last_tracepoint): Don't include in the IPA.
11254 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11255 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11256 (alloced_trace_state_variables): New.
11257 (trace_state_variables): Use IP_AGENT_EXPORT.
11258 (traceframe_t): Delete unused variable.
11259 (circular_trace_buffer): Don't include in the IPA.
11260 (trace_buffer_start): Delete.
11261 (struct trace_buffer_control): New.
11262 (trace_buffer_free): Delete.
11263 (struct ipa_trace_buffer_control): New.
11264 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11265 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11266 New.
11267 (trace_buffer_ctrl): New.
11268 (TRACE_BUFFER_CTRL_CURR): New.
11269 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11270 Reimplement as macros.
11271 (trace_buffer_wrap): Delete.
11272 (traceframe_write_count, traceframe_read_count)
11273 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11274 (struct tracepoint_hit_ctx) <type>: New field.
11275 (struct fast_tracepoint_ctx): New.
11276 (memory_barrier): New.
11277 (cmpxchg): New.
11278 (record_tracepoint_error): Update atomically in the IPA.
11279 (clear_inferior_trace_buffer): New.
11280 (about_to_request_buffer_space): New.
11281 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11282 updating the same buffer.
11283 (add_tracepoint): Default the tracepoint's type to trap
11284 tracepoint, and orig_size to -1.
11285 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11286 internal variables.
11287 (create_trace_state_variable): New parameter `gdb'. Handle it.
11288 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11289 (cmd_qtdp): Handle fast tracepoints.
11290 (cmd_qtdv): Adjust.
11291 (max_jump_pad_size): New.
11292 (gdb_jump_pad_head): New.
11293 (get_jump_space_head): New.
11294 (claim_jump_space): New.
11295 (sort_tracepoints): New.
11296 (MAX_JUMP_SIZE): New.
11297 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11298 IPA.
11299 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11300 support. Upload fast traceframes, and delete internal IPA
11301 breakpoints.
11302 (stop_tracing_handler): New.
11303 (flush_trace_buffer_handler): New.
11304 (cmd_qtstop): Upload fast tracepoints.
11305 (response_tracepoint): Handle fast tracepoints.
11306 (tracepoint_finished_step): Upload fast traceframes. Set the
11307 tracepoint hit context's tracepoint type.
11308 (handle_tracepoint_bkpts): New.
11309 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11310 type. Add comment about fast tracepoints.
11311 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11312 non-existing action_str field.
11313 (get_context_regcache): Handle fast tracepoints.
11314 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11315 to the regcache.
11316 (fast_tracepoint_from_jump_pad_address): New.
11317 (fast_tracepoint_from_ipa_tpoint_address): New.
11318 (collecting_t): New.
11319 (force_unlock_trace_buffer): New.
11320 (fast_tracepoint_collecting): New.
11321 (collecting): New.
11322 (gdb_collect): New.
11323 (write_inferior_data_ptr): New.
11324 (target_tp_heap): New.
11325 (target_malloc): New.
11326 (download_agent_expr): New.
11327 (UALIGN): New.
11328 (download_tracepoints): New.
11329 (download_trace_state_variables): New.
11330 (upload_fast_traceframes): New.
11331 (IPA_FIRST_TRACEFRAME): New.
11332 (IPA_NEXT_TRACEFRAME_1): New.
11333 (IPA_NEXT_TRACEFRAME): New.
11334 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11335 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11336 (gdb_jump_pad_buffer_end): New.
11337 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11338 (initialize_tracepoint): Adjust.
11339 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11340 buffer. Initialize the low module.
11341 * utils.c (PREFIX, TOOLNAME): New.
11342 (malloc_failure): Use PREFIX.
11343 (error): In the IPA, an error causes an exit.
11344 (fatal, warning): Use PREFIX.
11345 (internal_error): Use TOOLNAME.
11346 (NUMCELLS): Increase to 10.
11347 * configure, config.in: Regenerate.
11348
d149dd1d
PA
113492010-06-01 Pedro Alves <pedro@codesourcery.com>
11350
11351 * server.c (handle_query) <qSupported>: Do two passes over the
11352 qSupported string to avoid nesting strtok.
11353
f6528abd
JK
113542010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11355
11356 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11357 (CDEPS): New.
11358 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11359 -Wl,--dynamic-list.
11360 * configure: Regenerate.
11361 * proc-service.list: New.
11362
ca2a87a0
JK
113632010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11364
11365 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11366 New comment.
11367
363a6e9f
OS
113682010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11369
11370 * gdbreplay.c (remote_open): Check error return from socket() call by
11371 its equality to -1 not by it being negative.
11372 * remote-utils.c (remote_open): Likewise.
11373
d23b6cb1
PA
113742010-05-23 Pedro Alves <pedro@codesourcery.com>
11375
11376 * config.h: Regenerate.
11377
28d3cf85
MK
113782010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11379
11380 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11381 doesn't provide PTRACE_GET_THREAD_AREA.
11382
fea36a59
MK
113832010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11384
11385 * linux-m68k-low.c: Include <asm/ptrace.h>
11386 (ps_get_thread_area): Implement.
11387
24b066ba
DE
113882010-05-03 Doug Evans <dje@google.com>
11389
11390 * event-loop.c (struct callback_event): New struct.
11391 (callback_list): New global.
11392 (append_callback_event, delete_callback_event): New functions.
11393 (process_callback): New function.
11394 (start_event_loop): Call it.
11395 * remote-utils.c (NOT_SCHEDULED): Define.
11396 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11397 moved out of readchar.
11398 (readchar): Rewrite. Call reschedule before returning.
11399 (reset_readchar): New function.
11400 (remote_close): Call it.
11401 (process_remaining, reschedule): New functions.
11402 * server.h (callback_handler_func): New typedef.
11403 (append_callback_event, delete_callback_event): Declare.
11404
9836d6ea
PA
114052010-05-03 Pedro Alves <pedro@codesourcery.com>
11406
11407 * proc-service.c (ps_pglobal_lookup): Use
11408 thread_db_look_up_one_symbol.
11409 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11410 parameter. Use it instead of all_symbols_looked_up.
11411 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11412 field.
11413 (all_symbols_looked_up): Don't declare.
11414 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11415 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11416 field.
11417 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11418 Set all_symbols_looked_up here.
11419 (thread_db_look_up_one_symbol): New.
11420 (thread_db_get_tls_address): Adjust.
11421 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11422 thread_db object on the heap, and tentatively set it in the
11423 process structure.
11424 (thread_db_init): Don't set all_symbols_looked_up here.
11425 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11426
7984d532
PA
114272010-05-03 Pedro Alves <pedro@codesourcery.com>
11428
11429 * linux-low.c (linux_kill, linux_detach): Adjust.
11430 (status_pending_p_callback): Remove redundant statement. Check
11431 for !TARGET_WAITIKIND_IGNORE, instead of
11432 TARGET_WAITKIND_STOPPED.
11433 (handle_tracepoints): Make sure LWP is locked. Adjust.
11434 (linux_wait_for_event_1): Adjust.
11435 (linux_cancel_breakpoints): New.
11436 (unsuspend_one_lwp): New.
11437 (unsuspend_all_lwps): New.
11438 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11439 (send_sigstop_callback): Change return type to int, add new
11440 `except' parameter and handle it.
11441 (suspend_and_send_sigstop_callback): New.
11442 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11443 pass them down. If SUSPEND, also increment the lwp's suspend
11444 count.
11445 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11446 (need_step_over_p): Don't consider suspended LWPs.
11447 (start_step_over): Adjust.
11448 (proceed_one_lwp): Change return type to int, add new `except'
11449 parameter and handle it.
11450 (unsuspend_and_proceed_one_lwp): New.
11451 (proceed_all_lwps): Use find_inferior instead of
11452 for_each_inferior.
11453 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11454 also decrement the suspend count of LWPs. Pass `except' down,
11455 instead of hacking its suspend count.
11456 (linux_pause_all): Add `freeze' parameter. Adjust.
11457 (linux_unpause_all): New.
11458 (linux_target_ops): Install linux_unpause_all.
11459 * server.c (handle_status): Adjust.
11460 * target.h (struct target_ops): New fields `unpause_all' and
11461 `cancel_breakpoints'. Add new parameter to `pause_all'.
11462 (pause_all): Add new `freeze' parameter.
11463 (unpause_all): New.
11464 (cancel_breakpoints): New.
11465 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11466 cancel breakpoints.
11467 (cmd_qtstart): Pause threads.
11468 (stop_tracing): Pause threads, and cancel breakpoints.
11469 * win32-low.c (win32_target_ops): Adjust.
11470
e471f25b
PA
114712010-05-03 Pedro Alves <pedro@codesourcery.com>
11472
11473 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11474 the inferior right away from here...
11475 (linux_wait_1): ... to here, and adjust to check the thread's
11476 last_resume_kind instead of the lwp's step or stop_expected flags.
11477
1915ef4f
PA
114782010-05-02 Pedro Alves <pedro@codesourcery.com>
11479
11480 * README: Use consistent `GDB' and `GDBserver' spellings.
11481
f9e39928
PA
114822010-05-02 Pedro Alves <pedro@codesourcery.com>
11483
11484 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11485 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11486 (linux_detach_one_lwp): Assume the lwp is stopped.
11487 (any_thread_of): Delete.
11488 (linux_detach): Stop all lwps here. Don't blindly delete all
11489 breakpoints.
11490 (delete_lwp_callback): New.
11491 (linux_mourn): Delete all lwps of the process that is gone.
11492 (linux_wait_1): Don't delete the last lwp of the process here.
11493 * mem-break.h (mark_breakpoints_out): Declare.
11494 * mem-break.c (mark_breakpoints_out): New.
11495 (free_all_breakpoints): Use it.
11496 * server.c (handle_target_event): If the process is gone, mark
11497 breakpoints out.
11498 * thread-db.c (struct thread_db) <create_bp>: New field.
11499 (thread_db_enable_reporting): Fix prototype. Store a thread event
11500 breakpoint reference in the thread_db struct.
11501 (thread_db_load_search): Clear the thread_db object.
11502 (try_thread_db_load_1): Ditto.
11503 (switch_to_process): New.
11504 (disable_thread_event_reporting): Use it.
11505 (remove_thread_event_breakpoints): New.
11506 (thread_db_detach, thread_db_mourn): Use it.
11507
1e7fc18c
PA
115082010-05-01 Pedro Alves <pedro@codesourcery.com>
11509
11510 * linux-low.c (linux_enable_event_reporting): New.
11511 (linux_wait_for_event_1, handle_extended_wait): Use it.
11512
02fc4de7
PA
115132010-04-30 Pedro Alves <pedro@codesourcery.com>
11514
11515 * linux-low.c (linux_kill_one_lwp, linux_kill)
11516 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11517 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11518 SIGSTOP even if the LWP is stopped.
11519 (send_sigstop_callback): New.
11520 (stop_all_lwps): Use send_sigstop_callback instead.
11521 (linux_resume_one_thread): Adjust.
11522 (proceed_one_lwp): Still proceed an LWP that the client has
11523 requested to stop, if we haven't reported it as stopped yet. Make
11524 sure that LWPs the client want stopped, have a pending SIGSTOP.
11525
bc3b5632
DE
115262010-04-26 Doug Evans <dje@google.com>
11527
ae1ada35
DE
11528 * server.c (handle_general_set): Make static.
11529
bc3b5632
DE
11530 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11531 Print received char after testing for error/eof instead of before.
11532 (input_interrupt): Tweak comment.
11533
65730243
DE
115342010-04-23 Doug Evans <dje@google.com>
11535
11536 * server.c (start_inferior): Print inferior argv if --debug.
11537
a8ae7dc0
AR
115382010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11539
11540 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11541 * nto-x86-low.c: Include server.h
11542
1c07cc19
PM
115432010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11544
11545 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11546 be consistent with other sources of this directory.
11547 (init_registers_amd64): Correct name of source file of this function
11548 in the comment.
11549
e0a61e09
PM
115502010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11551
11552 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11553 64-bit executables.
11554
54709339
PM
115552010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11556
11557 * win32-i386-low.c: Add 64-bit support.
11558 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11559 (init_registers_amd64): Declare.
11560 (mappings): Add 64-bit version of array.
11561 (init_windows_x86): New function.
11562 (the_low_target): Change init_arch field to init_windows_x86.
11563
e8f0053d
PM
115642010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11565
11566 * win32-low.c: Adapt to support also 64-bit architecture.
11567 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11568 (get_image_name): Use SIZE_T type for local variable `done'.
11569 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11570 (toolhelp_get_dll_name): Idem.
11571 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11572 Use uintptr_t typecast to avoid warning.
11573 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11574 (handle_exception): Use phex_nz to avoid warning.
11575 (win32_wait): Remove unused local variable `process'.
11576
c481e77e
PM
115772010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11578
11579 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11580 `amd64-avx.o'.
11581
12ea4b69
PM
115822010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11583
11584 * configure.ac: Use `ws2_32' library for srv_mingw.
11585 * configure: Regenerate.
11586 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11587 * remote-utils.c: Likewise.
11588
f6d1620c
L
115892010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11590
11591 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11592 if __x86_64__ is defined.
11593
8e642873
PM
115942010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11595
11596 * configure: Regenerate.
11597
711e434b
PM
115982010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11599
11600 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11601 * target.h (target_ops): New get_tib_address field.
11602 * win32-low.h (win32_thread_info): Add thread_local_base field.
11603 * win32-low.c (child_add_thread): Add tlb argument.
11604 Set thread_local_base field to TLB.
11605 (get_child_debug_event): Adapt to child_add_thread change.
11606 (win32_get_tib_address): New function.
11607 (win32_target_ops): Set get_tib_address field to
11608 win32_get_tib_address.
11609 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11610
505106cd
PA
116112010-04-12 Pedro Alves <pedro@codesourcery.com>
11612
505106cd
PA
11613 * linux-low.c (linux_mourn): Also remove the process.
11614 * server.c (handle_target_event): Don't remove the process here.
11615 * nto-low.c (nto_mourn): New.
11616 (nto_target_ops): Install it.
11617 * spu-low.c (spu_mourn): New.
11618 (spu_target_ops): Install it.
11619 * win32-low.c (win32_mourn): New.
11620 (win32_target_ops): Install it.
11621
e8470a06
PA
116222010-04-12 Pedro Alves <pedro@codesourcery.com>
11623
11624 * server.h (buffer_xml_printf): Remove redundant `;'.
11625
45ba0d02
PA
116262010-04-12 Pedro Alves <pedro@codesourcery.com>
11627
11628 * regcache.c (set_register_cache): Invalidate regcaches before
11629 changing the register cache layout.
11630 (regcache_invalidate_one): Allow a NULL regcache.
11631 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11632 regcaches before changing the register cache layout or the target
11633 regsets.
11634
59e04013
L
116352010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11636
11637 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11638 variable warning on Linux/x86-64.
11639
8336d594
PA
116402010-04-11 Pedro Alves <pedro@codesourcery.com>
11641
11642 GDBserver disconnected tracing support.
11643
11644 * linux-low.c (linux_remove_process): Delete.
11645 (add_lwp): Don't set last_resume_kind here.
11646 (linux_kill): Use `mourn'.
11647 (linux_detach): Use `thread_db_detach', and `mourn'.
11648 (linux_mourn): New.
11649 (linux_attach_lwp_1): Adjust comment.
11650 (linux_attach): last_resume_kind moved the thread_info; adjust.
11651 (status_pending_p_callback): Adjust.
11652 (linux_wait_for_event_1): Adjust.
11653 (count_events_callback, select_singlestep_lwp_callback)
11654 (select_event_lwp_callback, cancel_breakpoints_callback)
11655 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11656 (proceed_one_lwp): Adjust.
11657 (linux_async): Add debug output.
11658 (linux_thread_stopped): New.
11659 (linux_pause_all): New.
11660 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11661 linux_pause_all.
11662 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11663 (thread_db_free): Delete declaration.
11664 (thread_db_detach, thread_db_mourn): Declare.
11665 * thread-db.c (thread_db_init): Use thread_db_mourn.
11666 (thread_db_free): Delete, split in two.
11667 (disable_thread_event_reporting): New.
11668 (thread_db_detach): New.
11669 (thread_db_mourn): New.
11670
11671 * server.h (struct thread_info) <last_resume_kind>: New field.
11672 <attached>: Add comment.
11673 <gdb_detached>: New field.
11674 (handler_func): Change return type to int.
11675 (handle_serial_event, handle_target_event): Ditto.
11676 (gdb_connected): Declare.
11677 (tracing): Delete.
11678 (disconnected_tracing): Declare.
11679 (stop_tracing): Declare.
11680
11681 * server.c (handle_query) <qSupported>: Report support for
11682 disconnected tracing.
11683 (queue_stop_reply_callback): Account for running threads.
11684 (gdb_wants_thread_stopped): New.
11685 (gdb_wants_all_threads_stopped): New.
11686 (gdb_reattached_process): New.
11687 (handle_status): Clear the `gdb_detached' flag of all processes.
11688 In all-stop, stop all threads.
11689 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11690 (process_serial_event): If the remote connection breaks, or if an
11691 exit was forced with "monitor exit", force an event loop exit.
11692 Handle disconnected tracing on detach.
11693 (handle_serial_event): Adjust.
11694 (handle_target_event): If GDB isn't connected, forward events back
11695 to the inferior, unless the last process exited, in which case,
11696 exit gdbserver. Adjust interface.
11697
11698 * remote-utils.c (remote_open): Don't block in accept. Instead
11699 register an event loop source on the listen socket file
11700 descriptor. Refactor bits into ...
11701 (listen_desc): ... this new global.
11702 (gdb_connected): ... this new function.
11703 (enable_async_notification): ... this new function.
11704 (handle_accept_event): ... this new function.
11705 (remote_close): Clear remote_desc.
11706
11707 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11708
11709 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11710 New fields.
11711 (mourn_inferior): Define.
11712 (target_process_qsupported): Avoid the dangling else problem.
11713 (thread_stopped): Define.
11714 (pause_all): Define.
11715 (target_waitstatus_to_string): Declare.
11716 * target.c (target_waitstatus_to_string): New.
11717
11718 * tracepoint.c (tracing): Make extern.
11719 (disconnected_tracing): New.
11720 (stop_tracing): Make extern. Handle tracing stops due to GDB
11721 disconnecting.
11722 (cmd_qtdisconnected): New.
11723 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11724 (handle_tracepoint_general_set): Handle QTDisconnected.
11725
11726 * event-loop.c (event_handler_func): Change return type to int.
11727 (process_event): Bail out if the event handler wants the event
11728 loop to stop.
11729 (handle_file_event): Ditto.
11730 (start_event_loop): Bail out if the event handler wants the event
11731 loop to stop.
11732
11733 * nto-low.c (nto_target_ops): Adjust.
11734 * spu-low.c (spu_wait): Don't remove the process here.
11735 (spu_target_ops): Adjust.
11736 * win32-low.c (win32_wait): Don't remove the process here.
11737 (win32_target_ops): Adjust.
11738
5d267c4c
PA
117392010-04-11 Pedro Alves <pedro@codesourcery.com>
11740
11741 * regcache.c (realloc_register_cache): Invalidate inferior's
11742 regcache before recreating it.
11743
623ccd72
PA
117442010-04-09 Pedro Alves <pedro@codesourcery.com>
11745
11746 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11747
219f2f23
PA
117482010-04-09 Stan Shebs <stan@codesourcery.com>
11749 Pedro Alves <pedro@codesourcery.com>
11750
11751 * server.h (LONGEST): New.
11752 (struct thread_info) <while_stepping>: New field.
11753 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11754 Declare.
11755 (initialize_tracepoint, handle_tracepoint_general_set)
11756 (handle_tracepoint_query, tracepoint_finished_step)
11757 (tracepoint_was_hit, release_while_stepping_state_list):
11758 (current_traceframe): Declare.
11759 * server.c (handle_general_set): Handle tracepoint packets.
11760 (read_memory): New.
11761 (write_memory): New.
11762 (handle_search_memory_1): Use read_memory.
11763 (handle_query): Report support for conditional tracepoints, trace
11764 state variables, and tracepoint sources. Handle tracepoint
11765 queries.
11766 (main): Initialize the tracepoints module.
11767 (process_serial_event): Handle traceframe reads/writes.
11768
11769 * linux-low.c (handle_tracepoints): New.
11770 (linux_wait_1): Call it.
11771 (linux_resume_one_lwp): Handle while-stepping.
11772 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11773 (linux_target_ops): Install them.
11774 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11775 New field.
11776 * linux-x86-low.c (x86_supports_tracepoints): New.
11777 (the_low_target). Install it.
11778
11779 * mem-break.h (delete_breakpoint): Declare.
11780 * mem-break.c (delete_breakpoint): Make external.
11781
11782 * target.h (struct target_ops): Add `supports_tracepoints',
11783 `read_pc', and `write_pc' fields.
11784 (target_supports_tracepoints): Define.
11785 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11786 (phex_nz): New.
11787
11788 * regcache.h (struct regcache) <registers_owned>: New field.
11789 (init_register_cache, regcache_cpy): Declare.
11790 (regcache_read_pc, regcache_write_pc): Declare.
11791 (register_cache_size): Declare.
11792 (supply_regblock): Declare.
11793 * regcache.c (init_register_cache): New.
11794 (new_register_cache): Use it.
11795 (regcache_cpy): New.
11796 (register_cache_size): New.
11797 (supply_regblock): New.
11798 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11799
219f2f23
PA
11800 * tracepoint.c: New.
11801
11802 * Makefile.in (OBS): Add tracepoint.o.
11803 (tracepoint.o): New rule.
11804
3a13a53b
L
118052010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11806
11807 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11808 (i386-mmx.o): New.
11809 (i386-mmx.c): Likewise.
11810 (i386-mmx-linux.o): Likewise.
11811 (i386-mmx-linux.c): Likewise.
11812
11813 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11814 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11815 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11816 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11817
11818 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11819 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11820 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11821
1570b33e
L
118222010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11823
11824 * Makefile.in (clean): Updated.
11825 (i386-avx.o): New.
11826 (i386-avx.c): Likewise.
11827 (i386-avx-linux.o): Likewise.
11828 (i386-avx-linux.c): Likewise.
11829 (amd64-avx.o): Likewise.
11830 (amd64-avx.c): Likewise.
11831 (amd64-avx-linux.o): Likewise.
11832 (amd64-avx-linux.c): Likewise.
11833
11834 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11835 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11836 (srv_amd64_regobj): Add amd64-avx.o.
11837 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11838 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11839 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11840 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11841 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11842 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11843 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11844
11845 * i387-fp.c: Include "i386-xstate.h".
11846 (i387_xsave): New.
11847 (i387_cache_to_xsave): Likewise.
11848 (i387_xsave_to_cache): Likewise.
11849 (x86_xcr0): Likewise.
11850
11851 * i387-fp.h (i387_cache_to_xsave): Likewise.
11852 (i387_xsave_to_cache): Likewise.
11853 (x86_xcr0): Likewise.
11854
11855 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11856 * linux-crisv32-low.c (target_regsets): Likewise.
11857 * linux-m68k-low.c (target_regsets): Likewise.
11858 * linux-mips-low.c (target_regsets): Likewise.
11859 * linux-ppc-low.c (target_regsets): Likewise.
11860 * linux-s390-low.c (target_regsets): Likewise.
11861 * linux-sh-low.c (target_regsets): Likewise.
11862 * linux-sparc-low.c (target_regsets): Likewise.
11863 * linux-xtensa-low.c (target_regsets): Likewise.
11864
11865 * linux-low.c: Include <sys/uio.h>.
11866 (regsets_fetch_inferior_registers): Support nt_type.
11867 (regsets_store_inferior_registers): Likewise.
11868 (linux_process_qsupported): New.
11869 (linux_target_ops): Add linux_process_qsupported.
11870
11871 * linux-low.h (regset_info): Add nt_type.
11872 (linux_target_ops): Add process_qsupported.
11873
11874 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11875 and <sys/uio.h>.
11876 (init_registers_i386_avx_linux): New.
11877 (init_registers_amd64_avx_linux): Likewise.
11878 (xmltarget_i386_linux_no_xml): Likewise.
11879 (xmltarget_amd64_linux_no_xml): Likewise.
11880 (PTRACE_GETREGSET): Likewise.
11881 (PTRACE_SETREGSET): Likewise.
11882 (x86_fill_xstateregset): Likewise.
11883 (x86_store_xstateregset): Likewise.
11884 (use_xml): Likewise.
11885 (x86_linux_update_xmltarget): Likewise.
11886 (x86_linux_process_qsupported): Likewise.
11887 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11888 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11889 init_registers_i386_linux here. Call
11890 x86_linux_update_xmltarget.
11891 (the_low_target): Add x86_linux_process_qsupported.
11892
11893 * server.c (handle_query): Call target_process_qsupported.
11894
11895 * target.h (target_ops): Add process_qsupported.
11896 (target_process_qsupported): New.
11897
fc7238bb
PA
118982010-04-03 Pedro Alves <pedro@codesourcery.com>
11899
11900 * inferiors.c (add_thread): Set last_status kind to
11901 TARGET_WAITKIND_IGNORE.
11902 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11903 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11904 (linux_wait_1): Move `thread' local definition to block that uses
11905 it. Don't NULL initialize `event_child'.
11906 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11907 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11908 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11909
bdabb078
PA
119102010-04-01 Pedro Alves <pedro@codesourcery.com>
11911
11912 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11913 an extended waitstatus, or by a watchpoint.
11914 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11915 thread was stepping or has been stopped by a watchpoint.
11916
d3bbe7a0
PA
119172010-04-01 Pedro Alves <pedro@codesourcery.com>
11918
11919 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11920 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11921 of another, then delete the previous, and validate all
11922 breakpoints.
11923 (validate_inserted_breakpoint): New.
11924 (delete_disabled_breakpoints): New.
11925 (validate_breakpoints): New.
11926 (check_mem_read): Validate breakpoints before trusting their
11927 shadow. Delete disabled breakpoints.
11928 (check_mem_write): Validate breakpoints before trusting they
11929 should be inserted. Delete disabled breakpoints.
11930 * mem-break.h (validate_breakpoints):
11931 * server.c (handle_query): Validate breakpoints when we see a
11932 qSymbol query.
11933
8b07ae33
PA
119342010-04-01 Pedro Alves <pedro@codesourcery.com>
11935
11936 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11937 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11938 if we could tell there's a GDB breakpoint at stop_pc.
11939 (need_step_over_p): Don't do a step over if we find a GDB
11940 breakpoint at the resume PC.
11941
11942 * mem-break.c (struct raw_breakpoint): New.
11943 (enum bkpt_type): New type `gdb_breakpoint'.
11944 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11945 fields. New field `raw'.
11946 (find_raw_breakpoint_at): New.
11947 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11948 breakpoint instead.
11949 (set_breakpoint_at): Adjust.
11950 (delete_raw_breakpoint): New.
11951 (release_breakpoint): New.
11952 (delete_breakpoint): Rename to...
11953 (delete_breakpoint_1): ... this. Add proc parameter. Use
11954 release_breakpoint. Return ENOENT.
11955 (delete_breakpoint): Reimplement.
11956 (find_breakpoint_at): Delete.
11957 (find_gdb_breakpoint_at): New.
11958 (delete_breakpoint_at): Delete.
11959 (set_gdb_breakpoint_at): New.
11960 (delete_gdb_breakpoint_at): New.
11961 (gdb_breakpoint_here): New.
11962 (set_reinsert_breakpoint): Use release_breakpoint.
11963 (uninsert_breakpoint): Rename to ...
11964 (uninsert_raw_breakpoint): ... this.
11965 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11966 (reinsert_raw_breakpoint): Change parameter type to
11967 raw_breakpoint.
11968 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11969 instead.
11970 (check_breakpoints): Adjust. Use release_breakpoint.
11971 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11972 (breakpoint_inserted_here): Ditto.
11973 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11974 Don't trust the breakpoint's shadow if it is not inserted.
11975 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11976 (delete_all_breakpoints): Adjust.
11977 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11978 use delete_breakpoint_1.
11979
11980 * mem-break.h (breakpoints_supported): Delete declaration.
11981 (set_gdb_breakpoint_at): Declare.
11982 (gdb_breakpoint_here): Declare.
11983 (delete_breakpoint_at): Delete.
11984 (delete_gdb_breakpoint_at): Declare.
11985
11986 * server.h (struct raw_breakpoint): Forward declare.
11987 (struct process_info): New field `raw_breakpoints'.
11988
11989 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11990 breakpoints.
11991
6bf5e0ba
PA
119922010-03-24 Pedro Alves <pedro@codesourcery.com>
11993
11994 * linux-low.c (status_pending_p_callback): Fix comment.
11995 (linux_wait_for_event_1): Move most of the internal breakpoint
11996 handling from here...
11997 (linux_wait_1): ... to here.
11998 (count_events_callback): New.
11999 (select_singlestep_lwp_callback): New.
12000 (select_event_lwp_callback): New.
12001 (cancel_breakpoints_callback): New.
12002 (select_event_lwp): New.
12003 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12004 priority to all LWPs that have had events that should be reported
12005 to the client. Cancel breakpoints when about to reporting the
12006 event to the client, not while stopping lwps. No longer cancel
12007 finished single-steps here.
12008 (cancel_finished_single_step): Delete.
12009 (cancel_finished_single_steps): Delete.
12010
414a389f
PA
120112010-03-24 Pedro Alves <pedro@codesourcery.com>
12012
12013 * mem-break.c (enum bkpt_type): New.
12014 (struct breakpoint): New field `type'.
12015 (set_breakpoint_at): Change return type to struct breakpoint
12016 pointer. Set type to `other_breakpoint' by default.
12017 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12018 in the breakpoint list.
12019 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12020 (reinsert_breakpoint): Rename to ...
12021 (reinsert_raw_breakpoint): ... this.
12022 (reinsert_breakpoints_at): Adjust.
12023 * mem-break.h (struct breakpoint): Declare.
12024 (set_breakpoint_at): Change return type to struct breakpoint
12025 pointer.
12026
2280c721
PA
120272010-03-24 Pedro Alves <pedro@codesourcery.com>
12028
12029 * server.c (handle_query): Assign, not compare.
12030
d50171e4
PA
120312010-03-24 Pedro Alves <pedro@codesourcery.com>
12032
12033 Teach linux gdbserver to step-over-breakpoints.
12034
12035 * linux-low.c (can_hardware_single_step): New.
12036 (supports_breakpoints): New.
12037 (handle_extended_wait): If stopping threads, read the stop pc of
12038 the new cloned LWP.
12039 (get_pc): New.
12040 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12041 low target doesn't support retrieving the PC.
12042 (add_lwp): Set last_resume_kind to resume_continue.
12043 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12044 (linux_attach): Don't clear stop_expected. Set the lwp's
12045 last_resume_kind to resume_stop.
12046 (linux_detach_one_lwp): Don't check for removed breakpoints.
12047 (check_removed_breakpoint): Delete.
12048 (status_pending_p): Rename to ...
12049 (status_pending_p_callback): ... this. Don't check for removed
12050 breakpoints. Don't consider threads that are stopped from GDB's
12051 perspective.
12052 (linux_wait_for_lwp): Always read the stop_pc here.
12053 (cancel_breakpoint): New.
12054 (step_over_bkpt): New global.
12055 (linux_wait_for_event_1): Implement stepping over breakpoints.
12056 (gdb_wants_lwp_stopped): New.
12057 (gdb_wants_all_stopped): New.
12058 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12059 single-step traps here. Store the thread's last reported target
12060 wait status.
12061 (send_sigstop): Don't clear stop_expected. Always set it,
12062 instead.
12063 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12064 (cancel_finished_single_step): New.
12065 (cancel_finished_single_steps): New.
12066 (wait_for_sigstop): Don't cancel finished single-step traps here.
12067 (linux_resume_one_lwp): Don't check for removed breakpoints.
12068 Don't set `step' on non-hardware step archs.
12069 (linux_set_resume_request): Ignore resume_stop requests if already
12070 stopping or stopped. Set the lwp's last_resume_kind.
12071 (resume_status_pending_p): Don't check for removed breakpoints.
12072 (need_step_over_p): New.
12073 (start_step_over): New.
12074 (finish_step_over): New.
12075 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12076 requests. Clear the thread's last reported target waitstatus.
12077 Don't use the `suspended' flag. Don't consider pending breakpoints.
12078 (linux_resume): Start a step-over if necessary.
12079 (proceed_one_lwp): New.
12080 (proceed_all_lwps): New.
12081 (unstop_all_lwps): New.
12082 * linux-low.h (struct lwp_info): Rewrite comment for the
12083 `suspended' flag. Add the `stop_pc' field. Delete the
12084 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12085 Add `'last_resume_kind' and `need_step_over' fields.
12086 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12087 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12088 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12089 (set_raw_breakpoint_at): New.
12090 (set_breakpoint_at): Rewrite to use it.
12091 (reinsert_breakpoint_handler): Delete.
12092 (set_reinsert_breakpoint): New.
12093 (reinsert_breakpoint_by_bp): Delete.
12094 (delete_reinsert_breakpoints): New.
12095 (uninsert_breakpoint): Rewrite.
12096 (uninsert_breakpoints_at): New.
12097 (reinsert_breakpoint): Rewrite.
12098 (reinsert_breakpoints_at): New.
12099 (check_breakpoints): Rewrite.
12100 (breakpoint_here): New.
12101 (breakpoint_inserted_here): New.
12102 (check_mem_read): Adjust.
12103 * mem-break.h (breakpoints_supported, breakpoint_here)
12104 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12105 (reinsert_breakpoint_by_bp): Delete declaration.
12106 (delete_reinsert_breakpoints): Declare.
12107 (reinsert_breakpoint): Delete declaration.
12108 (reinsert_breakpoints_at): Declare.
12109 (uninsert_breakpoint): Delete declaration.
12110 (uninsert_breakpoints_at): Declare.
12111 (check_breakpoints): Adjust prototype.
12112 * server.h: Adjust include order.
12113 (struct thread_info): Declare here. Add a `last_status' field.
12114
30ba68cb
MS
121152010-03-23 Michael Snyder <msnyder@vmware.com>
12116
12117 * server.c (crc32): New function.
12118 (handle_query): Add handling for 'qCRC:' request.
12119
b9a881c2
PA
121202010-03-23 Pedro Alves <pedro@codesourcery.com>
12121
12122 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12123 lwp had been stopped by a watchpoint.
12124
e92d13d5
PA
121252010-03-16 Pedro Alves <pedro@codesourcery.com>
12126
12127 * server.h (internal_error): Declare.
12128 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12129 * utils.c (internal_error): New function.
12130
64daa791
AS
121312010-03-15 Andreas Schwab <schwab@redhat.com>
12132
12133 * configure.srv: Fix typo setting srv_regobj.
12134
f52cd8cd
PA
121352010-03-15 Pedro Alves <pedro@codesourcery.com>
12136
12137 * linux-low.c (fetch_register): Avoid passing a non string literal
12138 format to `error'.
12139 (usr_store_inferior_registers): Ditto.
12140
93ae6fdc
PA
121412010-03-14 Pedro Alves <pedro@codesourcery.com>
12142
12143 * linux-low.c (linux_write_memory): Bail out early if peeking
12144 memory failed.
12145
c3adc08c
PA
121462010-03-14 Pedro Alves <pedro@codesourcery.com>
12147
12148 * linux-low.h (struct lwp_info): New fields
12149 `stopped_by_watchpoint' and `stopped_data_address'.
12150 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12151 here, and cache them in the lwp object.
12152 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12153 directly.
12154 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12155 field.
12156 (linux_stopped_by_watchpoint): Rewrite.
12157 (linux_stopped_data_address): Rewrite.
12158
bce522a2
PA
121592010-03-06 Simo Melenius <simo.melenius@iki.fi>
12160
12161 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12162 switching the current inferior, not before.
12163
90884b2b
L
121642010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12165
12166 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12167 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12168 i386-linux.c and amd64-linux.c.
12169 (reg-i386.o): Removed.
12170 (reg-i386.c): Likewise.
12171 (reg-i386-linux.o): Likewise.
12172 (reg-i386-linux.c): Likewise.
12173 (reg-x86-64.o): Likewise.
12174 (reg-x86-64.c): Likewise.
12175 (reg-x86-64-linux.o): Likewise.
12176 (reg-x86-64-linux.c): Likewise.
12177 (i386.o): New.
12178 (i386.c): Likewise.
12179 (i386-linux.o): Likewise.
12180 (i386-linux.c): Likewise.
12181 (amd64.o): Likewise.
12182 (amd64.c): Likewise.
12183 (amd64-linux.o): Likewise.
12184 (amd64-linux.c): Likewise.
12185
12186 * configure.srv (srv_i386_regobj): New.
12187 (srv_i386_linux_regobj): Likewise.
12188 (srv_amd64_regobj): Likewise.
12189 (srv_amd64_linux_regobj): Likewise.
12190 (srv_i386_32bit_xmlfiles): Likewise.
12191 (srv_i386_64bit_xmlfiles): Likewise.
12192 (srv_i386_xmlfiles): Likewise.
12193 (srv_amd64_xmlfiles): Likewise.
12194 (srv_i386_linux_xmlfiles): Likewise.
12195 (srv_amd64_linux_xmlfiles): Likewise.
12196 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12197 srv_xmlfiles to $srv_i386_xmlfiles.
12198 (i[34567]86-*-mingw32ce*): Likewise.
12199 (i[34567]86-*-mingw*): Likewise.
12200 (i[34567]86-*-nto*): Likewise.
12201 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12202 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12203 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12204 (x86_64-*-linux*): Likewise.
12205
12206 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12207 (init_registers_amd64_linux): New.
12208 (x86_arch_setup): Replace init_registers_x86_64_linux with
12209 init_registers_amd64_linux.
12210
193f13e6
MK
122112010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12212
12213 * configure.ac: Check for libdl. If it is not available link against
12214 static libthread_db.
12215 * configure: Regenerate.
12216
85d721b8
PA
122172010-02-22 Pedro Alves <pedro@codesourcery.com>
12218
12219 PR9605
12220
12221 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12222 handing a read watchpoint.
12223 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12224
6076632b
DE
122252010-02-12 Doug Evans <dje@google.com>
12226
12227 * linux-low.c (linux_supports_tracefork_flag): Document.
12228 (linux_look_up_symbols): Add comment.
12229
3327ccf7
L
122302010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12231
12232 * regcache.c (supply_register): Clear regcache if buf is NULL.
12233
0718675c 122342010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12235 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12236
12237 * inferiors.c (find_inferior): Add function documentation.
12238 (unloaded_dll): Handle the case where the unloaded dll has not
12239 been previously registered in the dll list.
12240
177321bd
DJ
122412010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12242
12243 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12244 (thumb2_breakpoint): New.
12245 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12246
2b009048
DJ
122472010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12248
12249 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12250 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12251 breakpoints.
12252
3be029c7
PA
122532010-01-21 Pedro Alves <pedro@codesourcery.com>
12254
12255 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12256
18f5de3b
JK
122572010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12258
12259 * linux-s390-low.c (s390_collect_ptrace_register)
12260 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12261
3743bb4f
DE
122622010-01-21 Doug Evans <dje@google.com>
12263
14ce3065
DE
12264 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12265 (PTRACE_ARG4_TYPE): New macro.
12266 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12267 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12268 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12269 (usr_store_inferior_registers): Ditto.
12270 (linux_read_memory, linux_write_memory): Ditto.
12271 (linux_test_for_tracefork): Ditto.
12272
3743bb4f
DE
12273 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12274 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12275
8b315be5
PA
122762010-01-21 Pedro Alves <pedro@codesourcery.com>
12277
12278 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12279 target.
12280
85492558
PA
122812010-01-21 Pedro Alves <pedro@codesourcery.com>
12282
12283 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12284 prototype to take a regcache. Adjust.
12285
442ea881
PA
122862010-01-20 Pedro Alves <pedro@codesourcery.com>
12287
12288 * regcache.h (struct thread_info): Forward declare.
12289 (struct regcache): New.
12290 (new_register_cache): Adjust prototype.
12291 (get_thread_regcache): Declare.
12292 (free_register_cache): Adjust prototype.
12293 (registers_to_string, registers_from_string): Ditto.
12294 (supply_register, supply_register_by_name, collect_register)
12295 (collect_register_as_string, collect_register_by_name): Ditto.
12296 * regcache.c (struct inferior_regcache_data): Delete.
12297 (get_regcache): Rename to ...
12298 (get_thread_regcache): ... this. Adjust. Switch inferior before
12299 fetching registers.
12300 (regcache_invalidate_one): Adjust.
12301 (regcache_invalidate): Fix prototype.
12302 (new_register_cache): Return the new register cache.
12303 (free_register_cache): Change prototype.
12304 (realloc_register_cache): Adjust.
12305 (registers_to_string): Change prototype to take a regcache. Adjust.
12306 (registers_from_string): Ditto.
12307 (register_data): Ditto.
12308 (supply_register): Ditto.
12309 (supply_register_by_name): Ditto.
12310 (collect_register): Ditto.
12311 (collect_register_as_string): Ditto.
12312 (collect_register_by_name): Ditto.
12313 * server.c (process_serial_event): Adjust.
12314 * linux-low.h (regset_fill_func, regset_store_func): Change
12315 prototype.
12316 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12317 Change prototype.
12318 * linux-low.c (get_stop_pc): Adjust.
12319 (check_removed_breakpoint): Adjust.
12320 (linux_wait_for_event): Adjust.
12321 (linux_resume_one_lwp): Adjust.
12322 (fetch_register): Add regcache parameter. Adjust.
12323 (usr_store_inferior_registers): Ditto.
12324 (regsets_fetch_inferior_registers): Ditto.
12325 (regsets_store_inferior_registers): Ditto.
12326 (linux_fetch_registers, linux_store_registers): Ditto.
12327 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12328 regcache. Adjust.
43aaf8b6
PA
12329 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12330 Ditto.
442ea881
PA
12331 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12332 prototype to take a regcache.
12333 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12334 * remote-utils.c (convert_ascii_to_int, outreg)
12335 (prepare_resume_reply): Change prototype to take a regcache.
12336 Adjust.
12337 * target.h (struct target_ops) <fetch_registers, store_registers>:
12338 Change prototype to take a regcache.
12339 (fetch_inferior_registers, store_inferior_registers): Change
12340 prototype to take a regcache. Adjust.
12341 * proc-service.c (ps_lgetregs): Adjust.
12342 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12343 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12344 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12345 take a regcache. Adjust.
12346 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12347 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12348 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12349 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12350 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12351 (cris_cannot_fetch_register):
12352 (cris_breakpoint_at): Change prototype to take a regcache.
12353 Adjust.
12354 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12355 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12356 to take a regcache. Adjust.
12357 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12358 Adjust.
12359 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12360 take a regcache. Adjust.
12361 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12362 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12363 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12364 * linux-mips-low.c (mips_get_pc):
12365 (mips_set_pc): Change prototype to take a regcache. Adjust.
12366 (mips_reinsert_addr): Adjust.
12367 (mips_collect_register): Change prototype to take a regcache.
12368 Adjust.
12369 (mips_supply_register):
12370 (mips_collect_register_32bit, mips_supply_register_32bit)
12371 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12372 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12373 * linux-ppc-low.c (ppc_supply_ptrace_register)
12374 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12375 (parse_spufs_run): Adjust.
12376 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12377 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12378 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12379 take a regcache. Adjust.
12380 * linux-s390-low.c (s390_collect_ptrace_register)
12381 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12382 (s390_set_pc): Change prototype to take a regcache. Adjust.
12383 (s390_arch_setup): Adjust.
12384 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12385 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12386 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12387 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12388 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12389 regcache. Adjust.
12390 (sparc_breakpoint_at): Adjust.
12391 * linux-xtensa-low.c (xtensa_fill_gregset):
12392 (xtensa_store_gregset):
12393 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12394 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12395 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12396 prototype to take a regcache. Adjust.
12397 * win32-arm-low.c (arm_fetch_inferior_register)
12398 (arm_store_inferior_register): Change prototype to take a
12399 regcache. Adjust.
12400 * win32-i386-low.c (i386_fetch_inferior_register)
12401 (i386_store_inferior_register): Change prototype to take a
12402 regcache. Adjust.
12403 * win32-low.c (child_fetch_inferior_registers)
12404 (child_store_inferior_registers): Change prototype to take a
12405 regcache. Adjust.
12406 (win32_wait): Adjust.
12407 (win32_fetch_inferior_registers): Change prototype to take a
12408 regcache. Adjust.
12409 (win32_store_inferior_registers): Adjust.
12410 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12411 store_inferior_register>: Change prototype to take a regcache.
12412
60c3d7b0
DE
124132010-01-20 Doug Evans <dje@google.com>
12414
12415 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12416 #ifdef.
12417 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12418 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12419
dc146f7c
VP
124202010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12421
12422 * linux-low.c (linux_core_of_thread): New.
12423 (compare_ints, show_process, list_threads): New.
12424 (linux_qxfer_osdata): Report threads and cores.
12425 (linux_target_op): Register linux_core_of_thread.
12426 * remote-utils.c (prepare_resume_reply): Report the core.
12427 (buffer_xml_printf): Support %d specifier.
12428 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12429 New.
12430 (handle_query): Handle qXfer:threads. Announce availability
12431 thereof.
12432 * target.h (struct target_ops): New field core_of_thread.
12433
7803799a
UW
124342010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12435
12436 * Makefile.in (clean): Remove new generated files.
12437 (reg-s390.o, reg-s390.c): Remove rules.
12438 (reg-s390x.o, reg-s390x.c): Likewise.
12439 (s390-linux32.o, s390-linux32.c): Add rules.
12440 (s390-linux64.o, s390-linux64.c): Likewise.
12441 (s390x-linux64.o, s390x-linux64.c): Likewise.
12442 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12443 * linux-s390-low.c: Include <elf.h>.
12444 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12445 (init_registers_s390): Remove prototype.
12446 (init_registers_s390x): Likewise.
12447 (init_registers_s390_linux32): Add prototype.
12448 (init_registers_s390_linux64): Likewise.
12449 (init_registers_s390x_linux64): Likewise.
12450 (s390_num_regs_3264): New define.
12451 (s390_regmap_3264): New global variable.
12452 (s390_cannot_fetch_register): Remove obsolete check.
12453 (s390_cannot_store_register): Likewise.
12454 (s390_collect_ptrace_register): Handle upper/lower register halves.
12455 (s390_supply_ptrace_register): Likewise.
12456 (s390_fill_gregset): Update to register number changes.
12457 (s390_get_hwcap): New routine.
12458 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12459 Install appropriate regmap and register set.
12460
6e7ffa39
JB
124612010-01-01 Joel Brobecker <brobecker@adacore.com>
12462
12463 * server.c (gdbserver_version): Update copyright year to 2010.
12464 * gdbreplay.c (gdbreplay_version): Likewise.
12465
957f3f49
DE
124662009-12-28 Doug Evans <dje@google.com>
12467
12468 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12469 elf/external.h. Include <elf.h> instead but only if necessary.
12470
ca5c370d
PA
124712009-12-28 Pedro Alves <pedro@codesourcery.com>
12472
12473 * linux-low.c (linux_remove_process): Remove `detaching'
12474 parameter. Don't release/detach from thread_db here.
12475 (linux_kill): Release/detach from thread_db here, ...
12476 (linux_detach): ... and here, before actually detaching.
12477 (linux_wait_1): ... and here, when a process exits.
12478 * thread-db.c (any_thread_of): New.
12479 (thread_db_free): Switch the current inferior to a thread of the
12480 passed in process.
12481
4ee62156
DE
124822009-12-21 Doug Evans <dje@google.com>
12483
d90e6a88
DE
12484 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12485
c5f62d5f
DE
12486 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12487 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12488 warning ifndef __NR_tkill. Move setting of errno there too.
12489 Delete unnecessary resetting of errno after syscall.
12490 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12491
10e86dd7
DE
12492 * configure.ac: Check for dladdr.
12493 * config.in: Regenerate.
12494 * configure: Regenerate.
12495 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12496 (try_thread_db_load): Update.
12497
4ee62156
DE
12498 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12499
00f515da
DE
125002009-12-18 Doug Evans <dje@google.com>
12501
e9464885
DE
12502 * event-loop.c: Include unistd.h if it exists.
12503
07d4f67e
DE
12504 * linux-low.c (my_waitpid): Move definition away from being in
12505 between linux_tracefork_child/linux_test_for_tracefork.
12506
00f515da
DE
12507 * gdb_proc_service.h (psaddr_t): Fix type.
12508 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12509 signature to match glibc.
12510
1de1badb
DE
125112009-12-16 Doug Evans <dje@google.com>
12512
12513 * linux-low.c (linux_read_memory): Fix argument to read.
12514
aeeb81d1
PA
125152009-11-26 Pedro Alves <pedro@codesourcery.com>
12516
12517 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12518 events, don't leave current_inferior pointing at null.
12519
10357975
PA
125202009-11-26 Pedro Alves <pedro@codesourcery.com>
12521
12522 * win32-low.c (LOG): Delete.
12523 (OUTMSG): Output to stderr.
12524 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12525 on compile time LOG macro.
12526 (win32_wait): Fix debug output.
12527
cf6e3471
PA
125282009-11-26 Pedro Alves <pedro@codesourcery.com>
12529
12530 * win32-low.c (win32_add_one_solib): If the dll name is
12531 "ntdll.dll", prepend the system directory to the dll path.
12532
0c85e18e
MK
125332009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12534
12535 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12536
9ac544ce 125372009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12538 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12539
12540 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12541 * configure.ac: Check for __mcoldfire__ and set
12542 gdb_cv_m68k_is_coldfire.
12543 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12544 reg-cf.o and reg-m68k.o.
12545 * configure: Regenerated.
12546
fd7dd3e6
PA
125472009-11-16 Pedro Alves <pedro@codesourcery.com>
12548
12549 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12550 Pass it to thread_db_free.
12551 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12552 proper `detaching' argument to linux_remove_process.
12553 * linux-low.h (thread_db_free): Add `detaching' parameter.
12554 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12555 to thread_db_free.
12556 (thread_db_free): Add `detaching' parameter. Only
12557 call td_ta_clear_event if detaching from process.
12558
75aa492e
MK
125592009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12560
12561 * thread-db.c (thread_db_free): Fix typo.
12562
21e1bee4
PP
125632009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12564
12565 PR gdb/10838
12566 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12567
8838b45e
NS
125682009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12569
12570 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12571 with an i686 compiler.
12572 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12573 needed.
12574 * configure: Rebuilt.
12575
8a35fb51
SL
125762009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12577
12578 PR gdb/10783
12579
12580 * server.c (handle_search_memory_1): Correct read_addr initialization
12581 in loop for searching subsequent chunks.
12582
96f15937
PP
125832009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12584
12585 * configure.ac: New --with-libthread-db option.
12586 * thread-db.c: Allow direct dependence on libthread_db.
12587 (thread_db_free): Adjust.
12588 * config.in: Regenerate.
12589 * configure: Likewise.
889bf7c5 12590
5f7d1694
PP
125912009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12592
12593 PR gdb/10757
12594 * thread-db.c (attach_thread): New function.
12595 (maybe_attach_thread): Return success/failure.
12596 (find_new_threads_callback): Adjust.
889bf7c5
PA
12597 (thread_db_find_new_threads): Loop until no new threads.
12598
88e3b899
PA
125992009-10-13 Pedro Alves <pedro@codesourcery.com>
12600
12601 * proc-service.c (ps_lgetregs): Formatting.
12602
cdbfd419
PP
126032009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12604
12605 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12606 * configure.ac: Adjust.
12607 * linux-low.h (struct process_info_private): Move members to struct
12608 thread_db.
12609 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12610 * linux-low.c (linux_remove_process): Adjust.
12611 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12612 * server.c (handle_query): Move code ...
12613 (handle_monitor_command): ... here. New function.
12614 * target.h (struct target_ops): New member.
12615 * thread-db.c (struct thread_db): New.
12616 (libthread_db_search_path): New variable.
12617 (thread_db_create_event, thread_db_enable_reporting)
12618 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12619 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12620 (try_thread_db_load_1, dladdr_to_soname): New functions.
12621 (try_thread_db_load, thread_db_load_search): New functions.
12622 (thread_db_init): Search for libthread_db.
12623 (thread_db_free): New function.
12624 (thread_db_handle_monitor_command): Likewise.
12625 * config.in: Regenerate.
12626 * configure: Regenerate.
889bf7c5 12627
4168d2d6
UW
126282009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12629
12630 * spu-low.c (spu_kill): Wait for inferior to terminate.
12631 Call clear_inferiors.
12632 (spu_detach): Call clear_inferiors.
12633
81ecdfbb
RW
126342009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12635
12636 * aclocal.m4: Regenerate.
12637 * config.in: Likewise.
12638 * configure: Likewise.
12639
0b9ff2c0
UW
126402009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12641
12642 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12643 (parse_spufs_run): New function.
12644 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12645 (ppc_breakpoint_at): Handle SPU breakpoints.
12646
efcbbd14
UW
126472009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12648
12649 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12650 (SPUFS_MAGIC): Define.
12651 (spu_enumerate_spu_ids): New function.
12652 (linux_qxfer_spu): New function.
12653 (linux_target_ops): Install linux_qxfer_spu.
12654
f4d9bade
UW
126552009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12656
12657 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12658 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12659 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12660 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12661 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12662 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12663 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12664 (init_registers_powerpc_cell32l): Add prototype.
12665 (init_registers_powerpc_cell64l): Likewise.
12666 (ppc_arch_setup): Detect Cell/B.E. architecture.
12667
96e946ca
RW
126682009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12669
12670 * Makefile.in (datarootdir): New variable.
12671
58d6951d
DJ
126722009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12673
12674 * linux-low.c (linux_write_memory): Update debugging output.
12675 * Makefile.in (clean): Add new descriptions.
12676 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12677 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12678 * configure.srv: Add new files for arm*-*-linux*.
12679 * linux-arm-low.c: Add new declarations.
12680 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12681 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12682 (HWCAP_VFPv3D16): New.
12683 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12684 instead of __IWMMXT__.
12685 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12686 (arm_arch_setup): New.
12687 (target_regsets): Remove #ifdef. Add VFP regset.
12688 (the_low_target): Use arm_arch_setup.
12689
12b42a12
DJ
126902009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12691
12692 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12693 the main thread again.
12694
ac8c974e
AR
126952009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12696
12697 Adding Neutrino gdbserver.
12698 * configure: Regenerated.
12699 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12700 * configure.srv (i[34567]86-*-nto*): New target.
12701 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12702 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12703 (nto_comctrl) [__QNX__]: New function.
12704 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12705
4424e0c3 127062009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12707
12708 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12709 srv_tgtobj.
12710
912cf4ba
PA
127112009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12712 Pedro Alves <pedro@codesourcery.com>
12713
12714 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12715 don't support CONTEXT_EXTENDED_REGISTERS.
12716 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12717 (the_low_target): Install them.
12718 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12719 failing with ERROR_PIPE_NOT_CONNECTED.
12720
aa5ca48f
DE
127212009-06-30 Doug Evans <dje@google.com>
12722 Pierre Muller <muller@ics.u-strasbg.fr>
12723
12724 Add h/w watchpoint support to x86-linux, win32-i386.
12725 * Makefile.in (SFILES): Add i386-low.c
12726 (i386_low_h): Define.
12727 (i386-low.o): Add dependencies.
12728 (linux-x86-low.o): Add i386-low.h dependency.
12729 (win32-i386-low.o): Ditto.
12730 * i386-low.c: New file.
12731 * i386-low.h: New file.
12732 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12733 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12734 * linux-low.c (linux_add_process): Initialize arch_private.
12735 (linux_remove_process): Free arch_private.
12736 (add_lwp): Initialize arch_private.
12737 (delete_lwp): Free arch_private.
12738 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12739 provided.
12740 * linux-low.h (process_info_private): New member arch_private.
12741 (lwp_info): New member arch_private.
12742 (linux_target_ops): New members new_process, new_thread,
12743 prepare_to_resume.
12744 (ptid_of): New macro.
12745 * linux-x86-low.c: Include stddef.h, i386-low.h.
12746 (arch_process_info): New struct.
12747 (arch_lwp_info): New struct.
12748 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12749 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12750 (i386_dr_low_get_status): New function.
12751 (x86_insert_point, x86_remove_point): New functions.
12752 (x86_stopped_by_watchpoint): New function.
12753 (x86_stopped_data_address): New function.
12754 (x86_linux_new_process, x86_linux_new_thread): New functions.
12755 (x86_linux_prepare_to_resume): New function.
12756 (the_low_target): Add entries for insert_point, remove_point,
12757 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12758 prepare_to_resume.
12759 * server.c (debug_hw_points): New global.
12760 (monitor_show_help): Document set debug-hw-points.
12761 (handle_query): Process "set debug-hw-points".
12762 * server.h (debug_hw_points): Declare.
12763 (paddress): Declare.
12764 * utils.c (NUMCELLS, CELLSIZE): New macros.
12765 (get_sell, xsnprintf, paddress): New functions.
12766 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12767 remove_point, stopped_by_watchpoint, stopped_data_address.
12768 * win32-i386-low.c: Include i386-low.h.
12769 (debug_reg_state): Replaces dr.
12770 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12771 (i386_dr_low_get_status): New function.
12772 (i386_insert_point, i386_remove_point): New functions.
12773 (i386_stopped_by_watchpoint): New function.
12774 (i386_stopped_data_address): New function.
12775 (i386_initial_stuff): Update.
12776 (get_thread_context,set_thread_context,i386_thread_added): Update.
12777 (the_low_target): Add entries for insert_point,
12778 remove_point, stopped_by_watchpoint, stopped_data_address.
12779 * win32-low.c (win32_insert_watchpoint): New function.
12780 (win32_remove_watchpoint): New function.
12781 (win32_stopped_by_watchpoint): New function.
12782 (win32_stopped_data_address): New function.
12783 (win32_target_ops): Add entries for insert_watchpoint,
12784 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12785 * win32-low.h (win32_target_ops): New members insert_point,
12786 remove_point, stopped_by_watchpoint, stopped_data_address.
12787
d993e290
PA
127882009-06-25 Pedro Alves <pedro@codesourcery.com>
12789
12790 * server.c (process_serial_event): Re-return unsupported, not
12791 error, if the type isn't recognized. Re-allow supporting only
12792 insert or remove packets. Also call require_running for
12793 breakpoints. Add missing break statement to default case. Tidy.
12794 * target.h (struct target_ops): Rename insert_watchpoint to
12795 insert_point, and remove_watchpoint to remove_point.
12796
12797 * linux-low.h (struct linux_target_ops): Likewise.
12798 * linux-low.c (linux_insert_watchpoint): Rename to ...
12799 (linux_insert_point): ... this. Adjust.
12800 (linux_remove_watchpoint): Rename to ...
12801 (linux_remove_point): ... this. Adjust.
12802 (linux_target_ops): Adjust.
12803 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12804 (cris_insert_point): ... this.
12805 (cris_remove_watchpoint): Rename to ...
12806 (cris_remove_point): ... this.
12807 (the_low_target): Adjust.
12808
0f54c268
PM
128092009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12810
12811 * server.c (handle_v_kill): Pass signal_pid to
12812 kill_inferior if multi_process is zero.
12813
c6314022
AR
128142009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12815
12816 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12817 * target.h (target_ops): Comment for *_watchpoint to make it clear
12818 the functions can get types '0' and '1'.
12819
4463ce24
AR
128202009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12821
12822 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12823 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12824 * regcache.c (get_regcache): Likewise.
12825 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12826 * win32-low.c (child_fetch_inferior_registers): Remove check for
12827 regno 0.
12828
cf8fd78b
PA
128292009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12830 Pedro Alves <pedro@codesourcery.com>
12831
12832 * target.h (struct target_ops) <supports_multi_process>: New
12833 callback.
12834 (target_supports_multi_process): New.
12835 * server.c (handle_query): Even if GDB reports support, only
12836 enable multi-process if the target also supports it. Report
12837 multi-process support only if the target backend supports it.
12838 * linux-low.c (linux_supports_multi_process): New function.
12839 (linux_target_ops): Install it as target_supports_multi_process
12840 callback.
12841
47c0c975
DE
128422009-05-24 Doug Evans <dje@google.com>
12843
e09875d4
DE
12844 Global renaming of find_thread_pid to find_thread_ptid.
12845 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12846 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12847 All callers updated.
12848
e27d73f6
DE
12849 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12850 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12851 directly.
12852
47c0c975
DE
12853 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12854 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12855 (linux_resume_one_lwp): Ditto.
12856
2acc282a
DE
128572009-05-23 Doug Evans <dje@google.com>
12858
12859 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12860 from struct inferior_list_entry * to struct lwp_info *.
12861 All callers updated.
12862
9f1036c1
DE
128632009-05-13 Doug Evans <dje@google.com>
12864
12865 * linux-x86-low.c: Don't include assert.h.
12866 (x86_siginfo_fixup): Use fatal, not assert.
12867 (x86_arch_setup): Fix comment.
12868
d0722149
DE
128692009-05-12 Doug Evans <dje@google.com>
12870
12871 Biarch support for i386/amd64 gdbserver.
12872 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12873 Add linux-x86-low.c.
12874 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12875 (linux-x86-low.o): Add.
12876 * linux-x86-64-low.c: Delete.
12877 * linux-i386-low.c: Delete.
12878 * linux-x86-low.c: New file.
12879 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12880 linux-x86-low.o.
12881 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12882 linux-x86-low.o.
12883 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12884 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12885 (linux_child_pid_to_exec_file): New function.
12886 (elf_64_header_p, elf_64_file_p): New functions.
12887 (siginfo_fixup): New function.
12888 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12889 give target a chance to convert layout.
12890 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12891 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12892
fdeb2a12
DE
128932009-05-07 Doug Evans <dje@google.com>
12894
12895 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12896 (regsets_store_inferior_registers): Ditto.
12897
a6dbe5df
PA
128982009-05-06 Pedro Alves <pedro@codesourcery.com>
12899
12900 PR server/10048
12901
12902 * linux-low.c (must_set_ptrace_flags): Delete.
12903 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12904 of the global.
12905 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12906 `lwp->must_set_ptrace_flags' instead.
ba42693b 12907 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12908 (linux_wait_1): ... not here.
12909
5091eb23
DE
129102009-04-30 Doug Evans <dje@google.com>
12911
9f767825
DE
12912 * inferiors.c (started_inferior_callback): New function.
12913 (attached_inferior_callback): New function.
12914 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12915 * server.c (print_started_pid, print_attached_pid): New functions.
12916 (detach_or_kill_for_exit): New function.
12917 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12918 * server.h (have_started_inferiors_p): Declare.
12919 (have_attached_inferiors_p): Declare.
12920
5091eb23
DE
12921 * inferiors.c (remove_process): Fix memory leak, free process.
12922 * linux-low.c (linux_remove_process): New function.
12923 (linux_kill): Call it instead of remove_process.
12924 (linux_detach, linux_wait_1): Ditto.
12925
155c8968
PA
129262009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12927
12928 * configure.srv: Add x86 Windows CE target.
12929
7fe519cb
UW
129302009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12931
12932 * inferiors.c (get_thread_process): Make global.
12933 * server.h (get_thread_process): Add prototype.
12934 * thread-db.c (find_one_thread): Use get_thread_process
12935 instead of current_process.
12936 (thread_db_get_tls_address): Do not crash if called when
12937 thread layer is not yet initialized.
12938
5472f405
UW
129392009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12940
12941 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12942 * spu-low.c (current_tid): Rename to ...
12943 (current_ptid): ... this.
12944 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12945 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12946 ptid_get_lwp (current_ptid) instead of current_tid.
12947 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12948 instead of current_tid. Use find_process_pid to verify pid
12949 argument is valid. Pass proper argument to remove_process.
12950 (spu_thread_alive): Compare current_ptid instead of current_tid.
12951 (spu_resume): Likewise.
12952
55ac2b99
PA
129532009-04-02 Pedro Alves <pedro@codesourcery.com>
12954
12955 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12956 variable.
12957
95954743
PA
129582009-04-01 Pedro Alves <pedro@codesourcery.com>
12959
12960 Implement the multiprocess extensions, and add linux multiprocess
12961 support.
12962
12963 * server.h (ULONGEST): Declare.
12964 (struct ptid, ptid_t): New.
12965 (minus_one_ptid, null_ptid): Declare.
12966 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12967 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12968 (struct inferior_list_entry): Change `id' type from unsigned from
12969 to ptid_t.
12970 (struct sym_cache, struct breakpoint, struct
12971 process_info_private): Forward declare.
12972 (struct process_info): Declare.
12973 (current_process): Declare.
12974 (all_processes): Declare.
12975 (initialize_inferiors): Declare.
12976 (add_thread): Adjust to use ptid_t.
12977 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12978 (add_process, remove_process, find_thread_pid): Declare.
12979 (find_inferior_id): Adjust to use ptid_t.
12980 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12981 (multi_process): Declare.
12982 (push_event): Adjust to use ptid_t.
12983 (read_ptid, write_ptid): Declare.
12984 (prepare_resume_reply): Adjust to use ptid_t.
12985 (clear_symbol_cache): Declare.
12986 * inferiors.c (all_processes): New.
12987 (null_ptid, minus_one_ptid): New.
12988 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12989 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12990 (add_thread): Change unsigned long to ptid. Remove gdb_id
12991 parameter. Adjust.
12992 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12993 (gdb_id_to_thread): Rename to ...
12994 (find_thread_pid): ... this. Change unsigned long to ptid.
12995 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12996 (loaded_dll, pull_pid_from_list): Adjust.
12997 (add_process, remove_process, find_process_pid)
12998 (get_thread_process, current_process, initialize_inferiors): New.
12999 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13000 (struct target_waitstatus) <related_pid>: Ditto.
13001 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13002 return type to int.
13003 (struct target_ops) <join>: Add `pid' argument.
13004 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13005 (struct target_ops) <wait>: Add `ptid' field. Change return type
13006 to ptid.
13007 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13008 (mywait): Add `ptid' argument. Change return type to ptid_t.
13009 (target_pid_to_str): Declare.
13010 * target.c (set_desired_inferior): Adjust to use ptids.
13011 (mywait): Add new `ptid' argument. Adjust.
13012 (target_pid_to_str): New.
13013 * mem-break.h (free_all_breakpoints): Declare.
13014 * mem-break.c (breakpoints): Delelete.
13015 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13016 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13017 to use per-process breakpoint list.
13018 (free_all_breakpoints): New.
13019 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13020 (symbol_cache, all_symbols_looked_up): Delete.
13021 (hexchars): New.
13022 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13023 read_ptid): New.
13024 (prepare_resume_reply): Change ptid argument's type from unsigned
13025 long to ptid_t. Adjust. Implement W;process and X;process.
13026 (free_sym_cache, clear_symbol_cache): New.
13027 (look_up_one_symbol): Adjust to per-process symbol cache. *
13028 * server.c (cont_thread, general_thread, step_thread): Change type
13029 to ptid_t.
13030 (attached): Delete.
13031 (multi_process): New.
13032 (last_ptid): Change type to ptid_t.
13033 (struct vstop_notif) <ptid>: Change type to ptid_t.
13034 (queue_stop_reply, push_event): Change `ptid' argument's type to
13035 ptid_t.
13036 (discard_queued_stop_replies): Add `pid' argument.
13037 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13038 changes. Don't reference the `attached' global.
13039 (attach_inferior): Adjust to mywait interface changes.
13040 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13041 features. Handle and report "multiprocess+". Handle
13042 "qAttached:PID".
13043 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13044 changes.
13045 (handle_v_kill): New.
13046 (handle_v_stopped): Adjust to use target_pid_to_str.
13047 (handle_v_requests): Allow multiple attaches and runs when
13048 multiprocess extensions are in effect. Handle "vKill".
13049 (myresume): Adjust to use ptids.
13050 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13051 (handle_status): Adjust to discard_queued_stop_replies interface
13052 change.
13053 (first_thread_of, kill_inferior_callback)
13054 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13055 (main): Call initialize_inferiors. Adjust to use ptids, killing
13056 and detaching from all inferiors. Handle multiprocess packet
13057 variants.
13058 * linux-low.h: Include gdb_proc_service.h.
13059 (struct process_info_private): New.
13060 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13061 <lwpid_of>: Use ptid_get_lwp.
13062 (get_lwp_thread): Adjust.
13063 (struct lwp_info): Add `dead' member.
13064 (find_lwp_pid): Declare.
13065 * linux-low.c (thread_db_active): Delete.
13066 (new_inferior): Adjust comment.
13067 (inferior_pid): Delete.
13068 (linux_add_process): New.
13069 (handle_extended_wait): Adjust.
13070 (add_lwp): Change unsigned long to ptid.
13071 (linux_create_inferior): Add process to processes table. Adjust
13072 to use ptids. Don't set new_inferior here.
13073 (linux_attach_lwp): Rename to ...
13074 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13075 it. Adjust to use ptids.
13076 (linux_attach_lwp): New.
13077 (linux_attach): Add process to processes table. Don't set
13078 new_inferior here.
13079 (struct counter): New.
13080 (second_thread_of_pid_p, last_thread_of_process_p): New.
13081 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13082 multiple processes.
13083 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13084 processes. Remove process from process table.
13085 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13086 to multiple processes.
13087 (any_thread_of): New.
13088 (linux_detach): Add `pid' argument, and handle it. Remove process
13089 from processes table.
13090 (linux_join): Add `pid' argument. Handle it.
13091 (linux_thread_alive): Change unsighed long argument to ptid_t.
13092 Consider dead lwps as not being alive.
13093 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13094 threads we're not interested in.
13095 (same_lwp, find_lwp_pid): New.
13096 (linux_wait_for_lwp): Change `pid' argument's type from int to
13097 ptid_t. Adjust.
13098 (linux_wait_for_event): Rename to ...
13099 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13100 from int to ptid_t. Adjust.
13101 (linux_wait_for_event): New.
13102 (linux_wait_1): Add `ptid' argument. Change return type to
13103 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13104 that exit from the process table.
13105 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13106 Adjust.
13107 (mark_lwp_dead): New.
13108 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13109 stopping all threads, mark its main lwp as dead.
13110 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13111 ptids.
13112 (fetch_register, usr_store_inferior_registers)
13113 (regsets_fetch_inferior_registers)
13114 (regsets_store_inferior_registers, linux_read_memory)
13115 (linux_write_memory): Inline `inferior_pid'.
13116 (linux_look_up_symbols): Adjust to use per-process
13117 `thread_db_active'.
13118 (linux_request_interrupt): Adjust to use ptids.
13119 (linux_read_auxv): Inline `inferior_pid'.
13120 (initialize_low): Don't reference thread_db_active.
13121 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13122 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13123 (ps_getpid): Return the pid of the current inferior.
13124 * thread-db.c (proc_handle, thread_agent): Delete.
13125 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13126 per-process data.
13127 (find_one_thread): Change argument type to ptid_t. Adjust to
13128 per-process data.
13129 (maybe_attach_thread): Adjust to per-process data and ptids.
13130 (thread_db_find_new_threads): Ditto.
13131 (thread_db_init): Ditto.
13132 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13133 processes table. Adjust to use ptids.
13134 (spu_kill, spu_detach): Adjust interface. Remove process from
13135 processes table.
13136 (spu_join, spu_thread_alive): Adjust interface.
13137 (spu_wait): Adjust interface. Remove process from processes
13138 table. Adjust to use ptids.
13139 * win32-low.c (current_inferior_tid): Delete.
13140 (current_inferior_ptid): New.
13141 (debug_event_ptid): New.
13142 (thread_rec): Take a ptid. Adjust.
13143 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13144 (child_delete_thread): Ditto.
13145 (do_initial_child_stuff): Add `attached' argument. Add process to
13146 processes table.
13147 (child_fetch_inferior_registers, child_store_inferior_registers):
13148 Adjust.
13149 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13150 (win32_attach): Pass 1 to do_initial_child_stuff.
13151 (win32_kill): Adjust interface. Remove process from processes
13152 table.
13153 (win32_detach): Ditto.
13154 (win32_join): Adjust interface.
13155 (win32_thread_alive): Take a ptid.
13156 (win32_resume): Adjust to use ptids.
13157 (get_child_debug_event): Ditto.
13158 (win32_wait): Adjust interface. Remove exiting process from
13159 processes table.
13160
bd99dc85
PA
131612009-04-01 Pedro Alves <pedro@codesourcery.com>
13162
13163 Non-stop mode support.
13164
13165 * server.h (non_stop): Declare.
13166 (gdb_client_data, handler_func): Declare.
13167 (delete_file_handler, add_file_handler, start_event_loop):
13168 Declare.
13169 (handle_serial_event, handle_target_event, push_event)
13170 (putpkt_notif): Declare.
13171 * target.h (enum resume_kind): New.
13172 (struct thread_resume): Replace `step' field by `kind' field.
13173 (TARGET_WNOHANG): Define.
13174 (struct target_ops) <wait>: Add `options' argument.
13175 <supports_non_stop, async, start_non_stop>: New fields.
13176 (target_supports_non_stop, target_async): New.
13177 (start_non_stop): Declare.
13178 (mywait): Add `options' argument.
13179 * target.c (mywait): Add `options' argument. Print child exit
13180 notifications here.
13181 (start_non_stop): New.
13182 * server.c (non_stop, own_buf, mem_buf): New globals.
13183 (struct vstop_notif): New.
13184 (notif_queue): New global.
13185 (queue_stop_reply, push_event, discard_queued_stop_replies)
13186 (send_next_stop_reply): New.
13187 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13188 interface changes.
13189 (attach_inferior): In non-stop mode, don't wait for the target
13190 here.
13191 (handle_general_set): Handle QNonStop.
13192 (handle_query): When handling qC, return the current general
13193 thread, instead of the first thread of the list.
13194 (handle_query): If the backend supports non-stop mode, include
13195 QNonStop+ in the qSupported query response.
13196 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13197 and non-stop mode.
13198 (handle_v_attach, handle_v_run): Handle non-stop mode.
13199 (handle_v_stopped): New.
13200 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13201 (myresume): Adjust to use resume_kind. Handle non-stop.
13202 (queue_stop_reply_callback): New.
13203 (handle_status): Handle non-stop mode.
13204 (main): Clear non_stop flag on reconnection. Use the event-loop.
13205 Refactor serial protocol handling from here ...
13206 (process_serial_event): ... to this new function. When GDB
13207 selects any thread, select one here. In non-stop mode, wait until
13208 GDB acks all pending events before exiting.
13209 (handle_serial_event, handle_target_event): New.
13210 * remote-utils.c (remote_open): Install remote_desc in the event
13211 loop.
13212 (remote_close): Remove remote_desc from the event loop.
13213 (putpkt_binary): Rename to...
13214 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13215 (putpkt_binary): New as wrapper around putpkt_binary_1.
13216 (putpkt_notif): New.
13217 (prepare_resume_reply): In non-stop mode, don't change the
13218 general_thread.
13219 * event-loop.c: New.
13220 * Makefile.in (OBJ): Add event-loop.o.
13221 (event-loop.o): New rule.
13222
13223 * linux-low.h (pid_of): Moved here.
13224 (lwpid_of): New.
13225 (get_lwp_thread): Use lwpid_of.
13226 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13227 * linux-low.c (pid_of): Delete.
13228 (inferior_pid): Use lwpid_of.
13229 (linux_event_pipe): New.
13230 (target_is_async_p): New.
13231 (delete_lwp): New.
13232 (handle_extended_wait): Use lwpid_of.
13233 (add_lwp): Don't set lwpid field.
13234 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13235 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13236 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13237 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13238 first. Adjust to linux_wait_for_event interface changes. Use
13239 lwpid_of.
13240 (linux_detach): Don't delete the main lwp here.
13241 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13242 (status_pending_p): Don't consider explicitly suspended lwps.
13243 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13244 pointer. Add OPTIONS argument. Change return type to int. Use
13245 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13246 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13247 pointer. Add status pointer argument. Return a pid instead of a
13248 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13249 changes. In non-stop mode, don't switch to a random thread.
13250 (linux_wait): Rename to...
13251 (linux_wait_1): ... this. Add target_options argument, and handle
13252 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13253 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13254 clean exit and signal exit code. Don't stop all threads in
13255 non-stop mode. In all-stop mode, only stop all threads when
13256 reporting a stop to GDB. Handle explicit thread stop requests.
13257 (async_file_flush, async_file_mark): New.
13258 (linux_wait): New.
13259 (send_sigstop): Use lwpid_of.
13260 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13261 interface changes. In non-stop mode, don't switch to a random
13262 thread.
13263 (linux_resume_one_lwp): Use lwpid_of.
13264 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13265 (linux_resume_one_thread): ... this. Handle resume_stop. In
13266 non-stop mode, don't look for pending flag in all threads.
13267 (resume_status_pending_p): Don't consider explicitly suspended
13268 threads.
13269 (my_waitpid): Reimplement. Emulate __WALL.
13270 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13271 Use lwpid_of.
13272 (sigchld_handler, linux_supports_non_stop, linux_async)
13273 (linux_start_non_stop): New.
13274 (linux_target_ops): Register linux_supports_non_stop, linux_async
13275 and linux_start_non_stop.
13276 (initialize_low): Install SIGCHLD handler.
13277 * thread-db.c (thread_db_create_event, find_one_thread)
13278 (thread_db_get_tls_address): Use lwpid_of.
13279 * win32-low.c (win32_detach): Adjust to use resume_kind.
13280 (win32_wait): Add `options' argument.
13281 * spu-low.c (spu_resume): Adjust to use resume_kind.
13282 (spu_wait): Add `options' argument.
13283
5b1c542e
PA
132842009-04-01 Pedro Alves <pedro@codesourcery.com>
13285
13286 Decouple target code from remote protocol.
13287
13288 * target.h (enum target_waitkind): New.
13289 (struct target_waitstatus): New.
13290 (struct target_ops) <wait>: Return an unsigned long. Take a
13291 target_waitstatus pointer instead of a char pointer.
13292 (mywait): Likewise.
13293 * target.c (mywait): Change prototype to return an unsigned long.
13294 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13295 * server.h (thread_from_wait, old_thread_from_wait): Delete
13296 declarations.
13297 (prepare_resume_reply): Change prototype to take a
13298 target_waitstatus.
13299 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13300 (last_status, last_ptid): New.
13301 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13302 pid instead of a signal.
13303 (attach_inferior): Remove "status" and "signal" parameters.
13304 Adjust.
13305 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13306 not as an address.
13307 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13308 (handle_v_requests, myresume): Remove "status" and "signal"
13309 parameters. Adjust.
13310 (handle_status): New.
13311 (main): Delete local `status'. Adjust.
13312 * remote-utils.c: Include target.h.
13313 (prepare_resume_reply): Change prototype to take a
13314 target_waitstatus. Adjust.
13315
13316 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13317 interface.
13318 * spu-low.c (spu_wait): Adjust.
13319 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13320 Delete.
13321 (win32_wait): Adjust.
13322
2bd7c093
PA
133232009-04-01 Pedro Alves <pedro@codesourcery.com>
13324
13325 * target.h (struct thread_resume): Delete leave_stopped member.
13326 (struct target_ops): Add a `n' argument to the `resume' callback.
13327 * server.c (start_inferior): Adjust.
13328 (handle_v_cont, myresume): Adjust.
13329 * linux-low.c (check_removed_breakpoint): Adjust to resume
13330 interface change, and to removed leave_stopped field.
13331 (resume_ptr): Delete.
13332 (struct thread_resume_array): New.
13333 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13334 resume interface change.
13335 (linux_continue_one_thread, linux_queue_one_thread)
13336 (resume_status_pending_p): Check if the resume field is NULL
13337 instead of checking the leave_stopped member.
13338 (linux_resume): Adjust to the target resume interface change.
13339 * spu-low.c (spu_resume): Adjust to the target resume interface
13340 change.
13341 * win32-low.c (win32_detach, win32_resume): Ditto.
13342
c35fafde
PA
133432009-04-01 Pedro Alves <pedro@codesourcery.com>
13344
13345 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13346 flag.
13347 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13348 pending.
13349 (linux_continue_one_thread): Only preserve the stepping flag if
13350 there's a pending breakpoint.
13351
0a59d50b
PA
133522009-03-31 Pedro Alves <pedro@codesourcery.com>
13353
13354 * server.c (main): After the inferior having exited, call
13355 remote_close before exiting gdbserver.
13356
f04c6d38
TJB
133572009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13358
13359 Fix size of FPSCR in Power 7 processors.
13360 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13361 (PPC_FEATURE_HAS_DFP): New #define.
13362 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13363 size of the FPSCR.
13364
78e5cee6
PA
133652009-03-23 Pedro Alves <pedro@codesourcery.com>
13366
13367 * server.c (handle_query) Whitespace and formatting.
13368
1b3f6016
PA
133692009-03-22 Pedro Alves <pedro@codesourcery.com>
13370
13371 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13372 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13373 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13374 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13375 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13376 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13377 Makefile.in, configure.ac: Fix whitespace throughout.
13378 * configure: Regenerate.
13379
a07b2135
PA
133802009-03-22 Pedro Alves <pedro@codesourcery.com>
13381
13382 * inferiors.c (find_inferior): Make it safe for the callback
13383 function to delete the currently iterated inferior.
13384
67cc2626
PA
133852009-03-22 Pedro Alves <pedro@codesourcery.com>
13386
13387 * Makefile.in (linuw_low_h): Move higher.
13388 (thread-db.o): Depend on $(linux_low_h).
13389
54a0b537
PA
133902009-03-17 Pedro Alves <pedro@codesourcery.com>
13391
13392 Rename "process" to "lwp" throughout.
13393
13394 * linux-low.c (all_processes): Rename to...
13395 (all_lwps): ... this.
13396 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13397 (add_process): Rename to ...
13398 (add_lwp): ... this. Adjust.
13399 (linux_create_inferior): Adjust.
13400 (linux_attach_lwp): Adjust.
13401 (linux_attach): Adjust.
13402 (linux_kill_one_process): Rename to ...
13403 (linux_kill_one_lwp): ... this. Adjust.
13404 (linux_kill): Adjust.
13405 (linux_detach_one_process): Rename to ...
13406 (linux_detach_one_lwp): ... this. Adjust.
13407 (linux_detach): Adjust.
13408 (check_removed_breakpoint): Adjust.
13409 (status_pending_p): Adjust.
13410 (linux_wait_for_process): Rename to ...
13411 (linux_wait_for_lwp): ... this. Adjust.
13412 (linux_wait_for_event): Adjust.
13413 (send_sigstop): Adjust.
13414 (wait_for_sigstop): Adjust.
13415 (stop_all_processes): Rename to ...
13416 (stop_all_lwps): ... this.
13417 (linux_resume_one_process): Rename to ...
13418 (linux_resume_one_lwp): ... this. Adjust.
13419 (linux_set_resume_request, linux_continue_one_thread)
13420 (linux_queue_one_thread, resume_status_pending_p)
13421 (usr_store_inferior_registers, regsets_store_inferior_registers)
13422 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13423 Adjust.
13424 * linux-low.h (get_process): Rename to ...
13425 (get_lwp): ... this. Adjust.
13426 (get_thread_process): Rename to ...
13427 (get_thread_lwp): ... this. Adjust.
13428 (get_process_thread): Rename to ...
13429 (get_lwp_thread): ... this. Adjust.
13430 (struct process_info): Rename to ...
13431 (struct lwp_info): ... this.
13432 (all_processes): Rename to ...
13433 (all_lwps): ... this.
13434 * proc-service.c (ps_lgetregs): Adjust.
13435 * thread-db.c (thread_db_create_event, find_one_thread)
13436 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13437
0b16c5cf
PA
134382009-03-14 Pedro Alves <pedro@codesourcery.com>
13439
13440 * server.c (handle_query): Handle "qAttached".
13441
32de4b9d
NS
134422009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13443
13444 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13445 GPLv3, update license URL.
13446
2aecd87f
DE
134472009-03-01 Doug Evans <dje@google.com>
13448
93efd302 13449 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13450 (server_h): Add gdb_signals.h.
13451 (signals.o): Update.
13452 * server.h (target_signal_from_host,target_signal_to_host_p)
13453 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13454
86b1f9c5
PM
134552009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13456
13457 * remote-utils.c (getpkt): Also generate remote-debug
13458 information if noack_mode is set.
13459
4aa995e1
PA
134602009-02-06 Pedro Alves <pedro@codesourcery.com>
13461
13462 * server.c (handle_query): Report qXfer:siginfo:read and
13463 qXfer:siginfo:write as supported and handle them.
13464 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13465 * linux-low.c (linux_xfer_siginfo): New.
13466 (linux_target_ops): Set it.
13467
62709adf
PA
134682009-01-26 Pedro Alves <pedro@codesourcery.com>
13469
13470 * server.c (gdbserver_usage): Mention --remote-debug.
13471 (main): Accept '--remote-debug' switch.
13472
aef93bd7
DE
134732009-01-18 Doug Evans <dje@google.com>
13474
13475 * regcache.c (new_register_cache): No need to check result of xcalloc.
13476 * server.c (handle_search_memory): Back out calls to xmalloc,
13477 result is checked and error is returned to user upon failure.
13478 (handle_query): Ditto. Add more checks for result of malloc.
13479 (handle_v_cont): Check result of malloc, report error back to
13480 user upon failure.
13481 (handle_v_run): Ditto. Call freeargv.
13482 * server.h (freeargv): Declare.
13483 * utils.c (freeargv): New fn.
13484
54363045
DE
134852009-01-15 Doug Evans <dje@google.com>
13486
f626972c
DE
13487 * gdbreplay.c (perror_with_name): Make arg const char *.
13488 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13489 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13490 * utils.c (perror_with_name): Make arg const char *.
54363045 13491
18aae699
PA
134922009-01-14 Pedro Alves <pedro@codesourcery.com>
13493
13494 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13495 when handling a EXIT_PROCESS_DEBUG_EVENT.
13496
ff703abe
JB
134972009-01-06 Joel Brobecker <brobecker@adacore.com>
13498
13499 * gdbreplay.c (gdbreplay_version): Update copyright year.
13500 * server.c (gdbserver_version): Likewise.
13501
f21cc1a2 135022009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13503
13504 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13505 (handle_extended_wait): Improve comment.
0e21c1ec 13506
bca929d3
DE
135072008-12-13 Doug Evans <dje@google.com>
13508
13509 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13510 * server.h (ATTR_MALLOC): New macro.
13511 (xmalloc,xcalloc,xstrdup): Declare.
13512 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13513 * inferiors.c: Ditto.
13514 * linux-low.c: Ditto.
13515 * mem-break.c: Ditto.
13516 * regcache.c: Ditto.
13517 * remote-utils.c: Ditto.
13518 * server.c: Ditto.
13519 * target.c: Ditto.
13520 * win32-low.c: Ditto.
13521
97438e3f
DE
135222008-12-12 Doug Evans <dje@google.com>
13523
896c7fbb
DE
13524 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13525 in debugging printf.
13526
97438e3f
DE
13527 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13528
e3b886f8
DE
135292008-12-09 Doug Evans <dje@google.com>
13530
13531 * linux-low.h (struct process_info): Delete member tid, unused.
13532 * thread-db.c (find_one_thread): Update.
13533 (maybe_attach_thread): Update.
13534
07e059b5
VP
135352008-12-02 Pedro Alves <pedro@codesourcery.com>
13536
889bf7c5
PA
13537 * target.h (struct target_ops): Add qxfer_osdata member.
13538 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13539 and dirent.h.
13540 (linux_qxfer_osdata): New functions.
13541 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13542 callback.
13543 * server.c (handle_query): Handle "qXfer:osdata:read:".
13544 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13545 (buffer_xml_printf): New functions.
13546 * server.h (struct buffer): New.
13547 (buffer_grow_str, buffer_grow_str0): New macros.
13548 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13549 (buffer_xml_printf): Declare.
07e059b5 13550
4cab47ab
DE
135512008-11-24 Doug Evans <dje@google.com>
13552
13553 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13554
f142445f
DJ
135552008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13556
13557 * server.c (handle_v_run): Always use the supplied argument list.
13558
d0107bb6 135592008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13560
d0107bb6
BW
13561 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13562 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13563
2c4ad781
TJB
135642008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13565
13566 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13567 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13568 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13569 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13570 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13571 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13572 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13573 XML target descriptions.
13574 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13575 when inferior is running on an ISA 2.05 or later processor. Add
13576 special case to return offset for full 64-bit slot of FPSCR when
13577 in 32-bits.
13578
dfb64f85
DJ
135792008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13580
13581 * Makefile.in (SFILES, clean): Added sparc64 files.
13582 (reg-sparc64.o, reg-sparc64.c): New.
13583 * configure.srv (sparc*-*-linux*): New configuration.
13584 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13585 syscall arguments for SPARC.
13586 (regsets_store_inferior_registers): Likewise.
13587 * linux-sparc-low.c: New file.
13588
66b6e1dd
DE
135892008-10-21 Doug Evans <dje@google.com>
13590
13591 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13592 (READLINE_DIR,READLINE_DEP): Delete.
13593 (INTERNAL_CFLAGS): Update.
13594 (LINTFLAGS): Update.
13595
9b710a42
PA
135962008-10-10 Pedro Alves <pedro@codesourcery.com>
13597
13598 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13599 whole argv from the last run, not just argv[0].
13600
5822d809
PA
136012008-09-08 Pedro Alves <pedro@codesourcery.com>
13602
13603 * regcache.c (new_register_cache): Return NULL if the register
13604 cache size isn't known yet.
13605 (free_register_cache): Avoid dereferencing a NULL regcache.
13606
74aac56f
DJ
136072008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13608
13609 * configure.srv: Merge MIPS and MIPS64.
13610
400b20f5
MR
136112008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13612
13613 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13614
677c5bb1
LM
136152008-08-18 Luis Machado <luisgpm@br.ibm.com>
13616
13617 * Makefile.in: Add required vsx dependencies.
13618
13619 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13620 Declare init_registers_powerpc_vsx32l.
13621 Declare init_registers_powerpc_vsx64l.
13622 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13623 (ppc_arch_setup): Check for VSX in hwcap.
13624 (ppc_fill_vsxregset): New function.
13625 (ppc_store_vsxregset): New function.
13626 Add new VSX entry in regset_info target_regsets.
13627
13628 * configure.srv: Add new VSX dependencies.
13629
a6f3e723
SL
136302008-08-12 Pedro Alves <pedro@codesourcery.com>
13631
13632 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13633 (remote_open): Set or clear transport_is_reliable.
13634 (putpkt_binary): Don't expect acks in noack mode.
13635 (getpkt): Don't send ack/nac in noack mode.
13636 * server.c (handle_general_set): Handle QStartNoAckMode.
13637 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13638 qSupported.
13639 (main): Reset noack_mode on every connection.
13640 * server.h (noack_mode): Declare.
13641
a417dc56
RW
136422008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13643
13644 * Makefile.in (GDBREPLAY_OBS): New variable.
13645 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13646
3221518c
UW
136472008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13648 Daniel Jacobowitz <dan@codesourcery.com>
13649
13650 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13651 (usr_store_inferior_registers): Likewise.
13652 (regsets_store_inferior_registers): Likewise.
13653
ec56be1b
PA
136542008-07-31 Rolf Jansen <rj@surtec.com>
13655 Pedro Alves <pedro@codesourcery.com>
13656
13657 * configure.ac: Check for memmem declaration.
13658 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13659 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13660 (disable_packet_qfThreadInfo): Unconditionally compile.
13661 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13662 * configure, config.in: Regenerate.
13663
2fe5e3ff
DE
136642008-07-28 Doug Kwan <dougkwan@google.com>
13665
13666 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13667 (linux_write_memory): Remove declaration of errno.
13668
836acd6d
UW
136692008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13670
13671 * linux-low.c (handle_extended_wait): Do not use "status"
13672 variable uninitialized.
13673
aeba519e
PA
136742008-07-07 Pedro Alves <pedro@codesourcery.com>
13675
13676 * server.c (handle_v_attach): Inhibit reporting dll changes.
13677
db42f210
PA
136782008-06-27 Pedro Alves <pedro@codesourcery.com>
13679
13680 * remote-utils.c (prepare_resume_reply): If requested, don't
13681 output "thread:TID" in the T stop reply.
13682
13683 * server.c (disable_packet_vCont, disable_packet_Tthread)
13684 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13685 (handle_query): If requested, disable support for qC, qfThreadInfo
13686 and qsThreadInfo.
13687 (handle_v_requests): If requested, disable support for vCont.
13688 (gdbserver_show_disableable): New.
13689 (main): Handle --disable-packet and --disable-packet=LIST.
13690
13691 * server.h (disable_packet_vCont, disable_packet_Tthread)
13692 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13693
8e4c5421
CD
136942008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13695
13696 * server.c (gdbserver_usage): Mention --version.
13697
6e23a804
DJ
136982008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13699
13700 * Makefile.in (gdbreplay.o): New rule.
13701
90aa6a40
JM
137022008-06-06 Joseph Myers <joseph@codesourcery.com>
13703
13704 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13705 message, not gdbserver.
13706
c16158bc 137072008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13708 Nathan Sidwell <nathan@codesourcery.com>
13709 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13710
13711 * acinclude.m4: Include ../../config/acx.m4.
13712 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13713 * configure, config.in: Regenerate.
13714 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13715 * server.c (gdbserver_version): Print PKGVERSION.
13716 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13717 (main): Adjust gdbserver_usage calls.
13718 * gdbreplay.c (version, host_name): Add declarations.
13719 (gdbreplay_version, gdbreplay_usage): New.
13720 (main): Accept --version and --help options.
13721
aeb75bf5
DJ
137222008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13723
13724 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13725 (arm_breakpoint_at): Handle Thumb.
13726 (the_low_target): Add comment.
13727
76b233dd
UW
137282008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13729
13730 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13731
08388c79
DE
137322008-05-09 Doug Evans <dje@google.com>
13733
a3c83fae
DE
13734 * server.h (decode_search_memory_packet): Declare.
13735 * remote-utils.c (decode_search_memory_packet): New fn.
13736 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13737 (handle_search_memory): New fn.
13738 (handle_query): Process qSearch:memory packets.
13739
bb9c3d36
UW
137402008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13741
13742 * regcache.c (registers_length): Remove.
13743 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13744 full register packet.
13745 * regcache.h (registers_length): Remove prototype.
13746 * server.h (PBUFSIZ): Define to 16384.
13747
7284e1be
UW
137482008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13749
13750 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13751 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13752 powerpc-64l.o, and powerpc-altivec64l.o.
13753 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13754 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13755 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13756 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13757 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13758 to srv_xmlfiles.
13759
13760 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13761 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13762 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13763 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13764 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13765 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13766 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13767 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13768 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13769 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13770 (clean): Update.
13771
13772 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13773 (init_registers_powerpc_32l): ... this new prototype.
13774 (init_registers_powerpc_32): Remove, replace by ...
13775 (init_registers_powerpc_altivec32l): ... this new prototype.
13776 (init_registers_powerpc_e500): Remove, replace by ...
13777 (init_registers_powerpc_e500l): ... this new prototype.
13778 (init_registers_ppc64): Remove, replace by ...
13779 (init_registers_powerpc_64l): ... this new prototype.
13780 (init_registers_powerpc_64): Remove, replace by ...
13781 (init_registers_powerpc_altivec64l): ... this new prototype.
13782 (ppc_num_regs): Set to 73.
13783 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13784 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13785 (ppc_cannot_store_register): Handle orig_r3 and trap.
13786 (ppc_arch_setup): Update init_registers_... calls.
13787 (ppc_fill_gregset): Handle orig_r3 and trap.
13788
13789 * inferiors.c (clear_inferiors): Reset current_inferior.
13790
fdc59709
PB
137912008-04-23 Paolo Bonzini <bonzini@gnu.org>
13792
889bf7c5
PA
13793 * acinclude.m4: Add override.m4.
13794 * configure: Regenerate.
fdc59709 13795
c9b2f845
UW
137962008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13797
13798 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13799 initial call to init_register_ppc64.
13800
550512b8
UW
138012008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13802
43aaf8b6
PA
13803 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13804 single powerpc*-*-linux* case.
550512b8
UW
13805 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13806
b6430ec3
UW
138072008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13808
13809 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13810 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13811 from reg_xmlfiles.
13812 * linux-ppc-low.c: Include <elf.h>.
13813 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13814 (ppc_hwcap): New global variable.
13815 (ppc_regmap): Remove __SPE__ #ifdef sections.
13816 (ppc_regmap_e500): New global variable.
13817 (ppc_cannot_store_register): Update __SPE__ special case.
13818 (ppc_get_hwcap): New function.
13819 (ppc_arch_setup): Use it to determine whether inferior supports
13820 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13821 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13822 Do not access registers if target does not support AltiVec.
13823 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13824 Do not access registers if target does not support SPE.
13825 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13826
52fa2412
UW
138272008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13828
13829 * linux-low.c (disabled_regsets, num_regsets): New.
13830 (use_regsets_p): Delete.
13831 (linux_wait_for_process): Clear disabled_regsets.
13832 (regsets_fetch_inferior_registers): Check and set it.
13833 (regsets_store_inferior_registers): Likewise.
13834 (linux_fetch_registers, linux_store_registers): Do not use
13835 use_regsets_p.
13836 (initialize_low): Allocate disabled_regsets.
13837
e28b3332
DJ
138382008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13839
13840 * Makefile.in (LIBOBJS): New.
13841 (OBS): Use LIBOBJS.
13842 (memmem.o): New rule.
13843 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13844 * configure: Regenerated.
13845
4536995d
UW
138462008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13847
13848 * server.c (handle_query): Never return "unsupported" for
13849 qXfer:features:read queries.
13850
221c031f
UW
138512008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13852
13853 * server.c (get_features_xml): Fix inverted condition.
13854 (handle_query): Always support qXfer:feature:read.
13855
ccd213ac
DJ
138562008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13857
13858 * server.c (wrapper_argv): New.
13859 (start_inferior): Handle wrapper_argv. If set, expect an extra
13860 trap.
13861 (gdbserver_usage): Document --wrapper.
13862 (main): Parse --wrapper.
13863
6fe305f7
UW
138642008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13865
13866 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13867 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13868 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13869 (ppc_set_pc): Likewise.
13870 (ppc_arch_setup): New function.
13871 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13872 of collect_register.
889bf7c5 13873 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13874
5b0a002e
UW
138752008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13876
13877 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13878 instead of linux-ppc64-low.o.
13879 * linux-ppc64-low.c: Remove file.
13880 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13881 (linux-ppc64-low.o): Remove rule.
13882
13883 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13884 (init_registers_powerpc_64): Likewise.
13885 (ppc_regmap): Conditionally define depending on __powerpc64__.
13886 (ppc_cannot_store_register): Do not special-case "fpscr" when
13887 compiled on __powerpc64__.
13888 (ppc_collect_ptrace_register): New function.
13889 (ppc_supply_ptrace_register): New function.
13890 (ppc_breakpoint): Change type to "unsigned int".
13891 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13892 (the_low_target): Conditionally provide initializers for the
889bf7c5 13893 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13894 collect_ptrace_register and supply_ptrace_register members.
13895
9b4b61c8
UW
138962008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13897
13898 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13899 * server.c (gdbserver_xmltarget): Define.
13900 (get_features_xml): Use it to replace "target.xml" and arch_string.
13901
13902 * configure.srv: Remove srv_xmltarget. Add XML files that were
13903 mentioned there to srv_xmlfiles instead. Remove conditional tests
13904 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13905 srv_xmlfiles and srv_regobj to include all possible choices.
13906 * configure.ac (srv_xmltarget): Remove.
13907 (srv_xmlfiles): Do not add "target.xml".
13908 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13909 checks for supplementary target information.
13910 * configure: Regenerate.
13911 * Makefile.in (XML_TARGET): Remove.
13912 (target.xml): Remove rule.
13913 (clean): Do not clean up target.xml.
13914 (.PRECIOUS): Do not mention target.xml.
13915
13916 * target.h (struct target_ops): Remove arch_string member.
13917 * linux-low.c (linux_arch_string): Remove.
13918 (linux_target_ops): Remove arch_string initializer.
13919 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13920 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13921 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13922 * spu-low.c (spu_arch_string): Remove.
13923 (spu_target_ops): Remove arch_string initializer.
13924 * win32-low.c (win32_arch_string): Remove.
13925 (win32_target_ops): Remove arch_string initializer.
13926 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13927 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13928 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13929
ee1a7ae4
UW
139302008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13931
13932 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13933 by collect_ptrace_register and supply_ptrace_register hooks.
13934 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13935 instead of checking for the_low_target.left_pad_xfer.
13936 (usr_store_inferior_registers): Use collect_ptrace_register callback
13937 instead of checking for the_low_target.left_pad_xfer.
13938
13939 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13940 (s390_supply_ptrace_register): Likewise.
13941 (s390_fill_gregset): Call s390_collect_ptrace_register.
13942 (the_low_target): Update.
13943
13944 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13945 (ppc_supply_ptrace_register): Likewise.
13946 (the_low_target): Update.
13947
13948 * linux-i386-low.c (the_low_target): Update.
13949 * linux-x86-64-low.c (the_low_target): Update.
13950
d61ddec4
UW
139512008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13952
13953 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13954 reg-s390.o and reg-s390x.o.
13955
13956 * linux-low.c (new_inferior): New global variable.
13957 (linux_create_inferior, linux_attach): Set it.
13958 (linux_wait_for_process): Call the_low_target.arch_setup after the
13959 target has stopped for the first time.
13960 (initialize_low): Do not call the_low_target.arch_setup.
13961
13962 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13963 (s390_set_pc): Likewise.
13964 (s390_arch_setup): New function.
13965 (the_low_target): Use s390_arch_setup as arch_setup routine.
13966
13967 * regcache.c (realloc_register_cache): New function.
13968 (set_register_cache): Call it for each existing regcache.
13969
d05b4ac3
UW
139702008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13971
13972 * server.h (init_registers): Remove prototype.
13973
13974 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13975 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13976 instead of init_registers ().
13977 * linux-arm-low.c (init_registers_arm): Add prototype.
13978 (init_registers_arm_with_iwmmxt): Likewise.
13979 (the_low_target): Add initializer for arch_setup field.
13980 * linux-cris-low.c (init_registers_cris): Add prototype.
13981 (the_low_target): Add initializer for arch_setup field.
13982 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13983 (the_low_target): Add initializer for arch_setup field.
13984 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13985 (the_low_target): Add initializer for arch_setup field.
13986 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13987 (the_low_target): Add initializer for arch_setup field.
13988 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13989 (the_low_target): Add initializer for arch_setup field.
13990 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13991 (the_low_target): Add initializer for arch_setup field.
13992 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13993 (init_registers_mips64_linux): Likewise.
13994 (the_low_target): Add initializer for arch_setup field.
13995 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13996 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13997 (the_low_target): Add initializer for arch_setup field.
13998 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13999 (init_registers_powerpc_64): Likewise.
14000 (the_low_target): Add initializer for arch_setup field.
14001 * linux-s390-low.c (init_registers_s390): Add prototype.
14002 (init_registers_s390x): Likewise.
14003 (the_low_target): Add initializer for arch_setup field.
14004 * linux-sh-low.c (init_registers_sh): Add prototype.
14005 (the_low_target): Add initializer for arch_setup field.
14006 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14007 (the_low_target): Add initializer for arch_setup field.
14008 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14009 (the_low_target): Add initializer for arch_setup field.
14010
14011 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14012 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14013 instead of init_registers ().
14014 * win32-arm-low.c (init_registers_arm): Add prototype.
14015 (the_low_target): Add initializer for arch_setup field.
14016 * win32-i386-low.c (init_registers_i386): Add prototype.
14017 (the_low_target): Add initializer for arch_setup field.
14018
14019 * spu-low.c (init_registers_spu): Add prototype.
14020 (initialize_low): Call initialie_registers_spu () instead of
14021 initialize_registers ().
14022
fd96d250
PA
140232008-02-19 Pedro Alves <pedro@codesourcery.com>
14024
14025 * server.c (handle_v_requests): When handling the vRun and vAttach
14026 packets, if already debugging a process, don't kill it. Return an
14027 error instead.
14028
d41b6bb4
DJ
140292008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14030
14031 * server.c (handle_query): Correct length check.
14032
5ac588cf
PA
140332008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14034
14035 * win32-low.c (do_initial_child_stuff): Add process handle
14036 parameter. Set current_process_handle and current_process_id from the
14037 parameters. Clear globals.
14038 (win32_create_inferior): Don't set current_process_handle and
14039 current_process_id here. Instead pass them on the call to
14040 do_initial_child_stuff.
14041 (win32_attach): Likewise.
14042 (win32_clear_inferiors): New.
14043 (win32_kill): Don't close the current process handle or the
14044 current thread handle here. Instead call win32_clear_inferiors.
14045 (win32_detach): Don't open a new handle to the process. Call
14046 win32_clear_inferiors.
14047 (win32_join): Don't rely on current_process_handle; open a new
14048 handle using the process id.
14049 (win32_wait): Call win32_clear_inferiors when the inferior process
14050 has exited.
14051
ecd7ecbc
DJ
140522008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14053
14054 * server.c (monitor_show_help): Add "exit".
14055
1525d545
MG
140562008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14057
ecd7ecbc 14058 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14059 (clean): Add reg-xtensa.c.
14060 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14061 * configure.srv (xtensa*-*-linux*) New target.
14062 * linux-xtensa-low.c: New.
14063 * xtensa-xtregs.c: New.
1525d545 14064
59a016f0
PA
140652008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14066
14067 * hostio.c: Don't include errno.h.
14068 (errno_to_fileio_errno): Move to hostio-errno.
14069 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14070 error number outputting to the target->hostio_last_error callback.
14071 (hostio_packet_error): Use FILEIO_EINVAL directly.
14072 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14073 calls to hostio_error.
14074 * hostio-errno.c: New.
14075 * server.h (hostio_last_error_from_errno): Declare.
14076 * target.h (target_ops): Add hostio_last_error member.
14077 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14078 as hostio_last_error handler.
889bf7c5 14079 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14080 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14081 (wince_hostio_last_error): New functions.
14082 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14083 as hostio_last_error handler.
14084 (win32_target_ops) [!_WIN32_WCE]: Register
14085 hostio_last_error_from_errno as hostio_last_error handler.
14086 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14087 (hostio-errno.o): New rule.
14088 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14089 * configure.srv (srv_hostio_err_objs): New variable. Default to
14090 hostio-errno.o.
14091 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14092 * configure: Regenerate.
14093
2d717e4f
DJ
140942008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14095
14096 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14097 (linux_kill, linux_detach): Clean up the process list.
14098 * remote-utils.c (remote_open): Improve port number parsing.
14099 (putpkt_binary, input_interrupt): Only send interrupts if the target
14100 is running.
14101 * server.c (extended_protocol): Make static.
14102 (attached): Define earlier.
14103 (exit_requested, response_needed, program_argv): New variables.
14104 (target_running): New.
14105 (start_inferior): Clear attached here.
14106 (attach_inferior): Set attached here.
14107 (require_running): Define.
14108 (handle_query): Use require_running and target_running. Implement
14109 "monitor exit".
14110 (handle_v_attach, handle_v_run): New.
14111 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14112 (gdbserver_usage): Update.
14113 (main): Redo argument parsing. Handle --debug and --multi. Handle
14114 --attach along with other options or after the port. Save
14115 program_argv. Support no initial program. Resynchronize
14116 communication with GDB after an error. Handle "monitor exit".
14117 Use require_running and target_running. Always allow the extended
14118 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14119 restart in extended mode.
14120 * README: Refer to the GDB manual. Update --attach usage.
14121
7407e2de
AS
141222007-12-20 Andreas Schwab <schwab@suse.de>
14123
14124 * linux-low.c (STACK_SIZE): Define.
14125 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14126 (linux_test_for_tracefork): Likewise.
14127
b65d95c5
DJ
141282007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14129
14130 * linux-low.c (linux_wait_for_event): Update messages. Do not
14131 reinsert auto-delete breakpoints.
14132 * mem-break.c (struct breakpoint): Change return type of handler to
14133 int.
14134 (set_breakpoint_at): Update handler type.
14135 (reinsert_breakpoint_handler): Return 1 instead of calling
14136 delete_breakpoint.
14137 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14138 setting a new one.
14139 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14140 * mem-break.h (set_breakpoint_at): Update handler type.
14141 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14142 * win32-low.c (auto_delete_breakpoint): New.
14143 (get_child_debug_event): Use it.
14144
4e799345
DJ
141452007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14146
14147 * configure.ac: Check for pread and pwrite.
14148 * hostio.c (handle_pread): Fall back to lseek and read.
14149 (handle_pwrite): Fall back to lseek and write.
14150 * config.in, configure: Regenerated.
14151
27524b67
DJ
141522007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14153
14154 * server.c (myresume): Add own_buf argument.
14155 (main): Update calls.
14156
a20d5e98
DJ
141572007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14158
14159 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14160 * remote-utils.c (remote_open): Do not call disable_async_io.
14161 (block_async_io): Delete.
14162 (unblock_async_io): Make static.
14163 (initialize_async_io): New.
14164 * server.c (handle_v_cont): Handle async I/O here.
14165 (myresume): Likewise. Move other common resume tasks here...
14166 (main): ... from here. Call initialize_async_io. Disable async
14167 I/O before the main loop.
14168 * server.h (initialize_async_io): Declare.
14169 (block_async_io, unblock_async_io): Delete prototypes.
14170 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14171
b79d787e
DJ
141722007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14173
14174 * remote-utils.c (readchar): Allow binary data in received messages.
14175
d97903b2
PA
141762007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14177
14178 * win32-low.c (attaching): New global.
14179 (win32_create_inferior): Clear the `attaching' global.
14180 (win32_attach): Set the `attaching' global.
14181 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14182 attaching. Only set a breakpoint at the entry point if not
14183 attaching.
14184
311de423
PA
141852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14186
14187 * server.c (main): Don't report dll events on the initial
14188 connection on attaches.
14189
6c2d16d2
PA
141902007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14191
14192 * server.c (main): Relax numerical bases supported for the pid of
14193 the --attach command line argument.
14194
5ca906e6
PA
141952007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14196
14197 * win32-low.c (win32_attach): Call OpenProcess before
14198 DebugActiveProcess, not after. Add last error output to error
14199 call.
14200
9c6c8194
PA
142012007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14202
14203 * win32-low.c (win32_get_thread_context)
14204 (win32_set_thread_context): New functions.
14205 (thread_rec): Use win32_get_thread_context.
14206 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14207 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14208 field.
14209
4d5d1aaa
PA
142102007-12-03 Leo Zayas
14211 Pedro Alves <pedro_alves@portugalmail.pt>
14212
14213 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14214 global variables.
14215 (child_add_thread): Minor cleanup.
14216 (child_continue): Resume artificially suspended threads before
14217 calling ContinueDebugEvent.
14218 (suspend_one_thread): New.
14219 (fake_breakpoint_event): New.
14220 (get_child_debug_event): Change return type to int. Check here if
14221 gdb sent an interrupt request. If a soft interrupt was requested,
14222 fake a breakpoint event. Return 0 if there is no event to handle,
14223 and 1 otherwise.
14224 (win32_wait): Don't check here if gdb sent an interrupt request.
14225 Ensure there is a valid event to handle.
14226 (win32_request_interrupt): Add soft interruption method as last
14227 resort.
14228
c436e841
PA
142292007-12-03 Leo Zayas
14230 Pedro Alves <pedro_alves@portugalmail.pt>
14231
14232 * win32-low.h (win32_thread_info): Add descriptions to the
14233 structure members. Replace `suspend_count' counter by a
14234 `suspended' flag.
14235 * win32-low.c (thread_rec): Update condition of when to get the
14236 context from the inferior. Rely on ContextFlags being set if it
14237 has already been retrieved. Only suspend the inferior thread if
14238 we haven't already. Warn if that fails.
14239 (continue_one_thread): s/suspend_count/suspended/. Only call
14240 ResumeThread once. Warn if that fails.
14241
e7b5fa67
PA
142422007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14243
14244 * win32-low.c (win32_wait): Don't read from the inferior when it
14245 has already exited.
14246
a385171d
PA
142472007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14248
14249 * Makefile.in (win32_low_h): New variable.
14250 (win32-low.o): Add dependency on $(win32_low_h).
14251 (win32-arm-low.o, win32-i386-low.o): New rules.
14252
f80c84b3
DJ
142532007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14254
14255 * hostio.c: Correct copyright year.
14256
a6b151f1
DJ
142572007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14258
14259 * Makefile.in (OBS): Add hostio.o.
14260 (hostio.o): New rule.
14261 * server.h (handle_vFile): Declare.
14262 * hostio.c: New file.
14263 * server.c (handle_v_requests): Take packet_len and new_packet_len
14264 for binary packets. Call handle_vFile.
14265 (main): Update call to handle_v_requests.
14266
f9387fc3
DJ
142672007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14268
14269 * linux-low.c: Include <sched.h>.
14270
51c2684e
DJ
142712007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14272
14273 * linux-low.c (linux_tracefork_grandchild): New.
14274 (linux_tracefork_child): Use clone.
14275 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14276
75f83163
JB
142772007-10-31 Joel Brobecker <brobecker@adacore.com>
14278
14279 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14280
da5898ce
DJ
142812007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14282
14283 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14284
24a09b5f
DJ
142852007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14286
14287 * inferiors.c (change_inferior_id): Delete.
14288 (add_pid_to_list, pull_pid_from_list): New.
14289 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14290 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14291 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14292 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14293 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14294 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14295 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14296 (using_threads): Always set to 1.
14297 (handle_extended_wait): New.
14298 (add_process): Do not set TID.
14299 (linux_create_inferior): Set must_set_ptrace_flags.
14300 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14301 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14302 (linux_thread_alive): Rename TID argument to LWPID.
14303 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14304 (linux_wait_for_event): Do not use TID or check using_threads. Update
14305 call to dead_thread_notify. Call handle_extended_wait.
14306 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14307 (send_sigstop): Delete sigstop_sent.
14308 (wait_for_sigstop): Avoid TID.
14309 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14310 (linux_test_for_tracefork): New.
14311 (linux_lookup_signals): Use thread_db_active and
14312 linux_supports_tracefork_flag.
14313 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14314 * linux-low.h (get_process_thread): Avoid TID.
14315 (struct process_ifo): Move thread_known and tid to the end. Remove
14316 sigstop_sent.
14317 (linux_attach_lwp, thread_db_init): Update prototypes.
14318 * server.h (change_inferior_id): Delete prototype.
14319 (add_pid_to_list, pull_pid_from_list): New prototypes.
14320 * thread-db.c (thread_db_use_events): New.
14321 (find_first_thread): Rename to...
14322 (find_one_thread): ...this. Update callers and messages. Do not
14323 call fatal. Check thread_db_use_events. Do not call
14324 change_inferior_id or new_thread_notify.
14325 (maybe_attach_thread): Update. Do not call new_thread_notify.
14326 (thread_db_init): Set thread_db_use_events. Check use_events.
14327 * utils.c (fatal, warning): Correct message prefix.
14328
30ed0a8f
DJ
143292007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14330
14331 * Makefile.in (clean): Remove new files.
14332 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14333 (powerpc-64.o, powerpc-64.c): New rules.
14334 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14335 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14336 with SPE.
14337 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14338 SPE targets.
14339 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14340 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14341 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14342 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14343 (target_regsets): Add AltiVec and SPE register sets.
14344 * configure.ac: Check for AltiVec and SPE.
14345 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14346 (ppc_fill_vrregset, ppc_store_vrregset): New.
14347 (target_regsets): Add AltiVec register set.
14348 * configure: Regenerated.
14349
fd462a61
DJ
143502007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14351
14352 * linux-low.c (O_LARGEFILE): Define.
14353 (linux_read_memory): Use /proc/PID/mem.
14354 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14355 * configure, config.in: Regenerated.
14356
69f223ed
DJ
143572007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14358
14359 * linux-low.c (linux_wait_for_event): Do not pass signals while
14360 single-stepping.
14361
aec18585
PA
143622007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14363
14364 * win32-low.c (create_process): New.
14365 (win32_create_inferior): Use create_process instead of
14366 CreateProcess. If create_process failed retry appending an ".exe"
14367 suffix. Store the GetLastError result immediatelly after
14368 create_process calls and use it on the call to error.
14369
34d86ddd
PA
143702007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14371
14372 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14373
5a0e3bd0
JB
143742007-08-23 Joel Brobecker <brobecker@adacore.com>
14375
14376 * configure.ac: Switch license to GPLv3.
14377
f88c79e6
MS
143782007-08-01 Michael Snyder <msnyder@access-company.com>
14379
14380 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14381
6b3d9b83
PA
143822007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14383
14384 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14385 typedef.
14386 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14387 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14388 CloseToolhelp32Snapshot.
14389 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14390 CloseToolhelp32Snapshot.
14391
c588c53c
MS
143922007-07-27 Michael Snyder <michael.snyder@access-company.com>
14393
14394 * server.c (main): Check for inferior exit before main loop.
14395
aa0403d9
PA
143962007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14397
14398 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14399 instead of on tmp_desc.
14400
255e7678
DJ
144012007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14402 Daniel Jacobowitz <dan@codesourcery.com>
14403
14404 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14405 (add_thread): Minor cleanups.
14406 (clear_inferiors): Move lower in the file. Clear the DLL
14407 list.
14408 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14409 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14410 (xml_escape_text): New.
14411 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14412 for qSupported.
14413 (handle_v_cont): Report errors.
14414 (gdbserver_version): Update.
14415 (main): Correct size of own_buf. Do not report initial DLL events.
14416 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14417 (unloaded_dll, xml_escape_text): New.
14418 * win32-low.c (enum target_waitkind): Update comments.
14419 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14420 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14421 (win32_EnumProcessModules, win32_GetModuleInformation)
14422 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14423 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14424 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14425 (win32_Module32First, win32_Module32Next, load_toolhelp)
14426 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14427 (get_child_debug_event): Handle DLL events.
14428 (win32_wait): Likewise.
14429
0d37add9
DJ
144302007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14431
14432 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14433 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14434
45e2715e
PA
144352007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14436
14437 * win32-low.c (handle_output_debug_string): Ignore event if not
14438 waiting.
14439
c5674cf1
PA
144402007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14441
14442 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14443
2bbe3cc1
DJ
144442007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14445
14446 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14447
ae13219e
DJ
144482007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14449
14450 * inferiors.c (change_inferior_id): Add comment.
14451 * linux-low.c (check_removed_breakpoint): Add an early
14452 prototype. Improve debug output.
14453 (linux_attach): Doc update.
14454 (linux_detach_one_process, linux_detach): Clean up before releasing
14455 each process.
14456 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14457 * linux-low.h (struct process_info): Doc improvement.
14458 * mem-break.c (delete_all_breakpoints): New.
14459 * mem-break.h (delete_all_breakpoints): New prototype.
14460 * thread-db.c (find_first_thread): New.
14461 (thread_db_create_event): Call it instead of
14462 thread_db_find_new_threads. Clean up unused variables.
14463 (maybe_attach_thread): Remove first thread handling.
14464 (thread_db_find_new_threads): Use find_first_thread.
14465 (thread_db_get_tls_address): Likewise.
14466
4105de34
DJ
144672007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14468
14469 * thread-db.c (thread_db_find_new_threads): Add prototype.
14470 (thread_db_create_event): Check for the main thread before adding
14471 a new thread.
14472 (maybe_attach_thread): Only enable event reporting if TID == 0.
14473 (thread_db_get_tls_address): Check for new threads.
14474
2b876972
DJ
144752007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14476
14477 * linux-low.c (linux_create_inferior): Try execv before execvp.
14478 * spu-low.c (spu_create_inferior): Likewise.
14479
7a245884
DJ
144802007-06-13 Mike Frysinger <vapier@gentoo.org>
14481
14482 * linux-low.c (linux_create_inferior): Change execv to execvp.
14483 * spu-low.c (spu_create_inferior): Likewies.
14484
117ce543
DJ
144852007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14486
14487 * Makefile.in (clean): Clean new files instead of deleted ones.
14488 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14489 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14490 rules.
14491 * configure.srv: Specify XML files and new regformats for MIPS and
14492 MIPS64 GNU/Linux.
14493 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14494 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14495 an entry for the restart register.
14496 (mips_cannot_fetch_register, mips_cannot_store_register)
14497 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14498 register names to match the XML descriptions.
14499 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14500 restart register instead of $0.
14501
0e7f50da
UW
145022007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14503 Markus Deuling <deuling@de.ibm.com>
14504
14505 * remote-utils.c (decode_xfer_write): New function.
14506 * server.h (decode_xfer_write): Add prototype.
14507 * server.c (handle_query): Add PACKET_LEN argument. Support
14508 qXfer:spu:read and qXfer:spu:write packets.
14509 (main): Pass packet_len to handle_query.
14510 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14511 * target.h (target_ops): Add qxfer_spu.
14512
374c1d38
UW
145132007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14514
14515 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14516 accessing non-seekable spufs files.
14517
bb63802a
UW
145182007-05-16 Markus Deuling <deuling@de.ibm.com>
14519
889bf7c5 14520 * server.c (handle_query): Add reply for qC packet.
bb63802a 14521
7390519e
PA
145222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14523 Leo Zayas <lerele@champenstudios@com>
14524
14525 * server.h (check_remote_input_interrupt_request): New function.
14526 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14527 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14528 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14529 (check_remote_input_interrupt_request): New function.
14530 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14531 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14532 winapi_GenerateConsoleCtrlEvent): New typedefs.
14533 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14534 to 250 ms.
14535 (win32_wait): Check for remote interrupt request
14536 with check_remote_input_interrupt_request.
14537 (win32_request_interrupt): New function.
14538 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14539
34b34921
PA
145402007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14541
14542 * win32-low.c (debug_registers_changed,
14543 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14544 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14545 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14546 (thread_rec): Get context using the low target.
14547 (child_add_thread): Call thread_added on the low target,
14548 which does the same thing.
14549 (regptr): Delete.
14550 (do_initial_child_stuff): Remove debug registers references.
14551 Set context using the low target. Resume threads after
14552 setting the contexts.
14553 (child_continue): Remove dead variable. Remove debug
14554 registers references.
14555 (child_fetch_inferior_registers): Go through the low target.
14556 (do_child_store_inferior_registers): Remove.
14557 (child_store_inferior_registers): Go through the low target.
14558 (win32_resume): Remove debug registers references.
14559 Set context using the low target.
14560 (handle_exception): Change return type to void. Don't record
14561 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14562 first chance exception.
889bf7c5 14563 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14564 goto loop. Always return after waiting for debug event.
14565 (win32_wait): Convert to switch statement. Handle spurious
14566 events.
14567
14568 * win32-i386-low.c (debug_registers_changed,
14569 debug_registers_used): New.
14570 (initial_stuff): Rename to ...
14571 (i386_initial_stuff): ... this. Clear debug registers
14572 state variables.
14573 (store_debug_registers): Delete.
14574 (i386_get_thread_context): New.
14575 (load_debug_registers): Delete.
14576 (i386_set_thread_context): New.
14577 (i386_thread_added): New.
14578 (single_step): Rename to ...
14579 (i386_single_step): ... this.
14580 (do_fetch_inferior_registers): Rename to ...
14581 (i386_fetch_inferior_register): ... this.
14582 (i386_store_inferior_register): New.
14583 (the_low_target): Adapt to new interface.
14584
14585 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14586 (arm_get_thread_context): New.
14587 (arm_set_thread_context): New.
14588 (regptr): New.
14589 (do_fetch_inferior_registers): Rename to ...
14590 (arm_fetch_inferior_register): ... this.
14591 (arm_store_inferior_register): New.
14592 (arm_wince_breakpoint): Reimplement as unsigned long.
14593 (arm_wince_breakpoint_len): Define.
14594 (the_low_target): Adapt to new interface.
14595
14596 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14597 load_debug_registers. Add get_thread_context, set_thread_context,
14598 thread_added and store_inferior_register. Rename
14599 fetch_inferior_registers to fetch_inferior_register.
14600 (regptr): Remove declaration.
14601
dd6953e1
PA
146022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14603
14604 * linux-low.c (linux_detach): Change return type to int. Return 0.
14605 * spu-low.c (spu_detach): Likewise.
14606
444d6139
PA
146072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14608
14609 * target.h (target_ops): Change return type of detach to int.
14610 Add join.
14611 (join_inferior): New.
14612 * server.c (main): Don't skip detach support on mingw32.
14613 If the inferior doesn't support detaching return error.
14614 Call join_inferior instead of using waitpid.
14615 * linux-low.c (linux_join): New.
14616 (linux_target_op): Add linux_join.
14617 * spu-low.c (spu_join): New.
14618 (spu_target_ops): Add spu_join.
14619 * win32-low.c (win32_detach): Adapt to new interface.
14620 Reopen current_process_handle before detaching. Issue a child
14621 resume before detaching.
14622 (win32_join): New.
14623 (win32_target_op): Add win32_join.
14624
1d5315fe
PA
146252007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14626
14627 * win32-low.c (win32-attach): Fix return value.
14628 * target.h (target_ops): Describe ATTACH return values.
14629
bf914831
PA
146302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14631
14632 * win32-low.c (GETPROCADDRESS): Define.
14633 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14634 (winapi_DebugSetProcessKillOnExit): Likewise.
14635 (win32_create_inferior): Force usage of ansi CreateProcessA.
14636 (win32_attach): Use GETPROCADDRESS.
14637 (win32_detach): Likewise.
14638
f72f3e60
PA
146392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14640
14641 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14642
ed50f18f
PA
146432007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14644
14645 * win32-low.c: Commit leftover changes from 2007-03-29.
14646
0c2ead7e
DJ
146472007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14648
14649 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14650 fields short instead of int. Add explicit padding.
14651 (i387_cache_to_fsave): Remove unnecessary casts.
14652 (i387_fsave_to_cache): Doc fix.
14653 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14654
73725ff3
DJ
146552007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14656
14657 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14658 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14659
d99f33d8
PA
146602007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14661
14662 * configure.srv (arm*-*-mingw32ce*): Move near the other
14663 arm targets.
14664
68070c10
PA
146652007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14666
2482afc6 14667 * configure.ac: Add errno checking.
68070c10
PA
14668 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14669 sys/file.h and malloc.h.
14670 (AC_CHECK_DECLS): Add perror.
14671 (srv_mingwce): Handle.
2482afc6 14672 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14673 win32-i386-low.o to srv_tgtobj.
14674 (i[34567]86-*-mingw*): Likewise.
14675 (arm*-*-mingw32ce*): Add case.
14676 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14677 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14678 [__MINGW32CE__] (strerror): New function.
14679 [__MINGW32CE__] (errno): Define to GetLastError.
14680 [__MINGW32CE__] (COUNTOF): New macro.
14681 (remote_open): Remove extra close call.
14682 * mem-break.c (delete_breakpoint_at): New function.
14683 * mem-break.h (delete_breakpoint_at): Declare.
14684 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14685 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14686 [USE_WIN32API] (read, write): Add char* casts.
14687 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14688 * server.h: Include wincecompat.h on Windows CE.
14689 [HAVE_ERRNO_H]: Check.
14690 (perror): Declare if not declared.
14691 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14692 (perror_with_name): Remove errno declaration.
14693 * wincecompat.h: New.
14694 * wincecompat.c: New.
14695 * win32-low.h: New.
14696 * win32-arm-low.c: New.
14697 * win32-i386-low.c: New.
14698 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14699 (OUTMSG2): Make it safe.
14700 (_T): New macro.
14701 (COUNTOF): New macro.
14702 (NUM_REGS): Get it from the low target.
14703 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14704 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14705 (thread_rec): Let low target handle debug registers.
14706 (child_add_thread): Likewise.
14707 (child_init_thread_list): Likewise.
14708 (continue_one_thread): Likewise.
14709 (regptr): New.
14710 (do_child_fetch_inferior_registers): Move to ...
14711 * win32-i386-low.c: ... here, and rename to ...
14712 (do_fetch_inferior_registers): ... this.
889bf7c5 14713 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14714 Go through the low target.
14715 (do_child_store_inferior_registers): Use regptr.
14716 (strwinerror): New function.
14717 (win32_create_inferior): Handle Windows CE.
14718 Use strwinerror instead of strerror on Windows error
14719 codes. Add program to the error output.
14720 Don't close the main thread handle on Windows CE.
14721 (win32_attach): Use coredll.dll on Windows CE.
14722 (win32_kill): Close current process and current
14723 thread handles.
14724 (win32_detach): Use coredll.dll on Windows CE.
14725 (win32_resume): Let low target handle debug registers, and
14726 step request.
14727 (handle_exception): Add/Remove initial breakpoint. Avoid
14728 non-existant WSTOPSIG on Windows CE.
14729 (win32_read_inferior_memory): Cast to remove warning.
14730 (win32_arch_string): Go through the low target.
14731 (initialize_low): Call set_breakpoint_data with the low
14732 target's breakpoint.
14733 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14734 FOP_REGNUM, mappings): Move to ...
14735 * win32-i386-low.c: ... here.
14736 * win32-low.c (win32_thread_info): Move to ...
14737 * win32-low.h: ... here.
14738 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14739 win32-arm-low.c and wincecompat.c.
14740 (all:): Add $EXEEXT.
14741 (install-only:): Likewise.
14742 (gdbserver:): Likewise.
14743 (gdbreplay:): Likewise.
14744 * config.in: Regenerate.
14745 * configure: Regenerate.
14746
41093d81
PA
147472007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14748
14749 * win32-low.c: Rename typedef thread_info to
14750 win32_thread_info throughout.
14751
544afa54
PA
147522007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14753
14754 * win32-i386-low.c: Rename to ...
14755 * win32-low.c: ... this.
14756 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14757 * Makefile.in: Likewise.
14758
bce7165d
PA
147592007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14760
14761 * remote-utils.c (monitor_output): Constify msg parameter.
14762 * server.h (monitor_output): Likewise.
14763 * win32-i386-low.c (handle_output_debug_string): New.
14764 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14765 handle_output_debug_string.
14766 (get_child_debug_event): Likewise.
14767
506c7aa0
DJ
147682007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14769
14770 * server.c (main): Correct strtoul check.
14771
42c81e2a
DJ
147722007-03-27 Jon Ringle <jon@ringle.org>
14773
14774 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14775
9453113a
DJ
147762007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14777
14778 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14779
64a69107
DJ
147802007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14781
14782 * terminal.h: Check HAVE_SGTTY_H.
14783
147842007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14785
14786 * remote-utils.c (remote_open): Print out the assigned port number.
14787
c74d0ad8
DJ
147882007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14789
14790 * remote-utils.c (monitor_output): New function.
14791 * server.c (debug_threads): Define here.
14792 (monitor_show_help): New function.
14793 (handle_query): Handle qRcmd.
14794 (main): Do not handle 'd' packet.
14795 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14796 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14797 of debug_threads.
14798
de7c3b4a
PA
147992007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14800
14801 * Makefile.in (EXEEXT): New.
14802 (clean): Use $(EXEEXT).
14803
ef57601b
PA
148042007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14805
14806 * target.h (target_ops): Rename send_signal to request_interrupt,
14807 and remove enum target_signal parameter.
14808 * linux-low.c (linux_request_interrupt): Rename from
14809 linux_send_signal, and always send SIGINT.
14810 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14811 and always send SIGINT.
14812 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14813 of send_signal.
14814 (input_interrupt): Likewise.
14815
820f2bda
PA
148162007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14817
14818 * server.c (get_features_xml): Check if target implemented
14819 arch_string.
14820 * win32-i386-low.c (win32_arch_string): New.
14821 (win32_target_ops): Add win32_arch_string as arch_string member.
14822
ab39bf24
UW
148232007-02-22 Markus Deuling <deuling@de.ibm.com>
14824
14825 * spu-low.c (spu_arch_string): New.
14826 (spu_target_ops): Add spu_arch_string.
14827
61ff6e04
DJ
148282007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14829
14830 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14831 * configure.ac: Do not check for terminal.h.
14832 * configure, config.in: Regenerated.
14833
fb1e4ffc
DJ
148342007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14835
14836 * Makefile.in (OBS): Add $(XML_BUILTIN).
14837 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14838 (clean): Update.
14839 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14840 (arm-with-iwmmxt.c): New.
14841 * config.in, configure: Regenerate.
14842 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14843 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14844 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14845 (arm*-*-linux*): Add iWMMXt and regset support.
14846 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14847 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14848 (arm_store_wmmxregset, target_regsets): New.
14849 * server.c (get_features_xml): Take annex argument. Check builtin
14850 XML documents.
14851 (handle_query): Handle multiple annexes.
14852
0f48aa01
DJ
148532007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14854
14855 * remote-utils.c [USE_WIN32API] (read, write): Define.
14856 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14857 write.
14858
23181151
DJ
148592007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14860
14861 * linux-i386-low.c (the_low_target): Set arch_string.
14862 * linux-x86-64-low.c (the_low_target): Likewise.
14863 * linux-low.c (linux_arch_string): New.
14864 (linux_target_ops): Add it.
14865 * linux-low.h (struct linux_target_ops): Add arch_string.
14866 * server.c (write_qxfer_response): Use const void * for DATA.
14867 (get_features_xml): New.
14868 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14869 * target.h (struct target_ops): Add arch_string method.
14870
9d606399
DJ
148712007-01-03 Denis Pilat <denis.pilat@st.com>
14872 Daniel Jacobowitz <dan@codesourcery.com>
14873
14874 * linux-low.c (linux_kill): Handle being called with no threads.
14875 * win32-i386-low.c (win32_kill): Likewise.
14876 (get_child_debug_event): Clear current_process_handle.
14877
148782006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14879 Daniel Jacobowitz <dan@codesourcery.com>
14880
14881 * remote-utils.c (remote_open): Check the type of specified
14882 serial port devices before opening them.
14883 * server.c (main): Kill the inferior if an error occurs during
14884 the first remote_open.
14885
a5e13d24
DJ
148862006-12-05 Markus Deuling <deuling@de.ibm.com>
14887
14888 * README: Update supported targets.
14889
186947f7
DJ
148902006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14891
14892 * Makefile.in (clean): Remove reg-mips64.c.
14893 (reg-mips64.c, reg-mips64.o): New rules.
14894 * configure.srv: Handle mips64. Include regset support for mips.
14895 * linux-mips-low.c (union mips_register): New.
14896 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14897 (mips_breakpoint, mips_breakpoint_at): Use int.
14898 (mips_collect_register, mips_supply_register)
14899 (mips_collect_register_32bit, mips_supply_register_32bit)
14900 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14901 (mips_store_fpregset, target_regsets): New.
14902 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14903
a13e2c95
UW
149042006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14905
14906 * configure.srv: Add target "spu*-*-*".
14907 * Makefile.in (clean): Remove reg-spu.c.
14908 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14909 * spu-low.c: New file.
14910
cb7283db
DJ
149112006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14912
14913 * configure.ac: Correct td_thr_tls_get_addr test.
14914 * configure: Regenerated.
14915
89be2091
DJ
149162006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14917
14918 * linux-low.c (linux_wait_for_event): Reformat. Use the
14919 pass_signals array.
14920 * remote-utils.c (decode_address_to_semicolon): New.
14921 * server.c (pass_signals, handle_general_set): New.
14922 (handle_query): Mention QPassSignals for qSupported.
14923 (main): Call handle_general_set.
14924 * server.h (pass_signals, decode_address_to_semicolon): New.
14925
000ef4f0
DJ
149262006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14927
14928 * server.c (handle_query): Correct error handling for read_auxv.
14929
b7149293
UW
149302005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14931
14932 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14933 and srv_linux_thread_db to yes.
14934 * linux-s390-low.c (s390_fill_gregset): New function.
14935 (target_regsets): Define data structure.
14936
dae5f5cf
DJ
149372006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14938
14939 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14940 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14941 * config.in, configure: Regenerated.
14942 * inferiors.c (gdb_id_to_thread): New function.
14943 (gdb_id_to_thread_id): Use it.
14944 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14945 * linux-low.h (struct process_info): Add th member.
14946 (thread_db_get_tls_address): New prototype.
14947 * remote-utils.c (decode_address): Make non-static.
14948 * server.c (handle_query): Handle qGetTLSAddr.
14949 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14950 * target.h (struct target_ops): Add get_tls_address.
14951 * thread-db.c (maybe_attach_thread): Save the thread handle.
14952 (thread_db_get_tls_address): New.
14953
32ca6d61
DJ
149542006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14955
14956 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14957 (linux_resume_one_process): Take a siginfo_t *. Update all
14958 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14959 (struct pending_signals): Add a siginfo_t.
14960 (linux_wait_for_process): Always set last_status.
14961 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14962 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14963 * linux-low.h (struct process_info): Add last_status.
14964
5ffff7c1
DJ
149652006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14966
14967 * remote-utils.c (try_rle): New function.
14968 (putpkt_binary): Use it.
14969
8695c747
DJ
149702006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14971
14972 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14973 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14974 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14975 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14976 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14977 point registers.
14978
290fadea
RS
149792006-08-08 Richard Sandiford <richard@codesourcery.com>
14980
14981 * server.c (terminal_fd): New variable.
14982 (old_foreground_pgrp): Likewise.
14983 (restore_old_foreground_pgrp): New function.
14984 (start_inferior): Record the terminal file descriptor in terminal_fd
14985 and its original foreground group in old_foreground_pgrp. Register
14986 restore_old_foreground_pgrp with atexit().
14987
9f2e1e63
DJ
149882006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14989
14990 * server.c (handle_query): Correct qPart to qXfer.
14991
b80864fb
DJ
149922006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14993
14994 * configure.ac: Check for more headers which are missing on
14995 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14996 * configure.srv: Add Cygwin and mingw32.
14997 * remote-utils.c: Don't include headers unconditionally which
14998 are missing on mingw32. Include <winsock.h> for mingw32.
14999 (remote_open): Adjust for mingw32 support. Flush
15000 standard error after writing to it.
15001 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15002 (unblock_async_io, enable_async_io, disable_async_io)
15003 (readchar, getpkt): Update for Winsock support.
15004 (prepare_resume_reply): Expect a protocol signal number.
15005 * server.c: Disable <sys/wait.h> on mingw32.
15006 (start_inferior): Adjust for mingw32 support. Flush
15007 standard error after writing to it.
15008 (attach_inferior): Likewise. Use protocol signal
15009 numbers.
15010 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15011 and names.
15012 * win32-i386-low.c: New file.
15013 * Makefile.in (XM_CLIBS): Set.
15014 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15015 (win32-i386-low.o): New dependency rule.
15016 * linux-low.c (linux_wait): Use target signal numbers.
15017 * target.h (struct target_ops): Doc fix.
15018 * server.h (target_signal_to_name): New prototype.
15019 * gdbreplay.c: Don't include headers unconditionally which
15020 are missing on mingw32. Include <winsock.h> for mingw32.
15021 (remote_close, remote_open): Adjust for Winsock support.
15022 * configure, config.in: Regenerated.
15023
0876f84a
DJ
150242006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15025
15026 * server.c (decode_xfer_read, write_qxfer_response): New.
15027 (handle_query): Take a packet length argument. Handle
15028 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15029 the qSupported response.
15030 (main): Update call to handle_query.
15031
01f9e8fa
DJ
150322006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15033
15034 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15035 (putpkt_binary): Renamed from putpkt and adjusted for binary
15036 data.
15037 (putpkt): New wrapper for putpkt_binary.
15038 (readchar): Don't mask off the high bit.
15039 (decode_X_packet): New function.
15040 * server.c (main): Call putpkt_binary if a handler sets the packet
15041 length. Save the length of the incoming packet. Handle 'X'.
15042 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15043
be2a5f71
DJ
150442006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15045
15046 * server.c (handle_query): Handle qSupported.
15047
ea025f5f
DJ
150482006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15049
15050 * remote-utils.c (all_symbols_looked_up): New variable.
15051 (look_up_one_symbol): Check it.
15052 * server.h (look_up_one_symbol): New declaration.
15053 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15054
9308fc88
DJ
150552006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15056
15057 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15058 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15059 (PTRACE_GET_THREAD_AREA): Define.
15060 (ps_get_thread_area): New function.
15061
52fb6437
NS
150622006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15063
15064 * configure.srv (m68k*-*-uclinux*): New target.
15065 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15066 (linux_resume_one_process): Remove extraneous cast.
15067 (linux_read_offsets): New.
15068 (linux_target_op): Add linux_read_offsets on mmuless systems.
15069 * server.c (handle_query): Add qOffsets logic.
15070 * target.h (struct target_ops): Add read_offsets.
15071
21b0f40c
DJ
150722006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15073
15074 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15075 (PTRACE_GET_THREAD_AREA): Define.
15076 (ps_get_thread_area): New function.
15077 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15078 (linux-x86-64-low.o): Update.
15079
0050a760
DJ
150802006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15081
15082 * configure.ac: Remove checks for prfpregset_t.
15083 * gdb_proc_service.h: New file.
15084 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15085 new "gdb_proc_service.h".
15086 * proc-service.c: Likewise.
15087 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15088 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15089 * Makefile.in (gdb_proc_service_h): Updated.
15090 * configure, config.in: Regenerated.
15091
b92a518e
DJ
150922006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15093
15094 * remote-utils.c (prepare_resume_reply): Move declaration
15095 of gdb_id_from_wait to the top of the block.
15096
545587ee
DJ
150972006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15098
15099 * linux-low.c (regsets_store_inferior_registers): Read the regset
15100 from the target before filling it.
15101
9db87ebd
DJ
151022006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15103
15104 * server.c (attach_inferior): Return SIGTRAP for a successful
15105 attach.
15106
dd24457d
DJ
151072006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15108
15109 * Makefile.in (OBS): Add version.o.
15110 (STAGESTUFF): Delete.
15111 (version.o): Add dependencies.
15112 (version.c): Replace rule.
15113 (clean): Remove version.c.
15114 * server.c (gdbserver_version): New.
15115 (gdbserver_usage): Use printf.
15116 (main): Handle --version and --help.
15117 * server.h (version, host_name): Add declarations.
15118
6f0f660e
EZ
151192005-12-23 Eli Zaretskii <eliz@gnu.org>
15120
889bf7c5
PA
15121 * linux-arm-low.c:
15122 * linux-arm-low.c:
15123 * inferiors.c:
15124 * i387-fp.h:
15125 * i387-fp.c:
15126 * gdbreplay.c:
15127 * regcache.c:
15128 * proc-service.c:
15129 * mem-break.h:
15130 * mem-break.c:
15131 * linux-x86-64-low.c:
15132 * linux-sh-low.c:
15133 * linux-s390-low.c:
15134 * linux-ppc64-low.c:
15135 * linux-ppc-low.c:
15136 * linux-mips-low.c:
15137 * linux-m68k-low.c:
15138 * linux-m32r-low.c:
15139 * linux-low.h:
15140 * linux-low.c:
15141 * linux-ia64-low.c:
15142 * linux-i386-low.c:
15143 * linux-crisv32-low.c:
15144 * thread-db.c:
15145 * terminal.h:
15146 * target.h:
15147 * target.c:
15148 * server.h:
15149 * server.c:
15150 * remote-utils.c:
15151 * regcache.h:
15152 * utils.c:
15153 * Makefile.in:
15154 * configure.ac:
6f0f660e
EZ
15155 * gdbserver.1: Add (C) after Copyright. Update the FSF
15156 address.
15157
9d1fb177
DJ
151582005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15159
15160 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15161 (arm_breakpoint_at): Recognize both breakpoints.
15162 (the_low_target): Use the correct breakpoint instruction.
15163
011a70c2
DJ
151642005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15165
15166 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15167 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15168 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15169 (the_low_target): Update.
15170
7fb85e41
AS
151712005-10-25 Andreas Schwab <schwab@suse.de>
15172
15173 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15174
15175 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15176 (ia64_num_regs): Reduce to 462.
15177
3db0444b
DJ
151782005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15179
15180 * acinclude.m4: Correct quoting.
15181 * aclocal.m4: Regenerated.
15182
15183 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15184 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15185 (thread_db_init): Call thread_db_err_str.
15186 * configure.ac: Check for TD_VERSION.
15187 * config.in, configure: Regenerated.
15188
bee0189a
DJ
151892005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15190
15191 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15192
e9d25b98
DJ
151932005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15194
15195 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15196 is not available. Define HAVE_PTRACE_GETREGS if it is.
15197 * config.in, configure: Regenerated.
15198 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15199 * linux-i386-low.c, linux-m68k-low.c: Update to use
15200 HAVE_PTRACE_GETREGS.
15201 * linux-low.c (regsets_fetch_inferior_registers)
15202 (regsets_store_inferior_registers): Only return 0 if we processed
15203 GENERAL_REGS.
15204 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15205 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15206
a06660f7
DJ
152072005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15208
15209 * inferiors.c (struct thread_info): Add gdb_id.
15210 (add_thread): Add gdb_id argument.
15211 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15212 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15213 calls to add_thread.
15214 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15215 * server.c (handle_query): Use thread_to_gdb_id.
15216 (handle_v_cont, main): Use gdb_id_to_thread_id.
15217 * server.h (add_thread): Update prototype.
15218 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15219 prototypes.
15220
5a1f5858
DJ
152212005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15222
15223 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15224 left-padded registers.
15225 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15226 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15227
e122f1f5
SE
152282005-07-01 Steve Ellcey <sje@cup.hp.com>
15229
15230 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15231 * configure: Regenerate.
15232 * config.in: Regenerate.
15233 * server.h (NEED_DECLARATION_STRERROR):
15234 Replace with !HAVE_DECL_STRERROR.
15235
d592fa2f
DJ
152362005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15237
15238 * linux-low.c (linux_wait, linux_send_signal): Don't test
15239 an unsigned long variable for > 0 if it could be MAX_ULONG.
15240 * server.c (myresume): Likewise.
15241 * target.c (set_desired_inferior): Likewise.
15242
ccbd4912
MK
152432005-06-13 Mark Kettenis <kettenis@gnu.org>
15244
15245 * configure.ac: Simplify and improve check for socklen_t.
15246 * configure, config.in: Regenerate.
15247
f450004a
DJ
152482005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15249
15250 * acconfig.h: Remove.
15251 * configure.ac: Add a test for socklen_t. Use three-argument
15252 AC_DEFINE throughout.
15253 * config.in: Regenerated using autoheader 2.59.
15254 * configure: Regenerated.
15255
15256 * gdbreplay.c (socklen_t): Provide a default.
15257 (remote_open): Use socklen_t.
15258 * remote-utils.c (socklen_t): Provide a default.
15259 (remote_open): Use socklen_t.
15260 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15261 unsigned char.
15262
15263 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15264 char for buffers.
15265 * linux-low.c (linux_read_memory, linux_write_memory)
15266 (linux_read_auxv): Likewise.
15267 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15268 (check_mem_write): Likewise.
15269 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15270 Likewise.
15271 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15272 (registers_from_string, register_data): Likewise.
15273 * server.c (handle_query, main): Likewise.
15274 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15275 (decode_M_packet): Likewise.
15276 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15277 * target.h (struct target_ops): Update read_memory, write_memory,
15278 and read_auxv.
15279 (read_inferior_memory, write_inferior_memory): Update.
15280 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15281 to unsigned char *.
15282 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15283 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15284 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15285 linux-s390-low.c, linux-sh-low.c: Update for changes in
15286 read_inferior_memory and the_low_target->breakpoint.
15287
eee84df1
DJ
152882005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15289
15290 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15291 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15292 * configure.srv: Add powerpc64-*-linux*.
15293 * linux-ppc64-low.c: New file.
15294
45b134e5
OF
152952005-05-23 Orjan Friberg <orjanf@axis.com>
15296
15297 * linux-cris-low.c: New file with support for CRIS.
15298 * linux-crisv32-low.c: Ditto for CRISv32.
15299 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15300 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15301 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15302 reg-crisv32.o, and reg-crisv32.c to make rules.
15303 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15304 recognized targets.
15305
48d93c75
UW
153062005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15307
15308 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15309 of sizeof (PTRACE_XFER_TYPE).
15310 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15311
e013ee27
OF
153122005-05-12 Orjan Friberg <orjanf@axis.com>
15313
889bf7c5 15314 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15315 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15316 pointers for hardware watchpoint support.
15317 * linux-low.h (struct linux_target_ops): Ditto.
15318 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15319 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15320 to linux_target_ops.
15321 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15322 reply packet.
15323 * server.c (main): Recognize 'Z' and 'z' packets.
15324
b0ded00b
UW
153252005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15326
15327 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15328 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15329 (the_low_target): Add new members.
15330
8643e2ad
DJ
153312005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15332
15333 * proc-service.c (ps_lgetregs): Search all_processes instead of
15334 all_threads.
15335
fc620387
DJ
153362005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15337
15338 * server.c (start_inferior): Change return type to int.
15339 (attach_inferior): Change sigptr to int *.
15340 (handle_v_cont, handle_v_requests): Change signal to int *.
15341 (main): Change signal to int.
15342
153432005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15344
15345 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15346 * configure.srv: Add m32r*-*-linux*.
15347 * linux-m32r-low.c: New file.
15348
e0e76420
DJ
153492005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15350
15351 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15352
a1928bad
DJ
153532005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15354
15355 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15356 Take unsigned long arguments for PIDs.
15357 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15358 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15359 (wait_for_sigstop, linux_resume_one_process)
15360 (regsets_fetch_inferior_registers, linux_send_signal)
15361 (linux_read_auxv): Likewise. Update the types of variables holding
15362 PIDs. Update format string specifiers.
15363 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15364 * remote-utils.c (prepare_resume_reply): Likewise.
15365 * server.c (cont_thread, general_thread, step_thread)
15366 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15367 unsigned long.
15368 (handle_query): Update format specifiers.
15369 (handle_v_cont, main): Use strtoul for thread IDs.
15370 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15371 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15372 (general_thread, step_thread, thread_from_wait)
15373 (old_thread_from_wait): Update.
15374 * target.h (struct thread_resume): Use unsigned long for THREAD.
15375 (struct target_ops): Use unsigned long for arguments to attach and
15376 thread_alive.
15377
dcdb98d2
DJ
153782005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15379
15380 * acinclude.m4: Include bfd/bfd.m4 directly.
15381 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15382 <agriffis@toolchain.org>.
15383 * aclocal.m4, configure: Regenerated.
15384
bec39cab
AC
153852005-01-07 Andrew Cagney <cagney@gnu.org>
15386
15387 * configure.ac: Rename configure.in, require autoconf 2.59.
15388 * configure: Re-generate.
15389
434c4c77
DJ
153902004-12-08 Daniel Jacobowitz <dan@debian.org>
15391
15392 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15393 LIBS when finished.
15394 * aclocal.m4: Regenerated.
15395 * configure: Regenerated.
15396
db1d3e1b
AS
153972004-11-21 Andreas Schwab <schwab@suse.de>
15398
15399 * linux-m68k-low.c (m68k_num_gregs): Define.
15400 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15401 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15402 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15403 (m68k_breakpoint_at): New. Add to the_low_target.
15404
15405 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15406 srv_linux_thread_db to yes.
15407
43360365
JB
154082004-10-20 Joel Brobecker <brobecker@gnat.com>
15409
15410 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15411 (ARCH_SET_FS): Likewise.
15412 (ARCH_GET_FS): Likewise.
15413 (ARCH_GET_GS): Likewise.
15414
fd500816
DJ
154152004-10-16 Daniel Jacobowitz <dan@debian.org>
15416
15417 * linux-i386-low.c (ps_get_thread_area): New.
15418 * linux-x86-64-low.c (ps_get_thread_area): New.
15419 * linux-low.c: Include <sys/syscall.h>.
15420 (linux_kill_one_process): Don't kill the first thread here.
15421 (linux_kill): Kill the first thread here.
15422 (kill_lwp): New function.
15423 (send_sigstop, linux_send_signal): Use it.
15424 * proc-service.c: Clean up #ifdefs.
15425 (fpregset_info): Delete.
15426 (ps_lgetregs): Update and enable implementation.
15427 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15428 implementations.
15429 * remote-utils.c (struct sym_cache, symbol_cache): New.
15430 (input_interrupt): Print a clearer message.
15431 (async_io_enabled): New variable.
15432 (enable_async_io, disable_async_io): Use it. Update comments.
15433 (look_up_one_symbol): Use the symbol cache.
15434 * thread-db.c (thread_db_look_up_symbols): New function.
15435 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15436
f6de3c42
DJ
154372004-10-16 Daniel Jacobowitz <dan@debian.org>
15438
15439 * configure.in: Test for -rdynamic.
15440 * configure: Regenerated.
15441 * Makefile (INTERNAL_LDFLAGS): New.
15442 (gdbserver, gdbreplay): Use it.
15443
2c0fc042
AC
154442004-09-02 Andrew Cagney <cagney@gnu.org>
15445
15446 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15447
075b3282
DJ
154482004-03-23 Daniel Jacobowitz <drow@mvista.com>
15449
15450 * linux-low.c (linux_wait): Clear all_processes list also.
15451
fa6a77dc
DJ
154522004-03-12 Daniel Jacobowitz <drow@mvista.com>
15453
15454 * linux-low.c: Include <errno.h>. Remove extern declaration of
15455 errno.
15456
6d782a97
DJ
154572004-03-12 Daniel Jacobowitz <drow@mvista.com>
15458
15459 * gdbreplay.c, server.h, utils.c: Update copyright years.
15460
3a7fb99b
DJ
154612004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15462
15463 * server.c (main): Print child status or termination signal from
15464 variable 'signal', not 'sig'.
15465
c3e735a6
DJ
154662004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15467
15468 * linux-low.c (linux_read_memory): Change return type to
15469 int. Check for and return error from ptrace().
15470 * target.c (read_inferior_memory): Change return type to int. Pass
15471 back return status from the_target->read_memory().
15472 * target.h (struct target_ops): Adapt *read_memory() prototype.
15473 Update comment.
15474 (read_inferior_memory): Adapt prototype.
15475 * server.c (main): Return an error packet if
15476 read_inferior_memory() returns an error.
15477
a59d1c82
DJ
154782004-03-04 Daniel Jacobowitz <drow@mvista.com>
15479
15480 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15481 Unify with other clean targets.
15482
dc3f8883
DJ
154832004-02-29 Daniel Jacobowitz <drow@mvista.com>
15484
15485 * server.c (handle_v_cont): Call set_desired_inferior.
15486
89a208da
DJ
154872004-02-29 Daniel Jacobowitz <drow@mvista.com>
15488
15489 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15490
62ea82f5
DJ
154912004-02-29 Daniel Jacobowitz <drow@mvista.com>
15492
15493 * linux-low.c (linux_wait): Unblock async I/O.
15494 (linux_resume): Block and enable async I/O.
15495 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15496 * server.h (block_async_io, unblock_async_io): Add prototypes.
15497
6910d122
DJ
154982004-02-29 Daniel Jacobowitz <drow@mvista.com>
15499
15500 * remote-utils.c (remote_open): Print a status notice after
15501 opening a TCP port.
15502 * server.c (attach_inferior): Print a status notice after
15503 attaching.
15504
155052004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15506
15507 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15508
c89dc5d4
DJ
155092004-02-26 Daniel Jacobowitz <drow@mvista.com>
15510
15511 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15512 error packet.
15513 * server.c, target.h: Update copyright years.
15514
4b8dad4a
RM
155152004-02-25 Roland McGrath <roland@redhat.com>
15516
15517 * target.h (struct target_ops): New member `read_auxv'.
15518 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15519 * linux-low.c (linux_read_auxv): New function.
15520 (linux_target_ops): Initialize `read_auxv' member to that.
15521
d7446758
JB
155222004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15523
15524 Committed by Jim Blandy <jimb@redhat.com>.
15525
15526 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15527 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15528 instead of GPR_SIZE to distiguish s390 and s390x targets.
15529
5544ad89
DJ
155302004-01-31 Daniel Jacobowitz <drow@mvista.com>
15531
15532 * linux-low.c: Update copyright year.
15533 (check_removed_breakpoint): Clear pending_is_breakpoint.
15534 (linux_set_resume_request, linux_queue_one_thread)
15535 (resume_status_pending_p): New functions.
15536 (linux_continue_one_thread): Use process->resume.
15537 (linux_resume): Only resume threads if there are no pending events.
15538 * linux-low.h (struct process_info): Add resume request
15539 pointer.
15540
2a68b70e
DJ
155412004-01-30 Daniel Jacobowitz <drow@mvista.com>
15542
15543 * regcache.c (new_register_cache): Clear the allocated register
15544 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15545
64386c31
DJ
155462003-10-13 Daniel Jacobowitz <drow@mvista.com>
15547
15548 * linux-low.c (linux_resume): Take a struct thread_resume *
15549 argument.
15550 (linux_wait): Update call.
15551 (resume_ptr): New static variable.
15552 (linux_continue_one_thread): Renamed from
15553 linux_continue_one_process. Use resume_ptr.
15554 (linux_resume): Use linux_continue_one_thread.
15555 * server.c (handle_v_cont, handle_v_requests): New functions.
15556 (myresume): New function.
15557 (main): Handle 'v' case.
15558 * target.h (struct thread_resume): New type.
15559 (struct target_ops): Change argument of "resume" to struct
15560 thread_resume *.
15561 (myresume): Delete macro.
15562
c938e9b0
L
155632003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15564
15565 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15566 (uninstall): Support DESTDIR.
15567
7f313d07
BC
15568Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15569
15570 * configure.srv: Add xscale*linux copy of arm*linux entry.
15571
3b2fc2ea
DJ
155722003-07-24 Daniel Jacobowitz <drow@mvista.com>
15573
15574 * linux-arm-low.c (arm_reinsert_addr): New function.
15575 (the_low_target): Add arm_reinsert_addr.
15576
1c0a559e
MK
155772003-07-08 Mark Kettenis <kettenis@gnu.org>
15578
15579 * mem-break.c: Remove whitespace at end of file.
15580
43d5792c
DJ
155812003-06-28 Daniel Jacobowitz <drow@mvista.com>
15582
15583 * configure.in: Check whether we need to prototype strerror.
15584 * server.h: Optionally prototype strerror.
15585 * gdbreplay.c (perror_with_name): Use strerror.
15586 * linux-low.c (linux_attach_lwp): Use strerror.
15587 * utils.c (perror_with_name): Use strerror.
15588 * config.in, configure: Regenerated.
15589
c8a86edf
DJ
155902003-06-28 Daniel Jacobowitz <drow@mvista.com>
15591
15592 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15593 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15594
73d37363
DJ
155952003-06-20 Daniel Jacobowitz <drow@mvista.com>
15596
15597 * Makefile.in (SFILES): Update.
15598 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15599 low-sun3.c: Remove files.
15600
6ad8ae5c
DJ
156012003-06-17 Daniel Jacobowitz <drow@mvista.com>
15602
15603 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15604 (linux_detach_one_process, linux_detach): New functions.
15605 (linux_target_ops): Add linux_detach.
15606 * server.c (main): Handle 'D' packet.
15607 * target.h (struct target_ops): Add "detach" member.
15608 (detach_inferior): Define.
15609
1581182a
MK
156102003-06-13 Mark Kettenis <kettenis@gnu.org>
15611
15612 From Kelley Cook <kelleycook@wideopenwest.com>:
15613 * configure.srv: Accept i[34567]86 variants.
15614
e5379b03
DJ
156152003-06-05 Daniel Jacobowitz <drow@mvista.com>
15616
15617 * linux-low.c (linux_wait_for_event): Correct comment typos.
15618 (linux_resume_one_process): Call check_removed_breakpoint.
15619 (linux_send_signal): New function.
15620 (linux_target_ops): Add linux_send_signal.
15621 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15622 of kill.
15623 * target.h (struct target_ops): Add send_signal.
15624
2ff29de4
JB
156252003-05-29 Jim Blandy <jimb@redhat.com>
15626
15627 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15628 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15629 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15630 away part of the register's value.
15631
254787d4
DJ
156322003-03-26 Daniel Jacobowitz <drow@mvista.com>
15633
15634 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15635 (linux_wait_for_event, linux_init_signals): Likewise.
15636
94e10508
DJ
156372003-03-17 Daniel Jacobowitz <drow@mvista.com>
15638
15639 * configure.in: Check for stdlib.h.
15640 * configure: Regenerated.
15641 * config.in: Regenerated.
15642
4c0711e0
DJ
156432003-01-04 Andreas Schwab <schwab@suse.de>
15644
15645 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15646
ef66e766
AC
156472003-01-02 Andrew Cagney <ac131313@redhat.com>
15648
15649 * Makefile.in: Remove obsolete code.
15650
a1358604
DJ
156512002-11-20 Daniel Jacobowitz <drow@mvista.com>
15652
15653 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15654 defined(PT_FPR0_HI).
15655
23ce3b1c
DJ
156562002-11-17 Stuart Hughes <seh@zee2.com>
15657
15658 * linux-arm-low.c (arm_num_regs): Increase.
15659 (arm_regmap): Include status register.
15660
156612002-11-17 Daniel Jacobowitz <drow@mvista.com>
15662
15663 * linux-low.c (register_addr): Remove incorrect -1 check.
15664
a9fa9f7d
DJ
156652002-08-29 Daniel Jacobowitz <drow@mvista.com>
15666
15667 * linux-low.c (linux_create_inferior): Call setpgid. Return
15668 the new PID.
15669 (unstopped_p, linux_signal_pid): Remove.
15670 (linux_target_ops): Remove linux_signal_pid.
15671 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15672 global instead of target method.
15673 * target.h (struct target_ops): Remove signal_pid. Update comment
15674 for create_inferior.
15675 * server.c (signal_pid): New variable.
15676 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15677 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15678 (attach_inferior): Set signal_pid.
15679
17574093
DJ
156802002-08-23 Daniel Jacobowitz <drow@mvista.com>
15681
15682 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15683
156842002-08-20 Jim Blandy <jimb@redhat.com>
15685
15686 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15687 default for this.
15688
156892002-08-01 Andrew Cagney <cagney@redhat.com>
15690
15691 * Makefile.in: Make chill references obsolete.
15692
156932002-07-24 Kevin Buettner <kevinb@redhat.com>
15694
15695 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15696 * configure: Regenerate.
15697 * config.in: Regenerate.
15698
156992002-07-09 David O'Brien <obrien@FreeBSD.org>
15700
15701 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15702 (perror_with_name, remote_close, remote_open, expect, play): Static.
15703
157042002-07-04 Michal Ludvig <mludvig@suse.cz>
15705
4b8dad4a 15706 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15707 byte offsets instead of an array of indexes.
15708 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15709
157102002-06-13 Daniel Jacobowitz <drow@mvista.com>
15711
15712 * regcache.c: Add comment.
15713
157142002-06-11 Daniel Jacobowitz <drow@mvista.com>
15715
15716 * thread-db.c: New file.
15717 * proc-service.c: New file.
15718 * acinclude.m4: New file.
15719 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15720 proc-service.o, and thread-db.o.
15721 (linux-low.o): Add USE_THREAD_DB.
15722 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15723 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15724 * aclocal.m4: Regenerated.
15725 * config.in: Regenerated.
15726 * configure: Regenerated.
15727 * configure.in: Check for proc_service.h, sys/procfs.h,
15728 thread_db.h, and linux/elf.h headrs.
15729 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15730 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15731 Check for -lthread_db and thread support.
15732 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15733 PowerPC, and SuperH.
15734 * i387-fp.c: Constify arguments.
15735 * i387-fp.h: Likewise.
15736 * inferiors.c: (struct thread_info): Renamed from
15737 `struct inferior_info'. Remove PID member. Use generic inferior
15738 list header. All uses updated.
15739 (inferiors, signal_pid): Removed.
15740 (all_threads): New variable.
15741 (get_thread): Define.
15742 (add_inferior_to_list): New function.
15743 (for_each_inferior): New function.
15744 (change_inferior_id): New function.
15745 (add_inferior): Removed.
15746 (remove_inferior): New function.
15747 (add_thread): New function.
15748 (free_one_thread): New function.
15749 (remove_thread): New function.
15750 (clear_inferiors): Use for_each_inferior and free_one_thread.
15751 (find_inferior): New function.
15752 (find_inferior_id): New function.
15753 (inferior_target_data): Update argument type.
15754 (set_inferior_target_data): Likewise.
15755 (inferior_regcache_data): Likewise.
15756 (set_inferior_regcache_data): Likewise.
15757 * linux-low.c (linux_bp_reinsert): Remove.
15758 (all_processes, stopping_threads, using_thrads)
15759 (struct pending_signals, debug_threads, pid_of): New.
15760 (inferior_pid): Replace with macro.
15761 (struct inferior_linux_data): Remove.
15762 (get_stop_pc, add_process): New functions.
15763 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15764 Use add_process and add_thread.
15765 (linux_attach_lwp): New function, based on old linux_attach. Use
15766 add_process and add_thread. Set stop_expected for new threads.
15767 (linux_attach): New function.
15768 (linux_kill_one_process): New function.
15769 (linux_kill): Kill all LWPs.
15770 (linux_thread_alive): Use find_inferior_id.
15771 (check_removed_breakpoints, status_pending_p): New functions.
15772 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15773 Update. Use WNOHANG. Wait for cloned processes also. Update process
15774 struct for the found process.
15775 (linux_wait_for_event): New function.
15776 (linux_wait): Use it. Support LWPs.
15777 (send_sigstop, wait_for_sigstop, stop_all_processes)
15778 (linux_resume_one_process, linux_continue_one_process): New functions.
15779 (linux_resume): Support LWPs.
15780 (REGISTER_RAW_SIZE): Remove.
15781 (fetch_register): Use register_size instead. Call supply_register.
15782 (usr_store_inferior_registers): Likewise. Call collect_register.
15783 Fix recursive case.
15784 (regsets_fetch_inferior_registers): Improve error message.
15785 (regsets_store_inferior_registers): Add debugging.
15786 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15787 (unstopped_p, linux_signal_pid): New functions.
15788 (linux_target_ops): Add linux_signal_pid.
15789 (linux_init_signals): New function.
15790 (initialize_low): Call it. Initialize using_threads.
15791 * regcache.c (inferior_regcache_data): Add valid
15792 flag.
15793 (get_regcache): Fetch registers lazily. Add fetch argument
15794 and update all callers.
15795 (regcache_invalidate_one, regcache_invalidate): New
15796 functions.
15797 (new_register_cache): Renamed from create_register_cache.
15798 Return the new regcache.
15799 (free_register_cache): Change argument to a void *.
15800 (registers_to_string, registers_from_string): Call get_regcache
15801 with fetch flag set.
15802 (register_data): Make static. Pass fetch flag to get_regcache.
15803 (supply_register): Call get_regcache with fetch flag clear.
15804 (collect_register): Call get_regcache with fetch flag set.
15805 (collect_register_as_string): New function.
15806 * regcache.h: Update.
15807 * remote-utils.c (putpkt): Flush after debug output and use
15808 stderr.
15809 Handle input interrupts while waiting for an ACK.
15810 (input_interrupt): Use signal_pid method.
15811 (getpkt): Flush after debug output and use stderr.
15812 (outreg): Use collect_register_as_string.
15813 (new_thread_notify, dead_thread_notify): New functions.
15814 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15815 and general_thread.
15816 (look_up_one_symbol): Flush after debug output.
15817 * server.c (step_thread, server_waiting): New variables.
15818 (start_inferior): Don't use signal_pid. Update call to mywait.
15819 (attach_inferior): Update call to mywait.
15820 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15821 (main): Don't fetch/store registers explicitly. Use
15822 set_desired_inferior. Support proposed ``Hs'' packet. Update
15823 calls to mywait.
15824 * server.h: Update.
15825 (struct inferior_list, struct_inferior_list_entry): New.
15826 * target.c (set_desired_inferior): New.
15827 (write_inferior_memory): Constify.
15828 (mywait): New function.
15829 * target.h: Update.
15830 (struct target_ops): New signal_pid method.
15831 (mywait): Removed macro, added prototype.
15832
15833 * linux-low.h (regset_func): Removed.
15834 (regset_fill_func, regset_store_func): New.
15835 (enum regset_type): New.
15836 (struct regset_info): Add type field. Use new operation types.
15837 (struct linux_target_ops): stop_pc renamed to get_pc.
15838 Add decr_pc_after_break and breakpoint_at.
15839 (get_process, get_thread_proess, get_process_thread)
15840 (strut process_info, all_processes, linux_attach_lwp)
15841 (thread_db_init): New.
15842
15843 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15844 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15845 (the_low_target): Add new members.
15846 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15847 (i386_store_fpxregset): Constify.
15848 (target_regsets): Add new kind identifier.
15849 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15850 (i386_set_pc): Add debugging.
15851 (i386_breakpoint_at): New function.
15852 (the_low_target): Add new members.
15853 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15854 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15855 (mips_breakpoint_at): New.
15856 (the_low_target): Add new members.
15857 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15858 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15859 (the_low_target): Add new members.
15860 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15861 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15862 (the_low_target): Add new members.
15863 * linux-x86-64-low.c (target_regsets): Add new kind
15864 identifier.
15865
158662002-05-15 Daniel Jacobowitz <drow@mvista.com>
15867
15868 From Martin Pool <mbp@samba.org>:
15869 * server.c (gdbserver_usage): New function.
15870 (main): Call it.
15871
158722002-05-14 Daniel Jacobowitz <drow@mvista.com>
15873
15874 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15875 stop_at -> stop_pc.
15876
158772002-05-04 Andrew Cagney <ac131313@redhat.com>
15878
15879 * Makefile.in: Remove obsolete code.
15880
158812002-04-24 Michal Ludvig <mludvig@suse.cz>
15882
15883 * linux-low.c (regsets_fetch_inferior_registers),
15884 (regsets_store_inferior_registers): Removed cast to int from
15885 ptrace() calls.
15886 * regcache.h: Added declaration of struct inferior_info.
15887
158882002-04-20 Daniel Jacobowitz <drow@mvista.com>
15889
15890 * inferiors.c (struct inferior_info): Add regcache_data.
15891 (add_inferior): Call create_register_cache.
15892 (clear_inferiors): Call free_register_cache.
15893 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15894 * regcache.c (struct inferior_regcache_data): New.
15895 (registers): Remove.
15896 (get_regcache): New function.
15897 (create_register_cache, free_register_cache): New functions.
15898 (set_register_cache): Don't initialize the register cache here.
15899 (registers_to_string, registers_from_string, register_data): Call
15900 get_regcache.
15901 * regcache.h: Add prototypes.
15902 * server.h: Likewise.
15903
159042002-04-20 Daniel Jacobowitz <drow@mvista.com>
15905
15906 * mem-break.c: New file.
15907 * mem-break.h: New file.
15908 * Makefile.in: Add mem-break.o rule; update server.h
15909 dependencies.
15910 * inferiors.c (struct inferior_info): Add target_data
15911 member.
15912 (clear_inferiors): Free target_data member if set.
15913 (inferior_target_data, set_inferior_target_data): New functions.
15914 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15915 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15916 * linux-low.c (linux_bp_reinsert): New variable.
15917 (struct inferior_linux_data): New.
15918 (linux_create_inferior): Use set_inferior_target_data.
15919 (linux_attach): Likewise. Call add_inferior.
15920 (linux_wait_for_one_inferior): New function.
15921 (linux_wait): Call it.
15922 (linux_write_memory): Add const.
15923 (initialize_low): Call set_breakpoint_data.
15924 * linux-low.h (struct linux_target_ops): Add breakpoint
15925 handling members.
15926 * server.c (attach_inferior): Remove extra add_inferior
15927 call.
15928 * server.h: Include mem-break.h. Update inferior.c
15929 prototypes.
15930 * target.c (read_inferior_memory)
15931 (write_inferior_memory): New functions.
15932 * target.h (read_inferior_memory)
15933 (write_inferior_memory): Change macros to prototypes.
15934 (struct target_ops): Update comments. Add const to write_memory
15935 definition.
15936
159372002-04-11 Daniel Jacobowitz <drow@mvista.com>
15938
15939 * linux-low.c (usr_store_inferior_registers): Support
15940 registers which are allowed to fail to store.
15941 * linux-low.h (linux_target_ops): Likewise.
15942 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15943 (ppc_cannot_store_register): FPSCR may not be storable.
15944
159452002-04-09 Daniel Jacobowitz <drow@mvista.com>
15946
15947 * server.h: Include <string.h> if HAVE_STRING_H.
15948 * ChangeLog: Correct paths in last ChangeLog entry.
15949
159502002-04-09 Daniel Jacobowitz <drow@mvista.com>
15951
15952 * linux-low.h: Remove obsolete prototypes.
15953 (struct linux_target_ops): New.
15954 (extern the_low_target): New.
15955 * linux-low.c (num_regs, regmap): Remove declarations.
15956 (register_addr): Use the_low_target explicitly.
15957 (fetch_register): Likewise.
15958 (usr_fetch_inferior_registers): Likewise.
15959 (usr_store_inferior_registers): Likewise.
15960 * linux-arm-low.c (num_regs): Remove.
15961 (arm_num_regs): Define.
15962 (arm_regmap): Renamed from regmap, made static.
15963 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15964 made static.
15965 (arm_cannot_store_register): Renamed from cannot_store_register,
15966 made static.
15967 (the_low_target): New.
15968 * linux-i386-low.c (num_regs): Remove.
15969 (i386_num_regs): Define.
15970 (i386_regmap): Renamed from regmap, made static.
15971 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15972 made static.
15973 (i386_cannot_store_register): Renamed from cannot_store_register,
15974 made static.
15975 (the_low_target): New.
15976 * linux-ia64-low.c (num_regs): Remove.
15977 (ia64_num_regs): Define.
15978 (ia64_regmap): Renamed from regmap, made static.
15979 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15980 made static.
15981 (ia64_cannot_store_register): Renamed from cannot_store_register,
15982 made static.
15983 (the_low_target): New.
15984 * linux-m68k-low.c (num_regs): Remove.
15985 (m68k_num_regs): Define.
15986 (m68k_regmap): Renamed from regmap, made static.
15987 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15988 made static.
15989 (m68k_cannot_store_register): Renamed from cannot_store_register,
15990 made static.
15991 (the_low_target): New.
15992 * linux-mips-low.c (num_regs): Remove.
15993 (mips_num_regs): Define.
15994 (mips_regmap): Renamed from regmap, made static.
15995 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15996 made static.
15997 (mips_cannot_store_register): Renamed from cannot_store_register,
15998 made static.
15999 (the_low_target): New.
16000 * linux-ppc-low.c (num_regs): Remove.
16001 (ppc_num_regs): Define.
16002 (ppc_regmap): Renamed from regmap, made static.
16003 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16004 made static.
16005 (ppc_cannot_store_register): Renamed from cannot_store_register,
16006 made static.
16007 (the_low_target): New.
16008 * linux-s390-low.c (num_regs): Remove.
16009 (s390_num_regs): Define.
16010 (s390_regmap): Renamed from regmap, made static.
16011 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16012 made static.
16013 (s390_cannot_store_register): Renamed from cannot_store_register,
16014 made static.
16015 (the_low_target): New.
16016 * linux-sh-low.c (num_regs): Remove.
16017 (sh_num_regs): Define.
16018 (sh_regmap): Renamed from regmap, made static.
16019 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16020 made static.
16021 (sh_cannot_store_register): Renamed from cannot_store_register,
16022 made static.
16023 (the_low_target): New.
16024 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16025 (the_low_target): New.
16026
160272002-04-09 Daniel Jacobowitz <drow@mvista.com>
16028
16029 * Makefile.in: Add stamp-h target.
16030 * configure.in: Create stamp-h.
16031 * configure: Regenerated.
16032
160332002-04-09 Daniel Jacobowitz <drow@mvista.com>
16034
16035 * inferiors.c: New file.
16036 * target.c: New file.
16037 * target.h: New file.
16038 * Makefile.in: Add target.o and inferiors.o. Update
16039 dependencies.
16040 * linux-low.c (inferior_pid): New static variable,
16041 moved from server.c.
16042 (linux_create_inferior): Renamed from create_inferior.
16043 Call add_inferior. Return 0 on success instead of a PID.
16044 (linux_attach): Renamed from myattach.
16045 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16046 (linux_thread_alive): Renamed from mythread_alive.
16047 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16048 child dies.
16049 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16050 (regsets_store_inferior_registers): Correct error message.
16051 Add missing ``return 0''.
16052 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16053 (linux_store_registers): Renamed from store_inferior_registers.
16054 (linux_read_memory): Renamed from read_inferior_memory.
16055 (linux_write_memory): Renamed from write_inferior_memory.
16056 (linux_target_ops): New structure.
16057 (initialize_low): Call set_target_ops ().
16058 * remote-utils.c (unhexify): New function.
16059 (hexify): New function.
16060 (input_interrupt): Send signals to ``signal_pid''.
16061 * server.c (inferior_pid): Remove.
16062 (start_inferior): Update create_inferior call.
16063 (attach_inferior): Call add_inferior.
16064 (handle_query): New function.
16065 (main): Call handle_query for `q' packets.
16066 * server.h: Include "target.h". Remove obsolete prototypes.
16067 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16068
160692002-04-09 Daniel Jacobowitz <drow@mvista.com>
16070
16071 * Makefile.in: Add WARN_CFLAGS. Update configury
16072 dependencies.
16073 * configure.in: Check for <string.h>
16074 * configure: Regenerate.
16075 * config.in: Regenerate.
16076 * gdbreplay.c: Include needed system headers.
16077 (remote_open): Remove strchr prototype.
16078 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16079 * regcache.c (supply_register): Change buf argument to const void *.
16080 (supply_register_by_name): Likewise.
16081 (collect_register): Change buf argument to void *.
16082 (collect_register_by_name): Likewise.
16083 * regcache.h: Add missing prototypes.
16084 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16085 * server.c (handle_query): New function.
16086 (attached): New static variable, moved out of main.
16087 (main): Quiet longjmp clobber warnings.
16088 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16089 * utils.c (error): Remove NORETURN.
16090 (fatal): Likewise.
This page took 2.483026 seconds and 4 git commands to generate.