Yearly rotation of the gdb/ChangeLog file
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
8e481c3b
TT
12017-12-08 Tom Tromey <tom@tromey.com>
2
3 * ax.c (ax_printf): Update.
4
a8806230
YQ
52017-12-07 Yao Qi <yao.qi@linaro.org>
6
7 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
8 aarch64_linux_read_description.
9 * linux-amd64-ipa.c (idx2mask): New array.
10 (get_ipa_tdesc): Move idx2mask out.
11 (initialize_low_tracepoint): Initialize target descriptions.
12 * linux-i386-ipa.c (idx2mask): New array.
13 (get_ipa_tdesc): Move idx2mask out.
14 (initialize_low_tracepoint): Initialize target descriptions.
15
d4a0e8b5
SM
162017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
17
18 * tdesc.c (struct tdesc_type): Change return type.
19 (tdesc_add_flag): Change parameter type.
20 (tdesc_add_bitfield): Likewise.
21 (tdesc_add_field): Likewise.
22 (tdesc_set_struct_size): Likewise.
23
798a7429
SM
242017-12-05 Simon Marchi <simon.marchi@ericsson.com>
25
26 * regcache.c (registers_to_string): Remove unused variable.
27
c0e15c9b
SM
282017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
29
30 * inferiors.c (for_each_inferior_with_data): Remove.
31 * inferiors.h (for_each_inferior_with_data): Remove.
32 * server.c (handle_qxfer_threads_worker): Change parameter type.
33 (handle_qxfer_threads_proper): Use for_each_thread.
34
f0045347
SM
352017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
36
37 * inferiors.c (for_each_inferior): Remove.
38 (clear_inferiors): Use for_each_thread.
39 * inferiors.h (for_each_inferior): Remove.
40 * linux-low.c (linux_wait_for_event_filtered): Use
41 for_each_thread.
42 (linux_stabilize_threads): Likewise.
43 * regcache.c (regcache_release): Likewise.
44 * server.c (gdb_wants_all_threads_stopped): Likewise.
45 (clear_pending_status_callback): Remove.
46 (handle_status): Use for_each_thread.
47 (captured_main): Likewise.
48 * win32-low.c (child_init_thread_list): Likewise.
49 (win32_clear_inferiors): Likewise.
50 (fake_breakpoint_event): Likewise.
51
9521758b
SM
522017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
53
54 * inferiors.h (find_inferior): Remove.
55 * inferiors.c (find_inferior): Remove.
56
8f86d7aa
SM
572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
58
59 * linux-low.c (resume_status_pending_p): Update comment.
60 (need_step_over_p): Update comment.
61
e2b44075
SM
622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
63
64 * linux-low.c (proceed_one_lwp): Return void, change parameter
65 type.
66 (unsuspend_and_proceed_one_lwp): Likewise.
67 (proceed_all_lwps): Use for_each_thread.
68 (unstop_all_lwps): Likewise.
69
c80825ff
SM
702017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
71
72 * linux-low.c (linux_resume_one_thread): Return void, take
73 parameter directly.
74 (linux_resume): Use for_each_thread.
75
df3e4dbe
SM
762017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
77
78 * linux-low.c (send_sigstop_callback): Return void, change
79 parameter type. Rename to...
80 (send_sigstop): ... this.
81 (suspend_and_send_sigstop_callback): Return void, change parameter
82 type. Rename to...
83 (suspend_and_send_sigstop): ... this.
84 (stop_all_lwps): Use for_each_thread.
85
5a6b0a41
SM
862017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
87
88 * linux-low.c (lwp_running): Return bool, remove unused
89 argument.
90 (linux_stabilize_threads): Use find_thread.
91
39a64da5
SM
922017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
93
94 * linux-low.c (select_singlestep_lwp_callback): Remove.
95 (count_events_callback): Remove.
96 (select_event_lwp_callback): Remove.
97 (select_event_lwp): Use find_thread/for_each_thread.
98
a1385b7b
SM
992017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
100
101 * linux-low.c (not_stopped_callback): Return bool, take filter
102 argument directly.
103 (linux_wait_for_event_filtered): Use find_thread.
104 (linux_wait_1): Likewise.
105
454296a2
SM
1062017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
107
108 * linux-low.c (same_lwp): Remove.
109 (find_lwp_pid): Use find_thread.
110
6b2a85da
SM
1112017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
112
113 * linux-low.c (delete_lwp_callback): Remove.
114 (linux_mourn): Use for_each_thread.
115
798a38e8
SM
1162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
117
118 * linux-low.c (linux_detach_lwp_callback): Return void, remove
119 args parameter, don't check for pid.
120 (linux_detach): Use for_each_thread.
121
e4eb0dec
SM
1222017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
123
124 * linux-low.c (struct counter): Remove.
125 (second_thread_of_pid_p): Remove.
126 (last_thread_of_process_p): Use find_thread.
127
83e1b6c1
SM
1282017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
129
130 * inferiors.c (find_inferior_in_random): Remove.
131 * inferiors.h (find_inferior_in_random): Remove.
132 * linux-low.c (status_pending_p_callback): Return bool, accept
133 parameter ptid directly.
134 (linux_wait_for_event_filtered): Use find_thread_in_random.
135 (linux_wait_1): Likewise.
136
8dc7b443
SM
1372017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
138
139 * inferiors.c (find_inferior_id): Remove.
140 (find_thread_ptid): Move implemention from find_inferior_id to
141 here.
142 * inferiors.h (find_inferior_id): Remove.
143 * server.c (handle_status): Use find_thread_ptid.
144 (process_serial_event): Likewise.
145 * thread-db.c (find_one_thread): Likewise.
146 (thread_db_thread_handle): Likewise.
147 * win32-low.c (thread_rec): Likewise.
148 (child_delete_thread): Likewise.
149 (win32_thread_alive): Likewise.
150 (get_child_debug_event): Likewise.
151
da25033c
SM
1522017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
153
154 * linux-mips-low.c (update_watch_registers_callback): Return
155 void, remove pid_p parameter, don't check for pid.
156 (mips_insert_point, mips_remove_point): Use for_each_thread.
157
c91bb56b
SM
1582017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
159
160 * lynx.low (lynx_delete_thread_callback): Remove.
161 (lynx_mourn): Use for_each_thread.
162
634a3254
SM
1632017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
164
165 * regcache.c (regcache_invalidate_one): Remove.
166 (regcache_invalidate_pid): use for_each_thread.
167
41272101
TT
1682017-11-26 Tom Tromey <tom@tromey.com>
169
170 * linux-low.c (linux_create_inferior): Update.
171
f5291a6f
UW
1722017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
173
174 * spu-low.c (spu_create_inferior): Fix typo in argument name.
175
6654d750
AH
1762017-11-24 Alan Hayward <alan.hayward@arm.com>
177
178 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
179 * linux-aarch64-low.c (initialize_low_arch): Call init func.
180 * linux-aarch64-tdesc-selftest.c: New file.
181 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
182
1832017-11-24 Alan Hayward <alan.hayward@arm.com>
184
185 * configure.srv: Add new file.
186 * linux-aarch64-low.c (initialize_low_arch): Call init func.
187 * linux-aarch64-tdesc-selftest.c: New file.
188 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
189
49bdb7ee
AH
1902017-11-24 Alan Hayward <alan.hayward@arm.com>
191
192 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
193 * linux-aarch64-low.c (initialize_low_arch): Remove init.
194 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
195
d6d7ce56
AH
1962017-11-24 Alan Hayward <alan.hayward@arm.com>
197
198 * configure.srv: Add new files.
199 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
200 aarch64_linux_read_description.
201 * linux-aarch64-low.c (aarch64_linux_read_description):
202 Merge with aarch64_arch_setup.
203 (aarch64_arch_setup): Call aarch64_linux_read_description.
204 * linux-aarch64-tdesc.c: New file.
205 * linux-aarch64-tdesc.h: New file.
206
506fe5f4
YQ
2072017-11-24 Yao Qi <yao.qi@linaro.org>
208
209 * configure.srv: Set $srv_regobj for tic6x-linux.
210 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
211 (tic6x_read_description): Move some code to tic6x_arch_setup.
212 (tic6x_tdesc_test): New function.
213 (initialize_low_arch): Call selftests::register_test.
214
29f9a567
YQ
2152017-11-22 Yao Qi <yao.qi@linaro.org>
216
217 * remote-utils.c (prepare_resume_reply): Use memcpy.
218
578290ec
SM
2192017-11-19 Simon Marchi <simon.marchi@ericsson.com>
220
221 * linux-low.c (kill_one_lwp_callback): Return void, take
222 argument directly, don't filter on pid.
223 (linux_kill): Use for_each_thread.
224
eca55aec
SM
2252017-11-19 Simon Marchi <simon.marchi@ericsson.com>
226
227 * linux-low.c (need_step_over_p): Return bool, remove dummy
228 argument.
229 (linux_resume, proceed_all_lwps): Use find_thread.
230
25c28b4d
SM
2312017-11-19 Simon Marchi <simon.marchi@ericsson.com>
232
233 * linux-low.c (resume_status_pending_p): Return bool, remove
234 flag_p argument.
235 (linux_resume): Use find_thread.
236
5fdda392
SM
2372017-11-19 Simon Marchi <simon.marchi@ericsson.com>
238
239 * linux-low.c (struct thread_resume_array): Remove.
240 (linux_set_resume_request): Return void, take arguments
241 directly.
242 (linux_resume): Use for_each_thread.
243
fcb056a5
SM
2442017-11-19 Simon Marchi <simon.marchi@ericsson.com>
245
246 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
247 return bool, remove data argument.
248 (linux_stabilize_threads): Use find_thread.
249
139720c5
SM
2502017-11-19 Simon Marchi <simon.marchi@ericsson.com>
251
252 * linux-low.c (unsuspend_one_lwp): Remove.
253 (unsuspend_all_lwps): Use for_each_thread, inline code from
254 unsuspend_one_lwp.
255
6d1e5673
SM
2562017-11-19 Simon Marchi <simon.marchi@ericsson.com>
257
258 * gdbthread.h (find_thread): Add overload with ptid_t filter.
259 * linux-low.c (struct iterate_over_lwps_args): Remove.
260 (iterate_over_lwps_filter): Remove.
261 (iterate_over_lwps): Use find_thread.
262
bbf550d5
SM
2632017-11-19 Simon Marchi <simon.marchi@ericsson.com>
264
265 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
266 (linux_handle_new_gdb_connection): Use for_each_thread, inline
267 code from reset_lwp_ptrace_options_callback.
268
00192f77
SM
2692017-11-19 Simon Marchi <simon.marchi@ericsson.com>
270
271 * linux-arm-low.c (struct update_registers_data): Remove.
272 (update_registers_callback): Return void, take arguments
273 directly, don't check thread's pid.
274 (arm_insert_point, arm_remove_point): Use for_each_thread.
275
2bee2b6c
SM
2762017-11-19 Simon Marchi <simon.marchi@ericsson.com>
277
278 * win32-low.c (continue_one_thread): Return void, take argument
279 directly.
280 (child_continue): Use for_each_thread.
281
0b360f19
SM
2822017-11-19 Simon Marchi <simon.marchi@ericsson.com>
283
284 * win32-i386-low.c (update_debug_registers_callback): Rename
285 to ...
286 (update_debug_registers): ... this, return void, remove pid_p arg.
287 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
288
f27866ba
SM
2892017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
290
291 * inferiors.h (struct process_info): Add constructor, initialize
292 fields..
293 <syscalls_to_catch>: Change type to std::vector<int>.
294 * inferiors.c (add_process): Allocate process_info with new.
295 (remove_process): Free process_info with delete.
296 * linux-low.c (handle_extended_wait): Adjust.
297 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
298 * server.c (handle_general_set): Adjust.
299
e849ea89
PA
3002017-11-16 Pedro Alves <palves@redhat.com>
301
302 * remote-utils.c (remote_close): Block SIGIO signals instead of
303 uninstalling the SIGIO handler.
304
1d0aa65c
AH
3052017-11-16 Alan Hayward <alan.hayward@arm.com>
306
307 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
308
3491a34c
YQ
3092017-11-16 Yao Qi <yao.qi@linaro.org>
310
311 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
312 (tic6x_store_gregset): Likewise.
313 (tic6x_usrregs_info): Move it up.
314
a602f924
AH
3152017-11-15 Alan Hayward <alan.hayward@arm.com>
316
317 * Makefile.in: Update arch rules.
318 * configure.srv: Explicitly mark arch/ files.
319
5616b6c3
AS
3202017-11-13 Andreas Schwab <schwab@suse.de>
321
322 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
323 function.
324 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
325
d1928160
PA
3262017-11-06 Pedro Alves <palves@redhat.com>
327
328 * config.in, configure: Regenerate.
329
bac608e7
SM
3302017-10-27 Simon Marchi <simon.marchi@ericsson.com>
331
332 * target.c (struct thread_search): Remove.
333 (thread_search_callback): Remove.
334 (prepare_to_access_memory): Use for_each_thread instead of
335 find_inferior. Inline code from thread_search_callback.
336
eaddb425
SM
3372017-10-27 Simon Marchi <simon.marchi@ericsson.com>
338
339 * server.c (struct visit_actioned_threads_data): Remove.
340 (visit_actioned_threads): Change prototype to take arguments
341 directly.
342 (resume): Use find_thread instead of find_inferior.
343
99078d34
SM
3442017-10-27 Simon Marchi <simon.marchi@ericsson.com>
345
346 * server.c (queue_stop_reply_callback): Change prototype, return
347 void.
348 (find_status_pending_thread_callback): Remove.
349 (handle_status): Replace find_inferior with find_thread and
350 for_each_thread.
351
cc628f3d
AH
3522017-10-25 Alan Hayward <alan.hayward@arm.com>
353
354 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
355 with REGNO.
356 (aarch64_store_gregset): Likewise.
357 (aarch64_fill_fpregset): Likewise.
358 (aarch64_store_fpregset): Likewise.
359
4d3bb80e
SM
3602017-10-21 Simon Marchi <simon.marchi@ericsson.com>
361
362 * gdbthread.h (find_thread, for_each_thread): New functions.
363 * inferiors.c (thread_of_pid): Remove.
364 (find_any_thread_of_pid): Use find_thread.
365 * linux-low.c (num_lwps): Use for_each_thread.
366
7a7cdfa0
YQ
3672017-10-17 Yao Qi <yao.qi@linaro.org>
368
369 * Makefile.in: Remove one rule.
370 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
371
e675d170
YQ
3722017-10-17 Yao Qi <yao.qi@linaro.org>
373
374 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
375 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
376
7eb4e0f9
YQ
3772017-10-17 Yao Qi <yao.qi@linaro.org>
378
379 * configure.srv: Rename arm.o with arch/arm.o.
380
60d6cfc9
YQ
3812017-10-17 Yao Qi <yao.qi@linaro.org>
382
383 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
384 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
385 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
386 (arch-i386.o, arch-amd64.o): Remove rules.
387 (arch/%.o): New rule.
388 Update POSTCOMPILE and COMPILE.pre.
389 * configure.ac: Invoke AC_CONFIG_COMMANDS.
390 * configure: Re-generated.
391 * configure.srv: Replace arch-i386.o with arch/i386.o.
392 Replace arch-amd64.o with arch/amd64.o.
393
5bfda255
YQ
3942017-10-16 Yao Qi <yao.qi@linaro.org>
395
396 * configure: Regenerated.
397
9c80ecd6
SM
3982017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
399
400 * inferiors.h: (struct inferior_list): Remove.
401 (struct inferior_list_entry); Remove.
402 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
403 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
404 get_first_inferior): Remove.
405 (for_each_inferior, for_each_inferior_with_data, find_inferior,
406 find_inferior_id, find_inferior_in_random): Change signature.
407 * inferiors.c (all_threads): Change type to
408 std::list<thread_info *>.
409 (get_thread): Remove macro.
410 (find_inferior, find_inferior_id): Change signature, implement
411 using find_thread.
412 (find_inferior_in_random): Change signature, implement using
413 find_thread_in_random.
414 (for_each_inferior, for_each_inferior_with_data): Change
415 signature, implement using for_each_thread.
416 (add_inferior_to_list, remove_inferior): Remove.
417 (add_thread, get_first_thread, thread_of_pid,
418 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
419 (get_first_inferior, one_inferior_p, clear_inferior_list):
420 Remove.
421 (clear_inferiors, get_thread_process): Update.
422 * gdbthread.h: Include <list>.
423 (struct thread_info) <entry>: Remove field.
424 <id>: New field.
425 (all_threads): Change type to std::list<thread_info *>.
426 (get_first_inferior): Add doc.
427 (find_thread, for_each_thread, find_thread_in_random): New
428 functions.
429 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
430 * linux-arm-low.c (update_registers_callback): Update.
431 * linux-low.c (second_thread_of_pid_p): Update.
432 (kill_one_lwp_callback, linux_detach_lwp_callback,
433 delete_lwp_callback, status_pending_p_callback, same_lwp,
434 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
435 iterate_over_lwps, not_stopped_callback,
436 resume_stopped_resumed_lwps, count_events_callback,
437 select_singlestep_lwp_callback, select_event_lwp_callback,
438 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
439 suspend_and_send_sigstop_callback, wait_for_sigstop,
440 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
441 lwp_running, linux_set_resume_request, resume_status_pending_p,
442 need_step_over_p, start_step_over, linux_resume_one_thread,
443 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
444 reset_lwp_ptrace_options_callback): Update.
445 * linux-mips-low.c (update_watch_registers_callback): Update.
446 * regcache.c (regcache_invalidate_one, regcache_invalidate):
447 Update.
448 (free_register_cache_thread_one): Remove.
449 (regcache_release): Update.
450 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
451 handle_qxfer_threads_worker): Update.
452 (handle_query): Update, use list iterator.
453 (visit_actioned_threads, handle_pending_status,
454 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
455 clear_pending_status_callback, set_pending_status_callback,
456 find_status_pending_thread_callback, handle_status,
457 process_serial_event): Update.
458 * target.c (thread_search_callback): Update.
459 * thread-db.c (thread_db_get_tls_address): Update.
460 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
461 Update.
462 * win32-i386-low.c (update_debug_registers_callback): Update.
463 * win32-low.c (delete_thread_info, child_delete_thread,
464 continue_one_thread, suspend_one_thread,
465 get_child_debug_event): Adjust.
466
9179355e
SM
4672017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
468
469 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
470 * inferiors.h: Include <list>.
471 (struct process_info) <entry>: Remove field.
472 <pid>: New field.
473 (pid_of): Change macro to function.
474 (ptid_of, lwpid_of): Remove macro.
475 (all_processes): Change type to std::list<process_info *>.
476 (ALL_PROCESSES): Remove macro.
477 (for_each_process, find_process): New function.
478 * inferiors.c (all_processes): Change type to
479 std::list<process_info *>.
480 (find_thread_process): Adjust.
481 (add_process): Likewise.
482 (remove_process): Likewise.
483 (find_process_pid): Likewise.
484 (get_first_process): Likewise.
485 (started_inferior_callback): Remove.
486 (have_started_inferiors_p): Adjust.
487 (attached_inferior_callback): Remove.
488 (have_attached_inferiors_p): Adjust.
489 * linux-low.c (check_zombie_leaders): Likewise.
490 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
491 (x86_linux_update_xmltarget): Adjust.
492 * server.c (handle_query): Likewise.
493 (gdb_reattached_process): Remove.
494 (handle_status): Adjust.
495 (kill_inferior_callback): Likewise.
496 (detach_or_kill_inferior): Remove.
497 (print_started_pid): Likewise.
498 (print_attached_pid): Likewise.
499 (detach_or_kill_for_exit): Update.
500 (process_serial_event): Likewise.
501 * linux-arm-low.c (arm_new_fork): Likewise.
502
c9cb8905
SM
5032017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
504
505 * dll.h: Include <list>.
506 (struct dll_info): Add constructor.
507 <entry>: Remove field.
508 (all_dlls): Change type to std::list<dll_info>.
509 * dll.c: Include <algorithm>.
510 (get_dll): Remove macro.
511 (all_dlls): Change type to std::list<dll_info *>.
512 (free_one_dll): Remove.
513 (match_dll): Likewise.
514 (loaded_dll): Adjust.
515 (unloaded_dll): Adjust to all_dlls type change, use
516 std::find_if. Inline code from match_dll.
517 (clear_dlls): Adjust to all_dlls type change.
518 * server.c (emit_dll_description): Remove.
519 (handle_qxfer_libraries): Adjust to all_dlls type change,
520 integrate emit_dll_description's functionality.
521
04ec7890
SM
5222017-10-12 Simon Marchi <simon.marchi@ericsson.com>
523
524 * linux-low.h (struct linux_target_ops) <delete_process>: New
525 field.
526 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
527 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
528 (struct linux_target_ops): Add delete_process callback.
529 * linux-arm-low.c (arm_delete_process): New.
530 (struct linux_target_ops): Add delete_process callback.
531 * linux-bfin-low.c (struct linux_target_ops): Likewise.
532 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
533 * linux-m32r-low.c (struct linux_target_ops): Likewise.
534 * linux-mips-low.c (mips_linux_delete_process): New.
535 (struct linux_target_ops): Add delete_process callback.
536 * linux-ppc-low.c (struct linux_target_ops): Likewise.
537 * linux-s390-low.c (struct linux_target_ops): Likewise.
538 * linux-sh-low.c (struct linux_target_ops): Likewise.
539 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
540 * linux-tile-low.c (struct linux_target_ops): Likewise.
541 * linux-x86-low.c (x86_linux_delete_process): New.
542 (struct linux_target_ops): Add delete_process callback.
543 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
544
466eecee
SM
5452017-10-12 Simon Marchi <simon.marchi@ericsson.com>
546
547 * linux-aarch64-low.c (the_low_target): Add thread delete
548 callback.
549 * linux-arm-low.c (arm_delete_thread): New function.
550 (the_low_target): Add thread delete callback.
551 * linux-bfin-low.c (the_low_target): Likewise.
552 * linux-crisv32-low.c (the_low_target): Likewise.
553 * linux-low.c (delete_lwp): Invoke delete_thread callback if
554 set.
555 * linux-low.h (struct linux_target_ops) <delete_thread>: New
556 field.
557 * linux-m32r-low.c (the_low_target): Add thread delete callback.
558 * linux-mips-low.c (mips_linux_delete_thread): New function.
559 (the_low_target): Add thread delete callback.
560 * linux-ppc-low.c (the_low_target): Likewise.
561 * linux-s390-low.c (the_low_target): Likewise.
562 * linux-sh-low.c (the_low_target): Likewise.
563 * linux-tic6x-low.c (the_low_target): Likewise.
564 * linux-tile-low.c (the_low_target): Likewise.
565 * linux-x86-low.c (the_low_target): Likewise.
566 * linux-xtensa-low.c (the_low_target): Likewise.
567
b79f7801
YZ
5682017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
569
570 * win32-low.c: Include "common-inferior.h".
571
bc3b087d
SDJ
5722017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
573
574 * inferiors.c (set_inferior_cwd): New function.
575 * server.c (handle_general_set): Handle QSetWorkingDir packet.
576 (handle_query): Inform that QSetWorkingDir is supported.
577 * win32-low.c (create_process): Pass the inferior's cwd to
578 CreateProcess.
579
d092c5a2
SDJ
5802017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
581
582 * inferiors.c (current_inferior_cwd): New global variable.
583 (get_inferior_cwd): New function.
584 * inferiors.h (struct process_info) <cwd>: New field.
585
7da0a886
SDJ
5862017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
587
588 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
589 (OBS): Add gdb_tilde_expand.o.
590
289a6840
SM
5912017-10-02 Simon Marchi <simon.marchi@ericsson.com>
592
593 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
594 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
595
256642e8
PA
5962017-09-29 Pedro Alves <palves@redhat.com>
597
598 * ax.c (gdb_parse_agent_expr): Constify.
599 * ax.h (gdb_parse_agent_expr): Constify.
600 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
601 Constify.
602 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
603 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
604 * remote-utils.h (read_ptid): Constify.
605 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
606 (process_point_options, process_serial_event): Constify.
607 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
608 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
609 (cmd_qtbuffer): Constify.
610
5b9ca4d4
PA
6112017-09-29 Pedro Alves <palves@redhat.com>
612
613 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
614 fails.
615
94c207e0
PA
6162017-09-29 Pedro Alves <palves@redhat.com>
617
618 * linux-low.c (handle_extended_wait): Pass parent thread instead
619 of process to thread_db_notice_clone.
620 * linux-low.h (thread_db_notice_clone): Replace parent process
621 parameter with parent thread parameter.
622 * thread-db.c (find_one_thread): Add comment.
623 (thread_db_notice_clone): Replace parent process parameter with
624 parent thread parameter. Temporarily switch to the parent thread.
625
75352e28
SDJ
6262017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
627
628 * gdbthread.h: Include "common-gdbthread.h".
629 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
630 "if" when validating the ptid.
631 * remote-utils.c: Include "gdbthread.h".
632 (prepare_resume_reply): Use "switch_to_thread".
633 * target.c (done_accessing_memory): Likewise.
634
ad339634
AA
6352017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
636
637 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
638 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
639 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
640 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
641 s390x-gs-linux64-ipa.o to ipa_obj.
642 * linux-s390-low.c (HWCAP_S390_GS): New define.
643 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
644 New functions.
645 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
646 (s390_arch_setup): Check for guarded-storage support and choose
647 appropriate tdesc.
648 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
649 init_registers_s390x_gs_linux64.
650 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
651 enum value.
652 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
653 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
654
cc4d742f
SM
6552017-09-22 Simon Marchi <simon.marchi@ericsson.com>
656
657 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
658
f6327dcb
KB
6592017-09-21 Kevin Buettner <kevinb@redhat.com>
660
661 * linux-low.h (struct lwp_info): Add new field, thread_handle.
662 (thread_db_thread_handle): Declare.
663 * linux-low.c (linux_target_ops): Initialize thread_handle.
664 * server.c (handle_qxfer_threads_worker): Add support for
665 "handle" attribute.
666 * target.h (struct target_ops): Add new function pointer,
667 thread_handle.
668 (target_thread_handle): Define.
669 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
670 field in lwp.
671 (thread_db_thread_handle): New function.
672
86299109
KB
6732017-09-21 Kevin Buettner <kevinb@redhat.com>
674
675 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
676 * linux-low.h (thread_db_notice_clone): Declare.
677 * thread-db.c (thread_db_notice_clone): New function.
678
f557a88a
PA
6792017-09-21 Pedro Alves <palves@redhat.com>
680
681 * server.c (gdb_read_memory, handle_status, process_serial_event)
682 (handle_serial_event, handle_target_event): Adjust to
683 set_desired_thread prototype change.
684 * target.c (set_desired_thread): Remove 'use_general' parameter
685 and adjust.
686 * target.h (set_desired_thread): Remove 'use_general' parameter.
687
223ffa71
TT
6882017-09-20 Tom Tromey <tom@tromey.com>
689
690 * target.c (target_terminal::terminal_state): Define.
691 (target_terminal::init): Rename from target_terminal_init.
692 (target_terminal::inferior): Rename from
693 target_terminal_inferior.
694 (target_terminal::ours): Rename from target_terminal_ours.
695 (target_terminal::ours_for_output, target_terminal::info): New.
696
04fd3ba9
SM
6972017-09-16 Simon Marchi <simon.marchi@ericsson.com>
698
699 * server.c (accumulate_file_name_length): Remove.
700 (emit_dll_description): Adjust to std::string change.
701 (handle_qxfer_libraries): Use std::string to hold document.
702
5e187554
SM
7032017-09-16 Simon Marchi <simon.marchi@ericsson.com>
704
705 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
706 return type of xml_escape_text.
707 * server.c (emit_dll_description): Likewise.
708
1526853e
SM
7092017-09-16 Simon Marchi <simon.marchi@ericsson.com>
710
711 * server.c (captured_main): Accept argument for --selftest.
712 Update run_tests call.
713 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
714 when registering selftests.
715
c4dfafab
SDJ
7162017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
717
718 * regcache.c (get_thread_regcache): Update code to use "std::vector"
719 instead of "VEC" for "target_desc.reg_defs".
720 (regcache_cpy): Likewise.
721 (registers_to_string): Likewise.
722 (registers_from_string): Likewise.
723 (find_regno): Likewise.
724 (supply_regblock): Likewise.
725 (regcache_raw_read_unsigned): Likewise.
726 * tdesc.c (init_target_desc): Likewise.
727 (tdesc_create_reg): Likewise.
728 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
729 (struct target_desc) <reg_defs>: Convert to "std::vector".
730 (target_desc): Do not initialize "reg_defs".
731 (~target_desc): Update code to use "std::vector" instead of "VEC"
732 for "target_desc.reg_defs".
733 (operator==): Likewise.
734
124aceb4
SM
7352017-09-15 Simon Marchi <simon.marchi@ericsson.com>
736
737 * inferiors.h (thread_to_gdb_id): Remove.
738 * inferiors.c (thread_to_gdb_id): Remove.
739 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
740 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
741 lynx_store_registers, lynx_read_memory, lynx_write_memory):
742 Likewise.
743 * nto-low.c (nto_fetch_registers, nto_store_registers,
744 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
745
96cde54f
SM
7462017-09-15 Simon Marchi <simon.marchi@ericsson.com>
747
748 * inferiors.h (gdb_id_to_thread_id): Remove.
749 * inferiors.c (gdb_id_to_thread_id): Remove.
750 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
751 removal. Move pid declaration closer to where it's used.
752
e8ca139e
SM
7532017-09-15 Simon Marchi <simon.marchi@ericsson.com>
754
755 * server.c (handle_detach): New function.
756 (process_serial_event): Move code out, call handle_detach.
757
f8a4e119
SM
7582017-09-15 Simon Marchi <simon.marchi@ericsson.com>
759
760 * server.c (require_running): Rename to ...
761 (require_running_or_return): ... this ...
762 (require_running_or_break): ... and this.
763 (handle_query, process_serial_event): Adjust.
764
0eb0a407
SM
7652017-09-15 Simon Marchi <simon.marchi@ericsson.com>
766
767 * linux-low.c (linux_set_resume_request): Remove unused
768 variables.
769
785922a5
SM
7702017-09-15 Simon Marchi <simon.marchi@ericsson.com>
771
772 * server.c (first_thread_of): Remove.
773 (process_serial_event): Replace usage of first_thread_of with
774 find_any_thread_of_pid.
775 * tracepoint.c (same_process_p): Remove.
776 (gdb_agent_about_to_close): Replace usage of same_process_p with
777 find_any_thread_of_pid.
778 * linux-x86-low.c (same_process_callback): Remove.
779 (x86_arch_setup_process_callback): Replace usage of
780 same_process_callback with find_any_thread_of_pid.
781 * thread-db.c (any_thread_of): Remove.
782 (switch_to_process): Replace usage of any_thread_of with
783 find_any_thread_of_pid.
784 * inferiors.c (thread_pid_matches_callback): Remove.
785 (find_thread_process): Adjust to use find_any_thread_of_pid.
786
a059f00c
SDJ
7872017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
788
789 * regcache.c (get_thread_regcache): Guard calls to "memset"
790 with "!VEC_empty".
791
cc397f3a
SDJ
7922017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
793
794 * linux-low.c (handle_extended_wait): Use
795 "allocate_target_description" instead of "XNEW".
796 * linux-x86-low.c (initialize_low_arch): Likewise.
797
22916b07
YQ
7982017-09-05 Yao Qi <yao.qi@linaro.org>
799
800 * configure.srv (srv_i386_regobj): Remove.
801 (srv_amd64_regobj): Remove.
802 (srv_regobj): Set it to "" for x86 non-linux targets.
803 * linux-x86-tdesc.c (i386_linux_read_description):
804 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
805 (init_registers_i386): Remove the declaration.
806 (tdesc_i386): Remove the declaration.
807 (lynx_i386_arch_setup): Call i386_create_target_description.
808 * nto-x86-low.c: Likewise.
809 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
810 [!__x86_64__]: include arch/i386.h.
811 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
812
38602d55
YQ
8132017-09-05 Yao Qi <yao.qi@linaro.org>
814
815 * configure.srv (srv_amd64_linux_xmlfiles): Remove
816 i386/amd64-XXX-linux from it.
817
44b886ff
YQ
8182017-09-05 Yao Qi <yao.qi@linaro.org>
819
820 * configure.srv: Empty srv_amd64_linux_regobj if $development is
821 false.
822 (ipa_amd64_linux_regobj): Remove.
823 (ipa_x32_linux_regobj): Remove.
824
b4570e4b
YQ
8252017-09-05 Yao Qi <yao.qi@linaro.org>
826
827 * Makefile.in (arch-amd64.o): New rule.
828 * configure.srv: Append arch-amd64.o.
829 * linux-amd64-ipa.c: Include common/x86-xstate.h.
830 (get_ipa_tdesc): Call amd64_linux_read_description.
831 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
832 and init_registers_amd64_XXX.
833 * linux-x86-low.c (x86_linux_read_description): Call
834 amd64_linux_read_description.
835 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
836 (initialize_low_arch): Don't call init_registers_x32_XXX and
837 init_registers_amd64_XXX.
838 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
839 and tdesc_amd64_XXX.
840 [__x86_64__] (amd64_tdesc_test): New function.
841 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
842 and init_registers_amd64_XXX.
843 * linux-x86-tdesc.c: Include arch/amd64.h.
844 (xcr0_to_tdesc_idx): New function.
845 (i386_linux_read_description): New function.
846 (amd64_get_ipa_tdesc_idx): New function.
847 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
848 (amd64_get_ipa_tdesc): Declare.
849
d1f28ea2
YQ
8502017-09-05 Yao Qi <yao.qi@linaro.org>
851
852 * configure.srv (srv_i386_linux_xmlfiles): Remove
853 i386/i386-XXX-linux.xml from it.
854
25a93583
YQ
8552017-09-05 Yao Qi <yao.qi@linaro.org>
856
857 * configure.srv: Set srv_i386_linux_regobj empty if $development
858 is false.
859 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
860 initialize_low_tdesc.
861 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
862 with #if initialize_low_tdesc.
863 * linux-x86-tdesc-selftest.c: New file.
864 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
865
5f035c07
YQ
8662017-09-05 Yao Qi <yao.qi@linaro.org>
867
868 * Makefile.in (arch-i386.o): New rule.
869 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
870 (x86_64-*-linux*): Likewise.
871 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
872 include arch/i386.h.
873 (i386_linux_read_description): Remove code and call
874 i386_create_target_description.
875 * tdesc.c (allocate_target_description): New function.
876 * tdesc.h (set_tdesc_architecture): Remove declaration.
877 (set_tdesc_osabi): Likewise.
878
0abe8a89
YQ
8792017-09-05 Yao Qi <yao.qi@linaro.org>
880
881 * linux-x86-tdesc.c: Don't include <inttypes.h>.
882 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
883 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
884 .xmltarget.
885 * server.c (get_features_xml): Call tdesc_get_features_xml.
886 * tdesc.c (set_tdesc_architecture): New function.
887 (set_tdesc_osabi): New function.
888 (tdesc_get_features_xml): New function.
889 (tdesc_create_feature): Add an argument.
890 * tdesc.h (struct target_desc) <features>: New field.
891 <arch, osabi>: New field.
892 (~target_desc): xfree features, arch, and osabi.
893 (target_desc::oerator==): Don't compare .xmltarget.
894 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
895 (set_tdesc_osabi): Likewise.
896 (tdesc_get_features_xml): Likewise.
897
0a188386
YQ
8982017-09-05 Yao Qi <yao.qi@linaro.org>
899
900 * linux-x86-tdesc.c: Include selftest.h.
901 (i386_tdesc_test): New function.
902 (initialize_low_tdesc): Call selftests::register_test.
903 * tdesc.h: Include regdef.h.
904 (target_desc): Override operator == and !=.
905
f49ff000
YQ
9062017-09-05 Yao Qi <yao.qi@linaro.org>
907
908 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
909 (ipa_obj): Likewise.
910 * linux-i386-ipa.c: Include common/x86-xstate.h
911 (get_ipa_tdesc): Call i386_linux_read_description.
912 (initialize_low_tracepoint): Don't call init_registers_XXX
913 functions, call initialize_low_tdesc instead.
914 * linux-x86-low.c (x86_linux_read_description): Call
915 i386_linux_read_description.
916 (initialize_low_arch): Don't call init_registers_i386_XXX
917 functions, call initialize_low_tdesc.
918 * linux-x86-tdesc.c: New file.
919 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
920 (i386_get_ipa_tdesc_idx): Declare.
921 (i386_get_ipa_tdesc): Declare.
922 (initialize_low_tdesc): Declare.
923
2b68ef2f
YQ
9242017-09-05 Yao Qi <yao.qi@linaro.org>
925
926 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
927 instead of 0.
928
f7000548
YQ
9292017-09-05 Yao Qi <yao.qi@linaro.org>
930
931 * Makefile.in (IPA_OBJS): Add vec-ipa.o
932 * regcache.c (get_thread_regcache): Use VEC_length.
933 (init_register_cache): Likewise.
934 (regcache_cpy): Likewise.
935 (registers_to_string): Iterate reg_defs via VEC_iterate.
936 (find_regno): Likewise.
937 (find_register_by_number): Use VEC_index.
938 (register_size): Call find_register_by_number.
939 (register_data): Call find_register_by_number.
940 (supply_regblock): Use VEC_length.
941 (regcache_raw_read_unsigned): Likewise.
942 * tdesc.c (init_target_desc): Iterate reg_defs via
943 VEC_iterate.
944 (default_description): Update initializer.
945 (copy_target_description): Don't update field num_registers.
946 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
947 <num_registers>: Remove.
948
50a421ac
SM
9492017-09-04 Simon Marchi <simon.marchi@ericsson.com>
950
951 * Makefile.in (.SECONDARY): Define target.
952
23fdd69e
SM
9532017-09-03 Simon Marchi <simon.marchi@ericsson.com>
954
955 * linux-low.c (linux_wait_1): Adjust.
956 * server.c (queue_stop_reply_callback): Adjust.
957
0a2dde4a
SDJ
9582017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
959
960 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
961 QEnvironmentUnset and QEnvironmentReset packets.
962 (handle_query): Inform remote that QEnvironmentHexEncoded,
963 QEnvironmentUnset and QEnvironmentReset are supported.
964
6afd337d
SM
9652017-08-25 Simon Marchi <simon.marchi@ericsson.com>
966
967 * inferiors.h (inferior_target_data): Rename to ...
968 (thread_target_data): ... this.
969 (inferior_regcache_data): Rename to ...
970 (thread_regcache_data): ... this.
971 (set_inferior_regcache_data): Rename to ...
972 (set_thread_regcache_data): ... this.
973 * inferiors.c (inferior_target_data): Rename to ...
974 (thread_target_data): ... this.
975 (inferior_regcache_data): Rename to ...
976 (thread_regcache_data): ... this.
977 (set_inferior_regcache_data): Rename to ...
978 (set_thread_regcache_data): ... this.
979 (free_one_thread): Update.
980 * linux-low.h (get_thread_lwp): Update.
981 * regcache.c (get_thread_regcache): Update.
982 (regcache_invalidate_thread): Update.
983 (free_register_cache_thread): Update.
984 * win32-i386-low.c (update_debug_registers_callback): Update.
985 (win32_get_current_dr): Update.
986 * win32-low.c (thread_rec): Update.
987 (delete_thread_info): Update.
988 (continue_one_thread): Update.
989 (suspend_one_thread): Update.
990
a160cc46
SM
9912017-08-24 Simon Marchi <simon.marchi@ericsson.com>
992
993 * inferiors.c (set_inferior_target_data): Remove.
994 * inferiors.h (set_inferior_target_data): Remove.
995
6d580b63
YQ
9962017-08-18 Yao Qi <yao.qi@linaro.org>
997
998 * Makefile.in (OBS): Add selftest.o.
999 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1000 * configure, config.in: Re-generated.
1001 * server.c: Include common/sefltest.h.
1002 (captured_main): Handle option --selftest.
1003
f5a29eb0
YQ
10042017-08-09 Yao Qi <yao.qi@linaro.org>
1005
1006 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1007 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1008 i386-avx-mpx.o and i386-mmx.o.
1009 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1010 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1011 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1012 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1013 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1014 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1015 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1016 i386/amd64-avx-mpx.xml.
1017
57757c2f
YQ
10182017-08-09 Yao Qi <yao.qi@linaro.org>
1019
1020 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1021 and x32-avx-avx512.o.
1022 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1023 i386/x32-avx-avx512.xml.
1024
229d26fc
SM
10252017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1026
1027 * tracepoint.h (enum class fast_tpoint_collect_result): New
1028 enumeration.
1029 (fast_tracepoint_collecting): Change return type to
1030 fast_tpoint_collect_result.
1031 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1032 * linux-low.h: Include tracepoint.h.
1033 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1034 fast_tpoint_collect_result.
1035 * linux-low.c (handle_tracepoints): Adjust.
1036 (linux_fast_tracepoint_collecting): Change return type to
1037 fast_tpoint_collect_result.
1038 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1039 linux_wait_1, stuck_in_jump_pad_callback,
1040 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1041 proceed_one_lwp): Adjust to type change.
1042
2e1e43e1
YQ
10432017-07-10 Yao Qi <yao.qi@linaro.org>
1044
1045 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1046
adc764e7
YQ
10472017-06-29 Yao Qi <yao.qi@linaro.org>
1048
1049 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1050 Remove.
1051 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1052
a206891a
SM
10532017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1054
1055 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1056
9a6c7d9c
SDJ
10572017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1058
1059 * linux-low.c (linux_create_inferior): Adjust code to access the
1060 environment information via 'gdb_environ' class.
1061 * lynx-low.c (lynx_create_inferior): Likewise.
1062 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1063 (get_environ): Return a pointer to 'our_environ'.
1064 (captured_main): Initialize 'our_environ'.
1065 * server.h (get_environ): Adjust prototype.
1066 * spu-low.c (spu_create_inferior): Adjust code to access the
1067 environment information via 'gdb_environ' class.
1068
ae3e2ccf
SM
10692017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1070
1071 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1072 usage of "register" keyword.
1073
3e019bdc
SM
10742017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1075
1076 * configure: Re-generate.
1077
8465943a
SM
10782017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1079
1080 * configure: Re-generate.
1081
cf0dd6f0
SM
10822017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1083
1084 * Makefile.in (COMPILE.pre): Add "-x c++".
1085
9845682b
SDJ
10862017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1087
1088 * fork-child.c: Conditionally include <signal.h>.
1089
aefd8b33
SDJ
10902017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1091
1092 * server.c (handle_general_set): Handle new packet
1093 "QStartupWithShell".
1094 (handle_query): Add "QStartupWithShell" to the list of supported
1095 packets.
1096 (gdbserver_usage): Add help text explaining the
1097 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1098 options.
1099 (captured_main): Recognize and act upon the presence of the new
1100 CLI options.
1101
2090129c
SDJ
11022017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1103 Pedro Alves <palves@redhat.com>
1104
1105 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1106 * configure: Regenerate.
1107 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1108 "fork-inferior.o".
1109 (i[34567]86-*-lynxos*): Likewise.
1110 (spu*-*-*): Likewise.
1111 * fork-child.c: New file.
1112 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1113 and "environ.h".
1114 (linux_ptrace_fun): New function.
1115 (linux_create_inferior): Adjust function prototype to reflect
1116 change on "target.h". Adjust function code to use
1117 "fork_inferior".
1118 (linux_request_interrupt): Delete "signal_pid".
1119 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1120 (lynx_ptrace_fun): New function.
1121 (lynx_create_inferior): Adjust function prototype to reflect
1122 change on "target.h". Adjust function code to use
1123 "fork_inferior".
1124 * nto-low.c (nto_create_inferior): Adjust function prototype and
1125 code to reflect change on "target.h". Update comments.
1126 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1127 "common-terminal.h" and "environ.h".
1128 (terminal_fd): Moved to fork-child.c.
1129 (old_foreground_pgrp): Likewise.
1130 (restore_old_foreground_pgrp): Likewise.
1131 (last_status): Make it global.
1132 (last_ptid): Likewise.
1133 (our_environ): New variable.
1134 (startup_with_shell): Likewise.
1135 (program_name): Likewise.
1136 (program_argv): Rename to...
1137 (program_args): ...this.
1138 (wrapper_argv): New variable.
1139 (start_inferior): Delete function.
1140 (get_exec_wrapper): New function.
1141 (get_exec_file): Likewise.
1142 (get_environ): Likewise.
1143 (prefork_hook): Likewise.
1144 (post_fork_inferior): Likewise.
1145 (postfork_hook): Likewise.
1146 (postfork_child_hook): Likewise.
1147 (handle_v_run): Update code to deal with arguments coming from the
1148 remote host. Update calls from "start_inferior" to
1149 "create_inferior".
1150 (captured_main): Likewise. Initialize environment variable. Call
1151 "have_job_control".
1152 * server.h (post_fork_inferior): New prototype.
1153 (get_environ): Likewise.
1154 (last_status): Declare.
1155 (last_ptid): Likewise.
1156 (signal_pid): Likewise.
1157 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1158 (spu_ptrace_fun): New function.
1159 (spu_create_inferior): Adjust function prototype to reflect change
1160 on "target.h". Adjust function code to use "fork_inferior".
1161 * target.c (target_terminal_init): New function.
1162 (target_terminal_inferior): Likewise.
1163 (target_terminal_ours): Likewise.
1164 * target.h: Include <vector>.
1165 (struct target_ops) <create_inferior>: Update prototype.
1166 (create_inferior): Update macro.
1167 * utils.c (gdb_flush_out_err): New function.
1168 * win32-low.c (win32_create_inferior): Adjust function prototype
1169 and code to reflect change on "target.h".
1170
043a4934
SDJ
11712017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1172
1173 * inferiors.c (switch_to_thread): New function.
1174
15652511
SDJ
11752017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1176
1177 * Makefile.in (SFILE): Add "common/job-control.c".
1178 (OBS): Add "job-control.o".
1179
21ea5acd
SDJ
11802017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1181
1182 * Makefile: Remove "@host_makefile_frag@".
1183
e13cb306
PA
11842017-05-05 Pedro Alves <palves@redhat.com>
1185
1186 * configure: Regenerate.
1187
c94fee56
SDJ
11882017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1189
1190 * configure: Regenerate.
1191
a0ff9e1a
SM
11922017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1193
1194 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1195 software_single_step change of return type to
1196 std::vector<CORE_ADDR>.
1197 * linux-low.c (install_software_single_step_breakpoints):
1198 Likewise.
1199 * linux-low.h (install_software_single_step_breakpoints):
1200 Likewise.
1201
be628ab8
SDJ
12022017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1203
1204 * remote-utils.c: Include "gdb_termios.h" instead of
1205 "terminal.h".
1206 * terminal.h: Delete file.
1207
7c5ded6a
SDJ
12082017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1209
1210 * server.c: Include <vector>.
1211 <program_argv, wrapper_argv>: Convert to std::vector.
1212 (start_inferior): Rewrite function to use C++.
1213 (handle_v_run): Likewise. Update code that calculates the argv
1214 based on the vRun packet; use C++.
1215 (captured_main): Likewise.
1216
436252de
SM
12172017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1218
1219 * server.c (handle_v_cont): Initialize thread_resume::thread
1220 with null_ptid.
1221
9bf2a700
PA
12222017-04-05 Pedro Alves <palves@redhat.com>
1223
1224 * configure: Regenerate.
1225
a121b7c1
PA
12262017-04-05 Pedro Alves <palves@redhat.com>
1227
1228 * gdbreplay.c (sync_error): Constify.
1229 * linux-x86-low.c (push_opcode): Constify.
1230
21c8a587
PA
12312017-04-05 Pedro Alves <palves@redhat.com>
1232
1233 * win32-low.c (get_child_debug_event)
1234 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1235 Report TARGET_WAITKIND_SPURIOUS instead.
1236
fb32b4f7
PA
12372017-04-05 Pedro Alves <palves@redhat.com>
1238
1239 * remote-utils.c (remote_prepare, remote_open): Constify.
1240 * remote-utils.h (remote_prepare, remote_open): Constify.
1241 * server.c (captured_main): Constify 'port' handling.
1242
65dd1e59
SM
12432017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1244
1245 * Makefile.in (clean): Clear .deps.
1246
8fa5b777
SM
12472017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1248
1249 * .gitignore: Remove generated files, replace with wildcard.
1250 * (clean): Replace removal of generated files with wildcard.
1251 (version.c): Replace with...
1252 (version-generated.c): ...this.
1253 (xml-builtin.c): Replace with...
1254 (xml-builtin-generated.c): ...this.
1255 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1256 (%.c: *regformats*): Replace with...
1257 (%-generated.c: *regformats*): ...this.
1258
a12e714b
MF
12592017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1260
1261 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1262 (xtensa_fill_gregset): Call collect_register_by_name for
1263 threadptr register.
1264 (xtensa_store_gregset): Call supply_register_by_name for
1265 threadptr register.
1266
1a09b50a
MF
12672017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1268
1269 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1270 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1271 (xtensa_store_gregset): Call supply_register for all registers in
1272 a0_regnum..a0_regnum + C0_NREGS range.
1273
1a01e7c6
SM
12742017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1275
1276 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1277 (ax-ipa.o: ax.c): Remove.
1278 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1279 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1280 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1281 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1282 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1283
36bc18a8
SM
12842017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1285
1286 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1287 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1288 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1289 (errors-ipa.o: ../common/errors.c): Remove.
1290 (format-ipa.o: ../common/format.c): Remove.
1291 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1292
a8ebe3d5
SM
12932017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1294
1295 * Makefile.in (%-ipa.o: %.c): New rule.
1296 (tracepoint-ipa.o: tracepoint.c): Remove.
1297 (utils-ipa.o: utils.c): Remove.
1298 (remote-utils-ipa.o: remote-utils.c): Remove.
1299 (regcache-ipa.o: regcache.c): Remove.
1300 (i386-linux-ipa.o: i386-linux.c): Remove.
1301 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1302 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1303 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1304 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1305 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1306 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1307 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1308 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1309 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1310 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1311 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1312 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1313 (aarch64-ipa.o: aarch64.c): Remove.
1314 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1315 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1316 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1317 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1318 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1319 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1320 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1321 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1322 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1323 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1324 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1325 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1326 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1327 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1328 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1329 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1330 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1331 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1332 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1333 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1334 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1335 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1336 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1337 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1338 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1339 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1340 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1341 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1342 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1343 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1344 (tdesc-ipa.o: tdesc.c): Remove.
1345 (x32-linux-ipa.o: x32-linux.c): Remove.
1346 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1347 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1348
50cfacb7
SM
13492017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1350
1351 * Makefile.in (%.o: ../arch/%.c): New rule.
1352 (arm.o: ../arch/arm.c): Remove.
1353 (arm-linux.o: ../arch/arm-linux.c): Remove.
1354 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1355 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1356
c5a22423
SM
13572017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1358
1359 * Makefile.in (%.o: ../nat/%.c): New rule.
1360 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1361 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1362 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1363 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1364 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1365 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1366 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1367 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1368 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1369 (linux-personality.o: ../nat/linux-personality.c): Remove.
1370 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1371 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1372 (x86-linux.o: ../nat/x86-linux.c): Remove.
1373 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1374 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1375
6bda016b
SM
13762017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1377
1378 * Makefile.in (%.o: ../common/%.c): New rule.
1379 (signals.o: ../common/signals.c): Remove.
1380 (print-utils.o: ../common/print-utils.c): Remove.
1381 (rsp-low.o: ../common/rsp-low.c): Remove.
1382 (common-utils.o: ../common/common-utils.c): Remove.
1383 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1384 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1385 (vec.o: ../common/vec.c): Remove.
1386 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1387 (xml-utils.o: ../common/xml-utils.c): Remove.
1388 (ptid.o: ../common/ptid.c): Remove.
1389 (buffer.o: ../common/buffer.c): Remove.
1390 (format.o: ../common/format.c): Remove.
1391 (filestuff.o: ../common/filestuff.c): Remove.
1392 (agent.o: ../common/agent.c): Remove.
1393 (errors.o: ../common/errors.c): Remove.
1394 (environ.o: ../common/environ.c): Remove.
1395 (common-debug.o: ../common/common-debug.c): Remove.
1396 (cleanups.o: ../common/cleanups.c): Remove.
1397 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1398 (fileio.o: ../common/fileio.c): Remove.
1399 (common-regcache.o: ../common/common-regcache.c): Remove.
1400 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1401 (new-op.o: ../common/new-op.c): Remove.
1402 (btrace-common.o: ../common/btrace-common.c): Remove.
1403
21122961
SM
14042017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1405
1406 * Makefile.in (%.o: ../target/%.c): New rule.
1407 (waitstatus.o: ../target/waitstatus.c): Remove.
1408
c362e621
SM
14092017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1410
1411 * Makefile.in
1412 (%.c: ../regformats/%.dat,
1413 (%.c: ../regformats/arm/%.dat,
1414 (%.c: ../regformats/i386/%.dat,
1415 (%.c: ../regformats/rs6000/%.dat): New rules.
1416 (aarch64.c): Remove.
1417 (reg-arm.c): Remove.
1418 (arm-with-iwmmxt.c): Remove.
1419 (arm-with-vfpv2.c): Remove.
1420 (arm-with-vfpv3.c): Remove.
1421 (arm-with-neon.c): Remove.
1422 (reg-bfin.c): Remove.
1423 (reg-cris.c): Remove.
1424 (reg-crisv32.c): Remove.
1425 (i386.c): Remove.
1426 (i386-linux.c): Remove.
1427 (i386-avx.c): Remove.
1428 (i386-avx-linux.c): Remove.
1429 (i386-avx-avx512.c): Remove.
1430 (i386-avx-avx512-linux.c): Remove.
1431 (i386-mpx.c): Remove.
1432 (i386-mpx-linux.c): Remove.
1433 (i386-avx-mpx-avx512-pku.c): Remove.
1434 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1435 (i386-avx-mpx.c): Remove.
1436 (i386-avx-mpx-linux.c): Remove.
1437 (i386-mmx.c): Remove.
1438 (i386-mmx-linux.c): Remove.
1439 (reg-ia64.c): Remove.
1440 (reg-m32r.c): Remove.
1441 (reg-m68k.c): Remove.
1442 (reg-cf.c): Remove.
1443 (mips-linux.c): Remove.
1444 (mips-dsp-linux.c): Remove.
1445 (mips64-linux.c): Remove.
1446 (mips64-dsp-linux.c): Remove.
1447 (nios2-linux.c): Remove.
1448 (powerpc-32.c): Remove.
1449 (powerpc-32l.c): Remove.
1450 (powerpc-altivec32l.c): Remove.
1451 (powerpc-cell32l.c): Remove.
1452 (powerpc-vsx32l.c): Remove.
1453 (powerpc-isa205-32l.c): Remove.
1454 (powerpc-isa205-altivec32l.c): Remove.
1455 (powerpc-isa205-vsx32l.c): Remove.
1456 (powerpc-e500l.c): Remove.
1457 (powerpc-64l.c): Remove.
1458 (powerpc-altivec64l.c): Remove.
1459 (powerpc-cell64l.c): Remove.
1460 (powerpc-vsx64l.c): Remove.
1461 (powerpc-isa205-64l.c): Remove.
1462 (powerpc-isa205-altivec64l.c): Remove.
1463 (powerpc-isa205-vsx64l.c): Remove.
1464 (s390-linux32.c): Remove.
1465 (s390-linux32v1.c): Remove.
1466 (s390-linux32v2.c): Remove.
1467 (s390-linux64.c): Remove.
1468 (s390-linux64v1.c): Remove.
1469 (s390-linux64v2.c): Remove.
1470 (s390-te-linux64.c): Remove.
1471 (s390-vx-linux64.c): Remove.
1472 (s390-tevx-linux64.c): Remove.
1473 (s390x-linux64.c): Remove.
1474 (s390x-linux64v1.c): Remove.
1475 (s390x-linux64v2.c): Remove.
1476 (s390x-te-linux64.c): Remove.
1477 (s390x-vx-linux64.c): Remove.
1478 (s390x-tevx-linux64.c): Remove.
1479 (tic6x-c64xp-linux.c): Remove.
1480 (tic6x-c64x-linux.c): Remove.
1481 (tic6x-c62x-linux.c): Remove.
1482 (reg-sh.c): Remove.
1483 (reg-sparc64.c): Remove.
1484 (reg-spu.c): Remove.
1485 (amd64.c): Remove.
1486 (amd64-linux.c): Remove.
1487 (amd64-avx.c): Remove.
1488 (amd64-avx-linux.c): Remove.
1489 (amd64-avx-avx512.c): Remove.
1490 (amd64-avx-avx512-linux.c): Remove.
1491 (amd64-mpx.c): Remove.
1492 (amd64-mpx-linux.c): Remove.
1493 (amd64-avx-mpx-avx512-pku.c): Remove.
1494 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1495 (amd64-avx-mpx.c): Remove.
1496 (amd64-avx-mpx-linux.c): Remove.
1497 (x32.c): Remove.
1498 (x32-linux.c): Remove.
1499 (x32-avx.c): Remove.
1500 (x32-avx-linux.c): Remove.
1501 (x32-avx-avx512.c): Remove.
1502 (x32-avx-avx512-linux.c): Remove.
1503 (reg-xtensa.c): Remove.
1504 (reg-tilegx.c): Remove.
1505 (reg-tilegx32.c): Remove.
1506
1672e0d9
SDJ
15072017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1508
1509 * Makefile.in (SFILES): Add "common/environ.c".
1510 (OBJS): Add "common/environ.h".
1511
239b6d10
WT
15122017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1513
1514 * configure.ac: Check if the fs_base and gs_base members of
1515 `struct user_regs_struct' exist.
1516 * config.in: Regenerated.
1517 * configure: Likewise.
1518
694b382c
AT
15192017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1520
1521 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1522 target_read_memory.
1523 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1524 (get_next_pcs_syscall_next_pc): Likewise.
1525
7dc53023
LM
15262016-12-23 Luis Machado <lgustavo@codesourcery.com>
1527
1528 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1529 * nto-x86-low.c: Likewise.
1530
ad02e4fe
SM
15312016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1532
1533 * Makefile.in: Include disable-implicit-rules.mk.
1534
dcb07cfa
PA
15352016-11-23 Pedro Alves <palves@redhat.com>
1536
1537 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1538 (debug_vprintf): Use std::chrono::steady_clock instead of
1539 gettimeofday. Use '.' instead of ':'.
1540 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1541 (get_timestamp): Use std::chrono::steady_clock instead of
1542 gettimeofday.
1543
8629c02c
SM
15442016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1545
1546 * Makefile.in: Fix whitespace formatting.
1547
b593ecca
SM
15482016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1549
1550 * Makefile.in (SFILES, OBS): Flatten list and order
1551 alphabetically.
1552
9986ba08
PA
15532016-11-23 Pedro Alves <palves@redhat.com>
1554
1555 * event-loop.c (handle_file_event): Use warning.
1556 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1557 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1558 Use warning.
1559
4eefa7bc
PA
15602016-11-23 Pedro Alves <palves@redhat.com>
1561
1562 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1563 output.
1564 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1565 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1566 debug_printf and debug_flush for debug output.
1567 * server.c (handle_general_set): Likewise.
1568 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1569 output.
1570
5443506e
SM
15712016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1572
1573 * Makefile.in (.c.o): Replace rule with ...
1574 (%.o: %.c): ... this one.
1575
3b165252
SM
15762016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1577
1578 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1579 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1580 make.
1581 * configure.ac: Remove checks for the make program.
1582 * configure: Re-generate.
1583
0bcda685
PA
15842016-10-28 Pedro Alves <palves@redhat.com>
1585
1586 * Makefile.in (CXX_DIALECT): Get from configure.
1587 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1588 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1589 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1590 * config.in: Regenerate.
1591 * configure: Regenerate.
1592
c3805894
YQ
15932016-10-27 Yao Qi <yao.qi@linaro.org>
1594
1595 * linux-low.c (linux_supports_range_stepping): Return true if
1596 can_software_single_step return true.
1597
89342618
YQ
15982016-10-27 Yao Qi <yao.qi@linaro.org>
1599
1600 * inferiors.c (find_inferior_in_random): New function.
1601 * inferiors.h (find_inferior_in_random): Declare.
1602 * linux-low.c (linux_wait_for_event_filtered): Call
1603 find_inferior_in_random instead of find_inferior.
1604
e3652c84
YQ
16052016-10-27 Yao Qi <yao.qi@linaro.org>
1606
1607 * linux-low.c (linux_wait_1): If single-step breakpoints are
1608 inserted, remove them.
1609
5a04c4cf
PA
16102016-10-26 Pedro Alves <palves@redhat.com>
1611
1612 * linux-low.c (handle_extended_wait): Link parent/child fork
1613 threads.
1614 (linux_wait_1): Unlink them.
1615 (linux_set_resume_request): Ignore resume requests for
1616 already-resumed and unhandled fork child threads.
1617 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1618 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1619 New functions.
1620 (handle_v_requests) <vCont>: Don't call require_running.
1621 * server.h (in_queued_stop_replies): New declaration.
1622
cb93dc7f
YQ
16232016-10-24 Yao Qi <yao.qi@linaro.org>
1624
1625 PR server/20733
1626 * linux-aarch64-low.c (append_insns): Cast the return value to
1627 'uint32_t *'.
1628
a1078bea
YQ
16292016-10-10 Yao Qi <yao.qi@linaro.org>
1630
1631 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1632
1fb77080
SDJ
16332016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1634
1635 * target.c (target_supports_multi_process): New function, moved
1636 from...
1637 * target.h (target_supports_multi_process): ... here. Remove
1638 macro.
1639
39b5a3b9
TT
16402016-10-05 Tom Tromey <tom@tromey.com>
1641
1642 PR remote/20655:
1643 * tracepoint.c (handle_tracepoint_bkpts): Check
1644 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1645
c1d0b70a
YQ
16462016-10-05 Yao Qi <yao.qi@linaro.org>
1647
1648 * configure.srv: Update the path of arm-*.xml files.
1649
0a69eedb
YQ
16502016-10-05 Terry Guo <terry.guo@arm.com>
1651 Yao Qi <yao.qi@linaro.org>
1652
1653 * Makefile.in: Adjust the path of rules.
1654 * configure.srv: Update the path of xml files.
1655 * regformats/arm-with-iwmmxt.dat: Regenerated.
1656 * regformats/arm-with-neon.dat: Likewise.
1657 * regformats/arm-with-vfpv2.dat: Likewise.
1658 * regformats/arm-with-vfpv3.dat Likewise.
1659
17e16485
YQ
16602016-09-30 Yao Qi <yao.qi@linaro.org>
1661
1662 PR gdbserver/20627
1663 * target.c (target_stop_and_wait): Don't call
1664 target_continue_no_signal, use resume_stop instead.
1665
edeeb602
YQ
16662016-09-26 Yao Qi <yao.qi@linaro.org>
1667
1668 * linux-low.c (linux_wait_1): Call debug_exit.
1669
503b1c39
PA
16702016-09-23 Pedro Alves <palves@redhat.com>
1671
1672 * Makefile.in (SFILES): Add common/new-op.c.
1673 (OBS): Add common/new-op.o.
1674 (new-op.o): New rule.
1675
74172ecf
SM
16762016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1677
1678 * .gitinore: Ignore more files.
1679
fc6cda2e
YQ
16802016-09-21 Yao Qi <yao.qi@linaro.org>
1681
1682 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1683 23.
1684
bc1e6c81
SDJ
16852016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1686
1687 * server.c (start_inferior): Call target_mourn_inferior instead of
1688 mourn_inferior; pass ptid_t argument to it.
1689 (resume): Likewise.
1690 (handle_target_event): Likewise.
1691 * target.c (target_mourn_inferior): New function.
1692 * target.h (mourn_inferior): Delete macro.
1693
0e00e962
AA
16942016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1695
1696 * linux-low.c (lwp_is_stepping): New function.
1697
1d8cb77d
CL
16982016-09-06 Carl Love <cel@us.ibm.com>
1699
1700 * server.c (start_inferior): Fixed comment, requested comment change
1701 didn't get updated correctly. Removed reference to ptrace () call as
1702 it is only true on Linux systems.
1703
7313bced
CL
17042016-09-06 Carl Love <cel@us.ibm.com>
1705
1706 * server.c (start_inferior): Do not call
1707 function target_post_create_inferior () if the
1708 inferior process has already exited.
1709
cf6de44d
PA
17102016-09-05 Pedro Alves <palves@redhat.com>
1711
1712 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1713 (COMPILE.pre, CC_LD): Use CXX directly.
1714 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1715 * acinclude.m4: Don't include build-with-cxx.m4.
1716 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1717 * configure: Regenerate.
1718
c1da6748
AT
17192016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1720
1721 PR gdb/19495
1722 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1723 call writing data to own_buf.
1724
f2b9e3df
SDJ
17252016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1726
1727 * target.c (mywait): Call target_wait instead of
1728 the_target->wait.
1729 (target_wait): New function.
1730
049a8570
SDJ
17312016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1732
1733 * server.c (start_inferior): New variable 'ptid'. Replace calls
1734 to the_target->resume by target_continue{,_no_signal}, depending
1735 on the case.
1736 * target.c (target_stop_and_wait): Call target_continue_no_signal
1737 instead of the_target->resume.
1738 (target_continue): New function.
1739
3aa5cfa0
AT
17402016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1741
1742 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1743
754653a7
AZ
17442016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1745
1746 PR server/20491
1747 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1748 ps_prochandle.
1749 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1750 * linux-arm-low.c (ps_get_thread_area): Likewise.
1751 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1752 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1753 * linux-mips-low.c (ps_get_thread_area): Likewise.
1754 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1755 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1756 * linux-x86-low.c (ps_get_thread_area): Likewise.
1757 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1758
ed036b40
PA
17592016-08-19 Pedro Alves <palves@redhat.com>
1760
1761 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1762
c8ef42ee
PA
17632016-08-19 Pedro Alves <palves@redhat.com>
1764
1765 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1766 comment. Use memcpy instead of casting through unsigned long.
1767
9c235a72
PA
17682016-08-19 Pedro Alves <palves@redhat.com>
1769
1770 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1771 allocating around 0x80000000.
1772
201506da
PA
17732016-08-19 Pedro Alves <palves@redhat.com>
1774
1775 PR gdb/20415
1776 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1777 (x32-avx512-linux-ipa.o): New rules.
1778 * configure.ac (x86_64-*-linux*): New x32 check.
1779 * configure.srv (ipa_x32_linux_regobj): New.
1780 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1781 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1782 descriptions.
1783 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1784 descriptions.
1785 * configure: Regenerate.
1786
f348d89a
PA
17872016-08-09 Pedro Alves <palves@redhat.com>
1788
1789 PR gdb/18653
1790 * Makefile.in (OBS): Add signals-state-save-restore.o.
1791 (signals-state-save-restore.o): New rule.
1792 * config.in: Regenerate.
1793 * configure: Regenerate.
1794 * linux-low.c: Include "signals-state-save-restore.h".
1795 (linux_create_inferior): Call
1796 restore_original_signals_state.
1797 * server.c: Include "dispositions-save-restore.h".
1798 (captured_main): Call save_original_signals_state.
1799
1baf5149
PA
18002016-08-05 Pedro Alves <palves@redhat.com>
1801
1802 * configure: Regenerate.
1803
fcd4a73d
YQ
18042016-08-04 Yao Qi <yao.qi@linaro.org>
1805
1806 * linux-low.c (regsets_fetch_inferior_registers): Check
1807 errno is ESRCH or not.
1808
979659d0
YQ
18092016-08-02 Yao Qi <yao.qi@linaro.org>
1810
1811 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1812 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1813 (thread_db_load_search): Update.
1814 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1815 td_ta_set_event and td_ta_event_getmsg.
1816
6598661d
PA
18172016-07-26 Pedro Alves <palves@redhat.com>
1818
1819 PR server/20414
1820 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1821 of unsigned long for 64-bit registers and use uint32_t instead of
1822 unsigned int for 32-bit registers.
1823
9cf12d57
PA
18242016-07-26 Pedro Alves <palves@redhat.com>
1825
1826 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1827 to 'ptrace'.
1828
305450ed
TT
18292016-07-21 Tom Tromey <tom@tromey.com>
1830
1831 * configure: Rebuild.
1832
2583da7c
YQ
18332016-07-21 Yao Qi <yao.qi@linaro.org>
1834
1835 * mem-break.c (find_gdb_breakpoint): Cast bp to
1836 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1837
21536b36
YQ
18382016-07-21 Yao Qi <yao.qi@linaro.org>
1839
1840 * server.c (handle_v_requests): Support s and S actions
1841 if target_supports_software_single_step return true.
1842
8901d193
YQ
18432016-07-21 Yao Qi <yao.qi@linaro.org>
1844
1845 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1846 is resume_step, call maybe_hw_step.
1847 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1848 and unstop them.
1849 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1850 breakpoints or not.
1851 (proceed_one_lwp): If resume request is resume_step, install
1852 reinsert breakpoints and call maybe_hw_step.
1853
0e9a339e
YQ
18542016-07-21 Yao Qi <yao.qi@linaro.org>
1855
1856 * linux-low.c (proceed_one_lwp): Declare.
1857 (linux_resume_one_thread): Remove local variable 'step'.
1858 Lift code enqueue signal. Call proceed_one_lwp instead of
1859 linux_resume_one_lwp.
1860
4281b351
YQ
18612016-07-21 Yao Qi <yao.qi@linaro.org>
1862
1863 * linux-low.c (linux_resume_one_thread): Call
1864 enqueue_pending_signal.
1865
984a2c04
YQ
18662016-07-21 Yao Qi <yao.qi@linaro.org>
1867
1868 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1869 * inferiors.c (do_restore_current_thread_cleanup): New function.
1870 (make_cleanup_restore_current_thread): Likewise.
1871 * linux-low.c (install_software_single_step_breakpoints): Call
1872 make_cleanup_restore_current_thread. Switch current_thread to
1873 thread.
1874
bec903c9
YQ
18752016-07-21 Yao Qi <yao.qi@linaro.org>
1876
1877 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1878 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1879 (clone_one_breakpoint): Likewise.
1880 (delete_reinsert_breakpoints): Change parameter to thread.
1881 Callers updated.
1882 (has_reinsert_breakpoints): Likewise.
1883 (uninsert_reinsert_breakpoints): Likewise.
1884 (reinsert_reinsert_breakpoints): Likewise.
1885 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1886 (delete_reinsert_breakpoints): Likewise.
1887 (reinsert_reinsert_breakpoints): Likewise.
1888 (uninsert_reinsert_breakpoints): Likewise.
1889 (has_reinsert_breakpoints): Likewise.
1890
63c40ec7
YQ
18912016-07-21 Yao Qi <yao.qi@linaro.org>
1892
1893 * inferiors.c (get_thread_process): Make parameter const.
1894 * inferiors.h (get_thread_process): Update declaration.
1895 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1896 Add new parameters child_thread and parent_thread. Callers
1897 updated.
1898 * mem-break.h (clone_all_breakpoints): Update declaration.
1899
9aa76cd0
YQ
19002016-07-21 Yao Qi <yao.qi@linaro.org>
1901
1902 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1903 <command_list, handler>: Remove.
1904 (struct gdb_breakpoint): New.
1905 (struct other_breakpoint): New.
1906 (struct reinsert_breakpoint): New.
1907 (is_gdb_breakpoint): New function.
1908 (any_persistent_commands): Update command_list if
1909 is_gdb_breakpoint returns true.
1910 (set_breakpoint): Create breakpoints according to their types.
1911 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1912 (set_gdb_breakpoint_1): Likewise.
1913 (set_gdb_breakpoint): Likewise.
1914 (clear_breakpoint_conditions): Change parameter type to
1915 'struct gdb_breakpoint *'.
1916 (clear_breakpoint_commands): Likewise.
1917 (clear_breakpoint_conditions_and_commands): Likewise.
1918 (add_condition_to_breakpoint): Likewise.
1919 (add_breakpoint_condition): Likewise.
1920 (add_commands_to_breakpoint): Likewise.
1921 (check_breakpoints): Check other_breakpoint.
1922 (clone_one_breakpoint): Clone breakpopint according to its type.
1923 * mem-break.h (struct gdb_breakpoint): Declare.
1924 (set_gdb_breakpoint): Update declaration.
1925 (clear_breakpoint_conditions_and_commands): Likewise.
1926 (add_breakpoint_condition): Likewise.
1927 (add_breakpoint_commands): Likewise.
1928 * server.c (process_point_options): Change parameter type to
1929 'struct gdb_breakpoint *'.
1930
811f8301
YQ
19312016-07-21 Yao Qi <yao.qi@linaro.org>
1932
1933 * mem-break.c (set_breakpoint_at): Rename it to ...
1934 (set_breakpoint_type_at): ... it.
1935 (set_breakpoint_at): Call set_breakpoint_type_at.
1936 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1937 * mem-break.h (set_breakpoint_at): Update comments.
1938
b1c51e36
CLT
19392016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1940
1941 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1942 to buf parameter.
1943 (nios2_store_gregset): Likewise.
1944
ced2dffb
PA
19452016-07-01 Pedro Alves <palves@redhat.com>
1946 Antoine Tremblay <antoine.tremblay@ericsson.com>
1947
1948 * linux-low.c: Change interface to take the target lwp_info
1949 pointer directly and return void. Handle detaching from a zombie
1950 thread.
1951 (linux_detach_lwp_callback): New function.
1952 (linux_detach): Detach from the leader thread after detaching from
1953 the clone threads.
1954
2ac09a5b
YQ
19552016-06-28 Yao Qi <yao.qi@linaro.org>
1956
1957 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1958 for variable new_offset.
1959 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1960 (aarch64_ftrace_insn_reloc_cb): Likewise.
1961 (aarch64_ftrace_insn_reloc_tb): Likewise.
1962 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1963 PRIx64 instead of PRIx32.
1964
79e7fd4f
YQ
19652016-06-28 Yao Qi <yao.qi@linaro.org>
1966
1967 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1968 (the_low_target): Install arm_get_syscall_trapinfo.
1969
061fc021
YQ
19702016-06-28 Yao Qi <yao.qi@linaro.org>
1971
1972 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1973 function.
1974 (the_low_target): Install aarch64_get_syscall_trapinfo.
1975
4cc32bec
YQ
19762016-06-28 Yao Qi <yao.qi@linaro.org>
1977
1978 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1979 Callers updated.
1980 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1981 Remove parameter sysno.
1982 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1983 sysret.
1984
782c1122
AA
19852016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1986
1987 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1988 (s390_emit_ne_goto): Likewise.
1989 (s390_emit_lt_goto): Likewise.
1990 (s390_emit_le_goto): Likewise.
1991 (s390_emit_gt_goto): Likewise.
1992 (s390_emit_ge_goto): Likewise.
1993 (s390x_emit_eq_goto): Likewise.
1994 (s390x_emit_ne_goto): Likewise.
1995 (s390x_emit_lt_goto): Likewise.
1996 (s390x_emit_le_goto): Likewise.
1997 (s390x_emit_gt_goto): Likewise.
1998 (s390x_emit_ge_goto): Likewise.
1999 (s390_emit_ops_impl): Mark variable static.
2000 (s390x_emit_ops): Likewise.
2001
2e7b624b
YQ
20022016-06-17 Yao Qi <yao.qi@linaro.org>
2003
2004 * linux-low.c (handle_extended_wait): Call
2005 uninsert_reinsert_breakpoints for the parent process. Remove
2006 reinsert breakpoints from the child process. Reinsert them to
2007 the parent process when vfork is done.
2008 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2009 (reinsert_reinsert_breakpoints): New function.
2010 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2011 (reinsert_reinsert_breakpoints): Declare.
2012
8a81c5d7
YQ
20132016-06-17 Yao Qi <yao.qi@linaro.org>
2014
2015 * linux-low.c (handle_extended_wait): If the parent is doing
2016 step-over, remove the reinsert breakpoints from the forked child.
2017
f50bf8e5
YQ
20182016-06-17 Yao Qi <yao.qi@linaro.org>
2019
2020 * linux-low.c (unsuspend_all_lwps): Declare.
2021 (linux_low_filter_event): If thread exited, call finish_step_over.
2022 If step-over is finished, unsuspend other threads.
2023
8376a3cb
YQ
20242016-06-17 Yao Qi <yao.qi@linaro.org>
2025
2026 * linux-low.c (linux_resume_one_lwp_throw): Assert
2027 has_reinsert_breakpoints returns false.
2028 * mem-break.c (delete_disabled_breakpoints): Assert
2029 bp type isn't reinsert_breakpoint.
2030
f79b145d
YQ
20312016-06-17 Yao Qi <yao.qi@linaro.org>
2032
2033 * linux-low.c (maybe_hw_step): New function.
2034 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2035 (finish_step_over): Switch current_thread to lwp temporarily,
2036 and assert has_reinsert_breakpoints returns true.
2037 (proceed_one_lwp): Call maybe_hw_step.
2038 * mem-break.c (has_reinsert_breakpoints): New function.
2039 * mem-break.h (has_reinsert_breakpoints): Declare.
2040
0ae534d2
JT
20412016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2042
2043 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2044
fcdad592
YQ
20452016-05-17 Yao Qi <yao.qi@linaro.org>
2046
2047 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2048 instead of find_inferior.
2049
9e784964
YQ
20502016-05-05 Yao Qi <yao.qi@linaro.org>
2051
2052 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2053 Initialize res to zero.
2054
cf2ebb6e
YQ
20552016-05-05 Yao Qi <yao.qi@linaro.org>
2056
2057 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2058 to uint32_t.
2059
c1aebf87
UW
20602016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2061
2062 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2063 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2064 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2065
35fd2deb 20662016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2067 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2068
2069 * tracepoint.c (write_inferior_int8): New function.
2070 (cmd_qtenable_disable): Write enable flag using
2071 write_inferior_int8.
2072
484b3c32
YQ
20732016-04-25 Yao Qi <yao.qi@linaro.org>
2074
2075 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2076 (need_step_over_p): Return zero if the LWP has pending signals
2077 can be delivered on software single step target.
2078
85ba7d86
YQ
20792016-04-25 Yao Qi <yao.qi@linaro.org>
2080
2081 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2082 return instead of error.
2083
3539aa13
YQ
20842016-04-22 Yao Qi <yao.qi@linaro.org>
2085
2086 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2087 to 23.
2088
5b061e98
YQ
20892016-04-22 Yao Qi <yao.qi@linaro.org>
2090
2091 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2092 signal when stepping over breakpoint with software single
2093 step.
2094
3451269c
PA
20952016-04-21 Pedro Alves <palves@redhat.com>
2096
2097 * linux-s390-low.c (s390_collect_ptrace_register)
2098 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2099 add casts.
2100 (s390_check_regset): Use void * instead of gdb_byte *.
2101
a2358508
PA
21022016-04-20 Pedro Alves <palves@redhat.com>
2103
2104 * configure: Renegerate.
2105
6885166d
YQ
21062016-04-20 Yao Qi <yao.qi@linaro.org>
2107
2108 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2109 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2110 number 16.
2111 (arm_store_gregset): Likewise.
2112
2b863f51
WT
21132016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2114
2115 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2116 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2117 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2118 (amd64-avx-mpx-linux.c): New rules.
2119 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2120 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2121 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2122 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2123 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2124 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2125 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2126 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2127 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2128 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2129 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2130 * linux-x86-low.c (x86_linux_read_description): Add case for
2131 X86_XSTATE_AVX_MPX_MASK.
2132 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2133 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2134 init_registers_i386_avx_mpx_linux.
2135 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2136 (initialize_low_tracepoint): Call
2137 init_registers_i386_avx_mpx_linux.
2138 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2139 (initialize_low_tracepoint): Call
2140 init_registers_amd64_avx_mpx_linux.
2141 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2142 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2143 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2144 declarations.
2145
9b30624b
PA
21462016-04-18 Pedro Alves <palves@redhat.com>
2147
2148 * configure: Regenerate.
2149
45e3745e
AT
21502016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2151
2152 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2153 (aarch64_emit_sub): Likewise.
2154
2afc13ff
PA
21552016-04-12 Pedro Alves <palves@redhat.com>
2156
2157 * utils.c (prepare_to_throw_exception): Delete.
2158
6e774b13
SM
21592016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2160
2161 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2162
4dca19f8
MK
21632016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2164
2165 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2166
d0a9981f
MK
21672016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2168
2169 * linux-aarch64-ipa.c: Add <elf.h> include.
2170 * linux-ppc-ipa.c: Add <elf.h> include.
2171 * linux-s390-ipa.c: Add <elf.h> include.
2172
252db07e
MK
21732016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2174
2175 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2176 (get_raw_reg_ptr): Likewise.
2177 (get_trace_state_variable_value_ptr): Likewise.
2178 (set_trace_state_variable_value_ptr): Likewise.
2179 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2180 char *.
2181
14e2b6d9
MK
21822016-03-31 Wei-cheng Wang <cole945@gmail.com>
2183 Marcin Kościelnicki <koriakin@0x04.net>
2184
2185 PR/17221
2186 * linux-ppc-low.c (emit_insns): New function.
2187 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2188 (ppc_emit_prologue): New function.
2189 (ppc_emit_epilogue): New function.
2190 (ppc_emit_add): New function.
2191 (ppc_emit_sub): New function.
2192 (ppc_emit_mul): New function.
2193 (ppc_emit_lsh): New function.
2194 (ppc_emit_rsh_signed): New function.
2195 (ppc_emit_rsh_unsigned): New function.
2196 (ppc_emit_ext): New function.
2197 (ppc_emit_zero_ext): New function.
2198 (ppc_emit_log_not): New function.
2199 (ppc_emit_bit_and): New function.
2200 (ppc_emit_bit_or): New function.
2201 (ppc_emit_bit_xor): New function.
2202 (ppc_emit_bit_not): New function.
2203 (ppc_emit_equal): New function.
2204 (ppc_emit_less_signed): New function.
2205 (ppc_emit_less_unsigned): New function.
2206 (ppc_emit_ref): New function.
2207 (ppc_emit_const): New function.
2208 (ppc_emit_reg): New function.
2209 (ppc_emit_pop): New function.
2210 (ppc_emit_stack_flush): New function.
2211 (ppc_emit_swap): New function.
2212 (ppc_emit_stack_adjust): New function.
2213 (ppc_emit_call): New function.
2214 (ppc_emit_int_call_1): New function.
2215 (ppc_emit_void_call_2): New function.
2216 (ppc_emit_if_goto): New function.
2217 (ppc_emit_goto): New function.
2218 (ppc_emit_eq_goto): New function.
2219 (ppc_emit_ne_goto): New function.
2220 (ppc_emit_lt_goto): New function.
2221 (ppc_emit_le_goto): New function.
2222 (ppc_emit_gt_goto): New function.
2223 (ppc_emit_ge_goto): New function.
2224 (ppc_write_goto_address): New function.
2225 (ppc_emit_ops_impl): New static variable.
2226 (ppc64v1_emit_prologue): New function.
2227 (ppc64v2_emit_prologue): New function.
2228 (ppc64_emit_epilogue): New function.
2229 (ppc64_emit_add): New function.
2230 (ppc64_emit_sub): New function.
2231 (ppc64_emit_mul): New function.
2232 (ppc64_emit_lsh): New function.
2233 (ppc64_emit_rsh_signed): New function.
2234 (ppc64_emit_rsh_unsigned): New function.
2235 (ppc64_emit_ext): New function.
2236 (ppc64_emit_zero_ext): New function.
2237 (ppc64_emit_log_not): New function.
2238 (ppc64_emit_bit_and): New function.
2239 (ppc64_emit_bit_or): New function.
2240 (ppc64_emit_bit_xor): New function.
2241 (ppc64_emit_bit_not): New function.
2242 (ppc64_emit_equal): New function.
2243 (ppc64_emit_less_signed): New function.
2244 (ppc64_emit_less_unsigned): New function.
2245 (ppc64_emit_ref): New function.
2246 (ppc64_emit_const): New function.
2247 (ppc64v1_emit_reg): New function.
2248 (ppc64v2_emit_reg): New function.
2249 (ppc64_emit_pop): New function.
2250 (ppc64_emit_stack_flush): New function.
2251 (ppc64_emit_swap): New function.
2252 (ppc64v1_emit_call): New function.
2253 (ppc64v2_emit_call): New function.
2254 (ppc64v1_emit_int_call_1): New function.
2255 (ppc64v2_emit_int_call_1): New function.
2256 (ppc64v1_emit_void_call_2): New function.
2257 (ppc64v2_emit_void_call_2): New function.
2258 (ppc64_emit_if_goto): New function.
2259 (ppc64_emit_eq_goto): New function.
2260 (ppc64_emit_ne_goto): New function.
2261 (ppc64_emit_lt_goto): New function.
2262 (ppc64_emit_le_goto): New function.
2263 (ppc64_emit_gt_goto): New function.
2264 (ppc64_emit_ge_goto): New function.
2265 (ppc64v1_emit_ops_impl): New static variable.
2266 (ppc64v2_emit_ops_impl): New static variable.
2267 (ppc_emit_ops): New function.
2268 (linux_low_target): Wire in ppc_emit_ops.
2269
a2174ba4
MK
22702016-03-31 Wei-cheng Wang <cole945@gmail.com>
2271 Marcin Kościelnicki <koriakin@0x04.net>
2272
2273 PR/17221
2274 * Makefile.in: Add powerpc-*-ipa.o
2275 * configure.srv: Add ipa_obj for powerpc*-linux.
2276 * linux-ppc-ipa.c: New file.
2277 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2278 includes.
2279 (PPC_FIELD): New macro.
2280 (PPC_SEXT): New macro.
2281 (PPC_OP6): New macro.
2282 (PPC_BO): New macro.
2283 (PPC_LI): New macro.
2284 (PPC_BD): New macro.
2285 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2286 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2287 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2288 (ppc_get_thread_area): New function.
2289 (is_elfv2_inferior): New function.
2290 (gen_ds_form): New function.
2291 (GEN_STD): New macro.
2292 (GEN_STDU): New macro.
2293 (GEN_LD): New macro.
2294 (GEN_LDU): New macro.
2295 (gen_d_form): New function.
2296 (GEN_ADDI): New macro.
2297 (GEN_ADDIS): New macro.
2298 (GEN_LI): New macro.
2299 (GEN_LIS): New macro.
2300 (GEN_ORI): New macro.
2301 (GEN_ORIS): New macro.
2302 (GEN_LWZ): New macro.
2303 (GEN_STW): New macro.
2304 (GEN_STWU): New macro.
2305 (gen_xfx_form): New function.
2306 (GEN_MFSPR): New macro.
2307 (GEN_MTSPR): New macro.
2308 (GEN_MFCR): New macro.
2309 (GEN_MTCR): New macro.
2310 (GEN_SYNC): New macro.
2311 (GEN_LWSYNC): New macro.
2312 (gen_x_form): New function.
2313 (GEN_OR): New macro.
2314 (GEN_MR): New macro.
2315 (GEN_LWARX): New macro.
2316 (GEN_STWCX): New macro.
2317 (GEN_CMPW): New macro.
2318 (gen_md_form): New function.
2319 (GEN_RLDICL): New macro.
2320 (GEN_RLDICR): New macro.
2321 (gen_i_form): New function.
2322 (GEN_B): New macro.
2323 (GEN_BL): New macro.
2324 (gen_b_form): New function.
2325 (GEN_BNE): New macro.
2326 (GEN_LOAD): New macro.
2327 (GEN_STORE): New macro.
2328 (gen_limm): New function.
2329 (gen_atomic_xchg): New function.
2330 (gen_call): New function.
2331 (ppc_relocate_instruction): New function.
2332 (ppc_install_fast_tracepoint_jump_pad): New function.
2333 (ppc_get_min_fast_tracepoint_insn_len): New function.
2334 (ppc_get_ipa_tdesc_idx): New function.
2335 (the_low_target): Wire in the new functions.
2336 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2337 tdescs.
2338 * linux-ppc-tdesc.h: New file.
2339
a13c4696
MK
23402016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2341
2342 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2343 (alloc_jump_pad_buffer): New function.
2344 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2345 (alloc_jump_pad_buffer): New function.
2346 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2347 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2348 (alloc_jump_pad_buffer): New function.
2349 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2350 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2351 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2352 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2353
1cda1512
MK
23542016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2355
2356 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2357 * linux-amd64-ipa.c: Likewise.
2358 * linux-i386-ipa.c: Likewise.
2359 * linux-s390-ipa.c: Likewise.
2360 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2361 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2362 set_trace_state_variable_value_ptr.
2363 (struct ipa_sym_addresses): Likewise.
2364 (symbol_list): Likewise.
2365 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2366 accessing gdb_collect directly.
2367 (gdb_collect_ptr_type): New typedef.
2368 (get_raw_reg_ptr_type): New typedef.
2369 (get_trace_state_variable_value_ptr_type): New typedef.
2370 (set_trace_state_variable_value_ptr_type): New typedef.
2371 (gdb_collect_ptr): New global.
2372 (get_raw_reg_ptr): New global.
2373 (get_trace_state_variable_value_ptr): New global.
2374 (set_trace_state_variable_value_ptr): New global.
2375 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2376 accessing get_raw_reg directly.
2377 (get_get_tsv_func_addr): Likewise for
2378 get_trace_state_variable_value_ptr.
2379 (get_set_tsv_func_addr): Likewise for
2380 set_trace_state_variable_value_ptr.
2381 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2382
72fb5488
SM
23832016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2384
2385 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2386
28170b88
MK
23872016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2388
2389 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2390 packets.
2391 (relocate_instruction): Remove own_buf.
2392 * server.c (own_buf): Make global.
2393 (handle_v_requests): Make global.
2394 * server.h (own_buf): New declaration.
2395 (handle_v_requests): New prototype.
2396
f39e8743
MK
23972016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2398
2399 PR 18377
2400 * linux-s390-low.c (add_insns): New function.
2401 (s390_emit_prologue): New function.
2402 (s390_emit_epilogue): New function.
2403 (s390_emit_add): New function.
2404 (s390_emit_sub): New function.
2405 (s390_emit_mul): New function.
2406 (s390_emit_lsh): New function.
2407 (s390_emit_rsh_signed): New function.
2408 (s390_emit_rsh_unsigned): New function.
2409 (s390_emit_ext): New function.
2410 (s390_emit_log_not): New function.
2411 (s390_emit_bit_and): New function.
2412 (s390_emit_bit_or): New function.
2413 (s390_emit_bit_xor): New function.
2414 (s390_emit_bit_not): New function.
2415 (s390_emit_equal): New function.
2416 (s390_emit_less_signed): New function.
2417 (s390_emit_less_unsigned): New function.
2418 (s390_emit_ref): New function.
2419 (s390_emit_if_goto): New function.
2420 (s390_emit_goto): New function.
2421 (s390_write_goto_address): New function.
2422 (s390_emit_litpool): New function.
2423 (s390_emit_const): New function.
2424 (s390_emit_call): New function.
2425 (s390_emit_reg): New function.
2426 (s390_emit_pop): New function.
2427 (s390_emit_stack_flush): New function.
2428 (s390_emit_zero_ext): New function.
2429 (s390_emit_swap): New function.
2430 (s390_emit_stack_adjust): New function.
2431 (s390_emit_set_r2): New function.
2432 (s390_emit_int_call_1): New function.
2433 (s390_emit_void_call_2): New function.
2434 (s390_emit_eq_goto): New function.
2435 (s390_emit_ne_goto): New function.
2436 (s390_emit_lt_goto): New function.
2437 (s390_emit_le_goto): New function.
2438 (s390_emit_gt_goto): New function.
2439 (s390_emit_ge_goto): New function.
2440 (s390x_emit_prologue): New function.
2441 (s390x_emit_epilogue): New function.
2442 (s390x_emit_add): New function.
2443 (s390x_emit_sub): New function.
2444 (s390x_emit_mul): New function.
2445 (s390x_emit_lsh): New function.
2446 (s390x_emit_rsh_signed): New function.
2447 (s390x_emit_rsh_unsigned): New function.
2448 (s390x_emit_ext): New function.
2449 (s390x_emit_log_not): New function.
2450 (s390x_emit_bit_and): New function.
2451 (s390x_emit_bit_or): New function.
2452 (s390x_emit_bit_xor): New function.
2453 (s390x_emit_bit_not): New function.
2454 (s390x_emit_equal): New function.
2455 (s390x_emit_less_signed): New function.
2456 (s390x_emit_less_unsigned): New function.
2457 (s390x_emit_ref): New function.
2458 (s390x_emit_if_goto): New function.
2459 (s390x_emit_const): New function.
2460 (s390x_emit_call): New function.
2461 (s390x_emit_reg): New function.
2462 (s390x_emit_pop): New function.
2463 (s390x_emit_stack_flush): New function.
2464 (s390x_emit_zero_ext): New function.
2465 (s390x_emit_swap): New function.
2466 (s390x_emit_stack_adjust): New function.
2467 (s390x_emit_int_call_1): New function.
2468 (s390x_emit_void_call_2): New function.
2469 (s390x_emit_eq_goto): New function.
2470 (s390x_emit_ne_goto): New function.
2471 (s390x_emit_lt_goto): New function.
2472 (s390x_emit_le_goto): New function.
2473 (s390x_emit_gt_goto): New function.
2474 (s390x_emit_ge_goto): New function.
2475 (s390_emit_ops): New function.
2476 (struct linux_target_ops): Fill in emit_ops hook.
2477
abd9baf9
MK
24782016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2479
2480 PR 18377
2481 * Makefile.in: Add s390 IPA files.
2482 * configure.srv: Build IPA for s390.
2483 * linux-s390-ipa.c: New file.
2484 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2485 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2486 (tdesc_s390_linux32): Likewise.
2487 (init_registers_s390_linux32v1): Likewise.
2488 (tdesc_s390_linux32v1): Likewise.
2489 (init_registers_s390_linux32v2): Likewise.
2490 (tdesc_s390_linux32v2): Likewise.
2491 (init_registers_s390_linux64): Likewise.
2492 (tdesc_s390_linux64): Likewise.
2493 (init_registers_s390_linux64v1): Likewise.
2494 (tdesc_s390_linux64v1): Likewise.
2495 (init_registers_s390_linux64v2): Likewise.
2496 (tdesc_s390_linux64v2): Likewise.
2497 (init_registers_s390_te_linux64): Likewise.
2498 (tdesc_s390_te_linux64): Likewise.
2499 (init_registers_s390_vx_linux64): Likewise.
2500 (tdesc_s390_vx_linux64): Likewise.
2501 (init_registers_s390_tevx_linux64): Likewise.
2502 (tdesc_s390_tevx_linux64): Likewise.
2503 (init_registers_s390x_linux64): Likewise.
2504 (tdesc_s390x_linux64): Likewise.
2505 (init_registers_s390x_linux64v1): Likewise.
2506 (tdesc_s390x_linux64v1): Likewise.
2507 (init_registers_s390x_linux64v2): Likewise.
2508 (tdesc_s390x_linux64v2): Likewise.
2509 (init_registers_s390x_te_linux64): Likewise.
2510 (tdesc_s390x_te_linux64): Likewise.
2511 (init_registers_s390x_vx_linux64): Likewise.
2512 (tdesc_s390x_vx_linux64): Likewise.
2513 (init_registers_s390x_tevx_linux64): Likewise.
2514 (tdesc_s390x_tevx_linux64): Likewise.
2515 (have_hwcap_s390_vx): New static variable.
2516 (s390_arch_setup): Fill have_hwcap_s390_vx.
2517 (s390_get_thread_area): New function.
2518 (s390_ft_entry_gpr_esa): New const.
2519 (s390_ft_entry_gpr_zarch): New const.
2520 (s390_ft_entry_misc): New const.
2521 (s390_ft_entry_fr): New const.
2522 (s390_ft_entry_vr): New const.
2523 (s390_ft_main_31): New const.
2524 (s390_ft_main_64): New const.
2525 (s390_ft_exit_fr): New const.
2526 (s390_ft_exit_vr): New const.
2527 (s390_ft_exit_misc): New const.
2528 (s390_ft_exit_gpr_esa): New const.
2529 (s390_ft_exit_gpr_zarch): New const.
2530 (append_insns): New function.
2531 (s390_relocate_instruction): New function.
2532 (s390_install_fast_tracepoint_jump_pad): New function.
2533 (s390_get_min_fast_tracepoint_insn_len): New function.
2534 (s390_get_ipa_tdesc_idx): New function.
2535 (struct linux_target_ops): Wire in the above functions.
2536 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2537 * linux-s390-tdesc.h: New file.
2538
a4105d04
MK
25392016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2540
2541 * linux-s390-low.c (s390_supports_tracepoints): New function.
2542 (struct linux_target_ops): Fill supports_tracepoints hook.
2543
35ac8b3e
YQ
25442016-03-18 Yao Qi <yao.qi@linaro.org>
2545
2546 * linux-low.c (lwp_signal_can_be_delivered): New function.
2547 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2548
94610ec4
YQ
25492016-03-18 Yao Qi <yao.qi@linaro.org>
2550
2551 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2552 0 if signal is enqueued. Remove 'signal' from one debugging
2553 message. Move one debugging message to some lines below.
2554 Remove code setting 'signal' to 0.
2555
80aea927
YQ
25562016-03-18 Yao Qi <yao.qi@linaro.org>
2557
2558 * linux-low.c (linux_low_filter_event): Remove redundant
2559 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2560
b04fd3be
MK
25612016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2562
2563 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2564 (struct linux_target_ops): Wire in the above.
2565
c40c8d4b
YQ
25662016-03-03 Yao Qi <yao.qi@linaro.org>
2567
2568 * linux-low.c: Update comments to start_step_over.
2569
0f8288ae
YQ
25702016-03-03 Yao Qi <yao.qi@linaro.org>
2571
2572 PR server/19736
2573 * linux-low.c (handle_extended_wait): Set child suspended
2574 if event_lwp->bp_reinsert isn't zero.
2575
fdbd04a8
YQ
25762016-03-02 Yao Qi <yao.qi@linaro.org>
2577
2578 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2579 enqueue_pending_signal.
2580
6896a8fa
MK
25812016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2582
2583 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2584 is actually loaded.
2585
ab503087
MK
25862016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2587
2588 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2589 (s390_regmap_3264) [!__s390x__]: New global.
2590 (s390_collect_ptrace_register): Skip map entries containing -1.
2591 (s390_supply_ptrace_register): Ditto.
2592 (s390_fill_gprs_high): New function.
2593 (s390_store_gprs_high): New function.
2594 (s390_regsets): Add NT_S390_HIGH_GPRS.
2595 (s390_get_hwcap): Enable on 31-bit.
2596 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2597 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2598 Detect NT_S390_HIGH_GPRS.
2599 (s390_usrregs_info_3264): Enable on 31-bit.
2600 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2601 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2602
ae91f625
MK
26032016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2604
2605 PR gdb/13808
2606 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2607 * configure.srv: Ditto.
2608 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2609 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2610 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2611 (init_registers_amd64_linux): Remove prototype.
2612 (tdesc_amd64_linux): Remove declaration.
2613 (get_ipa_tdesc): New function.
2614 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2615 initialize remaining tdescs.
2616 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2617 (init_registers_i386_linux): Remove prototype.
2618 (tdesc_i386_linux): Remove declaration.
2619 (get_ipa_tdesc): New function.
2620 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2621 initialize remaining tdescs.
2622 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2623 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2624 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2625 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2626 (x86_get_ipa_tdesc_idx): New function.
2627 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2628 * linux-x86-tdesc.h: New file.
2629 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2630 (target_get_ipa_tdesc_idx): New macro.
2631 * tracepoint.c (ipa_tdesc_idx): New macro.
2632 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2633 (symbol_list): Add ipa_tdesc_idx.
2634 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2635 (ipa_tdesc): Remove.
2636 (ipa_tdesc_idx): New variable.
2637 (get_context_regcache): Use get_ipa_tdesc.
2638 (gdb_collect): Ditto.
2639 (gdb_probe): Ditto.
2640 * tracepoint.h (get_ipa_tdesc): New prototype.
2641 (ipa_tdesc): Remove.
2642
e7ad2f14
PA
26432016-02-24 Pedro Alves <palves@redhat.com>
2644
2645 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2646 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2647 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2648 Factor out common code between the USE_SIGTRAP_SIGINFO and
2649 !USE_SIGTRAP_SIGINFO blocks.
2650 (linux_low_filter_event): Call save_stop_reason instead of
2651 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2652 Update comments.
2653 (linux_wait_1): Update comments.
2654
657f9cde
WW
26552016-02-24 Wei-cheng Wang <cole945@gmail.com>
2656
2657 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2658 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2659 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2660 ppc_insert_point, ppc_remove_point.
2661
b00b61e1
MK
26622016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2663
2664 * linux-s390-low.c (s390_supports_z_point_type): New function.
2665 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2666
553cb527
YQ
26672016-02-16 Yao Qi <yao.qi@linaro.org>
2668
2669 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2670 PC. Get pc from regcache_read_pc.
2671
a5652c21
YQ
26722016-02-12 Yao Qi <yao.qi@linaro.org>
2673
2674 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2675 or linux_get_pc_32bit.
2676 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2677
ed443b61
YQ
26782016-02-12 Yao Qi <yao.qi@linaro.org>
2679
2680 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2681 arm_linux_get_next_pcs_fixup.
2682
020ecd38
MK
26832016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2684
2685 * tracepoint.c (x_tracepoint_action_download): Change
2686 write_inferior_data_ptr to write_inferior_data_pointer.
2687 (cmd_qtstart): Likewise.
2688 (write_inferior_data_ptr): Remove.
2689 (download_agent_expr): Change write_inferior_data_ptr to
2690 write_inferior_data_pointer.
2691 (download_tracepoint_1): Likewise.
2692 (download_tracepoint): Likewise.
2693 (download_trace_state_variables): Likewise.
2694
7cae9051
WW
26952016-02-11 Wei-cheng Wang <cole945@gmail.com>
2696 Marcin Kościelnicki <koriakin@0x04.net>
2697
2698 * tracepoint.c (struct tracepoint_action_ops): Remove.
2699 (struct tracepoint_action): Remove ops.
2700 (m_tracepoint_action_download, r_tracepoint_action_download)
2701 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2702 size and offset accordingly.
2703 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2704 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2705 (tracepoint_action_send, tracepoint_action_download): New functions.
2706 Helpers for trace action handlers.
2707 (add_tracepoint_action): Remove setup actions ops.
2708 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2709
9f6a71b4
YQ
27102016-02-10 Yao Qi <yao.qi@linaro.org>
2711
2712 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2713
1e94266c
SM
27142016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2715
2716 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2717 to AC_OUTPUT.
2718 * configure: Regenerate.
2719
8adce034
SM
27202016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2721
2722 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2723 void * to gdb_byte *.
2724 * linux-low.c (siginfo_fixup): Likewise.
2725 (linux_xfer_siginfo): Likewise.
2726 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2727 Likewise.
2728 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2729
93813b37
WT
27302016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2731
2732 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2733 to srv_tgtobj.
2734 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2735 to srv_tgtobj.
2736 * linux-x86-low.c [__x86_64__]: Include
2737 "nat/amd64-linux-siginfo.h".
2738 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2739 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2740 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2741 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2742 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2743 (cpt_si_fd, si_timerid, si_overrun): Move from
2744 nat/amd64-linux-siginfo.c.
2745 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2746
8424cc97
SM
27472016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2748
2749 * server.c (skip_to_semicolon): Remove.
2750 (process_point_options): Use strchrnul instead of
2751 skip_to_semicolon.
2752
4d18591b
YQ
27532016-01-26 Yao Qi <yao.qi@linaro.org>
2754
2755 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2756 * linux-low.c (install_software_single_step_breakpoints): Don't
2757 call regcache_read_pc.
2758 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2759 argument pc.
2760
d8020970
YQ
27612016-01-26 Yao Qi <yao.qi@linaro.org>
2762
2763 * linux-low.c (install_software_single_step_breakpoints): Call
2764 regcache_read_pc instead of get_pc.
2765
8b207339
YQ
27662016-01-26 Yao Qi <yao.qi@linaro.org>
2767
2768 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2769 (unblock_async_io): Rename to ...
2770 (block_unblock_async_io): ... it. New function.
2771 (enable_async_io): Don't install SIGIO handler. Unblock it
2772 instead.
2773 (disable_async_io): Don't ignore SIGIO. Block it instead.
2774 (initialize_async_io): Install SIGIO handler. Don't call
2775 unblock_async_io.
2776
18879fef
YQ
27772016-01-26 Yao Qi <yao.qi@linaro.org>
2778
2779 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2780 first character is '\003', call *the_target->request_interrupt.
2781
a0f8e08a
YQ
27822016-01-25 Yao Qi <yao.qi@linaro.org>
2783
2784 * remote-utils.c (new_thread_notify): Remove.
2785 (dead_thread_notify): Likewise.
2786 * remote-utils.h (new_thread_notify): Remove declaration.
2787 (dead_thread_notify): Likewise.
2788
cc5fd9ab
MK
27892016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2790
2791 * gdb.trace/pending.exp: Fix expected message on continue.
2792
99e8eb11
MK
27932016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2794
2795 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2796 it works properly on big-endian machines where sizeof (CORE_ADDR)
2797 != sizeof (void *).
2798
a994041d
PA
27992016-01-21 Pedro Alves <palves@redhat.com>
2800
2801 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2802 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2803 * configure: Regenerate.
2804
f7a6a40d
YQ
28052016-01-21 Yao Qi <yao.qi@linaro.org>
2806
2807 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2808 is_thumb and set it according to CPSR saved on the stack.
2809 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2810 arm_sigreturn_next_pc.
2811
6f69e520
YQ
28122016-01-18 Yao Qi <yao.qi@linaro.org>
2813
2814 * linux-low.c (linux_set_pc_64bit): New function.
2815 (linux_get_pc_64bit): New function.
2816 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2817 Declare.
2818 * linux-sparc-low.c (debug_threads): Remove declaration.
2819 (sparc_get_pc): Remove.
2820 (the_low_target): Use linux_get_pc_64bit instead of
2821 sparc_get_pc.
2822 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2823 (the_low_target): Use linux_get_pc_64bit and
2824 linux_set_pc_64bit.
2825
276d4552
YQ
28262016-01-18 Yao Qi <yao.qi@linaro.org>
2827
2828 * linux-arm-low.c (debug_threads): Remove declaration.
2829 (arm_get_pc, arm_set_pc): Remove.
2830 (the_low_target): Use linux_get_pc_32bit and
2831 linux_set_pc_32bit.
2832 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2833 (the_low_target): Use linux_get_pc_32bit and
2834 linux_set_pc_32bit.
2835 * linux-cris-low.c (debug_threads): Remove declaration.
2836 (cris_get_pc, cris_set_pc,): Remove.
2837 (the_low_target): Use linux_get_pc_32bit and
2838 linux_set_pc_32bit.
2839 * linux-crisv32-low.c (debug_threads): Remove declaration.
2840 (cris_get_pc, cris_set_pc): Remove.
2841 (the_low_target): Use linux_get_pc_32bit and
2842 linux_set_pc_32bit.
2843 * linux-low.c: Include inttypes.h.
2844 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2845 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2846 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2847 (the_low_target): Use linux_get_pc_32bit and
2848 linux_set_pc_32bit.
2849 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2850 (the_low_target): Use linux_get_pc_32bit and
2851 linux_set_pc_32bit.
2852 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2853 (the_low_target): Use linux_get_pc_32bit and
2854 linux_set_pc_32bit.
2855 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2856 (the_low_target): Use linux_get_pc_32bit and
2857 linux_set_pc_32bit.
2858 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2859 (the_low_target): Use linux_get_pc_32bit and
2860 linux_set_pc_32bit.
2861
eb0edac8
GB
28622016-01-18 Gary Benson <gbenson@redhat.com>
2863
2864 * configure.ac (AC_FUNC_FORK): New check.
2865 * config.in: Regenerate.
2866 * configure: Likewise.
2867
1b451dda
YQ
28682016-01-14 Yao Qi <yao.qi@linaro.org>
2869
2870 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2871 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2872 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2873 arm_get_next_pcs_ctor.
2874
82075af2
JS
28752016-01-12 Josh Stone <jistone@redhat.com>
2876 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2877
2878 * inferiors.h: Include "gdb_vecs.h".
2879 (struct process_info): Add syscalls_to_catch.
2880 * inferiors.c (remove_process): Free syscalls_to_catch.
2881 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2882 syscall_return stops.
2883 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2884 * server.c (handle_general_set): Handle QCatchSyscalls.
2885 (handle_query): Report support for QCatchSyscalls.
2886 * target.h (struct target_ops): Add supports_catch_syscall.
2887 (target_supports_catch_syscall): New macro.
2888 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2889 (struct lwp_info): Add syscall_state.
2890 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2891 Maintain syscall_state and syscalls_to_catch across exec.
2892 (get_syscall_trapinfo): New function, proxy to the_low_target.
2893 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2894 (linux_low_filter_event): Toggle syscall_state entry/return for
2895 syscall traps, and set it ignored for all others.
2896 (gdb_catching_syscalls_p): New function.
2897 (gdb_catch_this_syscall_p): New function.
2898 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2899 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2900 (linux_supports_catch_syscall): New function.
2901 (linux_target_ops): Install it.
2902 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2903 (the_low_target): Install it.
2904
8f13a3ce
MF
29052016-01-12 Mike Frysinger <vapier@gentoo.org>
2906
2907 * acinclude.m4: Include new ../warning.m4 file.
2908 * configure: Regenerated.
2909 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2910
5b3da067
MF
29112016-01-12 Mike Frysinger <vapier@gentoo.org>
2912
2913 * ax.c (is_goto_target): Mark static.
2914 * linux-low.c (register_addr): Likewise.
2915 (linux_fetch_registers, linux_store_registers): Likewise.
2916 * mem-break.c (any_persistent_commands): Fix old prototype.
2917 (add_commands_to_breakpoint): Mark static.
2918 * regcache.c (find_register_by_name): Delete unused func.
2919 * remote-utils.c (hex_or_minus_one): Mark static.
2920 * server.c (monitor_show_help): Mark static.
2921 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2922 handle_v_requests): Likewise.
2923
bc504a31
PA
29242016-01-12 Pedro Alves <palves@redhat.com>
2925
2926 Remove use of the registered trademark symbol throughout.
2927
5a0dd67a
YQ
29282016-01-08 Yao Qi <yao.qi@linaro.org>
2929
2930 * remote-utils.c (getpkt): If c is '\003', call target hook
2931 request_interrupt.
2932
b2ca446f
YQ
29332016-01-06 Yao Qi <yao.qi@linaro.org>
2934
2935 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2936 linux-aarch32-low.c.
2937 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2938 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2939 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2940 (thumb2_breakpoint): Declare.
2941 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2942 linux-aarch32-low.h.
2943 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2944 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2945 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2946
edd88788
JB
29472016-01-01 Joel Brobecker <brobecker@adacore.com>
2948
2949 * gdbreplay.c (gdbreplay_version): Change copyright year in
2950 version message.
2951 * server.c (gdbserver_version): Likewise.
2952
65da7f14
PP
29532015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2954
2955 * server.c (crc32_table): Delete.
2956 (crc32): Use libiberty's xcrc32 function.
2957
4abd5ed2
JB
29582015-12-22 Joel Brobecker <brobecker@adacore.com>
2959
2960 * lynx-low.c (lynx_delete_thread_callback): New function.
2961 (lynx_mourn): Properly delete our process and all of its
2962 threads. Remove call to clear_inferiors.
2963
0e50fe5c
JB
29642015-12-22 Joel Brobecker <brobecker@adacore.com>
2965
2966 * target.c (thread_search_callback): Add check that
2967 the thread_stopped target callback is not NULL before
2968 calling it.
2969
35adc03f
YQ
29702015-12-21 Yao Qi <yao.qi@linaro.org>
2971
2972 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2973 arm breakpoint.
2974
bd2b2909
AT
29752015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2976
2977 * server.c (handle_query): Call target_supports_software_single_step.
2978
7fe5e27e
AT
29792015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2980
2981 * linux-low.c (single_step): New function.
2982 (linux_resume_one_lwp_throw): Call single_step.
2983 (start_step_over): Likewise.
2984
d9311bfa
AT
29852015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2986
2987 * Makefile.in (SFILES): Append arch/arm-linux.c,
2988 arch/arm-get-next-pcs.c.
2989 (arm-linux.o): New rule.
2990 (arm-get-next-pcs.o): New rule.
2991 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2992 arm-linux.o.
2993 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2994 to linux-aarch32-low.c.
2995 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2996 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2997 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2998 (thumb2_breakpoint_len): Likewise.
2999 (arm_is_thumb_mode): Make non-static.
3000 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3001 from linux-aarch32-low.c.
3002 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3003 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3004 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3005 (thumb2_breakpoint_len): Likewise.
3006 (arm_is_thumb_mode): New declaration.
3007 * linux-arm-low.c: Include arch/arm-linux.h
3008 aarch/arm-get-next-pcs.h, sys/syscall.h.
3009 (get_next_pcs_ops): New struct.
3010 (get_next_pcs_addr_bits_remove): New function.
3011 (get_next_pcs_is_thumb): New function.
3012 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3013 (arm_sigreturn_next_pc): Likewise.
3014 (get_next_pcs_syscall_next_pc): Likewise.
3015 (arm_gdbserver_get_next_pcs): Likewise.
3016 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3017 Initialize.
3018 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3019 * server.h: Include gdb_vecs.h.
3020
68ce2059
AT
30212015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3022
3023 * Makefile.in (SFILES): Append common/common-regcache.c.
3024 (OBS): Append common-regcache.o.
3025 (common-regcache.o): New rule.
3026 * regcache.c (init_register_cache): Initialize cache to
3027 REG_UNAVAILABLE.
3028 (regcache_raw_read_unsigned): New function.
3029 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3030 register_status enum.
3031
fa5308bd
AT
30322015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3033
3034 * linux-aarch64-low.c (the_low_targets): Rename
3035 breakpoint_reinsert_addr to get_next_pcs.
3036 * linux-arm-low.c (the_low_targets): Likewise.
3037 * linux-bfin-low.c (the_low_targets): Likewise.
3038 * linux-cris-low.c (the_low_targets): Likewise.
3039 * linux-crisv32-low.c (the_low_targets): Likewise.
3040 * linux-low.c (can_software_single_step): Likewise.
3041 (install_software_single_step_breakpoints): New function.
3042 (start_step_over): Use install_software_single_step_breakpoints.
3043 * linux-low.h: New CORE_ADDR vector.
3044 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3045 get_next_pcs.
3046 * linux-mips-low.c (the_low_targets): Likewise.
3047 * linux-nios2-low.c (the_low_targets): Likewise.
3048 * linux-sparc-low.c (the_low_targets): Likewise.
3049
4a6ed09b
PA
30502015-12-17 Pedro Alves <palves@redhat.com>
3051
3052 * linux-low.c (linux_kill_one_lwp): Remove references to
3053 LinuxThreads.
3054 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3055 to 'kill'.
3056 (linux_init_signals): Delete.
3057 (initialize_low): Adjust.
3058 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3059
7544db95
PA
30602015-12-16 Pedro Alves <palves@redhat.com>
3061
3062 * configure.ac (compiler warning flags): When testing a
3063 -Wno-foo option, check whether -Wfoo works instead.
3064 * configure: Regenerate.
3065
8020350c
DB
30662015-12-11 Don Breazeal <donb@codesourcery.com>
3067
3068 * server.c (process_serial_event): Don't exit from gdbserver
3069 in remote mode if there are still active inferiors.
3070
db91f502
YQ
30712015-12-11 Yao Qi <yao.qi@linaro.org>
3072
3073 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3074 arm_breakpoint_at if the process is 32-bit.
3075
b37a6290
YQ
30762015-12-11 Yao Qi <yao.qi@linaro.org>
3077
3078 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3079 arm breakpoint.
3080
17b1509a
YQ
30812015-12-07 Yao Qi <yao.qi@linaro.org>
3082
3083 * configure.srv: Append arm.o to srv_tgtobj for
3084 aarch64*-*-linux* target.
3085 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3086 from linux-arm-low.c.
3087 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3088 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3089 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3090 (thumb2_breakpoint_len): Likewise.
3091 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3092 (arm_breakpoint_kinds): Likewise.
3093 (arm_breakpoint_kind_from_pc): Likewise.
3094 (arm_sw_breakpoint_from_kind): Likewise.
3095 (arm_breakpoint_kind_from_current_state): Likewise.
3096 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3097 (arm_sw_breakpoint_from_kind): Declare.
3098 (arm_breakpoint_kind_from_current_state): Declare.
3099 (arm_breakpoint_at): Declare.
3100 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3101 arm_sw_breakpoint_from_kind if process is 32-bit.
3102 (aarch64_breakpoint_kind_from_pc): New function.
3103 (aarch64_breakpoint_kind_from_current_state): New function.
3104 (the_low_target): Initialize fields breakpoint_kind_from_pc
3105 and breakpoint_kind_from_current_state.
3106 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3107 linux-aarch32-low.c.
3108 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3109 (arm_breakpoint, arm_breakpoint_len): Likewise.
3110 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3111 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3112 (arm_is_thumb_mode): Likewise.
3113 (arm_breakpoint_at): Likewise.
3114 (arm_breakpoint_kind_from_pc): Likewise.
3115 (arm_sw_breakpoint_from_kind): Likewise.
3116 (arm_breakpoint_kind_from_current_state): Likewise.
3117
3118 Revert:
3119 2015-08-04 Yao Qi <yao.qi@linaro.org>
3120
3121 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3122 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3123 * server.c (extended_protocol): Remove "static".
3124 * server.h (extended_protocol): Declare it.
3125
ece66d65
JS
31262015-12-04 Josh Stone <jistone@redhat.com>
3127
3128 * target.h (struct target_ops) <arch_setup>: Rename to ...
3129 (struct target_ops) <post_create_inferior>: ... this.
3130 (target_arch_setup): Rename to ...
3131 (target_post_create_inferior): ... this, calling post_create_inferior.
3132 * server.c (start_inferior): Update target_arch_setup calls to
3133 target_post_create_inferior.
3134 * linux-low.c (linux_low_ptrace_options): Forward declare.
3135 (linux_arch_setup): Update its comment for general use.
3136 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3137 (struct linux_target_ops): Use linux_post_create_inferior.
3138 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3139 to post_create_inferior.
3140 * nto-low.c (struct nto_target_ops): Likewise.
3141 * spu-low.c (struct spu_target_ops): Likewise.
3142 * win32-low.c (struct win32_target_ops): Likewise.
3143
e58c48b4
AT
31442015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3145
3146 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3147
fbec8956
AT
31482015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3149
3150 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3151 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3152 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3153 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3154 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3155 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3156 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3157 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3158 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3159 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3160 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3161 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3162
9b4c5f87
AT
31632015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3164
3165 * linux-low.c (linux_look_up_symbols): Don't call
3166 linux_supports_traceclone.
3167 * linux-low.h (thread_db_init): Remove use_events argument.
3168 * thread-db.c (thread_db_use_event): Remove global variable.
3169 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3170 (struct thread_db) <td_create_bp>: Remove field.
3171 (thread_db_create_event): Remove function.
3172 (thread_db_enable_reporting): Likewise.
3173 (find_one_thread): Don't check for thread_db_use_events.
3174 (attach_thread): Likewise.
3175 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3176 (try_thread_db_load_1): Don't check for thread_db_use_events.
3177 (thread_db_init): Remove use_events argument and thread events
3178 handling.
3179 (remove_thread_event_breakpoints): Remove function.
3180 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3181
7d00775e
AT
31822015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3183
3184 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3185 New function.
3186 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3187 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3188 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3189 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3190 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3191 Initialize.
3192 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3193 New function.
3194 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3195 * linux-low.c (can_hardware_single_step): Use
3196 supports_hardware_single_step.
3197 (can_software_single_step): New function.
3198 (start_step_over): Call can_software_single_step.
3199 (linux_supports_hardware_single_step): New function.
3200 (struct target_ops) <supports_software_single_step>: Initialize.
3201 * linux-low.h (struct linux_target_ops)
3202 <supports_hardware_single_step>: Initialize.
3203 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3204 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3205 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3206 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3207 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3208 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3209 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3210 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3211 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3212 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3213 Initialize.
3214 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3215 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3216 Initialize.
3217 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3218 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3219 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3220 New function.
3221 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3222 * target.h (struct target_ops): <supports_software_single_step>:
3223 New field.
3224 (target_supports_software_single_step): New macro.
3225
2d97cd35
AT
32262015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3227
3228 * linux-low.c (linux_wait_1): Fix pc advance condition.
3229 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3230 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3231
769ef81f
AT
32322015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3233
3234 * linux-arm-low.c (arm_is_thumb_mode): New function.
3235 (arm_breakpoint_at): Use arm_is_thumb_mode.
3236 (arm_breakpoint_kind_from_current_state): New function.
3237 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3238 Initialize.
3239 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3240 (linux_breakpoint_kind_from_current_state): New function.
3241 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3242 * linux-low.h (struct linux_target_ops)
3243 <breakpoint_kind_from_current_state>: New field.
3244 * target.h (struct target_ops): Likewise.
3245 (target_breakpoint_kind_from_current_state): New macro.
3246
1bebeeca
PA
32472015-11-30 Pedro Alves <palves@redhat.com>
3248
3249 * linux-low.c (linux_resume): Wake up the event loop before
3250 returning.
3251
a67a9fae
PA
32522015-11-30 Pedro Alves <palves@redhat.com>
3253
3254 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3255 check.
3256 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3257 to -1.
3258 * target.c (struct thread_search): New structure.
3259 (thread_search_callback): New function.
3260 (prev_general_thread): New global.
3261 (prepare_to_access_memory, done_accessing_memory): New functions.
3262 * target.h (prepare_to_access_memory, done_accessing_memory):
3263 Replace macros with function declarations.
3264
f2faf941
PA
32652015-11-30 Pedro Alves <palves@redhat.com>
3266
3267 PR 14618
3268 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3269 report TARGET_WAITKIND_NO_RESUMED.
3270 * remote-utils.c (prepare_resume_reply): Handle
3271 TARGET_WAITKIND_NO_RESUMED.
3272 * server.c (report_no_resumed): New global.
3273 (handle_query) <qSupported>: Handle "no-resumed+". Report
3274 "no-resumed+" support.
3275 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3276 return error if the client doesn't support no-resumed events.
3277 (push_stop_notification): New function.
3278 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3279 events if the client supports them.
3280
a681f9c9
PA
32812015-11-30 Pedro Alves <palves@redhat.com>
3282
3283 * linux-low.c (thread_still_has_status_pending_p): Don't check
3284 vCont;t here.
3285 (lwp_resumed): New function.
3286 (status_pending_p_callback): Return early if the LWP is not
3287 supposed to be resumed.
3288
65706a29
PA
32892015-11-30 Pedro Alves <palves@redhat.com>
3290
3291 * linux-low.c (handle_extended_wait): Assert that the LWP's
3292 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3293 thread create events, leave the new child's status pending.
3294 (linux_low_filter_event): If GDB wants to hear about thread exit
3295 events, leave the LWP marked dead and don't delete it.
3296 (linux_wait_for_event_filtered): Don't check for thread exit.
3297 (filter_exit_event): New function.
3298 (linux_wait_1): Use it, when returning an exit event.
3299 (linux_resume_one_lwp_throw): Assert that the LWP's
3300 waitstatus is TARGET_WAITKIND_IGNORE.
3301 * remote-utils.c (prepare_resume_reply): Handle
3302 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3303 * server.c (report_thread_events): New global.
3304 (handle_general_set): Handle QThreadEvents.
3305 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3306 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3307 TARGET_WAITKIND_THREAD_EXITED.
3308 * server.h (report_thread_events): Declare.
3309
56cf4bed
PA
33102015-11-30 Pedro Alves <palves@redhat.com>
3311
3312 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3313 the thread's last_resume_kind was resume_stop.
3314
500c1d85
PA
33152015-11-30 Pedro Alves <palves@redhat.com>
3316
3317 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3318 before returning.
3319
de979965
PA
33202015-11-30 Pedro Alves <palves@redhat.com>
3321
3322 * server.c (handle_v_requests): Handle vCtrlC.
3323
34c65914
PA
33242015-11-30 Pedro Alves <palves@redhat.com>
3325
3326 * gdbthread.h (find_any_thread_of_pid): Declare.
3327 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3328 functions.
3329 * server.c (handle_query): If current_thread is NULL, look for
3330 another thread of the selected process.
3331
79efa585 33322015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3333 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3334
3335 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3336 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3337 name in reply.
3338 * target.h (struct target_ops) <thread_name>: New field.
3339 (target_thread_name): New macro.
3340
80d82c19
JB
33412015-11-23 Joel Brobecker <brobecker@adacore.com>
3342
3343 * regcache.h (regcache_invalidate_pid): Add declaration.
3344 * regcache.c (regcache_invalidate_pid): New function, extracted
3345 from regcache_invalidate.
3346 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3347 Add trivial documentation comment.
3348 * lynx-low.c: Use regcache_invalidate_pid instead of
3349 regcache_invalidate.
3350
64da5dd5
JB
33512015-11-23 Joel Brobecker <brobecker@adacore.com>
3352
3353 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3354 and Elf64_auxv_t if the target is Android.
3355
37ce4055
DE
33562015-11-22 Doug Evans <xdje42@gmail.com>
3357
3358 * target.h: #include <sys/types.h>.
3359
06e03fff
PA
33602015-11-19 Pedro Alves <palves@redhat.com>
3361
3362 * linux-low.c (linux_process_qsupported): Change prototype.
3363 Adjust.
3364 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3365 Change prototype.
3366 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3367 and adjust to loop over all features.
3368 * server.c (handle_query) <qSupported>: Adjust to call
3369 target_process_qsupported once, passing it a vector of unprocessed
3370 features.
3371 * target.h (struct target_ops) <process_qsupported>: Change
3372 prototype.
3373 (target_process_qsupported): Adjust.
3374
9a084706
PA
33752015-11-19 Pedro Alves <palves@redhat.com>
3376
3377 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3378 mode.
3379 * configure: Regenerate.
3380
dad44a1f
PA
33812015-11-19 Pedro Alves <palves@redhat.com>
3382
3383 * configure: Regenerate.
3384
231c0592
YQ
33852015-11-19 Yao Qi <yao.qi@linaro.org>
3386
3387 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3388 type to uint32_t.
3389
6c1c9a8b
YQ
33902015-11-19 Yao Qi <yao.qi@linaro.org>
3391
3392 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3393 (struct aarch64_operand): Move enum out.
3394
9caa3311
YQ
33952015-11-19 Yao Qi <yao.qi@linaro.org>
3396
3397 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3398 struct user_fpsimd_state *.
3399 (aarch64_store_fpregset): Likewise.
3400
6a69a054
YQ
34012015-11-19 Yao Qi <yao.qi@linaro.org>
3402
3403 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3404 struct user_pt_regs *.
3405 (aarch64_store_gregset): Likewise.
3406
1798301e
PA
34072015-11-18 Pedro Alves <palves@redhat.com>
3408
3409 * Makefile.in (all_object_files): Add $IPA_OBJS.
3410
ce7715e2
PA
34112015-11-17 Pedro Alves <palves@redhat.com>
3412
3413 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3414 GDB_SIGNAL_0 and gdb_signal_to_string.
3415
c0879059
PA
34162015-11-17 Pedro Alves <palves@redhat.com>
3417
3418 * win32-low.c (handle_output_debug_string): Remove parameter.
3419 (win32_kill): Remove our_status local and adjust call to
3420 handle_output_debug_string.
3421 (get_child_debug_event): Adjust call to
3422 handle_output_debug_string.
3423
1996e237
SM
34242015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3425
3426 * linux-mips-low.c (mips_fill_gregset): Add cast.
3427 (mips_store_gregset): Likewise.
3428 (mips_fill_fpregset): Likewise.
3429 (mips_store_fpregset): Likewise.
3430
cbec665b
SM
34312015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3432
3433 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3434 priv.
3435
eb3e3c67
SM
34362015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3437
3438 * linux-mips-low.c (mips_linux_new_thread): Change type of
3439 watch_type to enum target_hw_bp_type.
3440
171de4b8
SM
34412015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3442
3443 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3444 Change return type to arm_hwbp_type.
3445
04248ead
SM
34462015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3447
3448 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3449 (arm_store_gregset): Likewise.
3450 * linux-arm-low.c (arm_get_hwcap): Likewise.
3451 (arm_read_description): Likewise.
3452
04b3479c
SM
34532015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3454
3455 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3456
2bc84e8a
SM
34572015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3458
3459 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3460 (ppc_fill_vsxregset): Likewise.
3461 (ppc_store_vsxregset): Likewise.
3462 (ppc_fill_vrregset): Likewise.
3463 (ppc_store_vrregset): Likewise.
3464 (ppc_fill_evrregset): Likewise.
3465 (ppc_store_evrregset): Likewise.
3466
e6c5bb05
SM
34672015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3468
3469 * linux-ppc-low.c (ppc_usrregs_info): Remove
3470 forward-declaration.
3471 (ppc_arch_setup): Move lower in file.
3472
7ea45d72
SM
34732015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3474
3475 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3476 (ps_pdwrite): Likewise.
3477
69291610
HW
34782015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3479
3480 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3481 to after assert checks.
3482
b42945fd
SM
34832015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3484
3485 * proc-service.c (ps_pdread): Add/adjust casts.
3486 (ps_pdwrite): Add/adjust casts.
3487
d6f85c84
SM
34882015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3489
3490 * server.c (handle_search_memory_1): Cast return value of
3491 memmem.
3492
f98cd059
SM
34932015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3494
3495 * server.c (write_qxfer_response): Change type of data to
3496 gdb_byte *.
3497
d2412fa5
PA
34982015-10-29 Pedro Alves <palves@redhat.com>
3499
3500 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3501
c17414a2
PA
35022015-10-29 Pedro Alves <palves@redhat.com>
3503
3504 * tracepoint.c (clear_installed_tracepoints): Add casts.
3505
e053fbc4
PA
35062015-10-29 Pedro Alves <palves@redhat.com>
3507
3508 * server.c (handle_v_cont, process_serial_event): Add enum
3509 gdb_signal casts to signal parsing code.
3510
add67df8
PA
35112015-10-29 Pedro Alves <palves@redhat.com>
3512
3513 * linux-low.h (NULL_REGSET): Define.
3514 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3515 * linux-arm-low.c (arm_regsets): Likewise.
3516 * linux-crisv32-low.c (cris_regsets): Likewise.
3517 * linux-m68k-low.c (m68k_regsets): Likewise.
3518 * linux-mips-low.c (mips_regsets): Likewise.
3519 * linux-nios2-low.c (nios2_regsets): Likewise.
3520 * linux-ppc-low.c (ppc_regsets): Likewise.
3521 * linux-s390-low.c (s390_regsets): Likewise.
3522 * linux-sh-low.c (sh_regsets): Likewise.
3523 * linux-sparc-low.c (sparc_regsets): Likewise.
3524 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3525 * linux-tile-low.c (tile_regsets): Likewise.
3526 * linux-x86-low.c (x86_regsets): Likewise.
3527 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3528
50bc912a
PA
35292015-10-29 Pedro Alves <palves@redhat.com>
3530
3531 * linux-low.h (NULL_REGSET): Define.
3532 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3533 * linux-arm-low.c (arm_regsets): Likewise.
3534 * linux-crisv32-low.c (cris_regsets): Likewise.
3535 * linux-m68k-low.c (m68k_regsets): Likewise.
3536 * linux-mips-low.c (mips_regsets): Likewise.
3537 * linux-nios2-low.c (nios2_regsets): Likewise.
3538 * linux-ppc-low.c (ppc_regsets): Likewise.
3539 * linux-s390-low.c (s390_regsets): Likewise.
3540 * linux-sh-low.c (sh_regsets): Likewise.
3541 * linux-sparc-low.c (sparc_regsets): Likewise.
3542 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3543 * linux-tile-low.c (tile_regsets): Likewise.
3544 * linux-x86-low.c (x86_regsets): Likewise.
3545 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3546
682b2546
DE
35472015-10-26 Doug Evans <dje@google.com>
3548
3549 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3550
963843d4
DE
35512015-10-26 Doug Evans <dje@google.com>
3552
3553 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3554
d41401ac
DE
35552015-10-26 Doug Evans <dje@google.com>
3556
3557 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3558 for debug_printf.
3559 (attach_thread, find_new_threads_callback): Ditto.
3560
3db28855
AT
35612015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3562
3563 * mem-break.h (set_breakpoint_data): Remove.
3564
fb78e89c
AT
35652015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3566
3567 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3568 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3569 (initialize_low): Remove set_breakpoint_data call.
3570 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3571 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3572 (initialize_low): Remove set_breakpoint_data call.
3573 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3574 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3575 (initialize_low): Remove set_breakpoint_data call.
3576
2e6ee069
AT
35772015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3578
3579 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3580 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3581 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3582 * target.h (target_breakpoint_kind_from_pc): New macro.
3583
1652a986
AT
35842015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3585
3586 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3587 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3588 the default breakpoint kind.
3589
abeead09
AT
35902015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3591
3592 * linux-arm-low.c (arm_supports_z_point_type): Add software
3593 breakpoint support.
3594
b0b4b501
AT
35952015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3596
3597 * linux-arm-low.c: Refactor breakpoint definitions.
3598 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3599 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3600
8689682c
AT
36012015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3602
3603 * Makefile.in: Add arm.c/o.
3604 * configure.srv: Likewise.
3605 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3606 (arm_breakpoint_kind_from_pc): New function.
3607 (arm_sw_breakpoint_from_kind): Return proper kind.
3608 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3609
27165294
AT
36102015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3611
3612 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3613 removal.
3614 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3615 (struct raw_breakpoint) <size>: Remove.
3616 (struct raw_breakpoint) <kind>: Add.
3617 (bp_size): New function.
3618 (bp_opcode): Likewise.
3619 (find_raw_breakpoint_at): Adjust for kind.
3620 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3621 (remove_memory_breakpoint): Adjust for kind call bp_size.
3622 (set_raw_breakpoint_at): Adjust for kind.
3623 (set_breakpoint): Likewise.
3624 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3625 (delete_raw_breakpoint): Adjust for kind.
3626 (delete_breakpoint): Likewise.
3627 (find_gdb_breakpoint): Likewise.
3628 (set_gdb_breakpoint_1): Likewise.
3629 (set_gdb_breakpoint): Likewise.
3630 (delete_gdb_breakpoint_1): Likewise.
3631 (delete_gdb_breakpoint): Likewise.
3632 (uninsert_raw_breakpoint): Likewise.
3633 (reinsert_raw_breakpoint): Likewise.
3634 (set_breakpoint_data): Remove.
3635 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3636 (check_mem_read): Adjust for kind call bp_size.
3637 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3638 (clone_one_breakpoint): Adjust for kind.
3639 * mem-break.h (set_gdb_breakpoint): Likewise.
3640 (delete_gdb_breakpoint): Likewise.
3641 * server.c (process_serial_event): Likewise.
3642
dd373349
AT
36432015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3644
3645 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3646 (struct linux_target_ops) <breakpoint>: Remove.
3647 (struct linux_target_ops) <breakpoint_len>: Remove.
3648 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3649 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3650 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3651 (arm_sw_breakpoint_from_kind): New function.
3652 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3653 (struct linux_target_ops) <breakpoint>: Remove.
3654 (struct linux_target_ops) <breakpoint_len>: Remove.
3655 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3656 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3657 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3658 (struct linux_target_ops) <breakpoint>: Remove.
3659 (struct linux_target_ops) <breakpoint_len>: Remove.
3660 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3661 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3662 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3663 (struct linux_target_ops) <breakpoint>: Remove.
3664 (struct linux_target_ops) <breakpoint_len>: Remove.
3665 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3666 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3667 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3668 and sw_breakpoint_from_kind to increment the pc.
3669 (linux_breakpoint_kind_from_pc): New function.
3670 (linux_sw_breakpoint_from_kind): New function.
3671 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3672 (initialize_low): Call breakpoint_kind_from_pc and
3673 sw_breakpoint_from_kind to replace breakpoint_data/len.
3674 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3675 New field.
3676 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3677 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3678 (struct linux_target_ops) <breakpoint>: Remove.
3679 (struct linux_target_ops) <breakpoint_len>: Remove.
3680 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3681 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3682 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3683 (struct linux_target_ops) <breakpoint>: Remove.
3684 (struct linux_target_ops) <breakpoint_len>: Remove.
3685 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3686 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3687 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3688 (struct linux_target_ops) <breakpoint>: Remove.
3689 (struct linux_target_ops) <breakpoint_len>: Remove.
3690 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3691 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3692 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3693 (struct linux_target_ops) <breakpoint>: Remove.
3694 (struct linux_target_ops) <breakpoint_len>: Remove.
3695 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3696 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3697 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3698 (struct linux_target_ops) <breakpoint>: Remove.
3699 (struct linux_target_ops) <breakpoint_len>: Remove.
3700 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3701 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3702 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3703 (struct linux_target_ops) <breakpoint>: Remove.
3704 (struct linux_target_ops) <breakpoint_len>: Remove.
3705 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3706 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3707 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3708 (struct linux_target_ops) <breakpoint>: Remove.
3709 (struct linux_target_ops) <breakpoint_len>: Remove.
3710 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3711 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3712 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3713 (struct linux_target_ops) <breakpoint>: Remove.
3714 (struct linux_target_ops) <breakpoint_len>: Remove.
3715 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3716 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3717 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3718 (struct linux_target_ops) <breakpoint>: Remove.
3719 (struct linux_target_ops) <breakpoint_len>: Remove.
3720 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3721 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3722 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3723 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3724 (struct linux_target_ops) <breakpoint>: Remove.
3725 (struct linux_target_ops) <breakpoint_len>: Remove.
3726 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3727 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3728 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3729 (struct linux_target_ops) <breakpoint>: Remove.
3730 (struct linux_target_ops) <breakpoint_len>: Remove.
3731 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3732 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3733
4cd98a19
AT
37342015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3735
3736 * linux-cris-low.c (cris_get_pc): Remove void arg.
3737
774ee6d2
AR
37382015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3739
3740 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3741 variable name.
3742
833dcd29
AR
37432015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3744
3745 * inferiors.c (thread_pid_matches_callback): New function.
3746 (find_thread_process): New function.
3747 (remove_thread): Reset current_thread.
3748 (remove_process): Assert threads have been removed first.
3749
8d689ee5
YQ
37502015-10-15 Yao Qi <yao.qi@linaro.org>
3751
3752 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3753 if it is 3.
3754 (aarch64_remove_point): Likewise.
3755 * regcache.c (regcache_register_size): New function.
3756
1c2e1515
YQ
37572015-10-12 Yao Qi <yao.qi@linaro.org>
3758
3759 * linux-aarch64-low.c: Update all callers as emit_load_store
3760 is renamed to aarch64_emit_load_store.
3761
e1c587c3
YQ
37622015-10-12 Yao Qi <yao.qi@linaro.org>
3763
3764 * linux-aarch64-low.c: Update all callers of function renaming
3765 from emit_insn to aarch64_emit_insn.
3766
b6542f81
YQ
37672015-10-12 Yao Qi <yao.qi@linaro.org>
3768
3769 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3770 arch/aarch64-insn.h.
3771 (struct aarch64_memory_operand): Likewise.
3772 (ENCODE): Likewise.
3773 (emit_insn): Move to arch/aarch64-insn.c.
3774 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3775 (emit_load_store): Move to arch/aarch64-insn.c.
3776 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3777 (can_encode_int32): Remove.
3778
246994ce
YQ
37792015-10-12 Yao Qi <yao.qi@linaro.org>
3780
3781 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3782 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3783 (aarch64_relocate_instruction): Likewise.
3784 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3785 (struct aarch64_insn_visitor): Likewise.
3786
0badd99f
YQ
37872015-10-12 Yao Qi <yao.qi@linaro.org>
3788
3789 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3790 (struct aarch64_insn_visitor): New.
3791 (struct aarch64_insn_relocation_data): New.
3792 (aarch64_ftrace_insn_reloc_b): New function.
3793 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3794 (aarch64_ftrace_insn_reloc_cb): Likewise.
3795 (aarch64_ftrace_insn_reloc_tb): Likewise.
3796 (aarch64_ftrace_insn_reloc_adr): Likewise.
3797 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3798 (aarch64_ftrace_insn_reloc_others): Likewise.
3799 (visitor): New.
3800 (aarch64_relocate_instruction): Use visitor.
3801
dfaffe9d
YQ
38022015-10-12 Yao Qi <yao.qi@linaro.org>
3803
3804 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3805 int. Add argument buf.
3806 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3807 aarch64_relocate_instruction.
3808
70b439f0
YQ
38092015-10-12 Yao Qi <yao.qi@linaro.org>
3810
3811 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3812 argument insn. Remove local variable insn. Don't call
3813 target_read_uint32.
3814 (aarch64_install_fast_tracepoint_jump_pad): Call
3815 target_read_uint32.
3816
7781c06f
YQ
38172015-09-30 Yao Qi <yao.qi@linaro.org>
3818
3819 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3820 (emit_load_store_pair): Likewise.
3821
9a3c8263
SM
38222015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3823
3824 * dll.c (match_dll): Add cast(s).
3825 (unloaded_dll): Likewise.
3826 * linux-low.c (second_thread_of_pid_p): Likewise.
3827 (delete_lwp_callback): Likewise.
3828 (count_events_callback): Likewise.
3829 (select_event_lwp_callback): Likewise.
3830 (linux_set_resume_request): Likewise.
3831 * server.c (accumulate_file_name_length): Likewise.
3832 (emit_dll_description): Likewise.
3833 (handle_qxfer_threads_worker): Likewise.
3834 (visit_actioned_threads): Likewise.
3835 * thread-db.c (any_thread_of): Likewise.
3836 * tracepoint.c (same_process_p): Likewise.
3837 (match_blocktype): Likewise.
3838 (build_traceframe_info_xml): Likewise.
3839
224c3ddb
SM
38402015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3841
3842 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3843 assignment.
3844 (gdb_unparse_agent_expr): Likewise.
3845 * hostio.c (require_data): Likewise.
3846 (handle_pread): Likewise.
3847 * linux-low.c (disable_regset): Likewise.
3848 (fetch_register): Likewise.
3849 (store_register): Likewise.
3850 (get_dynamic): Likewise.
3851 (linux_qxfer_libraries_svr4): Likewise.
3852 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3853 (set_fast_tracepoint_jump): Likewise.
3854 (uninsert_fast_tracepoint_jumps_at): Likewise.
3855 (reinsert_fast_tracepoint_jumps_at): Likewise.
3856 (validate_inserted_breakpoint): Likewise.
3857 (clone_agent_expr): Likewise.
3858 * regcache.c (init_register_cache): Likewise.
3859 * remote-utils.c (putpkt_binary_1): Likewise.
3860 (decode_M_packet): Likewise.
3861 (decode_X_packet): Likewise.
3862 (look_up_one_symbol): Likewise.
3863 (relocate_instruction): Likewise.
3864 (monitor_output): Likewise.
3865 * server.c (handle_search_memory): Likewise.
3866 (handle_qxfer_exec_file): Likewise.
3867 (handle_qxfer_libraries): Likewise.
3868 (handle_qxfer): Likewise.
3869 (handle_query): Likewise.
3870 (handle_v_cont): Likewise.
3871 (handle_v_run): Likewise.
3872 (captured_main): Likewise.
3873 * target.c (write_inferior_memory): Likewise.
3874 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3875 * tracepoint.c (init_trace_buffer): Likewise.
3876 (add_tracepoint_action): Likewise.
3877 (add_traceframe): Likewise.
3878 (add_traceframe_block): Likewise.
3879 (cmd_qtdpsrc): Likewise.
3880 (cmd_qtdv): Likewise.
3881 (cmd_qtstatus): Likewise.
3882 (response_source): Likewise.
3883 (response_tsv): Likewise.
3884 (cmd_qtnotes): Likewise.
3885 (gdb_collect): Likewise.
3886 (initialize_tracepoint): Likewise.
3887
afbe19f8
PL
38882015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3889
3890 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3891 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3892 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3893 <NOP>: New.
3894 (enum aarch64_condition_codes): New enum.
3895 (w0): New static global.
3896 (fp): Likewise.
3897 (lr): Likewise.
3898 (struct aarch64_memory_operand) <type>: New
3899 MEMORY_OPERAND_POSTINDEX type.
3900 (postindex_memory_operand): New helper function.
3901 (emit_ret): New function.
3902 (emit_load_store_pair): New function, factored out of emit_stp
3903 with support for MEMORY_OPERAND_POSTINDEX.
3904 (emit_stp): Rewrite using emit_load_store_pair.
3905 (emit_ldp): New function.
3906 (emit_load_store): Likewise.
3907 (emit_ldr): Mention post-index instruction in comment.
3908 (emit_ldrh): New function.
3909 (emit_ldrb): New function.
3910 (emit_ldrsw): Mention post-index instruction in comment.
3911 (emit_str): Likewise.
3912 (emit_subs): New function.
3913 (emit_cmp): Likewise.
3914 (emit_and): Likewise.
3915 (emit_orr): Likewise.
3916 (emit_orn): Likewise.
3917 (emit_eor): Likewise.
3918 (emit_mvn): Likewise.
3919 (emit_lslv): Likewise.
3920 (emit_lsrv): Likewise.
3921 (emit_asrv): Likewise.
3922 (emit_mul): Likewise.
3923 (emit_sbfm): Likewise.
3924 (emit_sbfx): Likewise.
3925 (emit_ubfm): Likewise.
3926 (emit_ubfx): Likewise.
3927 (emit_csinc): Likewise.
3928 (emit_cset): Likewise.
3929 (emit_nop): Likewise.
3930 (emit_ops_insns): New helper function.
3931 (emit_pop): Likewise.
3932 (emit_push): Likewise.
3933 (aarch64_emit_prologue): New function.
3934 (aarch64_emit_epilogue): Likewise.
3935 (aarch64_emit_add): Likewise.
3936 (aarch64_emit_sub): Likewise.
3937 (aarch64_emit_mul): Likewise.
3938 (aarch64_emit_lsh): Likewise.
3939 (aarch64_emit_rsh_signed): Likewise.
3940 (aarch64_emit_rsh_unsigned): Likewise.
3941 (aarch64_emit_ext): Likewise.
3942 (aarch64_emit_log_not): Likewise.
3943 (aarch64_emit_bit_and): Likewise.
3944 (aarch64_emit_bit_or): Likewise.
3945 (aarch64_emit_bit_xor): Likewise.
3946 (aarch64_emit_bit_not): Likewise.
3947 (aarch64_emit_equal): Likewise.
3948 (aarch64_emit_less_signed): Likewise.
3949 (aarch64_emit_less_unsigned): Likewise.
3950 (aarch64_emit_ref): Likewise.
3951 (aarch64_emit_if_goto): Likewise.
3952 (aarch64_emit_goto): Likewise.
3953 (aarch64_write_goto_address): Likewise.
3954 (aarch64_emit_const): Likewise.
3955 (aarch64_emit_call): Likewise.
3956 (aarch64_emit_reg): Likewise.
3957 (aarch64_emit_pop): Likewise.
3958 (aarch64_emit_stack_flush): Likewise.
3959 (aarch64_emit_zero_ext): Likewise.
3960 (aarch64_emit_swap): Likewise.
3961 (aarch64_emit_stack_adjust): Likewise.
3962 (aarch64_emit_int_call_1): Likewise.
3963 (aarch64_emit_void_call_2): Likewise.
3964 (aarch64_emit_eq_goto): Likewise.
3965 (aarch64_emit_ne_goto): Likewise.
3966 (aarch64_emit_lt_goto): Likewise.
3967 (aarch64_emit_le_goto): Likewise.
3968 (aarch64_emit_gt_goto): Likewise.
3969 (aarch64_emit_ge_got): Likewise.
3970 (aarch64_emit_ops_impl): New static global variable.
3971 (aarch64_emit_ops): New target function, return
3972 &aarch64_emit_ops_impl.
3973 (struct linux_target_ops): Install it.
3974
bb903df0
PL
39752015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3976
3977 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3978 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3979 aarch64-ipa.o.
3980 * linux-aarch64-ipa.c: New file.
3981 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3982 and endian.h.
3983 (aarch64_get_thread_area): New target method.
3984 (extract_signed_bitfield): New helper function.
3985 (aarch64_decode_ldr_literal): New function.
3986 (enum aarch64_opcodes): New enum.
3987 (struct aarch64_register): New struct.
3988 (struct aarch64_operand): New struct.
3989 (x0): New static global.
3990 (x1): Likewise.
3991 (x2): Likewise.
3992 (x3): Likewise.
3993 (x4): Likewise.
3994 (w2): Likewise.
3995 (ip0): Likewise.
3996 (sp): Likewise.
3997 (xzr): Likewise.
3998 (aarch64_register): New helper function.
3999 (register_operand): Likewise.
4000 (immediate_operand): Likewise.
4001 (struct aarch64_memory_operand): New struct.
4002 (offset_memory_operand): New helper function.
4003 (preindex_memory_operand): Likewise.
4004 (enum aarch64_system_control_registers): New enum.
4005 (ENCODE): New macro.
4006 (emit_insn): New helper function.
4007 (emit_b): New function.
4008 (emit_bcond): Likewise.
4009 (emit_cb): Likewise.
4010 (emit_tb): Likewise.
4011 (emit_blr): Likewise.
4012 (emit_stp): Likewise.
4013 (emit_ldp_q_offset): Likewise.
4014 (emit_stp_q_offset): Likewise.
4015 (emit_load_store): Likewise.
4016 (emit_ldr): Likewise.
4017 (emit_ldrsw): Likewise.
4018 (emit_str): Likewise.
4019 (emit_ldaxr): Likewise.
4020 (emit_stxr): Likewise.
4021 (emit_stlr): Likewise.
4022 (emit_data_processing_reg): Likewise.
4023 (emit_data_processing): Likewise.
4024 (emit_add): Likewise.
4025 (emit_sub): Likewise.
4026 (emit_mov): Likewise.
4027 (emit_movk): Likewise.
4028 (emit_mov_addr): Likewise.
4029 (emit_mrs): Likewise.
4030 (emit_msr): Likewise.
4031 (emit_sevl): Likewise.
4032 (emit_wfe): Likewise.
4033 (append_insns): Likewise.
4034 (can_encode_int32_in): New helper function.
4035 (aarch64_relocate_instruction): New function.
4036 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4037 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4038 (struct linux_target_ops): Install aarch64_get_thread_area,
4039 aarch64_install_fast_tracepoint_jump_pad and
4040 aarch64_get_min_fast_tracepoint_insn_len.
4041
787749ea
PL
40422015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4043
4044 * Makefile.in (aarch64-insn.o): New rule.
4045 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4046
9812b2e6
YQ
40472015-09-21 Yao Qi <yao.qi@linaro.org>
4048
4049 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4050
18fe412b
YQ
40512015-09-21 Yao Qi <yao.qi@linaro.org>
4052
4053 * tracepoint.c (max_jump_pad_size): Remove.
4054
a0cc84cd
YQ
40552015-09-18 Yao Qi <yao.qi@linaro.org>
4056
4057 * linux-aarch64-low.c: Don't include sys/uio.h.
4058 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4059
d78908cf
WW
40602015-09-16 Wei-cheng Wang <cole945@gmail.com>
4061
4062 * tracepoint.c (eval_result_type): Change prototype.
4063 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4064
d57e0d50
PA
40652015-09-15 Pedro Alves <palves@redhat.com>
4066
4067 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4068 Check whether to report exec events instead of checking whether
4069 multiprocess is enabled.
4070
5a676acc
PA
40712015-09-15 Pedro Alves <palves@redhat.com>
4072
4073 PR remote/18965
4074 * remote-utils.c (prepare_resume_reply): Merge
4075 TARGET_WAITKIND_VFORK_DONE switch case with the
4076 TARGET_WAITKIND_FORKED case.
4077
7c5d0fad
YQ
40782015-09-15 Yao Qi <yao.qi@linaro.org>
4079
4080 * server.c (handle_query): Check string comparison using
4081 "else if" instead of "if".
4082
750ce8d1
YQ
40832015-09-15 Yao Qi <yao.qi@linaro.org>
4084
4085 * server.c (vCont_supported): New global variable.
4086 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4087 matches. Append ";vContSupported+" to own_buf.
4088 (handle_v_requests): Append ";s;S" to own_buf if target supports
4089 hardware single step or vCont_supported is false.
4090 (capture_main): Set vCont_supported to zero.
4091
70b90b91
YQ
40922015-09-15 Yao Qi <yao.qi@linaro.org>
4093
4094 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4095 it to ...
4096 (linux_supports_hardware_single_step): ... New function.
4097 (linux_target_ops): Update.
4098 * lynx-low.c (lynx_target_ops): Set field
4099 supports_hardware_single_step to target_can_do_hardware_single_step.
4100 * nto-low.c (nto_target_ops): Likewise.
4101 * spu-low.c (spu_target_ops): Likewise.
4102 * win32-low.c (win32_target_ops): Likewise.
4103 * target.c (target_can_do_hardware_single_step): New function.
4104 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4105 Remove. <supports_hardware_single_step>: New field.
4106 (target_supports_conditional_breakpoints): Remove.
4107 (target_supports_hardware_single_step): New macro.
4108 (target_can_do_hardware_single_step): Declare.
4109 * server.c (handle_query): Use target_supports_hardware_single_step
4110 instead of target_supports_conditional_breakpoints.
4111
ade90bde
YQ
41122015-09-15 Yao Qi <yao.qi@linaro.org>
4113
4114 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4115 function.
4116 (struct linux_target_ops the_low_target): Install
4117 aarch64_linux_siginfo_fixup.
4118
94585166
DB
41192015-09-11 Don Breazeal <donb@codesourcery.com>
4120 Luis Machado <lgustavo@codesourcery.com>
4121
4122 * linux-low.c (linux_mourn): Static declaration.
4123 (linux_arch_setup): Move in front of
4124 handle_extended_wait.
4125 (linux_arch_setup_thread): New function.
4126 (handle_extended_wait): Handle exec events. Call
4127 linux_arch_setup_thread. Make event_lwp argument a
4128 pointer-to-a-pointer.
4129 (check_zombie_leaders): Do not check stopped threads.
4130 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4131 (linux_low_filter_event): Add lwp and thread for exec'ing
4132 non-leader thread if leader thread has been deleted.
4133 Refactor code into linux_arch_setup_thread and call it.
4134 Pass child lwp pointer by reference to handle_extended_wait.
4135 (linux_wait_for_event_filtered): Update comment.
4136 (linux_wait_1): Prevent clobbering exec event status.
4137 (linux_supports_exec_events): New function.
4138 (linux_target_ops) <supports_exec_events>: Initialize new member.
4139 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4140 new member.
4141 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4142 * server.c (report_exec_events): New global variable.
4143 (handle_query): Handle qSupported query for exec-events feature.
4144 (captured_main): Initialize report_exec_events.
4145 * server.h (report_exec_events): Declare new global variable.
4146 * target.h (struct target_ops) <supports_exec_events>: New
4147 member.
4148 (target_supports_exec_events): New macro.
4149 * win32-low.c (win32_target_ops) <supports_exec_events>:
4150 Initialize new member.
4151
0568462b
MM
41522015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4153
4154 * linux-low.c (linux_low_enable_btrace): Remove.
4155 (linux_target_ops): Replace linux_low_enable_btrace with
4156 linux_enable_btrace.
4157
39edd165
YQ
41582015-09-03 Yao Qi <yao.qi@linaro.org>
4159
4160 * linux-aarch64-low.c (aarch64_insert_point): Call
4161 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4162 returns true.
4163
1db33b5a
UW
41642015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4165
4166 * linux-low.c (check_stopped_by_breakpoint): Use
4167 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4168
ab290430
PA
41692015-08-27 Pedro Alves <palves@redhat.com>
4170
4171 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4172
8d749320
SM
41732015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4174
6711b7f8
SM
4175 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4176 the XNEW-family equivalent.
8d749320
SM
4177 (compile_bytecodes): Likewise.
4178 * dll.c (loaded_dll): Likewise.
4179 * event-loop.c (append_callback_event): Likewise.
4180 (create_file_handler): Likewise.
4181 (create_file_event): Likewise.
4182 * hostio.c (handle_open): Likewise.
4183 * inferiors.c (add_thread): Likewise.
4184 (add_process): Likewise.
4185 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4186 * linux-arm-low.c (arm_new_process): Likewise.
4187 (arm_new_thread): Likewise.
4188 * linux-low.c (add_to_pid_list): Likewise.
4189 (linux_add_process): Likewise.
4190 (handle_extended_wait): Likewise.
4191 (add_lwp): Likewise.
4192 (enqueue_one_deferred_signal): Likewise.
4193 (enqueue_pending_signal): Likewise.
4194 (linux_resume_one_lwp_throw): Likewise.
4195 (linux_resume_one_thread): Likewise.
4196 (linux_read_memory): Likewise.
4197 (linux_write_memory): Likewise.
4198 * linux-mips-low.c (mips_linux_new_process): Likewise.
4199 (mips_linux_new_thread): Likewise.
4200 (mips_add_watchpoint): Likewise.
4201 * linux-x86-low.c (initialize_low_arch): Likewise.
4202 * lynx-low.c (lynx_add_process): Likewise.
4203 * mem-break.c (set_raw_breakpoint_at): Likewise.
4204 (set_breakpoint): Likewise.
4205 (add_condition_to_breakpoint): Likewise.
4206 (add_commands_to_breakpoint): Likewise.
4207 (clone_agent_expr): Likewise.
4208 (clone_one_breakpoint): Likewise.
4209 * regcache.c (new_register_cache): Likewise.
4210 * remote-utils.c (look_up_one_symbol): Likewise.
4211 * server.c (queue_stop_reply): Likewise.
4212 (start_inferior): Likewise.
4213 (queue_stop_reply_callback): Likewise.
4214 (handle_target_event): Likewise.
4215 * spu-low.c (fetch_ppc_memory): Likewise.
4216 (store_ppc_memory): Likewise.
4217 * target.c (set_target_ops): Likewise.
4218 * thread-db.c (thread_db_load_search): Likewise.
4219 (try_thread_db_load_1): Likewise.
4220 * tracepoint.c (add_tracepoint): Likewise.
4221 (add_tracepoint_action): Likewise.
4222 (create_trace_state_variable): Likewise.
4223 (cmd_qtdpsrc): Likewise.
4224 (cmd_qtro): Likewise.
4225 (add_while_stepping_state): Likewise.
4226 * win32-low.c (child_add_thread): Likewise.
4227 (get_image_name): Likewise.
4228
ed8b7b42
YQ
42292015-08-25 Yao Qi <yao.qi@linaro.org>
4230
4231 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4232
db3cb7cb
YQ
42332015-08-25 Yao Qi <yao.qi@linaro.org>
4234
4235 * Makefile.in (aarch64-linux.o): New rule.
4236 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4237 srv_tgtobj.
4238 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4239 (aarch64_init_debug_reg_state): Make it extern.
4240 (aarch64_linux_prepare_to_resume): Remove.
4241
f6011a1c
YQ
42422015-08-25 Yao Qi <yao.qi@linaro.org>
4243
4244 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4245 lwp_arch_private_info and ptid_of_lwp.
4246
88e2cf7e
YQ
42472015-08-25 Yao Qi <yao.qi@linaro.org>
4248
4249 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4250 Find proc_info by find_process_pid. All callers updated.
4251
5e35436e
YQ
42522015-08-25 Yao Qi <yao.qi@linaro.org>
4253
4254 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4255 Remove.
4256 (debug_reg_change_callback): Remove.
4257 (aarch64_notify_debug_reg_change): Remove.
4258
4a8a7965
YQ
42592015-08-25 Yao Qi <yao.qi@linaro.org>
4260
4261 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4262 Call current_lwp_ptid.
4263
32a271ee
YQ
42642015-08-25 Yao Qi <yao.qi@linaro.org>
4265
4266 * linux-aarch64-low.c (debug_reg_change_callback): Use
4267 debug_printf.
4268
0d51c8d7
YQ
42692015-08-25 Yao Qi <yao.qi@linaro.org>
4270
4271 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4272
31a43dd5
YQ
42732015-08-25 Yao Qi <yao.qi@linaro.org>
4274
4275 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4276
8ee52567
YQ
42772015-08-25 Yao Qi <yao.qi@linaro.org>
4278
4279 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4280 the code.
4281
ff3f0f45
YQ
42822015-08-25 Yao Qi <yao.qi@linaro.org>
4283
4284 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4285 Remove.
4286 (debug_reg_change_callback): Remove argument entry and add argument
4287 lwp. Remove local variable thread. Don't print thread id in the
4288 debugging output. Don't check whether pid of thread equals to pid.
4289 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4290 iterate_over_lwps instead find_inferior.
4291
3d40fbb5
PA
42922015-08-24 Pedro Alves <palves@redhat.com>
4293
4294 * inferiors.c (get_first_process): New function.
4295 * inferiors.h (get_first_process): New declaration.
4296 * remote-utils.c (read_ptid): Default to the first process in the
4297 list, instead of to the current thread's process.
4298
438e1e42
PA
42992015-08-24 Pedro Alves <palves@redhat.com>
4300
4301 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4302 * event-loop.c: Likewise.
4303 * remote-utils.c: Likewise.
4304 * tracepoint.c: Likewise.
4305
a8c6d4fc
PA
43062015-08-24 Pedro Alves <palves@redhat.com>
4307
4308 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4309 ptid_get_lwp.
4310
99b0bb12
PA
43112015-08-21 Pedro Alves <palves@redhat.com>
4312
4313 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4314 instead of literal 1.
4315
f8904751
PA
43162015-08-21 Pedro Alves <palves@redhat.com>
4317
4318 * tdesc.c (default_description): Explicitly zero-initialize.
4319
465a859e
PA
43202015-08-21 Pedro Alves <palves@redhat.com>
4321
4322 PR gdb/18749
4323 * inferiors.c (remove_thread): Discard any pending stop reply for
4324 this thread.
4325 * server.c (remove_all_on_match_pid): Rename to ...
4326 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4327 instead of a pid.
4328 (discard_queued_stop_replies): Change parameter to a ptid. Now
4329 extern.
4330 (handle_v_kill, kill_inferior_callback, captured_main)
4331 (process_serial_event): Adjust.
4332 * server.h (discard_queued_stop_replies): Declare.
4333
f0db101d
PA
43342015-08-21 Pedro Alves <palves@redhat.com>
4335
4336 * linux-low.c (wait_for_sigstop): Always switch to no thread
4337 selected if the previously current thread dies.
4338 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4339 process instead of the current thread's.
4340 * remote-utils.c (input_interrupt): Don't check if there's no
4341 current thread.
4342 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4343 current thread to the general thread fails, error out.
4344 (handle_qxfer_auxv, handle_qxfer_libraries)
4345 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4346 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4347 (handle_query): Check if there's a thread selected instead of
4348 checking whether there's any thread in the thread list.
4349 (handle_qxfer_threads, handle_qxfer_btrace)
4350 (handle_qxfer_btrace_conf): Don't error out early if there's no
4351 thread in the thread list.
4352 (handle_v_cont, myresume): Don't set the current thread to the
4353 continue thread.
4354 (process_serial_event) <Hg handling>: Also set thread_id if the
4355 previous general thread is still alive.
4356 (process_serial_event) <g/G handling>: If setting the current
4357 thread to the general thread fails, error out.
4358 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4359 thread's lwp instead of the current thread's.
4360 * target.c (set_desired_thread): If the desired thread was not
4361 found, leave the current thread pointing to NULL. Return an int
4362 (boolean) indicating success.
4363 * target.h (set_desired_thread): Change return type to int.
4364
40045d91
MF
43652015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4366
4367 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4368 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4369 #includes.
4370 (ps_get_thread_area): New function.
4371
45face3b
GB
43722015-08-19 Gary Benson <gbenson@redhat.com>
4373
4374 * hostio.c (handle_pread): Do not attempt to read more data
4375 than hostio_reply_with_data can fit in a packet.
4376
16d5f642
JB
43772015-08-18 Joel Brobecker <brobecker@adacore.com>
4378
4379 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4380
a738da3a
MF
43812015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4382
4383 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4384
33ebda9d
PA
43852015-08-06 Pedro Alves <palves@redhat.com>
4386
4387 * tracepoint.c (expr_eval_result): Now an int.
4388
a44892be
PA
43892015-08-06 Pedro Alves <palves@redhat.com>
4390
4391 * gdbthread.h (struct regcache): Forward declare.
4392 (struct thread_info) <regcache_data>: Now a struct regcache
4393 pointer.
4394 * inferiors.c (inferior_regcache_data)
4395 (set_inferior_regcache_data): Now work with struct regcache
4396 pointers.
4397 * inferiors.h (struct regcache): Forward declare.
4398 (inferior_regcache_data, set_inferior_regcache_data): Now work
4399 with struct regcache pointers.
4400 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4401 (free_register_cache_thread): Remove struct regcache pointer
4402 casts.
4403
608a1e46
PA
44042015-08-06 Pedro Alves <palves@redhat.com>
4405
4406 * server.c (captured_main): On error, print the exception message
4407 to stderr, and if run_once is set, throw a quit.
4408
f0ce0d3a
PA
44092015-08-06 Pedro Alves <palves@redhat.com>
4410
4411 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4412 the current thread.
4413
bf47e248
PA
44142015-08-06 Pedro Alves <palves@redhat.com>
4415
4416 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4417 reading beyond the passed in buffer length.
4418
b6b9ffcc
PL
44192015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4420
4421 * tracepoint.c (symbol_list) <required>: Remove.
4422
863d01bd
PA
44232015-08-06 Pedro Alves <palves@redhat.com>
4424
4425 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4426 count if stopping and suspending threads.
4427 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4428 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4429 (linux_detach): Complete an ongoing step-over.
4430 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4431 throughout.
4432 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4433 (linux_wait_1): If passing a signal to the inferior after
4434 finishing a step-over, unsuspend and re-resume all lwps. If we
4435 see a single-step event but the thread should be continuing, don't
4436 pass the trap to gdb.
4437 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4438 internal_error instead of gdb_assert.
4439 (enqueue_pending_signal): New function.
4440 (check_ptrace_stopped_lwp_gone): Add debug output.
4441 (start_step_over): Use internal_error instead of gdb_assert.
4442 (complete_ongoing_step_over): New function.
4443 (linux_resume_one_thread): Don't resume a suspended thread.
4444 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4445 it stepping.
4446
00db26fa
PA
44472015-08-06 Pedro Alves <palves@redhat.com>
4448
4449 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4450 (linux_thread_alive): Use lwp_is_marked_dead.
4451 (extended_event_reported): Delete.
4452 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4453 instead of extended_event_reported.
4454 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4455 as well.
4456 (lwp_is_marked_dead): New function.
4457 (lwp_running): Use lwp_is_marked_dead.
4458 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4459 comment.
4460
ad071a30
PA
44612015-08-06 Pedro Alves <palves@redhat.com>
4462
4463 * linux-low.c (linux_wait_1): Move fork event output out of the
4464 !report_to_gdb check. Pass event_child->waitstatus to
4465 target_waitstatus_to_string instead of ourstatus.
4466
524b57e6
YQ
44672015-08-04 Yao Qi <yao.qi@linaro.org>
4468
4469 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4470 if current_thread is 32 bit.
4471
6085d6f6
YQ
44722015-08-04 Yao Qi <yao.qi@linaro.org>
4473
4474 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4475 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4476 * server.c (extended_protocol): Remove "static".
4477 * server.h (extended_protocol): Declare it.
4478
8a7e4587
YQ
44792015-08-04 Yao Qi <yao.qi@linaro.org>
4480
4481 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4482 both aarch64 and aarch32.
4483 (aarch64_set_pc): Likewise.
4484
3b53ae99
YQ
44852015-08-04 Yao Qi <yao.qi@linaro.org>
4486
4487 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4488 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4489 arm-with-neon.xml to srv_xmlfiles.
4490 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4491 (is_64bit_tdesc): New function.
4492 (aarch64_linux_read_description): New function.
4493 (aarch64_arch_setup): Call aarch64_linux_read_description.
4494 (regs_info): Rename to regs_info_aarch64.
4495 (aarch64_regs_info): Return right regs_info.
4496 (initialize_low_arch): Call initialize_low_arch_aarch32.
4497
bd9e6534
YQ
44982015-08-04 Yao Qi <yao.qi@linaro.org>
4499
4500 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4501 * linux-aarch32-low.c: New file.
4502 * linux-aarch32-low.h: New file.
4503 * linux-arm-low.c (arm_fill_gregset): Move it to
4504 linux-aarch32-low.c.
4505 (arm_store_gregset): Likewise.
4506 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4507 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4508 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4509 (regs_info): Rename to regs_info_arm.
4510 (arm_regs_info): Return regs_info_aarch32 if
4511 have_ptrace_getregset is 1 and target description is
4512 arm_with_neon or arm_with_vfpv3.
4513 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4514 Call initialize_low_arch_aarch32 instead.
4515
ded48a5e
YQ
45162015-08-04 Yao Qi <yao.qi@linaro.org>
4517
4518 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4519 * linux-low.c: ... here.
4520 * linux-low.h (have_ptrace_getregset): Declare it.
4521
96e9210f
PA
45222015-08-04 Pedro Alves <palves@redhat.com>
4523
4524 * thread-db.c (struct thread_db): Use new typedefs.
4525 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4526 CHK calls.
4527 (disable_thread_event_reporting): Cast result of dlsym to
4528 destination function pointer type.
4529 (thread_db_mourn): Use td_ta_delete_ftype.
4530
af60a1ef
SL
45312015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4532
4533 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4534 arch variant.
4535 (CDX_BREAKPOINT): Define for R2.
4536 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4537 (the_low_target): Add comments.
4538
e8b41681
YQ
45392015-07-30 Yao Qi <yao.qi@linaro.org>
4540
4541 * linux-arm-low.c (arm_hwcap): Remove it.
4542 (arm_read_description): New local variable arm_hwcap. Don't
4543 set arm_hwcap to zero.
4544
89abb039
YQ
45452015-07-30 Yao Qi <yao.qi@linaro.org>
4546
4547 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4548 Use regcache->tdesc instead.
4549 (arm_store_wmmxregset): Likewise.
4550 (arm_fill_vfpregset): Likewise.
4551 (arm_store_vfpregset): Likewise.
4552
deca266c
YQ
45532015-07-30 Yao Qi <yao.qi@linaro.org>
4554
4555 * linux-arm-low.c: Include arch/arm.h.
4556 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4557 (arm_store_gregset): Likewise.
4558
aa58a496
SM
45592015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4560
4561 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4562 ptrace's 4th parameter.
4563
50904b25
YQ
45642015-07-27 Yao Qi <yao.qi@linaro.org>
4565
4566 * configure.srv (case aarch64*-*-linux*): Don't set
4567 srv_linux_usrregs.
4568
5826e159
PA
45692015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4570
4571 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4572 sys/ptrace.h.
4573 * linux-arm-low.c: Likewise.
4574 * linux-cris-low.c: Likewise.
4575 * linux-crisv32-low.c: Likewise.
4576 * linux-low.c: Likewise.
4577 * linux-m68k-low.c: Likewise.
4578 * linux-mips-low.c: Likewise.
4579 * linux-nios2-low.c: Likewise.
4580 * linux-s390-low.c: Likewise.
4581 * linux-sparc-low.c: Likewise.
4582 * linux-tic6x-low.c: Likewise.
4583 * linux-tile-low.c: Likewise.
4584 * linux-x86-low.c: Likewise.
4585
54019719
PA
45862015-07-24 Pedro Alves <palves@redhat.com>
4587
4588 * config.in: Regenerate.
4589 * configure: Regenerate.
4590
eb7aa561
PA
45912015-07-24 Pedro Alves <palves@redhat.com>
4592
4593 * acinclude.m4: Include ../ptrace.m4.
4594 * configure.ac: Call GDB_AC_PTRACE.
4595 * config.in, configure: Regenerate.
4596
55d7b841
YQ
45972015-07-24 Yao Qi <yao.qi@linaro.org>
4598
4599 * linux-low.c (linux_create_inferior): Remove setting to
4600 proc->priv->new_inferior.
4601 (linux_attach): Likewise.
4602 (linux_low_filter_event): Likewise.
4603 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4604
c06cbd92
YQ
46052015-07-24 Yao Qi <yao.qi@linaro.org>
4606
4607 * linux-low.c (linux_arch_setup): New function.
4608 (linux_low_filter_event): If proc->tdesc is NULL and
4609 proc->attached is true, call the_low_target.arch_setup.
4610 Otherwise, keep status pending, and return.
4611 (linux_resume_one_lwp_throw): Don't call get_pc if
4612 thread->while_stepping isn't NULL. Don't call
4613 get_thread_regcache if proc->tdesc is NULL.
4614 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4615 (linux_target_ops): Install arch_setup.
4616 * server.c (start_inferior): Call the_target->arch_setup.
4617 * target.h (struct target_ops) <arch_setup>: New field.
4618 (target_arch_setup): New marco.
4619 * lynx-low.c (lynx_target_ops): Update.
4620 * nto-low.c (nto_target_ops): Update.
4621 * spu-low.c (spu_target_ops): Update.
4622 * win32-low.c (win32_target_ops): Update.
4623
5ae3ebba
YQ
46242015-07-24 Yao Qi <yao.qi@linaro.org>
4625
4626 * linux-low.c (linux_add_process): Don't set
4627 proc->priv->new_inferior.
4628 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4629 (linux_attach): Likewise.
4630
eb97750b
YQ
46312015-07-24 Yao Qi <yao.qi@linaro.org>
4632
4633 * server.c (start_inferior): Code refactor.
4634
51aee833
YQ
46352015-07-24 Yao Qi <yao.qi@linaro.org>
4636
4637 * server.c (process_serial_event): Set general_thread.
4638
af1b22f3
YQ
46392015-07-21 Yao Qi <yao.qi@linaro.org>
4640
4641 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4642 aarch64_linux_get_debug_reg_capacity.
4643
554717a3
YQ
46442015-07-17 Yao Qi <yao.qi@linaro.org>
4645
4646 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4647 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4648 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4649 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4650 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4651 (AARCH64_HWP_ALIGNMENT): Likewise.
4652 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4653 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4654 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4655 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4656 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4657 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4658 (struct aarch64_debug_reg_state): Likewise.
4659 (struct arch_lwp_info): Likewise.
4660 (aarch64_align_watchpoint): Likewise.
4661 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4662 (aarch64_watchpoint_length): Likewise.
4663 (aarch64_point_encode_ctrl_reg): Likewise
4664 (aarch64_point_is_aligned): Likewise.
4665 (aarch64_align_watchpoint): Likewise.
4666 (aarch64_linux_set_debug_regs):
4667 (aarch64_dr_state_insert_one_point): Likewise.
4668 (aarch64_dr_state_remove_one_point): Likewise.
4669 (aarch64_handle_breakpoint): Likewise.
4670 (aarch64_handle_aligned_watchpoint): Likewise.
4671 (aarch64_handle_unaligned_watchpoint): Likewise.
4672 (aarch64_handle_watchpoint): Likewise.
4673
c67ca4de
YQ
46742015-07-17 Yao Qi <yao.qi@linaro.org>
4675
4676 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4677 and don't aarch64_get_debug_reg_state. All callers update.
4678 (aarch64_handle_aligned_watchpoint): Likewise.
4679 (aarch64_handle_unaligned_watchpoint): Likewise.
4680 (aarch64_handle_watchpoint): Likewise.
4681 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4682 (aarch64_remove_point): Likewise.
4683
25abf979
YQ
46842015-07-17 Yao Qi <yao.qi@linaro.org>
4685
4686 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4687 debug_printf.
4688 (aarch64_handle_unaligned_watchpoint): Likewise.
4689
db1ff28b
JK
46902015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4691
4692 Revert the previous 3 commits:
4693 Move gdb_regex* to common/
4694 Move linux_find_memory_regions_full & co.
4695 gdbserver build-id attribute generator
4696
700ca40f
JK
46972015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4698 Jan Kratochvil <jan.kratochvil@redhat.com>
4699
4700 gdbserver build-id attribute generator.
4701 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4702 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4703 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4704 (find_phdr): New.
4705 (get_dynamic): Use find_pdhr to traverse program headers.
4706 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4707 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4708 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4709 (get_hex_build_id): New.
4710 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4711 to reply XML document.
4712
9904185c
JK
47132015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4714 Jan Kratochvil <jan.kratochvil@redhat.com>
4715
4716 * target.c: Include target/target-utils.h and fcntl.h.
4717 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4718 (target_fileio_read_stralloc): New functions.
4719
6e5b4429
JK
47202015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4721
4722 * Makefile.in (OBS): Add gdb_regex.o.
4723 (gdb_regex.o): New.
4724 * config.in: Rebuilt.
4725 * configure: Rebuilt.
4726
ddc98fbf
JK
47272015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4728 Jan Kratochvil <jan.kratochvil@redhat.com>
4729
4730 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4731 * Makefile.in (OBS): Add target-utils.o.
4732 (linux-maps.o, target-utils.o): New.
4733 * configure.srv (srv_linux_obj): Add linux-maps.o.
4734
e57bb7a0
PL
47352015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4736
4737 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4738 function, return 1.
4739 (the_low_target): Install it.
4740
586b02a9
PA
47412015-07-14 Pedro Alves <palves@redhat.com>
4742
4743 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4744 Instead, ignore ECHILD, and throw an error for other errnos.
4745
58c1b36c
PA
47462015-07-10 Pedro Alves <palves@redhat.com>
4747
4748 * event-loop.c (struct callback_event) <data>: Change type to
4749 gdb_client_data instance instead of gdb_client_data pointer.
4750 (append_callback_event): Adjust.
4751
421530db
PL
47522015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4753
4754 * linux-aarch64-low.c: Add comments for each linux_target_ops
4755 method. Remove comments already covered in target_ops and
4756 linux_target_ops definitions.
4757 (the_low_target): Add comments for each unimplemented method.
4758
c2d65f38
YQ
47592015-07-09 Yao Qi <yao.qi@linaro.org>
4760
4761 * linux-aarch64-low.c (aarch64_regmap): Remove.
4762 (aarch64_usrregs_info): Remove.
4763 (regs_info): Set field usrregs to NULL.
4764
b20a6524
MM
47652015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4766
4767 * linux-low.c: Include "rsp-low.h"
4768 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4769 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4770 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4771 (handle_btrace_enable_pt): New.
4772 (handle_btrace_general_set): Support "pt".
4773 (handle_btrace_conf_general_set): Support "pt:size".
4774
96c97461
PL
47752015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4776
4777 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4778 Z_PACKET_SW_BP.
4779
37d66942
PL
47802015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4781
4782 * linux-aarch64-low.c: Remove comment about endianness.
4783 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4784 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4785 memcmp.
4786
dc06243f
GB
47872015-06-24 Gary Benson <gbenson@redhat.com>
4788
4789 * linux-i386-ipa.c (stdint.h): Do not include.
4790 * lynx-i386-low.c (stdint.h): Likewise.
4791 * lynx-ppc-low.c (stdint.h): Likewise.
4792 * mem-break.c (stdint.h): Likewise.
4793 * thread-db.c (stdint.h): Likewise.
4794 * tracepoint.c (stdint.h): Likewise.
4795 * win32-low.c (stdint.h): Likewise.
4796
124e13d9
SM
47972015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4798
4799 * server.c (write_qxfer_response): Update call to
4800 remote_escape_output.
4801
909c2cda
JK
48022015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4803 Jan Kratochvil <jan.kratochvil@redhat.com>
4804
4805 Merge multiple hex conversions.
4806 * gdbreplay.c (tohex): Rename to 'fromhex'.
4807 (logchar): Use fromhex.
4808
24c05f46
JK
48092015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4810
4811 * server.c (handle_qxfer_libraries): Set `version' attribute for
4812 <library-list>.
4813
14d2069a
GB
48142015-06-10 Gary Benson <gbenson@redhat.com>
4815
4816 * target.h (struct target_ops) <multifs_open>: New field.
4817 <multifs_unlink>: Likewise.
4818 <multifs_readlink>: Likewise.
4819 * linux-low.c (nat/linux-namespaces.h): New include.
4820 (linux_target_ops): Initialize the_target->multifs_open,
4821 the_target->multifs_unlink and the_target->multifs_readlink.
4822 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4823 * hostio.c (hostio_fs_pid): New static variable.
4824 (hostio_handle_new_gdb_connection): New function.
4825 (handle_setfs): Likewise.
4826 (handle_open): Use the_target->multifs_open as appropriate.
4827 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4828 (handle_readlink): Use the_target->multifs_readlink as
4829 appropriate.
4830 (handle_vFile): Handle vFile:setfs packets.
4831 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4832 after target_handle_new_gdb_connection.
4833
4b8b5e72
GB
48342015-06-10 Gary Benson <gbenson@redhat.com>
4835
4836 * configure.ac (AC_CHECK_FUNCS): Add setns.
4837 * config.in: Regenerate.
4838 * configure: Likewise.
4839 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4840 (linux-namespaces.o): New rule.
4841 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4842
3ac2e371
GB
48432015-06-09 Gary Benson <gbenson@redhat.com>
4844
4845 * hostio.c (handle_open): Process mode argument with
4846 fileio_to_host_mode.
4847
ca9b78ce
YQ
48482015-06-01 Yao Qi <yao.qi@linaro.org>
4849
4850 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4851 * linux-x86-low.c: Likewise.
4852
bfacd19d
DB
48532015-05-28 Don Breazeal <donb@codesourcery.com>
4854
4855 * linux-low.c (handle_extended_wait): Initialize
4856 thread_info.last_resume_kind for new fork children.
4857
452003ef
PA
48582015-05-15 Pedro Alves <palves@redhat.com>
4859
4860 * target.h (target_handle_new_gdb_connection): Rewrite using if
4861 wrapped in do/while.
4862
1041a03c
JB
48632015-05-14 Joel Brobecker <brobecker@adacore.com>
4864
4865 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4866 * configure, config.in: Regenerate.
4867 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4868 Declare typedef.
4869
c269dbdb
DB
48702015-05-12 Don Breazeal <donb@codesourcery.com>
4871
4872 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4873 PTRACE_EVENT_VFORK_DONE.
4874 (linux_low_ptrace_options, extended_event_reported): Add vfork
4875 events.
4876 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4877 and "vforkdone" for RSP 'T' Stop Reply Packet.
4878 * server.h (report_vfork_events): Declare
4879 global variable.
4880
3a8a0396
DB
48812015-05-12 Don Breazeal <donb@codesourcery.com>
4882
4883 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4884 (the_low_target) <new_fork>: Initialize new member.
4885 * linux-arm-low.c (arm_new_fork): New function.
4886 (the_low_target) <new_fork>: Initialize new member.
4887 * linux-low.c (handle_extended_wait): Call new target function
4888 new_fork.
4889 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4890 * linux-mips-low.c (mips_add_watchpoint): New function
4891 extracted from mips_insert_point.
4892 (the_low_target) <new_fork>: Initialize new member.
4893 (mips_linux_new_fork): New function.
4894 (mips_insert_point): Call mips_add_watchpoint.
4895 * linux-x86-low.c (x86_linux_new_fork): New function.
4896 (the_low_target) <new_fork>: Initialize new member.
4897
de0d863e
DB
48982015-05-12 Don Breazeal <donb@codesourcery.com>
4899
4900 * linux-low.c (handle_extended_wait): Implement return value,
4901 rename argument 'event_child' to 'event_lwp', handle
4902 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4903 (linux_low_ptrace_options): New function.
4904 (linux_low_filter_event): Call linux_low_ptrace_options,
4905 use different argument fo linux_enable_event_reporting,
4906 use return value from handle_extended_wait.
4907 (extended_event_reported): New function.
4908 (linux_wait_1): Call extended_event_reported and set
4909 status to report fork events.
4910 (linux_write_memory): Add pid to debug message.
4911 (reset_lwp_ptrace_options_callback): New function.
4912 (linux_handle_new_gdb_connection): New function.
4913 (linux_target_ops): Initialize new structure member.
4914 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4915 * lynx-low.c: Initialize new structure member.
4916 * remote-utils.c (prepare_resume_reply): Implement stop reason
4917 "fork" for "T" stop message.
4918 * server.c (handle_query): Call handle_new_gdb_connection.
4919 * server.h (report_fork_events): Declare global flag.
4920 * target.h (struct target_ops) <handle_new_gdb_connection>:
4921 New member.
4922 (target_handle_new_gdb_connection): New macro.
4923 * win32-low.c: Initialize new structure member.
4924
ddcbc397
DB
49252015-05-12 Don Breazeal <donb@codesourcery.com>
4926
4927 * mem-break.c (APPEND_TO_LIST): Define macro.
4928 (clone_agent_expr): New function.
4929 (clone_one_breakpoint): New function.
4930 (clone_all_breakpoints): New function.
4931 * mem-break.h: Declare new functions.
4932
89245bc0
DB
49332015-05-12 Don Breazeal <donb@codesourcery.com>
4934
4935 * linux-low.c (linux_supports_fork_events): New function.
4936 (linux_supports_vfork_events): New function.
4937 (linux_target_ops): Initialize new structure members.
4938 (initialize_low): Call linux_check_ptrace_features.
4939 * lynx-low.c (lynx_target_ops): Initialize new structure
4940 members.
4941 * server.c (report_fork_events, report_vfork_events):
4942 New global flags.
4943 (handle_query): Add new features to qSupported packet and
4944 response.
4945 (captured_main): Initialize new global variables.
4946 * target.h (struct target_ops) <supports_fork_events>:
4947 New member.
4948 <supports_vfork_events>: New member.
4949 (target_supports_fork_events): New macro.
4950 (target_supports_vfork_events): New macro.
4951 * win32-low.c (win32_target_ops): Initialize new structure
4952 members.
4953
835205d0
GB
49542015-05-12 Gary Benson <gbenson@redhat.com>
4955
4956 * server.c (handle_qxfer_exec_file): Use current process
4957 if annex is empty.
4958
21e94bd9
SL
49592015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4960
4961 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4962 Remove HAVE_PTRACE_GETREGS conditionals.
4963 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4964 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4965
45614f15
YQ
49662015-05-08 Yao Qi <yao.qi@linaro.org>
4967
4968 * linux-low.c (linux_supports_conditional_breakpoints): New
4969 function.
4970 (linux_target_ops): Install new target method.
4971 * lynx-low.c (lynx_target_ops): Install NULL hook for
4972 supports_conditional_breakpoints.
4973 * nto-low.c (nto_target_ops): Likewise.
4974 * spu-low.c (spu_target_ops): Likewise.
4975 * win32-low.c (win32_target_ops): Likewise.
4976 * server.c (handle_query): Check
4977 target_supports_conditional_breakpoints.
4978 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4979 New field.
4980 (target_supports_conditional_breakpoints): New macro.
4981
80ad801e
PA
49822015-05-06 Pedro Alves <palves@redhat.com>
4983
4984 PR server/18081
4985 * server.c (start_inferior): If the process exits, mourn it.
4986
819843c7
GB
49872015-04-21 Gary Benson <gbenson@redhat.com>
4988
4989 * hostio.c (fileio_open_flags_to_host): Factored out to
4990 fileio_to_host_openflags in common/fileio.c. Single use
4991 updated.
4992
a2d5a9d7
MF
49932015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4994
4995 * linux-xtensa-low.c (xtensa_fill_gregset)
4996 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4997 XCHAL_HAVE_LOOP.
4998
deb44829
MF
49992015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5000
5001 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5002 (regs_info): Replace usrregs pointer with NULL.
5003
e57f1de3
GB
50042015-04-17 Gary Benson <gbenson@redhat.com>
5005
5006 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5007 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5008 * server.c (handle_qxfer_exec_file): New function.
5009 (qxfer_packets): Add exec-file entry.
5010 (handle_query): Report qXfer:exec-file:read as supported packet.
5011
62828379
RN
50122015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5013
5014 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5015
b88bb450
GB
50162015-04-09 Gary Benson <gbenson@redhat.com>
5017
5018 * hostio-errno.c (errno_to_fileio_error): Remove function.
5019 Update caller to use remote_fileio_to_fio_error.
5020
c8f4bfdd
YQ
50212015-04-09 Yao Qi <yao.qi@linaro.org>
5022
5023 * linux-low.c (linux_insert_point): Call
5024 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5025 (linux_remove_point): Call remove_memory_breakpoint if type is
5026 raw_bkpt_type_sw.
5027 * linux-x86-low.c (x86_insert_point): Don't call
5028 insert_memory_breakpoint.
5029 (x86_remove_point): Don't call remove_memory_breakpoint.
5030
41f98f02
PA
50312015-04-01 Pedro Alves <palves@redhat.com>
5032 Cleber Rosa <crosa@redhat.com>
5033
5034 * server.c (gdbserver_usage): Reorganize and extend the usage
5035 message.
5036
2bf6fb9d
PA
50372015-03-24 Pedro Alves <palves@redhat.com>
5038
5039 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5040 output. Also dump TRAP_TRACE.
5041 (linux_low_filter_event): In debug output, distinguish a
5042 resume_stop SIGSTOP from a delayed SIGSTOP.
5043
369f6daa
GB
50442015-03-24 Gary Benson <gbenson@redhat.com>
5045
5046 * linux-x86-low.c (x86_linux_new_thread): Moved to
5047 nat/x86-linux.c.
5048 (x86_linux_prepare_to_resume): Likewise.
5049
8e5d4070
GB
50502015-03-24 Gary Benson <gbenson@redhat.com>
5051
5052 * Makefile.in (x86-linux-dregs.o): New rule.
5053 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5054 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5055 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5056 (x86_linux_dr_get): Likewise.
5057 (x86_linux_dr_set): Likewise.
5058 (update_debug_registers_callback): Likewise.
5059 (x86_linux_dr_set_addr): Likewise.
5060 (x86_linux_dr_get_addr): Likewise.
5061 (x86_linux_dr_set_control): Likewise.
5062 (x86_linux_dr_get_control): Likewise.
5063 (x86_linux_dr_get_status): Likewise.
5064 (x86_linux_update_debug_registers): Likewise.
5065
2b95d440
GB
50662015-03-24 Gary Benson <gbenson@redhat.com>
5067
5068 * linux-x86-low.c (x86_linux_update_debug_registers):
5069 New function, factored out from...
5070 (x86_linux_prepare_to_resume): ...this.
5071
14b0bc68
GB
50722015-03-24 Gary Benson <gbenson@redhat.com>
5073
5074 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5075 (x86_linux_dr_set): Likewise.
5076 (update_debug_registers_callback): Likewise.
5077 (x86_linux_dr_set_addr): Likewise.
5078 (x86_linux_dr_get_addr): Likewise.
5079 (x86_linux_dr_set_control): Likewise.
5080 (x86_linux_dr_get_control): Likewise.
5081 (x86_linux_dr_get_status): Likewise.
5082 (x86_linux_prepare_to_resume): Likewise.
5083
5dfe6ca8
GB
50842015-03-24 Gary Benson <gbenson@redhat.com>
5085
5086 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5087 Use perror_with_name. Pass string through gettext.
5088 (x86_linux_dr_set): Likewise.
5089
d33472ad
GB
50902015-03-24 Gary Benson <gbenson@redhat.com>
5091
5092 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5093 (x86_linux_dr_set_addr): ...this.
5094 (x86_dr_low_get_addr): Rename to...
5095 (x86_linux_dr_get_addr): ...this.
5096 (x86_dr_low_set_control): Rename to...
5097 (x86_linux_dr_set_control): ...this.
5098 (x86_dr_low_get_control): Rename to...
5099 (x86_linux_dr_get_control): ...this.
5100 (x86_dr_low_get_status): Rename to...
5101 (x86_linux_dr_get_status): ...this.
5102 (x86_dr_low): Update with new function names.
5103
4b134ca1
GB
51042015-03-24 Gary Benson <gbenson@redhat.com>
5105
5106 * Makefile.in (x86-linux.o): New rule.
5107 * configure.srv: Add x86-linux.o to relevant targets.
5108 * linux-low.c (lwp_set_arch_private_info): New function.
5109 (lwp_arch_private_info): Likewise.
5110 * linux-x86-low.c: Include nat/x86-linux.h.
5111 (arch_lwp_info): Removed structure.
5112 (update_debug_registers_callback):
5113 Use lwp_set_debug_registers_changed.
5114 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5115 and lwp_set_debug_registers_changed.
5116 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5117
34c703da
GB
51182015-03-24 Gary Benson <gbenson@redhat.com>
5119
5120 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5121 * linux-arm-low.c (arm_new_thread): Likewise.
5122 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5123 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5124 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5125 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5126
cff068da
GB
51272015-03-24 Gary Benson <gbenson@redhat.com>
5128
5129 * linux-low.c (ptid_of_lwp): New function.
5130 (lwp_is_stopped): Likewise.
5131 (lwp_stop_reason): Likewise.
5132 * linux-x86-low.c (update_debug_registers_callback):
5133 Use lwp_is_stopped.
5134 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5135 lwp_stop_reason.
5136
b2f7c7e8
GB
51372015-03-24 Gary Benson <gbenson@redhat.com>
5138
5139 * linux-low.h (linux_stop_lwp): Remove declaration.
5140
6d4ee8c6
GB
51412015-03-24 Gary Benson <gbenson@redhat.com>
5142
5143 * linux-low.h: Include nat/linux-nat.h.
5144 * linux-low.c (iterate_over_lwps_args): New structure.
5145 (iterate_over_lwps_filter): New function.
5146 (iterate_over_lwps): Likewise.
5147 * linux-x86-low.c (update_debug_registers_callback):
5148 Update signature to what iterate_over_lwps expects.
5149 Remove PID check that iterate_over_lwps now performs.
5150 (x86_dr_low_set_addr): Use iterate_over_lwps.
5151 (x86_dr_low_set_control): Likewise.
5152
70a0bb6b
GB
51532015-03-24 Gary Benson <gbenson@redhat.com>
5154
5155 * linux-x86-low.c (x86_debug_reg_state): New function.
5156 (x86_linux_prepare_to_resume): Use the above.
5157
7b669087
GB
51582015-03-24 Gary Benson <gbenson@redhat.com>
5159
5160 * linux-low.c (current_lwp_ptid): New function.
5161 * linux-x86-low.c: Include nat/linux-nat.h.
5162 (x86_dr_low_get_addr): Use current_lwp_ptid.
5163 (x86_dr_low_get_control): Likewise.
5164 (x86_dr_low_get_status): Likewise.
5165
eef49a3d
PA
51662015-03-20 Pedro Alves <palves@redhat.com>
5167
5168 * tracepoint.c (cmd_qtstatus): Make "str" const.
5169
b2333d22
PA
51702015-03-20 Pedro Alves <palves@redhat.com>
5171
5172 * server.c (handle_general_set): Make "req_str" const.
5173
23f238d3
PA
51742015-03-19 Pedro Alves <palves@redhat.com>
5175
5176 * linux-low.c (linux_resume_one_lwp): Rename to ...
5177 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5178 instead call perror_with_name.
5179 (check_ptrace_stopped_lwp_gone): New function.
5180 (linux_resume_one_lwp): Reimplement as wrapper around
5181 linux_resume_one_lwp_throw that swallows errors if the LWP is
5182 gone.
5183
91baf43f
PA
51842015-03-19 Pedro Alves <palves@redhat.com>
5185
5186 * linux-low.c (count_events_callback, select_event_lwp_callback):
5187 No longer check whether the thread has resume_stop as last resume
5188 kind.
5189
8bf3b159
PA
51902015-03-19 Pedro Alves <palves@redhat.com>
5191
5192 * linux-low.c (count_events_callback, select_event_lwp_callback):
5193 Use the lwp's status_pending_p field, not the thread's.
5194
b90fc188
PA
51952015-03-19 Pedro Alves <palves@redhat.com>
5196
5197 * linux-low.c (select_event_lwp_callback): Update comments to
5198 no longer mention SIGTRAP.
5199
464b0089
GB
52002015-03-18 Gary Benson <gbenson@redhat.com>
5201
5202 * server.c (handle_query): Do not report vFile:fstat as supported.
5203
aa9e327f
GB
52042015-03-11 Gary Benson <gbenson@redhat.com>
5205
5206 * hostio.c (sys/types.h): New include.
5207 (sys/stat.h): Likewise.
5208 (common-remote-fileio.h): Likewise.
5209 (handle_fstat): New function.
5210 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5211
791c0056
GB
52122015-03-11 Gary Benson <gbenson@redhat.com>
5213
5214 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5215 struct stat.st_blocks and struct stat.st_blksize.
5216 * configure: Regenerate.
5217 * config.in: Likewise.
5218 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5219 (OBS): Add common-remote-fileio.o.
5220 (common-remote-fileio.o): New rule.
5221
9a9df970
PA
52222015-03-09 Pedro Alves <palves@redhat.com>
5223
5224 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5225 'struct sockaddr' pointer in 'accept' call.
5226
9eb1356e
PA
52272015-03-09 Pedro Alves <palves@redhat.com>
5228
5229 Revert:
5230 2015-03-07 Pedro Alves <palves@redhat.com>
5231 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5232 or <winsock2.h> here. Instead include "gdb_socket.h".
5233 (remote_open): Use union gdb_sockaddr_u.
5234 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5235 or <winsock2.h> here. Instead include "gdb_socket.h".
5236 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5237 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5238 or <sys/un.h>.
5239 (init_named_socket, gdb_agent_helper_thread): Use union
5240 gdb_sockaddr_u.
5241
aac331e4
PA
52422015-03-07 Pedro Alves <palves@redhat.com>
5243
5244 * configure.ac (build_warnings): Move
5245 -Wdeclaration-after-statement to the C-specific set.
5246 * configure: Regenerate.
5247
366c75fc
PA
52482015-03-07 Pedro Alves <palves@redhat.com>
5249
5250 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5251 or <winsock2.h> here. Instead include "gdb_socket.h".
5252 (remote_open): Use union gdb_sockaddr_u.
5253 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5254 or <winsock2.h> here. Instead include "gdb_socket.h".
5255 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5256 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5257 or <sys/un.h>.
5258 (init_named_socket, gdb_agent_helper_thread): Use union
5259 gdb_sockaddr_u.
5260
492d29ea
PA
52612015-03-07 Pedro Alves <palves@redhat.com>
5262
5263 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5264 instead.
5265
60a191ed
YQ
52662015-03-06 Yao Qi <yao.qi@linaro.org>
5267
5268 * linux-aarch64-low.c (aarch64_insert_point): Use
5269 show_debug_regs as a boolean.
5270 (aarch64_remove_point): Likewise.
5271
f5771b1d
PA
52722015-03-05 Pedro Alves <palves@redhat.com>
5273
5274 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5275 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5276 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5277 * nto-low.c (nto_target_ops): Likewise.
5278 * spu-low.c (spu_target_ops): Likewise.
5279 * win32-low.c (win32_target_ops): Likewise.
5280
3e572f71
PA
52812015-03-04 Pedro Alves <palves@redhat.com>
5282
72f4393d 5283 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5284 Decide whether a breakpoint triggered based on the SIGTRAP's
5285 siginfo.si_code.
72f4393d
L
5286 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5287 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5288 (linux_low_filter_event): Check for breakpoints before checking
5289 watchpoints.
5290 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5291 siginfo.si_code.
72f4393d
L
5292 (linux_stopped_by_sw_breakpoint)
5293 (linux_supports_stopped_by_sw_breakpoint)
5294 (linux_stopped_by_hw_breakpoint)
5295 (linux_supports_stopped_by_hw_breakpoint): New functions.
5296 (linux_target_ops): Install new target methods.
3e572f71 5297
1ec68e26
PA
52982015-03-04 Pedro Alves <palves@redhat.com>
5299
5300 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5301 * server.c (swbreak_feature, hwbreak_feature): New globals.
5302 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5303 (captured_main): Clear swbreak_feature and hwbreak_feature.
5304 * server.h (swbreak_feature, hwbreak_feature): Declare.
5305 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5306 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5307 supports_stopped_by_hw_breakpoint>: New fields.
5308 (target_supports_stopped_by_sw_breakpoint)
5309 (target_stopped_by_sw_breakpoint)
5310 (target_supports_stopped_by_hw_breakpoint)
5311 (target_stopped_by_hw_breakpoint): Declare.
5312
15c66dd6
PA
53132015-03-04 Pedro Alves <palves@redhat.com>
5314
5315 enum lwp_stop_reason -> enum target_stop_reason
5316 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5317 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5318 (linux_wait_1, stuck_in_jump_pad_callback)
5319 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5320 (linux_stopped_by_watchpoint):
5321 * linux-low.h (enum lwp_stop_reason): Delete.
5322 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5323 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5324
98fc70d6
YQ
53252015-03-04 Yao Qi <yao.qi@linaro.org>
5326
5327 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5328
dd2ac174
GB
53292015-03-03 Gary Benson <gbenson@redhat.com>
5330
5331 * hostio.c (handle_vFile): Fix prefix lengths.
5332
d68e53f4
MM
53332015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5334
5335 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5336 ptr_bits.
5337
bf2d68ab
AA
53382015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5339
5340 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5341 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5342 (clean): Add "rm -f" for above C files.
5343 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5344 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5345 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5346 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5347 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5348 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5349 (init_registers_s390x_vx_linux64)
5350 (init_registers_s390x_tevx_linux64)
5351 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5352 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5353 declarations.
5354 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5355 (s390_store_vxrs_high): New functions.
5356 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5357 NT_S390_VXRS_HIGH.
5358 (s390_arch_setup): Add logic for selecting one of the new target
5359 descriptions. Activate the new vector regsets if applicable.
5360 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5361 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5362 and init_registers_s390x_tevx_linux64.
5363
c966a859
PA
53642015-03-01 Pedro Alves <palves@redhat.com>
5365
5366 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5367 parameter.
5368
4180215b
PA
53692015-02-27 Pedro Alves <palves@redhat.com>
5370
5371 * linux-x86-low.c (u_debugreg_offset): New function.
5372 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5373
749bab01
PA
53742015-02-27 Pedro Alves <palves@redhat.com>
5375
5376 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5377 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5378 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5379 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5380 (ps_lsetfpregs, ps_getpid)
5381 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5382 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5383 (ps_lsetxregs, ps_plog): Declare.
5384
3c14e5a3
PA
53852015-02-27 Pedro Alves <palves@redhat.com>
5386
5387 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5388 IP_AGENT_EXPORT_FUNC.
5389 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5390 IP_AGENT_EXPORT_FUNC.
5391 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5392 (IP_AGENT_EXPORT): Delete.
5393 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5394 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5395 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5396 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5397 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5398 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5399 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5400 (traceframe_read_count, traceframe_write_count)
5401 (traceframes_created, trace_state_variables, get_raw_reg)
5402 (get_trace_state_variable_value, set_trace_state_variable_value)
5403 (ust_loaded, helper_thread_id, cmd_buf): Use
5404 IPA_SYM_EXPORTED_NAME.
5405 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5406 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5407 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5408 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5409 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5410 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5411 EXTERN_C_PUSH/EXTERN_C_POP.
5412 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5413 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5414 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5415 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5416 (traceframe_write_count, traceframe_read_count)
5417 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5418 (about_to_request_buffer_space, get_trace_state_variable_value)
5419 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5420 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5421 EXTERN_C_PUSH/EXTERN_C_POP.
5422 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5423 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5424 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5425 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5426 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5427 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5428 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5429 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5430 Define.
5431 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5432 (IP_AGENT_EXPORT_VAR_DECL): Define.
5433 (tracing): Declare.
5434 (gdb_agent_get_raw_reg): Declare.
5435
fe978cb0
PA
54362015-02-27 Tom Tromey <tromey@redhat.com>
5437 Pedro Alves <palves@redhat.com>
5438
5439 Rename symbols whose names are reserved C++ keywords throughout.
5440
3bc3d82a
PA
54412015-02-27 Pedro Alves <palves@redhat.com>
5442
5443 * Makefile.in (COMPILER): New, get it from autoconf.
5444 (CXX): Get from autoconf instead.
5445 (COMPILE.pre): Use COMPILER.
5446 (CC-LD): Rename to ...
5447 (CC_LD): ... this. Use COMPILER.
5448 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5449 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5450 * acinclude.m4: Include build-with-cxx.m4.
5451 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5452 Disable -Werror by default if building in C++ mode.
5453 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5454 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5455 the C++ compiler. Save/restore CXXFLAGS too.
5456 * configure: Regenerate.
5457
07697489
PA
54582015-02-27 Pedro Alves <palves@redhat.com>
5459
5460 * acinclude.m4: Include libiberty.m4.
5461 * configure.ac: Call libiberty_INIT.
5462 * config.in, configure: Regenerate.
5463
9beb7c4e
PA
54642015-02-26 Pedro Alves <palves@redhat.com>
5465
5466 * linux-low.c (linux_wait_1): When incrementing the PC past a
5467 program breakpoint always use the_low_target.breakpoint_len as
5468 increment, rather than the maximum between that and
5469 the_low_target.decr_pc_after_break.
5470
8090aef2
PA
54712015-02-23 Pedro Alves <palves@redhat.com>
5472
5473 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5474 thread was doing a step-over; always adjust the PC if
5475 we stepped over a permanent breakpoint.
5476 (linux_wait_1): If we stepped over breakpoint that was on top of a
5477 permanent breakpoint, manually advance the PC past it.
5478
bc9540e8
PA
54792015-02-23 Pedro Alves <palves@redhat.com>
5480
5481 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5482 modes.
5483 (x86_fill_gregset, x86_store_gregset): Use it when handling
5484 $orig_eax.
5485
2db9a427
PA
54862015-02-20 Pedro Alves <palves@redhat.com>
5487
5488 * thread-db.c: Include "nat/linux-procfs.h".
5489 (thread_db_init): Skip listing new threads if the kernel supports
5490 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5491
afa8d396
PA
54922015-02-20 Pedro Alves <palves@redhat.com>
5493
5494 * linux-low.c (status_pending_p_callback): Use ptid_match.
5495
c9587f88
AT
54962015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5497
5498 PR breakpoints/16812
5499 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5500 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5501 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5502
b05ec7a5
AT
55032015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5504
5505 PR breakpoints/15956
5506 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5507
d33501a5
MM
55082015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5509
5510 * linux-low.c (linux_low_btrace_conf): Print size.
5511 * server.c (handle_btrace_conf_general_set): New.
5512 (hanle_general_set): Call handle_btrace_conf_general_set.
5513 (handle_query): Report Qbtrace-conf:bts:size as supported.
5514
f4abbc16
MM
55152015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5516
5517 * linux-low.c (linux_low_enable_btrace): Update parameters.
5518 (linux_low_btrace_conf): New.
5519 (linux_target_ops)<to_btrace_conf>: Initialize.
5520 * server.c (current_btrace_conf): New.
5521 (handle_btrace_enable): Rename to ...
5522 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5523 to target_enable_btrace. Update comment. Update users.
5524 (handle_qxfer_btrace_conf): New.
5525 (qxfer_packets): Add btrace-conf entry.
5526 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5527 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5528 (target_ops)<read_btrace_conf>: New.
5529 (target_enable_btrace): Update parameters.
5530 (target_read_btrace_conf): New.
5531
043c3577
MM
55322015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5533
5534 * server.c (handle_btrace_general_set): Remove call to
5535 target_supports_btrace.
5536 (supported_btrace_packets): New.
5537 (handle_query): Call supported_btrace_packets.
5538 * target.h: include btrace-common.h.
5539 (btrace_target_info): Removed.
5540 (supports_btrace, target_supports_btrace): Update parameters.
5541
734b0e4b
MM
55422015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5543
5544 * Makefile.in (SFILES): Add common/btrace-common.c.
5545 (OBS): Add common/btrace-common.o.
5546 (btrace-common.o): Add build rules.
5547 * linux-low: Include btrace-common.h.
5548 (linux_low_read_btrace): Use struct btrace_data. Call
5549 btrace_data_init and btrace_data_fini.
5550
d6c146e9
PA
55512015-02-06 Pedro Alves <palves@redhat.com>
5552
5553 * thread-db.c (find_new_threads_callback): Add debug output.
5554
20ba1ce6
PA
55552015-02-04 Pedro Alves <palves@redhat.com>
5556
5557 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5558 (resume_stopped_resumed_lwps): New function.
5559 (linux_wait_for_event_filtered): Use it.
5560
8cc73a39
SDJ
55612015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5562
5563 * Makefile.in (SFILES): Add linux-personality.c.
5564 (linux-personality.o): New rule.
5565 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5566 list of objects to be built.
5567 * linux-low.c: Include nat/linux-personality.h.
5568 (linux_create_inferior): Remove code to disable address space
5569 randomization (moved to ../nat/linux-personality.c). Create
5570 cleanup to disable address space randomization.
5571
fb23d554
SDJ
55722015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5573
5574 * Makefile.in (posix-strerror.o): New rule.
5575 (mingw-strerror.o): Likewise.
5576 * configure: Regenerated.
5577 * configure.ac: Source file ../common/common.host. Initialize new
5578 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5579
cdf43629
YQ
55802015-01-14 Yao Qi <yao@codesourcery.com>
5581
5582 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5583 (ppc-linux.o): New rule.
5584 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5585 * configure.ac: AC_CHECK_FUNCS(getauxval).
5586 * config.in: Re-generated.
5587 * configure: Re-generated.
5588 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5589 ppc64_64bit_inferior_p
5590
514c5338
YQ
55912015-01-14 Yao Qi <yao@codesourcery.com>
5592
5593 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5594 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5595 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5596 (PT_ORIG_R3, PT_TRAP): Likewise.
5597 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5598 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5599 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5600
3368c1e5
JB
56012015-01-10 Joel Brobecker <brobecker@adacore.com>
5602
5603 * i387-fp.c (i387_cache_to_xsave): In look over
5604 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5605 zmmh_low_space field by use of zmmh_high_space.
5606
582511be
PA
56072015-01-09 Pedro Alves <palves@redhat.com>
5608
5609 * linux-low.c (step_over_bkpt): Move higher up in the file.
5610 (handle_extended_wait): Don't store the stop_pc here.
5611 (get_stop_pc): Adjust comments and rename to ...
5612 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5613 stopped for a software breakpoint or hardware breakpoint.
5614 (thread_still_has_status_pending_p): New function.
5615 (status_pending_p_callback): Use
5616 thread_still_has_status_pending_p. If the event is no longer
5617 interesting, resume the LWP.
5618 (handle_tracepoints): Add assert.
5619 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5620 (wstatus_maybe_breakpoint): New function.
5621 (cancel_breakpoint): Delete function.
5622 (check_stopped_by_watchpoint): New function, factored out from
5623 linux_low_filter_event.
5624 (lp_status_maybe_breakpoint): Delete function.
5625 (linux_low_filter_event): Remove filter_ptid argument.
5626 Leave thread group exits pending here. Store the LWP's stop PC.
5627 Always leave events pending.
5628 (linux_wait_for_event_filtered): Pull all events out of the
5629 kernel, and leave them all pending.
5630 (count_events_callback, select_event_lwp_callback): Consider all
5631 events.
5632 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5633 (select_event_lwp): Only give preference to the stepping LWP in
5634 all-stop mode. Adjust comments.
5635 (ignore_event): New function.
5636 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5637 references to cancel_breakpoints. Adjust to renames. Also give
5638 equal priority to all LWPs that have had events in non-stop mode.
5639 If reporting a software breakpoint event, unadjust the LWP's PC.
5640 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5641 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5642 Adjust.
5643 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5644 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5645 (linux_stopped_by_watchpoint): Adjust.
5646 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5647 * linux-low.h (enum lwp_stop_reason): New.
5648 (struct lwp_info) <stop_pc>: Adjust comment.
5649 <stopped_by_watchpoint>: Delete field.
5650 <stop_reason>: New field.
5651 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5652 * mem-break.c (software_breakpoint_inserted_here)
5653 (hardware_breakpoint_inserted_here): New function.
5654 * mem-break.h (software_breakpoint_inserted_here)
5655 (hardware_breakpoint_inserted_here): Declare.
5656 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5657 (cancel_breakpoints): Delete.
5658 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5659 (upload_fast_traceframes): Remove references to
5660 cancel_breakpoints.
5661
a33e3959
PA
56622015-01-09 Pedro Alves <palves@redhat.com>
5663
5664 * thread-db.c (find_new_threads_callback): Ignore thread if the
5665 kernel thread ID is -1.
5666
8784d563
PA
56672015-01-09 Pedro Alves <palves@redhat.com>
5668
5669 * linux-low.c (linux_attach_fail_reason_string): Move to
5670 nat/linux-ptrace.c, and rename.
5671 (linux_attach_lwp): Update comment.
5672 (attach_proc_task_lwp_callback): New function.
5673 (linux_attach): Adjust to rename and use
5674 linux_proc_attach_tgid_threads.
5675 (linux_attach_fail_reason_string): Delete declaration.
5676
76f2b779
JB
56772015-01-01 Joel Brobecker <brobecker@adacore.com>
5678
5679 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5680 * server.c (gdbserver_version): Likewise.
5681
fafcc06a
SDJ
56822014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5683
5684 * remote-utils.c: Include ctype.h.
5685 (input_interrupt): Explicitly handle the case when the char
5686 received is the NUL byte. Improve the printing of non-ASCII
5687 characters.
5688
beed38b8
JB
56892014-12-16 Joel Brobecker <brobecker@adacore.com>
5690
5691 * linux-low.c (linux_low_filter_event): Update call to
5692 linux_enable_event_reporting following the addition of
5693 a new parameter to that function.
5694
bf330350
CU
56952014-12-16 Catalin Udma <catalin.udma@freescale.com>
5696
5697 PR server/17457
5698 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5699 (AARCH64_FPCR_REGNO): Likewise.
5700 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5701 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5702 (aarch64_store_fpregset): Likewise.
5703
5227d625
JB
57042014-12-15 Joel Brobecker <brobecker@adacore.com>
5705
5706 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5707 Remove FIXME comment about assumption about N.
5708
f93b65a0
JB
57092014-12-13 Joel Brobecker <brobecker@adacore.com>
5710
5711 * configure.ac: If large-file support is disabled in GDBserver,
5712 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5713 * configure: Regenerate.
5714
e5a9158d
AA
57152014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5716
5717 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5718 warning upon ENODATA from ptrace.
5719 * linux-s390-low.c (s390_store_tdb): New.
5720 (s390_regsets): Add regset for NT_S390_TDB.
5721
feea5f36
AA
57222014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5723
5724 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5725 without a fill_function.
5726 * linux-s390-low.c (s390_fill_last_break): Remove.
5727 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5728 (s390_arch_setup): Use regset's size instead of fill_function for
5729 loop end condition.
5730
098dbe61
AA
57312014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5732
5733 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5734 the regset's store function when ptrace returned an error.
5735 * regcache.c (get_thread_regcache): Invalidate register cache
5736 before fetching inferior's registers.
5737
28eef672
AA
57382014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5739
5740 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5741 while-loop as for-loop.
5742 (regsets_store_inferior_registers): Likewise.
5743
bdca27a2
YQ
57442014-11-28 Yao Qi <yao@codesourcery.com>
5745
5746 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5747 * config.in, configure: Re-generate.
5748 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5749 is defined.
5750
9c232dda
YQ
57512014-11-21 Yao Qi <yao@codesourcery.com>
5752
5753 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5754 (AC_CHECK_HEADERS): Remove malloc.h.
5755 * configure: Re-generated.
5756 * config.in: Re-generated.
5757 * server.h: Don't include alloca.h and malloc.h.
5758 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5759 Don't include malloc.h.
5760
43968415
JB
57612014-11-17 Joel Brobecker <brobecker@adacore.com>
5762
5763 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5764 corresponding ERRNO check in same block.
5765
40e91bc7
PA
57662014-11-12 Pedro Alves <palves@redhat.com>
5767
5768 * server.c (cont_thread): Update comment.
5769 (start_inferior, attach_inferior): No longer clear cont_thread.
5770 (handle_v_cont): No longer set cont_thread.
5771 (captured_main): Clear cont_thread each time a GDB connects.
5772
c2c118cf
PA
57732014-11-12 Pedro Alves <palves@redhat.com>
5774
5775 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5776 thread, and don't resume all threads if the Hc thread has exited.
5777
78708b7c
PA
57782014-11-12 Pedro Alves <palves@redhat.com>
5779
5780 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5781 the process group instead of to a specific LWP.
5782
a2abc7de
PA
57832014-10-15 Pedro Alves <palves@redhat.com>
5784
5785 PR server/17487
5786 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5787 parameter.
5788 (arm_set_thread_context): Delete.
5789 (the_low_target): Adjust.
5790 * win32-i386-low.c (debug_registers_changed)
5791 (debug_registers_used): Delete.
5792 (update_debug_registers_callback): New function.
5793 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5794 needing to update their debug registers.
5795 (win32_get_current_dr): New function.
5796 (x86_dr_low_get_addr, x86_dr_low_get_control)
5797 (x86_dr_low_get_status): Fetch the debug register from the thread
5798 record's context.
5799 (i386_initial_stuff): Adjust.
5800 (i386_get_thread_context): Remove current_event parameter. Don't
5801 clear debug_registers_changed nor copy DR values to
5802 debug_reg_state.
5803 (i386_set_thread_context): Delete.
5804 (i386_prepare_to_resume): New function.
5805 (i386_thread_added): Mark the thread as needing to update irs
5806 debug registers.
5807 (the_low_target): Remove i386_set_thread_context and install
5808 i386_prepare_to_resume.
5809 * win32-low.c (win32_get_thread_context): Adjust.
5810 (win32_set_thread_context): Use SetThreadContext
5811 directly.
5812 (win32_prepare_to_resume): New function.
5813 (win32_require_context): New function, factored out from ...
5814 (thread_rec): ... this.
5815 (continue_one_thread): Call win32_prepare_to_resume on each thread
5816 we're about to continue.
5817 (win32_resume): Call win32_prepare_to_resume on the event thread.
5818 * win32-low.h (struct win32_thread_info)
5819 <debug_registers_changed>: New field.
5820 (struct win32_target_ops): Change prototype of set_thread_context,
5821 delete set_thread_context and add prepare_to_resume.
5822 (win32_require_context): New declaration.
5823
a442d071
GB
58242014-10-08 Gary Benson <gbenson@redhat.com>
5825
5826 * server.h: Do not include common-exceptions.h.
5827
6f1947e8
GB
58282014-10-08 Gary Benson <gbenson@redhat.com>
5829
5830 * server.h: Do not include cleanups.h.
5831
63b434a4
JH
58322014-09-30 James Hogan <james.hogan@imgtec.com>
5833
5834 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5835 mips64-dsp-linux.c.
5836
c4d9ceb6
YQ
58372014-09-23 Yao Qi <yao@codesourcery.com>
5838
5839 * linux-low.c (lp_status_maybe_breakpoint): New function.
5840 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5841 (count_events_callback): Likewise.
5842 (select_event_lwp_callback): Likewise.
5843 (cancel_breakpoints_callback): Likewise.
5844
89a5711c
DB
58452014-09-19 Don Breazeal <donb@codesourcery.com>
5846
5847 * linux-low.c (handle_extended_wait): Call
5848 linux_ptrace_get_extended_event.
5849 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5850 linux_is_extended_waitstatus.
5851
bffc0964
JB
58522014-09-16 Joel Brobecker <brobecker@adacore.com>
5853
5854 * Makefile.in (CPPFLAGS): Define.
5855 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5856 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5857
0bfdf32f
GB
58582014-09-16 Gary Benson <gbenson@redhat.com>
5859
5860 * inferiors.h (current_inferior): Renamed as...
5861 (current_thread): New variable. All uses updated.
5862 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5863 (maybe_move_out_of_jump_pad): Likewise.
5864 (cancel_breakpoint): Likewise.
5865 (linux_low_filter_event): Likewise.
5866 (wait_for_sigstop): Likewise.
5867 (linux_resume_one_lwp): Likewise.
5868 (need_step_over_p): Likewise.
5869 (start_step_over): Likewise.
5870 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5871 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5872 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5873 and save_inferior as saved_thread.
5874 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5875 saved_thread.
5876 (regcache_invalidate_thread): Likewise.
5877 * remote-utils.c (prepare_resume_reply): Likewise.
5878 * thread-db.c (thread_db_get_tls_address): Likewise.
5879 (disable_thread_event_reporting): Likewise.
5880 (remove_thread_event_breakpoints): Likewise.
5881 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5882 as saved_thread.
5883 * target.h (set_desired_inferior): Renamed as...
5884 (set_desired_thread): New declaration. All uses updated.
5885 * server.c (myresume): Updated comment to reference thread instead
5886 of inferior.
5887 (handle_serial_event): Likewise.
5888 (handle_target_event): Likewise.
5889
361c8ade
GB
58902014-09-12 Tom Tromey <tromey@redhat.com>
5891 Gary Benson <gbenson@redhat.com>
5892
5893 * regcache.h: Include common-regcache.h.
5894 (regcache_read_pc): Don't declare.
5895 * regcache.c (get_thread_regcache_for_ptid): New function.
5896
bd9269f7
GB
58972014-09-11 Tom Tromey <tromey@redhat.com>
5898 Gary Benson <gbenson@redhat.com>
5899
5900 * symbol.c: New file.
5901 * Makefile.in (SFILES): Add symbol.c.
5902 (OBS): Add symbol.o.
5903
f8c1d06b
GB
59042014-09-11 Gary Benson <gbenson@redhat.com>
5905
5906 * target.c (target_stop_ptid, target_continue_ptid): New
5907 functions.
5908
721ec300
GB
59092014-09-11 Tom Tromey <tromey@redhat.com>
5910 Gary Benson <gbenson@redhat.com>
5911
5912 * target.h: Include target/target.h.
5913 * target.c (target_read_memory, target_read_uint32)
5914 (target_write_memory): New functions.
5915
c5e92cca
GB
59162014-09-11 Gary Benson <gbenson@redhat.com>
5917
5918 * server.h (debug_hw_points): Don't declare.
5919 * server.c (debug_hw_points): Don't define. Replace all uses
5920 with show_debug_regs.
5921 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5922 all uses with show_debug_regs.
5923
2e4bb98a
EBM
59242014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5925
5926 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5927 endianness into account.
5928 (ppc_supply_ptrace_register): Likewise.
5929
ac740bc7
JH
59302014-09-03 James Hogan <james.hogan@imgtec.com>
5931
5932 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5933 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5934
97ea6506
GB
59352014-09-03 Gary Benson <gbenson@redhat.com>
5936
5937 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5938 ALL_DEBUG_ADDRESS_REGISTERS.
5939
df7e5265
GB
59402014-09-02 Gary Benson <gbenson@redhat.com>
5941
5942 * i386-low.h: Renamed as...
5943 * x86-low.h: New file. All type, function and variable name
5944 prefixes changed from "i386_" to "x86_". All references updated.
5945 * i386-low.c: Renamed as...
5946 * x86-low.c: New file. All type, function and variable name
5947 prefixes changed from "i386_" to "x86_". All references updated.
5948
ed859da7
GB
59492014-09-02 Gary Benson <gbenson@redhat.com>
5950
5951 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5952 (x86_linux_new_thread): Likewise.
5953
860789c7
GB
59542014-08-29 Gary Benson <gbenson@redhat.com>
5955
5956 * server.h (setjmp.h): Do not include.
5957 (toplevel): Do not declare.
5958 (common-exceptions.h): Include.
5959 (cleanups.h): Likewise.
5960 * server.c (toplevel): Do not define.
5961 (exit_code): New static global.
5962 (detach_or_kill_for_exit_cleanup): New function.
5963 (main): New function. Original main renamed to...
5964 (captured_main): New function.
5965 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5966
ff55e1b5
GB
59672014-08-29 Gary Benson <gbenson@redhat.com>
5968
5969 * Makefile.in (SFILES): Add common/common-exceptions.c.
5970 (OBS): Add common-exceptions.o.
5971 (common-exceptions.o): New rule.
5972 * utils.c (prepare_to_throw_exception): New function.
5973
e9bcb658
GB
59742014-08-29 Gary Benson <gbenson@redhat.com>
5975
5976 * config.in: Regenerate.
5977 * configure: Likewise.
5978
e3180625
GB
59792014-08-29 Gary Benson <gbenson@redhat.com>
5980
5981 * Makefile.in (SFILES): Add common/cleanups.c.
5982 (OBS): cleanups.o.
5983 (cleanups.o): New rule.
5984
e3d6ba5d
GB
59852014-08-29 Gary Benson <gbenson@redhat.com>
5986
5987 * utils.c (internal_vwarning): New function.
5988
7096e886
GB
59892014-08-28 Gary Benson <gbenson@redhat.com>
5990
5991 * utils.h (fatal): Remove declaration.
5992 * utils.c (fatal): Remove function.
5993
14ce3192
GB
59942014-08-28 Gary Benson <gbenson@redhat.com>
5995
5996 * tracepoint.c (gdb_agent_init): Replace fatal with
5997 perror_with_name.
5998 (initialize_tracepoint): Likewise.
5999
50278d59
GB
60002014-08-28 Gary Benson <gbenson@redhat.com>
6001
6002 * remote-utils.c (remote_prepare): Replace fatal with error.
6003
aa96c426
GB
60042014-08-28 Gary Benson <gbenson@redhat.com>
6005
6006 * linux-low.c (linux_async): Replace fatal with warning.
6007 Tidy up and return.
6008 (linux_start_non_stop): Return -1 if linux_async failed.
6009
f7160e97
GB
60102014-08-28 Gary Benson <gbenson@redhat.com>
6011
6012 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6013 gdb_assert.
6014 (i386_dr_low_get_addr): Remove vague comment.
6015 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6016 gdb_assert.
6017
38e08fca
GB
60182014-08-28 Gary Benson <gbenson@redhat.com>
6019
6020 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6021 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6022 internal_error.
6023 (linux_resume_one_lwp): Likewise.
6024 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6025 gdb_assert.
6026 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6027 with internal_error.
6028 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6029 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6030 (find_register_by_name): Replace fatal with internal_error.
6031 (find_regno): Likewise.
6032 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6033 * thread-db.c (thread_db_create_event): Likewise.
6034 (thread_db_load_search): Likewise.
6035 (try_thread_db_load_1): Likewise.
6036 * tracepoint.c (get_jump_space_head): Replace fatal with
6037 internal_error.
6038 (claim_trampoline_space): Likewise.
6039 (have_fast_tracepoint_trampoline_buffer): Likewise.
6040 (cmd_qtstart): Likewise.
6041 (stop_tracing): Likewise.
6042 (fast_tracepoint_collecting): Likewise.
6043 (target_malloc): Likewise.
6044 (download_tracepoint): Likewise.
6045 (download_trace_state_variables): Replace check with gdb_assert.
6046 (upload_fast_traceframes): Replace fatal with internal_error.
6047
34abf635
GB
60482014-08-19 Tom Tromey <tromey@redhat.com>
6049 Gary Benson <gbenson@redhat.com>
6050
6051 * Makefile.in (SFILES): Add common/common-debug.c.
6052 (OBS): Add common-debug.o.
6053 (common-debug.o): New rule.
6054 * debug.h (debug_printf): Don't declare.
6055 * debug.c (debug_printf): Renamed and rewritten as...
6056 (debug_vprintf): New function.
6057
f6e94d78
GB
60582014-08-19 Gary Benson <gbenson@redhat.com>
6059
6060 * utils.h: Do not include print-utils.h.
6061
9239eeab
GB
60622014-08-19 Tom Tromey <tromey@redhat.com>
6063 Gary Benson <gbenson@redhat.com>
6064
6065 * server.h: Add static assertion.
6066 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6067
ef87c8bb
GB
60682014-08-19 Tom Tromey <tromey@redhat.com>
6069 Gary Benson <gbenson@redhat.com>
6070
6071 * Makefile.in (SFILES): Add common/errors.c.
6072 (OBS): Add errors.o.
6073 (IPA_OBS): Add errors-ipa.o.
6074 (errors.o): New rule.
6075 (errors-ipa.o): Likewise.
6076 * utils.h (perror_with_name, error, warning): Don't declare.
6077 * utils.c (warning): Renamed and rewritten as...
6078 (vwarning): New function.
6079 (error): Renamed and rewritten as...
6080 (verror): New function.
6081 (internal_error): Renamed and rewritten as...
6082 (internal_verror): New function.
6083
bb974a24
GB
60842014-08-07 Gary Benson <gbenson@redhat.com>
6085
6086 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6087 * configure: Regenerate.
6088 * config.in: Likewise.
6089 * server.h: Do not include errno.h.
6090 * event-loop.c: Likewise.
6091 * hostio-errno.c: Likewise.
6092 * linux-low.c: Likewise.
6093 * remote-utils.c: Likewise.
6094 * spu-low.c: Likewise.
6095 * utils.c: Likewise.
6096 * gdbreplay.c: Unconditionally include errno.h.
6097
6d3d12eb
GB
60982014-08-07 Gary Benson <gbenson@redhat.com>
6099
6100 * server.h: Do not include string.h.
6101 * event-loop.c: Likewise.
6102 * linux-low.c: Likewise.
6103 * regcache.c: Likewise.
6104 * remote-utils.c: Likewise.
6105 * spu-low.c: Likewise.
6106 * utils.c: Likewise.
6107
dccbb609
GB
61082014-08-07 Gary Benson <gbenson@redhat.com>
6109
6110 * server.h: Do not include gdb_assert.h.
6111
e76df0d0
GB
61122014-08-07 Gary Benson <gbenson@redhat.com>
6113
6114 * server.h: Do not include common-utils.h.
6115
4cb9c816
GB
61162014-08-07 Gary Benson <gbenson@redhat.com>
6117
6118 * server.h: Do not include ptid.h.
6119 * notif.h: Likewise.
6120
3995eeee
GB
61212014-08-07 Gary Benson <gbenson@redhat.com>
6122
6123 * server.h: Do not include gdb_locale.h.
6124
cb9f1a9b
GB
61252014-08-07 Gary Benson <gbenson@redhat.com>
6126
6127 * server.h: Do not include gdb/signals.h.
6128 * win32-low.c: Likewise.
6129
a5fceff8
GB
61302014-08-07 Gary Benson <gbenson@redhat.com>
6131
6132 * server.h: Do not include pathmax.h.
6133
b9391142
GB
61342014-08-07 Gary Benson <gbenson@redhat.com>
6135
6136 * server.h: Do not include libiberty.h.
6137 * linux-bfin-low.c: Likewise.
6138
0e443c87
GB
61392014-08-07 Gary Benson <gbenson@redhat.com>
6140
6141 * server.h: Do not include ansidecl.h.
6142
8ebb3f56
GB
61432014-08-07 Gary Benson <gbenson@redhat.com>
6144
6145 * linux-x86-low.c: Do not include stddef.h.
6146 * lynx-ppc-low.c: Likewise.
6147 * tracepoint.c: Likewise.
6148
8980bdf6
GB
61492014-08-07 Gary Benson <gbenson@redhat.com>
6150
6151 * server.h: Do not include stdarg.h.
6152 * nto-low.c: Likewise.
6153
d7096f71
GB
61542014-08-07 Gary Benson <gbenson@redhat.com>
6155
6156 * server.h: Do not include stdlib.h.
6157 * inferiors.c: Likewise.
6158 * linux-low.c: Likewise.
6159 * regcache.c: Likewise.
6160 * spu-low.c: Likewise.
6161 * tracepoint.c: Likewise.
6162 * utils.c: Likewise.
6163
d02f550d
GB
61642014-08-07 Gary Benson <gbenson@redhat.com>
6165
6166 * server.h: Do not include stdio.h.
6167 * linux-low.c: Likewise.
6168 * remote-utils.c: Likewise.
6169 * spu-low.c: Likewise.
6170 * utils.c: Likewise.
6171 * wincecompat.c: Likewise.
6172
87f6c4e3
GB
61732014-08-06 Gary Benson <gbenson@redhat.com>
6174
6175 * regcache.c (init_register_cache): Move conditionals inside if.
6176
7089dca4
GB
61772014-08-06 Gary Benson <gbenson@redhat.com>
6178
6179 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6180
462f517e
GB
61812014-07-31 Gary Benson <gbenson@redhat.com>
6182
6183 * ax.h: Do not include server.h.
6184 * gdbthread.h: Likewise.
6185 * lynx-low.h: Likewise.
6186 * notif.h: Likewise.
6187
976411d6
GB
61882014-07-30 Gary Benson <gbenson@redhat.com>
6189
6190 * server.h: Include common-defs.h.
6191 Do not include config.h or build-gnulib-gdbserver/config.h.
6192
d41f6d8e
GB
61932014-07-30 Gary Benson <gbenson@redhat.com>
6194
6195 * hostio-errno.c: Move server.h to top of includes list.
6196 * inferiors.c: Likewise.
6197 * linux-x86-low.c: Likewise.
6198 * notif.c: Include server.h.
6199
314c6a35
TT
62002014-07-24 Tom Tromey <tromey@redhat.com>
6201 Gary Benson <gbenson@redhat.com>
6202
6203 * server.h (CORE_ADDR): Now unsigned.
6204
69ff6be5
PA
62052014-07-16 Pedro Alves <palves@redhat.com>
6206
6207 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6208
ce9e3fe7
PA
62092014-07-15 Pedro Alves <palves@redhat.com>
6210
6211 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6212 copy.
6213
e76126e8
PA
62142014-07-11 Pedro Alves <palves@redhat.com>
6215
6216 * linux-low.c (kill_wait_lwp): New function, based on
6217 kill_one_lwp_callback, but use my_waitpid directly.
6218 (kill_one_lwp_callback, linux_kill): Use it.
6219
8e9db26e
PA
62202014-06-23 Pedro Alves <palves@redhat.com>
6221
6222 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6223 before setting DR0..DR3.
6224
698b3e08
GB
62252014-06-20 Gary Benson <gbenson@redhat.com>
6226
6227 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6228 * configure: Regenerated.
6229 * config.in: Likewise.
6230
125f8a3d
GB
62312014-06-20 Gary Benson <gbenson@redhat.com>
6232
6233 * Makefile.in (SFILES): Update locations for files moved
6234 from common to nat.
6235 (object file files): Reordered.
6236
42995dbd
GB
62372014-06-20 Gary Benson <gbenson@redhat.com>
6238
6239 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6240 (i386_dr_low_set_addr): Likewise.
6241 (i386_dr_low_get_addr): Likewise.
6242 (i386_dr_low_can_set_control): Likewise.
6243 (i386_dr_low_set_control): Likewise.
6244 (i386_dr_low_get_control): Likewise.
6245 (i386_dr_low_get_status): Likewise.
6246 (i386_get_debug_register_length): Likewise.
6247 * linux-x86-low.c (i386_dr_low_set_addr):
6248 Changed signature. Made static.
6249 (i386_dr_low_get_addr): Likewise.
6250 (i386_dr_low_set_control): Likewise.
6251 (i386_dr_low_get_control): Likewise.
6252 (i386_dr_low_get_status): Likewise.
6253 (i386_dr_low): New global variable.
6254 * win32-i386-low.c (i386_dr_low_set_addr):
6255 Changed signature. Made static.
6256 (i386_dr_low_get_addr): Likewise.
6257 (i386_dr_low_set_control): Likewise.
6258 (i386_dr_low_get_control): Likewise.
6259 (i386_dr_low_get_status): Likewise.
6260 (i386_dr_low): New global variable.
6261
e1d2394b
MS
62622014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6263
6264 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6265 * Makefile.in (AR, AR_FLAGS): Define.
6266 * configure: Regenerate.
6267
3a8ee006
GB
62682014-06-19 Gary Benson <gbenson@redhat.com>
6269
6270 * Makefile.in (i386-dregs.o): New rule.
6271 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6272 * i386-low.c (target.h): Remove include.
6273 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6274 (DR_CONTROL_SHIFT): Likewise.
6275 (DR_CONTROL_SIZE): Likewise.
6276 (DR_RW_EXECUTE): Likewise.
6277 (DR_RW_WRITE): Likewise.
6278 (DR_RW_READ): Likewise.
6279 (DR_RW_IORW): Likewise.
6280 (DR_LEN_1): Likewise.
6281 (DR_LEN_2): Likewise.
6282 (DR_LEN_4): Likewise.
6283 (DR_LEN_8): Likewise.
6284 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6285 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6286 (DR_ENABLE_SIZE): Likewise.
6287 (DR_LOCAL_SLOWDOWN): Likewise.
6288 (DR_GLOBAL_SLOWDOWN): Likewise.
6289 (DR_CONTROL_RESERVED): Likewise.
6290 (I386_DR_CONTROL_MASK): Likewise.
6291 (I386_DR_VACANT): Likewise.
6292 (I386_DR_LOCAL_ENABLE): Likewise.
6293 (I386_DR_GLOBAL_ENABLE): Likewise.
6294 (I386_DR_DISABLE): Likewise.
6295 (I386_DR_SET_RW_LEN): Likewise.
6296 (I386_DR_GET_RW_LEN): Likewise.
6297 (I386_DR_WATCH_HIT): Likewise.
6298 (i386_wp_op_t): Likewise.
6299 (i386_show_dr): Likewise.
6300 (i386_length_and_rw_bits): Likewise.
6301 (i386_insert_aligned_watchpoint): Likewise.
6302 (i386_remove_aligned_watchpoint): Likewise.
6303 (i386_handle_nonaligned_watchpoint): Likewise.
6304 i386_update_inferior_debug_regs(): Likewise.
6305 (i386_dr_insert_watchpoint): Likewise.
6306 (i386_dr_remove_watchpoint): Likewise.
6307 (i386_dr_region_ok_for_watchpoint): Likewise.
6308 (i386_dr_stopped_data_address): Likewise.
6309 (i386_dr_stopped_by_watchpoint): Likewise.
6310
8f26655c
GB
63112014-06-19 Gary Benson <gbenson@redhat.com>
6312
6313 * i386-low.c (i386_dr_show): Renamed to
6314 i386_show_dr and made static. All uses updated.
6315 (i386_dr_length_and_rw_bits): Renamed to
6316 i386_length_and_rw_bits and made static.
6317 All uses updated.
6318 (i386_dr_insert_aligned_watchpoint): Renamed to
6319 i386_insert_aligned_watchpoint and made static.
6320 All uses updated.
6321 (i386_dr_remove_aligned_watchpoint): Renamed to
6322 i386_remove_aligned_watchpoint and made static.
6323 All uses updated.
6324 (i386_dr_update_inferior_debug_regs): Renamed to
6325 i386_update_inferior_debug_regs and made static.
6326 All uses updated.
6327
b9228891
GB
63282014-06-18 Gary Benson <gbenson@redhat.com>
6329
5171def3
GB
6330 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6331 (i386_dr_low_can_set_control): Likewise.
6332 (i386_get_debug_register_length): Likewise.
6333 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6334 (i386_dr_low_can_set_control): Likewise.
6335 (i386_get_debug_register_length): Likewise.
6336
63372014-06-17 Gary Benson <gbenson@redhat.com>
6338
b9228891
GB
6339 * i386-low.h (i386-dregs.h): New include.
6340 (DR_FIRSTADDR): Now in i386-dregs.h.
6341 (DR_LASTADDR): Likewise.
6342 (DR_NADDR): Likewise.
6343 (DR_STATUS): Likewise.
6344 (DR_CONTROL): Likewise.
6345 (i386_debug_reg_state): Likewise.
6346 (i386_dr_insert_watchpoint): Likewise.
6347 (i386_dr_remove_watchpoint): Likewise.
6348 (i386_dr_region_ok_for_watchpoint): Likewise.
6349 (i386_dr_stopped_data_address): Likewise.
6350 (i386_dr_stopped_by_watchpoint): Likewise.
6351 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6352
4be83cc2
GB
63532014-06-18 Gary Benson <gbenson@redhat.com>
6354
6355 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6356 i386_dr_insert_watchpoint.
6357 (i386_low_remove_watchpoint): Renamed to
6358 i386_dr_remove_watchpoint.
6359 (i386_low_region_ok_for_watchpoint): Renamed to
6360 i386_dr_region_ok_for_watchpoint.
6361 (i386_low_stopped_data_address): Renamed to
6362 i386_dr_stopped_data_address.
6363 (i386_low_stopped_by_watchpoint): Renamed to
6364 i386_dr_stopped_by_watchpoint.
6365 * i386-low.c (i386_show_dr): Renamed to
6366 i386_dr_show and made nonstatic. All uses updated.
6367 (i386_length_and_rw_bits): Renamed to
6368 i386_dr_length_and_rw_bits and made nonstatic.
6369 All uses updated.
6370 (i386_insert_aligned_watchpoint): Renamed to
6371 i386_dr_insert_aligned_watchpoint and made nonstatic.
6372 All uses updated.
6373 (i386_remove_aligned_watchpoint): Renamed to
6374 i386_dr_remove_aligned_watchpoint and made nonstatic.
6375 All uses updated.
6376 (i386_update_inferior_debug_regs): Renamed to
6377 i386_dr_update_inferior_debug_regs and made nonstatic.
6378 All uses updated.
6379 (i386_low_insert_watchpoint): Renamed to
6380 i386_dr_insert_watchpoint. All uses updated.
6381 (i386_low_remove_watchpoint): Renamed to
6382 i386_dr_remove_watchpoint. All uses updated.
6383 (i386_low_region_ok_for_watchpoint): Renamed to
6384 i386_dr_region_ok_for_watchpoint. All uses updated.
6385 (i386_low_stopped_data_address): Renamed to
6386 i386_dr_stopped_data_address. All uses updated.
6387 (i386_low_stopped_by_watchpoint): Renamed to
6388 i386_dr_stopped_by_watchpoint. All uses updated.
6389
131aa0d4
GB
63902014-06-18 Gary Benson <gbenson@redhat.com>
6391
6392 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6393 (i386_dr_low_can_set_control): Likewise.
6394 (i386_insert_aligned_watchpoint): New check.
6395
d9305f7f
GB
63962014-06-18 Gary Benson <gbenson@redhat.com>
6397
6398 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6399 Renamed to state.
6400
e927c9fc
GB
64012014-06-18 Gary Benson <gbenson@redhat.com>
6402
6403 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6404 instead of fatal and error.
6405 (i386_handle_nonaligned_watchpoint): Likewise.
6406
1b6d4134
GB
64072014-06-18 Gary Benson <gbenson@redhat.com>
6408
6409 * i386-low.c (i386_get_debug_register_length): New macro.
6410 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6411 (i386_show_dr): Use debug_printf instead of fprintf. Use
6412 phex to format values.
6413
6e62758f
GB
64142014-06-18 Gary Benson <gbenson@redhat.com>
6415
6416 * i386-low.h: Comment changes.
6417 * i386-low.c: Likewise.
6418
fc6e2f03
GB
64192014-06-18 Gary Benson <gbenson@redhat.com>
6420
6421 * i386-low.c: Whitespace changes.
6422
f9d1eeed
TT
64232014-06-12 Tom Tromey <tromey@redhat.com>
6424
6425 * utils.c (freeargv): Remove.
6426
0b04e523
TT
64272014-06-12 Tom Tromey <tromey@redhat.com>
6428
6429 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6430 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6431 (parse_debug_format_options): Likewise.
6432 (gdbserver_usage): Likewise.
6433 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6434 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6435 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6436 against libiberty.
6437 ($(LIBGNU)): Depend on libiberty.
6438 (all-lib): Recurse into all subdirs.
6439 (install-only): Invoke "install" target in subdirs.
6440 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6441 targets.
6442 * configure: Rebuild.
6443 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6444 for vasprintf, vsnprintf, or gettimeofday.
6445 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6446 srv_tgtobj.
6447
270c9937
JB
64482014-06-05 Joel Brobecker <brobecker@adacore.com>
6449
6450 * development.sh: Delete.
6451 * Makefile.in (config.status): Adjust dependency on development.sh.
6452 * configure.ac: Adjust development.sh source call.
6453 * configure: Regenerate.
6454
0a261ed8
PA
64552014-06-02 Pedro Alves <palves@redhat.com>
6456
6457 * ax.c (gdb_free_agent_expr): New function.
6458 * ax.h (gdb_free_agent_expr): New declaration.
6459 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6460 list.
6461 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6462 static.
6463 (clear_breakpoint_conditions_and_commands): New function.
6464 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6465 (clear_breakpoint_conditions_and_commands): New declaration.
6466
e9dae05e
RR
64672014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6468
6469 * linux-aarch64-low.c (asm/ptrace.h): Include.
6470
5876f503
JK
64712014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6472
6473 Fix TLS access for -static -pthread.
6474 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6475 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6476 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6477
802e8e6d
PA
64782014-05-20 Pedro Alves <palves@redhat.com>
6479
6480 * linux-aarch64-low.c (aarch64_insert_point)
6481 (aarch64_remove_point): No longer check whether the type is
6482 supported here. Adjust to new interface.
6483 (the_low_target): Install aarch64_supports_z_point_type as
6484 supports_z_point_type method.
6485 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6486 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6487 instead of a Z packet char. Adjust.
6488 (arm_supports_z_point_type): New function.
6489 (arm_insert_point, arm_remove_point): Adjust to new interface.
6490 (the_low_target): Install arm_supports_z_point_type.
6491 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6492 (cris_insert_point, cris_remove_point): Adjust to new interface.
6493 Don't check whether the type is supported here.
6494 (the_low_target): Install cris_supports_z_point_type.
6495 * linux-low.c (linux_supports_z_point_type): New function.
6496 (linux_insert_point, linux_remove_point): Adjust to new interface.
6497 * linux-low.h (struct linux_target_ops) <insert_point,
6498 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6499 raw_breakpoint pointer parameter.
6500 <supports_z_point_type>: New method.
6501 * linux-mips-low.c (mips_supports_z_point_type): New function.
6502 (mips_insert_point, mips_remove_point): Adjust to new interface.
6503 Use mips_supports_z_point_type.
6504 (the_low_target): Install mips_supports_z_point_type.
6505 * linux-ppc-low.c (the_low_target): Install NULL as
6506 supports_z_point_type method.
6507 * linux-s390-low.c (the_low_target): Install NULL as
6508 supports_z_point_type method.
6509 * linux-sparc-low.c (the_low_target): Install NULL as
6510 supports_z_point_type method.
6511 * linux-x86-low.c (x86_supports_z_point_type): New function.
6512 (x86_insert_point): Adjust to new insert_point interface. Use
6513 insert_memory_breakpoint. Adjust to new
6514 i386_low_insert_watchpoint interface.
6515 (x86_remove_point): Adjust to remove_point interface. Use
6516 remove_memory_breakpoint. Adjust to new
6517 i386_low_remove_watchpoint interface.
6518 (the_low_target): Install x86_supports_z_point_type.
6519 * lynx-low.c (lynx_target_ops): Install NULL as
6520 supports_z_point_type callback.
6521 * nto-low.c (nto_supports_z_point_type): New.
6522 (nto_insert_point, nto_remove_point): Adjust to new interface.
6523 (nto_target_ops): Install nto_supports_z_point_type.
6524 * mem-break.c: Adjust intro comment.
6525 (struct raw_breakpoint) <raw_type, size>: New fields.
6526 <inserted>: Update comment.
6527 <shlib_disabled>: Delete field.
6528 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6529 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6530 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6531 (raw_bkpt_type_to_target_hw_bp_type): New function.
6532 (find_enabled_raw_code_breakpoint_at): New function.
6533 (find_raw_breakpoint_at): New type and size parameters. Use them.
6534 (insert_memory_breakpoint): New function, based off
6535 set_raw_breakpoint_at.
6536 (remove_memory_breakpoint): New function.
6537 (set_raw_breakpoint_at): Reimplement.
6538 (set_breakpoint): New, based on set_breakpoint_at.
6539 (set_breakpoint_at): Reimplement.
6540 (delete_raw_breakpoint): Go through the_target->remove_point
6541 instead of assuming memory breakpoints.
6542 (find_gdb_breakpoint_at): Delete.
6543 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6544 (find_gdb_breakpoint): New function.
6545 (set_gdb_breakpoint_at): Delete.
6546 (z_type_supported): New function.
6547 (set_gdb_breakpoint_1): New function, loosely based off
6548 set_gdb_breakpoint_at.
6549 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6550 (delete_gdb_breakpoint_at): Delete.
6551 (delete_gdb_breakpoint_1): New function, loosely based off
6552 delete_gdb_breakpoint_at.
6553 (delete_gdb_breakpoint): New function.
6554 (clear_gdb_breakpoint_conditions): Rename to ...
6555 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6556 breakpoint.
6557 (add_condition_to_breakpoint): Make static.
6558 (add_breakpoint_condition): Take a struct breakpoint pointer
6559 instead of an address. Adjust.
6560 (gdb_condition_true_at_breakpoint): Rename to ...
6561 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6562 z_type parameter.
6563 (gdb_condition_true_at_breakpoint): Reimplement.
6564 (add_breakpoint_commands): Take a struct breakpoint pointer
6565 instead of an address. Adjust.
6566 (gdb_no_commands_at_breakpoint): Rename to ...
6567 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6568 parameter. Return true if no breakpoint was found. Change debug
6569 output.
6570 (gdb_no_commands_at_breakpoint): Reimplement.
6571 (run_breakpoint_commands): Rename to ...
6572 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6573 and change return type to boolean.
6574 (run_breakpoint_commands): New function.
6575 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6576 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6577 breakpoint. Go through the_target->remove_point instead of
6578 assuming memory breakpoint.
6579 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6580 software and hardware breakpoints.
6581 (reinsert_raw_breakpoint): Go through the_target->insert_point
6582 instead of assuming memory breakpoint.
6583 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6584 software and hardware breakpoints.
6585 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6586 Check both software and hardware breakpoints.
6587 (validate_inserted_breakpoint): Assert the breakpoint is a
6588 software breakpoint. Set the inserted flag to -1 instead of
6589 setting shlib_disabled.
6590 (delete_disabled_breakpoints): Adjust.
6591 (validate_breakpoints): Only validate software breakpoints.
6592 Adjust to inserted flag change.
6593 (check_mem_read, check_mem_write): Skip breakpoint types other
6594 than software breakpoints. Adjust to inserted flag change.
6595 * mem-break.h (enum raw_bkpt_type): New enum.
6596 (raw_breakpoint, struct process_info): Forward declare.
6597 (Z_packet_to_target_hw_bp_type): Delete declaration.
6598 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6599 (set_gdb_breakpoint, delete_gdb_breakpoint)
6600 (clear_breakpoint_conditions): New declarations.
6601 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6602 (breakpoint_inserted_here): Update comment.
6603 (add_breakpoint_condition, add_breakpoint_commands): Replace
6604 address parameter with a breakpoint pointer parameter.
6605 (gdb_breakpoint_here): Update comment.
6606 (delete_gdb_breakpoint_at): Delete.
6607 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6608 * server.c (process_point_options): Take a struct breakpoint
6609 pointer instead of an address. Adjust.
6610 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6611 delete_gdb_breakpoint.
6612 * spu-low.c (spu_target_ops): Install NULL as
6613 supports_z_point_type method.
6614 * target.h: Include mem-break.h.
6615 (struct target_ops) <prepare_to_access_memory>: Update comment.
6616 <supports_z_point_type>: New field.
6617 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6618 instead of a char. Also take a raw breakpoint pointer.
6619 * win32-arm-low.c (the_low_target): Install NULL as
6620 supports_z_point_type.
6621 * win32-i386-low.c (i386_supports_z_point_type): New function.
6622 (i386_insert_point, i386_remove_point): Adjust to new interface.
6623 (the_low_target): Install i386_supports_z_point_type.
6624 * win32-low.c (win32_supports_z_point_type): New function.
6625 (win32_insert_point, win32_remove_point): Adjust to new interface.
6626 (win32_target_ops): Install win32_supports_z_point_type.
6627 * win32-low.h (struct win32_target_ops):
6628 <supports_z_point_type>: New method.
6629 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6630 instead of a char. Also take a raw breakpoint pointer.
6631
932539e3
PA
66322014-05-20 Pedro Alves <palves@redhat.com>
6633
6634 * mem-break.h: Include break-common.h.
6635 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6636 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6637 (Z_packet_to_target_hw_bp_type): New declaration.
6638 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6639 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6640 (Z_PACKET_ACCESS_WP): Delete macros.
6641 (Z_packet_to_hw_type): Delete function.
6642 * i386-low.h: Don't include break-common.h here.
6643 (Z_packet_to_hw_type): Delete declaration.
6644 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6645 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6646 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6647 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6648 * linux-aarch64-low.c: Don't include break-common.h here.
6649 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6650 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6651 (Z_packet_to_target_hw_bp_type): Delete function.
6652 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6653 function.
6654 (mips_insert_point, mips_remove_point): Use
6655 Z_packet_to_target_hw_bp_type.
6656
4ff0d3d8
PA
66572014-05-20 Pedro Alves <palves@redhat.com>
6658
6659 * linux-aarch64-low.c: Include break-common.h.
6660 (enum target_point_type): Delete.
6661 (Z_packet_to_point_type): Rename to ...
6662 (Z_packet_to_target_hw_bp_type): ... this, and return a
6663 target_hw_bp_type instead.
6664 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6665 instead of an enum target_point_type.
6666 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6667 breakpoint type.
6668 (aarch64_dr_state_insert_one_point)
6669 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6670 (aarch64_handle_aligned_watchpoint)
6671 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6672 Take an enum target_hw_bp_type instead of an enum
6673 target_point_type.
6674 (aarch64_supports_z_point_type): New function.
6675 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6676 use Z_packet_to_target_hw_bp_type.
6677
786dc519
JB
66782014-05-20 Joel Brobecker <brobecker@adacore.com>
6679
6680 * configure.ac: Only use -Werror by default when DEVELOPMENT
6681 is true.
6682 * configure: Regenerate.
6683
9e0aa64f
JK
66842014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6685
6686 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6687 * linux-x86-low.c (X86_64_USER_REGS): New.
6688 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6689
2b577b92
YQ
66902014-04-28 Yao Qi <yao@codesourcery.com>
6691
6692 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6693 name.
6694
94611da2
PA
66952014-04-25 Pedro Alves <palves@redhat.com>
6696
6697 PR server/16255
6698 * linux-low.c (linux_attach_fail_reason_string): New function.
6699 (linux_attach_lwp): Delete.
6700 (linux_attach_lwp_1): Rename to ...
6701 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6702 argument. Remove "initial" parameter. Return int instead of
6703 void. Don't error or warn here.
6704 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6705 failure to attach to the tgid. Call warning when failing to
6706 attach to an lwp.
6707 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6708 argument. Remove "initial" parameter. Return int instead of
6709 void. Don't error or warn here.
6710 (linux_attach_fail_reason_string): New declaration.
6711 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6712 interface change. Use linux_attach_fail_reason_string.
6713
01f9f808
MS
67142014-04-24 Michael Sturm <michael.sturm@mintel.com>
6715 Walfred Tedeschi <walfred.tedeschi@intel.com>
6716
6717 * Makefile.in: Added rules to handle new files
6718 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6719 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6720 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6721 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6722 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6723 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6724 x32-avx512-linux.o.
6725 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6726 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6727 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6728 i386/x32-avx512.xml.
6729 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6730 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6731 i386/x32-avx512-linux.xml.
6732 * i387-fp.c (num_avx512_k_registers): New constant for number
6733 of K registers.
6734 (num_avx512_zmmh_low_registers): New constant for number of
6735 lower ZMM registers (0-15).
6736 (num_avx512_zmmh_high_registers): New constant for number of
6737 higher ZMM registers (16-31).
6738 (num_avx512_ymmh_registers): New contant for number of higher
6739 YMM registers (ymm16-31 added by avx521 on x86_64).
6740 (num_avx512_xmm_registers): New constant for number of higher
6741 XMM registers (xmm16-31 added by AVX512 on x86_64).
6742 (struct i387_xsave): Add space for AVX512 registers.
6743 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6744 Add code to handle AVX512 registers.
6745 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6746 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6747 prototypei from generated file.
6748 (tdesc_amd64_avx512_linux): Likewise.
6749 (init_registers_x32_avx512_linux): Likewise.
6750 (tdesc_x32_avx512_linux): Likewise.
6751 (init_registers_i386_avx512_linux): Likewise.
6752 (tdesc_i386_avx512_linux): Likewise.
6753 (x86_64_regmap): Add AVX512 registers.
6754 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6755 mask.
6756 (initialize_low_arch): Add code to initialize AVX512 registers.
6757
51aa91f9
PA
67582014-04-23 Pedro Alves <palves@redhat.com>
6759
6760 * mem-break.c (find_gdb_breakpoint_at): Make static.
6761 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6762
a4165e94
PA
67632014-04-23 Pedro Alves <palves@redhat.com>
6764
6765 * i386-low.c: Don't include break-common.h here.
6766 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6767 prototype to take target_hw_bp_type as argument instead of a Z
6768 packet char.
6769 * i386-low.h: Include break-common.h here.
6770 (Z_packet_to_hw_type): Declare.
6771 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6772 prototypes.
6773 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6774 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6775 (x86_remove_point): Convert the packet number to a
6776 target_hw_bp_type before calling i386_low_remove_watchpoint.
6777 * win32-i386-low.c (i386_insert_point): Convert the packet number
6778 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6779 (i386_remove_point): Convert the packet number to a
6780 target_hw_bp_type before calling i386_low_remove_watchpoint.
6781
b8acf843
PA
67822014-04-23 Pedro Alves <palves@redhat.com>
6783
6784 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6785
d708bcd1
PA
67862014-04-10 Pedro Alves <palves@redhat.com>
6787
6788 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6789 Check if the condition or command is NULL before checking if the
6790 breakpoint is known. On success, return true.
6791 * mem-break.h (add_breakpoint_condition): Document return.
6792 (add_breakpoint_commands): Add describing comment.
6793 * server.c (skip_to_semicolon): New function.
6794 (process_point_options): Use it.
6795
2eec7d5b
PA
67962014-04-09 Pedro Alves <palves@redhat.com>
6797
6798 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6799 to lwpid_of.
6800
fa96cb38
PA
68012014-02-27 Pedro Alves <palves@redhat.com>
6802
6803 PR 12702
6804 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6805 macros.
6806 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6807 output.
6808 (last_thread_of_process_p): Take a PID argument instead of a
6809 thread pointer.
6810 (linux_wait_for_lwp): Delete.
6811 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6812 functions.
6813 (linux_low_filter_event): New function, party factored out from
6814 linux_wait_for_event.
6815 (linux_wait_for_event): Rename to ...
6816 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6817 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6818 sigsuspend. Check for zombie leaders.
6819 (linux_wait_for_event): Reimplement as wrapper around
6820 linux_wait_for_event_filtered.
6821 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6822 a normal or signal exit is seen, it's the whole process exiting.
6823 (wait_for_sigstop): No longer a for_each_inferior callback.
6824 Rewrite on top of linux_wait_for_event_filtered.
6825 (stop_all_lwps): Call wait_for_sigstop directly.
6826 * server.c (resume, handle_target_event): Handle
6827 TARGET_WAITKIND_NO_RESUMED.
6828
d763de10
JB
68292014-02-26 Joel Brobecker <brobecker@adacore.com>
6830
6831 * win32-low.c (psapi_get_dll_name,
6832 * win32_CreateToolhelp32Snapshot): Delete.
6833 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6834 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6835 Delete.
6836 (handle_load_dll): Add function description.
6837 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6838
850a0f76
JB
68392014-02-26 Joel Brobecker <brobecker@adacore.com>
6840
6841 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6842 Add comment.
6843 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6844 base address when calling win32_add_one_solib.
6845 (handle_load_dll): Delete local variable load_addr.
6846 Remove 0x1000 offset applied to DLL base address when calling
6847 win32_add_one_solib.
6848 (handle_unload_dll): Add comment.
6849
f25b3fc3
JB
68502014-02-26 Joel Brobecker <brobecker@adacore.com>
6851
6852 * win32-low.c (win32_add_all_dlls): Renames
6853 win32_ensure_ntdll_loaded. Rewrite function documentation.
6854 Adjust implementation to always load all DLLs.
6855 Add 0x1000 offset to DLL base address when calling
6856 win32_add_one_solib.
6857 (child_initialization_done): New static global.
6858 (do_initial_child_stuff): Set child_initialization_done to
6859 zero during child initialization, and 1 after. Replace call
6860 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6861 Add comment.
6862 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6863 (handle_unload_dll): Add function documentation.
6864 (get_child_debug_event): Ignore load and unload DLL events
6865 during child initialization.
6866
d86d4aaf
DE
68672014-02-20 Doug Evans <dje@google.com>
6868
3bc32da3 6869 Remove global all_lwps.
d86d4aaf
DE
6870 * inferiors.h (ptid_of): Move here from linux-low.h.
6871 (pid_of, lwpid_of): Ditto.
6872 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6873 parameter is a struct thread_info * now.
6874 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6875 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6876 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6877 directly.
6878 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6879 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6880 * linux-arm-low.c (update_registers_callback): Update, "entry"
6881 parameter is a struct thread_info * now.
6882 Fetch lwpid from current_inferior directly.
6883 (arm_insert_point): Pass &all_threads to find_inferior instead of
6884 &all_lwps.
6885 (arm_remove_point): Ditto.
6886 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6887 (arm_prepare_to_resume): Fetch pid from thread.
6888 (arm_read_description): Fetch lwpid from current_inferior directly.
6889 * linux-low.c (all_lwps): Delete.
6890 (delete_lwp): Delete call to remove_inferior.
6891 (handle_extended_wait): Fetch lwpid from thread.
6892 (add_lwp): Don't set lwp->entry.id. Remove call to
6893 add_inferior_to_list.
6894 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6895 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6896 (kill_one_lwp_callback): Ditto.
6897 (linux_kill): Don't dereference NULL pointer.
6898 Fetch ptid,lwpid from thread.
6899 (get_detach_signal): Fetch ptid from thread.
6900 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6901 Simplify call to regcache_invalidate_thread.
6902 (delete_lwp_callback): Update, "entry" parameter is a
6903 struct thread_info * now. Fetch pid from thread.
6904 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6905 (status_pending_p_callback): Update, "entry" parameter is a
6906 struct thread_info * now. Fetch ptid from thread.
6907 (find_lwp_pid): Update, "entry" parameter is a
6908 struct thread_info * now.
6909 (linux_wait_for_lwp): Fetch pid from thread.
6910 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6911 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6912 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6913 (dequeue_one_deferred_signal): Ditto.
6914 (cancel_breakpoint): Fetch ptid from current_inferior.
6915 (linux_wait_for_event): Pass &all_threads to find_inferior,
6916 not &all_lwps. Fetch ptid, lwpid from thread.
6917 (count_events_callback): Update, "entry" parameter is a
6918 struct thread_info * now.
6919 (select_singlestep_lwp_callback): Ditto.
6920 (select_event_lwp_callback): Ditto.
6921 (cancel_breakpoints_callback): Ditto.
6922 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6923 not &all_lwps.
6924 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6925 (unsuspend_one_lwp): Update, "entry" parameter is a
6926 struct thread_info * now.
6927 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6928 not &all_lwps.
6929 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6930 Fetch lwpid from thread, not lwp.
6931 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6932 Pass &all_threads to find_inferior, not &all_lwps.
6933 (send_sigstop): Fetch lwpid from thread, not lwp.
6934 (send_sigstop_callback): Update, "entry" parameter is a
6935 struct thread_info * now.
6936 (suspend_and_send_sigstop_callback): Ditto.
6937 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6938 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6939 struct thread_info * now.
6940 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6941 from thread, lwp.
6942 (lwp_running): Update, "entry" parameter is a
6943 struct thread_info * now.
6944 (stop_all_lwps): Fetch ptid from thread.
6945 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6946 (linux_resume_one_lwp): Fetch lwpid from thread.
6947 (linux_set_resume_request): Update, "entry" parameter is a
6948 struct thread_info * now. Fetch pid, lwpid from thread.
6949 (resume_status_pending_p): Update, "entry" parameter is a
6950 struct thread_info * now.
6951 (need_step_over_p): Ditto. Fetch lwpid from thread.
6952 (start_step_over): Fetch lwpid from thread.
6953 (linux_resume_one_thread): Update, "entry" parameter is a
6954 struct thread_info * now. Fetch lwpid from thread.
6955 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6956 (proceed_one_lwp): Update, "entry" parameter is a
6957 struct thread_info * now. Fetch lwpid from thread.
6958 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6959 struct thread_info * now.
6960 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6961 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6962 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6963 directly.
6964 (regsets_store_inferior_registers): Ditto.
6965 (fetch_register, store_register): Ditto.
6966 (linux_read_memory, linux_write_memory): Ditto.
6967 (linux_request_interrupt): Ditto.
6968 (linux_read_auxv): Ditto.
6969 (linux_xfer_siginfo): Ditto.
6970 (linux_qxfer_spu): Ditto.
6971 (linux_qxfer_libraries_svr4): Ditto.
6972 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6973 moved to inferiors.h.
6974 (get_lwp): Delete.
6975 (get_thread_lwp): Update.
6976 (struct lwp_info): Delete member "entry". Simplify comment for
6977 member "thread".
6978 (all_lwps): Delete.
6979 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6980 current_inferior directly.
6981 (update_watch_registers_callback): Update, "entry" parameter is a
6982 struct thread_info * now. Fetch pid from thread.
6983 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6984 (mips_insert_point): Fetch lwpid from current_inferior.
6985 Pass &all_threads to find_inferior, not &all_lwps.
6986 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6987 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6988 directly.
6989 (mips_stopped_data_address): Ditto.
6990 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6991 directly.
6992 * linux-tile-low.c (tile_arch_setup): Ditto.
6993 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6994 (update_debug_registers_callback): Update, "entry" parameter is a
6995 struct thread_info * now. Fetch pid from thread.
6996 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6997 Pass &all_threads to find_inferior, not &all_lwps.
6998 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6999 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7000 Pass &all_threads to find_inferior, not &all_lwps.
7001 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7002 (i386_dr_low_get_status): Ditto.
7003 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7004 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7005 (x86_linux_read_description): Ditto.
7006 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7007
3b8361aa
DE
70082014-02-20 Doug Evans <dje@google.com>
7009
7010 * inferiors.c (get_first_inferior): Fix buglet.
7011
f7667f0d
DE
70122014-02-19 Doug Evans <dje@google.com>
7013
7014 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7015 * inferiors.c (add_thread): Change result type to struct thread_info *.
7016 All callers updated.
7017 (add_lwp): Call add_thread here instead of in callers.
7018 All callers updated.
7019 * linux-low.h (get_lwp_thread): Rewrite.
7020 (struct lwp_info): New member "thread".
7021
b3312d80
DE
70222014-02-19 Doug Evans <dje@google.com>
7023
7024 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7025 All callers updated.
7026
ecc6f45c
DE
70272014-02-19 Doug Evans <dje@google.com>
7028
7029 * inferiors.c (add_thread): Fix whitespace.
7030
649ebbca
DE
70312014-02-19 Doug Evans <dje@google.com>
7032
7033 * dll.c (clear_dlls): Replace accessing list implemention details
7034 with API function.
7035 * gdbthread.h (get_first_thread): Declare.
7036 * inferiors.c (for_each_inferior_with_data): New function.
7037 (get_first_thread): New function.
7038 (find_thread_ptid): Simplify.
7039 (get_first_inferior): New function.
7040 (clear_list): Delete.
7041 (one_inferior_p): New function.
7042 (clear_inferior_list): New function.
7043 (clear_inferiors): Update.
7044 * inferiors.h (for_each_inferior_with_data): Declare.
7045 (clear_inferior_list): Declare.
7046 (one_inferior_p): Declare.
7047 (get_first_inferior): Declare.
7048 * linux-low.c (linux_wait_for_event): Replace accessing list
7049 implemention details with API function.
7050 * server.c (target_running): Ditto.
7051 (accumulate_file_name_length): New function.
7052 (emit_dll_description): New function.
7053 (handle_qxfer_libraries): Replace accessing list implemention
7054 details with API function.
7055 (handle_qxfer_threads_worker): New function.
7056 (handle_qxfer_threads_proper): Replace accessing list implemention
7057 details with API function.
7058 (handle_query): Ditto.
7059 (visit_actioned_threads_callback_ftype): New typedef.
7060 (visit_actioned_threads_data): New struct.
7061 (visit_actioned_threads): Rewrite to be find_inferior callback.
7062 (resume): Call find_inferior.
7063 (handle_status): Replace accessing list implemention
7064 details with API function.
7065 (process_serial_event): Replace accessing list implemention details
7066 with API function.
7067 * target.c (set_desired_inferior): Replace accessing list implemention
7068 details with API function.
7069 * tracepoint.c (same_process_p): New function.
7070 (gdb_agent_about_to_close): Replace accessing list implemention
7071 details with API function.
7072 * win32-low.c (child_delete_thread): Replace accessing list
7073 implemention details with API function.
7074 (match_dll_by_basename): New function.
7075 (dll_is_loaded_by_basename): New function.
7076 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7077 details call to dll_is_loaded_by_basename.
7078
80894984
DE
70792014-02-19 Doug Evans <dje@google.com>
7080
7081 * dll.h (struct dll_info): Add comment.
7082 * gdbthread.h (struct thread_info): Add comment.
7083 (current_ptid): Simplify.
7084 * inferiors.c (add_process): Update.
7085 (remove_process): Update.
7086 * inferiors.h (struct process_info): Rename member "head" to "entry".
7087 * linux-low.c (delete_lwp): Update.
7088 (add_lwp): Update.
7089 (last_thread_of_process_p): Update.
7090 (kill_one_lwp_callback, linux_kill): Update.
7091 (status_pending_p_callback): Update.
7092 (wait_for_sigstop): Update. Simplify read of ptid.
7093 (start_step_over): Update.
7094 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7095 (get_lwp_thread): Update.
7096 (struct lwp_info): Rename member "head" to "entry".
7097 * regcache.h (inferior_list_entry): Delete.
7098 * server.c (kill_inferior_callback): Update.
7099 (detach_or_kill_inferior_callback): Update.
7100 (print_started_pid): Update.
7101 (print_attached_pid): Update.
7102 (process_serial_event): Simplify read of ptid.
7103 * thread-db.c (thread_db_create_event): Update.
7104 (thread_db_get_tls_address): Update.
7105 * win32-low.c (current_inferior_ptid): Simplify.
7106
46917d26
TT
71072014-02-19 Tom Tromey <tromey@redhat.com>
7108
7109 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7110 argument.
7111 (target_supports_btrace): Update.
7112
0759a81e
YQ
71132014-02-14 Yao Qi <yao@codesourcery.com>
7114
7115 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7116 (rsp-low-ipa.o): New target.
7117
a7191e8b
TT
71182014-02-12 Tom Tromey <tromey@redhat.com>
7119
7120 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7121 convert_ascii_to_int.
7122 * regcache.c (registers_to_string): Likewise.
7123 * remote-utils.c (decode_M_packet): Likewise.
7124 * server.c (process_serial_event): Likewise.
7125
ff0e980e
TT
71262014-02-12 Tom Tromey <tromey@redhat.com>
7127
7128 * server.c (handle_query, handle_v_run): Use hex2bin, not
7129 unhexify.
7130 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7131
e9371aff
TT
71322014-02-12 Tom Tromey <tromey@redhat.com>
7133
7134 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7135 convert_int_to_ascii.
7136 * regcache.c (registers_to_string, collect_register_as_string):
7137 Likewise.
7138 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7139 Likewise.
7140 * server.c (process_serial_event): Likewise.
7141 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7142 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7143
971dc0b8
TT
71442014-02-12 Tom Tromey <tromey@redhat.com>
7145
7146 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7147 bin2hex, not hexify.
7148 * tracepoint.c (cmd_qtstatus): Likewise.
7149
0a822afb
TT
71502014-02-12 Tom Tromey <tromey@redhat.com>
7151
7152 * remote-utils.c (monitor_output): Pass explicit length to
7153 hexify.
7154
9c3d6531
TT
71552014-02-12 Tom Tromey <tromey@redhat.com>
7156
7157 * tracepoint.c: Include rsp-low.h.
7158 * server.c: Include rsp-low.h.
7159 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7160 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7161 declare.
7162 * remote-utils.c: Include rsp-low.h.
7163 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7164 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7165 (convert_int_to_ascii, convert_ascii_to_int): Move to
7166 common/rsp-low.c.
7167 * regcache.c: Include rsp-low.h.
7168 * ax.c: Include rsp-low.h.
7169 * Makefile.in (SFILES): Add common/rsp-low.c.
7170 (OBS): Add rsp-low.o.
7171 (rsp-low.o): New target.
7172
01fd3ea5
TT
71732014-02-12 Tom Tromey <tromey@redhat.com>
7174
7175 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7176 Include print-utils.h.
7177 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7178 (plongest, thirty_two, phex_nz): Remove.
7179 * Makefile.in (SFILES): Add common/print-utils.c.
7180 (OBS): Add print-utils.o.
7181 (print-utils-ipa.o): New target.
7182 (print-utils.o): New target.
7183 (IPA_OBJS): Add print-utils-ipa.o.
7184
e99dc820
TT
71852014-02-06 Tom Tromey <tromey@redhat.com>
7186
7187 * Makefile.in (SFILES): Fix indentation.
7188
ee1e2d4f
DE
71892014-02-05 Doug Evans <dje@google.com>
7190
7191 * linux-low.c (linux_wait_for_event): Improve comment.
7192 (linux_wait_1): Keep current_inferior in sync with event_child.
7193
f5a02773
DE
71942014-01-22 Doug Evans <dje@google.com>
7195
7196 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7197
87ce2a04
DE
71982014-01-22 Doug Evans <dje@google.com>
7199
7200 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7201 * configure: Regenerate.
7202 * config.in: Regenerate.
7203 * Makefile.in (SFILES): Add debug.c.
7204 (OBS): Add debug.o.
7205 * debug.c: New file.
7206 * debug.h: New file.
7207 * linux-aarch64-low.c (*): Update all debugging printfs to use
7208 debug_printf instead of fprintf.
7209 * linux-arm-low.c (*): Ditto.
7210 * linux-cris-low.c (*): Ditto.
7211 * linux-crisv32-low.c (*): Ditto.
7212 * linux-m32r-low.c (*): Ditto.
7213 * linux-sparc-low.c (*): Ditto.
7214 * linux-x86.c (*): Ditto.
7215 * linux-low.c (*): Ditto.
7216 (linux_wait_1): Add calls to debug_enter, debug_exit.
7217 (linux_wait): Remove redundant debugging printf.
7218 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7219 (linux_resume, unstop_all_lwps): Ditto.
7220 * mem-break.c (*): Update all debugging printfs to use
7221 debug_printf instead of fprintf.
7222 * remote-utils.c (*): Ditto.
7223 * thread-db.c (*): Ditto.
7224 * server.c #include <ctype.h>, "gdb_vecs.h".
7225 (debug_threads): Moved to debug.c.
7226 (*): Update all debugging printfs to use debug_printf instead of
7227 fprintf.
7228 (start_inferior): Replace call to fflush with call to debug_flush.
7229 (monitor_show_help): Mention set debug-format.
7230 (parse_debug_format_options): New function.
7231 (handle_monitor_command): Handle "monitor set debug-format".
7232 (gdbserver_usage): Mention --debug-format.
7233 (main): Parse --debug-format.
7234 * server.h (debug_threads): Declaration moved to debug.h.
7235 #include "debug.h".
7236 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7237 trace_debug_1 that uses debug_printf.
7238 (tracepoint_look_up_symbols): Update all debugging printfs to use
7239 debug_printf instead of fprintf.
7240
e671835b
BS
72412014-01-20 Baruch Siach <baruch@tkos.co.il>
7242
7243 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7244 sys/ptrace.h.
7245
b5737fa9
PA
72462014-01-17 Pedro Alves <palves@redhat.com>
7247
ea38d2a9 7248 PR build/16445
c7faa97a
PA
7249 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7250 defined after including gdb_proc_service.h.
b5737fa9 7251
40ed484e
DE
72522014-01-16 Doug Evans <dje@google.com>
7253
7254 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7255 (match_dll): Use it.
7256
969c39fb
MM
72572014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7258
7259 * target.h (target_ops) <read_btrace>: Change parameters and
7260 return type to allow error reporting.
7261 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7262 trace reading errors on.
7263 * linux-low.c (linux_low_read_btrace): Pass trace reading
7264 errors on.
7265 (linux_low_disable_btrace): New.
7266
ab7f45ba
DE
72672014-01-15 Doug Evans <dje@google.com>
7268
7269 * inferiors.c (thread_id_to_gdb_id): Delete.
7270 * inferiors.h (thread_id_to_gdb_id): Delete.
7271
66af0f44
EZ
72722014-01-13 Eli Zaretskii <eliz@gnu.org>
7273
7274 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7275 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7276 versions.
7277
9939e131
PA
72782014-01-08 Pedro Alves <palves@redhat.com>
7279
7280 * server.c (handle_status): Don't discard previous queued stop
7281 replies or thread's pending status here.
7282 (main) <disconnection>: Do it here instead.
7283
b7ea362b
PA
72842014-01-08 Pedro Alves <palves@redhat.com>
7285
7286 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7287 * server.c (visit_actioned_threads, handle_pending_status): New
7288 function.
7289 (handle_v_cont): Factor out parts to ...
7290 (resume): ... this new function. If in all-stop, and a thread
7291 being resumed has a pending status, report it without actually
7292 resuming.
7293 (myresume): Adjust to use the new 'resume' function.
7294 (clear_pending_status_callback, set_pending_status_callback)
7295 (find_status_pending_thread_callback): New functions.
7296 (handle_status): Handle the case of multiple threads having
7297 interesting statuses to report. Report threads' real last signal
7298 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7299 with an interesting thread to report the status for, instead of
7300 always reporting the status of the first thread.
7301
28498c42
JB
73022014-01-01 Joel Brobecker <brobecker@adacore.com>
7303
7304 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7305 * gdbreplay.c (gdbreplay_version): Likewise.
7306
f45c82da
YZ
73072013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7308
7309 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7310 iov.iov_len with the real length in use.
7311
379a5e2d
JB
73122013-12-13 Joel Brobecker <brobecker@adacore.com>
7313
7314 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7315 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7316 for all targets that use win32-low.c.
7317 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7318 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7319
4210d83e
PA
73202013-12-13 Pedro Alves <palves@redhat.com>
7321
7322 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7323 if equal to TARGET_WAITKIND_LOADED.
7324 * win32-low.c (cached_status): New static global.
7325 (win32_wait): Add declaration.
7326 (do_initial_child_stuff): Flush all initial pending debug events
7327 up to the initial breakpoint.
7328 (win32_wait): If CACHED_STATUS was set, return that instead
7329 of doing a real wait. Remove the code resuming the execution
7330 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7331 during the initial phase. Also remove the code changing
7332 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7333 TARGET_WAITKIND_STOPPED.
7334
e7f0d979
YQ
73352013-12-11 Yao Qi <yao@codesourcery.com>
7336
7337 * notif.c (handle_notif_ack): Return 0 if no notification
7338 matches.
7339
ebcf782c
DE
73402013-11-20 Doug Evans <dje@google.com>
7341
7342 * linux-low.c (linux_set_resume_request): Fix comment.
7343
20ad9378
DE
73442013-11-20 Doug Evans <dje@google.com>
7345
7346 * linux-low.c (resume_status_pending_p): Tweak comment.
7347
a196ebeb
WT
73482013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7349
7350 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7351 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7352 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7353 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7354 (srv_amd64_regobj): Add amd64-mpx.o.
7355 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7356 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7357 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7358 * i387-fp.c (num_pl_bnd_register) Added constant.
7359 (num_pl_bnd_cfg_registers) Added constant.
7360 (struct i387_xsave) Added reserved area and MPX fields.
7361 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7362 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7363 function.
7364 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7365 (init_registers_amd64_mpx_linux): Declare new function.
7366 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7367 (x86_64_regmap): Add MPX registers.
7368 (x86_linux_read_description): Add MPX case.
7369 (initialize_low_arch): Initialize MPX targets.
7370
0080a2f6
TT
73712013-11-18 Tom Tromey <tromey@redhat.com>
7372
7373 * configure: Rebuild.
7374 * configure.ac: Don't check for stdlib.h.
7375 * gdbreplay.c: Unconditionally include stdlib.h.
7376
2978b111
TT
73772013-11-18 Tom Tromey <tromey@redhat.com>
7378
7379 * config.in: Rebuild.
7380 * configure: Rebuild.
7381 * configure.ac: Don't use AC_HEADER_DIRENT.
7382
a3d08894
TT
73832013-11-18 Tom Tromey <tromey@redhat.com>
7384
7385 * server.h: Don't check HAVE_STRING_H.
7386 * gdbreplay.c: Don't check HAVE_STRING_H.
7387 * configure: Rebuild.
7388
0a5dd17d
TT
73892013-11-18 Tom Tromey <tromey@redhat.com>
7390
7391 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7392 LIBGNU.
7393
1bd2f0ba
TT
73942013-11-08 Tom Tromey <tromey@redhat.com>
7395
7396 * configure, config.in: Rebuild.
7397 * configure.ac: Remove unused configury.
7398
3266f10b
TT
73992013-11-08 Tom Tromey <tromey@redhat.com>
7400
7401 * acinclude.m4: Include common.m4, codeset.m4.
7402 * configure, config.in: Rebuild.
7403 * configure.ac: Use GDB_AC_COMMON.
7404
6682d959
AA
74052013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7406
7407 * linux-s390-low.c (HWCAP_S390_TE): New define.
7408 (s390_arch_setup): Consider the TE field in the HWCAP for
7409 determining 'have_regset_tdb'.
7410
fd0a4d76
SDJ
74112013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7412
7413 PR gdb/16014
7414 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7415 call to sizeof.
7416
1a3d890b
PA
74172013-10-02 Pedro Alves <palves@redhat.com>
7418
7419 * server.c (process_serial_event): Don't output "GDBserver
7420 exiting" if GDB is connected through stdio.
7421 * target.c (mywait): Likewise, be silent if GDB is connected
7422 through stdio.
7423
97ad4581
JB
74242013-10-01 Joel Brobecker <brobecker@adacore.com>
7425
7426 * lynx-low.c (lynx_add_threads_after_attach): New function.
7427 (lynx_attach): Remove call to add_thread. Add call to
7428 lynx_add_threads_after_attach instead.
7429
5b4e221c
MF
74302013-09-28 Mike Frysinger <vapier@gentoo.org>
7431
7432 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7433 * config.in, configure: Regenerated.
7434
ee47b2f8
YQ
74352013-09-18 Yao Qi <yao@codesourcery.com>
7436
7437 PR server/15959
7438 * server.c (start_inferior): Clear 'resume_info'.
7439
d6707650 74402013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7441
d6707650
JW
7442 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7443 for each register.
7444
9243dd0e 74452013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7446
9243dd0e
JW
7447 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7448 linux-tile-low.o to srv_tgtobj.
7449
c623a6ef
WN
74502013-09-16 Will Newton <will.newton@linaro.org>
7451
7452 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7453 out regs.
7454
fb71d39e
PA
74552013-09-06 Pedro Alves <palves@redhat.com>
7456
7457 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7458 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7459 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7460 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7461 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7462 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7463
8e7e9910
PA
74642013-09-06 Pedro Alves <palves@redhat.com>
7465
7466 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7467 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7468
7c3a12ca
PA
74692013-09-06 Pedro Alves <palves@redhat.com>
7470
7471 * linux-amd64-ipa.c: Include tracepoint.h.
7472 * linux-i386-ipa.c: Include tracepoint.h.
7473
8eb3d7b6
RW
74742013-09-06 Ricard Wanderlof <ricardw@axis.com>
7475
7476 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7477 (ps_get_thread_area): New function.
7478
eddddb9d
RW
74792013-09-06 Ricard Wanderlof <ricardw@axis.com>
7480
7481 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7482 (initialize_low_arch): Call init_registers_crisv32 rather than
7483 init_register_crisv32.
7484
533b0600
PA
74852013-09-05 Pedro Alves <palves@redhat.com>
7486
7487 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7488 to ...
7489 * hostio.h: ... this new file.
7490 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7491 win32-low.c: Include hostio.h.
7492
0ce3d3b5
PA
74932013-09-05 Pedro Alves <palves@redhat.com>
7494
7495 * server.h (gdb_client_data, handler_func, callback_handler_func)
7496 (delete_file_handler, add_file_handler, append_callback_event)
7497 (delete_callback_event, start_event_loop, initialize_event_loop):
7498 Move to event-loop.h and include it.
7499 * event-loop.h: New file.
7500
799cdc37
PA
75012013-09-05 Pedro Alves <palves@redhat.com>
7502
7503 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7504 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7505 (loaded_dll, unloaded_dll): Move to ...
7506 * dll.h: ... this new file.
7507 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7508
6a6bbd9d
PA
75092013-09-05 Pedro Alves <palves@redhat.com>
7510
7511 * server.h (current_process, get_thread_process, all_processes)
7512 (add_inferior_to_list, for_each_inferior, current_inferior)
7513 (remove_inferior, add_process, remove_process, find_process_pid)
7514 (have_started_inferiors_p, have_attached_inferiors_p)
7515 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7516 (clear_inferiors, find_inferior, find_inferior_id)
7517 (inferior_target_data, set_inferior_target_data)
7518 (inferior_regcache_data, set_inferior_regcache_data): Move to
7519 inferiors.h, and include it.
7520 * inferiors.h: New file.
7521
f699aaba
PA
75222013-09-05 Pedro Alves <palves@redhat.com>
7523
7524 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7525 Move ...
72f4393d 7526 * ax.h: ... here.
f699aaba 7527
c144c7a0
PA
75282013-09-05 Pedro Alves <palves@redhat.com>
7529
7530 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7531 tracepoint.h.
7532 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7533 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7534 (handle_tracepoint_general_set, handle_tracepoint_query)
7535 (tracepoint_finished_step, tracepoint_was_hit)
7536 (release_while_stepping_state_list, current_traceframe)
7537 (in_readonly_region, traceframe_read_mem)
7538 (fetch_traceframe_registers, traceframe_read_sdata)
7539 (traceframe_read_info, struct fast_tpoint_collect_status)
7540 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7541 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7542 (supply_fast_tracepoint_registers)
7543 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7544 (ipa_tdesc, claim_trampoline_space)
7545 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7546 (agent_mem_read, agent_get_trace_state_variable_value)
7547 (agent_set_trace_state_variable_value, agent_tsv_read)
7548 (agent_mem_read_string, get_raw_reg_func_addr)
7549 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7550 * tracepoint.h: ... this new file.
7551
ff42e6ab
PA
75522013-09-05 Pedro Alves <palves@redhat.com>
7553
7554 * server.h (perror_with_name, error, fatal, warning, paddress)
7555 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7556 include it.
7557 * utils.h: New file.
7558
541af0f4
PA
75592013-09-05 Pedro Alves <palves@redhat.com>
7560
7561 * server.h (remote_debug, noack_mode, transport_is_reliable)
7562 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7563 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7564 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7565 (write_enn, initialize_async_io, enable_async_io)
7566 (disable_async_io, check_remote_input_interrupt_request)
7567 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7568 (dead_thread_notify, prepare_resume_reply)
7569 (decode_address_to_semicolon, decode_address, decode_m_packet)
7570 (decode_M_packet, decode_X_packet, decode_xfer_write)
7571 (decode_search_memory_packet, unhexify, hexify)
7572 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7573 (look_up_one_symbol, relocate_instruction)
7574 (monitor_output): Move to remote-utils.h, and include it.
7575 * remote-utils.h: New file.
7576
eebdf26b
PA
75772013-09-05 Pedro Alves <palves@redhat.com>
7578
7579 * server.h (_): Delete.
7580
3aafd2ff
PA
75812013-09-02 Pedro Alves <palves@redhat.com>
7582
7583 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7584 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7585 allocated.
7586 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7587
cee83bcb
PM
75882013-09-02 Pierre Muller <muller@sourceware.org>
7589
7590 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7591 or WriteProcessMemory complete successfully and handle
7592 ERROR_PARTIAL_COPY error.
7593
9a13b2fa
PA
75942013-09-02 Pedro Alves <palves@redhat.com>
7595
7596 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7597 error instead of EIO.
7598
602e3198
JK
75992013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7600
7601 PR server/15604
7602 * linux-low.c: Include filestuff.h.
7603 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7604 * lynx-low.c: Include filestuff.h.
7605 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7606 * server.c: Include filestuff.h.
7607 (main): Call notice_open_fds.
7608 * spu-low.c: Include filestuff.h.
7609 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7610
96d7229d
LM
76112013-08-22 Luis Machado <lgustavo@codesourcery.com>
7612
7613 * Makefile.in: Explain why ../target and ../nat are not
7614 listed as include file search paths.
7615 (linux-waitpid.o): New object file rule.
7616 * configure.srv (srv_native_linux_obj): New variable.
7617 Replace all occurrences of linux native object files with
7618 $srv_native_linux_obj.
7619 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7620 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7621 (linux_enable_event_reporting): Remove declaration.
7622 (my_waitpid): Moved to common/linux-waitpid.c.
7623 (linux_wait_for_event): Pass ptid when calling
7624 linux_enable_event_reporting.
7625 (linux_supports_tracefork_flag): Remove.
7626 (linux_enable_event_reporting): Likewise.
7627 (linux_tracefork_grandchild): Remove.
7628 (STACK_SIZE): Moved to common/linux-ptrace.c.
7629 (linux_tracefork_child): Remove.
7630 (linux_test_for_tracefork): Remove.
7631 (linux_look_up_symbols): Call linux_supports_traceclone.
7632 (initialize_low): Remove call to linux_test_for_tracefork.
7633 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7634 common/linux-ptrace.h.
7635 (PTRACE_TYPE_ARG4): Likewise.
7636 Include linux-ptrace.h.
7637
32940073
PA
76382013-08-21 Pedro Alves <palves@redhat.com>
7639
7640 * config.in: Renegerate.
7641
33b60d58 76422013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7643
33b60d58
LM
7644 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7645 (SFILES): Remove $(srcdir)/common/target-common.c and
7646 add $(srcdir)/target/waitstatus.c.
7647 (OBS): Remove target-common.o and add waitstatus.o.
7648 (server_h): Remove $(srcdir)/../common/target-common.h and
7649 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7650 and $(srcdir)/../target/waitstatus.h.
7651 (target-common.o): Remove.
7652 (waitstatus.o): New target object file.
7653 * target.h: Do not include target-common.h and
7654 include target/resume.h, target/wait.h and
7655 target/waitstatus.h.
7656
b8e1b30e
LM
76572013-08-13 Luis Machado <lgustavo@codesourcery.com>
7658
7659 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7660 to PTRACE_TYPE_ARG3.
7661 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7662 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7663 PTRACE_TYPE_ARG4.
7664 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7665 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7666
7a60ad40
YQ
76672013-07-27 Jie Zhang <jie@codesourcery.com>
7668 Daniel Jacobowitz <dan@codesourcery.com>
7669 Yao Qi <yao@codesourcery.com>
7670
7671 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7672 (mips-linux-watch.o): New rule.
7673 (mips_linux_watch_h): New variable.
7674 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7675 srv_tgtobj.
7676 * linux-mips-low.c: Include mips-linux-watch.h.
7677 (struct arch_process_info, struct arch_lwp_info): New.
7678 (update_watch_registers_callback): New function.
7679 (mips_linux_new_process, mips_linux_new_thread) New functions.
7680 (mips_linux_prepare_to_resume, mips_insert_point): New
7681 functions.
7682 (mips_remove_point, mips_stopped_by_watchpoint): New
7683 functions.
7684 (rsp_bp_type_to_target_hw_bp_type): New function.
7685 (mips_stopped_data_address): New function.
7686 (the_low_target): Add watchpoint support functions.
7687
de6f69ad
YQ
76882013-07-27 Yao Qi <yao@codesourcery.com>
7689
7690 * i386-low.c: Include break-common.h.
7691 (enum target_hw_bp_type): Remove.
7692
3360c0bf
LM
76932013-07-24 Luis Machado <lgustavo@codesourcery.com>
7694
7695 * Makefile.in (SFILES): /common/target-common.c.
7696 (OBS): Add target-common.o.
7697 (server_h): Add $(srcdir)/../common/target-common.h.
7698 (target-common.o): New target.
7699 * server.c (queue_stop_reply_callback): Free
7700 status string after use.
7701 * target.c (target_waitstatus_to_string): Remove.
7702 * target.h: Include target-common.h.
7703 (resume_kind): Likewise.
7704 (target_waitkind): Likewise.
7705 (target_waitstatus): Likewise.
7706 (TARGET_WNOHANG): Likewise.
7707
bd885420
YQ
77082013-07-04 Yao Qi <yao@codesourcery.com>
7709
7710 * Makefile.in (host_alias): Use @host_noncanonical@.
7711 (target_alias): Use @target_noncanonical@.
7712 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7713 ACX_NONCANONICAL_HOST.
7714 * configure: Regenerated.
7715
7716 Revert:
7717 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7718
7719 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7720 * configure: Rebuild.
7721 * Makefile.in (version_host, version_target): Get from configure.
7722 (version.c): Use $(version_host) and $(version_target).
7723
17ef446e
PA
77242013-07-03 Pedro Alves <palves@redhat.com>
7725
7726 * Makefile.in (config.status): Depend on development.sh.
7727 * acinclude.m4: Include libmcheck.m4.
7728 * configure: Regenerate.
7729
7a9a7487
MG
77302013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7731
7732 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7733 attribute inside the parentheses.
7734 (winapi_DebugSetProcessKillOnExit): Ditto.
7735 (winapi_DebugBreakProcess): Ditto.
7736 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7737
49b64de6
MG
77382013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7739
7740 * notif.h (notif_event): Add a dummy member to avoid compiler
7741 errors.
7742
d5749ee7
PA
77432013-07-01 Pedro Alves <palves@redhat.com>
7744
7745 * hostio.c (HOSTIO_PATH_MAX): Define.
7746 (require_filename, handle_open, handle_unlink, handle_readlink):
7747 Use it.
7748
d8d2a3ee
PA
77492013-07-01 Pedro Alves <palves@redhat.com>
7750
7751 * server.h: Include "pathmax.h".
7752 * linux-low.c: Don't include sys/param.h.
7753 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7754 MAXPATHLEN.
7755 * win32-low.c: Don't include sys/param.h.
7756 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7757
bc7dea8d
PA
77582013-07-01 Pedro Alves <palves@redhat.com>
7759
7760 * event-loop.c: Don't check HAVE_UNISTD_H before including
7761 <unistd.h>.
7762 * gdbreplay.c: Likewise.
7763 * remote-utils.c: Likewise.
7764 * server.c: Likewise.
7765 * configure.ac: Don't check for unistd.h.
7766 * configure: Regenerate.
7767
d6c2da54
TT
77682013-06-28 Tom Tromey <tromey@redhat.com>
7769
7770 * Makefile.in (version.c): Use version.in, not
7771 common/version.in.
7772
257b6bec
MG
77732013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7774
7775 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7776 * configure: Rebuild.
7777 * Makefile.in (version_host, version_target): Get from configure.
7778 (version.c): Use $(version_host) and $(version_target).
7779
86ebe149
DK
77802013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7781
7782 Fix trace-status to output user name without trailing colon.
7783 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7784
f30aa5af
DK
77852013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7786
7787 Fix trace-status to output proper start-time and stop-time.
7788 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7789 output start time and stop time in hex as gdb expects.
7790
28a93511
YQ
77912013-06-26 Pedro Alves <pedro@codesourcery.com>
7792
7793 * tracepoint.c (build_traceframe_info_xml): Output trace state
7794 variables present in the trace buffer.
7795
01208463
TT
77962013-06-24 Tom Tromey <tromey@redhat.com>
7797
7798 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7799 create-version.sh.
7800 (version.o): Remove.
7801 * gdbreplay.c: Include version.h.
7802 (version, host_name): Don't declare.
7803 * server.h: Include version.h.
7804 (version, host_name): Don't declare.
7805
760256f9
PA
78062013-06-12 Pedro Alves <palves@redhat.com>
7807
7808 * linux-x86-low.c (linux_is_elf64): Delete global.
7809 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7810 with local linux_pid_exe_is_elf_64_file use.
7811
030031ee
PA
78122013-06-11 Pedro Alves <palves@redhat.com>
7813
7814 * linux-low.c (regset_disabled, disable_regset): New functions.
7815 (regsets_fetch_inferior_registers)
7816 (regsets_store_inferior_registers): Use them.
7817 (initialize_regsets_info); Don't allocate the disabled_regsets
7818 array here.
7819 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7820 comment.
7821
5da6eb0a
PA
78222013-06-11 Pedro Alves <palves@redhat.com>
7823
7824 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7825 xmalloc.
7826
7e5aaa09
PA
78272013-06-11 Pedro Alves <palves@redhat.com>
7828
7829 * linux-x86-low.c (initialize_low_arch): Call
7830 init_registers_x32_avx_linux.
7831
d878444c
JK
78322013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7833
7834 Fix compatibility with Android Bionic.
7835 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7836 it is not empty.
7837
3aee8918
PA
78382013-06-07 Pedro Alves <palves@redhat.com>
7839
5f2b57b5 7840 PR server/14823
3aee8918
PA
7841 * Makefile.in (OBS): Add tdesc.o.
7842 (IPA_OBJS): Add tdesc-ipa.o.
7843 (tdesc-ipa.o): New rule.
7844 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7845 interface.
7846 * linux-low.c (new_inferior): Delete.
7847 (disabled_regsets, num_regsets): Delete.
7848 (linux_add_process): Adjust to set the new per-process
7849 new_inferior flag.
7850 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7851 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7852 was a stop. When calling arch_setup, switch the current inferior
7853 to the thread that got an event.
7854 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7855 (regsets_fetch_inferior_registers)
7856 (regsets_store_inferior_registers): New regsets_info parameter.
7857 Adjust to use it.
7858 (linux_register_in_regsets): New regs_info parameter. Adjust to
7859 use it.
7860 (register_addr, fetch_register, store_register): New usrregs_info
7861 parameter. Adjust to use it.
7862 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7863 parameter regs_info. Adjust to use it.
7864 (linux_fetch_registers): Get the current inferior's regs_info, and
7865 adjust to use it.
7866 (linux_store_registers): Ditto.
7867 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7868 (initialize_low): Don't initialize the target_regsets here. Call
7869 initialize_low_arch.
7870 * linux-low.h (target_regsets): Delete declaration.
7871 (struct regsets_info): New.
7872 (struct usrregs_info): New.
7873 (struct regs_info): New.
7874 (struct process_info_private) <new_inferior>: New field.
7875 (struct linux_target_ops): Delete the num_regs, regmap, and
7876 regset_bitmap fields. New field regs_info.
7877 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7878 * i387-fp.c (num_xmm_registers): Delete.
7879 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7880 calls to new interface.
7881 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7882 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7883 Infer the number of xmm registers from the regcache's target
7884 description.
7885 * i387-fp.h (num_xmm_registers): Delete.
7886 * inferiors.c (add_thread): Don't install the thread's regcache
7887 here.
7888 * proc-service.c (gregset_info): Fetch the current inferior's
7889 regs_info. Adjust to use it.
7890 * regcache.c: Include tdesc.h.
7891 (register_bytes, reg_defs, num_registers)
7892 (gdbserver_expedite_regs): Delete.
7893 (get_thread_regcache): If the thread doesn't have a regcache yet,
7894 create one, instead of aborting gdbserver.
7895 (regcache_invalidate_one): Rename to ...
7896 (regcache_invalidate_thread): ... this.
7897 (regcache_invalidate_one): New.
7898 (regcache_invalidate): Only invalidate registers of the current
7899 process.
7900 (init_register_cache): Add target_desc parameter, and use it.
7901 (new_register_cache): Ditto. Assert the target description has a
7902 non zero registers_size.
7903 (regcache_cpy): Add assertions. Adjust.
7904 (realloc_register_cache, set_register_cache): Delete.
7905 (registers_to_string, registers_from_string): Adjust.
7906 (find_register_by_name, find_regno, find_register_by_number)
7907 (register_cache_size): Add target_desc parameter, and use it.
7908 (free_register_cache_thread, free_register_cache_thread_one)
7909 (regcache_release, register_cache_size): New.
7910 (register_size): Add target_desc parameter, and use it.
7911 (register_data, supply_register, supply_register_zeroed)
7912 (supply_regblock, supply_register_by_name, collect_register)
7913 (collect_register_as_string, collect_register_by_name): Adjust.
7914 * regcache.h (struct target_desc): Forward declare.
7915 (struct regcache) <tdesc>: New field.
7916 (init_register_cache, new_register_cache): Add target_desc
7917 parameter.
7918 (regcache_invalidate_thread): Declare.
7919 (regcache_invalidate_one): Delete declaration.
7920 (regcache_release): Declare.
7921 (find_register_by_number, register_cache_size, register_size)
7922 (find_regno): Add target_desc parameter.
7923 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7924 declarations.
7925 * remote-utils.c: Include tdesc.h.
7926 (outreg, prepare_resume_reply): Adjust.
7927 * server.c: Include tdesc.h.
7928 (gdbserver_xmltarget): Delete declaration.
7929 (get_features_xml, process_serial_event): Adjust.
7930 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7931 declare.
7932 (struct process_info) <tdesc>: New field.
7933 (ipa_tdesc): Declare.
7934 * tdesc.c: New file.
7935 * tdesc.h: New file.
7936 * tracepoint.c: Include tdesc.h.
7937 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7938 (get_context_regcache): Adjust to pass ipa_tdesc down.
7939 (do_action_at_tracepoint): Adjust to get the register cache size
7940 from the context regcache's description.
7941 (traceframe_walk_blocks): Adjust to get the register cache size
7942 from the current trace frame's description.
7943 (traceframe_get_pc): Adjust to get current trace frame's
7944 description and pass it down.
7945 (gdb_collect): Adjust to get the register cache size from the
7946 IPA's description.
7947 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7948 (gdbserver_xmltarget): Delete.
7949 (initialize_low_tracepoint): Set the ipa's target description.
7950 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7951 (initialize_low_tracepoint): Set the ipa's target description.
7952 * linux-x86-low.c: Include tdesc.h.
7953 [__x86_64__] (is_64bit_tdesc): New.
7954 (ps_get_thread_area, x86_get_thread_area): Use it.
7955 (i386_cannot_store_register): Rename to ...
7956 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7957 (i386_cannot_fetch_register): Rename to ...
7958 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7959 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7960 to new interface.
7961 (target_regsets): Rename to ...
7962 (x86_regsets): ... this.
7963 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7964 interface.
7965 (x86_siginfo_fixup): Use is_64bit_tdesc.
7966 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7967 (tdesc_x32_avx_linux, tdesc_x32_linux)
7968 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7969 Declare.
7970 (x86_linux_update_xmltarget): Delete.
7971 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7972 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7973 (AMD64_LINUX_USER64_CS): New.
7974 (x86_linux_read_description): New, based on
7975 x86_linux_update_xmltarget.
7976 (same_process_callback): New.
7977 (x86_arch_setup_process_callback): New.
7978 (x86_linux_update_xmltarget): New.
7979 (x86_regsets_info): New.
7980 (amd64_linux_regs_info): New.
7981 (i386_linux_usrregs_info): New.
7982 (i386_linux_regs_info): New.
7983 (x86_linux_regs_info): New.
7984 (x86_arch_setup): Reimplement.
7985 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7986 (x86_emit_ops): Ditto.
7987 (the_low_target): Adjust. Install x86_linux_regs_info,
7988 x86_cannot_fetch_register, and x86_cannot_store_register.
7989 (initialize_low_arch): New.
7990 * linux-ia64-low.c (tdesc_ia64): Declare.
7991 (ia64_fetch_register): Adjust.
7992 (ia64_usrregs_info, regs_info): New globals.
7993 (ia64_regs_info): New function.
7994 (the_low_target): Adjust.
7995 (initialize_low_arch): New function.
7996 * linux-sparc-low.c (tdesc_sparc64): Declare.
7997 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7998 Adjust.
7999 (sparc_arch_setup): New function.
8000 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8001 (the_low_target): Adjust.
8002 (initialize_low_arch): New function.
8003 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8004 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8005 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8006 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8007 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8008 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8009 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8010 (tdesc_powerpc_isa205_vsx64l): Declare.
8011 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8012 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8013 (ppc_set_pc, ppc_get_hwcap): Adjust.
8014 (ppc_usrregs_info): Forward declare.
8015 (!__powerpc64__) ppc_regmap_adjusted: New global.
8016 (ppc_arch_setup): Adjust to the current process'es target
8017 description.
8018 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8019 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8020 (ppc_store_evrregset): Adjust.
8021 (target_regsets): Rename to ...
8022 (ppc_regsets): ... this, and make static.
8023 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8024 (ppc_regs_info): New function.
8025 (the_low_target): Adjust.
8026 (initialize_low_arch): New function.
8027 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8028 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8029 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8030 (tdesc_s390x_linux64v2): Declare.
8031 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8032 (s390_fill_gregset, s390_store_last_break): Adjust.
8033 (target_regsets): Rename to ...
8034 (s390_regsets): ... this, and make static.
8035 (s390_get_pc, s390_set_pc): Adjust.
8036 (s390_get_hwcap): New target_desc parameter, and use it.
8037 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8038 (s390_arch_setup): Adjust to set the current process'es target
8039 description. Don't adjust the regmap.
8040 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8041 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8042 (regs_info_3264): New globals.
8043 (s390_regs_info): New function.
8044 (the_low_target): Adjust.
8045 (initialize_low_arch): New function.
8046 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8047 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8048 [__mips64] (init_registers_mips_linux)
8049 (init_registers_mips_dsp_linux): Delete defines.
8050 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8051 (have_dsp): New global.
8052 (mips_read_description): New, based on mips_arch_setup.
8053 (mips_arch_setup): Reimplement.
8054 (get_usrregs_info): New function.
8055 (mips_cannot_fetch_register, mips_cannot_store_register)
8056 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8057 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8058 (target_regsets): Rename to ...
8059 (mips_regsets): ... this, and make static.
8060 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8061 (dsp_regs_info, regs_info): New globals.
8062 (mips_regs_info): New function.
8063 (the_low_target): Adjust.
8064 (initialize_low_arch): New function.
8065 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8066 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8067 Declare.
8068 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8069 (arm_read_description): New, with bits factored from
8070 arm_arch_setup.
8071 (arm_arch_setup): Reimplement.
8072 (target_regsets): Rename to ...
8073 (arm_regsets): ... this, and make static.
8074 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8075 (arm_regs_info): New function.
8076 (the_low_target): Adjust.
8077 (initialize_low_arch): New function.
8078 * linux-m68k-low.c (tdesc_m68k): Declare.
8079 (target_regsets): Rename to ...
8080 (m68k_regsets): ... this, and make static.
8081 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8082 (m68k_regs_info): New function.
8083 (m68k_arch_setup): New function.
8084 (the_low_target): Adjust.
8085 (initialize_low_arch): New function.
8086 * linux-sh-low.c (tdesc_sharch): Declare.
8087 (target_regsets): Rename to ...
8088 (sh_regsets): ... this, and make static.
8089 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8090 (sh_regs_info, sh_arch_setup): New functions.
8091 (the_low_target): Adjust.
8092 (initialize_low_arch): New function.
8093 * linux-bfin-low.c (tdesc_bfin): Declare.
8094 (bfin_arch_setup): New function.
8095 (bfin_usrregs_info, regs_info): New globals.
8096 (bfin_regs_info): New function.
8097 (the_low_target): Adjust.
8098 (initialize_low_arch): New function.
8099 * linux-cris-low.c (tdesc_cris): Declare.
8100 (cris_arch_setup): New function.
8101 (cris_usrregs_info, regs_info): New globals.
8102 (cris_regs_info): New function.
8103 (the_low_target): Adjust.
8104 (initialize_low_arch): New function.
8105 * linux-cris-low.c (tdesc_crisv32): Declare.
8106 (cris_arch_setup): New function.
8107 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8108 (cris_regs_info): New function.
8109 (the_low_target): Adjust.
8110 (initialize_low_arch): New function.
8111 * linux-m32r-low.c (tdesc_m32r): Declare.
8112 (m32r_arch_setup): New function.
8113 (m32r_usrregs_info, regs_info): New globals.
8114 (m32r_regs_info): Adjust.
8115 (initialize_low_arch): New function.
8116 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8117 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8118 (tic6x_usrregs_info): Forward declare.
8119 (tic6x_read_description): New function, based on ...
8120 (tic6x_arch_setup): ... this. Reimplement.
8121 (target_regsets): Rename to ...
8122 (tic6x_regsets): ... this, and make static.
8123 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8124 (tic6x_regs_info): New function.
8125 (the_low_target): Adjust.
8126 (initialize_low_arch): New function.
8127 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8128 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8129 (target_regsets): Rename to ...
8130 (xtensa_regsets): ... this, and make static.
8131 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8132 globals.
8133 (xtensa_arch_setup, xtensa_regs_info): New functions.
8134 (the_low_target): Adjust.
8135 (initialize_low_arch): New function.
8136 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8137 (nios2_arch_setup): Set the current process'es tdesc.
8138 (target_regsets): Rename to ...
8139 (nios2_regsets): ... this.
8140 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8141 (nios2_regs_info): New function.
8142 (the_low_target): Adjust.
8143 (initialize_low_arch): New function.
a261b8f5
PA
8144 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8145 (aarch64_arch_setup): Set the current process'es tdesc.
8146 (target_regsets): Rename to ...
8147 (aarch64_regsets): ... this.
8148 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8149 (aarch64_regs_info): New function.
8150 (the_low_target): Adjust.
8151 (initialize_low_arch): New function.
3aee8918
PA
8152 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8153 globals.
8154 (target_regsets): Rename to ...
8155 (tile_regsets): ... this.
8156 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8157 (tile_regs_info): New function.
8158 (tile_arch_setup): Set the current process'es tdesc.
8159 (the_low_target): Adjust.
8160 (initialize_low_arch): New function.
8161 * spu-low.c (tdesc_spu): Declare.
8162 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8163 * win32-arm-low.c (tdesc_arm): Declare.
8164 (arm_arch_setup): New function.
8165 (the_low_target): Install arm_arch_setup instead of
8166 init_registers_arm.
8167 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8168 (init_windows_x86): Rename to ...
8169 (i386_arch_setup): ... this. Set `win32_tdesc'.
8170 (the_low_target): Adjust.
8171 * win32-low.c (win32_tdesc): New global.
8172 (child_add_thread): Don't create the thread cache here.
8173 (do_initial_child_stuff): Set the new process'es tdesc.
8174 * win32-low.h (struct target_desc): Forward declare.
8175 (win32_tdesc): Declare.
8176 * lynx-i386-low.c (tdesc_i386): Declare global.
8177 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8178 * lynx-low.c (lynx_tdesc): New global.
8179 (lynx_add_process): Set the new process'es tdesc.
8180 * lynx-low.h (struct target_desc): Forward declare.
8181 (lynx_tdesc): Declare global.
8182 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8183 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8184 * nto-low.c (nto_tdesc): New global.
8185 (do_attach): Set the new process'es tdesc.
8186 * nto-low.h (struct target_desc): Forward declare.
8187 (nto_tdesc): Declare.
8188 * nto-x86-low.c (tdesc_i386): Declare.
8189 (nto_x86_arch_setup): Set `nto_tdesc'.
8190
b1fbec62
GB
81912013-06-04 Gary Benson <gbenson@redhat.com>
8192
8193 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8194 to qSupported response when appropriate.
8195 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8196 with nonzero-length annex.
8197 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8198 arguments supplied in annex.
8199
d1ec4ce7
DE
82002013-05-31 Doug Evans <dje@google.com>
8201
ac44adcb 8202 PR server/15594
d1ec4ce7
DE
8203 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8204 64 bits in 64-cross-32 environment.
8205
9b25f2d3
PA
82062013-05-28 Pedro Alves <palves@redhat.com>
8207
8208 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8209 (aarch64-without-fpu.c): Delete rule.
8210 * configure.srv (aarch64*-*-linux*): Remove references to
8211 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8212 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8213 declaration.
8214
6740dc9c
PA
82152013-05-24 Pedro Alves <palves@redhat.com>
8216
8217 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8218 instead of strchr/decode_address. Error if the range isn't split
8219 with a ','. Don't assume there's be a ':' in the action.
8220
c2d6af84
PA
82212013-05-23 Yao Qi <yao@codesourcery.com>
8222 Pedro Alves <palves@redhat.com>
8223
8224 * linux-low.c (lwp_in_step_range): New function.
8225 (linux_wait_1): If the thread was range stepping and stopped
8226 outside the stepping range, report the stop to GDB. Otherwise,
8227 continue stepping. Add range stepping debug output.
8228 (linux_set_resume_request): Copy the step range from the resume
8229 request to the lwp.
8230 (linux_supports_range_stepping): New.
8231 (linux_target_ops) <supports_range_stepping>: Set to
8232 linux_supports_range_stepping.
8233 * linux-low.h (struct linux_target_ops)
8234 <supports_range_stepping>: New field.
8235 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8236 * linux-x86-low.c (x86_supports_range_stepping): New.
8237 (the_low_target) <supports_range_stepping>: Set to
8238 x86_supports_range_stepping.
8239 * server.c (handle_v_cont): Handle 'r' action.
8240 (handle_v_requests): Append ";r" if the target supports range
8241 stepping.
8242 * target.h (struct thread_resume) <step_range_start,
8243 step_range_end>: New fields.
8244 (struct target_ops) <supports_range_stepping>:
8245 New field.
8246 (target_supports_range_stepping): New macro.
8247
58794e1a
JB
82482013-05-17 Joel Brobecker <brobecker@adacore.com>
8249
8250 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8251 confusion in comment.
8252
d631c5a7
JB
82532013-05-17 Joel Brobecker <brobecker@adacore.com>
8254
8255 * lynx-low.c (struct process_info_private): New type.
8256 (lynx_add_process): New function.
8257 (lynx_create_inferior, lynx_attach): Replace calls to
8258 add_process by calls to lynx_add_process.
8259 (lynx_resume): If PTID is null, then try using
8260 current_process()->private->last_wait_event_ptid.
8261 Add comments.
8262 (lynx_clear_inferiors): Delete. The contents of that function
8263 has been inlined in lynx_mourn;
8264 (lynx_wait_1): Save the ptid in the process's private data.
8265 (lynx_mourn): Free the process' private data. Replace call
8266 to lynx_clear_inferiors by call to clear_inferiors.
8267
96f7a20f
YQ
82682013-05-17 Yao Qi <yao@codesourcery.com>
8269
8270 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8271 the right place.
8272
db0dfaa0
LM
82732013-05-16 Luis Machado <lgustavo@codesourcery.com>
8274
8275 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8276 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8277 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8278 PT_TEXT_END_ADDR guards. Update comments.
8279 (linux_target_op) <read_offsets>: Conditionally define to
8280 linux_read_offsets if the target is UCLIBC and if it defines
8281 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8282
68f5f838
SL
82832013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8284 Andrew Jenner <andrew@codesourcery.com>
8285
8286 * Makefile.in (SFILES): Add linux-nios2-low.c.
8287 (clean): Add action to delete nios2-linux.c.
8288 (nios2-linux.c): New rule.
8289 * configure.srv: Add nios2*-*-linux*.
8290 * linux-nios2-low.c: New.
8291
1ebff1fd
HAQ
82922013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8293
8294 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8295
f6150862
HZ
82962013-04-25 Hui Zhu <hui@codesourcery.com>
8297
8298 PR gdb/15186
f6150862
HZ
8299 * ax.c (ax_printf): Add fflush.
8300
614c279d
TT
83012013-04-22 Tom Tromey <tromey@redhat.com>
8302
8303 * Makefile.in (SFILES): Add filestuff.c.
8304 (OBS): Add filestuff.o.
8305 (filestuff.o): New target.
8306 * config.in, configure: Rebuild.
8307 * configure.ac: Check for fdwalk, pipe2.
8308
7d4e5717
PA
83092013-04-17 Pedro Alves <palves@redhat.com>
8310
8311 * configure.ac (USE_THREAD_DB): Delete variable.
8312 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8313 Don't AC_SUBST USE_THREAD_DB.
8314 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8315 * config.in, configure: Regenerate.
8316
d5c93e41
PA
83172013-04-16 Pedro Alves <palves@redhat.com>
8318
8319 * linux-low.h (struct lwp_info) <thread_known>: Move under
8320 the USE_THREAD_DB #ifdef.
8321
04f5fe89
PA
83222013-04-16 Pedro Alves <palves@redhat.com>
8323
8324 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8325 (linux-low.o): Delete rule.
8326 * linux-low.h: Always include "gdb_thread_db.h" instead of
8327 conditionally including thread_db.h.
8328 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8329 HAVE_THREAD_DB_H.
8330
480b27bf
JK
83312013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8332
8333 * Makefile.in (install-only): Fix make install regression.
8334
43662968
JK
83352013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8336
8337 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8338 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8339 installation.
8340 * gdbserver.1: Remove.
8341
3e74e146
PA
83422013-03-22 Pedro Alves <palves@redhat.com>
8343
8344 * linux-low.c (handle_extended_wait): Don't call
8345 linux_enable_event_reporting.
8346
a8347a2a
TT
83472013-03-15 Tony Theodore <tonyt@logyst.com>
8348
8349 PR build/9098:
8350 * Makefile.in (SHELL): Use @SHELL@.
8351
eeb56fa7
SDJ
83522013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8353
8354 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8355 compiler warning.
8356
4fa7e2ff
JB
83572013-03-13 Joel Brobecker <brobecker@adacore.com>
8358
8359 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8360 Remove extraneous NULL element.
8361
8ddb1965
YQ
83622013-03-13 Yao Qi <yao@codesourcery.com>
8363
8364 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8365 'V' block in trace frame.
8366
9accd112
MM
83672013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8368
8369 * target.h (struct target_ops): Add btrace ops.
8370 (target_supports_btrace): New macro.
8371 (target_enable_btrace): New macro.
8372 (target_disable_btrace): New macro.
8373 (target_read_btrace): New macro.
8374 * gdbthread.h (struct thread_info): Add btrace field.
8375 * server.c: Include btrace-common.h.
8376 (handle_btrace_general_set): New function.
8377 (handle_btrace_enable): New function.
8378 (handle_btrace_disable): New function.
8379 (handle_general_set): Call handle_btrace_general_set.
8380 (handle_qxfer_btrace): New function.
8381 (struct qxfer qxfer_packets[]): Add btrace entry.
8382 * inferiors.c (remove_thread): Disable btrace.
8383 * linux-low: Include linux-btrace.h.
8384 (linux_low_enable_btrace): New function.
8385 (linux_low_read_btrace): New function.
8386 (linux_target_ops): Add btrace ops.
8387 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8388 Add srv_linux_btrace=yes.
8389 (x86_64-*-linux*): Add linux-btrace.o.
8390 Add srv_linux_btrace=yes.
8391 * configure.ac: Define HAVE_LINUX_BTRACE.
8392 * config.in: Regenerated.
8393 * configure: Regenerated.
8394
5cc22e4c
MM
83952013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8396
8397 * server.c (handle_qxfer): Preserve error message if -3 is
8398 returned.
8399 (qxfer): Document the -3 return value.
8400
7c97f91e
MM
84012013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8402
8403 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8404 (linux_btrace_h): New variable.
8405 (linux-btrace.o): New rule.
8406
be9a119c 84072013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8408 Hafiz Abid Qadeer <abidh@codesourcery.com>
8409
8410 * tracepoint.c (trace_buffer_size): New global.
8411 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8412 (init_trace_buffer): Change to one-argument function. Allocate
8413 trace buffer memory.
8414 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8415 handle QTBuffer:size packet.
8416 (cmd_bigqtbuffer_size): New function.
8417 (initialize_tracepoint): Call init_trace_buffer with
8418 DEFAULT_TRACE_BUFFER_SIZE.
8419 * server.c (handle_query): Add QTBuffer:size in the
8420 supported packets.
8421
e64f7499
YQ
84222013-03-07 Yao Qi <yao@codesourcery.com>
8423
8424 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8425 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8426 of -1.
8427 (cmd_qtsp): Adjust condition. Do post increment.
8428 Set cur_action and cur_step_action back to 0.
8429
f0ae6fc3
PA
84302013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8431
8432 PR server/15236
8433 * linux-low.c (linux_write_memory): Return early success if LEN is
8434 zero.
8435
b5b0b0af
CV
84362013-03-05 Corinna Vinschen <vinschen@redhat.de>
8437
334ad4a8 8438 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8439
589bc927
TT
84402013-02-28 Tom Tromey <tromey@redhat.com>
8441
8442 * configure.ac: Invoke AC_SYS_LARGEFILE.
8443 * configure, config.in: Rebuild.
8444
dfe07582
CV
84452013-02-28 Corinna Vinschen <vinschen@redhat.com>
8446
8447 * win32-low.c: Throughout, fix format strings and casts of
8448 printf-like functions to avoid type related warnings on all
8449 platforms.
8450 (get_child_debug_event): Print dwDebugEventCode as hex since
8451 that's how it's usually documented.
8452
736cd585
YQ
84532013-02-28 Yao Qi <yao@codesourcery.com>
8454
8455 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8456 pulongest.
8457
e1f58301
JW
84582013-02-27 Jiong Wang <jiwang@tilera.com>
8459
8460 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8461 (reg-tilegx32.c): New rule.
8462 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8463 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8464 different register info initializer according to elf class.
8465 (init_registers_tilgx32): New function. The tilegx32 register info
8466 initializer.
8467 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8468 (tile_store_gregset): Likewise.
8469
d171ca78
YQ
84702013-02-27 Yao Qi <yao@codesourcery.com>
8471
8472 * server.c (process_point_options): Print debug message when
8473 debug_threads is true.
8474
282bbdf3
YQ
84752013-02-26 Yao Qi <yao@codesourcery.com>
8476
8477 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8478
aca22551
PA
84792013-02-19 Pedro Alves <palves@redhat.com>
8480 Kai Tietz <ktietz@redhat.com>
8481
8482 PR gdb/15161
8483
8484 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8485 instead of strtoul to extract address from packet.
8486 (process_serial_event) <'z'>: Likewise.
8487
4f3cee1c
YQ
84882013-02-18 Yao Qi <yao@codesourcery.com>
8489
8490 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8491
8e1d55a3
PA
84922013-02-14 Pedro Alves <palves@redhat.com>
8493
8494 Plug memory leak.
8495
8496 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8497 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8498
458820da
PA
84992013-02-14 Pedro Alves <palves@redhat.com>
8500
8501 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8502
baea0dae
PA
85032013-02-14 Pedro Alves <palves@redhat.com>
8504
8505 * tracepoint.c (save_string): Delete.
8506 (add_tracepoint_action): Use savestring instead of save_string.
8507
0b1afbb3
PA
85082013-02-12 Pedro Alves <palves@redhat.com>
8509
8510 * linux-xtensa-low.c: Ditto.
8511 * xtensa-xtregs.c: Ditto.
8512
8a4ac37e
PA
85132013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8514
8515 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8516 thread_db.
8517
148de6bb
MS
85182013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8519
8520 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8521 aarch64_num_wp_regs and aarch64_num_bp_regs to
8522 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8523
55fac6e0
MS
85242013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8525
8526 * linux-aarch64-low.c (ps_get_thread_area): Replace
8527 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8528
176eb98c
MS
85292013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8530 Marcus Shawcroft <marcus.shawcroft@arm.com>
8531 Nigel Stephens <nigel.stephens@arm.com>
8532 Yufeng Zhang <yufeng.zhang@arm.com>
8533
8534 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8535 (aarch64.c, aarch64-without-fpu.c): New targets.
8536 * configure.srv (aarch64*-*-linux*): New.
8537 * linux-aarch64-low.c: New file.
8538
56f7af9c
MS
85392013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8540
43aaf8b6 8541 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8542 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8543 (dequeue_one_deferred_signal, linux_resume_one_thread)
8544 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8545 (linux_tracefork_grandchild, linux_test_for_tracefork)
8546 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8547 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8548 where the argument is 0.
8549
60f662b0
YQ
85502013-01-25 Yao Qi <yao@codesourcery.com>
8551
8552 * event-loop.c: Include "queue.h".
8553 (gdb_event_p): New typedef.
8554 (struct gdb_event) <next_event>: Remove.
8555 (event_queue): Change to QUEUE(gdb_event_p).
8556 (async_queue_event): Remove.
8557 (gdb_event_xfree): New.
8558 (initialize_event_loop): New.
8559 (process_event): Use API from QUEUE.
8560 (wait_for_event): Likewise.
8561 * server.c (main): Call initialize_event_loop.
8562 * server.h (initialize_event_loop): Declare.
8563
5ae4861a
YQ
85642013-01-18 Yao Qi <yao@codesourcery.com>
8565
8566 * ax.h (struct eval_agent_expr_context): New.
8567 (gdb_eval_agent_expr): Update declaration.
8568 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8569 TFRAME. Add new argument CTX.
8570 * server.h (struct eval_agent_expr_context): Declare.
8571 (agent_mem_read, agent_tsv_read): Update declaration.
8572 (agent_mem_read_string): Likewise.
8573 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8574 (add_traceframe_block): Add new argument TPOINT.
8575 Increase TPOINT->traceframe_usage.
8576 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8577 eval_tracepoint_agent_expr.
8578 (condition_true_at_tracepoint): Likewise.
8579 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8580 (agent_mem_read_string, agent_tsv_read): Likewise.
8581
85e00e85
YQ
85822013-01-16 Yao Qi <yao@codesourcery.com>
8583
8584 * linux-low.c (linux_resume_one_lwp): Don't check
8585 'lwp->bp_reinsert != 0'.
8586
4039cf45
JB
85872013-01-07 Joel Brobecker <brobecker@adacore.com>
8588 Pedro Alves <palves@redhat.com>
8589
8590 * lynx-low.c (ptrace_request_to_str): Define a temporary
8591 macro and use it to simplify this function's implementation.
8592
9044dee2
JB
85932013-01-07 Joel Brobecker <brobecker@adacore.com>
8594
8595 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8596 sets errno.
8597
e6352c8f
JB
85982013-01-07 Joel Brobecker <brobecker@adacore.com>
8599
8600 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8601
50681a27
JB
86022013-01-07 Joel Brobecker <brobecker@adacore.com>
8603
8604 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8605
3f6e77ef
JB
86062013-01-07 Joel Brobecker <brobecker@adacore.com>
8607
8608 * lynx-low.c (lynx_resume): Use the resume_info parameter
8609 to determine the ptid for the lynx_ptrace call, unless
8610 it is equal to minus_one_ptid, in which case we use the
8611 ptid of the current_inferior.
8612 (lynx_wait_1): After having received a thread create/exit
8613 event, resume the inferior's execution using the signaling
8614 thread's ptid, rather than the old ptid.
8615
7fda33ae
JB
86162013-01-07 Joel Brobecker <brobecker@adacore.com>
8617
8618 * lynx-low.c (lynx_resume): Delete variable ret.
8619
b9786c74
JB
86202013-01-01 Joel Brobecker <brobecker@adacore.com>
8621
8622 * gdbreplay.c (gdbreplay_version): Update copyright year.
8623 * server.c (gdbserver_version): Likewise.
8624
8b93d60f
JB
86252012-12-17 Joel Brobecker <brobecker@adacore.com>
8626
8627 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8628 new thread.
8629
037335a7
JB
86302012-12-17 Joel Brobecker <brobecker@adacore.com>
8631
8632 * lynx-low.c (ptrace_request_to_str): Add handling for
8633 PTRACE_GETTRACESIG.
8634
52d4cbd8
JB
86352012-12-17 Joel Brobecker <brobecker@adacore.com>
8636
8637 * lynx-low.c (lynx_attach): Delete variable new_process.
8638
ab8f6ca9
JB
86392012-12-17 Joel Brobecker <brobecker@adacore.com>
8640
8641 * lynx-low.c (lynx_create_inferior): Delete variable
8642 new_process.
8643
78cbc024
JB
86442012-12-17 Joel Brobecker <brobecker@adacore.com>
8645
8646 * lynx-low.c (ptrace_request_to_str): Do not handle
8647 PTRACE_GETTHREADLIST if this macro does not exist.
8648
14a00470
YQ
86492012-12-15 Yao Qi <yao@codesourcery.com>
8650
8651 * Makefile.in (OBS): Add notif.o.
8652 * notif.c, notif.h: New.
8653 * server.c: Include "notif.h".
8654 (struct vstop_notif) <next>: Remove.
8655 <base>: New field.
8656 (queue_stop_reply): Update.
8657 (push_event, send_next_stop_reply): Remove.
8658 (discard_queued_stop_replies): Update.
8659 (notif_stop): New variable.
8660 (handle_v_stopped): Remove.
8661 (handle_v_requests): Don't call handle_v_stopped. Call
8662 handle_ack_notif instead.
8663 (queue_stop_reply_callback): Call notif_event_enque instead
8664 of queue_stop_reply.
8665 (handle_status): Don't call send_next_stop_reply, call
8666 notif_write_event instead.
8667 (kill_inferior_callback): Likewise.
8668 (detach_or_kill_inferior_callback): Likewise.
8669 (main): Call initialize_notif.
8670 (process_serial_event): Call QUEUE_is_empty.
8671 (handle_target_event): Call notif_push instead of push event.
8672 * server.h (push_event): Remove declaration.
8673
61c125b9
TT
86742012-12-10 Tom Tromey <tromey@redhat.com>
8675
8676 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8677 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8678 macros.
8679 (.c.o): Rewrite.
8680 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8681 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8682 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8683 (amd64-linux-ipa.o, ax.o): Rewrite.
8684 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8685 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8686 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8687 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8688 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8689 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8690 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8691 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8692 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8693 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8694 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8695 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8696 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8697 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8698 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8699 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8700 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8701 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8702 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8703 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8704 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8705 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8706 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8707 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8708 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8709 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8710 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8711 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8712 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8713 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8714 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8715 (reg-tilegx.o): Remove.
8716 (all_object_files): New macro.
8717 Include .deps files.
8718 * aclocal.m4, configure: Rebuild.
8719 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8720 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8721 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8722
e90e9ad9
TT
87232012-12-05 Tom Tromey <tromey@redhat.com>
8724
8725 PR gdb/14917:
8726 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8727
02d403bf 87282012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8729
8730 * configure.ac: Check for linux/perf_event.h.
8731 * config.in: Regenerated.
8732 * configure: Regenerated.
8733
0270a750
PA
87342012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8735
8736 * hostio.c (handle_readlink): Decrease buffer size
8737 parameter passed to readlink by one byte.
8738
8c29b58e
YQ
87392012-11-26 Yao Qi <yao@codesourcery.com>
8740
8741 * configure.ac (build_warnings): Append '-Wempty-body'.
8742 * configure: Regenerated.
8743 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8744 body.
8745
8bdce1ff
PM
87462012-11-15 Pierre Muller <muller@sourceware.org>
8747
8748 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8749 * config.in: Regenerate.
8750 * configure: Regenerate.
8751 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8752 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8753 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8754 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8755 header.
8756 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8757 instead of <sys/wait.h> header.
8758 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8759
02d403bf 87602012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8761
8762 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8763 (various make rules): Remove -DGDBSERVER
8764
fbd5db48
YQ
87652012-11-09 Yao Qi <yao@codesourcery.com>
8766
8767 * spu-low.c (current_ptid): Move it to ..
8768 * gdbthread.h: ... here. New.
8769 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8770 * server.c (myresume, process_serial_event): Likewise.
8771 * thread-db.c (thread_db_find_new_threads): Likewise.
8772 * tracepoint.c (run_inferior_command): Likewise.
8773
b3dc46ff
AB
87742012-10-01 Andrew Burgess <aburgess@broadcom.com>
8775
8776 * server.c (handle_search_memory_1): Include access length in
8777 warning message.
8778
07c04788
HPN
87792012-09-05 Michael Brandt <michael.brandt@axis.com>
8780
8781 * linux-crisv32-low.c: Fix compile errors.
8782
918d227b
YQ
87832012-09-04 Yao Qi <yao@codesourcery.com>
8784
8785 * tracepoint.c (cmd_qtsv): Adjust debug message.
8786 Don't check CUR_TPOINT.
8787
18c1b81a
YQ
87882012-08-28 Yao Qi <yao@codesourcery.com>
8789
8790 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8791 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8792 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8793 Remove declarations of xmalloc, xreallloc, xstrdup and
8794 freeargv.
8795 * Makefile.in (libiberty_h): New.
8796 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8797 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8798
dc82f37b
YQ
87992012-08-23 Yao Qi <yao@codesourcery.com>
8800
8801 * server.h: Remove declaration of 'xsnprintf'.
8802
406b1477
KS
88032012-08-22 Keith Seitz <keiths@redhat.com>
8804
8805 * server.h: Include build-gnulib-gbserver/config.h.
8806 * gdbreplay.c: Likewise.
8807
e6712ff1
DE
88082012-08-08 Doug Evans <dje@google.com>
8809
8810 * Makefile.in (SFILES): Add gdb_vecs.c.
8811 (OBS): Add gdb_vecs.o.
8812 (gdb_vecs_h, host_defs_h): New variables.
8813 (thread-db.o): Add $(gdb_vecs_h) dependency.
8814 (gdb_vecs.o): New rule.
8815 * thread-db.c: #include "gdb_vecs.h".
8816 (thread_db_load_search): Use a vector to iterate over path elements.
8817 Handle text appearing after "$pdir".
8818
8819 * configure.ac: Add check for strstr.
8820 * config.in: Regenerate.
8821 * configure: Regenerate.
8822
7c3270ae
UW
88232012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8824
8825 * hostio.c (handle_pread): If pread fails, fall back to attempting
8826 lseek/read.
8827 (handle_pwrite): Likewise for pwrite.
8828
b62e2b27
UW
88292012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8830
8831 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8832 between unsupported TYPE and unimplementable ADDR/LEN combination.
8833 (arm_insert_point): Act on new return value.
8834
78a99e91
PA
88352012-07-31 Pedro Alves <palves@redhat.com>
8836
8837 * server.c (process_point_options): Only skip tokens if we find
8838 one that is unrecognized. Don't treat 'X' specially while
8839 skipping unrecognized tokens.
8840
fcf303ab
UW
88412012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8842
8843 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8844 to 4-byte-align HW breakpoint addresses for Thumb.
8845
7255706c
YQ
88462012-07-27 Yao Qi <yao@codesourcery.com>
8847
8848 PR remote/14161.
8849
8850 * server.h: Declare gdb_agent_about_to_close.
8851 * target.c (kill_inferior): Include "agent.h".
8852 New. Send command 'kill'.
8853 * target.h (kill_inferior): Removed macro.
8854 * tracepoint.c (gdb_agent_about_to_close): New.
8855 (gdb_agent_helper_thread): Handle command 'close'.
8856 Wait endlessly until the inferior stops.
8857 Install gdb_agent_remove_socket to atexit hook.
8858 (agent_socket_name): New static variable.
8859 (gdb_agent_socket_init): Replace local variable 'name' with
8860 'agent_socket_name'.
8861 (gdb_agent_remove_socket): New.
8862
5a3f286f
YQ
88632012-07-27 Yao Qi <yao@codesourcery.com>
8864
8865 * server.c (process_point_options): Stop at 'X' when parsing.
8866
961bd387
ME
88672012-07-19 Michael Eager <eager@eagercon.com>
8868
a261b8f5 8869 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8870 to hw_execute.
8871 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8872 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8873 hardware breakpoint.
8874
aa7c7447
JK
88752012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8876
8877 * gdbserver/linux-low.c (initialize_low): Call
8878 linux_ptrace_init_warnings.
8879
7f216e7c
DE
88802012-07-02 Doug Evans <dje@google.com>
8881
8882 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8883 pointer to int.
8884
d3ce09f5
SS
88852012-07-02 Stan Shebs <stan@codesourcery.com>
8886
8887 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8888 (ax.o): Add it to build rule.
8889 (ax-ipa.o): Ditto.
8890 (OBS): Add format.o.
8891 (IPA_OBS): Add format.o.
8892 * server.c (handle_query): Claim support for breakpoint commands.
8893 (process_point_options): Add command case.
8894 (process_serial_event): Leave running if there are printfs in
8895 effect.
8896 * mem-break.h (any_persistent_commands): Declare.
8897 (add_breakpoint_commands): Declare.
8898 (gdb_no_commands_at_breakpoint): Declare.
8899 (run_breakpoint_commands): Declare.
8900 * mem-break.c (struct point_command_list): New struct.
8901 (struct breakpoint): New field command_list.
8902 (any_persistent_commands): New function.
8903 (add_commands_to_breakpoint): New function.
8904 (add_breakpoint_commands): New function.
8905 (gdb_no_commands_at_breakpoint): New function.
8906 (run_breakpoint_commands): New function.
8907 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8908 locally.
8909 * ax.c: Include format.h.
8910 (ax_printf): New function.
8911 (gdb_eval_agent_expr): Add printf opcode.
8912
2f8f6aed
YQ
89132012-06-13 Yao Qi <yao@codesourcery.com>
8914
8915 * server.c (start_inferior): Remove duplicated writes to fields
8916 'last_resume_kind' and 'last_status' of 'current_inferior'.
8917
0c9070b3
YQ
89182012-06-12 Yao Qi <yao@codesourcery.com>
8919 Pedro Alves <palves@redhat.com>
8920
8921 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8922 comment.
8923 * server.c (handle_v_cont): Extend comment.
8924
c52daf70
YQ
89252012-06-11 Yao Qi <yao@codesourcery.com>
8926
8927 * linux-low.c (linux_attach): Add 'static'.
8928
d38bbb0a
YQ
89292012-06-06 Yao Qi <yao@codesourcery.com>
8930
8931 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8932
89dc0afd
JK
89332012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8934
8935 Fix gcc -flto compilation warning.
8936 * server.c (main): Make variable multi_mode and attach volatile.
8937
75f62ce7
TJB
89382012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8939
8940 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8941 if the platform doesn't know about it.
8942
65f479b6
PA
89432012-05-30 Jeff Kenton <jkenton@tilera.com>
8944
8945 * Makefile.in (SFILES): Add linux-tile-low.c.
8946 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8947 * configure.srv: Handle tilegx-*-linux*.
8948 * linux-tile-low.c: New file.
8949
0c5bf5a9
JK
89502012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8951
8952 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8953
a493e3e2
PA
89542012-05-24 Pedro Alves <palves@redhat.com>
8955
8956 PR gdb/7205
8957
43aaf8b6 8958 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8959
2ea28649
PA
89602012-05-24 Pedro Alves <palves@redhat.com>
8961
8962 PR gdb/7205
8963
8964 Replace target_signal with gdb_signal throughout.
8965
8d409d16
MR
89662012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8967
8968 * linux-low.c (linux_store_registers): Avoid the copying sequence
8969 when no data has been retrieved by ptrace.
8970
23512c01
MGD
89712012-05-22 Will Deacon <will.deacon@arm.com>
8972
8973 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8974 Include asm/ptrace.h.
8975 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8976 already defined.
8977
4934b29e
MR
89782012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8979
8980 * linux-low.c (linux_store_registers): Don't re-retrieve data
8981 with ptrace that has already been obtained from /proc. Always
8982 copy any data retrieved with ptrace to the buffer supplied.
8983
bde24c0a
PA
89842012-05-11 Yao Qi <yao@codesourcery.com>
8985 Pedro Alves <palves@redhat.com>
8986
8987 * linux-low.c (enum stopping_threads_kind): New.
8988 (stopping_threads): Change type to `enum stopping_threads_kind'.
8989 (handle_extended_wait): If stopping and suspending threads, leave
8990 the new_lwp suspended too.
8991 (linux_wait_for_event): Adjust.
8992 (stop_all_lwps): Set `stopping_threads' to
8993 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8994 whether we're suspending threads or just stopping them. Assert no
8995 recursion happens.
8996
623b6bdf
YQ
89972012-04-29 Yao Qi <yao@codesourcery.com>
8998
8999 * server.h: Move some code to ...
9000 * gdbthread.h: ... here. New.
9001 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9002 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9003 (nto-low.o, win32-low.o): Likewise.
9004 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9005 * regcache.c, remote-utils.c, server.c: Likewise.
9006 * target.c, tracepoint.c, win32-low.c: Likewise.
9007
f15f9948
TJB
90082012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9009
9010 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9011 (PTRACE_ARG4_TYPE): Likewise.
9012 (PTRACE_XFER_TYPE): Likewise.
9013 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9014 ptrace to PTRACE_ARG3_TYPE.
9015 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9016 (PTRACE_ARG4_TYPE): Likewise.
9017 (PTRACE_XFER_TYPE): Likewise.
9018 (linux_detach_one_lwp): Cast fourth argument of
9019 ptrace to long then PTRACE_ARG4_TYPE.
9020 (regsets_fetch_inferior_registers): Cast third argument of
9021 ptrace to long then PTRACE_ARG3_TYPE.
9022 (regsets_store_inferior_registers): Likewise.
9023
38ea300a
PA
90242012-04-20 Pedro Alves <palves@redhat.com>
9025
9026 * configure: Regenerate.
9027
c971b7fa
PA
90282012-04-19 Pedro Alves <palves@redhat.com>
9029
43aaf8b6 9030 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9031 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9032 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9033 (all, install-only, uninstall, clean-info, all-lib, clean): No
9034 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9035 (maintainer-clean realclean distclean): Use subdir_do.
9036 (subdir_do): New.
9037 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9038 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9039 * acinclude.m4: Include acx_configure_dir.m4.
9040 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9041 calls. Call AC_PROG_RANLIB. Configure gnulib using
9042 ACX_CONFIGURE_DIR.
9043 (GNULIB): New.
9044 (GNULIB_STDINT_H): Adjust.
9045 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9046 * gdbreplay.c: Include build-gnulib/config.h.
9047 * server.h: Likewise.
9048 * aclocal.m4: Regenerate.
9049 * config.in: Regenerate.
9050 * configure: Regenerate.
c971b7fa 9051
809277f8
PA
90522012-04-19 Pedro Alves <palves@redhat.com>
9053
9054 * Makefile.in (LIBGNU, INCGNU): Adjust.
9055 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9056 (all, install-only, uninstall, clean-info, all-lib, clean)
9057 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9058 * configure.ac: Adjust AC_OUTPUT output.
9059 * aclocal.m4: Regenerate.
9060 * configure: Regenerate.
9061
fd9bb8b8
PA
90622012-04-19 Pedro Alves <palves@redhat.com>
9063
9064 * Makefile.in (generated_files): New.
9065 (server_h): Remove the explicit dependency on config.h, and depend
9066 on $generated_files.
9067
1c298c66
PA
90682012-04-19 Pedro Alves <palves@redhat.com>
9069
9070 * Makefile.in (INCGNU): Add -Ignulib.
9071
57c4b50b
PA
90722012-04-19 Pedro Alves <palves@redhat.com>
9073
9074 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9075 (INCGNU): ... this, and spell out -I here.
9076 (GNULIB_LIB): Rename to ...
9077 (LIBGNU): ... this.
9078 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9079
1030e047
PA
90802012-04-19 Pedro Alves <palves@redhat.com>
9081
9082 * config.in: Regenerate.
9083
447d4319
PA
90842012-04-19 Pedro Alves <palves@redhat.com>
9085
9086 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9087 * server.h (memmem): Remove declaration.
9088 * config.in: Regenerate.
9089 * configure: Regenerate.
9090
aad9eab9
YQ
90912012-04-19 Yao Qi <yao@codesourcery.com>
9092
9093 * Makefile.in (SFILES): Add common/vec.c.
9094 (OBS): Add vec.o.
9095 (vec.o): New rule.
9096
3e10640f
YQ
90972012-04-19 Yao Qi <yao@codesourcery.com>
9098
9099 * remote-utils.c (prepare_resume_reply): Replace with macro
9100 target_core_of_thread.
9101 * server.c (handle_qxfer_threads_proper): Likewise.
9102 * target.h (traget_core_of_thread): New macro.
9103
71622373
PA
91042012-04-18 Pedro Alves <palves@redhat.com>
9105
9106 * aclocal.m4: Regenerate.
9107 * configure: Regenerate.
9108
80d26939
YQ
91092012-04-16 Yao Qi <yao@codesourcery.com>
9110
9111 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9112 duplicated on address.
9113
42476b70
YQ
91142012-04-16 Yao Qi <yao@codesourcery.com>
9115
9116 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9117 (struct tracepoint_action_ops) <send>: New field.
9118 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9119 (agent_expr_send, x_tracepoint_action_send): New.
9120 (l_tracepoint_action_send): New.
9121 (cmd_qtdp): Download and install tracepoint
9122 according to `use_agent'.
9123 (run_inferior_command): Add one more parameter `len'.
9124 Update callers.
9125 (tracepoint_send_agent): New.
9126 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9127
7bc83639
YQ
91282012-04-16 Yao Qi <yao@codesourcery.com>
9129
9130 * tracepoint.c (download_tracepoints): Moved to ...
9131 (cmd_qtstart): ... here.
9132
5f18041e
YQ
91332012-04-14 Yao Qi <yao@codesourcery.com>
9134
9135 * tracepoint.c: Include inttypes.h.
9136 (struct collect_memory_action): Use sized types.
9137 (struct tracepoint): Likewise.
9138 (cmd_qtdp, stop_tracing): Update print specifiers.
9139 (cmd_qtp, response_tracepoint): Likewise.
9140 (collect_data_at_tracepoint): Likewise.
9141 (collect_data_at_step): Likewise.
9142
55a8c076
YQ
91432012-04-14 Yao Qi <yao@codesourcery.com>
9144
9145 Import gnulib module inttypes.
9146 * aclocal.m4, config.in, configure: Regenerated.
9147
dc750257
YQ
91482012-04-14 Yao Qi <yao@codesourcery.com>
9149
9150 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9151 Makefile and config.status at last.
9152
0ab5faf9
YQ
91532012-04-13 Yao Qi <yao@codesourcery.com>
9154
9155 * tracepoint.c: Include stdint.h unconditionally.
9156
18f5fd81
TJB
91572012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9158
9159 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9160 on BFD_HAVE_SYS_PROCFS_TYPE.
9161 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9162 * configure: Regenerate.
9163 * config.in: Likewise.
9164
4d47af5c
L
91652012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9166
9167 * Makefile.in (clean): Also remove x32.c x32-linux.c
9168 x32-avx.c x32-avx-linux.c.
9169 (x32.o): New target.
9170 (x32.c): Likewise.
9171 (x32-linux.o): Likewise.
9172 (x32-linux.c): Likewise.
9173 (x32-avx.o): Likewise.
9174 (x32-avx.c): Likewise.
9175 (x32-avx-linux.o): Likewise.
9176 (x32-avx-linux.c): Likewise.
9177
9178 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9179 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9180 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9181 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9182 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9183 i386/x32-avx-linux.xml.
9184
9185 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9186 (init_registers_x32_avx_linux): Likwise.
9187 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9188 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9189
ecedbe58
PA
91902012-04-13 Pedro Alves <palves@redhat.com>
9191
9192 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9193 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9194 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9195 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9196 the sub-make.
9197
c92b5177
L
91982012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9199
9200 * linux-x86-low.c (compat_x32_clock_t): New.
9201 (compat_x32_siginfo_t): Likewise.
9202 (compat_x32_siginfo_from_siginfo): Likewise.
9203 (siginfo_from_compat_x32_siginfo): Likewise.
9204 (linux_is_elf64): Likewise.
9205 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9206 and siginfo_from_compat_x32_siginfo for x32.
9207 (x86_arch_setup): Set linux_is_elf64.
9208
214d508e
L
92092012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9210
9211 PR gdb/13969
9212 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9213 e_machine field.
9214 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9215 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9216 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9217 compatible with process.
9218
c9a1864a
YQ
92192012-04-12 Yao Qi <yao@codesourcery.com>
9220
9221 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9222 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9223 (install-only, install-info, clean): Handle sub dir gnulib.
9224 (all-lib, am--refresh): New targets.
9225 (memmem.o): Remove target.
9226 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9227 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9228 (AC_REPLACE_FUNCS): Remove memmem.
9229 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9230 (AC_OUTPUT): Generate Makefile in gnulib/.
9231 * aclocal.m4, config.in, configure: Regenerated.
9232
367ba2c2
MR
92332012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9234
9235 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9236
9d236627
PA
92372012-04-05 Pedro Alves <palves@redhat.com>
9238
9239 -Werror=strict-aliasing
9240
9241 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9242 pointer.
9243
111217b3
PA
92442012-04-04 Pedro Alves <palves@redhat.com>
9245
9246 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9247 (sparc_store_gregset_from_stack, sparc_store_gregset)
9248 (sparc_breakpoint_at): Fix formatting.
9249
8365dcf5
TJB
92502012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9251
9252 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9253 are available.
9254 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9255 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9256 * config.in: Regenerate.
9257 * configure: Likewise.
9258
689cc2ae
PA
92592012-03-29 Pedro Alves <palves@redhat.com>
9260
9261 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9262 Correct ptrace arguments.
9263
c14dfd32
PA
92642012-03-28 Pedro Alves <palves@redhat.com>
9265
9266 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9267 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9268 (IA64_FR1_REGNUM): New defines.
9269 (ia64_fetch_register): New.
9270 (the_low_target): Install it.
9271 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9272 field.
9273 * linux-low.c (linux_fetch_registers): Try the
9274 the_low_target.fetch_register hook first.
9275
9276 * linux-arm-low.c (the_low_target): Adjust.
9277 * linux-bfin-low.c (the_low_target): Adjust.
9278 * linux-cris-low.c (the_low_target): Adjust.
9279 * linux-crisv32-low.c (the_low_target): Adjust.
9280 * linux-m32r-low.c (the_low_target): Adjust.
9281 * linux-m68k-low.c (the_low_target): Adjust.
9282 * linux-mips-low.c (the_low_target): Adjust.
9283 * linux-ppc-low.c (the_low_target): Adjust.
9284 * linux-s390-low.c (the_low_target): Adjust.
9285 * linux-sh-low.c (the_low_target): Adjust.
9286 * linux-sparc-low.c (the_low_target): Adjust.
9287 * linux-tic6x-low.c (the_low_target): Adjust.
9288 * linux-x86-low.c (the_low_target): Adjust.
9289 * linux-xtensa-low.c (the_low_target): Adjust.
9290
63c88e13
PA
92912012-03-26 Pedro Alves <palves@redhat.com>
9292
9293 * server.c (handle_qxfer_libraries): Don't bail early if
9294 the_target->qxfer_libraries_svr4 is not NULL.
9295
fb723180
PA
92962012-03-26 Pedro Alves <palves@redhat.com>
9297
9298 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9299
0afae3cf
PA
93002012-03-23 Pedro Alves <palves@redhat.com>
9301
9302 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9303 "library-list-svr4" element's start tag when the the DSO list is
9304 empty.
9305
485f1ee4
PA
93062012-03-23 Pedro Alves <palves@redhat.com>
9307
9308 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9309 a variable whose type size is the same as the inferior's pointer
9310 size.
9311
a5362b9a
TS
93122012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9313
9314 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9315 struct siginfo.
9316 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9317 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9318 * linux-low.h: Include <signal.h>.
9319 (struct siginfo): Remove forward declaration.
9320 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9321 struct siginfo.
9322
d226c142
MF
93232012-03-21 Mike Frysinger <vapier@gentoo.org>
9324
9325 * .gitignore: Ignore more files.
9326
122f36ef
PA
93272012-03-19 Pedro Alves <palves@redhat.com>
9328 Jan Kratochvil <jan.kratochvil@redhat.com>
9329
9330 * server.c (cont_thread, general_thread): Add describing comments.
9331 (start_inferior): Clear `cont_thread'.
9332 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9333 of a process.
9334
fc3e5175
YQ
93352012-03-15 Yao Qi <yao@codesourcery.com>
9336
9337 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9338 handling to ...
9339 (cmd_qtdp): ... here.
9340
8d0d92cd
YQ
93412012-03-15 Yao Qi <yao@codesourcery.com>
9342
9343 * tracepoint.c (struct tracepoint_action_ops): New.
9344 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9345 (m_tracepoint_action_download): New.
9346 (r_tracepoint_action_download): New.
9347 (x_tracepoint_action_download): New.
9348 (l_tracepoint_action_download): New.
9349 (add_tracepoint_action): Install `action->ops' according type.
9350 (download_tracepoint_1): Move code `download' function pointer
9351 of various tracepoint_action_ops.
9352
87b0bb13
JK
93532012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9354
9355 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9356 linux_ptrace_attach_warnings.
9357
5f572dec
JK
93582012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9359
9360 * Makefile.in (linux-ptrace.o): New.
9361 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9362 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9363 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9364 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9365 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9366 of these targets.
9367 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9368
f4647387
YQ
93692012-03-08 Yao Qi <yao@codesourcery.com>
9370 Pedro Alves <palves@redhat.com>
9371
9372 Fix PR server/13392.
9373 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9374 offset of JMP insn.
9375 * tracepoint.c (remove_tracepoint): New.
9376 (cmd_qtdp): Call remove_tracepoint when failed to install.
9377
9b224c5e
PA
93782012-03-07 Pedro Alves <palves@redhat.com>
9379
9380 * linux-low.c (get_detach_signal): New.
9381 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9382 Pass on pending signals to PTRACE_DETACH. Check the result of the
9383 ptrace call.
9384 * server.c (program_signals, program_signals_p): New.
9385 (handle_general_set): Handle QProgramSignals.
9386 * server.h (program_signals, program_signals_p): Declare.
9387
e237a7e2
JK
93882012-03-05 Pedro Alves <palves@redhat.com>
9389 Jan Kratochvil <jan.kratochvil@redhat.com>
9390
9391 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9392 New comment why.
9393
5808517f
YQ
93942012-03-03 Yao Qi <yao@codesourcery.com>
9395
9396 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9397 agent_look_up_symbols.
9398
58b4daa5
YQ
93992012-03-03 Yao Qi <yao@codesourcery.com>
9400
9401 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9402 (linux-x86-low.o): Likewise.
9403 * server.h: Remove in_process_agent_loaded.
9404 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9405 common/agent.c.
9406 Update callers.
9407
8ffcbaaf
YQ
94082012-03-03 Yao Qi <yao@codesourcery.com>
9409
9410 * tracepoint.c (gdb_agent_capability): New global.
9411 (in_process_agent_loaded_ust): Renamed to
9412 `in_process_agent_supports_ust'.
9413 Update callers.
9414 (in_process_agent_supports_ust): Call agent_capability_check.
9415 (clear_installed_tracepoints): Assert that agent supports
9416 agent.
9417
d1feda86
YQ
94182012-03-03 Yao Qi <yao@codesourcery.com>
9419
9420 * linux-low.c (linux_supports_agent): New.
9421 (linux_target_ops): Initialize field `supports_agent' with
9422 linux_supports_agent.
9423 * target.h (struct target_ops) <supports_agent>: New.
9424 (target_supports_agent): New macro.
9425 * server.c (handle_general_set): Handle packet 'QAgent'.
9426 (handle_query): Send `QAgent+'.
9427 * Makefile.in (server.o): Depends on agent.h.
9428
2fa291ac
YQ
94292012-03-03 Yao Qi <yao@codesourcery.com>
9430
9431 * Makefile.in (OBS): Add agent.o.
9432 Add new rule for agent.o.
9433 Track dependence of tracepoint.c on agent.h.
9434 * tracepoint.c (run_inferior_command_1):
9435 (run_inferior_command): Call agent_run_command.
9436 (gdb_ust_connect_sync_socket): Deleted. Move it to
9437 common/agent.c.
9438 (resume_thread, stop_thread): Likewise.
9439 (gdb_ust_socket_init): Renamed to ...
9440 (gdb_agent_socket_init): ... New.
9441 (gdb_ust_thread): Renamed to ...
9442 (gdb_agent_helper_thread): ... New.
9443 (gdb_ust_init): Move some code to ...
9444 (gdb_agent_init): ... here. New.
9445 [HAVE_UST]: Call gdb_ust_init.
9446 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9447 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9448 * config.in, configure: Regenerated.
9449
05044653
PA
94502012-03-02 Pedro Alves <palves@redhat.com>
9451
9452 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9453 * linux-low.c (struct simple_pid_list): New.
9454 (stopped_pids): New a struct simple_pid_list pointer.
9455 (add_to_pid_list, pull_pid_from_list): New.
9456 (handle_extended_wait): Don't assume the first signal new children
9457 report is SIGSTOP. Adjust call to pull_pid_from_list.
9458 (linux_wait_for_lwp): Adjust.
9459
8d00225b
YQ
94602012-03-02 Yao Qi <yao@codesourcery.com>
9461
9462 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9463 debug log.
9464
19560ba5
YQ
94652012-03-02 Yao Qi <yao@codesourcery.com>
9466
9467 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9468 `stop_pc' and `tpoint'. Update caller.
9469
1faeff08
MR
94702012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9471
9472 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9473 * linux-low.c (use_linux_regsets): New macro.
9474 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9475 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9476 (linux_register_in_regsets): New function.
9477 (usr_fetch_inferior_registers): Skip registers covered by
9478 regsets.
9479 (usr_store_inferior_registers): Likewise.
9480 (usr_fetch_inferior_registers): New macro.
9481 (usr_store_inferior_registers): Likewise.
9482 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9483 (linux_store_registers): Likewise.
9484 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9485 prototype.
9486 (init_registers_mips64_dsp_linux): Likewise.
9487 (init_registers_mips_linux): New macro.
9488 (init_registers_mips_dsp_linux): Likewise.
9489 (mips_dsp_num_regs): Likewise.
9490 (DSP_BASE, DSP_CONTROL): New fallback macros.
9491 (mips_base_regs): New macro.
9492 (mips_regmap): Use it. Fix the size.
9493 (mips_dsp_regmap): New variable.
9494 (mips_dsp_regset_bitmap): Likewise.
9495 (mips_arch_setup): New function.
9496 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9497 than mips_regmap.
9498 (mips_cannot_store_register): Likewise.
9499 (the_low_target): Update .arch_setup, .num_regs and .regmap
9500 initializers. Add .regset_bitmap initializer.
9501 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9502 initializer.
9503 * linux-bfin-low.c (the_low_target): Likewise.
9504 * linux-cris-low.c (the_low_target): Likewise.
9505 * linux-crisv32-low.c (the_low_target): Likewise.
9506 * linux-ia64-low.c (the_low_target): Likewise.
9507 * linux-m32r-low.c (the_low_target): Likewise.
9508 * linux-m68k-low.c (the_low_target): Likewise.
9509 * linux-ppc-low.c (the_low_target): Likewise.
9510 * linux-s390-low.c (the_low_target): Likewise.
9511 * linux-sh-low.c (the_low_target): Likewise.
9512 * linux-sparc-low.c (the_low_target): Likewise.
9513 * linux-tic6x-low.c (the_low_target): Likewise.
9514 * linux-x86-low.c (the_low_target): Likewise.
9515 * linux-xtensa-low.c (the_low_target): Likewise.
9516 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9517 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9518 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9519 srv_xmlfiles.
9520 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9521 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9522
c03e6ccc
YQ
95232012-02-29 Yao Qi <yao@codesourcery.com>
9524 Pedro Alves <palves@redhat.com>
9525
9526 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9527 `step_over_finished' is true.
9528
644cebc9
PA
95292012-02-27 Pedro Alves <palves@redhat.com>
9530
9531 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9532 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9533
c14d7ab2
PA
95342012-02-27 Pedro Alves <palves@redhat.com>
9535
9536 PR server/9684
9537 * linux-low.c (pid_is_stopped): New.
9538 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9539
412c89dd
LM
95402012-02-25 Luis Machado <lgustavo@codesourcery.com>
9541
9542 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9543 of conditions.
9544
b745defe
MR
95452012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9546
9547 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9548
9f3a5c85
LM
95492012-02-24 Luis Machado <lgustavo@codesourcery>
9550
9551 * server.c (handle_query): Advertise support for target-side
9552 breakpoint condition evaluation.
9553 (process_point_options): New function.
9554 (process_serial_event): When inserting a breakpoint, check for
9555 a target-side condition that should be evaluated.
9556
9557 * mem-break.c: Include regcache.h and ax.h.
9558 (point_cond_list_t): New data structure.
9559 (breakpoint) <cond_list>: New field.
9560 (find_gdb_breakpoint_at): Make non-static.
9561 (delete_gdb_breakpoint_at): Clear any target-side
9562 conditions.
9563 (clear_gdb_breakpoint_conditions): New function.
9564 (add_condition_to_breakpoint): Likewise.
9565 (add_breakpoint_condition): Likewise.
9566 (gdb_condition_true_at_breakpoint): Likewise.
9567 (gdb_breakpoint_here): Return result directly instead
9568 of going through a local variable.
9569
9570 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9571 (clear_gdb_breakpoint_conditions): Likewise.
9572 (add_breakpoint_condition): Likewise.
9573 (gdb_condition_true_at_breakpoint): Likewise.
9574
9575 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9576 (need_step_over_p): Take target-side breakpoint condition into
9577 consideration.
9578
5e1dc496
LM
95792012-02-24 Luis Machado <lgustavo@codesourcery>
9580
9581 * server.h: Include tracepoint.h.
9582 (agent_mem_read, agent_get_trace_state_variable_value,
9583 agent_set_trace_state_variable_value,
9584 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9585 get_set_tsv_func_addr): New prototypes.
9586
9587 * ax.h: New include file.
9588 * ax.c: New source file.
9589
9590 * tracepoint.c: Include ax.h.
9591 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9592 agent_expr, eval_result_type): Move to ax.h.
9593 (parse_agent_expr): Rename to ...
9594 (gdb_parse_agent_expr): ... this, make it non-static and move
9595 to ax.h.
9596 (unparse_agent_expr) Rename to ...
9597 (gdb_unparse_agent_expr): ... this, make it non-static and move
9598 to ax.h.
9599 (eval_agent_expr): Rename to ...
9600 (eval_tracepoint_agent_expr): ... this.
9601 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9602 forward declarations.
9603 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9604 (agent_get_trace_state_variable_value): New function.
9605 (agent_set_trace_state_variable_value): New function.
9606 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9607 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9608 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9609 (condition_true_at_tracepoint): Likewise.
9610 (parse_agent_expr): Rename to ...
9611 (gdb_parse_agent_expr): ... this and move to ax.c.
9612 (unparse_agent_expr): Rename to ...
9613 (gdb_unparse_agent_expr): ... this and move to ax.c.
9614 (gdb_agent_op_name): Move to ax.c.
9615 (eval_agent_expr): Rename to ...
9616 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9617 and move to ax.c.
9618 (eval_tracepoint_agent_expr): New function.
9619 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9620 non-static.
5e1dc496
LM
9621 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9622 ax.c.
9623 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9624 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9625 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9626 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9627 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9628 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9629 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9630 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9631 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9632 (compile_bytecodes): Remove forward declaration.
9633 (is_goto_target): Move to ax.c.
9634 (compile_bytecodes): Move to ax.c and call
9635 agent_get_trace_state_variable_value (...) and
9636 agent_set_trace_state_variable_value (...).
9637
9638 * Makefile.in: Update ax.c and IPA dependencies.
9639
277e4e52
PA
96402012-02-24 Pedro Alves <palves@redhat.com>
9641
9642 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9643 (cmd_bigqtbuffer_circular): ... this. Only handle
9644 'QTBuffer:circular:'.
9645 (handle_tracepoint_general_set): Adjust.
9646
bf4c19f7
YQ
96472012-02-16 Yao Qi <yao@codesourcery.com>
9648
9649 * inferiors.c: Move code to ...
9650 * dll.c: .... here. New.
9651 * server.h: Declare clear_dlls.
9652 * Makefile.in (SFILES): Add dll.c.
9653 (OBS): Add dll.o
9654 (dll.o): New rule.
9655
d73f2619
YQ
96562012-02-11 Yao Qi <yao@codesourcery.com>
9657
9658 * server.c: (handle_monitor_command): Add a new parameter
9659 `own_buf'.
9660 (handle_query): Update caller.
9661
f8255c2a
JB
96622012-02-09 Joel Brobecker <brobecker@adacore.com>
9663
9664 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9665 * configure, config.in: Regenerate.
9666 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9667 is not defined.
9668
da84f473
PA
96692012-02-02 Pedro Alves <palves@redhat.com>
9670
9671 Try SIGKILL first, then PTRACE_KILL.
9672 * linux-low.c (linux_kill_one_lwp): New.
9673 (linux_kill_one_lwp): Rename to ...
9674 (kill_one_lwp_callback): ... this. Use the new
9675 linux_kill_one_lwp.
9676
e886a173
PA
96772012-02-02 Pedro Alves <palves@redhat.com>
9678
9679 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9680 inferior.
9681
be07f1a2
PA
96822012-01-27 Pedro Alves <palves@redhat.com>
9683
9684 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9685 (elf_64_file_p): Make static.
9686 (linux_pid_exe_is_elf_64_file): New.
9687 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9688 Delete declarations.
9689 (linux_pid_exe_is_elf_64_file): Declare.
9690 * linux-x86-low.c (x86_arch_setup): Use
9691 linux_pid_exe_is_elf_64_file.
9692
d8301ad1
JK
96932012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9694
9695 * linux-low.c (linux_wait_for_event_1): Rename to ...
9696 (linux_wait_for_event): ... here and merge it with former
9697 linux_wait_for_event - new variable wait_ptid, use it.
9698 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9699
01b17894
PA
97002012-01-23 Pedro Alves <palves@redhat.com>
9701
9702 * server.c (main): Avoid yet another case of infinite loop while
9703 detaching/killing after a longjmp.
9704
e825046f
JK
97052012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9706
9707 Code cleanup.
9708 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9709
b9e7b9c3
UW
97102012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9711
9712 * hostio.c (handle_readlink): New function.
9713 (handle_vFile): Call it to handle "vFile:readlink" packets.
9714
901f9912
UW
97152012-01-20 Pedro Alves <palves@redhat.com>
9716 Ulrich Weigand <ulrich.weigand@linaro.org>
9717
9718 * server.c (handle_v_requests): Only support vAttach and vRun to
9719 start multiple processes when in extended protocol mode.
9720
fc1ab1a0
PA
97212012-01-17 Pedro Alves <palves@redhat.com>
9722
9723 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9724 memalign plus mprotect to allocate the scratch buffer.
9725
7d5d4e98
PA
97262012-01-13 Pedro Alves <palves@redhat.com>
9727
9728 * server.c (attach_inferior): Clear `cont_thread'.
9729
f128d5e9
PA
97302012-01-13 Pedro Alves <palves@redhat.com>
9731
9732 * server.c (main): Avoid infinite loop while detaching/killing
9733 after a longjmp.
9734
06db92f0
DE
97352012-01-09 Doug Evans <dje@google.com>
9736
9737 * server.c (start_inferior): Set last_ptid in --wrapper case.
9738
32d92999
YQ
97392012-01-06 Yao Qi <yao@codesourcery.com>
9740
9741 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9742 defined.
9743 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9744
5e0a92a9
YQ
97452012-01-04 Yao Qi <yao@codesourcery.com>
9746
9747 * tracepoint.c (cmd_qtdp): Print debug message
9748 for static tracepoint.
9749
ae639e8c
YQ
97502012-01-04 Yao Qi <yao@codesourcery.com>
9751
9752 * tracepoint.c (trace_vdebug): Differentiate debug message
9753 between gdbserver and IPA.
9754
f72429c5
YQ
97552012-01-03 Yao Qi <yao@codesourcery.com>
9756
9757 * tracepoint.c (tracepoint_was_hit): Don't collect for
9758 static tracepoint.
9759
12c3e59c
JB
97602012-01-02 Joel Brobecker <brobecker@adacore.com>
9761
9762 * terminal.h: Reformat copyright header.
9763
67827812
JB
97642012-01-02 Joel Brobecker <brobecker@adacore.com>
9765
9766 * server.c (gdbserver_version): Update copyright year.
9767 * gdbreplay.c (gdbreplay_version): Likewise.
9768
3e52c33d
JK
97692011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9770
9771 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9772
9773 Revert:
9774 2011-12-18 Hui Zhu <teawater@gmail.com>
9775 * linux-low.c (linux_create_inferior): Save return value to ret.
9776
66f1260e
HZ
97772011-12-18 Hui Zhu <teawater@gmail.com>
9778
9779 * linux-low.c (linux_create_inferior): Save return value to ret.
9780
e77616d7
DE
97812011-12-16 Doug Evans <dje@google.com>
9782
e7b06c57
DE
9783 * linux-low.c (linux_create_inferior): If stdio connection,
9784 redirect stdin from /dev/null, stdout to stderr.
9785 * remote-utils.c (remote_is_stdio): New static global.
9786 (remote_connection_is_stdio): New function.
9787 (remote_prepare): Handle stdio connection.
9788 (remote_open): Ditto.
9789 (remote_close): Don't close stdin for stdio connections.
9790 (read_prim,write_prim): New functions. Replace all calls to
9791 read/write to these.
9792 * server.c (main): Watch for "-" argument. Move call to
9793 remote_prepare before start_inferior.
9794 * server.h (STDIO_CONNECTION_NAME): New macro.
9795 (remote_connection_is_stdio): Declare.
9796
e77616d7
DE
9797 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9798 in debugging output.
9799
82067193
YQ
98002011-12-15 Yao Qi <yao@codesourcery.com>
9801
9802 * tracepoint.c: Include sys/syscall.h.
9803 (gdb_ust_thread): Remove preprocessor conditional.
9804
82bfbe7e
PA
98052011-12-14 Pedro Alves <pedro@codesourcery.com>
9806
9807 * linux-low.c (linux_detach_one_lwp): Call
9808 the_low_target.prepare_to_resume before detaching.
9809
712c6575
YQ
98102011-12-14 Yao Qi <yao@codesourcery.com>
9811
9812 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9813 of write.
9814
d54d1edf
YQ
98152011-12-14 Yao Qi <yao@codesourcery.com>
9816
9817 * i386-low.c (i386_low_stopped_data_address): Initialize local
9818 variable `control'.
9819
6210a125
PA
98202011-12-13 Pedro Alves <pedro@codesourcery.com>
9821
9822 PR remote/13492
9823
9824 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9825 DR_CONTROL unless necessary. Extend comments.
9826 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9827 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9828
2ece8244
YQ
98292011-12-13 Yao Qi <yao@codesourcery.com>
9830
9831 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9832 macros.
9833 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9834
784867a5
JK
98352011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9836
9837 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9838 Print new debug message for such case.
9839
6bf36717
JK
98402011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9841
9842 Fix overlapping memcpy.
9843 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9844 the read_inferior_memory transfer.
9845 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9846 write_inferior_memory transfer.
9847 (set_fast_tracepoint_jump): New variable buf. Use it for the
9848 read_inferior_memory and write_inferior_memory transfers.
9849 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9850 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9851 Use it for the write_inferior_memory transfer.
9852 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9853 buffers.
9854
50275556
MR
98552011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9856
9857 * linux-low.c (fetch_register, store_register): Make code
9858 consistent, fix formatting.
9859
7325beb4
MR
98602011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9861
9862 * linux-low.c (usr_store_inferior_registers): Factor out code
9863 to handle individual registers into...
9864 (store_register): ... this new function.
9865
c642a434
UW
98662011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9867
9868 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9869 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9870 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9871 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9872 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9873 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9874 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9875 (srv_xmlfiles): Add new XML files.
9876
9877 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9878 and <sys/uio.h>.
9879 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9880 (init_registers_s390_linux32v1): Add prototype.
9881 (init_registers_s390_linux32v2): Likewise.
9882 (init_registers_s390_linux64v1): Likewise.
9883 (init_registers_s390_linux64v2): Likewise.
9884 (init_registers_s390x_linux64v1): Likewise.
9885 (init_registers_s390x_linux64v2): Likewise.
9886 (s390_num_regs): Increment to 52.
9887 (s390_regmap): Add orig_r2 register.
9888 (s390_num_regs_3264): Increment to 68.
9889 (s390_regmap_3264): Add orig_r2 register.
9890 (s390_collect_ptrace_register): Handle orig_r2 register.
9891 (s390_supply_ptrace_register): Likewise.
9892 (s390_fill_last_break): New function.
9893 (s390_store_last_break): Likewise.
9894 (s390_fill_system_call): New function.
9895 (s390_store_system_call): Likewise.
9896 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9897 register sets.
9898 (s390_check_regset): New function.
9899 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9900 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9901 Update target_regsets for available register sets.
9902
2268b414
JK
99032011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9904 Jan Kratochvil <jan.kratochvil@redhat.com>
9905
9906 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9907 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9908 New.
9909 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9910 * linux-low.h (struct process_info_private): New member r_debug.
9911 * server.c (handle_qxfer_libraries): Call
9912 the_target->qxfer_libraries_svr4.
9913 (handle_qxfer_libraries_svr4): New function.
9914 (qxfer_packets): New entry "libraries-svr4".
9915 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9916 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9917 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9918 PACKET_qXfer_libraries_svr4.
9919
d6db1fab
UW
99202011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9921
9922 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9923 PSW address/mask between 8-byte and 16-byte formats.
9924 (s390_supply_ptrace_register): Likewise.
9925 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9926 basic addressing mode bit.
9927
242f5f1c
SS
99282011-11-24 Stan Shebs <stan@codesourcery.com>
9929
9930 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9931
f196051f
SS
99322011-11-17 Stan Shebs <stan@codesourcery.com>
9933
9934 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9935 (tracing_start_time): New global.
9936 (tracing_stop_time): New global.
9937 (tracing_user_name): New global.
9938 (tracing_notes): New global.
9939 (tracing_stop_note): New global.
9940 (cmd_qtstart): Set traceframe_usage, start_time.
9941 (stop_tracing): Set stop_time.
9942 (cmd_qtstatus): Report additional status.
9943 (cmd_qtp): New function.
9944 (handle_tracepoint_query): Call it.
9945 (cmd_qtnotes): New function.
9946 (handle_tracepoint_general_set): Call it.
9947 (get_timestamp): Rename from tsv_get_timestamp.
9948
405f8e94
SS
99492011-11-14 Stan Shebs <stan@codesourcery.com>
9950 Kwok Cheung Yeung <kcy@codesourcery.com>
9951
9952 * linux-x86-low.c (small_jump_insn): New.
9953 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9954 trampoline and error message, build a trampoline and issue a small
9955 jump instruction to it.
9956 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9957 trampoline and error message.
9958 (x86_get_min_fast_tracepoint_insn_len): New.
9959 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9960 * linux-low.h (struct linux_target_ops): Add arguments to
9961 install_fast_tracepoint_jump_pad operation, add new operation.
9962 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9963 arguments.
9964 (linux_get_min_fast_tracepoint_insn_len): New function.
9965 (linux_target_op): Add new operation.
9966 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9967 (gdb_trampoline_buffer_end): Ditto.
9968 (gdb_trampoline_buffer_error): Ditto.
9969 (struct ipa_sym_addresses): Add fields for new IPA variables.
9970 (symbol_list): Add entries for new IPA variables.
9971 (struct tracepoint): Add fields to hold the address range of the
9972 trampoline used by the tracepoint.
9973 (trampoline_buffer_head): New static variable.
9974 (trampoline_buffer_tail): Ditto.
9975 (claim_trampoline_space): New function.
9976 (have_fast_tracepoint_trampoline_buffer): New function.
9977 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9978 structure.
9979 (install_fast_tracepoint): Ditto, also add error buffer argument.
9980 (cmd_qtminftpilen): New function.
9981 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9982 (fast_tracepoint_from_trampoline_address): New function.
9983 (fast_tracepoint_collecting): Handle trampoline as part of jump
9984 pad space.
9985 (set_trampoline_buffer_space): New function.
9986 (initialize_tracepoint): Initialize new IPA variables.
9987 * target.h (struct target_ops): Add arguments to
9988 install_fast_tracepoint_jump_pad operation, add new
9989 get_min_fast_tracepoint_insn_len operation.
9990 (target_get_min_fast_tracepoint_insn_len): New.
9991 (install_fast_tracepoint_jump_pad): Add arguments.
9992 * server.h (IPA_BUFSIZ): Define.
9993 * linux-i386-ipa.c: Include extra header files.
9994 (initialize_fast_tracepoint_trampoline_buffer): New function.
9995 (initialize_low_tracepoint): Call it.
9996 * server.h (set_trampoline_buffer_space): Declare.
9997 (claim_trampoline_space): Ditto.
9998 (have_fast_tracepoint_trampoline_buffer): Ditto.
9999
1e4d1764
YQ
100002011-11-14 Yao Qi <yao@codesourcery.com>
10001
10002 * server.c (handle_query): Handle InstallInTrace for qSupported.
10003 * tracepoint.c (add_tracepoint): Sort list.
10004 (install_tracepoint, download_tracepoint): New.
10005 (cmd_qtdp): Call them to install and download tracepoints.
10006 (sort_tracepoints): Removed.
10007 (cmd_qtstart): Update.
10008
5c73ff4e
YQ
100092011-11-14 Yao Qi <yao@codesourcery.com>
10010
10011 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10012 * mem-break.h: Declare.
10013 * tracepoint.c (cmd_qtstart): Move some code to ...
10014 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10015 New.
10016 (download_tracepoints): Move some code to ...
10017 (download_tracepoint_1): ... here. New.
10018
86a30030
YQ
100192011-11-08 Yao Qi <yao@codesourcery.com>
10020
10021 * remote-utils.c (relocate_instruction): A comment fix.
10022
8d26e50c
JB
100232011-11-07 Joel Brobecker <brobecker@adacore.com>
10024
10025 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10026 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10027 dr_status_mirror and dr_control_mirror from debug_reg_state.
10028 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10029 (i386_initial_stuff): Remove use of deleted globals.
10030 (i386_get_thread_context, i386_set_thread_context,
10031 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10032 from debug_reg_state.
10033
a59306a3
YQ
100342011-11-05 Yao Qi <yao@codesourcery.com>
10035
10036 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10037 address as TPOINT's.
10038
3065dfb6
SS
100392011-11-02 Stan Shebs <stan@codesourcery.com>
10040
10041 * tracepoint.c (agent_mem_read_string): New function.
10042 (eval_agent_expr): Call it for tracenz.
10043 * server.c (handle_query): Report support for tracenz.
10044
fd0d8c7c
YQ
100452011-11-02 Yao Qi <yao@codesourcery.com>
10046
10047 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10048
609086b1
YQ
100492011-11-02 Yao Qi <yao@codesourcery.com>
10050
10051 * target.h: Fix a typo in comment.
10052
b9fd1791
PA
100532011-10-31 Pedro Alves <pedro@codesourcery.com>
10054
10055 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10056 clobber the breakpoints' shadows with fast tracepoint jumps.
10057 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10058 * target.c (write_inferior_memory): Also pass MYADDR down to
10059 check_mem_write.
10060
03583c20
UW
100612011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10062
10063 * configure.ac: Check support for personality routine.
10064 * configure: Regenerate.
10065 * config.in: Likewise.
10066 * linux-low.c: Include <sys/personality.h>.
10067 Define ADDR_NO_RANDOMIZE if necessary.
10068 (linux_create_inferior): Disable address space randomization when
10069 forking inferior, if requested.
10070 (linux_supports_disable_randomization): New function.
10071 (linux_target_ops): Install it.
10072 * server.h (disable_randomization): Declare.
10073 * server.c (disable_randomization): New global variable.
10074 (handle_general_set): Handle QDisableRandomization.
10075 (handle_query): Likewise for qSupported.
10076 (main): Support --disable-randomization and --no-disable-randomization
10077 command line arguments.
10078 * target.h (struct target_ops): Add supports_disable_randomization.
10079 (target_supports_disable_randomization): New macro.
10080
723b724b
MF
100812011-09-29 Mike Frysinger <vapier@gentoo.org>
10082
10083 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10084 ifdef check.
10085 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10086 [!PT_GETDSBT] (target_loadmap): New definition.
10087 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10088 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10089 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10090 and PT_GETDSBT to LINUX_LOADMAP.
10091 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10092 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10093
55329a5c 100942011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10095
10096 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10097 (arm_linux_hwbp_cap): New static variable.
10098 (arm_linux_get_hwbp_cap): Replace by ...
10099 (arm_linux_init_hwbp_cap): ... this new function.
10100 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10101 (arm_linux_get_hw_watchpoint_count): Likewise.
10102 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10103 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10104 (arm_prepare_to_resume): Use perror_with_name instead of error.
10105
55329a5c 101062011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10107
10108 * linux-arm-low.c: Include <signal.h>.
10109 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10110 (struct arm_linux_hwbp_cap): New data type.
10111 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10112 (struct arm_linux_hw_breakpoint): New data type.
10113 (MAX_BPTS, MAX_WPTS): Define.
10114 (struct arch_process_info, struct arch_lwp_info): New data types.
10115 (arm_linux_get_hwbp_cap): New function.
10116 (arm_linux_get_hw_breakpoint_count): Likewise.
10117 (arm_linux_get_hw_watchpoint_count): Likewise.
10118 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10119 (arm_hwbp_control_initialize): Likewise.
10120 (arm_hwbp_control_is_enabled): Likewise.
10121 (arm_hwbp_control_is_initialized): Likewise.
10122 (arm_hwbp_control_disable): Likewise.
10123 (arm_linux_hw_breakpoint_equal): Likewise.
10124 (arm_linux_hw_point_initialize): Likewise.
10125 (struct update_registers_data): New data structure.
10126 (update_registers_callback: New function.
10127 (arm_insert_point): Likewise.
10128 (arm_remove_point): Likewise.
10129 (arm_stopped_by_watchpoint): Likewise.
10130 (arm_stopped_data_address): Likewise.
10131 (arm_new_process): Likewise.
10132 (arm_new_thread): Likewise.
10133 (arm_prepare_to_resume): Likewise.
10134 (the_low_target): Register arm_insert_point, arm_remove_point,
10135 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10136 arm_new_thread, and arm_prepare_to_resume.
10137
6b9801d4
SS
101382011-09-15 Stan Shebs <stan@codesourcery.com>
10139
10140 * server.h (struct emit_ops): Add compare-goto fields.
10141 * tracepoint.c (gdb_agent_op_sizes): New table.
10142 (emit_eq_goto): New function.
10143 (emit_ne_goto): New function.
10144 (emit_lt_goto): New function.
10145 (emit_le_goto): New function.
10146 (emit_gt_goto): New function.
10147 (emit_ge_goto): New function.
10148 (is_goto_target): New function.
10149 (compile_bytecodes): Recognize special cases of compare-goto
10150 combinations and call specialized emitters for them.
10151 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10152 (amd64_emit_ne_goto): New function.
10153 (amd64_emit_lt_goto): New function.
10154 (amd64_emit_le_goto): New function.
10155 (amd64_emit_gt_goto): New function.
10156 (amd64_emit_ge_goto): New function.
10157 (amd64_emit_ops): Add the new functions.
10158 (i386_emit_eq_goto): New function.
10159 (i386_emit_ne_goto): New function.
10160 (i386_emit_lt_goto): New function.
10161 (i386_emit_le_goto): New function.
10162 (i386_emit_gt_goto): New function.
10163 (i386_emit_ge_goto): New function.
10164 (i386_emit_ops): Add the new functions.
10165
bf15cbda
SS
101662011-09-08 Stan Shebs <stan@codesourcery.com>
10167
10168 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10169 (i386_emit_epilogue): Restore %ebx.
10170
943ca1dd
JZ
101712011-08-31 Jie Zhang <jzhang918@gmail.com>
10172
10173 * server.c (step_thread): Remove definition.
10174 (process_serial_event): Don't handle Hs.
10175 * server.h (step_thread): Remove declaration.
10176 * target.c (set_desired_inferior): Remove use of step_thread.
10177
e3deef73
LM
101782011-08-24 Luis Machado <lgustavo@codesourcery.com>
10179
10180 * linux-low.c: Include linux-procfs.h.
10181 (linux_attach_lwp_1): Update comments.
10182 (linux_attach): Scan for existing threads when attaching to a
10183 process that is the tgid.
10184 * Makefile.in: Update dependencies.
10185
13da1c97
LM
101862011-08-24 Luis Machado <lgustavo@codesourcery.com>
10187
10188 * configure.srv: Add linux-procfs.o dependencies.
10189
881127c9
YQ
101902011-08-14 Yao Qi <yao@codesourcery.com>
10191
10192 * target.h (struct target_ops): Fix indent.
10193 * win32-low.c (win32_target_ops): Fix comment.
10194
58dbd541
YQ
101952011-08-14 Andrew Jenner <andrew@codesourcery.com>
10196 Yao Qi <yao@codesourcery.com>
10197
10198 * Makefile.in (clean): Remove tic6x-*.c files.
10199 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10200 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10201 (tic6x-c64xp-linux.c): Likewise.
10202 * configure.srv: Add support for tic6x-*-uclinux.
10203 * linux-tic6x-low.c: New.
10204 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10205
78d85199
YQ
102062011-08-14 Andrew Stubbs <ams@codesourcery.com>
10207 Yao Qi <yao@codesourcery.com>
10208
10209 * target.h (struct target_ops): Add read_loadmap.
10210 * linux-low.c (struct target_loadseg): New type.
10211 (struct target_loadmap): New type.
10212 (linux_read_loadmap): New function.
10213 (linux_target_ops): Add linux_read_loadmap.
10214 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10215 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10216 to NULL.
78d85199 10217
a959a88d
EZ
102182011-08-05 Eli Zaretskii <eliz@gnu.org>
10219
10220 * win32-low.c: Include <stdint.h>.
10221
1ced966e
PA
102222011-07-22 Pedro Alves <pedro@codesourcery.com>
10223
10224 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10225 to the inferior here.
10226 (i386_remove_aligned_watchpoint): Ditto.
10227 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10228 fit part of the watchpoint in the debug registers.
10229 (i386_update_inferior_debug_regs): New.
10230 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10231 registers, and only update the inferior on success.
10232 (i386_low_remove_watchpoint): Ditto.
10233
d26e3629
KY
102342011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10235
10236 * linux-low.c (compare_ints, unique, list_threads, show_process,
10237 linux_core_of_thread): Delete.
10238 (linux_target_ops): Change linux_core_of_thread to
10239 linux_common_core_of_thread.
10240 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10241 * utils.c (malloc_failure): Change type of argument.
10242 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10243 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10244 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10245 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10246 (IPA_OBJS): Add common-utils-ipa.o.
10247 (ptid_h, linux_osdata_h): New macros.
10248 (server_h): Add common/common-utils.h, common/xml-utils.h,
10249 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10250 common/ptid.h.
10251 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10252 ptid.o, buffer.o): New rules.
10253 (linux-low.o): Add common/linux-osdata.h as a dependency.
10254 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10255 * configure.ac: Add AC_HEADER_DIRENT check.
10256 * config.in: Regenerate.
10257 * configure: Regenerate.
10258 * remote-utils.c (xml_escape_text): Delete.
10259 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10260 buffer_xml_printf): Move to common/buffer.c.
10261 * server.c (main): Remove call to initialize_inferiors.
10262 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10263 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10264 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10265 internal_error, gdb_assert, gdb_assert_fail): Delete.
10266 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10267 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10268 common/buffer.h.
10269 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10270 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10271 initialize_inferiors): Delete.
10272
2275a1a7
PA
102732011-07-20 Pedro Alves <pedro@codesourcery.com>
10274
10275 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10276 symbol error.
10277
0a5b1e09
PA
102782011-05-31 Pedro Alves <pedro@codesourcery.com>
10279
10280 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10281 assertion.
10282 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10283
6938fd34
YQ
102842011-05-26 Yao Qi <yao@codesourcery.com>
10285
10286 * Makefile.in (thread-db.o): Track dependence to
10287 common/gdb_thread_db.h.
10288 * thread-db.c: include gdb_thread_db.h from right place.
10289
b481f9e0
TT
102902011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10291
10292 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10293 __FILE__ and __LINE__ to internal_error.
10294
98a5dd13
DE
102952011-05-13 Doug Evans <dje@google.com>
10296
10297 * thread-db.c (try_thread_db_load_from_sdir): New function.
10298 (try_thread_db_load_from_dir): New function.
10299 (thread_db_load_search): Handle $sdir, ignore $pdir.
10300 Remove trying of system directories if search of
10301 libthread-db-search-path fails, that is now done via $sdir.
10302
d248b706
KY
103032011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10304
10305 * server.c (handle_query): Add EnableDisableTracepoints to the list
10306 of supported features.
43aaf8b6 10307 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10308 tracepoints.
43aaf8b6
PA
10309 (cmd_qtenable_disable): New.
10310 (cmd_qtstart): Install tracepoints even if disabled.
10311 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10312 receiving a QTEnable or QTDisable packet.
10313 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10314 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10315 tracepoints.
10316 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10317
84e578fb
DE
103182011-05-10 Doug Evans <dje@google.com>
10319
10320 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10321
71f55dd8
DE
103222011-05-04 Doug Evans <dje@google.com>
10323
10324 * linux-low.c (linux_join): Skip process lookup.
10325 * spu-low.c (spu_join): Ditto.
10326 * server.c (join_inferiors_callback): Delete.
10327 (process_serial_event): For 'D' packet (detach) call join_inferior
10328 directly.
10329
4d393d60
JM
103302011-05-04 Joseph Myers <joseph@codesourcery.com>
10331
10332 * README: Don't mention xscale*-*-linux*.
10333 * configure.srv (xscale*-*-linux*): Don't handle target.
10334
b00ad6ff
NF
103352011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10336
10337 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10338 casting pointers.
10339 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10340 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10341 (i386_emit_void_call_2): Likewise.
10342
af96c192
YQ
103432011-04-26 Yao Qi <yao@codesourcery.com>
10344
43aaf8b6
PA
10345 * linux-low.c: Move common macros to linux-ptrace.h.
10346 Include linux-ptrace.h.
af96c192
YQ
10347 * Makefile.in (linux_ptrace_h): New.
10348 (linux-low.o): Depends on linux-ptrace.h.
10349
03f2bd59
JK
103502011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10351
10352 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10353 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10354 (remote_prepare): New function with most of the TCP code from ...
10355 (remote_open): ... here. Detect PORT here unconditionally. Move also
10356 setting transport_is_reliable.
10357 * server.c (run_once): New variable.
10358 (gdbserver_usage): Document it.
10359 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10360 the first run if RUN_ONCE.
10361 * server.h (run_once, remote_prepare): New declarations.
10362
7a9dd1b2
TT
103632011-04-19 Tom Tromey <tromey@redhat.com>
10364
10365 * win32-low.c (handle_load_dll): Remove duplicate "the".
10366
81239425
PM
103672011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10368
10369 Remove support for old Cygwin 1.5 versions.
10370 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10371 function to avoid warning.
10372 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10373 warning.
10374
9e0627f1
PM
103752011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10376
10377 * gdbserver/server.h (Macro _): Define it if not available.
10378
588eebee
MS
103792011-03-14 Michael Snyder <msnyder@vmware.com>
10380
348af9f7 10381 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10382
43f70d4c
JB
103832011-03-10 Joel Brobecker <brobecker@adacore.com>
10384
10385 * Makefile.in (maintainer-clean realclean distclean): Remove
10386 "make ... subdir_do" command.
10387
348af9f7
MS
103882011-03-10 Michael Snyder <msnyder@vmware.com>
10389
10390 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10391
10392 * server.c (handle_v_run): Free alloced buffer on early return.
10393
e637a4f5
YQ
103942011-03-09 Yao Qi <yao@codesourcery.com>
10395
10396 Revert:
10397 2011-03-04 Yao Qi <yao@codesourcery.com>
10398
10399 * Makefile.in: Remove GNU make feature --directory.
10400
10401 2011-03-05 Yao Qi <yao@codesourcery.com>
10402
10403 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10404 (subdir_do): New make target. Copied from gdb/Makefile.
10405 (maintainer-clean, realclean, distclean, clean): Call corresponding
10406 make targets in common/Makefile.
10407
10408 2011-02-11 Yao Qi <yao@codesourcery.com>
10409
10410 * configure.ac: Call AC_PROG_RANLIB.
10411 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10412 * configure: Regenerate.
10413
e6edda56
JK
104142011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10415
10416 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10417
e5141119
JB
104182011-03-06 Yao Qi <yao@codesourcery.com>
10419
10420 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10421
64794aa4
JB
104222011-03-05 Yao Qi <yao@codesourcery.com>
10423
10424 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10425 (subdir_do): New make target. Copied from gdb/Makefile.
10426 (maintainer-clean, realclean, distclean, clean): Call corresponding
10427 make targets in common/Makefile.
10428
7a762829
YQ
104292011-03-04 Yao Qi <yao@codesourcery.com>
10430
10431 * Makefile.in: Remove GNU make feature --directory.
10432
348af9f7
MS
104332011-03-04 Michael Snyder <msnyder@vmware.com>
10434
10435 * server.c (queue_stop_reply): Call xmalloc not malloc.
10436
104372011-03-02 Michael Snyder <msnyder@vmware.com>
10438
10439 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10440
9f72fee2
MS
104412011-02-28 Michael Snyder <msnyder@vmware.com>
10442
588eebee
MS
10443 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10444 (cmd_qtframe): Ditto.
10445 (cmd_qtbuffer): Ditto.
10446 (cmd_bigqtbuffer): Ditto.
10447
9f72fee2
MS
10448 * utils.c (decimal2str): Initialize 'width' to nine, then
10449 don't mess with it.
10450
8040bd49
UW
104512011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10452
10453 * hostio.c (require_data): Free *data, not data.
10454
7e52cbd0
JK
104552011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10456
10457 * hostio.c (require_data): Use free, not xfree.
10458
9130f83e
MS
104592011-02-27 Michael Snyder <msnyder@vmware.com>
10460
4b812f4e
MS
10461 * server.c (handle_query): Discard unused value.
10462
9130f83e
MS
10463 * hostio.c (require_data): Free malloc memory before returning
10464 error.
10465
69d37113
MS
104662011-02-26 Michael Snyder <msnyder@vmware.com>
10467
10468 * linux-low.c (list_threads): Call closedir for dirent.
10469
35f5825a
MS
104702011-02-27 Michael Snyder <msnyder@vmware.com>
10471
2a589cef
MS
10472 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10473 a case statement falls through.
10474
0adea5f7
MS
10475 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10476
35f5825a
MS
10477 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10478 in comparison.
10479
238f1c74
MS
104802011-02-26 Michael Snyder <msnyder@vmware.com>
10481
10482 * utils.c (decimal2str): Eliminate dead code and dead param.
10483 (pulongest): Drop dead param from call to decimal2str.
10484 (plongest): Ditto.
10485
633ff500
JB
104862011-02-24 Joel Brobecker <brobecker@adacore.com>
10487
10488 Revert the following patch (not approved yet):
10489 2011-02-21 Hui Zhu <teawater@gmail.com>
10490 * tracepoint.c (tp_printf): New function.
10491 (eval_agent_expr): Handle gdb_agent_op_printf.
10492
f9c6ff72
HZ
104932011-02-21 Hui Zhu <teawater@gmail.com>
10494
10495 * tracepoint.c (tp_printf): New function.
10496 (eval_agent_expr): Handle gdb_agent_op_printf.
10497
94d5e490
TT
104982011-02-18 Tom Tromey <tromey@redhat.com>
10499
10500 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10501 (tracepoint.o): Likewise.
10502 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10503 (gdb_agent_op_names): Likewise.
10504
c7f96d2b
TT
105052011-02-18 Tom Tromey <tromey@redhat.com>
10506
10507 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10508 gdb_agent_op_rot>: New constants.
10509 (gdb_agent_op_names): Add pick and roll.
10510 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10511 cases.
10512
0feedb2c
JK
105132011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10514
10515 * aclocal.m4: Regenerated with aclocal-1.11.1.
10516
b3b9301e
PA
105172011-02-14 Pedro Alves <pedro@codesourcery.com>
10518
10519 * server.c (handle_qxfer_traceframe_info): New.
10520 (qxfer_packets): Register "traceframe-info".
10521 (handle_query): Report support for qXfer:traceframe-info:read+.
10522 * tracepoint.c (match_blocktype): New.
10523 (traceframe_find_block_type): Rename to ...
10524 (traceframe_walk_blocks): ... this. Add callback filter argument,
10525 and use it.
10526 (traceframe_find_block_type): New, reimplemented on top of
10527 traceframe_walk_blocks.
10528 (build_traceframe_info_xml): New.
10529 (traceframe_read_info): New.
10530 * server.h (traceframe_read_info): Declare.
10531
4f3e6fb7
YQ
105322011-02-11 Yao Qi <yao@codesourcery.com>
10533
10534 * configure.ac: Call AC_PROG_RANLIB.
10535 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10536 * configure: Regenerate.
10537
764880b7
PA
105382011-02-07 Pedro Alves <pedro@codesourcery.com>
10539
10540 * server.c (gdb_read_memory): Change return semantics to allow
10541 partial transfers.
10542 (handle_search_memory_1): Adjust.
10543 (process_serial_event) <'m' packet>: Handle partial transfers.
10544 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10545
1c79eb8a
PA
105462011-01-28 Pedro Alves <pedro@codesourcery.com>
10547
10548 * regcache.c (init_register_cache): Initialize
10549 regcache->register_status.
10550 (free_register_cache): Release regcache->register_status.
10551 (regcache_cpy): Copy register_status.
10552 (registers_to_string): Print 'x's for unavailable registers.
10553 (supply_register): Mark the register's status valid or
10554 unavailable, depending on whether a buffer was passed in or not.
10555 (supply_register_zeroed): New.
10556 (supply_regblock): Mark the registers' status valid or
10557 unavailable, depending on whether a buffer was passed in or not.
10558 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10559 (struct regcache): New `register_status' field.
10560 (supply_register_zeroed): Declare.
10561 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10562 supply_register_zeroed, rather than passing a NULL buffer to
10563 supply_register.
10564 * tracepoint.c (fetch_traceframe_registers): Update comment.
10565
85724a0e
PA
105662011-01-28 Pedro Alves <pedro@codesourcery.com>
10567
10568 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10569 buffer explicit.
10570
d08aafef
PA
105712011-01-25 Pedro Alves <pedro@codesourcery.com>
10572
10573 * server.h (decode_xfer_write): Change prototype.
10574 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10575 and don't extract the annex here.
10576 * server.c (decode_xfer_read): Remove `annex' parameter,
10577 and don't extract the annex here.
10578 (decode_xfer): New.
10579 (struct qxfer): New.
10580 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10581 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10582 (handle_qxfer_statictrace): New functions, abstracted out from
10583 handle_query, and made to use the struct qxfer interface.
10584 (handle_threads_qxfer_proper): Rename to ...
10585 (handle_qxfer_threads_proper): ... this.
10586 (handle_threads_qxfer): Rename to ...
10587 (handle_qxfer_threads): ... this. Adjust.
10588 (qxfer_packets): New array.
10589 (handle_qxfer): New function.
10590 (handle_query): Use handle_qxfer.
10591
493e2a69
MS
105922011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10593
10594 * gdbreplay.c: Shorten lines of >= 80 columns.
10595 * linux-low.c: Ditto.
10596 * linux-ppc-low.c: Ditto.
10597 * linux-s390-low.c: Ditto.
10598 * linux-sparc-low.c: Ditto.
10599 * linux-x86-low.c: Ditto.
10600 * linux-xtensa-low.c: Ditto.
10601 * mem-break.c: Ditto.
10602 * nto-low.c: Ditto.
10603 * regcache.h: Ditto.
10604 * remote-utils.c: Ditto.
10605 * server.c: Ditto.
10606 * server.h: Ditto.
10607 * thread-db.c: Ditto.
10608 * tracepoint.c: Ditto.
10609 * utils.c: Ditto.
10610 * win32-low.h: Ditto.
10611
44944448
JB
106122011-01-05 Joel Brobecker <brobecker@adacore.com>
10613
10614 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10615 update.
10616
71ce852c
JB
106172011-01-01 Joel Brobecker <brobecker@adacore.com>
10618
10619 * server.c (gdbserver_version): Update copyright year in version
10620 output.
10621 * gdbreplay.c (gdbreplay_version): Ditto.
10622
eb826dc6
MF
106232010-12-29 Jie Zhang <jie.zhang@analog.com>
10624
10625 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10626 * linux-bfin-low.c: New file.
10627 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10628 PT_DATA_ADDR for BFIN targets.
10629 * Makefile.in (SFILES): Add linux-bfin-low.c.
10630 (clean): Remove reg-bfin.c.
10631 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10632 * README: Mention supported Blackfin targets.
10633
39ab222a
MF
106342010-12-23 Mike Frysinger <vapier@gentoo.org>
10635
10636 * .gitignore: New file.
10637
a1f2ce7d
MF
106382010-11-16 Mike Frysinger <vapier@gentoo.org>
10639
10640 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10641
f474844c
JZ
106422010-10-22 Jie Zhang <jie@codesourcery.com>
10643
10644 * Makefile.in: Add FLAGS_TO_PASS variable.
10645 (install): Remove dependency of install-only and recursively
10646 invoke make for install-only.
10647
f1048712
DE
106482010-10-04 Doug Evans <dje@google.com>
10649
10650 * Makefile.in (uninstall): Use $(DESTDIR).
10651
b53a1623
PA
106522010-09-24 Pedro Alves <pedro@codesourcery.com>
10653
e6ee044d
PA
10654 PR gdb/11842
10655
b53a1623
PA
10656 * linux-x86-low.c (compat_siginfo_from_siginfo)
10657 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10658 si_code is < 0. Check for si_code == SI_TIMER before checking for
10659 si_code < 0.
10660
fa1bd1e4
JB
106612010-09-13 Joel Brobecker <brobecker@adacore.com>
10662
10663 * lynx-i386-low.c: New file.
10664 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10665
47fac8f8
JB
106662010-09-13 Joel Brobecker <brobecker@adacore.com>
10667
10668 * lynx-low.c (ptrace_request_to_str): Remove handling for
10669 request values that have been removed in LynxOS 5.x.
10670
1adfc54d
JB
106712010-09-13 Joel Brobecker <brobecker@adacore.com>
10672
10673 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10674 <ptrace.h>
10675
c2a66c29
NS
106762010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10677
10678 * configure.ac: Add --enable-inprocess-agent option.
10679 * configure: Rebuilt.
10680
32fcada3
YQ
106812010-09-06 Yao Qi <yao@codesourcery.com>
10682
10683 * linux-low.c (linux_kill): Remove unused variable.
10684 (linux_stabilize_threads): Likewise.
10685 * server.c (start_inferior): Likewise.
10686 (queue_stop_reply_callback): Likewise.
10687 * tracepoint.c (do_action_at_tracepoint): Likewise.
10688
0cccb683
YQ
106892010-09-06 Yao Qi <yao@codesourcery.com>
10690
10691 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10692 on return.
10693
423ec54c
JK
106942010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10695
10696 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10697
12ac6819
PA
106982010-09-06 Pedro Alves <pedro@codesourcery.com>
10699
10700 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10701 "$(IPA_DEPFILES)".
10702
8ed54b31
JB
107032010-09-01 Joel Brobecker <brobecker@adacore.com>
10704
10705 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10706 gdbserver/lynx-ppc-low.c: New files.
10707 * Makefile.in (lynx_low_h): New variable.
10708 (lynx-low.o, lynx-ppc-low.o): New rules.
10709 * configure.ac: On LynxOS, link with -lnetinet.
10710 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10711 * configure: regenerate.
10712
bb0116a4
JB
107132010-09-01 Joel Brobecker <brobecker@adacore.com>
10714
10715 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10716 * configure.ac: Add check for vasprintf and vsnprintf.
10717 * configure, config.in: Regenerate.
10718 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10719
a778ab81 107202010-09-01 Joel Brobecker <brobecker@adacore.com>
10721
10722 * gdbreplay.c: Move include of alloca.h up, next to include of
10723 malloc.h.
10724 * server.h: Add include of malloc.h.
10725 * mem-break.c: Remove include of malloc.h.
10726 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10727
8b034a19 107282010-09-01 Joel Brobecker <brobecker@adacore.com>
10729
10730 * Makefile.in (memmem.o): Build with -Wno-error.
10731
107322010-09-01 Joel Brobecker <brobecker@adacore.com>
10733
10734 * utils.c (xsnprintf): Make non-static.
10735 * server.h: Add xsnprintf declaration.
10736 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10737 replace calls to snprintf by calls to xsnprintf throughout.
10738
107392010-09-01 Joel Brobecker <brobecker@adacore.com>
10740
10741 * configure.ac: Add configure check for alloca.
10742 * configure, config.in: Regenerate.
10743 * server.h: Include alloca.h if it exists.
10744 * gdbreplay.c: Include alloca.h if it exists.
10745
1a981360
PA
107462010-08-28 Pedro Alves <pedro@codesourcery.com>
10747
10748 * linux-low.c (__SIGRTMIN): Define if not already defined.
10749 (linux_create_inferior): Check for __ANDROID__ rather than
10750 __SIGRTMIN.
10751 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10752 are already deferred.
10753 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10754 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10755 stopped and already has a pending signal to report.
10756 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10757 a pending signal to report or is moving out of a jump pad.
10758 (linux_init_signals): Check for __ANDROID__ rather than
10759 __SIGRTMIN.
10760
b4d51a55
PA
107612010-08-28 Pedro Alves <pedro@codesourcery.com>
10762
10763 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10764 debug_threads check. Avoid a linear search when not doing debug
10765 output.
10766
ec48365d
PA
107672010-08-27 Pedro Alves <pedro@codesourcery.com>
10768
10769 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10770 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10771 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10772 (process_event): Change local fd's type to gdb_fildes_t.
10773 (create_file_handler): Adjust prototype.
10774 (delete_file_handler): Adjust prototype.
10775 (handle_file_event): Adjust prototype. Use pfildes.
10776 (create_file_event): Adjsut prototype.
10777 * remote-utils.c (remote_desc, listen_desc): Change type to
10778 gdb_fildes_t.
10779 * server.h: New gdb_fildes_t typedef.
10780 [USE_WIN32API]: Include winsock2.h.
10781 (delete_file_handler, add_file_handler): Adjust prototypes.
10782 (pfildes): Declare.
10783 * utils.c (pfildes): New.
10784
854d88f0
PA
107852010-08-27 Pedro Alves <pedro@codesourcery.com>
10786
10787 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10788 * configure: Regenerate.
10789
0146f85b
PA
107902010-08-27 Pedro Alves <pedro@codesourcery.com>
10791
10792 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10793 (linux_done_accessing_memory): ... this.
10794 (linux_target_ops): Adjust.
10795 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10796 * nto-low.c (nto_target_ops): Adjust comment.
10797 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10798 * spu-low.c (spu_target_ops): Adjust comment.
10799 * target.h (target_ops): Rename unprepare_to_access_memory field
10800 to done_accessing_memory.
10801 (unprepare_to_access_memory): Rename to ...
10802 (done_accessing_memory): ... this.
10803
90d74c30
PA
108042010-08-26 Pedro Alves <pedro@codesourcery.com>
10805
10806 * linux-low.c (linux_prepare_to_access_memory): New.
10807 (linux_unprepare_to_access_memory): New.
10808 (linux_target_ops): Install them.
10809 * server.c (read_memory): Rename to ...
10810 (gdb_read_memory): ... this. Use
10811 prepare_to_access_memory/prepare_to_access_memory.
10812 (write_memory): Rename to ...
10813 (gdb_write_memory): ... this. Use
10814 prepare_to_access_memory/prepare_to_access_memory.
10815 (handle_search_memory_1): Adjust.
10816 (process_serial_event): Adjust.
10817 * target.h (struct target_ops): New fields
10818 prepare_to_access_memory and unprepare_to_access_memory.
10819 (prepare_to_access_memory, unprepare_to_access_memory): New.
10820 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10821 prepare_to_access_memory/prepare_to_access_memory.
10822 * nto-low.c (nto_target_ops): Adjust.
10823 * spu-low.c (spu_target_ops): Adjust.
10824 * win32-low.c (win32_target_ops): Adjust.
10825
fd467969
PA
108262010-08-26 Pedro Alves <pedro@codesourcery.com>
10827
10828 * Makefile.in (WARN_CFLAGS): Get it from configure.
10829 (WERROR_CFLAGS): New.
10830 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10831 * configure.ac: Introduce --enable-werror, which adds -Werror to
10832 the compiler command line. Enabled by default. Disable with
10833 --disable-werror. Add -Wdeclaration-after-statement
10834 Wpointer-arith and -Wformat-nonliteral to warning flags.
10835 * configure: Regenerate.
10836
331e2f5f
PA
108372010-08-26 Pedro Alves <pedro@codesourcery.com>
10838
10839 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10840
e581f2b4
PA
108412010-08-26 Pedro Alves <pedro@codesourcery.com>
10842
10843 * gdbreplay.c (remote_error): New.
10844 (gdbchar): New.
10845 (expect): Use gdbchar. Check for error reading from GDB.
10846 Clarify sync error output.
10847 (play): Check for errors writing to GDB.
10848 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10849 * remote-utils.c (getpkt): Check for errors writing to the remote
10850 descriptor.
10851
3c11dd79
PA
108522010-08-25 Pedro Alves <pedro@codesourcery.com>
10853
10854 * linux-low.c (linux_wait_1): Move non-debugging code out of
10855 `debug_threads' control.
10856
d20a8ad9
PA
108572010-08-25 Pedro Alves <pedro@codesourcery.com>
10858
10859 * linux-low.c (linux_wait_1): Don't set last_status here.
10860 * server.c (push_event, queue_stop_reply_callback): Assert we're
10861 not pushing a TARGET_WAITKIND_IGNORE event.
10862 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10863 (myresume, handle_target_event): Set the thread's last_resume_kind
10864 and last_status from the target returned status.
10865
964e4306
PA
108662010-08-25 Pedro Alves <pedro@codesourcery.com>
10867
10868 PR threads/10729
10869
10870 * linux-x86-low.c (update_debug_registers_callback): New.
10871 (i386_dr_low_set_addr): Use it.
10872 (i386_dr_low_get_addr): New.
10873 (i386_dr_low_set_control): Use update_debug_registers_callback.
10874 (i386_dr_low_get_control): New.
10875 (i386_dr_low_get_status): Adjust.
10876 * linux-low.c (linux_stop_lwp): New.
10877 * linux-low.h (linux_stop_lwp): Declare.
10878
10879 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10880 argument instead of a i386_debug_reg_state.
10881 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10882 a i386_debug_reg_state.
10883 (i386_insert_aligned_watchpoint): Adjust.
10884 (i386_remove_aligned_watchpoint): Adjust.
10885 (i386_low_stopped_data_address): Read the debug registers from the
10886 inferior instead of from the mirrors.
10887 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10888 (i386_dr_low_get_addr): Declare.
10889 (i386_dr_low_get_control): Declare.
10890 (i386_dr_low_get_status): Change prototype.
10891
10892 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10893 (i386_dr_low_get_addr): New.
10894 (i386_dr_low_get_control): New.
10895 (i386_dr_low_get_status): Adjust prototype. Return
10896 dr_status_mirror.
10897 (i386_initial_stuff): Clear dr_status_mirror and
10898 dr_control_mirror.
10899 (i386_get_thread_context): Adjust.
10900 (i386_set_thread_context): Adjust.
10901 (i386_thread_added): Adjust.
10902
5f21a75b
PA
109032010-08-24 Pedro Alves <pedro@codesourcery.com>
10904
10905 * linux-low.h (linux_thread_area): Delete declaration.
10906
3e4c1235
TS
109072010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10908
10909 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10910 after its termination.
10911
1971b033
PA
109122010-08-09 Pedro Alves <pedro@codesourcery.com>
10913
10914 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10915 (gdb_wants_all_stopped): Delete.
10916 (linux_wait_1): Don't call them.
10917 * server.c (handle_v_cont): Tag all threads as want-stopped.
10918 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10919 stopped as "client-wants-stopped".
10920
310444ac
PA
109212010-07-31 Pedro Alves <pedro@codesourcery.com>
10922
10923 * Makefile.in (signals_h): New.
10924 (server_h): Depend on it.
10925 (server.o): Don't depend on $(signals_def).
10926 (signals.o): Depend on $(signals_def).
10927
a19cae16
JK
109282010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10929
10930 * Makefile.in (signals_def): New.
10931 (server_h): Append include/gdb/signals.h and signals_def.
10932 (server.o): Append signals_def.
10933
30d50328
JK
109342010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10935
10936 * server.c (handle_target_event): Use target_signal_to_host for
10937 resume_info.sig initialization.
10938 * target.h (struct thread_resume) <sig>: New comment.
10939
5c3216e2
OS
109402010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10941
c6f46ca0
OS
10942 * server.c (handle_query): strcpy() the returned string from paddress()
10943 instead of sprintf().
5c3216e2
OS
10944 * utils.c (paddress): Return phex_nz().
10945
6bd31874
JB
109462010-07-07 Joel Brobecker <brobecker@adacore.com>
10947
10948 * server.c (handle_v_cont): Call mourn_inferior if process
10949 just exited.
10950 (myresume): Likewise.
10951
0fb4aa4b
PA
109522010-07-01 Pedro Alves <pedro@codesourcery.com>
10953
10954 Static tracepoints, and integration with UST.
10955
10956 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10957 * mem-break.c (uninsert_all_breakpoints)
10958 (reinsert_all_breakpoints): New.
10959 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10960 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10961 (gdb_agent_ust_loaded, helper_thread_id)
10962 (gdb_agent_helper_thread_id): New macros.
10963 (struct ipa_sym_addresses): Add addr_ust_loaded,
10964 addr_helper_thread_id, addr_cmd_buf.
10965 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10966 (in_process_agent_loaded_ust): New.
10967 (write_e_ust_not_loaded): New.
10968 (maybe_write_ipa_ust_not_loaded): New.
10969 (struct collect_static_trace_data_action): New.
10970 (enum tracepoint_type) <static_tracepoint>: New.
10971 (struct tracepoint) <handle>: Mention static tracepoints.
10972 (struct static_tracepoint_ctx): New.
10973 (CMD_BUF_SIZE): New.
10974 (add_tracepoint_action): Handle static tracepoint actions.
10975 (unprobe_marker_at): New.
10976 (clear_installed_tracepoints): Handle static tracepoints.
10977 (cmd_qtdp): Handle static tracepoints.
10978 (probe_marker_at): New.
10979 (cmd_qtstart): Handle static tracepoints.
10980 (response_tracepoint): Handle static tracepoints.
10981 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10982 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10983 (get_context_regcache): Handle static tracepoints.
10984 (do_action_at_tracepoint): Handle static tracepoint actions.
10985 (traceframe_find_block_type): Handle static trace data blocks.
10986 (traceframe_read_sdata): New.
10987 (download_tracepoints): Download static tracepoint actions.
10988 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10989 (GDB_PROBE_NAME): New.
10990 (ust_ops): New.
10991 (GET_UST_SYM): New.
10992 (USTF): New.
10993 (dlsym_ust): New.
10994 (ust_marker_to_static_tracepoint): New.
10995 (gdb_probe): New.
10996 (collect_ust_data_at_tracepoint): New.
10997 (gdb_ust_probe): New.
10998 (UNIX_PATH_MAX, SOCK_DIR): New.
10999 (gdb_ust_connect_sync_socket): New.
11000 (resume_thread, stop_thread): New.
11001 (run_inferior_command): New.
11002 (init_named_socket): New.
11003 (gdb_ust_socket_init): New.
11004 (cstr_to_hexstr): New.
11005 (next_st): New.
11006 (first_marker, next_marker): New.
11007 (response_ust_marker): New.
11008 (cmd_qtfstm, cmd_qtsstm): New.
11009 (unprobe_marker_at, probe_marker_at): New.
11010 (cmd_qtstmat, gdb_ust_thread): New.
11011 (gdb_ust_init): New.
11012 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11013 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11014 (ST_REGENTRY): New.
11015 (x86_64_st_collect_regmap): New.
11016 (X86_64_NUM_ST_COLLECT_GREGS): New.
11017 (AMD64_RIP_REGNUM): New.
11018 (supply_static_tracepoint_registers): New.
11019 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11020 (ST_REGENTRY): New.
11021 (i386_st_collect_regmap): New.
11022 (i386_NUM_ST_COLLECT_GREGS): New.
11023 (supply_static_tracepoint_registers): New.
11024 * server.c (handle_query): Handle qXfer:statictrace:read.
11025 <qSupported>: Report support for StaticTracepoints, and
11026 qXfer:statictrace:read features.
11027 * server.h (traceframe_read_sdata)
11028 (supply_static_tracepoint_registers): Declare.
11029 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11030 (unpack_varlen_hex): Include in IPA build.
11031 * Makefile.in (ustlibs, ustinc): New.
11032 (IPA_OBJS): Add remote-utils-ipa.o.
11033 ($(IPA_LIB)): Link -ldl and -lpthread.
11034 (UST_CFLAGS): New.
11035 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11036 * config.in, configure: Regenerate.
11037
9e4344e5
PA
110382010-06-20 Ian Lance Taylor <iant@google.com>
11039 Pedro Alves <pedro@codesourcery.com>
11040
11041 * linux-x86-low.c (always_true): Delete.
11042 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11043 trying to fool the compiler with always_true.
11044
c6beb2cb
PA
110452010-06-20 Pedro Alves <pedro@codesourcery.com>
11046
11047 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11048 conditions in gdbserver.
11049
d2ed6730
UW
110502010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11051
11052 * spu-low.c (spu_read_memory): Wrap around local store limit.
11053 (spu_write_memory): Likewise.
11054
4e29fb54
PA
110552010-06-15 Pedro Alves <pedro@codesourcery.com>
11056
11057 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11058 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11059 LONGEST uses.
11060 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11061 uses.
11062 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11063 uses with LONGEST uses.
11064
6a271cae
PA
110652010-06-14 Stan Shebs <stan@codesourcery.com>
11066 Pedro Alves <pedro@codesourcery.com>
11067
11068 Bytecode compiler.
11069
11070 * linux-x86-low.c: Include limits.h.
11071 (add_insns): New.
11072 (always_true): New.
11073 (EMIT_ASM): New.
11074 (EMIT_ASM32): New.
11075 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11076 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11077 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11078 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11079 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11080 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11081 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11082 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11083 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11084 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11085 (amd64_emit_void_call_2): New.
11086 (amd64_emit_ops): New.
11087 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11088 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11089 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11090 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11091 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11092 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11093 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11094 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11095 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11096 (i386_emit_stack_adjust, i386_emit_int_call_1)
11097 (i386_emit_void_call_2): New.
11098 (i386_emit_ops): New.
11099 (x86_emit_ops): New.
11100 (the_low_target): Install x86_emit_ops.
11101 * server.h (struct emit_ops): New.
11102 (get_raw_reg_func_addr): Declare.
11103 (current_insn_ptr, emit_error): Declare.
11104 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11105 (set_trace_state_variable_value): New defines.
11106 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11107 addr_get_trace_state_variable_value and
11108 addr_set_trace_state_variable_value.
11109 (symbol_list): New fields for get_raw_reg,
11110 get_trace_state_variable_value and set_trace_state_variable_value.
11111 (condfn): New typedef.
11112 (struct tracepoint): New field `compiled_cond'.
11113 (do_action_at_tracepoint): Clear compiled_cond.
11114 (get_trace_state_variable_value, set_trace_state_variable_value):
11115 Export in the IPA.
11116 (condition_true_at_tracepoint): If there's a compiled condition,
11117 run that.
11118 (current_insn_ptr, emit_error): New globals.
11119 (struct bytecode_address): New.
11120 (get_raw_reg_func_addr): New.
11121 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11122 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11123 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11124 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11125 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11126 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11127 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11128 (compile_tracepoint_condition, compile_bytecodes): New.
11129 * target.h (emit_ops): Forward declare.
11130 (struct target_ops): New field emit_ops.
11131 (target_emit_ops): New.
11132 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11133 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11134 * linux-low.c (linux_emit_ops): New.
11135 (linux_target_ops): Install it.
11136 * linux-low.h (struct linux_target_ops): New field emit_ops.
11137
92b72907
UW
111382010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11139
11140 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11141 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11142
fa593d66
PA
111432010-06-01 Pedro Alves <pedro@codesourcery.com>
11144 Stan Shebs <stan@codesourcery.com>
11145
11146 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11147 (all): Depend on $(extra_libraries).
11148 (install-only): Install the IPA.
11149 (IPA_OBJS, IPA_LIB): New.
11150 (clean): Remove the IPA lib.
11151 (IPAGENT_CFLAGS): New.
11152 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11153 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11154 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11155 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11156 * configure.ac: Check for atomic builtins support in the compiler.
11157 (IPA_DEPFILES, extra_libraries): Define.
11158 * configure.srv (ipa_obj): Add description.
11159 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11160 (i[34567]86-*-linux*): Set ipa_obj.
11161 (x86_64-*-linux*): Set ipa_obj.
11162 * linux-low.c (stabilizing_threads): New.
11163 (supports_fast_tracepoints): New.
11164 (linux_detach): Stabilize threads before detaching.
11165 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11166 the lwp is either not stabilizing, or is moving out of a jump pad.
11167 (linux_fast_tracepoint_collecting): New.
11168 (maybe_move_out_of_jump_pad): New.
11169 (enqueue_one_deferred_signal): New.
11170 (dequeue_one_deferred_signal): New.
11171 (linux_wait_for_event_1): If moving out of a jump pad, defer
11172 pending signals to later.
11173 (linux_stabilize_threads): New.
11174 (linux_wait_1): Check if threads need moving out of jump pads, and
11175 do it if so.
11176 (stuck_in_jump_pad_callback): New.
11177 (move_out_of_jump_pad_callback): New.
11178 (lwp_running): New.
11179 (linux_resume_one_lwp): Handle moving out of jump pads.
11180 (linux_set_resume_request): Dequeue deferred signals.
11181 (need_step_over_p): Also step over fast tracepoint jumps.
11182 (start_step_over): Also uninsert fast tracepoint jumps.
11183 (finish_step_over): Also reinsert fast tracepoint jumps.
11184 (linux_install_fast_tracepoint_jump): New.
11185 (linux_target_ops): Install linux_stabilize_threads and
11186 linux_install_fast_tracepoint_jump_pad.
11187 * linux-low.h (linux_target_ops) <get_thread_area,
11188 install_fast_tracepoint_jump_pad>: New fields.
11189 (struct lwp_info) <collecting_fast_tracepoint,
11190 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11191 (linux_get_thread_area): Declare.
11192 * linux-x86-low.c (jump_insn): New.
11193 (x86_get_thread_area): New.
11194 (append_insns): New.
11195 (push_opcode): New.
11196 (amd64_install_fast_tracepoint_jump_pad): New.
11197 (i386_install_fast_tracepoint_jump_pad): New.
11198 (x86_install_fast_tracepoint_jump_pad): New.
11199 (the_low_target): Install x86_get_thread_area and
11200 x86_install_fast_tracepoint_jump_pad.
11201 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11202 (struct fast_tracepoint_jump): New.
11203 (fast_tracepoint_jump_insn): New.
11204 (fast_tracepoint_jump_shadow): New.
11205 (find_fast_tracepoint_jump_at): New.
11206 (fast_tracepoint_jump_here): New.
11207 (delete_fast_tracepoint_jump): New.
11208 (set_fast_tracepoint_jump): New.
11209 (uninsert_fast_tracepoint_jumps_at): New.
11210 (reinsert_fast_tracepoint_jumps_at): New.
11211 (set_breakpoint_at): Use write_inferior_memory.
11212 (uninsert_raw_breakpoint): Use write_inferior_memory.
11213 (check_mem_read): Mask out fast tracepoint jumps.
11214 (check_mem_write): Mask out fast tracepoint jumps.
11215 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11216 (set_fast_tracepoint_jump): Declare.
11217 (delete_fast_tracepoint_jump)
11218 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11219 (reinsert_fast_tracepoint_jumps_at): Declare.
11220 * regcache.c: Don't compile many functions when building the
11221 in-process agent library.
11222 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11223 the register buffer in the heap.
11224 (free_register_cache): If the register buffer isn't owned by the
11225 regcache, don't free it.
11226 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11227 pre-existing register caches.
11228 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11229 type.
11230 (convert_ascii_to_int): : Constify `from' parameter type.
11231 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11232 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11233 the needed buffer in-place.
11234 (relocate_instruction): New.
11235 * server.c (handle_query) <qSymbols>: If the target supports
11236 tracepoints, give it a chance of looking up symbols. Report
11237 support for fast tracepoints.
11238 (handle_status): Stabilize threads.
11239 (process_serial_event): Adjust.
11240 * server.h (struct fast_tracepoint_jump): Forward declare.
11241 (struct process_info) <fast_tracepoint_jumps>: New field.
11242 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11243 (decode_X_packet, decode_M_packet): Adjust.
11244 (relocate_instruction): Declare.
11245 (in_process_agent_loaded): Declare.
11246 (tracepoint_look_up_symbols): Declare.
11247 (struct fast_tpoint_collect_status): Declare.
11248 (fast_tracepoint_collecting): Declare.
11249 (force_unlock_trace_buffer): Declare.
11250 (handle_tracepoint_bkpts): Declare.
11251 (initialize_low_tracepoint)
11252 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11253 * target.h (struct target_ops) <stabilize_threads,
11254 install_fast_tracepoint_jump_pad>: New fields.
11255 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11256 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11257 [HAVE_STDINT_H]: Include stdint.h.
11258 (trace_debug_1): Rename to ...
11259 (trace_vdebug): ... this.
11260 (trace_debug): Rename to ...
11261 (trace_debug_1): ... this. Add `level' parameter.
11262 (trace_debug): New.
11263 (ATTR_USED, ATTR_NOINLINE): New.
11264 (IP_AGENT_EXPORT): New.
11265 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11266 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11267 (about_to_request_buffer_space, trace_buffer_is_full)
11268 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11269 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11270 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11271 (traceframe_write_count, traceframes_created)
11272 (trace_state_variables)
11273 New renaming defines.
11274 (struct ipa_sym_addresses): New.
11275 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11276 (symbol_list): New.
11277 (ipa_sym_addrs): New.
11278 (all_tracepoint_symbols_looked_up): New.
11279 (in_process_agent_loaded): New.
11280 (write_e_ipa_not_loaded): New.
11281 (maybe_write_ipa_not_loaded): New.
11282 (tracepoint_look_up_symbols): New.
11283 (debug_threads) [IN_PROCESS_AGENT]: New.
11284 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11285 (UNKNOWN_SIDE_EFFECTS): New.
11286 (stop_tracing): New.
11287 (flush_trace_buffer): New.
11288 (stop_tracing_bkpt): New.
11289 (flush_trace_buffer_bkpt): New.
11290 (read_inferior_integer): New.
11291 (read_inferior_uinteger): New.
11292 (read_inferior_data_pointer): New.
11293 (write_inferior_data_pointer): New.
11294 (write_inferior_integer): New.
11295 (write_inferior_uinteger): New.
11296 (struct collect_static_trace_data_action): Delete.
11297 (enum tracepoint_type): New.
11298 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11299 <actions_str, step_actions, step_actions_str>: Only include in
11300 GDBserver.
fa593d66
PA
11301 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11302 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11303 (tracepoints): Use IP_AGENT_EXPORT.
11304 (last_tracepoint): Don't include in the IPA.
11305 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11306 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11307 (alloced_trace_state_variables): New.
11308 (trace_state_variables): Use IP_AGENT_EXPORT.
11309 (traceframe_t): Delete unused variable.
11310 (circular_trace_buffer): Don't include in the IPA.
11311 (trace_buffer_start): Delete.
11312 (struct trace_buffer_control): New.
11313 (trace_buffer_free): Delete.
11314 (struct ipa_trace_buffer_control): New.
11315 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11316 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11317 New.
11318 (trace_buffer_ctrl): New.
11319 (TRACE_BUFFER_CTRL_CURR): New.
11320 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11321 Reimplement as macros.
11322 (trace_buffer_wrap): Delete.
11323 (traceframe_write_count, traceframe_read_count)
11324 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11325 (struct tracepoint_hit_ctx) <type>: New field.
11326 (struct fast_tracepoint_ctx): New.
11327 (memory_barrier): New.
11328 (cmpxchg): New.
11329 (record_tracepoint_error): Update atomically in the IPA.
11330 (clear_inferior_trace_buffer): New.
11331 (about_to_request_buffer_space): New.
11332 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11333 updating the same buffer.
11334 (add_tracepoint): Default the tracepoint's type to trap
11335 tracepoint, and orig_size to -1.
11336 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11337 internal variables.
11338 (create_trace_state_variable): New parameter `gdb'. Handle it.
11339 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11340 (cmd_qtdp): Handle fast tracepoints.
11341 (cmd_qtdv): Adjust.
11342 (max_jump_pad_size): New.
11343 (gdb_jump_pad_head): New.
11344 (get_jump_space_head): New.
11345 (claim_jump_space): New.
11346 (sort_tracepoints): New.
11347 (MAX_JUMP_SIZE): New.
11348 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11349 IPA.
11350 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11351 support. Upload fast traceframes, and delete internal IPA
11352 breakpoints.
11353 (stop_tracing_handler): New.
11354 (flush_trace_buffer_handler): New.
11355 (cmd_qtstop): Upload fast tracepoints.
11356 (response_tracepoint): Handle fast tracepoints.
11357 (tracepoint_finished_step): Upload fast traceframes. Set the
11358 tracepoint hit context's tracepoint type.
11359 (handle_tracepoint_bkpts): New.
11360 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11361 type. Add comment about fast tracepoints.
11362 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11363 non-existing action_str field.
11364 (get_context_regcache): Handle fast tracepoints.
11365 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11366 to the regcache.
11367 (fast_tracepoint_from_jump_pad_address): New.
11368 (fast_tracepoint_from_ipa_tpoint_address): New.
11369 (collecting_t): New.
11370 (force_unlock_trace_buffer): New.
11371 (fast_tracepoint_collecting): New.
11372 (collecting): New.
11373 (gdb_collect): New.
11374 (write_inferior_data_ptr): New.
11375 (target_tp_heap): New.
11376 (target_malloc): New.
11377 (download_agent_expr): New.
11378 (UALIGN): New.
11379 (download_tracepoints): New.
11380 (download_trace_state_variables): New.
11381 (upload_fast_traceframes): New.
11382 (IPA_FIRST_TRACEFRAME): New.
11383 (IPA_NEXT_TRACEFRAME_1): New.
11384 (IPA_NEXT_TRACEFRAME): New.
11385 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11386 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11387 (gdb_jump_pad_buffer_end): New.
11388 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11389 (initialize_tracepoint): Adjust.
11390 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11391 buffer. Initialize the low module.
11392 * utils.c (PREFIX, TOOLNAME): New.
11393 (malloc_failure): Use PREFIX.
11394 (error): In the IPA, an error causes an exit.
11395 (fatal, warning): Use PREFIX.
11396 (internal_error): Use TOOLNAME.
11397 (NUMCELLS): Increase to 10.
11398 * configure, config.in: Regenerate.
11399
d149dd1d
PA
114002010-06-01 Pedro Alves <pedro@codesourcery.com>
11401
11402 * server.c (handle_query) <qSupported>: Do two passes over the
11403 qSupported string to avoid nesting strtok.
11404
f6528abd
JK
114052010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11406
11407 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11408 (CDEPS): New.
11409 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11410 -Wl,--dynamic-list.
11411 * configure: Regenerate.
11412 * proc-service.list: New.
11413
ca2a87a0
JK
114142010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11415
11416 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11417 New comment.
11418
363a6e9f
OS
114192010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11420
11421 * gdbreplay.c (remote_open): Check error return from socket() call by
11422 its equality to -1 not by it being negative.
11423 * remote-utils.c (remote_open): Likewise.
11424
d23b6cb1
PA
114252010-05-23 Pedro Alves <pedro@codesourcery.com>
11426
11427 * config.h: Regenerate.
11428
28d3cf85
MK
114292010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11430
11431 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11432 doesn't provide PTRACE_GET_THREAD_AREA.
11433
fea36a59
MK
114342010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11435
11436 * linux-m68k-low.c: Include <asm/ptrace.h>
11437 (ps_get_thread_area): Implement.
11438
24b066ba
DE
114392010-05-03 Doug Evans <dje@google.com>
11440
11441 * event-loop.c (struct callback_event): New struct.
11442 (callback_list): New global.
11443 (append_callback_event, delete_callback_event): New functions.
11444 (process_callback): New function.
11445 (start_event_loop): Call it.
11446 * remote-utils.c (NOT_SCHEDULED): Define.
11447 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11448 moved out of readchar.
11449 (readchar): Rewrite. Call reschedule before returning.
11450 (reset_readchar): New function.
11451 (remote_close): Call it.
11452 (process_remaining, reschedule): New functions.
11453 * server.h (callback_handler_func): New typedef.
11454 (append_callback_event, delete_callback_event): Declare.
11455
9836d6ea
PA
114562010-05-03 Pedro Alves <pedro@codesourcery.com>
11457
11458 * proc-service.c (ps_pglobal_lookup): Use
11459 thread_db_look_up_one_symbol.
11460 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11461 parameter. Use it instead of all_symbols_looked_up.
11462 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11463 field.
11464 (all_symbols_looked_up): Don't declare.
11465 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11466 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11467 field.
11468 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11469 Set all_symbols_looked_up here.
11470 (thread_db_look_up_one_symbol): New.
11471 (thread_db_get_tls_address): Adjust.
11472 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11473 thread_db object on the heap, and tentatively set it in the
11474 process structure.
11475 (thread_db_init): Don't set all_symbols_looked_up here.
11476 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11477
7984d532
PA
114782010-05-03 Pedro Alves <pedro@codesourcery.com>
11479
11480 * linux-low.c (linux_kill, linux_detach): Adjust.
11481 (status_pending_p_callback): Remove redundant statement. Check
11482 for !TARGET_WAITIKIND_IGNORE, instead of
11483 TARGET_WAITKIND_STOPPED.
11484 (handle_tracepoints): Make sure LWP is locked. Adjust.
11485 (linux_wait_for_event_1): Adjust.
11486 (linux_cancel_breakpoints): New.
11487 (unsuspend_one_lwp): New.
11488 (unsuspend_all_lwps): New.
11489 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11490 (send_sigstop_callback): Change return type to int, add new
11491 `except' parameter and handle it.
11492 (suspend_and_send_sigstop_callback): New.
11493 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11494 pass them down. If SUSPEND, also increment the lwp's suspend
11495 count.
11496 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11497 (need_step_over_p): Don't consider suspended LWPs.
11498 (start_step_over): Adjust.
11499 (proceed_one_lwp): Change return type to int, add new `except'
11500 parameter and handle it.
11501 (unsuspend_and_proceed_one_lwp): New.
11502 (proceed_all_lwps): Use find_inferior instead of
11503 for_each_inferior.
11504 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11505 also decrement the suspend count of LWPs. Pass `except' down,
11506 instead of hacking its suspend count.
11507 (linux_pause_all): Add `freeze' parameter. Adjust.
11508 (linux_unpause_all): New.
11509 (linux_target_ops): Install linux_unpause_all.
11510 * server.c (handle_status): Adjust.
11511 * target.h (struct target_ops): New fields `unpause_all' and
11512 `cancel_breakpoints'. Add new parameter to `pause_all'.
11513 (pause_all): Add new `freeze' parameter.
11514 (unpause_all): New.
11515 (cancel_breakpoints): New.
11516 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11517 cancel breakpoints.
11518 (cmd_qtstart): Pause threads.
11519 (stop_tracing): Pause threads, and cancel breakpoints.
11520 * win32-low.c (win32_target_ops): Adjust.
11521
e471f25b
PA
115222010-05-03 Pedro Alves <pedro@codesourcery.com>
11523
11524 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11525 the inferior right away from here...
11526 (linux_wait_1): ... to here, and adjust to check the thread's
11527 last_resume_kind instead of the lwp's step or stop_expected flags.
11528
1915ef4f
PA
115292010-05-02 Pedro Alves <pedro@codesourcery.com>
11530
11531 * README: Use consistent `GDB' and `GDBserver' spellings.
11532
f9e39928
PA
115332010-05-02 Pedro Alves <pedro@codesourcery.com>
11534
11535 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11536 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11537 (linux_detach_one_lwp): Assume the lwp is stopped.
11538 (any_thread_of): Delete.
11539 (linux_detach): Stop all lwps here. Don't blindly delete all
11540 breakpoints.
11541 (delete_lwp_callback): New.
11542 (linux_mourn): Delete all lwps of the process that is gone.
11543 (linux_wait_1): Don't delete the last lwp of the process here.
11544 * mem-break.h (mark_breakpoints_out): Declare.
11545 * mem-break.c (mark_breakpoints_out): New.
11546 (free_all_breakpoints): Use it.
11547 * server.c (handle_target_event): If the process is gone, mark
11548 breakpoints out.
11549 * thread-db.c (struct thread_db) <create_bp>: New field.
11550 (thread_db_enable_reporting): Fix prototype. Store a thread event
11551 breakpoint reference in the thread_db struct.
11552 (thread_db_load_search): Clear the thread_db object.
11553 (try_thread_db_load_1): Ditto.
11554 (switch_to_process): New.
11555 (disable_thread_event_reporting): Use it.
11556 (remove_thread_event_breakpoints): New.
11557 (thread_db_detach, thread_db_mourn): Use it.
11558
1e7fc18c
PA
115592010-05-01 Pedro Alves <pedro@codesourcery.com>
11560
11561 * linux-low.c (linux_enable_event_reporting): New.
11562 (linux_wait_for_event_1, handle_extended_wait): Use it.
11563
02fc4de7
PA
115642010-04-30 Pedro Alves <pedro@codesourcery.com>
11565
11566 * linux-low.c (linux_kill_one_lwp, linux_kill)
11567 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11568 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11569 SIGSTOP even if the LWP is stopped.
11570 (send_sigstop_callback): New.
11571 (stop_all_lwps): Use send_sigstop_callback instead.
11572 (linux_resume_one_thread): Adjust.
11573 (proceed_one_lwp): Still proceed an LWP that the client has
11574 requested to stop, if we haven't reported it as stopped yet. Make
11575 sure that LWPs the client want stopped, have a pending SIGSTOP.
11576
bc3b5632
DE
115772010-04-26 Doug Evans <dje@google.com>
11578
ae1ada35
DE
11579 * server.c (handle_general_set): Make static.
11580
bc3b5632
DE
11581 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11582 Print received char after testing for error/eof instead of before.
11583 (input_interrupt): Tweak comment.
11584
65730243
DE
115852010-04-23 Doug Evans <dje@google.com>
11586
11587 * server.c (start_inferior): Print inferior argv if --debug.
11588
a8ae7dc0
AR
115892010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11590
11591 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11592 * nto-x86-low.c: Include server.h
11593
1c07cc19
PM
115942010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11595
11596 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11597 be consistent with other sources of this directory.
11598 (init_registers_amd64): Correct name of source file of this function
11599 in the comment.
11600
e0a61e09
PM
116012010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11602
11603 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11604 64-bit executables.
11605
54709339
PM
116062010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11607
11608 * win32-i386-low.c: Add 64-bit support.
11609 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11610 (init_registers_amd64): Declare.
11611 (mappings): Add 64-bit version of array.
11612 (init_windows_x86): New function.
11613 (the_low_target): Change init_arch field to init_windows_x86.
11614
e8f0053d
PM
116152010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11616
11617 * win32-low.c: Adapt to support also 64-bit architecture.
11618 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11619 (get_image_name): Use SIZE_T type for local variable `done'.
11620 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11621 (toolhelp_get_dll_name): Idem.
11622 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11623 Use uintptr_t typecast to avoid warning.
11624 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11625 (handle_exception): Use phex_nz to avoid warning.
11626 (win32_wait): Remove unused local variable `process'.
11627
c481e77e
PM
116282010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11629
11630 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11631 `amd64-avx.o'.
11632
12ea4b69
PM
116332010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11634
11635 * configure.ac: Use `ws2_32' library for srv_mingw.
11636 * configure: Regenerate.
11637 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11638 * remote-utils.c: Likewise.
11639
f6d1620c
L
116402010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11641
11642 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11643 if __x86_64__ is defined.
11644
8e642873
PM
116452010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11646
11647 * configure: Regenerate.
11648
711e434b
PM
116492010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11650
11651 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11652 * target.h (target_ops): New get_tib_address field.
11653 * win32-low.h (win32_thread_info): Add thread_local_base field.
11654 * win32-low.c (child_add_thread): Add tlb argument.
11655 Set thread_local_base field to TLB.
11656 (get_child_debug_event): Adapt to child_add_thread change.
11657 (win32_get_tib_address): New function.
11658 (win32_target_ops): Set get_tib_address field to
11659 win32_get_tib_address.
11660 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11661
505106cd
PA
116622010-04-12 Pedro Alves <pedro@codesourcery.com>
11663
505106cd
PA
11664 * linux-low.c (linux_mourn): Also remove the process.
11665 * server.c (handle_target_event): Don't remove the process here.
11666 * nto-low.c (nto_mourn): New.
11667 (nto_target_ops): Install it.
11668 * spu-low.c (spu_mourn): New.
11669 (spu_target_ops): Install it.
11670 * win32-low.c (win32_mourn): New.
11671 (win32_target_ops): Install it.
11672
e8470a06
PA
116732010-04-12 Pedro Alves <pedro@codesourcery.com>
11674
11675 * server.h (buffer_xml_printf): Remove redundant `;'.
11676
45ba0d02
PA
116772010-04-12 Pedro Alves <pedro@codesourcery.com>
11678
11679 * regcache.c (set_register_cache): Invalidate regcaches before
11680 changing the register cache layout.
11681 (regcache_invalidate_one): Allow a NULL regcache.
11682 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11683 regcaches before changing the register cache layout or the target
11684 regsets.
11685
59e04013
L
116862010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11687
11688 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11689 variable warning on Linux/x86-64.
11690
8336d594
PA
116912010-04-11 Pedro Alves <pedro@codesourcery.com>
11692
11693 GDBserver disconnected tracing support.
11694
11695 * linux-low.c (linux_remove_process): Delete.
11696 (add_lwp): Don't set last_resume_kind here.
11697 (linux_kill): Use `mourn'.
11698 (linux_detach): Use `thread_db_detach', and `mourn'.
11699 (linux_mourn): New.
11700 (linux_attach_lwp_1): Adjust comment.
11701 (linux_attach): last_resume_kind moved the thread_info; adjust.
11702 (status_pending_p_callback): Adjust.
11703 (linux_wait_for_event_1): Adjust.
11704 (count_events_callback, select_singlestep_lwp_callback)
11705 (select_event_lwp_callback, cancel_breakpoints_callback)
11706 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11707 (proceed_one_lwp): Adjust.
11708 (linux_async): Add debug output.
11709 (linux_thread_stopped): New.
11710 (linux_pause_all): New.
11711 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11712 linux_pause_all.
11713 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11714 (thread_db_free): Delete declaration.
11715 (thread_db_detach, thread_db_mourn): Declare.
11716 * thread-db.c (thread_db_init): Use thread_db_mourn.
11717 (thread_db_free): Delete, split in two.
11718 (disable_thread_event_reporting): New.
11719 (thread_db_detach): New.
11720 (thread_db_mourn): New.
11721
11722 * server.h (struct thread_info) <last_resume_kind>: New field.
11723 <attached>: Add comment.
11724 <gdb_detached>: New field.
11725 (handler_func): Change return type to int.
11726 (handle_serial_event, handle_target_event): Ditto.
11727 (gdb_connected): Declare.
11728 (tracing): Delete.
11729 (disconnected_tracing): Declare.
11730 (stop_tracing): Declare.
11731
11732 * server.c (handle_query) <qSupported>: Report support for
11733 disconnected tracing.
11734 (queue_stop_reply_callback): Account for running threads.
11735 (gdb_wants_thread_stopped): New.
11736 (gdb_wants_all_threads_stopped): New.
11737 (gdb_reattached_process): New.
11738 (handle_status): Clear the `gdb_detached' flag of all processes.
11739 In all-stop, stop all threads.
11740 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11741 (process_serial_event): If the remote connection breaks, or if an
11742 exit was forced with "monitor exit", force an event loop exit.
11743 Handle disconnected tracing on detach.
11744 (handle_serial_event): Adjust.
11745 (handle_target_event): If GDB isn't connected, forward events back
11746 to the inferior, unless the last process exited, in which case,
11747 exit gdbserver. Adjust interface.
11748
11749 * remote-utils.c (remote_open): Don't block in accept. Instead
11750 register an event loop source on the listen socket file
11751 descriptor. Refactor bits into ...
11752 (listen_desc): ... this new global.
11753 (gdb_connected): ... this new function.
11754 (enable_async_notification): ... this new function.
11755 (handle_accept_event): ... this new function.
11756 (remote_close): Clear remote_desc.
11757
11758 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11759
11760 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11761 New fields.
11762 (mourn_inferior): Define.
11763 (target_process_qsupported): Avoid the dangling else problem.
11764 (thread_stopped): Define.
11765 (pause_all): Define.
11766 (target_waitstatus_to_string): Declare.
11767 * target.c (target_waitstatus_to_string): New.
11768
11769 * tracepoint.c (tracing): Make extern.
11770 (disconnected_tracing): New.
11771 (stop_tracing): Make extern. Handle tracing stops due to GDB
11772 disconnecting.
11773 (cmd_qtdisconnected): New.
11774 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11775 (handle_tracepoint_general_set): Handle QTDisconnected.
11776
11777 * event-loop.c (event_handler_func): Change return type to int.
11778 (process_event): Bail out if the event handler wants the event
11779 loop to stop.
11780 (handle_file_event): Ditto.
11781 (start_event_loop): Bail out if the event handler wants the event
11782 loop to stop.
11783
11784 * nto-low.c (nto_target_ops): Adjust.
11785 * spu-low.c (spu_wait): Don't remove the process here.
11786 (spu_target_ops): Adjust.
11787 * win32-low.c (win32_wait): Don't remove the process here.
11788 (win32_target_ops): Adjust.
11789
5d267c4c
PA
117902010-04-11 Pedro Alves <pedro@codesourcery.com>
11791
11792 * regcache.c (realloc_register_cache): Invalidate inferior's
11793 regcache before recreating it.
11794
623ccd72
PA
117952010-04-09 Pedro Alves <pedro@codesourcery.com>
11796
11797 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11798
219f2f23
PA
117992010-04-09 Stan Shebs <stan@codesourcery.com>
11800 Pedro Alves <pedro@codesourcery.com>
11801
11802 * server.h (LONGEST): New.
11803 (struct thread_info) <while_stepping>: New field.
11804 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11805 Declare.
11806 (initialize_tracepoint, handle_tracepoint_general_set)
11807 (handle_tracepoint_query, tracepoint_finished_step)
11808 (tracepoint_was_hit, release_while_stepping_state_list):
11809 (current_traceframe): Declare.
11810 * server.c (handle_general_set): Handle tracepoint packets.
11811 (read_memory): New.
11812 (write_memory): New.
11813 (handle_search_memory_1): Use read_memory.
11814 (handle_query): Report support for conditional tracepoints, trace
11815 state variables, and tracepoint sources. Handle tracepoint
11816 queries.
11817 (main): Initialize the tracepoints module.
11818 (process_serial_event): Handle traceframe reads/writes.
11819
11820 * linux-low.c (handle_tracepoints): New.
11821 (linux_wait_1): Call it.
11822 (linux_resume_one_lwp): Handle while-stepping.
11823 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11824 (linux_target_ops): Install them.
11825 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11826 New field.
11827 * linux-x86-low.c (x86_supports_tracepoints): New.
11828 (the_low_target). Install it.
11829
11830 * mem-break.h (delete_breakpoint): Declare.
11831 * mem-break.c (delete_breakpoint): Make external.
11832
11833 * target.h (struct target_ops): Add `supports_tracepoints',
11834 `read_pc', and `write_pc' fields.
11835 (target_supports_tracepoints): Define.
11836 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11837 (phex_nz): New.
11838
11839 * regcache.h (struct regcache) <registers_owned>: New field.
11840 (init_register_cache, regcache_cpy): Declare.
11841 (regcache_read_pc, regcache_write_pc): Declare.
11842 (register_cache_size): Declare.
11843 (supply_regblock): Declare.
11844 * regcache.c (init_register_cache): New.
11845 (new_register_cache): Use it.
11846 (regcache_cpy): New.
11847 (register_cache_size): New.
11848 (supply_regblock): New.
11849 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11850
219f2f23
PA
11851 * tracepoint.c: New.
11852
11853 * Makefile.in (OBS): Add tracepoint.o.
11854 (tracepoint.o): New rule.
11855
3a13a53b
L
118562010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11857
11858 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11859 (i386-mmx.o): New.
11860 (i386-mmx.c): Likewise.
11861 (i386-mmx-linux.o): Likewise.
11862 (i386-mmx-linux.c): Likewise.
11863
11864 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11865 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11866 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11867 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11868
11869 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11870 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11871 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11872
1570b33e
L
118732010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11874
11875 * Makefile.in (clean): Updated.
11876 (i386-avx.o): New.
11877 (i386-avx.c): Likewise.
11878 (i386-avx-linux.o): Likewise.
11879 (i386-avx-linux.c): Likewise.
11880 (amd64-avx.o): Likewise.
11881 (amd64-avx.c): Likewise.
11882 (amd64-avx-linux.o): Likewise.
11883 (amd64-avx-linux.c): Likewise.
11884
11885 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11886 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11887 (srv_amd64_regobj): Add amd64-avx.o.
11888 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11889 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11890 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11891 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11892 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11893 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11894 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11895
11896 * i387-fp.c: Include "i386-xstate.h".
11897 (i387_xsave): New.
11898 (i387_cache_to_xsave): Likewise.
11899 (i387_xsave_to_cache): Likewise.
11900 (x86_xcr0): Likewise.
11901
11902 * i387-fp.h (i387_cache_to_xsave): Likewise.
11903 (i387_xsave_to_cache): Likewise.
11904 (x86_xcr0): Likewise.
11905
11906 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11907 * linux-crisv32-low.c (target_regsets): Likewise.
11908 * linux-m68k-low.c (target_regsets): Likewise.
11909 * linux-mips-low.c (target_regsets): Likewise.
11910 * linux-ppc-low.c (target_regsets): Likewise.
11911 * linux-s390-low.c (target_regsets): Likewise.
11912 * linux-sh-low.c (target_regsets): Likewise.
11913 * linux-sparc-low.c (target_regsets): Likewise.
11914 * linux-xtensa-low.c (target_regsets): Likewise.
11915
11916 * linux-low.c: Include <sys/uio.h>.
11917 (regsets_fetch_inferior_registers): Support nt_type.
11918 (regsets_store_inferior_registers): Likewise.
11919 (linux_process_qsupported): New.
11920 (linux_target_ops): Add linux_process_qsupported.
11921
11922 * linux-low.h (regset_info): Add nt_type.
11923 (linux_target_ops): Add process_qsupported.
11924
11925 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11926 and <sys/uio.h>.
11927 (init_registers_i386_avx_linux): New.
11928 (init_registers_amd64_avx_linux): Likewise.
11929 (xmltarget_i386_linux_no_xml): Likewise.
11930 (xmltarget_amd64_linux_no_xml): Likewise.
11931 (PTRACE_GETREGSET): Likewise.
11932 (PTRACE_SETREGSET): Likewise.
11933 (x86_fill_xstateregset): Likewise.
11934 (x86_store_xstateregset): Likewise.
11935 (use_xml): Likewise.
11936 (x86_linux_update_xmltarget): Likewise.
11937 (x86_linux_process_qsupported): Likewise.
11938 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11939 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11940 init_registers_i386_linux here. Call
11941 x86_linux_update_xmltarget.
11942 (the_low_target): Add x86_linux_process_qsupported.
11943
11944 * server.c (handle_query): Call target_process_qsupported.
11945
11946 * target.h (target_ops): Add process_qsupported.
11947 (target_process_qsupported): New.
11948
fc7238bb
PA
119492010-04-03 Pedro Alves <pedro@codesourcery.com>
11950
11951 * inferiors.c (add_thread): Set last_status kind to
11952 TARGET_WAITKIND_IGNORE.
11953 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11954 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11955 (linux_wait_1): Move `thread' local definition to block that uses
11956 it. Don't NULL initialize `event_child'.
11957 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11958 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11959 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11960
bdabb078
PA
119612010-04-01 Pedro Alves <pedro@codesourcery.com>
11962
11963 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11964 an extended waitstatus, or by a watchpoint.
11965 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11966 thread was stepping or has been stopped by a watchpoint.
11967
d3bbe7a0
PA
119682010-04-01 Pedro Alves <pedro@codesourcery.com>
11969
11970 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11971 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11972 of another, then delete the previous, and validate all
11973 breakpoints.
11974 (validate_inserted_breakpoint): New.
11975 (delete_disabled_breakpoints): New.
11976 (validate_breakpoints): New.
11977 (check_mem_read): Validate breakpoints before trusting their
11978 shadow. Delete disabled breakpoints.
11979 (check_mem_write): Validate breakpoints before trusting they
11980 should be inserted. Delete disabled breakpoints.
11981 * mem-break.h (validate_breakpoints):
11982 * server.c (handle_query): Validate breakpoints when we see a
11983 qSymbol query.
11984
8b07ae33
PA
119852010-04-01 Pedro Alves <pedro@codesourcery.com>
11986
11987 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11988 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11989 if we could tell there's a GDB breakpoint at stop_pc.
11990 (need_step_over_p): Don't do a step over if we find a GDB
11991 breakpoint at the resume PC.
11992
11993 * mem-break.c (struct raw_breakpoint): New.
11994 (enum bkpt_type): New type `gdb_breakpoint'.
11995 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11996 fields. New field `raw'.
11997 (find_raw_breakpoint_at): New.
11998 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11999 breakpoint instead.
12000 (set_breakpoint_at): Adjust.
12001 (delete_raw_breakpoint): New.
12002 (release_breakpoint): New.
12003 (delete_breakpoint): Rename to...
12004 (delete_breakpoint_1): ... this. Add proc parameter. Use
12005 release_breakpoint. Return ENOENT.
12006 (delete_breakpoint): Reimplement.
12007 (find_breakpoint_at): Delete.
12008 (find_gdb_breakpoint_at): New.
12009 (delete_breakpoint_at): Delete.
12010 (set_gdb_breakpoint_at): New.
12011 (delete_gdb_breakpoint_at): New.
12012 (gdb_breakpoint_here): New.
12013 (set_reinsert_breakpoint): Use release_breakpoint.
12014 (uninsert_breakpoint): Rename to ...
12015 (uninsert_raw_breakpoint): ... this.
12016 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12017 (reinsert_raw_breakpoint): Change parameter type to
12018 raw_breakpoint.
12019 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12020 instead.
12021 (check_breakpoints): Adjust. Use release_breakpoint.
12022 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12023 (breakpoint_inserted_here): Ditto.
12024 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12025 Don't trust the breakpoint's shadow if it is not inserted.
12026 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12027 (delete_all_breakpoints): Adjust.
12028 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12029 use delete_breakpoint_1.
12030
12031 * mem-break.h (breakpoints_supported): Delete declaration.
12032 (set_gdb_breakpoint_at): Declare.
12033 (gdb_breakpoint_here): Declare.
12034 (delete_breakpoint_at): Delete.
12035 (delete_gdb_breakpoint_at): Declare.
12036
12037 * server.h (struct raw_breakpoint): Forward declare.
12038 (struct process_info): New field `raw_breakpoints'.
12039
12040 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12041 breakpoints.
12042
6bf5e0ba
PA
120432010-03-24 Pedro Alves <pedro@codesourcery.com>
12044
12045 * linux-low.c (status_pending_p_callback): Fix comment.
12046 (linux_wait_for_event_1): Move most of the internal breakpoint
12047 handling from here...
12048 (linux_wait_1): ... to here.
12049 (count_events_callback): New.
12050 (select_singlestep_lwp_callback): New.
12051 (select_event_lwp_callback): New.
12052 (cancel_breakpoints_callback): New.
12053 (select_event_lwp): New.
12054 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12055 priority to all LWPs that have had events that should be reported
12056 to the client. Cancel breakpoints when about to reporting the
12057 event to the client, not while stopping lwps. No longer cancel
12058 finished single-steps here.
12059 (cancel_finished_single_step): Delete.
12060 (cancel_finished_single_steps): Delete.
12061
414a389f
PA
120622010-03-24 Pedro Alves <pedro@codesourcery.com>
12063
12064 * mem-break.c (enum bkpt_type): New.
12065 (struct breakpoint): New field `type'.
12066 (set_breakpoint_at): Change return type to struct breakpoint
12067 pointer. Set type to `other_breakpoint' by default.
12068 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12069 in the breakpoint list.
12070 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12071 (reinsert_breakpoint): Rename to ...
12072 (reinsert_raw_breakpoint): ... this.
12073 (reinsert_breakpoints_at): Adjust.
12074 * mem-break.h (struct breakpoint): Declare.
12075 (set_breakpoint_at): Change return type to struct breakpoint
12076 pointer.
12077
2280c721
PA
120782010-03-24 Pedro Alves <pedro@codesourcery.com>
12079
12080 * server.c (handle_query): Assign, not compare.
12081
d50171e4
PA
120822010-03-24 Pedro Alves <pedro@codesourcery.com>
12083
12084 Teach linux gdbserver to step-over-breakpoints.
12085
12086 * linux-low.c (can_hardware_single_step): New.
12087 (supports_breakpoints): New.
12088 (handle_extended_wait): If stopping threads, read the stop pc of
12089 the new cloned LWP.
12090 (get_pc): New.
12091 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12092 low target doesn't support retrieving the PC.
12093 (add_lwp): Set last_resume_kind to resume_continue.
12094 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12095 (linux_attach): Don't clear stop_expected. Set the lwp's
12096 last_resume_kind to resume_stop.
12097 (linux_detach_one_lwp): Don't check for removed breakpoints.
12098 (check_removed_breakpoint): Delete.
12099 (status_pending_p): Rename to ...
12100 (status_pending_p_callback): ... this. Don't check for removed
12101 breakpoints. Don't consider threads that are stopped from GDB's
12102 perspective.
12103 (linux_wait_for_lwp): Always read the stop_pc here.
12104 (cancel_breakpoint): New.
12105 (step_over_bkpt): New global.
12106 (linux_wait_for_event_1): Implement stepping over breakpoints.
12107 (gdb_wants_lwp_stopped): New.
12108 (gdb_wants_all_stopped): New.
12109 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12110 single-step traps here. Store the thread's last reported target
12111 wait status.
12112 (send_sigstop): Don't clear stop_expected. Always set it,
12113 instead.
12114 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12115 (cancel_finished_single_step): New.
12116 (cancel_finished_single_steps): New.
12117 (wait_for_sigstop): Don't cancel finished single-step traps here.
12118 (linux_resume_one_lwp): Don't check for removed breakpoints.
12119 Don't set `step' on non-hardware step archs.
12120 (linux_set_resume_request): Ignore resume_stop requests if already
12121 stopping or stopped. Set the lwp's last_resume_kind.
12122 (resume_status_pending_p): Don't check for removed breakpoints.
12123 (need_step_over_p): New.
12124 (start_step_over): New.
12125 (finish_step_over): New.
12126 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12127 requests. Clear the thread's last reported target waitstatus.
12128 Don't use the `suspended' flag. Don't consider pending breakpoints.
12129 (linux_resume): Start a step-over if necessary.
12130 (proceed_one_lwp): New.
12131 (proceed_all_lwps): New.
12132 (unstop_all_lwps): New.
12133 * linux-low.h (struct lwp_info): Rewrite comment for the
12134 `suspended' flag. Add the `stop_pc' field. Delete the
12135 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12136 Add `'last_resume_kind' and `need_step_over' fields.
12137 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12138 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12139 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12140 (set_raw_breakpoint_at): New.
12141 (set_breakpoint_at): Rewrite to use it.
12142 (reinsert_breakpoint_handler): Delete.
12143 (set_reinsert_breakpoint): New.
12144 (reinsert_breakpoint_by_bp): Delete.
12145 (delete_reinsert_breakpoints): New.
12146 (uninsert_breakpoint): Rewrite.
12147 (uninsert_breakpoints_at): New.
12148 (reinsert_breakpoint): Rewrite.
12149 (reinsert_breakpoints_at): New.
12150 (check_breakpoints): Rewrite.
12151 (breakpoint_here): New.
12152 (breakpoint_inserted_here): New.
12153 (check_mem_read): Adjust.
12154 * mem-break.h (breakpoints_supported, breakpoint_here)
12155 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12156 (reinsert_breakpoint_by_bp): Delete declaration.
12157 (delete_reinsert_breakpoints): Declare.
12158 (reinsert_breakpoint): Delete declaration.
12159 (reinsert_breakpoints_at): Declare.
12160 (uninsert_breakpoint): Delete declaration.
12161 (uninsert_breakpoints_at): Declare.
12162 (check_breakpoints): Adjust prototype.
12163 * server.h: Adjust include order.
12164 (struct thread_info): Declare here. Add a `last_status' field.
12165
30ba68cb
MS
121662010-03-23 Michael Snyder <msnyder@vmware.com>
12167
12168 * server.c (crc32): New function.
12169 (handle_query): Add handling for 'qCRC:' request.
12170
b9a881c2
PA
121712010-03-23 Pedro Alves <pedro@codesourcery.com>
12172
12173 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12174 lwp had been stopped by a watchpoint.
12175
e92d13d5
PA
121762010-03-16 Pedro Alves <pedro@codesourcery.com>
12177
12178 * server.h (internal_error): Declare.
12179 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12180 * utils.c (internal_error): New function.
12181
64daa791
AS
121822010-03-15 Andreas Schwab <schwab@redhat.com>
12183
12184 * configure.srv: Fix typo setting srv_regobj.
12185
f52cd8cd
PA
121862010-03-15 Pedro Alves <pedro@codesourcery.com>
12187
12188 * linux-low.c (fetch_register): Avoid passing a non string literal
12189 format to `error'.
12190 (usr_store_inferior_registers): Ditto.
12191
93ae6fdc
PA
121922010-03-14 Pedro Alves <pedro@codesourcery.com>
12193
12194 * linux-low.c (linux_write_memory): Bail out early if peeking
12195 memory failed.
12196
c3adc08c
PA
121972010-03-14 Pedro Alves <pedro@codesourcery.com>
12198
12199 * linux-low.h (struct lwp_info): New fields
12200 `stopped_by_watchpoint' and `stopped_data_address'.
12201 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12202 here, and cache them in the lwp object.
12203 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12204 directly.
12205 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12206 field.
12207 (linux_stopped_by_watchpoint): Rewrite.
12208 (linux_stopped_data_address): Rewrite.
12209
bce522a2
PA
122102010-03-06 Simo Melenius <simo.melenius@iki.fi>
12211
12212 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12213 switching the current inferior, not before.
12214
90884b2b
L
122152010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12216
12217 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12218 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12219 i386-linux.c and amd64-linux.c.
12220 (reg-i386.o): Removed.
12221 (reg-i386.c): Likewise.
12222 (reg-i386-linux.o): Likewise.
12223 (reg-i386-linux.c): Likewise.
12224 (reg-x86-64.o): Likewise.
12225 (reg-x86-64.c): Likewise.
12226 (reg-x86-64-linux.o): Likewise.
12227 (reg-x86-64-linux.c): Likewise.
12228 (i386.o): New.
12229 (i386.c): Likewise.
12230 (i386-linux.o): Likewise.
12231 (i386-linux.c): Likewise.
12232 (amd64.o): Likewise.
12233 (amd64.c): Likewise.
12234 (amd64-linux.o): Likewise.
12235 (amd64-linux.c): Likewise.
12236
12237 * configure.srv (srv_i386_regobj): New.
12238 (srv_i386_linux_regobj): Likewise.
12239 (srv_amd64_regobj): Likewise.
12240 (srv_amd64_linux_regobj): Likewise.
12241 (srv_i386_32bit_xmlfiles): Likewise.
12242 (srv_i386_64bit_xmlfiles): Likewise.
12243 (srv_i386_xmlfiles): Likewise.
12244 (srv_amd64_xmlfiles): Likewise.
12245 (srv_i386_linux_xmlfiles): Likewise.
12246 (srv_amd64_linux_xmlfiles): Likewise.
12247 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12248 srv_xmlfiles to $srv_i386_xmlfiles.
12249 (i[34567]86-*-mingw32ce*): Likewise.
12250 (i[34567]86-*-mingw*): Likewise.
12251 (i[34567]86-*-nto*): Likewise.
12252 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12253 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12254 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12255 (x86_64-*-linux*): Likewise.
12256
12257 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12258 (init_registers_amd64_linux): New.
12259 (x86_arch_setup): Replace init_registers_x86_64_linux with
12260 init_registers_amd64_linux.
12261
193f13e6
MK
122622010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12263
12264 * configure.ac: Check for libdl. If it is not available link against
12265 static libthread_db.
12266 * configure: Regenerate.
12267
85d721b8
PA
122682010-02-22 Pedro Alves <pedro@codesourcery.com>
12269
12270 PR9605
12271
12272 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12273 handing a read watchpoint.
12274 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12275
6076632b
DE
122762010-02-12 Doug Evans <dje@google.com>
12277
12278 * linux-low.c (linux_supports_tracefork_flag): Document.
12279 (linux_look_up_symbols): Add comment.
12280
3327ccf7
L
122812010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12282
12283 * regcache.c (supply_register): Clear regcache if buf is NULL.
12284
0718675c 122852010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12286 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12287
12288 * inferiors.c (find_inferior): Add function documentation.
12289 (unloaded_dll): Handle the case where the unloaded dll has not
12290 been previously registered in the dll list.
12291
177321bd
DJ
122922010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12293
12294 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12295 (thumb2_breakpoint): New.
12296 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12297
2b009048
DJ
122982010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12299
12300 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12301 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12302 breakpoints.
12303
3be029c7
PA
123042010-01-21 Pedro Alves <pedro@codesourcery.com>
12305
12306 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12307
18f5de3b
JK
123082010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12309
12310 * linux-s390-low.c (s390_collect_ptrace_register)
12311 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12312
3743bb4f
DE
123132010-01-21 Doug Evans <dje@google.com>
12314
14ce3065
DE
12315 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12316 (PTRACE_ARG4_TYPE): New macro.
12317 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12318 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12319 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12320 (usr_store_inferior_registers): Ditto.
12321 (linux_read_memory, linux_write_memory): Ditto.
12322 (linux_test_for_tracefork): Ditto.
12323
3743bb4f
DE
12324 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12325 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12326
8b315be5
PA
123272010-01-21 Pedro Alves <pedro@codesourcery.com>
12328
12329 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12330 target.
12331
85492558
PA
123322010-01-21 Pedro Alves <pedro@codesourcery.com>
12333
12334 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12335 prototype to take a regcache. Adjust.
12336
442ea881
PA
123372010-01-20 Pedro Alves <pedro@codesourcery.com>
12338
12339 * regcache.h (struct thread_info): Forward declare.
12340 (struct regcache): New.
12341 (new_register_cache): Adjust prototype.
12342 (get_thread_regcache): Declare.
12343 (free_register_cache): Adjust prototype.
12344 (registers_to_string, registers_from_string): Ditto.
12345 (supply_register, supply_register_by_name, collect_register)
12346 (collect_register_as_string, collect_register_by_name): Ditto.
12347 * regcache.c (struct inferior_regcache_data): Delete.
12348 (get_regcache): Rename to ...
12349 (get_thread_regcache): ... this. Adjust. Switch inferior before
12350 fetching registers.
12351 (regcache_invalidate_one): Adjust.
12352 (regcache_invalidate): Fix prototype.
12353 (new_register_cache): Return the new register cache.
12354 (free_register_cache): Change prototype.
12355 (realloc_register_cache): Adjust.
12356 (registers_to_string): Change prototype to take a regcache. Adjust.
12357 (registers_from_string): Ditto.
12358 (register_data): Ditto.
12359 (supply_register): Ditto.
12360 (supply_register_by_name): Ditto.
12361 (collect_register): Ditto.
12362 (collect_register_as_string): Ditto.
12363 (collect_register_by_name): Ditto.
12364 * server.c (process_serial_event): Adjust.
12365 * linux-low.h (regset_fill_func, regset_store_func): Change
12366 prototype.
12367 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12368 Change prototype.
12369 * linux-low.c (get_stop_pc): Adjust.
12370 (check_removed_breakpoint): Adjust.
12371 (linux_wait_for_event): Adjust.
12372 (linux_resume_one_lwp): Adjust.
12373 (fetch_register): Add regcache parameter. Adjust.
12374 (usr_store_inferior_registers): Ditto.
12375 (regsets_fetch_inferior_registers): Ditto.
12376 (regsets_store_inferior_registers): Ditto.
12377 (linux_fetch_registers, linux_store_registers): Ditto.
12378 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12379 regcache. Adjust.
43aaf8b6
PA
12380 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12381 Ditto.
442ea881
PA
12382 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12383 prototype to take a regcache.
12384 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12385 * remote-utils.c (convert_ascii_to_int, outreg)
12386 (prepare_resume_reply): Change prototype to take a regcache.
12387 Adjust.
12388 * target.h (struct target_ops) <fetch_registers, store_registers>:
12389 Change prototype to take a regcache.
12390 (fetch_inferior_registers, store_inferior_registers): Change
12391 prototype to take a regcache. Adjust.
12392 * proc-service.c (ps_lgetregs): Adjust.
12393 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12394 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12395 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12396 take a regcache. Adjust.
12397 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12398 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12399 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12400 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12401 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12402 (cris_cannot_fetch_register):
12403 (cris_breakpoint_at): Change prototype to take a regcache.
12404 Adjust.
12405 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12406 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12407 to take a regcache. Adjust.
12408 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12409 Adjust.
12410 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12411 take a regcache. Adjust.
12412 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12413 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12414 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12415 * linux-mips-low.c (mips_get_pc):
12416 (mips_set_pc): Change prototype to take a regcache. Adjust.
12417 (mips_reinsert_addr): Adjust.
12418 (mips_collect_register): Change prototype to take a regcache.
12419 Adjust.
12420 (mips_supply_register):
12421 (mips_collect_register_32bit, mips_supply_register_32bit)
12422 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12423 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12424 * linux-ppc-low.c (ppc_supply_ptrace_register)
12425 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12426 (parse_spufs_run): Adjust.
12427 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12428 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12429 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12430 take a regcache. Adjust.
12431 * linux-s390-low.c (s390_collect_ptrace_register)
12432 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12433 (s390_set_pc): Change prototype to take a regcache. Adjust.
12434 (s390_arch_setup): Adjust.
12435 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12436 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12437 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12438 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12439 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12440 regcache. Adjust.
12441 (sparc_breakpoint_at): Adjust.
12442 * linux-xtensa-low.c (xtensa_fill_gregset):
12443 (xtensa_store_gregset):
12444 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12445 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12446 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12447 prototype to take a regcache. Adjust.
12448 * win32-arm-low.c (arm_fetch_inferior_register)
12449 (arm_store_inferior_register): Change prototype to take a
12450 regcache. Adjust.
12451 * win32-i386-low.c (i386_fetch_inferior_register)
12452 (i386_store_inferior_register): Change prototype to take a
12453 regcache. Adjust.
12454 * win32-low.c (child_fetch_inferior_registers)
12455 (child_store_inferior_registers): Change prototype to take a
12456 regcache. Adjust.
12457 (win32_wait): Adjust.
12458 (win32_fetch_inferior_registers): Change prototype to take a
12459 regcache. Adjust.
12460 (win32_store_inferior_registers): Adjust.
12461 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12462 store_inferior_register>: Change prototype to take a regcache.
12463
60c3d7b0
DE
124642010-01-20 Doug Evans <dje@google.com>
12465
12466 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12467 #ifdef.
12468 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12469 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12470
dc146f7c
VP
124712010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12472
12473 * linux-low.c (linux_core_of_thread): New.
12474 (compare_ints, show_process, list_threads): New.
12475 (linux_qxfer_osdata): Report threads and cores.
12476 (linux_target_op): Register linux_core_of_thread.
12477 * remote-utils.c (prepare_resume_reply): Report the core.
12478 (buffer_xml_printf): Support %d specifier.
12479 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12480 New.
12481 (handle_query): Handle qXfer:threads. Announce availability
12482 thereof.
12483 * target.h (struct target_ops): New field core_of_thread.
12484
7803799a
UW
124852010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12486
12487 * Makefile.in (clean): Remove new generated files.
12488 (reg-s390.o, reg-s390.c): Remove rules.
12489 (reg-s390x.o, reg-s390x.c): Likewise.
12490 (s390-linux32.o, s390-linux32.c): Add rules.
12491 (s390-linux64.o, s390-linux64.c): Likewise.
12492 (s390x-linux64.o, s390x-linux64.c): Likewise.
12493 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12494 * linux-s390-low.c: Include <elf.h>.
12495 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12496 (init_registers_s390): Remove prototype.
12497 (init_registers_s390x): Likewise.
12498 (init_registers_s390_linux32): Add prototype.
12499 (init_registers_s390_linux64): Likewise.
12500 (init_registers_s390x_linux64): Likewise.
12501 (s390_num_regs_3264): New define.
12502 (s390_regmap_3264): New global variable.
12503 (s390_cannot_fetch_register): Remove obsolete check.
12504 (s390_cannot_store_register): Likewise.
12505 (s390_collect_ptrace_register): Handle upper/lower register halves.
12506 (s390_supply_ptrace_register): Likewise.
12507 (s390_fill_gregset): Update to register number changes.
12508 (s390_get_hwcap): New routine.
12509 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12510 Install appropriate regmap and register set.
12511
6e7ffa39
JB
125122010-01-01 Joel Brobecker <brobecker@adacore.com>
12513
12514 * server.c (gdbserver_version): Update copyright year to 2010.
12515 * gdbreplay.c (gdbreplay_version): Likewise.
12516
957f3f49
DE
125172009-12-28 Doug Evans <dje@google.com>
12518
12519 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12520 elf/external.h. Include <elf.h> instead but only if necessary.
12521
ca5c370d
PA
125222009-12-28 Pedro Alves <pedro@codesourcery.com>
12523
12524 * linux-low.c (linux_remove_process): Remove `detaching'
12525 parameter. Don't release/detach from thread_db here.
12526 (linux_kill): Release/detach from thread_db here, ...
12527 (linux_detach): ... and here, before actually detaching.
12528 (linux_wait_1): ... and here, when a process exits.
12529 * thread-db.c (any_thread_of): New.
12530 (thread_db_free): Switch the current inferior to a thread of the
12531 passed in process.
12532
4ee62156
DE
125332009-12-21 Doug Evans <dje@google.com>
12534
d90e6a88
DE
12535 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12536
c5f62d5f
DE
12537 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12538 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12539 warning ifndef __NR_tkill. Move setting of errno there too.
12540 Delete unnecessary resetting of errno after syscall.
12541 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12542
10e86dd7
DE
12543 * configure.ac: Check for dladdr.
12544 * config.in: Regenerate.
12545 * configure: Regenerate.
12546 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12547 (try_thread_db_load): Update.
12548
4ee62156
DE
12549 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12550
00f515da
DE
125512009-12-18 Doug Evans <dje@google.com>
12552
e9464885
DE
12553 * event-loop.c: Include unistd.h if it exists.
12554
07d4f67e
DE
12555 * linux-low.c (my_waitpid): Move definition away from being in
12556 between linux_tracefork_child/linux_test_for_tracefork.
12557
00f515da
DE
12558 * gdb_proc_service.h (psaddr_t): Fix type.
12559 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12560 signature to match glibc.
12561
1de1badb
DE
125622009-12-16 Doug Evans <dje@google.com>
12563
12564 * linux-low.c (linux_read_memory): Fix argument to read.
12565
aeeb81d1
PA
125662009-11-26 Pedro Alves <pedro@codesourcery.com>
12567
12568 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12569 events, don't leave current_inferior pointing at null.
12570
10357975
PA
125712009-11-26 Pedro Alves <pedro@codesourcery.com>
12572
12573 * win32-low.c (LOG): Delete.
12574 (OUTMSG): Output to stderr.
12575 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12576 on compile time LOG macro.
12577 (win32_wait): Fix debug output.
12578
cf6e3471
PA
125792009-11-26 Pedro Alves <pedro@codesourcery.com>
12580
12581 * win32-low.c (win32_add_one_solib): If the dll name is
12582 "ntdll.dll", prepend the system directory to the dll path.
12583
0c85e18e
MK
125842009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12585
12586 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12587
9ac544ce 125882009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12589 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12590
12591 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12592 * configure.ac: Check for __mcoldfire__ and set
12593 gdb_cv_m68k_is_coldfire.
12594 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12595 reg-cf.o and reg-m68k.o.
12596 * configure: Regenerated.
12597
fd7dd3e6
PA
125982009-11-16 Pedro Alves <pedro@codesourcery.com>
12599
12600 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12601 Pass it to thread_db_free.
12602 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12603 proper `detaching' argument to linux_remove_process.
12604 * linux-low.h (thread_db_free): Add `detaching' parameter.
12605 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12606 to thread_db_free.
12607 (thread_db_free): Add `detaching' parameter. Only
12608 call td_ta_clear_event if detaching from process.
12609
75aa492e
MK
126102009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12611
12612 * thread-db.c (thread_db_free): Fix typo.
12613
21e1bee4
PP
126142009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12615
12616 PR gdb/10838
12617 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12618
8838b45e
NS
126192009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12620
12621 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12622 with an i686 compiler.
12623 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12624 needed.
12625 * configure: Rebuilt.
12626
8a35fb51
SL
126272009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12628
12629 PR gdb/10783
12630
12631 * server.c (handle_search_memory_1): Correct read_addr initialization
12632 in loop for searching subsequent chunks.
12633
96f15937
PP
126342009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12635
12636 * configure.ac: New --with-libthread-db option.
12637 * thread-db.c: Allow direct dependence on libthread_db.
12638 (thread_db_free): Adjust.
12639 * config.in: Regenerate.
12640 * configure: Likewise.
889bf7c5 12641
5f7d1694
PP
126422009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12643
12644 PR gdb/10757
12645 * thread-db.c (attach_thread): New function.
12646 (maybe_attach_thread): Return success/failure.
12647 (find_new_threads_callback): Adjust.
889bf7c5
PA
12648 (thread_db_find_new_threads): Loop until no new threads.
12649
88e3b899
PA
126502009-10-13 Pedro Alves <pedro@codesourcery.com>
12651
12652 * proc-service.c (ps_lgetregs): Formatting.
12653
cdbfd419
PP
126542009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12655
12656 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12657 * configure.ac: Adjust.
12658 * linux-low.h (struct process_info_private): Move members to struct
12659 thread_db.
12660 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12661 * linux-low.c (linux_remove_process): Adjust.
12662 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12663 * server.c (handle_query): Move code ...
12664 (handle_monitor_command): ... here. New function.
12665 * target.h (struct target_ops): New member.
12666 * thread-db.c (struct thread_db): New.
12667 (libthread_db_search_path): New variable.
12668 (thread_db_create_event, thread_db_enable_reporting)
12669 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12670 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12671 (try_thread_db_load_1, dladdr_to_soname): New functions.
12672 (try_thread_db_load, thread_db_load_search): New functions.
12673 (thread_db_init): Search for libthread_db.
12674 (thread_db_free): New function.
12675 (thread_db_handle_monitor_command): Likewise.
12676 * config.in: Regenerate.
12677 * configure: Regenerate.
889bf7c5 12678
4168d2d6
UW
126792009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12680
12681 * spu-low.c (spu_kill): Wait for inferior to terminate.
12682 Call clear_inferiors.
12683 (spu_detach): Call clear_inferiors.
12684
81ecdfbb
RW
126852009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12686
12687 * aclocal.m4: Regenerate.
12688 * config.in: Likewise.
12689 * configure: Likewise.
12690
0b9ff2c0
UW
126912009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12692
12693 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12694 (parse_spufs_run): New function.
12695 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12696 (ppc_breakpoint_at): Handle SPU breakpoints.
12697
efcbbd14
UW
126982009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12699
12700 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12701 (SPUFS_MAGIC): Define.
12702 (spu_enumerate_spu_ids): New function.
12703 (linux_qxfer_spu): New function.
12704 (linux_target_ops): Install linux_qxfer_spu.
12705
f4d9bade
UW
127062009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12707
12708 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12709 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12710 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12711 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12712 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12713 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12714 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12715 (init_registers_powerpc_cell32l): Add prototype.
12716 (init_registers_powerpc_cell64l): Likewise.
12717 (ppc_arch_setup): Detect Cell/B.E. architecture.
12718
96e946ca
RW
127192009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12720
12721 * Makefile.in (datarootdir): New variable.
12722
58d6951d
DJ
127232009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12724
12725 * linux-low.c (linux_write_memory): Update debugging output.
12726 * Makefile.in (clean): Add new descriptions.
12727 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12728 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12729 * configure.srv: Add new files for arm*-*-linux*.
12730 * linux-arm-low.c: Add new declarations.
12731 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12732 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12733 (HWCAP_VFPv3D16): New.
12734 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12735 instead of __IWMMXT__.
12736 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12737 (arm_arch_setup): New.
12738 (target_regsets): Remove #ifdef. Add VFP regset.
12739 (the_low_target): Use arm_arch_setup.
12740
12b42a12
DJ
127412009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12742
12743 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12744 the main thread again.
12745
ac8c974e
AR
127462009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12747
12748 Adding Neutrino gdbserver.
12749 * configure: Regenerated.
12750 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12751 * configure.srv (i[34567]86-*-nto*): New target.
12752 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12753 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12754 (nto_comctrl) [__QNX__]: New function.
12755 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12756
4424e0c3 127572009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12758
12759 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12760 srv_tgtobj.
12761
912cf4ba
PA
127622009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12763 Pedro Alves <pedro@codesourcery.com>
12764
12765 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12766 don't support CONTEXT_EXTENDED_REGISTERS.
12767 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12768 (the_low_target): Install them.
12769 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12770 failing with ERROR_PIPE_NOT_CONNECTED.
12771
aa5ca48f
DE
127722009-06-30 Doug Evans <dje@google.com>
12773 Pierre Muller <muller@ics.u-strasbg.fr>
12774
12775 Add h/w watchpoint support to x86-linux, win32-i386.
12776 * Makefile.in (SFILES): Add i386-low.c
12777 (i386_low_h): Define.
12778 (i386-low.o): Add dependencies.
12779 (linux-x86-low.o): Add i386-low.h dependency.
12780 (win32-i386-low.o): Ditto.
12781 * i386-low.c: New file.
12782 * i386-low.h: New file.
12783 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12784 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12785 * linux-low.c (linux_add_process): Initialize arch_private.
12786 (linux_remove_process): Free arch_private.
12787 (add_lwp): Initialize arch_private.
12788 (delete_lwp): Free arch_private.
12789 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12790 provided.
12791 * linux-low.h (process_info_private): New member arch_private.
12792 (lwp_info): New member arch_private.
12793 (linux_target_ops): New members new_process, new_thread,
12794 prepare_to_resume.
12795 (ptid_of): New macro.
12796 * linux-x86-low.c: Include stddef.h, i386-low.h.
12797 (arch_process_info): New struct.
12798 (arch_lwp_info): New struct.
12799 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12800 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12801 (i386_dr_low_get_status): New function.
12802 (x86_insert_point, x86_remove_point): New functions.
12803 (x86_stopped_by_watchpoint): New function.
12804 (x86_stopped_data_address): New function.
12805 (x86_linux_new_process, x86_linux_new_thread): New functions.
12806 (x86_linux_prepare_to_resume): New function.
12807 (the_low_target): Add entries for insert_point, remove_point,
12808 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12809 prepare_to_resume.
12810 * server.c (debug_hw_points): New global.
12811 (monitor_show_help): Document set debug-hw-points.
12812 (handle_query): Process "set debug-hw-points".
12813 * server.h (debug_hw_points): Declare.
12814 (paddress): Declare.
12815 * utils.c (NUMCELLS, CELLSIZE): New macros.
12816 (get_sell, xsnprintf, paddress): New functions.
12817 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12818 remove_point, stopped_by_watchpoint, stopped_data_address.
12819 * win32-i386-low.c: Include i386-low.h.
12820 (debug_reg_state): Replaces dr.
12821 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12822 (i386_dr_low_get_status): New function.
12823 (i386_insert_point, i386_remove_point): New functions.
12824 (i386_stopped_by_watchpoint): New function.
12825 (i386_stopped_data_address): New function.
12826 (i386_initial_stuff): Update.
12827 (get_thread_context,set_thread_context,i386_thread_added): Update.
12828 (the_low_target): Add entries for insert_point,
12829 remove_point, stopped_by_watchpoint, stopped_data_address.
12830 * win32-low.c (win32_insert_watchpoint): New function.
12831 (win32_remove_watchpoint): New function.
12832 (win32_stopped_by_watchpoint): New function.
12833 (win32_stopped_data_address): New function.
12834 (win32_target_ops): Add entries for insert_watchpoint,
12835 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12836 * win32-low.h (win32_target_ops): New members insert_point,
12837 remove_point, stopped_by_watchpoint, stopped_data_address.
12838
d993e290
PA
128392009-06-25 Pedro Alves <pedro@codesourcery.com>
12840
12841 * server.c (process_serial_event): Re-return unsupported, not
12842 error, if the type isn't recognized. Re-allow supporting only
12843 insert or remove packets. Also call require_running for
12844 breakpoints. Add missing break statement to default case. Tidy.
12845 * target.h (struct target_ops): Rename insert_watchpoint to
12846 insert_point, and remove_watchpoint to remove_point.
12847
12848 * linux-low.h (struct linux_target_ops): Likewise.
12849 * linux-low.c (linux_insert_watchpoint): Rename to ...
12850 (linux_insert_point): ... this. Adjust.
12851 (linux_remove_watchpoint): Rename to ...
12852 (linux_remove_point): ... this. Adjust.
12853 (linux_target_ops): Adjust.
12854 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12855 (cris_insert_point): ... this.
12856 (cris_remove_watchpoint): Rename to ...
12857 (cris_remove_point): ... this.
12858 (the_low_target): Adjust.
12859
0f54c268
PM
128602009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12861
12862 * server.c (handle_v_kill): Pass signal_pid to
12863 kill_inferior if multi_process is zero.
12864
c6314022
AR
128652009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12866
12867 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12868 * target.h (target_ops): Comment for *_watchpoint to make it clear
12869 the functions can get types '0' and '1'.
12870
4463ce24
AR
128712009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12872
12873 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12874 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12875 * regcache.c (get_regcache): Likewise.
12876 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12877 * win32-low.c (child_fetch_inferior_registers): Remove check for
12878 regno 0.
12879
cf8fd78b
PA
128802009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12881 Pedro Alves <pedro@codesourcery.com>
12882
12883 * target.h (struct target_ops) <supports_multi_process>: New
12884 callback.
12885 (target_supports_multi_process): New.
12886 * server.c (handle_query): Even if GDB reports support, only
12887 enable multi-process if the target also supports it. Report
12888 multi-process support only if the target backend supports it.
12889 * linux-low.c (linux_supports_multi_process): New function.
12890 (linux_target_ops): Install it as target_supports_multi_process
12891 callback.
12892
47c0c975
DE
128932009-05-24 Doug Evans <dje@google.com>
12894
e09875d4
DE
12895 Global renaming of find_thread_pid to find_thread_ptid.
12896 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12897 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12898 All callers updated.
12899
e27d73f6
DE
12900 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12901 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12902 directly.
12903
47c0c975
DE
12904 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12905 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12906 (linux_resume_one_lwp): Ditto.
12907
2acc282a
DE
129082009-05-23 Doug Evans <dje@google.com>
12909
12910 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12911 from struct inferior_list_entry * to struct lwp_info *.
12912 All callers updated.
12913
9f1036c1
DE
129142009-05-13 Doug Evans <dje@google.com>
12915
12916 * linux-x86-low.c: Don't include assert.h.
12917 (x86_siginfo_fixup): Use fatal, not assert.
12918 (x86_arch_setup): Fix comment.
12919
d0722149
DE
129202009-05-12 Doug Evans <dje@google.com>
12921
12922 Biarch support for i386/amd64 gdbserver.
12923 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12924 Add linux-x86-low.c.
12925 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12926 (linux-x86-low.o): Add.
12927 * linux-x86-64-low.c: Delete.
12928 * linux-i386-low.c: Delete.
12929 * linux-x86-low.c: New file.
12930 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12931 linux-x86-low.o.
12932 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12933 linux-x86-low.o.
12934 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12935 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12936 (linux_child_pid_to_exec_file): New function.
12937 (elf_64_header_p, elf_64_file_p): New functions.
12938 (siginfo_fixup): New function.
12939 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12940 give target a chance to convert layout.
12941 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12942 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12943
fdeb2a12
DE
129442009-05-07 Doug Evans <dje@google.com>
12945
12946 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12947 (regsets_store_inferior_registers): Ditto.
12948
a6dbe5df
PA
129492009-05-06 Pedro Alves <pedro@codesourcery.com>
12950
12951 PR server/10048
12952
12953 * linux-low.c (must_set_ptrace_flags): Delete.
12954 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12955 of the global.
12956 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12957 `lwp->must_set_ptrace_flags' instead.
ba42693b 12958 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12959 (linux_wait_1): ... not here.
12960
5091eb23
DE
129612009-04-30 Doug Evans <dje@google.com>
12962
9f767825
DE
12963 * inferiors.c (started_inferior_callback): New function.
12964 (attached_inferior_callback): New function.
12965 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12966 * server.c (print_started_pid, print_attached_pid): New functions.
12967 (detach_or_kill_for_exit): New function.
12968 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12969 * server.h (have_started_inferiors_p): Declare.
12970 (have_attached_inferiors_p): Declare.
12971
5091eb23
DE
12972 * inferiors.c (remove_process): Fix memory leak, free process.
12973 * linux-low.c (linux_remove_process): New function.
12974 (linux_kill): Call it instead of remove_process.
12975 (linux_detach, linux_wait_1): Ditto.
12976
155c8968
PA
129772009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12978
12979 * configure.srv: Add x86 Windows CE target.
12980
7fe519cb
UW
129812009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12982
12983 * inferiors.c (get_thread_process): Make global.
12984 * server.h (get_thread_process): Add prototype.
12985 * thread-db.c (find_one_thread): Use get_thread_process
12986 instead of current_process.
12987 (thread_db_get_tls_address): Do not crash if called when
12988 thread layer is not yet initialized.
12989
5472f405
UW
129902009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12991
12992 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12993 * spu-low.c (current_tid): Rename to ...
12994 (current_ptid): ... this.
12995 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12996 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12997 ptid_get_lwp (current_ptid) instead of current_tid.
12998 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12999 instead of current_tid. Use find_process_pid to verify pid
13000 argument is valid. Pass proper argument to remove_process.
13001 (spu_thread_alive): Compare current_ptid instead of current_tid.
13002 (spu_resume): Likewise.
13003
55ac2b99
PA
130042009-04-02 Pedro Alves <pedro@codesourcery.com>
13005
13006 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13007 variable.
13008
95954743
PA
130092009-04-01 Pedro Alves <pedro@codesourcery.com>
13010
13011 Implement the multiprocess extensions, and add linux multiprocess
13012 support.
13013
13014 * server.h (ULONGEST): Declare.
13015 (struct ptid, ptid_t): New.
13016 (minus_one_ptid, null_ptid): Declare.
13017 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13018 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13019 (struct inferior_list_entry): Change `id' type from unsigned from
13020 to ptid_t.
13021 (struct sym_cache, struct breakpoint, struct
13022 process_info_private): Forward declare.
13023 (struct process_info): Declare.
13024 (current_process): Declare.
13025 (all_processes): Declare.
13026 (initialize_inferiors): Declare.
13027 (add_thread): Adjust to use ptid_t.
13028 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13029 (add_process, remove_process, find_thread_pid): Declare.
13030 (find_inferior_id): Adjust to use ptid_t.
13031 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13032 (multi_process): Declare.
13033 (push_event): Adjust to use ptid_t.
13034 (read_ptid, write_ptid): Declare.
13035 (prepare_resume_reply): Adjust to use ptid_t.
13036 (clear_symbol_cache): Declare.
13037 * inferiors.c (all_processes): New.
13038 (null_ptid, minus_one_ptid): New.
13039 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13040 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13041 (add_thread): Change unsigned long to ptid. Remove gdb_id
13042 parameter. Adjust.
13043 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13044 (gdb_id_to_thread): Rename to ...
13045 (find_thread_pid): ... this. Change unsigned long to ptid.
13046 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13047 (loaded_dll, pull_pid_from_list): Adjust.
13048 (add_process, remove_process, find_process_pid)
13049 (get_thread_process, current_process, initialize_inferiors): New.
13050 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13051 (struct target_waitstatus) <related_pid>: Ditto.
13052 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13053 return type to int.
13054 (struct target_ops) <join>: Add `pid' argument.
13055 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13056 (struct target_ops) <wait>: Add `ptid' field. Change return type
13057 to ptid.
13058 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13059 (mywait): Add `ptid' argument. Change return type to ptid_t.
13060 (target_pid_to_str): Declare.
13061 * target.c (set_desired_inferior): Adjust to use ptids.
13062 (mywait): Add new `ptid' argument. Adjust.
13063 (target_pid_to_str): New.
13064 * mem-break.h (free_all_breakpoints): Declare.
13065 * mem-break.c (breakpoints): Delelete.
13066 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13067 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13068 to use per-process breakpoint list.
13069 (free_all_breakpoints): New.
13070 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13071 (symbol_cache, all_symbols_looked_up): Delete.
13072 (hexchars): New.
13073 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13074 read_ptid): New.
13075 (prepare_resume_reply): Change ptid argument's type from unsigned
13076 long to ptid_t. Adjust. Implement W;process and X;process.
13077 (free_sym_cache, clear_symbol_cache): New.
13078 (look_up_one_symbol): Adjust to per-process symbol cache. *
13079 * server.c (cont_thread, general_thread, step_thread): Change type
13080 to ptid_t.
13081 (attached): Delete.
13082 (multi_process): New.
13083 (last_ptid): Change type to ptid_t.
13084 (struct vstop_notif) <ptid>: Change type to ptid_t.
13085 (queue_stop_reply, push_event): Change `ptid' argument's type to
13086 ptid_t.
13087 (discard_queued_stop_replies): Add `pid' argument.
13088 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13089 changes. Don't reference the `attached' global.
13090 (attach_inferior): Adjust to mywait interface changes.
13091 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13092 features. Handle and report "multiprocess+". Handle
13093 "qAttached:PID".
13094 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13095 changes.
13096 (handle_v_kill): New.
13097 (handle_v_stopped): Adjust to use target_pid_to_str.
13098 (handle_v_requests): Allow multiple attaches and runs when
13099 multiprocess extensions are in effect. Handle "vKill".
13100 (myresume): Adjust to use ptids.
13101 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13102 (handle_status): Adjust to discard_queued_stop_replies interface
13103 change.
13104 (first_thread_of, kill_inferior_callback)
13105 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13106 (main): Call initialize_inferiors. Adjust to use ptids, killing
13107 and detaching from all inferiors. Handle multiprocess packet
13108 variants.
13109 * linux-low.h: Include gdb_proc_service.h.
13110 (struct process_info_private): New.
13111 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13112 <lwpid_of>: Use ptid_get_lwp.
13113 (get_lwp_thread): Adjust.
13114 (struct lwp_info): Add `dead' member.
13115 (find_lwp_pid): Declare.
13116 * linux-low.c (thread_db_active): Delete.
13117 (new_inferior): Adjust comment.
13118 (inferior_pid): Delete.
13119 (linux_add_process): New.
13120 (handle_extended_wait): Adjust.
13121 (add_lwp): Change unsigned long to ptid.
13122 (linux_create_inferior): Add process to processes table. Adjust
13123 to use ptids. Don't set new_inferior here.
13124 (linux_attach_lwp): Rename to ...
13125 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13126 it. Adjust to use ptids.
13127 (linux_attach_lwp): New.
13128 (linux_attach): Add process to processes table. Don't set
13129 new_inferior here.
13130 (struct counter): New.
13131 (second_thread_of_pid_p, last_thread_of_process_p): New.
13132 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13133 multiple processes.
13134 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13135 processes. Remove process from process table.
13136 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13137 to multiple processes.
13138 (any_thread_of): New.
13139 (linux_detach): Add `pid' argument, and handle it. Remove process
13140 from processes table.
13141 (linux_join): Add `pid' argument. Handle it.
13142 (linux_thread_alive): Change unsighed long argument to ptid_t.
13143 Consider dead lwps as not being alive.
13144 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13145 threads we're not interested in.
13146 (same_lwp, find_lwp_pid): New.
13147 (linux_wait_for_lwp): Change `pid' argument's type from int to
13148 ptid_t. Adjust.
13149 (linux_wait_for_event): Rename to ...
13150 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13151 from int to ptid_t. Adjust.
13152 (linux_wait_for_event): New.
13153 (linux_wait_1): Add `ptid' argument. Change return type to
13154 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13155 that exit from the process table.
13156 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13157 Adjust.
13158 (mark_lwp_dead): New.
13159 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13160 stopping all threads, mark its main lwp as dead.
13161 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13162 ptids.
13163 (fetch_register, usr_store_inferior_registers)
13164 (regsets_fetch_inferior_registers)
13165 (regsets_store_inferior_registers, linux_read_memory)
13166 (linux_write_memory): Inline `inferior_pid'.
13167 (linux_look_up_symbols): Adjust to use per-process
13168 `thread_db_active'.
13169 (linux_request_interrupt): Adjust to use ptids.
13170 (linux_read_auxv): Inline `inferior_pid'.
13171 (initialize_low): Don't reference thread_db_active.
13172 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13173 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13174 (ps_getpid): Return the pid of the current inferior.
13175 * thread-db.c (proc_handle, thread_agent): Delete.
13176 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13177 per-process data.
13178 (find_one_thread): Change argument type to ptid_t. Adjust to
13179 per-process data.
13180 (maybe_attach_thread): Adjust to per-process data and ptids.
13181 (thread_db_find_new_threads): Ditto.
13182 (thread_db_init): Ditto.
13183 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13184 processes table. Adjust to use ptids.
13185 (spu_kill, spu_detach): Adjust interface. Remove process from
13186 processes table.
13187 (spu_join, spu_thread_alive): Adjust interface.
13188 (spu_wait): Adjust interface. Remove process from processes
13189 table. Adjust to use ptids.
13190 * win32-low.c (current_inferior_tid): Delete.
13191 (current_inferior_ptid): New.
13192 (debug_event_ptid): New.
13193 (thread_rec): Take a ptid. Adjust.
13194 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13195 (child_delete_thread): Ditto.
13196 (do_initial_child_stuff): Add `attached' argument. Add process to
13197 processes table.
13198 (child_fetch_inferior_registers, child_store_inferior_registers):
13199 Adjust.
13200 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13201 (win32_attach): Pass 1 to do_initial_child_stuff.
13202 (win32_kill): Adjust interface. Remove process from processes
13203 table.
13204 (win32_detach): Ditto.
13205 (win32_join): Adjust interface.
13206 (win32_thread_alive): Take a ptid.
13207 (win32_resume): Adjust to use ptids.
13208 (get_child_debug_event): Ditto.
13209 (win32_wait): Adjust interface. Remove exiting process from
13210 processes table.
13211
bd99dc85
PA
132122009-04-01 Pedro Alves <pedro@codesourcery.com>
13213
13214 Non-stop mode support.
13215
13216 * server.h (non_stop): Declare.
13217 (gdb_client_data, handler_func): Declare.
13218 (delete_file_handler, add_file_handler, start_event_loop):
13219 Declare.
13220 (handle_serial_event, handle_target_event, push_event)
13221 (putpkt_notif): Declare.
13222 * target.h (enum resume_kind): New.
13223 (struct thread_resume): Replace `step' field by `kind' field.
13224 (TARGET_WNOHANG): Define.
13225 (struct target_ops) <wait>: Add `options' argument.
13226 <supports_non_stop, async, start_non_stop>: New fields.
13227 (target_supports_non_stop, target_async): New.
13228 (start_non_stop): Declare.
13229 (mywait): Add `options' argument.
13230 * target.c (mywait): Add `options' argument. Print child exit
13231 notifications here.
13232 (start_non_stop): New.
13233 * server.c (non_stop, own_buf, mem_buf): New globals.
13234 (struct vstop_notif): New.
13235 (notif_queue): New global.
13236 (queue_stop_reply, push_event, discard_queued_stop_replies)
13237 (send_next_stop_reply): New.
13238 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13239 interface changes.
13240 (attach_inferior): In non-stop mode, don't wait for the target
13241 here.
13242 (handle_general_set): Handle QNonStop.
13243 (handle_query): When handling qC, return the current general
13244 thread, instead of the first thread of the list.
13245 (handle_query): If the backend supports non-stop mode, include
13246 QNonStop+ in the qSupported query response.
13247 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13248 and non-stop mode.
13249 (handle_v_attach, handle_v_run): Handle non-stop mode.
13250 (handle_v_stopped): New.
13251 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13252 (myresume): Adjust to use resume_kind. Handle non-stop.
13253 (queue_stop_reply_callback): New.
13254 (handle_status): Handle non-stop mode.
13255 (main): Clear non_stop flag on reconnection. Use the event-loop.
13256 Refactor serial protocol handling from here ...
13257 (process_serial_event): ... to this new function. When GDB
13258 selects any thread, select one here. In non-stop mode, wait until
13259 GDB acks all pending events before exiting.
13260 (handle_serial_event, handle_target_event): New.
13261 * remote-utils.c (remote_open): Install remote_desc in the event
13262 loop.
13263 (remote_close): Remove remote_desc from the event loop.
13264 (putpkt_binary): Rename to...
13265 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13266 (putpkt_binary): New as wrapper around putpkt_binary_1.
13267 (putpkt_notif): New.
13268 (prepare_resume_reply): In non-stop mode, don't change the
13269 general_thread.
13270 * event-loop.c: New.
13271 * Makefile.in (OBJ): Add event-loop.o.
13272 (event-loop.o): New rule.
13273
13274 * linux-low.h (pid_of): Moved here.
13275 (lwpid_of): New.
13276 (get_lwp_thread): Use lwpid_of.
13277 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13278 * linux-low.c (pid_of): Delete.
13279 (inferior_pid): Use lwpid_of.
13280 (linux_event_pipe): New.
13281 (target_is_async_p): New.
13282 (delete_lwp): New.
13283 (handle_extended_wait): Use lwpid_of.
13284 (add_lwp): Don't set lwpid field.
13285 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13286 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13287 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13288 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13289 first. Adjust to linux_wait_for_event interface changes. Use
13290 lwpid_of.
13291 (linux_detach): Don't delete the main lwp here.
13292 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13293 (status_pending_p): Don't consider explicitly suspended lwps.
13294 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13295 pointer. Add OPTIONS argument. Change return type to int. Use
13296 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13297 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13298 pointer. Add status pointer argument. Return a pid instead of a
13299 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13300 changes. In non-stop mode, don't switch to a random thread.
13301 (linux_wait): Rename to...
13302 (linux_wait_1): ... this. Add target_options argument, and handle
13303 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13304 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13305 clean exit and signal exit code. Don't stop all threads in
13306 non-stop mode. In all-stop mode, only stop all threads when
13307 reporting a stop to GDB. Handle explicit thread stop requests.
13308 (async_file_flush, async_file_mark): New.
13309 (linux_wait): New.
13310 (send_sigstop): Use lwpid_of.
13311 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13312 interface changes. In non-stop mode, don't switch to a random
13313 thread.
13314 (linux_resume_one_lwp): Use lwpid_of.
13315 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13316 (linux_resume_one_thread): ... this. Handle resume_stop. In
13317 non-stop mode, don't look for pending flag in all threads.
13318 (resume_status_pending_p): Don't consider explicitly suspended
13319 threads.
13320 (my_waitpid): Reimplement. Emulate __WALL.
13321 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13322 Use lwpid_of.
13323 (sigchld_handler, linux_supports_non_stop, linux_async)
13324 (linux_start_non_stop): New.
13325 (linux_target_ops): Register linux_supports_non_stop, linux_async
13326 and linux_start_non_stop.
13327 (initialize_low): Install SIGCHLD handler.
13328 * thread-db.c (thread_db_create_event, find_one_thread)
13329 (thread_db_get_tls_address): Use lwpid_of.
13330 * win32-low.c (win32_detach): Adjust to use resume_kind.
13331 (win32_wait): Add `options' argument.
13332 * spu-low.c (spu_resume): Adjust to use resume_kind.
13333 (spu_wait): Add `options' argument.
13334
5b1c542e
PA
133352009-04-01 Pedro Alves <pedro@codesourcery.com>
13336
13337 Decouple target code from remote protocol.
13338
13339 * target.h (enum target_waitkind): New.
13340 (struct target_waitstatus): New.
13341 (struct target_ops) <wait>: Return an unsigned long. Take a
13342 target_waitstatus pointer instead of a char pointer.
13343 (mywait): Likewise.
13344 * target.c (mywait): Change prototype to return an unsigned long.
13345 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13346 * server.h (thread_from_wait, old_thread_from_wait): Delete
13347 declarations.
13348 (prepare_resume_reply): Change prototype to take a
13349 target_waitstatus.
13350 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13351 (last_status, last_ptid): New.
13352 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13353 pid instead of a signal.
13354 (attach_inferior): Remove "status" and "signal" parameters.
13355 Adjust.
13356 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13357 not as an address.
13358 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13359 (handle_v_requests, myresume): Remove "status" and "signal"
13360 parameters. Adjust.
13361 (handle_status): New.
13362 (main): Delete local `status'. Adjust.
13363 * remote-utils.c: Include target.h.
13364 (prepare_resume_reply): Change prototype to take a
13365 target_waitstatus. Adjust.
13366
13367 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13368 interface.
13369 * spu-low.c (spu_wait): Adjust.
13370 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13371 Delete.
13372 (win32_wait): Adjust.
13373
2bd7c093
PA
133742009-04-01 Pedro Alves <pedro@codesourcery.com>
13375
13376 * target.h (struct thread_resume): Delete leave_stopped member.
13377 (struct target_ops): Add a `n' argument to the `resume' callback.
13378 * server.c (start_inferior): Adjust.
13379 (handle_v_cont, myresume): Adjust.
13380 * linux-low.c (check_removed_breakpoint): Adjust to resume
13381 interface change, and to removed leave_stopped field.
13382 (resume_ptr): Delete.
13383 (struct thread_resume_array): New.
13384 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13385 resume interface change.
13386 (linux_continue_one_thread, linux_queue_one_thread)
13387 (resume_status_pending_p): Check if the resume field is NULL
13388 instead of checking the leave_stopped member.
13389 (linux_resume): Adjust to the target resume interface change.
13390 * spu-low.c (spu_resume): Adjust to the target resume interface
13391 change.
13392 * win32-low.c (win32_detach, win32_resume): Ditto.
13393
c35fafde
PA
133942009-04-01 Pedro Alves <pedro@codesourcery.com>
13395
13396 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13397 flag.
13398 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13399 pending.
13400 (linux_continue_one_thread): Only preserve the stepping flag if
13401 there's a pending breakpoint.
13402
0a59d50b
PA
134032009-03-31 Pedro Alves <pedro@codesourcery.com>
13404
13405 * server.c (main): After the inferior having exited, call
13406 remote_close before exiting gdbserver.
13407
f04c6d38
TJB
134082009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13409
13410 Fix size of FPSCR in Power 7 processors.
13411 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13412 (PPC_FEATURE_HAS_DFP): New #define.
13413 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13414 size of the FPSCR.
13415
78e5cee6
PA
134162009-03-23 Pedro Alves <pedro@codesourcery.com>
13417
13418 * server.c (handle_query) Whitespace and formatting.
13419
1b3f6016
PA
134202009-03-22 Pedro Alves <pedro@codesourcery.com>
13421
13422 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13423 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13424 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13425 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13426 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13427 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13428 Makefile.in, configure.ac: Fix whitespace throughout.
13429 * configure: Regenerate.
13430
a07b2135
PA
134312009-03-22 Pedro Alves <pedro@codesourcery.com>
13432
13433 * inferiors.c (find_inferior): Make it safe for the callback
13434 function to delete the currently iterated inferior.
13435
67cc2626
PA
134362009-03-22 Pedro Alves <pedro@codesourcery.com>
13437
13438 * Makefile.in (linuw_low_h): Move higher.
13439 (thread-db.o): Depend on $(linux_low_h).
13440
54a0b537
PA
134412009-03-17 Pedro Alves <pedro@codesourcery.com>
13442
13443 Rename "process" to "lwp" throughout.
13444
13445 * linux-low.c (all_processes): Rename to...
13446 (all_lwps): ... this.
13447 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13448 (add_process): Rename to ...
13449 (add_lwp): ... this. Adjust.
13450 (linux_create_inferior): Adjust.
13451 (linux_attach_lwp): Adjust.
13452 (linux_attach): Adjust.
13453 (linux_kill_one_process): Rename to ...
13454 (linux_kill_one_lwp): ... this. Adjust.
13455 (linux_kill): Adjust.
13456 (linux_detach_one_process): Rename to ...
13457 (linux_detach_one_lwp): ... this. Adjust.
13458 (linux_detach): Adjust.
13459 (check_removed_breakpoint): Adjust.
13460 (status_pending_p): Adjust.
13461 (linux_wait_for_process): Rename to ...
13462 (linux_wait_for_lwp): ... this. Adjust.
13463 (linux_wait_for_event): Adjust.
13464 (send_sigstop): Adjust.
13465 (wait_for_sigstop): Adjust.
13466 (stop_all_processes): Rename to ...
13467 (stop_all_lwps): ... this.
13468 (linux_resume_one_process): Rename to ...
13469 (linux_resume_one_lwp): ... this. Adjust.
13470 (linux_set_resume_request, linux_continue_one_thread)
13471 (linux_queue_one_thread, resume_status_pending_p)
13472 (usr_store_inferior_registers, regsets_store_inferior_registers)
13473 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13474 Adjust.
13475 * linux-low.h (get_process): Rename to ...
13476 (get_lwp): ... this. Adjust.
13477 (get_thread_process): Rename to ...
13478 (get_thread_lwp): ... this. Adjust.
13479 (get_process_thread): Rename to ...
13480 (get_lwp_thread): ... this. Adjust.
13481 (struct process_info): Rename to ...
13482 (struct lwp_info): ... this.
13483 (all_processes): Rename to ...
13484 (all_lwps): ... this.
13485 * proc-service.c (ps_lgetregs): Adjust.
13486 * thread-db.c (thread_db_create_event, find_one_thread)
13487 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13488
0b16c5cf
PA
134892009-03-14 Pedro Alves <pedro@codesourcery.com>
13490
13491 * server.c (handle_query): Handle "qAttached".
13492
32de4b9d
NS
134932009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13494
13495 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13496 GPLv3, update license URL.
13497
2aecd87f
DE
134982009-03-01 Doug Evans <dje@google.com>
13499
93efd302 13500 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13501 (server_h): Add gdb_signals.h.
13502 (signals.o): Update.
13503 * server.h (target_signal_from_host,target_signal_to_host_p)
13504 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13505
86b1f9c5
PM
135062009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13507
13508 * remote-utils.c (getpkt): Also generate remote-debug
13509 information if noack_mode is set.
13510
4aa995e1
PA
135112009-02-06 Pedro Alves <pedro@codesourcery.com>
13512
13513 * server.c (handle_query): Report qXfer:siginfo:read and
13514 qXfer:siginfo:write as supported and handle them.
13515 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13516 * linux-low.c (linux_xfer_siginfo): New.
13517 (linux_target_ops): Set it.
13518
62709adf
PA
135192009-01-26 Pedro Alves <pedro@codesourcery.com>
13520
13521 * server.c (gdbserver_usage): Mention --remote-debug.
13522 (main): Accept '--remote-debug' switch.
13523
aef93bd7
DE
135242009-01-18 Doug Evans <dje@google.com>
13525
13526 * regcache.c (new_register_cache): No need to check result of xcalloc.
13527 * server.c (handle_search_memory): Back out calls to xmalloc,
13528 result is checked and error is returned to user upon failure.
13529 (handle_query): Ditto. Add more checks for result of malloc.
13530 (handle_v_cont): Check result of malloc, report error back to
13531 user upon failure.
13532 (handle_v_run): Ditto. Call freeargv.
13533 * server.h (freeargv): Declare.
13534 * utils.c (freeargv): New fn.
13535
54363045
DE
135362009-01-15 Doug Evans <dje@google.com>
13537
f626972c
DE
13538 * gdbreplay.c (perror_with_name): Make arg const char *.
13539 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13540 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13541 * utils.c (perror_with_name): Make arg const char *.
54363045 13542
18aae699
PA
135432009-01-14 Pedro Alves <pedro@codesourcery.com>
13544
13545 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13546 when handling a EXIT_PROCESS_DEBUG_EVENT.
13547
ff703abe
JB
135482009-01-06 Joel Brobecker <brobecker@adacore.com>
13549
13550 * gdbreplay.c (gdbreplay_version): Update copyright year.
13551 * server.c (gdbserver_version): Likewise.
13552
f21cc1a2 135532009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13554
13555 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13556 (handle_extended_wait): Improve comment.
0e21c1ec 13557
bca929d3
DE
135582008-12-13 Doug Evans <dje@google.com>
13559
13560 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13561 * server.h (ATTR_MALLOC): New macro.
13562 (xmalloc,xcalloc,xstrdup): Declare.
13563 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13564 * inferiors.c: Ditto.
13565 * linux-low.c: Ditto.
13566 * mem-break.c: Ditto.
13567 * regcache.c: Ditto.
13568 * remote-utils.c: Ditto.
13569 * server.c: Ditto.
13570 * target.c: Ditto.
13571 * win32-low.c: Ditto.
13572
97438e3f
DE
135732008-12-12 Doug Evans <dje@google.com>
13574
896c7fbb
DE
13575 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13576 in debugging printf.
13577
97438e3f
DE
13578 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13579
e3b886f8
DE
135802008-12-09 Doug Evans <dje@google.com>
13581
13582 * linux-low.h (struct process_info): Delete member tid, unused.
13583 * thread-db.c (find_one_thread): Update.
13584 (maybe_attach_thread): Update.
13585
07e059b5
VP
135862008-12-02 Pedro Alves <pedro@codesourcery.com>
13587
889bf7c5
PA
13588 * target.h (struct target_ops): Add qxfer_osdata member.
13589 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13590 and dirent.h.
13591 (linux_qxfer_osdata): New functions.
13592 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13593 callback.
13594 * server.c (handle_query): Handle "qXfer:osdata:read:".
13595 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13596 (buffer_xml_printf): New functions.
13597 * server.h (struct buffer): New.
13598 (buffer_grow_str, buffer_grow_str0): New macros.
13599 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13600 (buffer_xml_printf): Declare.
07e059b5 13601
4cab47ab
DE
136022008-11-24 Doug Evans <dje@google.com>
13603
13604 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13605
f142445f
DJ
136062008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13607
13608 * server.c (handle_v_run): Always use the supplied argument list.
13609
d0107bb6 136102008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13611
d0107bb6
BW
13612 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13613 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13614
2c4ad781
TJB
136152008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13616
13617 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13618 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13619 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13620 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13621 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13622 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13623 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13624 XML target descriptions.
13625 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13626 when inferior is running on an ISA 2.05 or later processor. Add
13627 special case to return offset for full 64-bit slot of FPSCR when
13628 in 32-bits.
13629
dfb64f85
DJ
136302008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13631
13632 * Makefile.in (SFILES, clean): Added sparc64 files.
13633 (reg-sparc64.o, reg-sparc64.c): New.
13634 * configure.srv (sparc*-*-linux*): New configuration.
13635 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13636 syscall arguments for SPARC.
13637 (regsets_store_inferior_registers): Likewise.
13638 * linux-sparc-low.c: New file.
13639
66b6e1dd
DE
136402008-10-21 Doug Evans <dje@google.com>
13641
13642 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13643 (READLINE_DIR,READLINE_DEP): Delete.
13644 (INTERNAL_CFLAGS): Update.
13645 (LINTFLAGS): Update.
13646
9b710a42
PA
136472008-10-10 Pedro Alves <pedro@codesourcery.com>
13648
13649 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13650 whole argv from the last run, not just argv[0].
13651
5822d809
PA
136522008-09-08 Pedro Alves <pedro@codesourcery.com>
13653
13654 * regcache.c (new_register_cache): Return NULL if the register
13655 cache size isn't known yet.
13656 (free_register_cache): Avoid dereferencing a NULL regcache.
13657
74aac56f
DJ
136582008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13659
13660 * configure.srv: Merge MIPS and MIPS64.
13661
400b20f5
MR
136622008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13663
13664 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13665
677c5bb1
LM
136662008-08-18 Luis Machado <luisgpm@br.ibm.com>
13667
13668 * Makefile.in: Add required vsx dependencies.
13669
13670 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13671 Declare init_registers_powerpc_vsx32l.
13672 Declare init_registers_powerpc_vsx64l.
13673 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13674 (ppc_arch_setup): Check for VSX in hwcap.
13675 (ppc_fill_vsxregset): New function.
13676 (ppc_store_vsxregset): New function.
13677 Add new VSX entry in regset_info target_regsets.
13678
13679 * configure.srv: Add new VSX dependencies.
13680
a6f3e723
SL
136812008-08-12 Pedro Alves <pedro@codesourcery.com>
13682
13683 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13684 (remote_open): Set or clear transport_is_reliable.
13685 (putpkt_binary): Don't expect acks in noack mode.
13686 (getpkt): Don't send ack/nac in noack mode.
13687 * server.c (handle_general_set): Handle QStartNoAckMode.
13688 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13689 qSupported.
13690 (main): Reset noack_mode on every connection.
13691 * server.h (noack_mode): Declare.
13692
a417dc56
RW
136932008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13694
13695 * Makefile.in (GDBREPLAY_OBS): New variable.
13696 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13697
3221518c
UW
136982008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13699 Daniel Jacobowitz <dan@codesourcery.com>
13700
13701 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13702 (usr_store_inferior_registers): Likewise.
13703 (regsets_store_inferior_registers): Likewise.
13704
ec56be1b
PA
137052008-07-31 Rolf Jansen <rj@surtec.com>
13706 Pedro Alves <pedro@codesourcery.com>
13707
13708 * configure.ac: Check for memmem declaration.
13709 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13710 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13711 (disable_packet_qfThreadInfo): Unconditionally compile.
13712 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13713 * configure, config.in: Regenerate.
13714
2fe5e3ff
DE
137152008-07-28 Doug Kwan <dougkwan@google.com>
13716
13717 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13718 (linux_write_memory): Remove declaration of errno.
13719
836acd6d
UW
137202008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13721
13722 * linux-low.c (handle_extended_wait): Do not use "status"
13723 variable uninitialized.
13724
aeba519e
PA
137252008-07-07 Pedro Alves <pedro@codesourcery.com>
13726
13727 * server.c (handle_v_attach): Inhibit reporting dll changes.
13728
db42f210
PA
137292008-06-27 Pedro Alves <pedro@codesourcery.com>
13730
13731 * remote-utils.c (prepare_resume_reply): If requested, don't
13732 output "thread:TID" in the T stop reply.
13733
13734 * server.c (disable_packet_vCont, disable_packet_Tthread)
13735 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13736 (handle_query): If requested, disable support for qC, qfThreadInfo
13737 and qsThreadInfo.
13738 (handle_v_requests): If requested, disable support for vCont.
13739 (gdbserver_show_disableable): New.
13740 (main): Handle --disable-packet and --disable-packet=LIST.
13741
13742 * server.h (disable_packet_vCont, disable_packet_Tthread)
13743 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13744
8e4c5421
CD
137452008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13746
13747 * server.c (gdbserver_usage): Mention --version.
13748
6e23a804
DJ
137492008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13750
13751 * Makefile.in (gdbreplay.o): New rule.
13752
90aa6a40
JM
137532008-06-06 Joseph Myers <joseph@codesourcery.com>
13754
13755 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13756 message, not gdbserver.
13757
c16158bc 137582008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13759 Nathan Sidwell <nathan@codesourcery.com>
13760 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13761
13762 * acinclude.m4: Include ../../config/acx.m4.
13763 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13764 * configure, config.in: Regenerate.
13765 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13766 * server.c (gdbserver_version): Print PKGVERSION.
13767 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13768 (main): Adjust gdbserver_usage calls.
13769 * gdbreplay.c (version, host_name): Add declarations.
13770 (gdbreplay_version, gdbreplay_usage): New.
13771 (main): Accept --version and --help options.
13772
aeb75bf5
DJ
137732008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13774
13775 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13776 (arm_breakpoint_at): Handle Thumb.
13777 (the_low_target): Add comment.
13778
76b233dd
UW
137792008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13780
13781 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13782
08388c79
DE
137832008-05-09 Doug Evans <dje@google.com>
13784
a3c83fae
DE
13785 * server.h (decode_search_memory_packet): Declare.
13786 * remote-utils.c (decode_search_memory_packet): New fn.
13787 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13788 (handle_search_memory): New fn.
13789 (handle_query): Process qSearch:memory packets.
13790
bb9c3d36
UW
137912008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13792
13793 * regcache.c (registers_length): Remove.
13794 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13795 full register packet.
13796 * regcache.h (registers_length): Remove prototype.
13797 * server.h (PBUFSIZ): Define to 16384.
13798
7284e1be
UW
137992008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13800
13801 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13802 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13803 powerpc-64l.o, and powerpc-altivec64l.o.
13804 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13805 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13806 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13807 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13808 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13809 to srv_xmlfiles.
13810
13811 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13812 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13813 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13814 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13815 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13816 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13817 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13818 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13819 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13820 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13821 (clean): Update.
13822
13823 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13824 (init_registers_powerpc_32l): ... this new prototype.
13825 (init_registers_powerpc_32): Remove, replace by ...
13826 (init_registers_powerpc_altivec32l): ... this new prototype.
13827 (init_registers_powerpc_e500): Remove, replace by ...
13828 (init_registers_powerpc_e500l): ... this new prototype.
13829 (init_registers_ppc64): Remove, replace by ...
13830 (init_registers_powerpc_64l): ... this new prototype.
13831 (init_registers_powerpc_64): Remove, replace by ...
13832 (init_registers_powerpc_altivec64l): ... this new prototype.
13833 (ppc_num_regs): Set to 73.
13834 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13835 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13836 (ppc_cannot_store_register): Handle orig_r3 and trap.
13837 (ppc_arch_setup): Update init_registers_... calls.
13838 (ppc_fill_gregset): Handle orig_r3 and trap.
13839
13840 * inferiors.c (clear_inferiors): Reset current_inferior.
13841
fdc59709
PB
138422008-04-23 Paolo Bonzini <bonzini@gnu.org>
13843
889bf7c5
PA
13844 * acinclude.m4: Add override.m4.
13845 * configure: Regenerate.
fdc59709 13846
c9b2f845
UW
138472008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13848
13849 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13850 initial call to init_register_ppc64.
13851
550512b8
UW
138522008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13853
43aaf8b6
PA
13854 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13855 single powerpc*-*-linux* case.
550512b8
UW
13856 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13857
b6430ec3
UW
138582008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13859
13860 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13861 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13862 from reg_xmlfiles.
13863 * linux-ppc-low.c: Include <elf.h>.
13864 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13865 (ppc_hwcap): New global variable.
13866 (ppc_regmap): Remove __SPE__ #ifdef sections.
13867 (ppc_regmap_e500): New global variable.
13868 (ppc_cannot_store_register): Update __SPE__ special case.
13869 (ppc_get_hwcap): New function.
13870 (ppc_arch_setup): Use it to determine whether inferior supports
13871 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13872 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13873 Do not access registers if target does not support AltiVec.
13874 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13875 Do not access registers if target does not support SPE.
13876 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13877
52fa2412
UW
138782008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13879
13880 * linux-low.c (disabled_regsets, num_regsets): New.
13881 (use_regsets_p): Delete.
13882 (linux_wait_for_process): Clear disabled_regsets.
13883 (regsets_fetch_inferior_registers): Check and set it.
13884 (regsets_store_inferior_registers): Likewise.
13885 (linux_fetch_registers, linux_store_registers): Do not use
13886 use_regsets_p.
13887 (initialize_low): Allocate disabled_regsets.
13888
e28b3332
DJ
138892008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13890
13891 * Makefile.in (LIBOBJS): New.
13892 (OBS): Use LIBOBJS.
13893 (memmem.o): New rule.
13894 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13895 * configure: Regenerated.
13896
4536995d
UW
138972008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13898
13899 * server.c (handle_query): Never return "unsupported" for
13900 qXfer:features:read queries.
13901
221c031f
UW
139022008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13903
13904 * server.c (get_features_xml): Fix inverted condition.
13905 (handle_query): Always support qXfer:feature:read.
13906
ccd213ac
DJ
139072008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13908
13909 * server.c (wrapper_argv): New.
13910 (start_inferior): Handle wrapper_argv. If set, expect an extra
13911 trap.
13912 (gdbserver_usage): Document --wrapper.
13913 (main): Parse --wrapper.
13914
6fe305f7
UW
139152008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13916
13917 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13918 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13919 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13920 (ppc_set_pc): Likewise.
13921 (ppc_arch_setup): New function.
13922 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13923 of collect_register.
889bf7c5 13924 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13925
5b0a002e
UW
139262008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13927
13928 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13929 instead of linux-ppc64-low.o.
13930 * linux-ppc64-low.c: Remove file.
13931 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13932 (linux-ppc64-low.o): Remove rule.
13933
13934 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13935 (init_registers_powerpc_64): Likewise.
13936 (ppc_regmap): Conditionally define depending on __powerpc64__.
13937 (ppc_cannot_store_register): Do not special-case "fpscr" when
13938 compiled on __powerpc64__.
13939 (ppc_collect_ptrace_register): New function.
13940 (ppc_supply_ptrace_register): New function.
13941 (ppc_breakpoint): Change type to "unsigned int".
13942 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13943 (the_low_target): Conditionally provide initializers for the
889bf7c5 13944 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13945 collect_ptrace_register and supply_ptrace_register members.
13946
9b4b61c8
UW
139472008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13948
13949 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13950 * server.c (gdbserver_xmltarget): Define.
13951 (get_features_xml): Use it to replace "target.xml" and arch_string.
13952
13953 * configure.srv: Remove srv_xmltarget. Add XML files that were
13954 mentioned there to srv_xmlfiles instead. Remove conditional tests
13955 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13956 srv_xmlfiles and srv_regobj to include all possible choices.
13957 * configure.ac (srv_xmltarget): Remove.
13958 (srv_xmlfiles): Do not add "target.xml".
13959 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13960 checks for supplementary target information.
13961 * configure: Regenerate.
13962 * Makefile.in (XML_TARGET): Remove.
13963 (target.xml): Remove rule.
13964 (clean): Do not clean up target.xml.
13965 (.PRECIOUS): Do not mention target.xml.
13966
13967 * target.h (struct target_ops): Remove arch_string member.
13968 * linux-low.c (linux_arch_string): Remove.
13969 (linux_target_ops): Remove arch_string initializer.
13970 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13971 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13972 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13973 * spu-low.c (spu_arch_string): Remove.
13974 (spu_target_ops): Remove arch_string initializer.
13975 * win32-low.c (win32_arch_string): Remove.
13976 (win32_target_ops): Remove arch_string initializer.
13977 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13978 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13979 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13980
ee1a7ae4
UW
139812008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13982
13983 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13984 by collect_ptrace_register and supply_ptrace_register hooks.
13985 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13986 instead of checking for the_low_target.left_pad_xfer.
13987 (usr_store_inferior_registers): Use collect_ptrace_register callback
13988 instead of checking for the_low_target.left_pad_xfer.
13989
13990 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13991 (s390_supply_ptrace_register): Likewise.
13992 (s390_fill_gregset): Call s390_collect_ptrace_register.
13993 (the_low_target): Update.
13994
13995 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13996 (ppc_supply_ptrace_register): Likewise.
13997 (the_low_target): Update.
13998
13999 * linux-i386-low.c (the_low_target): Update.
14000 * linux-x86-64-low.c (the_low_target): Update.
14001
d61ddec4
UW
140022008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14003
14004 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14005 reg-s390.o and reg-s390x.o.
14006
14007 * linux-low.c (new_inferior): New global variable.
14008 (linux_create_inferior, linux_attach): Set it.
14009 (linux_wait_for_process): Call the_low_target.arch_setup after the
14010 target has stopped for the first time.
14011 (initialize_low): Do not call the_low_target.arch_setup.
14012
14013 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14014 (s390_set_pc): Likewise.
14015 (s390_arch_setup): New function.
14016 (the_low_target): Use s390_arch_setup as arch_setup routine.
14017
14018 * regcache.c (realloc_register_cache): New function.
14019 (set_register_cache): Call it for each existing regcache.
14020
d05b4ac3
UW
140212008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14022
14023 * server.h (init_registers): Remove prototype.
14024
14025 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14026 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14027 instead of init_registers ().
14028 * linux-arm-low.c (init_registers_arm): Add prototype.
14029 (init_registers_arm_with_iwmmxt): Likewise.
14030 (the_low_target): Add initializer for arch_setup field.
14031 * linux-cris-low.c (init_registers_cris): Add prototype.
14032 (the_low_target): Add initializer for arch_setup field.
14033 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14034 (the_low_target): Add initializer for arch_setup field.
14035 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14036 (the_low_target): Add initializer for arch_setup field.
14037 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14038 (the_low_target): Add initializer for arch_setup field.
14039 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14040 (the_low_target): Add initializer for arch_setup field.
14041 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14042 (the_low_target): Add initializer for arch_setup field.
14043 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14044 (init_registers_mips64_linux): Likewise.
14045 (the_low_target): Add initializer for arch_setup field.
14046 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14047 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14048 (the_low_target): Add initializer for arch_setup field.
14049 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14050 (init_registers_powerpc_64): Likewise.
14051 (the_low_target): Add initializer for arch_setup field.
14052 * linux-s390-low.c (init_registers_s390): Add prototype.
14053 (init_registers_s390x): Likewise.
14054 (the_low_target): Add initializer for arch_setup field.
14055 * linux-sh-low.c (init_registers_sh): Add prototype.
14056 (the_low_target): Add initializer for arch_setup field.
14057 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14058 (the_low_target): Add initializer for arch_setup field.
14059 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14060 (the_low_target): Add initializer for arch_setup field.
14061
14062 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14063 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14064 instead of init_registers ().
14065 * win32-arm-low.c (init_registers_arm): Add prototype.
14066 (the_low_target): Add initializer for arch_setup field.
14067 * win32-i386-low.c (init_registers_i386): Add prototype.
14068 (the_low_target): Add initializer for arch_setup field.
14069
14070 * spu-low.c (init_registers_spu): Add prototype.
14071 (initialize_low): Call initialie_registers_spu () instead of
14072 initialize_registers ().
14073
fd96d250
PA
140742008-02-19 Pedro Alves <pedro@codesourcery.com>
14075
14076 * server.c (handle_v_requests): When handling the vRun and vAttach
14077 packets, if already debugging a process, don't kill it. Return an
14078 error instead.
14079
d41b6bb4
DJ
140802008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14081
14082 * server.c (handle_query): Correct length check.
14083
5ac588cf
PA
140842008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14085
14086 * win32-low.c (do_initial_child_stuff): Add process handle
14087 parameter. Set current_process_handle and current_process_id from the
14088 parameters. Clear globals.
14089 (win32_create_inferior): Don't set current_process_handle and
14090 current_process_id here. Instead pass them on the call to
14091 do_initial_child_stuff.
14092 (win32_attach): Likewise.
14093 (win32_clear_inferiors): New.
14094 (win32_kill): Don't close the current process handle or the
14095 current thread handle here. Instead call win32_clear_inferiors.
14096 (win32_detach): Don't open a new handle to the process. Call
14097 win32_clear_inferiors.
14098 (win32_join): Don't rely on current_process_handle; open a new
14099 handle using the process id.
14100 (win32_wait): Call win32_clear_inferiors when the inferior process
14101 has exited.
14102
ecd7ecbc
DJ
141032008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14104
14105 * server.c (monitor_show_help): Add "exit".
14106
1525d545
MG
141072008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14108
ecd7ecbc 14109 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14110 (clean): Add reg-xtensa.c.
14111 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14112 * configure.srv (xtensa*-*-linux*) New target.
14113 * linux-xtensa-low.c: New.
14114 * xtensa-xtregs.c: New.
1525d545 14115
59a016f0
PA
141162008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14117
14118 * hostio.c: Don't include errno.h.
14119 (errno_to_fileio_errno): Move to hostio-errno.
14120 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14121 error number outputting to the target->hostio_last_error callback.
14122 (hostio_packet_error): Use FILEIO_EINVAL directly.
14123 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14124 calls to hostio_error.
14125 * hostio-errno.c: New.
14126 * server.h (hostio_last_error_from_errno): Declare.
14127 * target.h (target_ops): Add hostio_last_error member.
14128 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14129 as hostio_last_error handler.
889bf7c5 14130 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14131 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14132 (wince_hostio_last_error): New functions.
14133 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14134 as hostio_last_error handler.
14135 (win32_target_ops) [!_WIN32_WCE]: Register
14136 hostio_last_error_from_errno as hostio_last_error handler.
14137 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14138 (hostio-errno.o): New rule.
14139 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14140 * configure.srv (srv_hostio_err_objs): New variable. Default to
14141 hostio-errno.o.
14142 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14143 * configure: Regenerate.
14144
2d717e4f
DJ
141452008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14146
14147 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14148 (linux_kill, linux_detach): Clean up the process list.
14149 * remote-utils.c (remote_open): Improve port number parsing.
14150 (putpkt_binary, input_interrupt): Only send interrupts if the target
14151 is running.
14152 * server.c (extended_protocol): Make static.
14153 (attached): Define earlier.
14154 (exit_requested, response_needed, program_argv): New variables.
14155 (target_running): New.
14156 (start_inferior): Clear attached here.
14157 (attach_inferior): Set attached here.
14158 (require_running): Define.
14159 (handle_query): Use require_running and target_running. Implement
14160 "monitor exit".
14161 (handle_v_attach, handle_v_run): New.
14162 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14163 (gdbserver_usage): Update.
14164 (main): Redo argument parsing. Handle --debug and --multi. Handle
14165 --attach along with other options or after the port. Save
14166 program_argv. Support no initial program. Resynchronize
14167 communication with GDB after an error. Handle "monitor exit".
14168 Use require_running and target_running. Always allow the extended
14169 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14170 restart in extended mode.
14171 * README: Refer to the GDB manual. Update --attach usage.
14172
7407e2de
AS
141732007-12-20 Andreas Schwab <schwab@suse.de>
14174
14175 * linux-low.c (STACK_SIZE): Define.
14176 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14177 (linux_test_for_tracefork): Likewise.
14178
b65d95c5
DJ
141792007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14180
14181 * linux-low.c (linux_wait_for_event): Update messages. Do not
14182 reinsert auto-delete breakpoints.
14183 * mem-break.c (struct breakpoint): Change return type of handler to
14184 int.
14185 (set_breakpoint_at): Update handler type.
14186 (reinsert_breakpoint_handler): Return 1 instead of calling
14187 delete_breakpoint.
14188 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14189 setting a new one.
14190 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14191 * mem-break.h (set_breakpoint_at): Update handler type.
14192 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14193 * win32-low.c (auto_delete_breakpoint): New.
14194 (get_child_debug_event): Use it.
14195
4e799345
DJ
141962007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14197
14198 * configure.ac: Check for pread and pwrite.
14199 * hostio.c (handle_pread): Fall back to lseek and read.
14200 (handle_pwrite): Fall back to lseek and write.
14201 * config.in, configure: Regenerated.
14202
27524b67
DJ
142032007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14204
14205 * server.c (myresume): Add own_buf argument.
14206 (main): Update calls.
14207
a20d5e98
DJ
142082007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14209
14210 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14211 * remote-utils.c (remote_open): Do not call disable_async_io.
14212 (block_async_io): Delete.
14213 (unblock_async_io): Make static.
14214 (initialize_async_io): New.
14215 * server.c (handle_v_cont): Handle async I/O here.
14216 (myresume): Likewise. Move other common resume tasks here...
14217 (main): ... from here. Call initialize_async_io. Disable async
14218 I/O before the main loop.
14219 * server.h (initialize_async_io): Declare.
14220 (block_async_io, unblock_async_io): Delete prototypes.
14221 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14222
b79d787e
DJ
142232007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14224
14225 * remote-utils.c (readchar): Allow binary data in received messages.
14226
d97903b2
PA
142272007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14228
14229 * win32-low.c (attaching): New global.
14230 (win32_create_inferior): Clear the `attaching' global.
14231 (win32_attach): Set the `attaching' global.
14232 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14233 attaching. Only set a breakpoint at the entry point if not
14234 attaching.
14235
311de423
PA
142362007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14237
14238 * server.c (main): Don't report dll events on the initial
14239 connection on attaches.
14240
6c2d16d2
PA
142412007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14242
14243 * server.c (main): Relax numerical bases supported for the pid of
14244 the --attach command line argument.
14245
5ca906e6
PA
142462007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14247
14248 * win32-low.c (win32_attach): Call OpenProcess before
14249 DebugActiveProcess, not after. Add last error output to error
14250 call.
14251
9c6c8194
PA
142522007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14253
14254 * win32-low.c (win32_get_thread_context)
14255 (win32_set_thread_context): New functions.
14256 (thread_rec): Use win32_get_thread_context.
14257 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14258 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14259 field.
14260
4d5d1aaa
PA
142612007-12-03 Leo Zayas
14262 Pedro Alves <pedro_alves@portugalmail.pt>
14263
14264 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14265 global variables.
14266 (child_add_thread): Minor cleanup.
14267 (child_continue): Resume artificially suspended threads before
14268 calling ContinueDebugEvent.
14269 (suspend_one_thread): New.
14270 (fake_breakpoint_event): New.
14271 (get_child_debug_event): Change return type to int. Check here if
14272 gdb sent an interrupt request. If a soft interrupt was requested,
14273 fake a breakpoint event. Return 0 if there is no event to handle,
14274 and 1 otherwise.
14275 (win32_wait): Don't check here if gdb sent an interrupt request.
14276 Ensure there is a valid event to handle.
14277 (win32_request_interrupt): Add soft interruption method as last
14278 resort.
14279
c436e841
PA
142802007-12-03 Leo Zayas
14281 Pedro Alves <pedro_alves@portugalmail.pt>
14282
14283 * win32-low.h (win32_thread_info): Add descriptions to the
14284 structure members. Replace `suspend_count' counter by a
14285 `suspended' flag.
14286 * win32-low.c (thread_rec): Update condition of when to get the
14287 context from the inferior. Rely on ContextFlags being set if it
14288 has already been retrieved. Only suspend the inferior thread if
14289 we haven't already. Warn if that fails.
14290 (continue_one_thread): s/suspend_count/suspended/. Only call
14291 ResumeThread once. Warn if that fails.
14292
e7b5fa67
PA
142932007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14294
14295 * win32-low.c (win32_wait): Don't read from the inferior when it
14296 has already exited.
14297
a385171d
PA
142982007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14299
14300 * Makefile.in (win32_low_h): New variable.
14301 (win32-low.o): Add dependency on $(win32_low_h).
14302 (win32-arm-low.o, win32-i386-low.o): New rules.
14303
f80c84b3
DJ
143042007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14305
14306 * hostio.c: Correct copyright year.
14307
a6b151f1
DJ
143082007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14309
14310 * Makefile.in (OBS): Add hostio.o.
14311 (hostio.o): New rule.
14312 * server.h (handle_vFile): Declare.
14313 * hostio.c: New file.
14314 * server.c (handle_v_requests): Take packet_len and new_packet_len
14315 for binary packets. Call handle_vFile.
14316 (main): Update call to handle_v_requests.
14317
f9387fc3
DJ
143182007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14319
14320 * linux-low.c: Include <sched.h>.
14321
51c2684e
DJ
143222007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14323
14324 * linux-low.c (linux_tracefork_grandchild): New.
14325 (linux_tracefork_child): Use clone.
14326 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14327
75f83163
JB
143282007-10-31 Joel Brobecker <brobecker@adacore.com>
14329
14330 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14331
da5898ce
DJ
143322007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14333
14334 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14335
24a09b5f
DJ
143362007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14337
14338 * inferiors.c (change_inferior_id): Delete.
14339 (add_pid_to_list, pull_pid_from_list): New.
14340 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14341 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14342 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14343 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14344 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14345 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14346 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14347 (using_threads): Always set to 1.
14348 (handle_extended_wait): New.
14349 (add_process): Do not set TID.
14350 (linux_create_inferior): Set must_set_ptrace_flags.
14351 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14352 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14353 (linux_thread_alive): Rename TID argument to LWPID.
14354 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14355 (linux_wait_for_event): Do not use TID or check using_threads. Update
14356 call to dead_thread_notify. Call handle_extended_wait.
14357 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14358 (send_sigstop): Delete sigstop_sent.
14359 (wait_for_sigstop): Avoid TID.
14360 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14361 (linux_test_for_tracefork): New.
14362 (linux_lookup_signals): Use thread_db_active and
14363 linux_supports_tracefork_flag.
14364 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14365 * linux-low.h (get_process_thread): Avoid TID.
14366 (struct process_ifo): Move thread_known and tid to the end. Remove
14367 sigstop_sent.
14368 (linux_attach_lwp, thread_db_init): Update prototypes.
14369 * server.h (change_inferior_id): Delete prototype.
14370 (add_pid_to_list, pull_pid_from_list): New prototypes.
14371 * thread-db.c (thread_db_use_events): New.
14372 (find_first_thread): Rename to...
14373 (find_one_thread): ...this. Update callers and messages. Do not
14374 call fatal. Check thread_db_use_events. Do not call
14375 change_inferior_id or new_thread_notify.
14376 (maybe_attach_thread): Update. Do not call new_thread_notify.
14377 (thread_db_init): Set thread_db_use_events. Check use_events.
14378 * utils.c (fatal, warning): Correct message prefix.
14379
30ed0a8f
DJ
143802007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14381
14382 * Makefile.in (clean): Remove new files.
14383 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14384 (powerpc-64.o, powerpc-64.c): New rules.
14385 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14386 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14387 with SPE.
14388 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14389 SPE targets.
14390 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14391 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14392 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14393 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14394 (target_regsets): Add AltiVec and SPE register sets.
14395 * configure.ac: Check for AltiVec and SPE.
14396 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14397 (ppc_fill_vrregset, ppc_store_vrregset): New.
14398 (target_regsets): Add AltiVec register set.
14399 * configure: Regenerated.
14400
fd462a61
DJ
144012007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14402
14403 * linux-low.c (O_LARGEFILE): Define.
14404 (linux_read_memory): Use /proc/PID/mem.
14405 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14406 * configure, config.in: Regenerated.
14407
69f223ed
DJ
144082007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14409
14410 * linux-low.c (linux_wait_for_event): Do not pass signals while
14411 single-stepping.
14412
aec18585
PA
144132007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14414
14415 * win32-low.c (create_process): New.
14416 (win32_create_inferior): Use create_process instead of
14417 CreateProcess. If create_process failed retry appending an ".exe"
14418 suffix. Store the GetLastError result immediatelly after
14419 create_process calls and use it on the call to error.
14420
34d86ddd
PA
144212007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14422
14423 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14424
5a0e3bd0
JB
144252007-08-23 Joel Brobecker <brobecker@adacore.com>
14426
14427 * configure.ac: Switch license to GPLv3.
14428
f88c79e6
MS
144292007-08-01 Michael Snyder <msnyder@access-company.com>
14430
14431 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14432
6b3d9b83
PA
144332007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14434
14435 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14436 typedef.
14437 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14438 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14439 CloseToolhelp32Snapshot.
14440 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14441 CloseToolhelp32Snapshot.
14442
c588c53c
MS
144432007-07-27 Michael Snyder <michael.snyder@access-company.com>
14444
14445 * server.c (main): Check for inferior exit before main loop.
14446
aa0403d9
PA
144472007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14448
14449 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14450 instead of on tmp_desc.
14451
255e7678
DJ
144522007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14453 Daniel Jacobowitz <dan@codesourcery.com>
14454
14455 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14456 (add_thread): Minor cleanups.
14457 (clear_inferiors): Move lower in the file. Clear the DLL
14458 list.
14459 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14460 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14461 (xml_escape_text): New.
14462 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14463 for qSupported.
14464 (handle_v_cont): Report errors.
14465 (gdbserver_version): Update.
14466 (main): Correct size of own_buf. Do not report initial DLL events.
14467 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14468 (unloaded_dll, xml_escape_text): New.
14469 * win32-low.c (enum target_waitkind): Update comments.
14470 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14471 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14472 (win32_EnumProcessModules, win32_GetModuleInformation)
14473 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14474 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14475 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14476 (win32_Module32First, win32_Module32Next, load_toolhelp)
14477 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14478 (get_child_debug_event): Handle DLL events.
14479 (win32_wait): Likewise.
14480
0d37add9
DJ
144812007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14482
14483 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14484 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14485
45e2715e
PA
144862007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14487
14488 * win32-low.c (handle_output_debug_string): Ignore event if not
14489 waiting.
14490
c5674cf1
PA
144912007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14492
14493 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14494
2bbe3cc1
DJ
144952007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14496
14497 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14498
ae13219e
DJ
144992007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14500
14501 * inferiors.c (change_inferior_id): Add comment.
14502 * linux-low.c (check_removed_breakpoint): Add an early
14503 prototype. Improve debug output.
14504 (linux_attach): Doc update.
14505 (linux_detach_one_process, linux_detach): Clean up before releasing
14506 each process.
14507 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14508 * linux-low.h (struct process_info): Doc improvement.
14509 * mem-break.c (delete_all_breakpoints): New.
14510 * mem-break.h (delete_all_breakpoints): New prototype.
14511 * thread-db.c (find_first_thread): New.
14512 (thread_db_create_event): Call it instead of
14513 thread_db_find_new_threads. Clean up unused variables.
14514 (maybe_attach_thread): Remove first thread handling.
14515 (thread_db_find_new_threads): Use find_first_thread.
14516 (thread_db_get_tls_address): Likewise.
14517
4105de34
DJ
145182007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14519
14520 * thread-db.c (thread_db_find_new_threads): Add prototype.
14521 (thread_db_create_event): Check for the main thread before adding
14522 a new thread.
14523 (maybe_attach_thread): Only enable event reporting if TID == 0.
14524 (thread_db_get_tls_address): Check for new threads.
14525
2b876972
DJ
145262007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14527
14528 * linux-low.c (linux_create_inferior): Try execv before execvp.
14529 * spu-low.c (spu_create_inferior): Likewise.
14530
7a245884
DJ
145312007-06-13 Mike Frysinger <vapier@gentoo.org>
14532
14533 * linux-low.c (linux_create_inferior): Change execv to execvp.
14534 * spu-low.c (spu_create_inferior): Likewies.
14535
117ce543
DJ
145362007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14537
14538 * Makefile.in (clean): Clean new files instead of deleted ones.
14539 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14540 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14541 rules.
14542 * configure.srv: Specify XML files and new regformats for MIPS and
14543 MIPS64 GNU/Linux.
14544 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14545 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14546 an entry for the restart register.
14547 (mips_cannot_fetch_register, mips_cannot_store_register)
14548 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14549 register names to match the XML descriptions.
14550 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14551 restart register instead of $0.
14552
0e7f50da
UW
145532007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14554 Markus Deuling <deuling@de.ibm.com>
14555
14556 * remote-utils.c (decode_xfer_write): New function.
14557 * server.h (decode_xfer_write): Add prototype.
14558 * server.c (handle_query): Add PACKET_LEN argument. Support
14559 qXfer:spu:read and qXfer:spu:write packets.
14560 (main): Pass packet_len to handle_query.
14561 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14562 * target.h (target_ops): Add qxfer_spu.
14563
374c1d38
UW
145642007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14565
14566 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14567 accessing non-seekable spufs files.
14568
bb63802a
UW
145692007-05-16 Markus Deuling <deuling@de.ibm.com>
14570
889bf7c5 14571 * server.c (handle_query): Add reply for qC packet.
bb63802a 14572
7390519e
PA
145732007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14574 Leo Zayas <lerele@champenstudios@com>
14575
14576 * server.h (check_remote_input_interrupt_request): New function.
14577 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14578 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14579 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14580 (check_remote_input_interrupt_request): New function.
14581 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14582 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14583 winapi_GenerateConsoleCtrlEvent): New typedefs.
14584 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14585 to 250 ms.
14586 (win32_wait): Check for remote interrupt request
14587 with check_remote_input_interrupt_request.
14588 (win32_request_interrupt): New function.
14589 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14590
34b34921
PA
145912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14592
14593 * win32-low.c (debug_registers_changed,
14594 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14595 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14596 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14597 (thread_rec): Get context using the low target.
14598 (child_add_thread): Call thread_added on the low target,
14599 which does the same thing.
14600 (regptr): Delete.
14601 (do_initial_child_stuff): Remove debug registers references.
14602 Set context using the low target. Resume threads after
14603 setting the contexts.
14604 (child_continue): Remove dead variable. Remove debug
14605 registers references.
14606 (child_fetch_inferior_registers): Go through the low target.
14607 (do_child_store_inferior_registers): Remove.
14608 (child_store_inferior_registers): Go through the low target.
14609 (win32_resume): Remove debug registers references.
14610 Set context using the low target.
14611 (handle_exception): Change return type to void. Don't record
14612 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14613 first chance exception.
889bf7c5 14614 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14615 goto loop. Always return after waiting for debug event.
14616 (win32_wait): Convert to switch statement. Handle spurious
14617 events.
14618
14619 * win32-i386-low.c (debug_registers_changed,
14620 debug_registers_used): New.
14621 (initial_stuff): Rename to ...
14622 (i386_initial_stuff): ... this. Clear debug registers
14623 state variables.
14624 (store_debug_registers): Delete.
14625 (i386_get_thread_context): New.
14626 (load_debug_registers): Delete.
14627 (i386_set_thread_context): New.
14628 (i386_thread_added): New.
14629 (single_step): Rename to ...
14630 (i386_single_step): ... this.
14631 (do_fetch_inferior_registers): Rename to ...
14632 (i386_fetch_inferior_register): ... this.
14633 (i386_store_inferior_register): New.
14634 (the_low_target): Adapt to new interface.
14635
14636 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14637 (arm_get_thread_context): New.
14638 (arm_set_thread_context): New.
14639 (regptr): New.
14640 (do_fetch_inferior_registers): Rename to ...
14641 (arm_fetch_inferior_register): ... this.
14642 (arm_store_inferior_register): New.
14643 (arm_wince_breakpoint): Reimplement as unsigned long.
14644 (arm_wince_breakpoint_len): Define.
14645 (the_low_target): Adapt to new interface.
14646
14647 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14648 load_debug_registers. Add get_thread_context, set_thread_context,
14649 thread_added and store_inferior_register. Rename
14650 fetch_inferior_registers to fetch_inferior_register.
14651 (regptr): Remove declaration.
14652
dd6953e1
PA
146532007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14654
14655 * linux-low.c (linux_detach): Change return type to int. Return 0.
14656 * spu-low.c (spu_detach): Likewise.
14657
444d6139
PA
146582007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14659
14660 * target.h (target_ops): Change return type of detach to int.
14661 Add join.
14662 (join_inferior): New.
14663 * server.c (main): Don't skip detach support on mingw32.
14664 If the inferior doesn't support detaching return error.
14665 Call join_inferior instead of using waitpid.
14666 * linux-low.c (linux_join): New.
14667 (linux_target_op): Add linux_join.
14668 * spu-low.c (spu_join): New.
14669 (spu_target_ops): Add spu_join.
14670 * win32-low.c (win32_detach): Adapt to new interface.
14671 Reopen current_process_handle before detaching. Issue a child
14672 resume before detaching.
14673 (win32_join): New.
14674 (win32_target_op): Add win32_join.
14675
1d5315fe
PA
146762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14677
14678 * win32-low.c (win32-attach): Fix return value.
14679 * target.h (target_ops): Describe ATTACH return values.
14680
bf914831
PA
146812007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14682
14683 * win32-low.c (GETPROCADDRESS): Define.
14684 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14685 (winapi_DebugSetProcessKillOnExit): Likewise.
14686 (win32_create_inferior): Force usage of ansi CreateProcessA.
14687 (win32_attach): Use GETPROCADDRESS.
14688 (win32_detach): Likewise.
14689
f72f3e60
PA
146902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14691
14692 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14693
ed50f18f
PA
146942007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14695
14696 * win32-low.c: Commit leftover changes from 2007-03-29.
14697
0c2ead7e
DJ
146982007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14699
14700 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14701 fields short instead of int. Add explicit padding.
14702 (i387_cache_to_fsave): Remove unnecessary casts.
14703 (i387_fsave_to_cache): Doc fix.
14704 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14705
73725ff3
DJ
147062007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14707
14708 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14709 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14710
d99f33d8
PA
147112007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14712
14713 * configure.srv (arm*-*-mingw32ce*): Move near the other
14714 arm targets.
14715
68070c10
PA
147162007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14717
2482afc6 14718 * configure.ac: Add errno checking.
68070c10
PA
14719 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14720 sys/file.h and malloc.h.
14721 (AC_CHECK_DECLS): Add perror.
14722 (srv_mingwce): Handle.
2482afc6 14723 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14724 win32-i386-low.o to srv_tgtobj.
14725 (i[34567]86-*-mingw*): Likewise.
14726 (arm*-*-mingw32ce*): Add case.
14727 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14728 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14729 [__MINGW32CE__] (strerror): New function.
14730 [__MINGW32CE__] (errno): Define to GetLastError.
14731 [__MINGW32CE__] (COUNTOF): New macro.
14732 (remote_open): Remove extra close call.
14733 * mem-break.c (delete_breakpoint_at): New function.
14734 * mem-break.h (delete_breakpoint_at): Declare.
14735 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14736 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14737 [USE_WIN32API] (read, write): Add char* casts.
14738 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14739 * server.h: Include wincecompat.h on Windows CE.
14740 [HAVE_ERRNO_H]: Check.
14741 (perror): Declare if not declared.
14742 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14743 (perror_with_name): Remove errno declaration.
14744 * wincecompat.h: New.
14745 * wincecompat.c: New.
14746 * win32-low.h: New.
14747 * win32-arm-low.c: New.
14748 * win32-i386-low.c: New.
14749 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14750 (OUTMSG2): Make it safe.
14751 (_T): New macro.
14752 (COUNTOF): New macro.
14753 (NUM_REGS): Get it from the low target.
14754 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14755 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14756 (thread_rec): Let low target handle debug registers.
14757 (child_add_thread): Likewise.
14758 (child_init_thread_list): Likewise.
14759 (continue_one_thread): Likewise.
14760 (regptr): New.
14761 (do_child_fetch_inferior_registers): Move to ...
14762 * win32-i386-low.c: ... here, and rename to ...
14763 (do_fetch_inferior_registers): ... this.
889bf7c5 14764 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14765 Go through the low target.
14766 (do_child_store_inferior_registers): Use regptr.
14767 (strwinerror): New function.
14768 (win32_create_inferior): Handle Windows CE.
14769 Use strwinerror instead of strerror on Windows error
14770 codes. Add program to the error output.
14771 Don't close the main thread handle on Windows CE.
14772 (win32_attach): Use coredll.dll on Windows CE.
14773 (win32_kill): Close current process and current
14774 thread handles.
14775 (win32_detach): Use coredll.dll on Windows CE.
14776 (win32_resume): Let low target handle debug registers, and
14777 step request.
14778 (handle_exception): Add/Remove initial breakpoint. Avoid
14779 non-existant WSTOPSIG on Windows CE.
14780 (win32_read_inferior_memory): Cast to remove warning.
14781 (win32_arch_string): Go through the low target.
14782 (initialize_low): Call set_breakpoint_data with the low
14783 target's breakpoint.
14784 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14785 FOP_REGNUM, mappings): Move to ...
14786 * win32-i386-low.c: ... here.
14787 * win32-low.c (win32_thread_info): Move to ...
14788 * win32-low.h: ... here.
14789 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14790 win32-arm-low.c and wincecompat.c.
14791 (all:): Add $EXEEXT.
14792 (install-only:): Likewise.
14793 (gdbserver:): Likewise.
14794 (gdbreplay:): Likewise.
14795 * config.in: Regenerate.
14796 * configure: Regenerate.
14797
41093d81
PA
147982007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14799
14800 * win32-low.c: Rename typedef thread_info to
14801 win32_thread_info throughout.
14802
544afa54
PA
148032007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14804
14805 * win32-i386-low.c: Rename to ...
14806 * win32-low.c: ... this.
14807 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14808 * Makefile.in: Likewise.
14809
bce7165d
PA
148102007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14811
14812 * remote-utils.c (monitor_output): Constify msg parameter.
14813 * server.h (monitor_output): Likewise.
14814 * win32-i386-low.c (handle_output_debug_string): New.
14815 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14816 handle_output_debug_string.
14817 (get_child_debug_event): Likewise.
14818
506c7aa0
DJ
148192007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14820
14821 * server.c (main): Correct strtoul check.
14822
42c81e2a
DJ
148232007-03-27 Jon Ringle <jon@ringle.org>
14824
14825 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14826
9453113a
DJ
148272007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14828
14829 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14830
64a69107
DJ
148312007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14832
14833 * terminal.h: Check HAVE_SGTTY_H.
14834
148352007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14836
14837 * remote-utils.c (remote_open): Print out the assigned port number.
14838
c74d0ad8
DJ
148392007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14840
14841 * remote-utils.c (monitor_output): New function.
14842 * server.c (debug_threads): Define here.
14843 (monitor_show_help): New function.
14844 (handle_query): Handle qRcmd.
14845 (main): Do not handle 'd' packet.
14846 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14847 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14848 of debug_threads.
14849
de7c3b4a
PA
148502007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14851
14852 * Makefile.in (EXEEXT): New.
14853 (clean): Use $(EXEEXT).
14854
ef57601b
PA
148552007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14856
14857 * target.h (target_ops): Rename send_signal to request_interrupt,
14858 and remove enum target_signal parameter.
14859 * linux-low.c (linux_request_interrupt): Rename from
14860 linux_send_signal, and always send SIGINT.
14861 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14862 and always send SIGINT.
14863 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14864 of send_signal.
14865 (input_interrupt): Likewise.
14866
820f2bda
PA
148672007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14868
14869 * server.c (get_features_xml): Check if target implemented
14870 arch_string.
14871 * win32-i386-low.c (win32_arch_string): New.
14872 (win32_target_ops): Add win32_arch_string as arch_string member.
14873
ab39bf24
UW
148742007-02-22 Markus Deuling <deuling@de.ibm.com>
14875
14876 * spu-low.c (spu_arch_string): New.
14877 (spu_target_ops): Add spu_arch_string.
14878
61ff6e04
DJ
148792007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14880
14881 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14882 * configure.ac: Do not check for terminal.h.
14883 * configure, config.in: Regenerated.
14884
fb1e4ffc
DJ
148852007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14886
14887 * Makefile.in (OBS): Add $(XML_BUILTIN).
14888 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14889 (clean): Update.
14890 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14891 (arm-with-iwmmxt.c): New.
14892 * config.in, configure: Regenerate.
14893 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14894 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14895 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14896 (arm*-*-linux*): Add iWMMXt and regset support.
14897 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14898 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14899 (arm_store_wmmxregset, target_regsets): New.
14900 * server.c (get_features_xml): Take annex argument. Check builtin
14901 XML documents.
14902 (handle_query): Handle multiple annexes.
14903
0f48aa01
DJ
149042007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14905
14906 * remote-utils.c [USE_WIN32API] (read, write): Define.
14907 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14908 write.
14909
23181151
DJ
149102007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14911
14912 * linux-i386-low.c (the_low_target): Set arch_string.
14913 * linux-x86-64-low.c (the_low_target): Likewise.
14914 * linux-low.c (linux_arch_string): New.
14915 (linux_target_ops): Add it.
14916 * linux-low.h (struct linux_target_ops): Add arch_string.
14917 * server.c (write_qxfer_response): Use const void * for DATA.
14918 (get_features_xml): New.
14919 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14920 * target.h (struct target_ops): Add arch_string method.
14921
9d606399
DJ
149222007-01-03 Denis Pilat <denis.pilat@st.com>
14923 Daniel Jacobowitz <dan@codesourcery.com>
14924
14925 * linux-low.c (linux_kill): Handle being called with no threads.
14926 * win32-i386-low.c (win32_kill): Likewise.
14927 (get_child_debug_event): Clear current_process_handle.
14928
149292006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14930 Daniel Jacobowitz <dan@codesourcery.com>
14931
14932 * remote-utils.c (remote_open): Check the type of specified
14933 serial port devices before opening them.
14934 * server.c (main): Kill the inferior if an error occurs during
14935 the first remote_open.
14936
a5e13d24
DJ
149372006-12-05 Markus Deuling <deuling@de.ibm.com>
14938
14939 * README: Update supported targets.
14940
186947f7
DJ
149412006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14942
14943 * Makefile.in (clean): Remove reg-mips64.c.
14944 (reg-mips64.c, reg-mips64.o): New rules.
14945 * configure.srv: Handle mips64. Include regset support for mips.
14946 * linux-mips-low.c (union mips_register): New.
14947 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14948 (mips_breakpoint, mips_breakpoint_at): Use int.
14949 (mips_collect_register, mips_supply_register)
14950 (mips_collect_register_32bit, mips_supply_register_32bit)
14951 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14952 (mips_store_fpregset, target_regsets): New.
14953 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14954
a13e2c95
UW
149552006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14956
14957 * configure.srv: Add target "spu*-*-*".
14958 * Makefile.in (clean): Remove reg-spu.c.
14959 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14960 * spu-low.c: New file.
14961
cb7283db
DJ
149622006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14963
14964 * configure.ac: Correct td_thr_tls_get_addr test.
14965 * configure: Regenerated.
14966
89be2091
DJ
149672006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14968
14969 * linux-low.c (linux_wait_for_event): Reformat. Use the
14970 pass_signals array.
14971 * remote-utils.c (decode_address_to_semicolon): New.
14972 * server.c (pass_signals, handle_general_set): New.
14973 (handle_query): Mention QPassSignals for qSupported.
14974 (main): Call handle_general_set.
14975 * server.h (pass_signals, decode_address_to_semicolon): New.
14976
000ef4f0
DJ
149772006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14978
14979 * server.c (handle_query): Correct error handling for read_auxv.
14980
b7149293
UW
149812005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14982
14983 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14984 and srv_linux_thread_db to yes.
14985 * linux-s390-low.c (s390_fill_gregset): New function.
14986 (target_regsets): Define data structure.
14987
dae5f5cf
DJ
149882006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14989
14990 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14991 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14992 * config.in, configure: Regenerated.
14993 * inferiors.c (gdb_id_to_thread): New function.
14994 (gdb_id_to_thread_id): Use it.
14995 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14996 * linux-low.h (struct process_info): Add th member.
14997 (thread_db_get_tls_address): New prototype.
14998 * remote-utils.c (decode_address): Make non-static.
14999 * server.c (handle_query): Handle qGetTLSAddr.
15000 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15001 * target.h (struct target_ops): Add get_tls_address.
15002 * thread-db.c (maybe_attach_thread): Save the thread handle.
15003 (thread_db_get_tls_address): New.
15004
32ca6d61
DJ
150052006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15006
15007 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15008 (linux_resume_one_process): Take a siginfo_t *. Update all
15009 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15010 (struct pending_signals): Add a siginfo_t.
15011 (linux_wait_for_process): Always set last_status.
15012 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15013 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15014 * linux-low.h (struct process_info): Add last_status.
15015
5ffff7c1
DJ
150162006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15017
15018 * remote-utils.c (try_rle): New function.
15019 (putpkt_binary): Use it.
15020
8695c747
DJ
150212006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15022
15023 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15024 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15025 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15026 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15027 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15028 point registers.
15029
290fadea
RS
150302006-08-08 Richard Sandiford <richard@codesourcery.com>
15031
15032 * server.c (terminal_fd): New variable.
15033 (old_foreground_pgrp): Likewise.
15034 (restore_old_foreground_pgrp): New function.
15035 (start_inferior): Record the terminal file descriptor in terminal_fd
15036 and its original foreground group in old_foreground_pgrp. Register
15037 restore_old_foreground_pgrp with atexit().
15038
9f2e1e63
DJ
150392006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15040
15041 * server.c (handle_query): Correct qPart to qXfer.
15042
b80864fb
DJ
150432006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15044
15045 * configure.ac: Check for more headers which are missing on
15046 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15047 * configure.srv: Add Cygwin and mingw32.
15048 * remote-utils.c: Don't include headers unconditionally which
15049 are missing on mingw32. Include <winsock.h> for mingw32.
15050 (remote_open): Adjust for mingw32 support. Flush
15051 standard error after writing to it.
15052 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15053 (unblock_async_io, enable_async_io, disable_async_io)
15054 (readchar, getpkt): Update for Winsock support.
15055 (prepare_resume_reply): Expect a protocol signal number.
15056 * server.c: Disable <sys/wait.h> on mingw32.
15057 (start_inferior): Adjust for mingw32 support. Flush
15058 standard error after writing to it.
15059 (attach_inferior): Likewise. Use protocol signal
15060 numbers.
15061 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15062 and names.
15063 * win32-i386-low.c: New file.
15064 * Makefile.in (XM_CLIBS): Set.
15065 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15066 (win32-i386-low.o): New dependency rule.
15067 * linux-low.c (linux_wait): Use target signal numbers.
15068 * target.h (struct target_ops): Doc fix.
15069 * server.h (target_signal_to_name): New prototype.
15070 * gdbreplay.c: Don't include headers unconditionally which
15071 are missing on mingw32. Include <winsock.h> for mingw32.
15072 (remote_close, remote_open): Adjust for Winsock support.
15073 * configure, config.in: Regenerated.
15074
0876f84a
DJ
150752006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15076
15077 * server.c (decode_xfer_read, write_qxfer_response): New.
15078 (handle_query): Take a packet length argument. Handle
15079 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15080 the qSupported response.
15081 (main): Update call to handle_query.
15082
01f9e8fa
DJ
150832006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15084
15085 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15086 (putpkt_binary): Renamed from putpkt and adjusted for binary
15087 data.
15088 (putpkt): New wrapper for putpkt_binary.
15089 (readchar): Don't mask off the high bit.
15090 (decode_X_packet): New function.
15091 * server.c (main): Call putpkt_binary if a handler sets the packet
15092 length. Save the length of the incoming packet. Handle 'X'.
15093 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15094
be2a5f71
DJ
150952006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15096
15097 * server.c (handle_query): Handle qSupported.
15098
ea025f5f
DJ
150992006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15100
15101 * remote-utils.c (all_symbols_looked_up): New variable.
15102 (look_up_one_symbol): Check it.
15103 * server.h (look_up_one_symbol): New declaration.
15104 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15105
9308fc88
DJ
151062006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15107
15108 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15109 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15110 (PTRACE_GET_THREAD_AREA): Define.
15111 (ps_get_thread_area): New function.
15112
52fb6437
NS
151132006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15114
15115 * configure.srv (m68k*-*-uclinux*): New target.
15116 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15117 (linux_resume_one_process): Remove extraneous cast.
15118 (linux_read_offsets): New.
15119 (linux_target_op): Add linux_read_offsets on mmuless systems.
15120 * server.c (handle_query): Add qOffsets logic.
15121 * target.h (struct target_ops): Add read_offsets.
15122
21b0f40c
DJ
151232006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15124
15125 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15126 (PTRACE_GET_THREAD_AREA): Define.
15127 (ps_get_thread_area): New function.
15128 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15129 (linux-x86-64-low.o): Update.
15130
0050a760
DJ
151312006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15132
15133 * configure.ac: Remove checks for prfpregset_t.
15134 * gdb_proc_service.h: New file.
15135 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15136 new "gdb_proc_service.h".
15137 * proc-service.c: Likewise.
15138 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15139 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15140 * Makefile.in (gdb_proc_service_h): Updated.
15141 * configure, config.in: Regenerated.
15142
b92a518e
DJ
151432006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15144
15145 * remote-utils.c (prepare_resume_reply): Move declaration
15146 of gdb_id_from_wait to the top of the block.
15147
545587ee
DJ
151482006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15149
15150 * linux-low.c (regsets_store_inferior_registers): Read the regset
15151 from the target before filling it.
15152
9db87ebd
DJ
151532006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15154
15155 * server.c (attach_inferior): Return SIGTRAP for a successful
15156 attach.
15157
dd24457d
DJ
151582006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15159
15160 * Makefile.in (OBS): Add version.o.
15161 (STAGESTUFF): Delete.
15162 (version.o): Add dependencies.
15163 (version.c): Replace rule.
15164 (clean): Remove version.c.
15165 * server.c (gdbserver_version): New.
15166 (gdbserver_usage): Use printf.
15167 (main): Handle --version and --help.
15168 * server.h (version, host_name): Add declarations.
15169
6f0f660e
EZ
151702005-12-23 Eli Zaretskii <eliz@gnu.org>
15171
889bf7c5
PA
15172 * linux-arm-low.c:
15173 * linux-arm-low.c:
15174 * inferiors.c:
15175 * i387-fp.h:
15176 * i387-fp.c:
15177 * gdbreplay.c:
15178 * regcache.c:
15179 * proc-service.c:
15180 * mem-break.h:
15181 * mem-break.c:
15182 * linux-x86-64-low.c:
15183 * linux-sh-low.c:
15184 * linux-s390-low.c:
15185 * linux-ppc64-low.c:
15186 * linux-ppc-low.c:
15187 * linux-mips-low.c:
15188 * linux-m68k-low.c:
15189 * linux-m32r-low.c:
15190 * linux-low.h:
15191 * linux-low.c:
15192 * linux-ia64-low.c:
15193 * linux-i386-low.c:
15194 * linux-crisv32-low.c:
15195 * thread-db.c:
15196 * terminal.h:
15197 * target.h:
15198 * target.c:
15199 * server.h:
15200 * server.c:
15201 * remote-utils.c:
15202 * regcache.h:
15203 * utils.c:
15204 * Makefile.in:
15205 * configure.ac:
6f0f660e
EZ
15206 * gdbserver.1: Add (C) after Copyright. Update the FSF
15207 address.
15208
9d1fb177
DJ
152092005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15210
15211 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15212 (arm_breakpoint_at): Recognize both breakpoints.
15213 (the_low_target): Use the correct breakpoint instruction.
15214
011a70c2
DJ
152152005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15216
15217 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15218 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15219 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15220 (the_low_target): Update.
15221
7fb85e41
AS
152222005-10-25 Andreas Schwab <schwab@suse.de>
15223
15224 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15225
15226 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15227 (ia64_num_regs): Reduce to 462.
15228
3db0444b
DJ
152292005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15230
15231 * acinclude.m4: Correct quoting.
15232 * aclocal.m4: Regenerated.
15233
15234 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15235 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15236 (thread_db_init): Call thread_db_err_str.
15237 * configure.ac: Check for TD_VERSION.
15238 * config.in, configure: Regenerated.
15239
bee0189a
DJ
152402005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15241
15242 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15243
e9d25b98
DJ
152442005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15245
15246 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15247 is not available. Define HAVE_PTRACE_GETREGS if it is.
15248 * config.in, configure: Regenerated.
15249 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15250 * linux-i386-low.c, linux-m68k-low.c: Update to use
15251 HAVE_PTRACE_GETREGS.
15252 * linux-low.c (regsets_fetch_inferior_registers)
15253 (regsets_store_inferior_registers): Only return 0 if we processed
15254 GENERAL_REGS.
15255 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15256 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15257
a06660f7
DJ
152582005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15259
15260 * inferiors.c (struct thread_info): Add gdb_id.
15261 (add_thread): Add gdb_id argument.
15262 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15263 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15264 calls to add_thread.
15265 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15266 * server.c (handle_query): Use thread_to_gdb_id.
15267 (handle_v_cont, main): Use gdb_id_to_thread_id.
15268 * server.h (add_thread): Update prototype.
15269 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15270 prototypes.
15271
5a1f5858
DJ
152722005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15273
15274 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15275 left-padded registers.
15276 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15277 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15278
e122f1f5
SE
152792005-07-01 Steve Ellcey <sje@cup.hp.com>
15280
15281 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15282 * configure: Regenerate.
15283 * config.in: Regenerate.
15284 * server.h (NEED_DECLARATION_STRERROR):
15285 Replace with !HAVE_DECL_STRERROR.
15286
d592fa2f
DJ
152872005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15288
15289 * linux-low.c (linux_wait, linux_send_signal): Don't test
15290 an unsigned long variable for > 0 if it could be MAX_ULONG.
15291 * server.c (myresume): Likewise.
15292 * target.c (set_desired_inferior): Likewise.
15293
ccbd4912
MK
152942005-06-13 Mark Kettenis <kettenis@gnu.org>
15295
15296 * configure.ac: Simplify and improve check for socklen_t.
15297 * configure, config.in: Regenerate.
15298
f450004a
DJ
152992005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15300
15301 * acconfig.h: Remove.
15302 * configure.ac: Add a test for socklen_t. Use three-argument
15303 AC_DEFINE throughout.
15304 * config.in: Regenerated using autoheader 2.59.
15305 * configure: Regenerated.
15306
15307 * gdbreplay.c (socklen_t): Provide a default.
15308 (remote_open): Use socklen_t.
15309 * remote-utils.c (socklen_t): Provide a default.
15310 (remote_open): Use socklen_t.
15311 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15312 unsigned char.
15313
15314 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15315 char for buffers.
15316 * linux-low.c (linux_read_memory, linux_write_memory)
15317 (linux_read_auxv): Likewise.
15318 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15319 (check_mem_write): Likewise.
15320 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15321 Likewise.
15322 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15323 (registers_from_string, register_data): Likewise.
15324 * server.c (handle_query, main): Likewise.
15325 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15326 (decode_M_packet): Likewise.
15327 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15328 * target.h (struct target_ops): Update read_memory, write_memory,
15329 and read_auxv.
15330 (read_inferior_memory, write_inferior_memory): Update.
15331 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15332 to unsigned char *.
15333 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15334 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15335 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15336 linux-s390-low.c, linux-sh-low.c: Update for changes in
15337 read_inferior_memory and the_low_target->breakpoint.
15338
eee84df1
DJ
153392005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15340
15341 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15342 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15343 * configure.srv: Add powerpc64-*-linux*.
15344 * linux-ppc64-low.c: New file.
15345
45b134e5
OF
153462005-05-23 Orjan Friberg <orjanf@axis.com>
15347
15348 * linux-cris-low.c: New file with support for CRIS.
15349 * linux-crisv32-low.c: Ditto for CRISv32.
15350 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15351 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15352 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15353 reg-crisv32.o, and reg-crisv32.c to make rules.
15354 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15355 recognized targets.
15356
48d93c75
UW
153572005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15358
15359 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15360 of sizeof (PTRACE_XFER_TYPE).
15361 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15362
e013ee27
OF
153632005-05-12 Orjan Friberg <orjanf@axis.com>
15364
889bf7c5 15365 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15366 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15367 pointers for hardware watchpoint support.
15368 * linux-low.h (struct linux_target_ops): Ditto.
15369 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15370 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15371 to linux_target_ops.
15372 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15373 reply packet.
15374 * server.c (main): Recognize 'Z' and 'z' packets.
15375
b0ded00b
UW
153762005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15377
15378 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15379 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15380 (the_low_target): Add new members.
15381
8643e2ad
DJ
153822005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15383
15384 * proc-service.c (ps_lgetregs): Search all_processes instead of
15385 all_threads.
15386
fc620387
DJ
153872005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15388
15389 * server.c (start_inferior): Change return type to int.
15390 (attach_inferior): Change sigptr to int *.
15391 (handle_v_cont, handle_v_requests): Change signal to int *.
15392 (main): Change signal to int.
15393
153942005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15395
15396 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15397 * configure.srv: Add m32r*-*-linux*.
15398 * linux-m32r-low.c: New file.
15399
e0e76420
DJ
154002005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15401
15402 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15403
a1928bad
DJ
154042005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15405
15406 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15407 Take unsigned long arguments for PIDs.
15408 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15409 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15410 (wait_for_sigstop, linux_resume_one_process)
15411 (regsets_fetch_inferior_registers, linux_send_signal)
15412 (linux_read_auxv): Likewise. Update the types of variables holding
15413 PIDs. Update format string specifiers.
15414 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15415 * remote-utils.c (prepare_resume_reply): Likewise.
15416 * server.c (cont_thread, general_thread, step_thread)
15417 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15418 unsigned long.
15419 (handle_query): Update format specifiers.
15420 (handle_v_cont, main): Use strtoul for thread IDs.
15421 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15422 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15423 (general_thread, step_thread, thread_from_wait)
15424 (old_thread_from_wait): Update.
15425 * target.h (struct thread_resume): Use unsigned long for THREAD.
15426 (struct target_ops): Use unsigned long for arguments to attach and
15427 thread_alive.
15428
dcdb98d2
DJ
154292005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15430
15431 * acinclude.m4: Include bfd/bfd.m4 directly.
15432 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15433 <agriffis@toolchain.org>.
15434 * aclocal.m4, configure: Regenerated.
15435
bec39cab
AC
154362005-01-07 Andrew Cagney <cagney@gnu.org>
15437
15438 * configure.ac: Rename configure.in, require autoconf 2.59.
15439 * configure: Re-generate.
15440
434c4c77
DJ
154412004-12-08 Daniel Jacobowitz <dan@debian.org>
15442
15443 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15444 LIBS when finished.
15445 * aclocal.m4: Regenerated.
15446 * configure: Regenerated.
15447
db1d3e1b
AS
154482004-11-21 Andreas Schwab <schwab@suse.de>
15449
15450 * linux-m68k-low.c (m68k_num_gregs): Define.
15451 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15452 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15453 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15454 (m68k_breakpoint_at): New. Add to the_low_target.
15455
15456 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15457 srv_linux_thread_db to yes.
15458
43360365
JB
154592004-10-20 Joel Brobecker <brobecker@gnat.com>
15460
15461 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15462 (ARCH_SET_FS): Likewise.
15463 (ARCH_GET_FS): Likewise.
15464 (ARCH_GET_GS): Likewise.
15465
fd500816
DJ
154662004-10-16 Daniel Jacobowitz <dan@debian.org>
15467
15468 * linux-i386-low.c (ps_get_thread_area): New.
15469 * linux-x86-64-low.c (ps_get_thread_area): New.
15470 * linux-low.c: Include <sys/syscall.h>.
15471 (linux_kill_one_process): Don't kill the first thread here.
15472 (linux_kill): Kill the first thread here.
15473 (kill_lwp): New function.
15474 (send_sigstop, linux_send_signal): Use it.
15475 * proc-service.c: Clean up #ifdefs.
15476 (fpregset_info): Delete.
15477 (ps_lgetregs): Update and enable implementation.
15478 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15479 implementations.
15480 * remote-utils.c (struct sym_cache, symbol_cache): New.
15481 (input_interrupt): Print a clearer message.
15482 (async_io_enabled): New variable.
15483 (enable_async_io, disable_async_io): Use it. Update comments.
15484 (look_up_one_symbol): Use the symbol cache.
15485 * thread-db.c (thread_db_look_up_symbols): New function.
15486 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15487
f6de3c42
DJ
154882004-10-16 Daniel Jacobowitz <dan@debian.org>
15489
15490 * configure.in: Test for -rdynamic.
15491 * configure: Regenerated.
15492 * Makefile (INTERNAL_LDFLAGS): New.
15493 (gdbserver, gdbreplay): Use it.
15494
2c0fc042
AC
154952004-09-02 Andrew Cagney <cagney@gnu.org>
15496
15497 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15498
075b3282
DJ
154992004-03-23 Daniel Jacobowitz <drow@mvista.com>
15500
15501 * linux-low.c (linux_wait): Clear all_processes list also.
15502
fa6a77dc
DJ
155032004-03-12 Daniel Jacobowitz <drow@mvista.com>
15504
15505 * linux-low.c: Include <errno.h>. Remove extern declaration of
15506 errno.
15507
6d782a97
DJ
155082004-03-12 Daniel Jacobowitz <drow@mvista.com>
15509
15510 * gdbreplay.c, server.h, utils.c: Update copyright years.
15511
3a7fb99b
DJ
155122004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15513
15514 * server.c (main): Print child status or termination signal from
15515 variable 'signal', not 'sig'.
15516
c3e735a6
DJ
155172004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15518
15519 * linux-low.c (linux_read_memory): Change return type to
15520 int. Check for and return error from ptrace().
15521 * target.c (read_inferior_memory): Change return type to int. Pass
15522 back return status from the_target->read_memory().
15523 * target.h (struct target_ops): Adapt *read_memory() prototype.
15524 Update comment.
15525 (read_inferior_memory): Adapt prototype.
15526 * server.c (main): Return an error packet if
15527 read_inferior_memory() returns an error.
15528
a59d1c82
DJ
155292004-03-04 Daniel Jacobowitz <drow@mvista.com>
15530
15531 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15532 Unify with other clean targets.
15533
dc3f8883
DJ
155342004-02-29 Daniel Jacobowitz <drow@mvista.com>
15535
15536 * server.c (handle_v_cont): Call set_desired_inferior.
15537
89a208da
DJ
155382004-02-29 Daniel Jacobowitz <drow@mvista.com>
15539
15540 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15541
62ea82f5
DJ
155422004-02-29 Daniel Jacobowitz <drow@mvista.com>
15543
15544 * linux-low.c (linux_wait): Unblock async I/O.
15545 (linux_resume): Block and enable async I/O.
15546 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15547 * server.h (block_async_io, unblock_async_io): Add prototypes.
15548
6910d122
DJ
155492004-02-29 Daniel Jacobowitz <drow@mvista.com>
15550
15551 * remote-utils.c (remote_open): Print a status notice after
15552 opening a TCP port.
15553 * server.c (attach_inferior): Print a status notice after
15554 attaching.
15555
155562004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15557
15558 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15559
c89dc5d4
DJ
155602004-02-26 Daniel Jacobowitz <drow@mvista.com>
15561
15562 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15563 error packet.
15564 * server.c, target.h: Update copyright years.
15565
4b8dad4a
RM
155662004-02-25 Roland McGrath <roland@redhat.com>
15567
15568 * target.h (struct target_ops): New member `read_auxv'.
15569 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15570 * linux-low.c (linux_read_auxv): New function.
15571 (linux_target_ops): Initialize `read_auxv' member to that.
15572
d7446758
JB
155732004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15574
15575 Committed by Jim Blandy <jimb@redhat.com>.
15576
15577 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15578 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15579 instead of GPR_SIZE to distiguish s390 and s390x targets.
15580
5544ad89
DJ
155812004-01-31 Daniel Jacobowitz <drow@mvista.com>
15582
15583 * linux-low.c: Update copyright year.
15584 (check_removed_breakpoint): Clear pending_is_breakpoint.
15585 (linux_set_resume_request, linux_queue_one_thread)
15586 (resume_status_pending_p): New functions.
15587 (linux_continue_one_thread): Use process->resume.
15588 (linux_resume): Only resume threads if there are no pending events.
15589 * linux-low.h (struct process_info): Add resume request
15590 pointer.
15591
2a68b70e
DJ
155922004-01-30 Daniel Jacobowitz <drow@mvista.com>
15593
15594 * regcache.c (new_register_cache): Clear the allocated register
15595 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15596
64386c31
DJ
155972003-10-13 Daniel Jacobowitz <drow@mvista.com>
15598
15599 * linux-low.c (linux_resume): Take a struct thread_resume *
15600 argument.
15601 (linux_wait): Update call.
15602 (resume_ptr): New static variable.
15603 (linux_continue_one_thread): Renamed from
15604 linux_continue_one_process. Use resume_ptr.
15605 (linux_resume): Use linux_continue_one_thread.
15606 * server.c (handle_v_cont, handle_v_requests): New functions.
15607 (myresume): New function.
15608 (main): Handle 'v' case.
15609 * target.h (struct thread_resume): New type.
15610 (struct target_ops): Change argument of "resume" to struct
15611 thread_resume *.
15612 (myresume): Delete macro.
15613
c938e9b0
L
156142003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15615
15616 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15617 (uninstall): Support DESTDIR.
15618
7f313d07
BC
15619Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15620
15621 * configure.srv: Add xscale*linux copy of arm*linux entry.
15622
3b2fc2ea
DJ
156232003-07-24 Daniel Jacobowitz <drow@mvista.com>
15624
15625 * linux-arm-low.c (arm_reinsert_addr): New function.
15626 (the_low_target): Add arm_reinsert_addr.
15627
1c0a559e
MK
156282003-07-08 Mark Kettenis <kettenis@gnu.org>
15629
15630 * mem-break.c: Remove whitespace at end of file.
15631
43d5792c
DJ
156322003-06-28 Daniel Jacobowitz <drow@mvista.com>
15633
15634 * configure.in: Check whether we need to prototype strerror.
15635 * server.h: Optionally prototype strerror.
15636 * gdbreplay.c (perror_with_name): Use strerror.
15637 * linux-low.c (linux_attach_lwp): Use strerror.
15638 * utils.c (perror_with_name): Use strerror.
15639 * config.in, configure: Regenerated.
15640
c8a86edf
DJ
156412003-06-28 Daniel Jacobowitz <drow@mvista.com>
15642
15643 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15644 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15645
73d37363
DJ
156462003-06-20 Daniel Jacobowitz <drow@mvista.com>
15647
15648 * Makefile.in (SFILES): Update.
15649 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15650 low-sun3.c: Remove files.
15651
6ad8ae5c
DJ
156522003-06-17 Daniel Jacobowitz <drow@mvista.com>
15653
15654 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15655 (linux_detach_one_process, linux_detach): New functions.
15656 (linux_target_ops): Add linux_detach.
15657 * server.c (main): Handle 'D' packet.
15658 * target.h (struct target_ops): Add "detach" member.
15659 (detach_inferior): Define.
15660
1581182a
MK
156612003-06-13 Mark Kettenis <kettenis@gnu.org>
15662
15663 From Kelley Cook <kelleycook@wideopenwest.com>:
15664 * configure.srv: Accept i[34567]86 variants.
15665
e5379b03
DJ
156662003-06-05 Daniel Jacobowitz <drow@mvista.com>
15667
15668 * linux-low.c (linux_wait_for_event): Correct comment typos.
15669 (linux_resume_one_process): Call check_removed_breakpoint.
15670 (linux_send_signal): New function.
15671 (linux_target_ops): Add linux_send_signal.
15672 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15673 of kill.
15674 * target.h (struct target_ops): Add send_signal.
15675
2ff29de4
JB
156762003-05-29 Jim Blandy <jimb@redhat.com>
15677
15678 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15679 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15680 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15681 away part of the register's value.
15682
254787d4
DJ
156832003-03-26 Daniel Jacobowitz <drow@mvista.com>
15684
15685 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15686 (linux_wait_for_event, linux_init_signals): Likewise.
15687
94e10508
DJ
156882003-03-17 Daniel Jacobowitz <drow@mvista.com>
15689
15690 * configure.in: Check for stdlib.h.
15691 * configure: Regenerated.
15692 * config.in: Regenerated.
15693
4c0711e0
DJ
156942003-01-04 Andreas Schwab <schwab@suse.de>
15695
15696 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15697
ef66e766
AC
156982003-01-02 Andrew Cagney <ac131313@redhat.com>
15699
15700 * Makefile.in: Remove obsolete code.
15701
a1358604
DJ
157022002-11-20 Daniel Jacobowitz <drow@mvista.com>
15703
15704 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15705 defined(PT_FPR0_HI).
15706
23ce3b1c
DJ
157072002-11-17 Stuart Hughes <seh@zee2.com>
15708
15709 * linux-arm-low.c (arm_num_regs): Increase.
15710 (arm_regmap): Include status register.
15711
157122002-11-17 Daniel Jacobowitz <drow@mvista.com>
15713
15714 * linux-low.c (register_addr): Remove incorrect -1 check.
15715
a9fa9f7d
DJ
157162002-08-29 Daniel Jacobowitz <drow@mvista.com>
15717
15718 * linux-low.c (linux_create_inferior): Call setpgid. Return
15719 the new PID.
15720 (unstopped_p, linux_signal_pid): Remove.
15721 (linux_target_ops): Remove linux_signal_pid.
15722 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15723 global instead of target method.
15724 * target.h (struct target_ops): Remove signal_pid. Update comment
15725 for create_inferior.
15726 * server.c (signal_pid): New variable.
15727 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15728 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15729 (attach_inferior): Set signal_pid.
15730
17574093
DJ
157312002-08-23 Daniel Jacobowitz <drow@mvista.com>
15732
15733 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15734
157352002-08-20 Jim Blandy <jimb@redhat.com>
15736
15737 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15738 default for this.
15739
157402002-08-01 Andrew Cagney <cagney@redhat.com>
15741
15742 * Makefile.in: Make chill references obsolete.
15743
157442002-07-24 Kevin Buettner <kevinb@redhat.com>
15745
15746 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15747 * configure: Regenerate.
15748 * config.in: Regenerate.
15749
157502002-07-09 David O'Brien <obrien@FreeBSD.org>
15751
15752 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15753 (perror_with_name, remote_close, remote_open, expect, play): Static.
15754
157552002-07-04 Michal Ludvig <mludvig@suse.cz>
15756
4b8dad4a 15757 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15758 byte offsets instead of an array of indexes.
15759 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15760
157612002-06-13 Daniel Jacobowitz <drow@mvista.com>
15762
15763 * regcache.c: Add comment.
15764
157652002-06-11 Daniel Jacobowitz <drow@mvista.com>
15766
15767 * thread-db.c: New file.
15768 * proc-service.c: New file.
15769 * acinclude.m4: New file.
15770 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15771 proc-service.o, and thread-db.o.
15772 (linux-low.o): Add USE_THREAD_DB.
15773 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15774 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15775 * aclocal.m4: Regenerated.
15776 * config.in: Regenerated.
15777 * configure: Regenerated.
15778 * configure.in: Check for proc_service.h, sys/procfs.h,
15779 thread_db.h, and linux/elf.h headrs.
15780 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15781 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15782 Check for -lthread_db and thread support.
15783 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15784 PowerPC, and SuperH.
15785 * i387-fp.c: Constify arguments.
15786 * i387-fp.h: Likewise.
15787 * inferiors.c: (struct thread_info): Renamed from
15788 `struct inferior_info'. Remove PID member. Use generic inferior
15789 list header. All uses updated.
15790 (inferiors, signal_pid): Removed.
15791 (all_threads): New variable.
15792 (get_thread): Define.
15793 (add_inferior_to_list): New function.
15794 (for_each_inferior): New function.
15795 (change_inferior_id): New function.
15796 (add_inferior): Removed.
15797 (remove_inferior): New function.
15798 (add_thread): New function.
15799 (free_one_thread): New function.
15800 (remove_thread): New function.
15801 (clear_inferiors): Use for_each_inferior and free_one_thread.
15802 (find_inferior): New function.
15803 (find_inferior_id): New function.
15804 (inferior_target_data): Update argument type.
15805 (set_inferior_target_data): Likewise.
15806 (inferior_regcache_data): Likewise.
15807 (set_inferior_regcache_data): Likewise.
15808 * linux-low.c (linux_bp_reinsert): Remove.
15809 (all_processes, stopping_threads, using_thrads)
15810 (struct pending_signals, debug_threads, pid_of): New.
15811 (inferior_pid): Replace with macro.
15812 (struct inferior_linux_data): Remove.
15813 (get_stop_pc, add_process): New functions.
15814 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15815 Use add_process and add_thread.
15816 (linux_attach_lwp): New function, based on old linux_attach. Use
15817 add_process and add_thread. Set stop_expected for new threads.
15818 (linux_attach): New function.
15819 (linux_kill_one_process): New function.
15820 (linux_kill): Kill all LWPs.
15821 (linux_thread_alive): Use find_inferior_id.
15822 (check_removed_breakpoints, status_pending_p): New functions.
15823 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15824 Update. Use WNOHANG. Wait for cloned processes also. Update process
15825 struct for the found process.
15826 (linux_wait_for_event): New function.
15827 (linux_wait): Use it. Support LWPs.
15828 (send_sigstop, wait_for_sigstop, stop_all_processes)
15829 (linux_resume_one_process, linux_continue_one_process): New functions.
15830 (linux_resume): Support LWPs.
15831 (REGISTER_RAW_SIZE): Remove.
15832 (fetch_register): Use register_size instead. Call supply_register.
15833 (usr_store_inferior_registers): Likewise. Call collect_register.
15834 Fix recursive case.
15835 (regsets_fetch_inferior_registers): Improve error message.
15836 (regsets_store_inferior_registers): Add debugging.
15837 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15838 (unstopped_p, linux_signal_pid): New functions.
15839 (linux_target_ops): Add linux_signal_pid.
15840 (linux_init_signals): New function.
15841 (initialize_low): Call it. Initialize using_threads.
15842 * regcache.c (inferior_regcache_data): Add valid
15843 flag.
15844 (get_regcache): Fetch registers lazily. Add fetch argument
15845 and update all callers.
15846 (regcache_invalidate_one, regcache_invalidate): New
15847 functions.
15848 (new_register_cache): Renamed from create_register_cache.
15849 Return the new regcache.
15850 (free_register_cache): Change argument to a void *.
15851 (registers_to_string, registers_from_string): Call get_regcache
15852 with fetch flag set.
15853 (register_data): Make static. Pass fetch flag to get_regcache.
15854 (supply_register): Call get_regcache with fetch flag clear.
15855 (collect_register): Call get_regcache with fetch flag set.
15856 (collect_register_as_string): New function.
15857 * regcache.h: Update.
15858 * remote-utils.c (putpkt): Flush after debug output and use
15859 stderr.
15860 Handle input interrupts while waiting for an ACK.
15861 (input_interrupt): Use signal_pid method.
15862 (getpkt): Flush after debug output and use stderr.
15863 (outreg): Use collect_register_as_string.
15864 (new_thread_notify, dead_thread_notify): New functions.
15865 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15866 and general_thread.
15867 (look_up_one_symbol): Flush after debug output.
15868 * server.c (step_thread, server_waiting): New variables.
15869 (start_inferior): Don't use signal_pid. Update call to mywait.
15870 (attach_inferior): Update call to mywait.
15871 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15872 (main): Don't fetch/store registers explicitly. Use
15873 set_desired_inferior. Support proposed ``Hs'' packet. Update
15874 calls to mywait.
15875 * server.h: Update.
15876 (struct inferior_list, struct_inferior_list_entry): New.
15877 * target.c (set_desired_inferior): New.
15878 (write_inferior_memory): Constify.
15879 (mywait): New function.
15880 * target.h: Update.
15881 (struct target_ops): New signal_pid method.
15882 (mywait): Removed macro, added prototype.
15883
15884 * linux-low.h (regset_func): Removed.
15885 (regset_fill_func, regset_store_func): New.
15886 (enum regset_type): New.
15887 (struct regset_info): Add type field. Use new operation types.
15888 (struct linux_target_ops): stop_pc renamed to get_pc.
15889 Add decr_pc_after_break and breakpoint_at.
15890 (get_process, get_thread_proess, get_process_thread)
15891 (strut process_info, all_processes, linux_attach_lwp)
15892 (thread_db_init): New.
15893
15894 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15895 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15896 (the_low_target): Add new members.
15897 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15898 (i386_store_fpxregset): Constify.
15899 (target_regsets): Add new kind identifier.
15900 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15901 (i386_set_pc): Add debugging.
15902 (i386_breakpoint_at): New function.
15903 (the_low_target): Add new members.
15904 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15905 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15906 (mips_breakpoint_at): New.
15907 (the_low_target): Add new members.
15908 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15909 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15910 (the_low_target): Add new members.
15911 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15912 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15913 (the_low_target): Add new members.
15914 * linux-x86-64-low.c (target_regsets): Add new kind
15915 identifier.
15916
159172002-05-15 Daniel Jacobowitz <drow@mvista.com>
15918
15919 From Martin Pool <mbp@samba.org>:
15920 * server.c (gdbserver_usage): New function.
15921 (main): Call it.
15922
159232002-05-14 Daniel Jacobowitz <drow@mvista.com>
15924
15925 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15926 stop_at -> stop_pc.
15927
159282002-05-04 Andrew Cagney <ac131313@redhat.com>
15929
15930 * Makefile.in: Remove obsolete code.
15931
159322002-04-24 Michal Ludvig <mludvig@suse.cz>
15933
15934 * linux-low.c (regsets_fetch_inferior_registers),
15935 (regsets_store_inferior_registers): Removed cast to int from
15936 ptrace() calls.
15937 * regcache.h: Added declaration of struct inferior_info.
15938
159392002-04-20 Daniel Jacobowitz <drow@mvista.com>
15940
15941 * inferiors.c (struct inferior_info): Add regcache_data.
15942 (add_inferior): Call create_register_cache.
15943 (clear_inferiors): Call free_register_cache.
15944 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15945 * regcache.c (struct inferior_regcache_data): New.
15946 (registers): Remove.
15947 (get_regcache): New function.
15948 (create_register_cache, free_register_cache): New functions.
15949 (set_register_cache): Don't initialize the register cache here.
15950 (registers_to_string, registers_from_string, register_data): Call
15951 get_regcache.
15952 * regcache.h: Add prototypes.
15953 * server.h: Likewise.
15954
159552002-04-20 Daniel Jacobowitz <drow@mvista.com>
15956
15957 * mem-break.c: New file.
15958 * mem-break.h: New file.
15959 * Makefile.in: Add mem-break.o rule; update server.h
15960 dependencies.
15961 * inferiors.c (struct inferior_info): Add target_data
15962 member.
15963 (clear_inferiors): Free target_data member if set.
15964 (inferior_target_data, set_inferior_target_data): New functions.
15965 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15966 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15967 * linux-low.c (linux_bp_reinsert): New variable.
15968 (struct inferior_linux_data): New.
15969 (linux_create_inferior): Use set_inferior_target_data.
15970 (linux_attach): Likewise. Call add_inferior.
15971 (linux_wait_for_one_inferior): New function.
15972 (linux_wait): Call it.
15973 (linux_write_memory): Add const.
15974 (initialize_low): Call set_breakpoint_data.
15975 * linux-low.h (struct linux_target_ops): Add breakpoint
15976 handling members.
15977 * server.c (attach_inferior): Remove extra add_inferior
15978 call.
15979 * server.h: Include mem-break.h. Update inferior.c
15980 prototypes.
15981 * target.c (read_inferior_memory)
15982 (write_inferior_memory): New functions.
15983 * target.h (read_inferior_memory)
15984 (write_inferior_memory): Change macros to prototypes.
15985 (struct target_ops): Update comments. Add const to write_memory
15986 definition.
15987
159882002-04-11 Daniel Jacobowitz <drow@mvista.com>
15989
15990 * linux-low.c (usr_store_inferior_registers): Support
15991 registers which are allowed to fail to store.
15992 * linux-low.h (linux_target_ops): Likewise.
15993 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15994 (ppc_cannot_store_register): FPSCR may not be storable.
15995
159962002-04-09 Daniel Jacobowitz <drow@mvista.com>
15997
15998 * server.h: Include <string.h> if HAVE_STRING_H.
15999 * ChangeLog: Correct paths in last ChangeLog entry.
16000
160012002-04-09 Daniel Jacobowitz <drow@mvista.com>
16002
16003 * linux-low.h: Remove obsolete prototypes.
16004 (struct linux_target_ops): New.
16005 (extern the_low_target): New.
16006 * linux-low.c (num_regs, regmap): Remove declarations.
16007 (register_addr): Use the_low_target explicitly.
16008 (fetch_register): Likewise.
16009 (usr_fetch_inferior_registers): Likewise.
16010 (usr_store_inferior_registers): Likewise.
16011 * linux-arm-low.c (num_regs): Remove.
16012 (arm_num_regs): Define.
16013 (arm_regmap): Renamed from regmap, made static.
16014 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16015 made static.
16016 (arm_cannot_store_register): Renamed from cannot_store_register,
16017 made static.
16018 (the_low_target): New.
16019 * linux-i386-low.c (num_regs): Remove.
16020 (i386_num_regs): Define.
16021 (i386_regmap): Renamed from regmap, made static.
16022 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16023 made static.
16024 (i386_cannot_store_register): Renamed from cannot_store_register,
16025 made static.
16026 (the_low_target): New.
16027 * linux-ia64-low.c (num_regs): Remove.
16028 (ia64_num_regs): Define.
16029 (ia64_regmap): Renamed from regmap, made static.
16030 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16031 made static.
16032 (ia64_cannot_store_register): Renamed from cannot_store_register,
16033 made static.
16034 (the_low_target): New.
16035 * linux-m68k-low.c (num_regs): Remove.
16036 (m68k_num_regs): Define.
16037 (m68k_regmap): Renamed from regmap, made static.
16038 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16039 made static.
16040 (m68k_cannot_store_register): Renamed from cannot_store_register,
16041 made static.
16042 (the_low_target): New.
16043 * linux-mips-low.c (num_regs): Remove.
16044 (mips_num_regs): Define.
16045 (mips_regmap): Renamed from regmap, made static.
16046 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16047 made static.
16048 (mips_cannot_store_register): Renamed from cannot_store_register,
16049 made static.
16050 (the_low_target): New.
16051 * linux-ppc-low.c (num_regs): Remove.
16052 (ppc_num_regs): Define.
16053 (ppc_regmap): Renamed from regmap, made static.
16054 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16055 made static.
16056 (ppc_cannot_store_register): Renamed from cannot_store_register,
16057 made static.
16058 (the_low_target): New.
16059 * linux-s390-low.c (num_regs): Remove.
16060 (s390_num_regs): Define.
16061 (s390_regmap): Renamed from regmap, made static.
16062 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16063 made static.
16064 (s390_cannot_store_register): Renamed from cannot_store_register,
16065 made static.
16066 (the_low_target): New.
16067 * linux-sh-low.c (num_regs): Remove.
16068 (sh_num_regs): Define.
16069 (sh_regmap): Renamed from regmap, made static.
16070 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16071 made static.
16072 (sh_cannot_store_register): Renamed from cannot_store_register,
16073 made static.
16074 (the_low_target): New.
16075 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16076 (the_low_target): New.
16077
160782002-04-09 Daniel Jacobowitz <drow@mvista.com>
16079
16080 * Makefile.in: Add stamp-h target.
16081 * configure.in: Create stamp-h.
16082 * configure: Regenerated.
16083
160842002-04-09 Daniel Jacobowitz <drow@mvista.com>
16085
16086 * inferiors.c: New file.
16087 * target.c: New file.
16088 * target.h: New file.
16089 * Makefile.in: Add target.o and inferiors.o. Update
16090 dependencies.
16091 * linux-low.c (inferior_pid): New static variable,
16092 moved from server.c.
16093 (linux_create_inferior): Renamed from create_inferior.
16094 Call add_inferior. Return 0 on success instead of a PID.
16095 (linux_attach): Renamed from myattach.
16096 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16097 (linux_thread_alive): Renamed from mythread_alive.
16098 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16099 child dies.
16100 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16101 (regsets_store_inferior_registers): Correct error message.
16102 Add missing ``return 0''.
16103 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16104 (linux_store_registers): Renamed from store_inferior_registers.
16105 (linux_read_memory): Renamed from read_inferior_memory.
16106 (linux_write_memory): Renamed from write_inferior_memory.
16107 (linux_target_ops): New structure.
16108 (initialize_low): Call set_target_ops ().
16109 * remote-utils.c (unhexify): New function.
16110 (hexify): New function.
16111 (input_interrupt): Send signals to ``signal_pid''.
16112 * server.c (inferior_pid): Remove.
16113 (start_inferior): Update create_inferior call.
16114 (attach_inferior): Call add_inferior.
16115 (handle_query): New function.
16116 (main): Call handle_query for `q' packets.
16117 * server.h: Include "target.h". Remove obsolete prototypes.
16118 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16119
161202002-04-09 Daniel Jacobowitz <drow@mvista.com>
16121
16122 * Makefile.in: Add WARN_CFLAGS. Update configury
16123 dependencies.
16124 * configure.in: Check for <string.h>
16125 * configure: Regenerate.
16126 * config.in: Regenerate.
16127 * gdbreplay.c: Include needed system headers.
16128 (remote_open): Remove strchr prototype.
16129 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16130 * regcache.c (supply_register): Change buf argument to const void *.
16131 (supply_register_by_name): Likewise.
16132 (collect_register): Change buf argument to void *.
16133 (collect_register_by_name): Likewise.
16134 * regcache.h: Add missing prototypes.
16135 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16136 * server.c (handle_query): New function.
16137 (attached): New static variable, moved out of main.
16138 (main): Quiet longjmp clobber warnings.
16139 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16140 * utils.c (error): Remove NORETURN.
16141 (fatal): Likewise.
This page took 2.085757 seconds and 4 git commands to generate.