]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Don't pass -m64 to libcc1 on aarch64-linux.
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
9a70f35c
YQ
12018-01-16 Yao Qi <yao.qi@linaro.org>
2
3 PR gdb/18749
4 * linux-low.c (fetch_register): Call supply_register instead of
5 error.
6
605fd3c6
YQ
72018-01-08 Yao Qi <yao.qi@linaro.org>
8 Simon Marchi <simon.marchi@ericsson.com>
9
10 * Makefile.in (OBS): Remove selftest.o.
11 * configure.ac: Set srv_selftest_objs if $development is true.
12 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
13 * configure: Re-generated.
14 * server.c (captured_main): Wrap variable selftest_filter with
15 GDB_SELF_TEST.
16
2cc05030
SM
172018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
18
19 * server.c (parse_debug_format_options): Return std::string.
20 (handle_monitor_command, captured_main): Adjust.
21
e379cee6
PA
222018-01-05 Pedro Alves <palves@redhat.com>
23
24 PR gdb/18653
25 * server.c (captured_main): Pass quiet=false to
26 save_original_signals_state.
27
82e1e79a
JB
282018-01-01 Joel Brobecker <brobecker@adacore.com>
29
30 * gdbreplay.c (gdbreplay_version): Update copyright year in
31 version message.
32 * server.c (gdbserver_version): Likewise.
33
8e481c3b
TT
342017-12-08 Tom Tromey <tom@tromey.com>
35
36 * ax.c (ax_printf): Update.
37
a8806230
YQ
382017-12-07 Yao Qi <yao.qi@linaro.org>
39
40 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
41 aarch64_linux_read_description.
42 * linux-amd64-ipa.c (idx2mask): New array.
43 (get_ipa_tdesc): Move idx2mask out.
44 (initialize_low_tracepoint): Initialize target descriptions.
45 * linux-i386-ipa.c (idx2mask): New array.
46 (get_ipa_tdesc): Move idx2mask out.
47 (initialize_low_tracepoint): Initialize target descriptions.
48
d4a0e8b5
SM
492017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
50
51 * tdesc.c (struct tdesc_type): Change return type.
52 (tdesc_add_flag): Change parameter type.
53 (tdesc_add_bitfield): Likewise.
54 (tdesc_add_field): Likewise.
55 (tdesc_set_struct_size): Likewise.
56
798a7429
SM
572017-12-05 Simon Marchi <simon.marchi@ericsson.com>
58
59 * regcache.c (registers_to_string): Remove unused variable.
60
c0e15c9b
SM
612017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
62
63 * inferiors.c (for_each_inferior_with_data): Remove.
64 * inferiors.h (for_each_inferior_with_data): Remove.
65 * server.c (handle_qxfer_threads_worker): Change parameter type.
66 (handle_qxfer_threads_proper): Use for_each_thread.
67
f0045347
SM
682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
69
70 * inferiors.c (for_each_inferior): Remove.
71 (clear_inferiors): Use for_each_thread.
72 * inferiors.h (for_each_inferior): Remove.
73 * linux-low.c (linux_wait_for_event_filtered): Use
74 for_each_thread.
75 (linux_stabilize_threads): Likewise.
76 * regcache.c (regcache_release): Likewise.
77 * server.c (gdb_wants_all_threads_stopped): Likewise.
78 (clear_pending_status_callback): Remove.
79 (handle_status): Use for_each_thread.
80 (captured_main): Likewise.
81 * win32-low.c (child_init_thread_list): Likewise.
82 (win32_clear_inferiors): Likewise.
83 (fake_breakpoint_event): Likewise.
84
9521758b
SM
852017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
86
87 * inferiors.h (find_inferior): Remove.
88 * inferiors.c (find_inferior): Remove.
89
8f86d7aa
SM
902017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
91
92 * linux-low.c (resume_status_pending_p): Update comment.
93 (need_step_over_p): Update comment.
94
e2b44075
SM
952017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
96
97 * linux-low.c (proceed_one_lwp): Return void, change parameter
98 type.
99 (unsuspend_and_proceed_one_lwp): Likewise.
100 (proceed_all_lwps): Use for_each_thread.
101 (unstop_all_lwps): Likewise.
102
c80825ff
SM
1032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
104
105 * linux-low.c (linux_resume_one_thread): Return void, take
106 parameter directly.
107 (linux_resume): Use for_each_thread.
108
df3e4dbe
SM
1092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
110
111 * linux-low.c (send_sigstop_callback): Return void, change
112 parameter type. Rename to...
113 (send_sigstop): ... this.
114 (suspend_and_send_sigstop_callback): Return void, change parameter
115 type. Rename to...
116 (suspend_and_send_sigstop): ... this.
117 (stop_all_lwps): Use for_each_thread.
118
5a6b0a41
SM
1192017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
120
121 * linux-low.c (lwp_running): Return bool, remove unused
122 argument.
123 (linux_stabilize_threads): Use find_thread.
124
39a64da5
SM
1252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
126
127 * linux-low.c (select_singlestep_lwp_callback): Remove.
128 (count_events_callback): Remove.
129 (select_event_lwp_callback): Remove.
130 (select_event_lwp): Use find_thread/for_each_thread.
131
a1385b7b
SM
1322017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
133
134 * linux-low.c (not_stopped_callback): Return bool, take filter
135 argument directly.
136 (linux_wait_for_event_filtered): Use find_thread.
137 (linux_wait_1): Likewise.
138
454296a2
SM
1392017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
140
141 * linux-low.c (same_lwp): Remove.
142 (find_lwp_pid): Use find_thread.
143
6b2a85da
SM
1442017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
145
146 * linux-low.c (delete_lwp_callback): Remove.
147 (linux_mourn): Use for_each_thread.
148
798a38e8
SM
1492017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
150
151 * linux-low.c (linux_detach_lwp_callback): Return void, remove
152 args parameter, don't check for pid.
153 (linux_detach): Use for_each_thread.
154
e4eb0dec
SM
1552017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
156
157 * linux-low.c (struct counter): Remove.
158 (second_thread_of_pid_p): Remove.
159 (last_thread_of_process_p): Use find_thread.
160
83e1b6c1
SM
1612017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
162
163 * inferiors.c (find_inferior_in_random): Remove.
164 * inferiors.h (find_inferior_in_random): Remove.
165 * linux-low.c (status_pending_p_callback): Return bool, accept
166 parameter ptid directly.
167 (linux_wait_for_event_filtered): Use find_thread_in_random.
168 (linux_wait_1): Likewise.
169
8dc7b443
SM
1702017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
171
172 * inferiors.c (find_inferior_id): Remove.
173 (find_thread_ptid): Move implemention from find_inferior_id to
174 here.
175 * inferiors.h (find_inferior_id): Remove.
176 * server.c (handle_status): Use find_thread_ptid.
177 (process_serial_event): Likewise.
178 * thread-db.c (find_one_thread): Likewise.
179 (thread_db_thread_handle): Likewise.
180 * win32-low.c (thread_rec): Likewise.
181 (child_delete_thread): Likewise.
182 (win32_thread_alive): Likewise.
183 (get_child_debug_event): Likewise.
184
da25033c
SM
1852017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
186
187 * linux-mips-low.c (update_watch_registers_callback): Return
188 void, remove pid_p parameter, don't check for pid.
189 (mips_insert_point, mips_remove_point): Use for_each_thread.
190
c91bb56b
SM
1912017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
192
193 * lynx.low (lynx_delete_thread_callback): Remove.
194 (lynx_mourn): Use for_each_thread.
195
634a3254
SM
1962017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
197
198 * regcache.c (regcache_invalidate_one): Remove.
199 (regcache_invalidate_pid): use for_each_thread.
200
41272101
TT
2012017-11-26 Tom Tromey <tom@tromey.com>
202
203 * linux-low.c (linux_create_inferior): Update.
204
f5291a6f
UW
2052017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
206
207 * spu-low.c (spu_create_inferior): Fix typo in argument name.
208
6654d750
AH
2092017-11-24 Alan Hayward <alan.hayward@arm.com>
210
211 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
212 * linux-aarch64-low.c (initialize_low_arch): Call init func.
213 * linux-aarch64-tdesc-selftest.c: New file.
214 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
215
2162017-11-24 Alan Hayward <alan.hayward@arm.com>
217
218 * configure.srv: Add new file.
219 * linux-aarch64-low.c (initialize_low_arch): Call init func.
220 * linux-aarch64-tdesc-selftest.c: New file.
221 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
222
49bdb7ee
AH
2232017-11-24 Alan Hayward <alan.hayward@arm.com>
224
225 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
226 * linux-aarch64-low.c (initialize_low_arch): Remove init.
227 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
228
d6d7ce56
AH
2292017-11-24 Alan Hayward <alan.hayward@arm.com>
230
231 * configure.srv: Add new files.
232 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
233 aarch64_linux_read_description.
234 * linux-aarch64-low.c (aarch64_linux_read_description):
235 Merge with aarch64_arch_setup.
236 (aarch64_arch_setup): Call aarch64_linux_read_description.
237 * linux-aarch64-tdesc.c: New file.
238 * linux-aarch64-tdesc.h: New file.
239
506fe5f4
YQ
2402017-11-24 Yao Qi <yao.qi@linaro.org>
241
242 * configure.srv: Set $srv_regobj for tic6x-linux.
243 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
244 (tic6x_read_description): Move some code to tic6x_arch_setup.
245 (tic6x_tdesc_test): New function.
246 (initialize_low_arch): Call selftests::register_test.
247
29f9a567
YQ
2482017-11-22 Yao Qi <yao.qi@linaro.org>
249
250 * remote-utils.c (prepare_resume_reply): Use memcpy.
251
578290ec
SM
2522017-11-19 Simon Marchi <simon.marchi@ericsson.com>
253
254 * linux-low.c (kill_one_lwp_callback): Return void, take
255 argument directly, don't filter on pid.
256 (linux_kill): Use for_each_thread.
257
eca55aec
SM
2582017-11-19 Simon Marchi <simon.marchi@ericsson.com>
259
260 * linux-low.c (need_step_over_p): Return bool, remove dummy
261 argument.
262 (linux_resume, proceed_all_lwps): Use find_thread.
263
25c28b4d
SM
2642017-11-19 Simon Marchi <simon.marchi@ericsson.com>
265
266 * linux-low.c (resume_status_pending_p): Return bool, remove
267 flag_p argument.
268 (linux_resume): Use find_thread.
269
5fdda392
SM
2702017-11-19 Simon Marchi <simon.marchi@ericsson.com>
271
272 * linux-low.c (struct thread_resume_array): Remove.
273 (linux_set_resume_request): Return void, take arguments
274 directly.
275 (linux_resume): Use for_each_thread.
276
fcb056a5
SM
2772017-11-19 Simon Marchi <simon.marchi@ericsson.com>
278
279 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
280 return bool, remove data argument.
281 (linux_stabilize_threads): Use find_thread.
282
139720c5
SM
2832017-11-19 Simon Marchi <simon.marchi@ericsson.com>
284
285 * linux-low.c (unsuspend_one_lwp): Remove.
286 (unsuspend_all_lwps): Use for_each_thread, inline code from
287 unsuspend_one_lwp.
288
6d1e5673
SM
2892017-11-19 Simon Marchi <simon.marchi@ericsson.com>
290
291 * gdbthread.h (find_thread): Add overload with ptid_t filter.
292 * linux-low.c (struct iterate_over_lwps_args): Remove.
293 (iterate_over_lwps_filter): Remove.
294 (iterate_over_lwps): Use find_thread.
295
bbf550d5
SM
2962017-11-19 Simon Marchi <simon.marchi@ericsson.com>
297
298 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
299 (linux_handle_new_gdb_connection): Use for_each_thread, inline
300 code from reset_lwp_ptrace_options_callback.
301
00192f77
SM
3022017-11-19 Simon Marchi <simon.marchi@ericsson.com>
303
304 * linux-arm-low.c (struct update_registers_data): Remove.
305 (update_registers_callback): Return void, take arguments
306 directly, don't check thread's pid.
307 (arm_insert_point, arm_remove_point): Use for_each_thread.
308
2bee2b6c
SM
3092017-11-19 Simon Marchi <simon.marchi@ericsson.com>
310
311 * win32-low.c (continue_one_thread): Return void, take argument
312 directly.
313 (child_continue): Use for_each_thread.
314
0b360f19
SM
3152017-11-19 Simon Marchi <simon.marchi@ericsson.com>
316
317 * win32-i386-low.c (update_debug_registers_callback): Rename
318 to ...
319 (update_debug_registers): ... this, return void, remove pid_p arg.
320 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
321
f27866ba
SM
3222017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
323
324 * inferiors.h (struct process_info): Add constructor, initialize
325 fields..
326 <syscalls_to_catch>: Change type to std::vector<int>.
327 * inferiors.c (add_process): Allocate process_info with new.
328 (remove_process): Free process_info with delete.
329 * linux-low.c (handle_extended_wait): Adjust.
330 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
331 * server.c (handle_general_set): Adjust.
332
e849ea89
PA
3332017-11-16 Pedro Alves <palves@redhat.com>
334
335 * remote-utils.c (remote_close): Block SIGIO signals instead of
336 uninstalling the SIGIO handler.
337
1d0aa65c
AH
3382017-11-16 Alan Hayward <alan.hayward@arm.com>
339
340 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
341
3491a34c
YQ
3422017-11-16 Yao Qi <yao.qi@linaro.org>
343
344 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
345 (tic6x_store_gregset): Likewise.
346 (tic6x_usrregs_info): Move it up.
347
a602f924
AH
3482017-11-15 Alan Hayward <alan.hayward@arm.com>
349
350 * Makefile.in: Update arch rules.
351 * configure.srv: Explicitly mark arch/ files.
352
5616b6c3
AS
3532017-11-13 Andreas Schwab <schwab@suse.de>
354
355 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
356 function.
357 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
358
d1928160
PA
3592017-11-06 Pedro Alves <palves@redhat.com>
360
361 * config.in, configure: Regenerate.
362
bac608e7
SM
3632017-10-27 Simon Marchi <simon.marchi@ericsson.com>
364
365 * target.c (struct thread_search): Remove.
366 (thread_search_callback): Remove.
367 (prepare_to_access_memory): Use for_each_thread instead of
368 find_inferior. Inline code from thread_search_callback.
369
eaddb425
SM
3702017-10-27 Simon Marchi <simon.marchi@ericsson.com>
371
372 * server.c (struct visit_actioned_threads_data): Remove.
373 (visit_actioned_threads): Change prototype to take arguments
374 directly.
375 (resume): Use find_thread instead of find_inferior.
376
99078d34
SM
3772017-10-27 Simon Marchi <simon.marchi@ericsson.com>
378
379 * server.c (queue_stop_reply_callback): Change prototype, return
380 void.
381 (find_status_pending_thread_callback): Remove.
382 (handle_status): Replace find_inferior with find_thread and
383 for_each_thread.
384
cc628f3d
AH
3852017-10-25 Alan Hayward <alan.hayward@arm.com>
386
387 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
388 with REGNO.
389 (aarch64_store_gregset): Likewise.
390 (aarch64_fill_fpregset): Likewise.
391 (aarch64_store_fpregset): Likewise.
392
4d3bb80e
SM
3932017-10-21 Simon Marchi <simon.marchi@ericsson.com>
394
395 * gdbthread.h (find_thread, for_each_thread): New functions.
396 * inferiors.c (thread_of_pid): Remove.
397 (find_any_thread_of_pid): Use find_thread.
398 * linux-low.c (num_lwps): Use for_each_thread.
399
7a7cdfa0
YQ
4002017-10-17 Yao Qi <yao.qi@linaro.org>
401
402 * Makefile.in: Remove one rule.
403 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
404
e675d170
YQ
4052017-10-17 Yao Qi <yao.qi@linaro.org>
406
407 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
408 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
409
7eb4e0f9
YQ
4102017-10-17 Yao Qi <yao.qi@linaro.org>
411
412 * configure.srv: Rename arm.o with arch/arm.o.
413
60d6cfc9
YQ
4142017-10-17 Yao Qi <yao.qi@linaro.org>
415
416 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
417 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
418 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
419 (arch-i386.o, arch-amd64.o): Remove rules.
420 (arch/%.o): New rule.
421 Update POSTCOMPILE and COMPILE.pre.
422 * configure.ac: Invoke AC_CONFIG_COMMANDS.
423 * configure: Re-generated.
424 * configure.srv: Replace arch-i386.o with arch/i386.o.
425 Replace arch-amd64.o with arch/amd64.o.
426
5bfda255
YQ
4272017-10-16 Yao Qi <yao.qi@linaro.org>
428
429 * configure: Regenerated.
430
9c80ecd6
SM
4312017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
432
433 * inferiors.h: (struct inferior_list): Remove.
434 (struct inferior_list_entry); Remove.
435 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
436 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
437 get_first_inferior): Remove.
438 (for_each_inferior, for_each_inferior_with_data, find_inferior,
439 find_inferior_id, find_inferior_in_random): Change signature.
440 * inferiors.c (all_threads): Change type to
441 std::list<thread_info *>.
442 (get_thread): Remove macro.
443 (find_inferior, find_inferior_id): Change signature, implement
444 using find_thread.
445 (find_inferior_in_random): Change signature, implement using
446 find_thread_in_random.
447 (for_each_inferior, for_each_inferior_with_data): Change
448 signature, implement using for_each_thread.
449 (add_inferior_to_list, remove_inferior): Remove.
450 (add_thread, get_first_thread, thread_of_pid,
451 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
452 (get_first_inferior, one_inferior_p, clear_inferior_list):
453 Remove.
454 (clear_inferiors, get_thread_process): Update.
455 * gdbthread.h: Include <list>.
456 (struct thread_info) <entry>: Remove field.
457 <id>: New field.
458 (all_threads): Change type to std::list<thread_info *>.
459 (get_first_inferior): Add doc.
460 (find_thread, for_each_thread, find_thread_in_random): New
461 functions.
462 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
463 * linux-arm-low.c (update_registers_callback): Update.
464 * linux-low.c (second_thread_of_pid_p): Update.
465 (kill_one_lwp_callback, linux_detach_lwp_callback,
466 delete_lwp_callback, status_pending_p_callback, same_lwp,
467 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
468 iterate_over_lwps, not_stopped_callback,
469 resume_stopped_resumed_lwps, count_events_callback,
470 select_singlestep_lwp_callback, select_event_lwp_callback,
471 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
472 suspend_and_send_sigstop_callback, wait_for_sigstop,
473 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
474 lwp_running, linux_set_resume_request, resume_status_pending_p,
475 need_step_over_p, start_step_over, linux_resume_one_thread,
476 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
477 reset_lwp_ptrace_options_callback): Update.
478 * linux-mips-low.c (update_watch_registers_callback): Update.
479 * regcache.c (regcache_invalidate_one, regcache_invalidate):
480 Update.
481 (free_register_cache_thread_one): Remove.
482 (regcache_release): Update.
483 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
484 handle_qxfer_threads_worker): Update.
485 (handle_query): Update, use list iterator.
486 (visit_actioned_threads, handle_pending_status,
487 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
488 clear_pending_status_callback, set_pending_status_callback,
489 find_status_pending_thread_callback, handle_status,
490 process_serial_event): Update.
491 * target.c (thread_search_callback): Update.
492 * thread-db.c (thread_db_get_tls_address): Update.
493 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
494 Update.
495 * win32-i386-low.c (update_debug_registers_callback): Update.
496 * win32-low.c (delete_thread_info, child_delete_thread,
497 continue_one_thread, suspend_one_thread,
498 get_child_debug_event): Adjust.
499
9179355e
SM
5002017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
501
502 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
503 * inferiors.h: Include <list>.
504 (struct process_info) <entry>: Remove field.
505 <pid>: New field.
506 (pid_of): Change macro to function.
507 (ptid_of, lwpid_of): Remove macro.
508 (all_processes): Change type to std::list<process_info *>.
509 (ALL_PROCESSES): Remove macro.
510 (for_each_process, find_process): New function.
511 * inferiors.c (all_processes): Change type to
512 std::list<process_info *>.
513 (find_thread_process): Adjust.
514 (add_process): Likewise.
515 (remove_process): Likewise.
516 (find_process_pid): Likewise.
517 (get_first_process): Likewise.
518 (started_inferior_callback): Remove.
519 (have_started_inferiors_p): Adjust.
520 (attached_inferior_callback): Remove.
521 (have_attached_inferiors_p): Adjust.
522 * linux-low.c (check_zombie_leaders): Likewise.
523 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
524 (x86_linux_update_xmltarget): Adjust.
525 * server.c (handle_query): Likewise.
526 (gdb_reattached_process): Remove.
527 (handle_status): Adjust.
528 (kill_inferior_callback): Likewise.
529 (detach_or_kill_inferior): Remove.
530 (print_started_pid): Likewise.
531 (print_attached_pid): Likewise.
532 (detach_or_kill_for_exit): Update.
533 (process_serial_event): Likewise.
534 * linux-arm-low.c (arm_new_fork): Likewise.
535
c9cb8905
SM
5362017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
537
538 * dll.h: Include <list>.
539 (struct dll_info): Add constructor.
540 <entry>: Remove field.
541 (all_dlls): Change type to std::list<dll_info>.
542 * dll.c: Include <algorithm>.
543 (get_dll): Remove macro.
544 (all_dlls): Change type to std::list<dll_info *>.
545 (free_one_dll): Remove.
546 (match_dll): Likewise.
547 (loaded_dll): Adjust.
548 (unloaded_dll): Adjust to all_dlls type change, use
549 std::find_if. Inline code from match_dll.
550 (clear_dlls): Adjust to all_dlls type change.
551 * server.c (emit_dll_description): Remove.
552 (handle_qxfer_libraries): Adjust to all_dlls type change,
553 integrate emit_dll_description's functionality.
554
04ec7890
SM
5552017-10-12 Simon Marchi <simon.marchi@ericsson.com>
556
557 * linux-low.h (struct linux_target_ops) <delete_process>: New
558 field.
559 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
560 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
561 (struct linux_target_ops): Add delete_process callback.
562 * linux-arm-low.c (arm_delete_process): New.
563 (struct linux_target_ops): Add delete_process callback.
564 * linux-bfin-low.c (struct linux_target_ops): Likewise.
565 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
566 * linux-m32r-low.c (struct linux_target_ops): Likewise.
567 * linux-mips-low.c (mips_linux_delete_process): New.
568 (struct linux_target_ops): Add delete_process callback.
569 * linux-ppc-low.c (struct linux_target_ops): Likewise.
570 * linux-s390-low.c (struct linux_target_ops): Likewise.
571 * linux-sh-low.c (struct linux_target_ops): Likewise.
572 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
573 * linux-tile-low.c (struct linux_target_ops): Likewise.
574 * linux-x86-low.c (x86_linux_delete_process): New.
575 (struct linux_target_ops): Add delete_process callback.
576 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
577
466eecee
SM
5782017-10-12 Simon Marchi <simon.marchi@ericsson.com>
579
580 * linux-aarch64-low.c (the_low_target): Add thread delete
581 callback.
582 * linux-arm-low.c (arm_delete_thread): New function.
583 (the_low_target): Add thread delete callback.
584 * linux-bfin-low.c (the_low_target): Likewise.
585 * linux-crisv32-low.c (the_low_target): Likewise.
586 * linux-low.c (delete_lwp): Invoke delete_thread callback if
587 set.
588 * linux-low.h (struct linux_target_ops) <delete_thread>: New
589 field.
590 * linux-m32r-low.c (the_low_target): Add thread delete callback.
591 * linux-mips-low.c (mips_linux_delete_thread): New function.
592 (the_low_target): Add thread delete callback.
593 * linux-ppc-low.c (the_low_target): Likewise.
594 * linux-s390-low.c (the_low_target): Likewise.
595 * linux-sh-low.c (the_low_target): Likewise.
596 * linux-tic6x-low.c (the_low_target): Likewise.
597 * linux-tile-low.c (the_low_target): Likewise.
598 * linux-x86-low.c (the_low_target): Likewise.
599 * linux-xtensa-low.c (the_low_target): Likewise.
600
b79f7801
YZ
6012017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
602
603 * win32-low.c: Include "common-inferior.h".
604
bc3b087d
SDJ
6052017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
606
607 * inferiors.c (set_inferior_cwd): New function.
608 * server.c (handle_general_set): Handle QSetWorkingDir packet.
609 (handle_query): Inform that QSetWorkingDir is supported.
610 * win32-low.c (create_process): Pass the inferior's cwd to
611 CreateProcess.
612
d092c5a2
SDJ
6132017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
614
615 * inferiors.c (current_inferior_cwd): New global variable.
616 (get_inferior_cwd): New function.
617 * inferiors.h (struct process_info) <cwd>: New field.
618
7da0a886
SDJ
6192017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
620
621 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
622 (OBS): Add gdb_tilde_expand.o.
623
289a6840
SM
6242017-10-02 Simon Marchi <simon.marchi@ericsson.com>
625
626 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
627 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
628
256642e8
PA
6292017-09-29 Pedro Alves <palves@redhat.com>
630
631 * ax.c (gdb_parse_agent_expr): Constify.
632 * ax.h (gdb_parse_agent_expr): Constify.
633 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
634 Constify.
635 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
636 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
637 * remote-utils.h (read_ptid): Constify.
638 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
639 (process_point_options, process_serial_event): Constify.
640 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
641 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
642 (cmd_qtbuffer): Constify.
643
5b9ca4d4
PA
6442017-09-29 Pedro Alves <palves@redhat.com>
645
646 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
647 fails.
648
94c207e0
PA
6492017-09-29 Pedro Alves <palves@redhat.com>
650
651 * linux-low.c (handle_extended_wait): Pass parent thread instead
652 of process to thread_db_notice_clone.
653 * linux-low.h (thread_db_notice_clone): Replace parent process
654 parameter with parent thread parameter.
655 * thread-db.c (find_one_thread): Add comment.
656 (thread_db_notice_clone): Replace parent process parameter with
657 parent thread parameter. Temporarily switch to the parent thread.
658
75352e28
SDJ
6592017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
660
661 * gdbthread.h: Include "common-gdbthread.h".
662 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
663 "if" when validating the ptid.
664 * remote-utils.c: Include "gdbthread.h".
665 (prepare_resume_reply): Use "switch_to_thread".
666 * target.c (done_accessing_memory): Likewise.
667
ad339634
AA
6682017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
669
670 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
671 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
672 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
673 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
674 s390x-gs-linux64-ipa.o to ipa_obj.
675 * linux-s390-low.c (HWCAP_S390_GS): New define.
676 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
677 New functions.
678 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
679 (s390_arch_setup): Check for guarded-storage support and choose
680 appropriate tdesc.
681 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
682 init_registers_s390x_gs_linux64.
683 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
684 enum value.
685 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
686 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
687
cc4d742f
SM
6882017-09-22 Simon Marchi <simon.marchi@ericsson.com>
689
690 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
691
f6327dcb
KB
6922017-09-21 Kevin Buettner <kevinb@redhat.com>
693
694 * linux-low.h (struct lwp_info): Add new field, thread_handle.
695 (thread_db_thread_handle): Declare.
696 * linux-low.c (linux_target_ops): Initialize thread_handle.
697 * server.c (handle_qxfer_threads_worker): Add support for
698 "handle" attribute.
699 * target.h (struct target_ops): Add new function pointer,
700 thread_handle.
701 (target_thread_handle): Define.
702 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
703 field in lwp.
704 (thread_db_thread_handle): New function.
705
86299109
KB
7062017-09-21 Kevin Buettner <kevinb@redhat.com>
707
708 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
709 * linux-low.h (thread_db_notice_clone): Declare.
710 * thread-db.c (thread_db_notice_clone): New function.
711
f557a88a
PA
7122017-09-21 Pedro Alves <palves@redhat.com>
713
714 * server.c (gdb_read_memory, handle_status, process_serial_event)
715 (handle_serial_event, handle_target_event): Adjust to
716 set_desired_thread prototype change.
717 * target.c (set_desired_thread): Remove 'use_general' parameter
718 and adjust.
719 * target.h (set_desired_thread): Remove 'use_general' parameter.
720
223ffa71
TT
7212017-09-20 Tom Tromey <tom@tromey.com>
722
723 * target.c (target_terminal::terminal_state): Define.
724 (target_terminal::init): Rename from target_terminal_init.
725 (target_terminal::inferior): Rename from
726 target_terminal_inferior.
727 (target_terminal::ours): Rename from target_terminal_ours.
728 (target_terminal::ours_for_output, target_terminal::info): New.
729
04fd3ba9
SM
7302017-09-16 Simon Marchi <simon.marchi@ericsson.com>
731
732 * server.c (accumulate_file_name_length): Remove.
733 (emit_dll_description): Adjust to std::string change.
734 (handle_qxfer_libraries): Use std::string to hold document.
735
5e187554
SM
7362017-09-16 Simon Marchi <simon.marchi@ericsson.com>
737
738 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
739 return type of xml_escape_text.
740 * server.c (emit_dll_description): Likewise.
741
1526853e
SM
7422017-09-16 Simon Marchi <simon.marchi@ericsson.com>
743
744 * server.c (captured_main): Accept argument for --selftest.
745 Update run_tests call.
746 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
747 when registering selftests.
748
c4dfafab
SDJ
7492017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
750
751 * regcache.c (get_thread_regcache): Update code to use "std::vector"
752 instead of "VEC" for "target_desc.reg_defs".
753 (regcache_cpy): Likewise.
754 (registers_to_string): Likewise.
755 (registers_from_string): Likewise.
756 (find_regno): Likewise.
757 (supply_regblock): Likewise.
758 (regcache_raw_read_unsigned): Likewise.
759 * tdesc.c (init_target_desc): Likewise.
760 (tdesc_create_reg): Likewise.
761 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
762 (struct target_desc) <reg_defs>: Convert to "std::vector".
763 (target_desc): Do not initialize "reg_defs".
764 (~target_desc): Update code to use "std::vector" instead of "VEC"
765 for "target_desc.reg_defs".
766 (operator==): Likewise.
767
124aceb4
SM
7682017-09-15 Simon Marchi <simon.marchi@ericsson.com>
769
770 * inferiors.h (thread_to_gdb_id): Remove.
771 * inferiors.c (thread_to_gdb_id): Remove.
772 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
773 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
774 lynx_store_registers, lynx_read_memory, lynx_write_memory):
775 Likewise.
776 * nto-low.c (nto_fetch_registers, nto_store_registers,
777 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
778
96cde54f
SM
7792017-09-15 Simon Marchi <simon.marchi@ericsson.com>
780
781 * inferiors.h (gdb_id_to_thread_id): Remove.
782 * inferiors.c (gdb_id_to_thread_id): Remove.
783 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
784 removal. Move pid declaration closer to where it's used.
785
e8ca139e
SM
7862017-09-15 Simon Marchi <simon.marchi@ericsson.com>
787
788 * server.c (handle_detach): New function.
789 (process_serial_event): Move code out, call handle_detach.
790
f8a4e119
SM
7912017-09-15 Simon Marchi <simon.marchi@ericsson.com>
792
793 * server.c (require_running): Rename to ...
794 (require_running_or_return): ... this ...
795 (require_running_or_break): ... and this.
796 (handle_query, process_serial_event): Adjust.
797
0eb0a407
SM
7982017-09-15 Simon Marchi <simon.marchi@ericsson.com>
799
800 * linux-low.c (linux_set_resume_request): Remove unused
801 variables.
802
785922a5
SM
8032017-09-15 Simon Marchi <simon.marchi@ericsson.com>
804
805 * server.c (first_thread_of): Remove.
806 (process_serial_event): Replace usage of first_thread_of with
807 find_any_thread_of_pid.
808 * tracepoint.c (same_process_p): Remove.
809 (gdb_agent_about_to_close): Replace usage of same_process_p with
810 find_any_thread_of_pid.
811 * linux-x86-low.c (same_process_callback): Remove.
812 (x86_arch_setup_process_callback): Replace usage of
813 same_process_callback with find_any_thread_of_pid.
814 * thread-db.c (any_thread_of): Remove.
815 (switch_to_process): Replace usage of any_thread_of with
816 find_any_thread_of_pid.
817 * inferiors.c (thread_pid_matches_callback): Remove.
818 (find_thread_process): Adjust to use find_any_thread_of_pid.
819
a059f00c
SDJ
8202017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
821
822 * regcache.c (get_thread_regcache): Guard calls to "memset"
823 with "!VEC_empty".
824
cc397f3a
SDJ
8252017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
826
827 * linux-low.c (handle_extended_wait): Use
828 "allocate_target_description" instead of "XNEW".
829 * linux-x86-low.c (initialize_low_arch): Likewise.
830
22916b07
YQ
8312017-09-05 Yao Qi <yao.qi@linaro.org>
832
833 * configure.srv (srv_i386_regobj): Remove.
834 (srv_amd64_regobj): Remove.
835 (srv_regobj): Set it to "" for x86 non-linux targets.
836 * linux-x86-tdesc.c (i386_linux_read_description):
837 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
838 (init_registers_i386): Remove the declaration.
839 (tdesc_i386): Remove the declaration.
840 (lynx_i386_arch_setup): Call i386_create_target_description.
841 * nto-x86-low.c: Likewise.
842 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
843 [!__x86_64__]: include arch/i386.h.
844 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
845
38602d55
YQ
8462017-09-05 Yao Qi <yao.qi@linaro.org>
847
848 * configure.srv (srv_amd64_linux_xmlfiles): Remove
849 i386/amd64-XXX-linux from it.
850
44b886ff
YQ
8512017-09-05 Yao Qi <yao.qi@linaro.org>
852
853 * configure.srv: Empty srv_amd64_linux_regobj if $development is
854 false.
855 (ipa_amd64_linux_regobj): Remove.
856 (ipa_x32_linux_regobj): Remove.
857
b4570e4b
YQ
8582017-09-05 Yao Qi <yao.qi@linaro.org>
859
860 * Makefile.in (arch-amd64.o): New rule.
861 * configure.srv: Append arch-amd64.o.
862 * linux-amd64-ipa.c: Include common/x86-xstate.h.
863 (get_ipa_tdesc): Call amd64_linux_read_description.
864 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
865 and init_registers_amd64_XXX.
866 * linux-x86-low.c (x86_linux_read_description): Call
867 amd64_linux_read_description.
868 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
869 (initialize_low_arch): Don't call init_registers_x32_XXX and
870 init_registers_amd64_XXX.
871 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
872 and tdesc_amd64_XXX.
873 [__x86_64__] (amd64_tdesc_test): New function.
874 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
875 and init_registers_amd64_XXX.
876 * linux-x86-tdesc.c: Include arch/amd64.h.
877 (xcr0_to_tdesc_idx): New function.
878 (i386_linux_read_description): New function.
879 (amd64_get_ipa_tdesc_idx): New function.
880 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
881 (amd64_get_ipa_tdesc): Declare.
882
d1f28ea2
YQ
8832017-09-05 Yao Qi <yao.qi@linaro.org>
884
885 * configure.srv (srv_i386_linux_xmlfiles): Remove
886 i386/i386-XXX-linux.xml from it.
887
25a93583
YQ
8882017-09-05 Yao Qi <yao.qi@linaro.org>
889
890 * configure.srv: Set srv_i386_linux_regobj empty if $development
891 is false.
892 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
893 initialize_low_tdesc.
894 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
895 with #if initialize_low_tdesc.
896 * linux-x86-tdesc-selftest.c: New file.
897 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
898
5f035c07
YQ
8992017-09-05 Yao Qi <yao.qi@linaro.org>
900
901 * Makefile.in (arch-i386.o): New rule.
902 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
903 (x86_64-*-linux*): Likewise.
904 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
905 include arch/i386.h.
906 (i386_linux_read_description): Remove code and call
907 i386_create_target_description.
908 * tdesc.c (allocate_target_description): New function.
909 * tdesc.h (set_tdesc_architecture): Remove declaration.
910 (set_tdesc_osabi): Likewise.
911
0abe8a89
YQ
9122017-09-05 Yao Qi <yao.qi@linaro.org>
913
914 * linux-x86-tdesc.c: Don't include <inttypes.h>.
915 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
916 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
917 .xmltarget.
918 * server.c (get_features_xml): Call tdesc_get_features_xml.
919 * tdesc.c (set_tdesc_architecture): New function.
920 (set_tdesc_osabi): New function.
921 (tdesc_get_features_xml): New function.
922 (tdesc_create_feature): Add an argument.
923 * tdesc.h (struct target_desc) <features>: New field.
924 <arch, osabi>: New field.
925 (~target_desc): xfree features, arch, and osabi.
926 (target_desc::oerator==): Don't compare .xmltarget.
927 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
928 (set_tdesc_osabi): Likewise.
929 (tdesc_get_features_xml): Likewise.
930
0a188386
YQ
9312017-09-05 Yao Qi <yao.qi@linaro.org>
932
933 * linux-x86-tdesc.c: Include selftest.h.
934 (i386_tdesc_test): New function.
935 (initialize_low_tdesc): Call selftests::register_test.
936 * tdesc.h: Include regdef.h.
937 (target_desc): Override operator == and !=.
938
f49ff000
YQ
9392017-09-05 Yao Qi <yao.qi@linaro.org>
940
941 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
942 (ipa_obj): Likewise.
943 * linux-i386-ipa.c: Include common/x86-xstate.h
944 (get_ipa_tdesc): Call i386_linux_read_description.
945 (initialize_low_tracepoint): Don't call init_registers_XXX
946 functions, call initialize_low_tdesc instead.
947 * linux-x86-low.c (x86_linux_read_description): Call
948 i386_linux_read_description.
949 (initialize_low_arch): Don't call init_registers_i386_XXX
950 functions, call initialize_low_tdesc.
951 * linux-x86-tdesc.c: New file.
952 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
953 (i386_get_ipa_tdesc_idx): Declare.
954 (i386_get_ipa_tdesc): Declare.
955 (initialize_low_tdesc): Declare.
956
2b68ef2f
YQ
9572017-09-05 Yao Qi <yao.qi@linaro.org>
958
959 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
960 instead of 0.
961
f7000548
YQ
9622017-09-05 Yao Qi <yao.qi@linaro.org>
963
964 * Makefile.in (IPA_OBJS): Add vec-ipa.o
965 * regcache.c (get_thread_regcache): Use VEC_length.
966 (init_register_cache): Likewise.
967 (regcache_cpy): Likewise.
968 (registers_to_string): Iterate reg_defs via VEC_iterate.
969 (find_regno): Likewise.
970 (find_register_by_number): Use VEC_index.
971 (register_size): Call find_register_by_number.
972 (register_data): Call find_register_by_number.
973 (supply_regblock): Use VEC_length.
974 (regcache_raw_read_unsigned): Likewise.
975 * tdesc.c (init_target_desc): Iterate reg_defs via
976 VEC_iterate.
977 (default_description): Update initializer.
978 (copy_target_description): Don't update field num_registers.
979 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
980 <num_registers>: Remove.
981
50a421ac
SM
9822017-09-04 Simon Marchi <simon.marchi@ericsson.com>
983
984 * Makefile.in (.SECONDARY): Define target.
985
23fdd69e
SM
9862017-09-03 Simon Marchi <simon.marchi@ericsson.com>
987
988 * linux-low.c (linux_wait_1): Adjust.
989 * server.c (queue_stop_reply_callback): Adjust.
990
0a2dde4a
SDJ
9912017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
992
993 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
994 QEnvironmentUnset and QEnvironmentReset packets.
995 (handle_query): Inform remote that QEnvironmentHexEncoded,
996 QEnvironmentUnset and QEnvironmentReset are supported.
997
6afd337d
SM
9982017-08-25 Simon Marchi <simon.marchi@ericsson.com>
999
1000 * inferiors.h (inferior_target_data): Rename to ...
1001 (thread_target_data): ... this.
1002 (inferior_regcache_data): Rename to ...
1003 (thread_regcache_data): ... this.
1004 (set_inferior_regcache_data): Rename to ...
1005 (set_thread_regcache_data): ... this.
1006 * inferiors.c (inferior_target_data): Rename to ...
1007 (thread_target_data): ... this.
1008 (inferior_regcache_data): Rename to ...
1009 (thread_regcache_data): ... this.
1010 (set_inferior_regcache_data): Rename to ...
1011 (set_thread_regcache_data): ... this.
1012 (free_one_thread): Update.
1013 * linux-low.h (get_thread_lwp): Update.
1014 * regcache.c (get_thread_regcache): Update.
1015 (regcache_invalidate_thread): Update.
1016 (free_register_cache_thread): Update.
1017 * win32-i386-low.c (update_debug_registers_callback): Update.
1018 (win32_get_current_dr): Update.
1019 * win32-low.c (thread_rec): Update.
1020 (delete_thread_info): Update.
1021 (continue_one_thread): Update.
1022 (suspend_one_thread): Update.
1023
a160cc46
SM
10242017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1025
1026 * inferiors.c (set_inferior_target_data): Remove.
1027 * inferiors.h (set_inferior_target_data): Remove.
1028
6d580b63
YQ
10292017-08-18 Yao Qi <yao.qi@linaro.org>
1030
1031 * Makefile.in (OBS): Add selftest.o.
1032 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1033 * configure, config.in: Re-generated.
1034 * server.c: Include common/sefltest.h.
1035 (captured_main): Handle option --selftest.
1036
f5a29eb0
YQ
10372017-08-09 Yao Qi <yao.qi@linaro.org>
1038
1039 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1040 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1041 i386-avx-mpx.o and i386-mmx.o.
1042 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1043 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1044 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1045 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1046 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1047 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1048 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1049 i386/amd64-avx-mpx.xml.
1050
57757c2f
YQ
10512017-08-09 Yao Qi <yao.qi@linaro.org>
1052
1053 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1054 and x32-avx-avx512.o.
1055 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1056 i386/x32-avx-avx512.xml.
1057
229d26fc
SM
10582017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1059
1060 * tracepoint.h (enum class fast_tpoint_collect_result): New
1061 enumeration.
1062 (fast_tracepoint_collecting): Change return type to
1063 fast_tpoint_collect_result.
1064 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1065 * linux-low.h: Include tracepoint.h.
1066 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1067 fast_tpoint_collect_result.
1068 * linux-low.c (handle_tracepoints): Adjust.
1069 (linux_fast_tracepoint_collecting): Change return type to
1070 fast_tpoint_collect_result.
1071 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1072 linux_wait_1, stuck_in_jump_pad_callback,
1073 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1074 proceed_one_lwp): Adjust to type change.
1075
2e1e43e1
YQ
10762017-07-10 Yao Qi <yao.qi@linaro.org>
1077
1078 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1079
adc764e7
YQ
10802017-06-29 Yao Qi <yao.qi@linaro.org>
1081
1082 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1083 Remove.
1084 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1085
a206891a
SM
10862017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1087
1088 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1089
9a6c7d9c
SDJ
10902017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1091
1092 * linux-low.c (linux_create_inferior): Adjust code to access the
1093 environment information via 'gdb_environ' class.
1094 * lynx-low.c (lynx_create_inferior): Likewise.
1095 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1096 (get_environ): Return a pointer to 'our_environ'.
1097 (captured_main): Initialize 'our_environ'.
1098 * server.h (get_environ): Adjust prototype.
1099 * spu-low.c (spu_create_inferior): Adjust code to access the
1100 environment information via 'gdb_environ' class.
1101
ae3e2ccf
SM
11022017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1103
1104 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1105 usage of "register" keyword.
1106
3e019bdc
SM
11072017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1108
1109 * configure: Re-generate.
1110
8465943a
SM
11112017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1112
1113 * configure: Re-generate.
1114
cf0dd6f0
SM
11152017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1116
1117 * Makefile.in (COMPILE.pre): Add "-x c++".
1118
9845682b
SDJ
11192017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1120
1121 * fork-child.c: Conditionally include <signal.h>.
1122
aefd8b33
SDJ
11232017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1124
1125 * server.c (handle_general_set): Handle new packet
1126 "QStartupWithShell".
1127 (handle_query): Add "QStartupWithShell" to the list of supported
1128 packets.
1129 (gdbserver_usage): Add help text explaining the
1130 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1131 options.
1132 (captured_main): Recognize and act upon the presence of the new
1133 CLI options.
1134
2090129c
SDJ
11352017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1136 Pedro Alves <palves@redhat.com>
1137
1138 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1139 * configure: Regenerate.
1140 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1141 "fork-inferior.o".
1142 (i[34567]86-*-lynxos*): Likewise.
1143 (spu*-*-*): Likewise.
1144 * fork-child.c: New file.
1145 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1146 and "environ.h".
1147 (linux_ptrace_fun): New function.
1148 (linux_create_inferior): Adjust function prototype to reflect
1149 change on "target.h". Adjust function code to use
1150 "fork_inferior".
1151 (linux_request_interrupt): Delete "signal_pid".
1152 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1153 (lynx_ptrace_fun): New function.
1154 (lynx_create_inferior): Adjust function prototype to reflect
1155 change on "target.h". Adjust function code to use
1156 "fork_inferior".
1157 * nto-low.c (nto_create_inferior): Adjust function prototype and
1158 code to reflect change on "target.h". Update comments.
1159 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1160 "common-terminal.h" and "environ.h".
1161 (terminal_fd): Moved to fork-child.c.
1162 (old_foreground_pgrp): Likewise.
1163 (restore_old_foreground_pgrp): Likewise.
1164 (last_status): Make it global.
1165 (last_ptid): Likewise.
1166 (our_environ): New variable.
1167 (startup_with_shell): Likewise.
1168 (program_name): Likewise.
1169 (program_argv): Rename to...
1170 (program_args): ...this.
1171 (wrapper_argv): New variable.
1172 (start_inferior): Delete function.
1173 (get_exec_wrapper): New function.
1174 (get_exec_file): Likewise.
1175 (get_environ): Likewise.
1176 (prefork_hook): Likewise.
1177 (post_fork_inferior): Likewise.
1178 (postfork_hook): Likewise.
1179 (postfork_child_hook): Likewise.
1180 (handle_v_run): Update code to deal with arguments coming from the
1181 remote host. Update calls from "start_inferior" to
1182 "create_inferior".
1183 (captured_main): Likewise. Initialize environment variable. Call
1184 "have_job_control".
1185 * server.h (post_fork_inferior): New prototype.
1186 (get_environ): Likewise.
1187 (last_status): Declare.
1188 (last_ptid): Likewise.
1189 (signal_pid): Likewise.
1190 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1191 (spu_ptrace_fun): New function.
1192 (spu_create_inferior): Adjust function prototype to reflect change
1193 on "target.h". Adjust function code to use "fork_inferior".
1194 * target.c (target_terminal_init): New function.
1195 (target_terminal_inferior): Likewise.
1196 (target_terminal_ours): Likewise.
1197 * target.h: Include <vector>.
1198 (struct target_ops) <create_inferior>: Update prototype.
1199 (create_inferior): Update macro.
1200 * utils.c (gdb_flush_out_err): New function.
1201 * win32-low.c (win32_create_inferior): Adjust function prototype
1202 and code to reflect change on "target.h".
1203
043a4934
SDJ
12042017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1205
1206 * inferiors.c (switch_to_thread): New function.
1207
15652511
SDJ
12082017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1209
1210 * Makefile.in (SFILE): Add "common/job-control.c".
1211 (OBS): Add "job-control.o".
1212
21ea5acd
SDJ
12132017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1214
1215 * Makefile: Remove "@host_makefile_frag@".
1216
e13cb306
PA
12172017-05-05 Pedro Alves <palves@redhat.com>
1218
1219 * configure: Regenerate.
1220
c94fee56
SDJ
12212017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1222
1223 * configure: Regenerate.
1224
a0ff9e1a
SM
12252017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1226
1227 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1228 software_single_step change of return type to
1229 std::vector<CORE_ADDR>.
1230 * linux-low.c (install_software_single_step_breakpoints):
1231 Likewise.
1232 * linux-low.h (install_software_single_step_breakpoints):
1233 Likewise.
1234
be628ab8
SDJ
12352017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1236
1237 * remote-utils.c: Include "gdb_termios.h" instead of
1238 "terminal.h".
1239 * terminal.h: Delete file.
1240
7c5ded6a
SDJ
12412017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1242
1243 * server.c: Include <vector>.
1244 <program_argv, wrapper_argv>: Convert to std::vector.
1245 (start_inferior): Rewrite function to use C++.
1246 (handle_v_run): Likewise. Update code that calculates the argv
1247 based on the vRun packet; use C++.
1248 (captured_main): Likewise.
1249
436252de
SM
12502017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1251
1252 * server.c (handle_v_cont): Initialize thread_resume::thread
1253 with null_ptid.
1254
9bf2a700
PA
12552017-04-05 Pedro Alves <palves@redhat.com>
1256
1257 * configure: Regenerate.
1258
a121b7c1
PA
12592017-04-05 Pedro Alves <palves@redhat.com>
1260
1261 * gdbreplay.c (sync_error): Constify.
1262 * linux-x86-low.c (push_opcode): Constify.
1263
21c8a587
PA
12642017-04-05 Pedro Alves <palves@redhat.com>
1265
1266 * win32-low.c (get_child_debug_event)
1267 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1268 Report TARGET_WAITKIND_SPURIOUS instead.
1269
fb32b4f7
PA
12702017-04-05 Pedro Alves <palves@redhat.com>
1271
1272 * remote-utils.c (remote_prepare, remote_open): Constify.
1273 * remote-utils.h (remote_prepare, remote_open): Constify.
1274 * server.c (captured_main): Constify 'port' handling.
1275
65dd1e59
SM
12762017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1277
1278 * Makefile.in (clean): Clear .deps.
1279
8fa5b777
SM
12802017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1281
1282 * .gitignore: Remove generated files, replace with wildcard.
1283 * (clean): Replace removal of generated files with wildcard.
1284 (version.c): Replace with...
1285 (version-generated.c): ...this.
1286 (xml-builtin.c): Replace with...
1287 (xml-builtin-generated.c): ...this.
1288 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1289 (%.c: *regformats*): Replace with...
1290 (%-generated.c: *regformats*): ...this.
1291
a12e714b
MF
12922017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1293
1294 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1295 (xtensa_fill_gregset): Call collect_register_by_name for
1296 threadptr register.
1297 (xtensa_store_gregset): Call supply_register_by_name for
1298 threadptr register.
1299
1a09b50a
MF
13002017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1301
1302 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1303 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1304 (xtensa_store_gregset): Call supply_register for all registers in
1305 a0_regnum..a0_regnum + C0_NREGS range.
1306
1a01e7c6
SM
13072017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1308
1309 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1310 (ax-ipa.o: ax.c): Remove.
1311 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1312 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1313 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1314 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1315 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1316
36bc18a8
SM
13172017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1318
1319 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1320 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1321 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1322 (errors-ipa.o: ../common/errors.c): Remove.
1323 (format-ipa.o: ../common/format.c): Remove.
1324 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1325
a8ebe3d5
SM
13262017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1327
1328 * Makefile.in (%-ipa.o: %.c): New rule.
1329 (tracepoint-ipa.o: tracepoint.c): Remove.
1330 (utils-ipa.o: utils.c): Remove.
1331 (remote-utils-ipa.o: remote-utils.c): Remove.
1332 (regcache-ipa.o: regcache.c): Remove.
1333 (i386-linux-ipa.o: i386-linux.c): Remove.
1334 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1335 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1336 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1337 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1338 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1339 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1340 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1341 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1342 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1343 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1344 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1345 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1346 (aarch64-ipa.o: aarch64.c): Remove.
1347 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1348 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1349 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1350 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1351 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1352 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1353 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1354 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1355 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1356 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1357 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1358 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1359 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1360 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1361 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1362 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1363 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1364 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1365 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1366 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1367 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1368 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1369 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1370 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1371 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1372 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1373 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1374 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1375 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1376 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1377 (tdesc-ipa.o: tdesc.c): Remove.
1378 (x32-linux-ipa.o: x32-linux.c): Remove.
1379 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1380 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1381
50cfacb7
SM
13822017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1383
1384 * Makefile.in (%.o: ../arch/%.c): New rule.
1385 (arm.o: ../arch/arm.c): Remove.
1386 (arm-linux.o: ../arch/arm-linux.c): Remove.
1387 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1388 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1389
c5a22423
SM
13902017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1391
1392 * Makefile.in (%.o: ../nat/%.c): New rule.
1393 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1394 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1395 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1396 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1397 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1398 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1399 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1400 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1401 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1402 (linux-personality.o: ../nat/linux-personality.c): Remove.
1403 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1404 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1405 (x86-linux.o: ../nat/x86-linux.c): Remove.
1406 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1407 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1408
6bda016b
SM
14092017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1410
1411 * Makefile.in (%.o: ../common/%.c): New rule.
1412 (signals.o: ../common/signals.c): Remove.
1413 (print-utils.o: ../common/print-utils.c): Remove.
1414 (rsp-low.o: ../common/rsp-low.c): Remove.
1415 (common-utils.o: ../common/common-utils.c): Remove.
1416 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1417 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1418 (vec.o: ../common/vec.c): Remove.
1419 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1420 (xml-utils.o: ../common/xml-utils.c): Remove.
1421 (ptid.o: ../common/ptid.c): Remove.
1422 (buffer.o: ../common/buffer.c): Remove.
1423 (format.o: ../common/format.c): Remove.
1424 (filestuff.o: ../common/filestuff.c): Remove.
1425 (agent.o: ../common/agent.c): Remove.
1426 (errors.o: ../common/errors.c): Remove.
1427 (environ.o: ../common/environ.c): Remove.
1428 (common-debug.o: ../common/common-debug.c): Remove.
1429 (cleanups.o: ../common/cleanups.c): Remove.
1430 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1431 (fileio.o: ../common/fileio.c): Remove.
1432 (common-regcache.o: ../common/common-regcache.c): Remove.
1433 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1434 (new-op.o: ../common/new-op.c): Remove.
1435 (btrace-common.o: ../common/btrace-common.c): Remove.
1436
21122961
SM
14372017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1438
1439 * Makefile.in (%.o: ../target/%.c): New rule.
1440 (waitstatus.o: ../target/waitstatus.c): Remove.
1441
c362e621
SM
14422017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1443
1444 * Makefile.in
1445 (%.c: ../regformats/%.dat,
1446 (%.c: ../regformats/arm/%.dat,
1447 (%.c: ../regformats/i386/%.dat,
1448 (%.c: ../regformats/rs6000/%.dat): New rules.
1449 (aarch64.c): Remove.
1450 (reg-arm.c): Remove.
1451 (arm-with-iwmmxt.c): Remove.
1452 (arm-with-vfpv2.c): Remove.
1453 (arm-with-vfpv3.c): Remove.
1454 (arm-with-neon.c): Remove.
1455 (reg-bfin.c): Remove.
1456 (reg-cris.c): Remove.
1457 (reg-crisv32.c): Remove.
1458 (i386.c): Remove.
1459 (i386-linux.c): Remove.
1460 (i386-avx.c): Remove.
1461 (i386-avx-linux.c): Remove.
1462 (i386-avx-avx512.c): Remove.
1463 (i386-avx-avx512-linux.c): Remove.
1464 (i386-mpx.c): Remove.
1465 (i386-mpx-linux.c): Remove.
1466 (i386-avx-mpx-avx512-pku.c): Remove.
1467 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1468 (i386-avx-mpx.c): Remove.
1469 (i386-avx-mpx-linux.c): Remove.
1470 (i386-mmx.c): Remove.
1471 (i386-mmx-linux.c): Remove.
1472 (reg-ia64.c): Remove.
1473 (reg-m32r.c): Remove.
1474 (reg-m68k.c): Remove.
1475 (reg-cf.c): Remove.
1476 (mips-linux.c): Remove.
1477 (mips-dsp-linux.c): Remove.
1478 (mips64-linux.c): Remove.
1479 (mips64-dsp-linux.c): Remove.
1480 (nios2-linux.c): Remove.
1481 (powerpc-32.c): Remove.
1482 (powerpc-32l.c): Remove.
1483 (powerpc-altivec32l.c): Remove.
1484 (powerpc-cell32l.c): Remove.
1485 (powerpc-vsx32l.c): Remove.
1486 (powerpc-isa205-32l.c): Remove.
1487 (powerpc-isa205-altivec32l.c): Remove.
1488 (powerpc-isa205-vsx32l.c): Remove.
1489 (powerpc-e500l.c): Remove.
1490 (powerpc-64l.c): Remove.
1491 (powerpc-altivec64l.c): Remove.
1492 (powerpc-cell64l.c): Remove.
1493 (powerpc-vsx64l.c): Remove.
1494 (powerpc-isa205-64l.c): Remove.
1495 (powerpc-isa205-altivec64l.c): Remove.
1496 (powerpc-isa205-vsx64l.c): Remove.
1497 (s390-linux32.c): Remove.
1498 (s390-linux32v1.c): Remove.
1499 (s390-linux32v2.c): Remove.
1500 (s390-linux64.c): Remove.
1501 (s390-linux64v1.c): Remove.
1502 (s390-linux64v2.c): Remove.
1503 (s390-te-linux64.c): Remove.
1504 (s390-vx-linux64.c): Remove.
1505 (s390-tevx-linux64.c): Remove.
1506 (s390x-linux64.c): Remove.
1507 (s390x-linux64v1.c): Remove.
1508 (s390x-linux64v2.c): Remove.
1509 (s390x-te-linux64.c): Remove.
1510 (s390x-vx-linux64.c): Remove.
1511 (s390x-tevx-linux64.c): Remove.
1512 (tic6x-c64xp-linux.c): Remove.
1513 (tic6x-c64x-linux.c): Remove.
1514 (tic6x-c62x-linux.c): Remove.
1515 (reg-sh.c): Remove.
1516 (reg-sparc64.c): Remove.
1517 (reg-spu.c): Remove.
1518 (amd64.c): Remove.
1519 (amd64-linux.c): Remove.
1520 (amd64-avx.c): Remove.
1521 (amd64-avx-linux.c): Remove.
1522 (amd64-avx-avx512.c): Remove.
1523 (amd64-avx-avx512-linux.c): Remove.
1524 (amd64-mpx.c): Remove.
1525 (amd64-mpx-linux.c): Remove.
1526 (amd64-avx-mpx-avx512-pku.c): Remove.
1527 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1528 (amd64-avx-mpx.c): Remove.
1529 (amd64-avx-mpx-linux.c): Remove.
1530 (x32.c): Remove.
1531 (x32-linux.c): Remove.
1532 (x32-avx.c): Remove.
1533 (x32-avx-linux.c): Remove.
1534 (x32-avx-avx512.c): Remove.
1535 (x32-avx-avx512-linux.c): Remove.
1536 (reg-xtensa.c): Remove.
1537 (reg-tilegx.c): Remove.
1538 (reg-tilegx32.c): Remove.
1539
1672e0d9
SDJ
15402017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1541
1542 * Makefile.in (SFILES): Add "common/environ.c".
1543 (OBJS): Add "common/environ.h".
1544
239b6d10
WT
15452017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1546
1547 * configure.ac: Check if the fs_base and gs_base members of
1548 `struct user_regs_struct' exist.
1549 * config.in: Regenerated.
1550 * configure: Likewise.
1551
694b382c
AT
15522017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1553
1554 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1555 target_read_memory.
1556 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1557 (get_next_pcs_syscall_next_pc): Likewise.
1558
7dc53023
LM
15592016-12-23 Luis Machado <lgustavo@codesourcery.com>
1560
1561 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1562 * nto-x86-low.c: Likewise.
1563
ad02e4fe
SM
15642016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1565
1566 * Makefile.in: Include disable-implicit-rules.mk.
1567
dcb07cfa
PA
15682016-11-23 Pedro Alves <palves@redhat.com>
1569
1570 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1571 (debug_vprintf): Use std::chrono::steady_clock instead of
1572 gettimeofday. Use '.' instead of ':'.
1573 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1574 (get_timestamp): Use std::chrono::steady_clock instead of
1575 gettimeofday.
1576
8629c02c
SM
15772016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1578
1579 * Makefile.in: Fix whitespace formatting.
1580
b593ecca
SM
15812016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1582
1583 * Makefile.in (SFILES, OBS): Flatten list and order
1584 alphabetically.
1585
9986ba08
PA
15862016-11-23 Pedro Alves <palves@redhat.com>
1587
1588 * event-loop.c (handle_file_event): Use warning.
1589 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1590 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1591 Use warning.
1592
4eefa7bc
PA
15932016-11-23 Pedro Alves <palves@redhat.com>
1594
1595 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1596 output.
1597 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1598 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1599 debug_printf and debug_flush for debug output.
1600 * server.c (handle_general_set): Likewise.
1601 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1602 output.
1603
5443506e
SM
16042016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1605
1606 * Makefile.in (.c.o): Replace rule with ...
1607 (%.o: %.c): ... this one.
1608
3b165252
SM
16092016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1610
1611 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1612 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1613 make.
1614 * configure.ac: Remove checks for the make program.
1615 * configure: Re-generate.
1616
0bcda685
PA
16172016-10-28 Pedro Alves <palves@redhat.com>
1618
1619 * Makefile.in (CXX_DIALECT): Get from configure.
1620 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1621 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1622 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1623 * config.in: Regenerate.
1624 * configure: Regenerate.
1625
c3805894
YQ
16262016-10-27 Yao Qi <yao.qi@linaro.org>
1627
1628 * linux-low.c (linux_supports_range_stepping): Return true if
1629 can_software_single_step return true.
1630
89342618
YQ
16312016-10-27 Yao Qi <yao.qi@linaro.org>
1632
1633 * inferiors.c (find_inferior_in_random): New function.
1634 * inferiors.h (find_inferior_in_random): Declare.
1635 * linux-low.c (linux_wait_for_event_filtered): Call
1636 find_inferior_in_random instead of find_inferior.
1637
e3652c84
YQ
16382016-10-27 Yao Qi <yao.qi@linaro.org>
1639
1640 * linux-low.c (linux_wait_1): If single-step breakpoints are
1641 inserted, remove them.
1642
5a04c4cf
PA
16432016-10-26 Pedro Alves <palves@redhat.com>
1644
1645 * linux-low.c (handle_extended_wait): Link parent/child fork
1646 threads.
1647 (linux_wait_1): Unlink them.
1648 (linux_set_resume_request): Ignore resume requests for
1649 already-resumed and unhandled fork child threads.
1650 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1651 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1652 New functions.
1653 (handle_v_requests) <vCont>: Don't call require_running.
1654 * server.h (in_queued_stop_replies): New declaration.
1655
cb93dc7f
YQ
16562016-10-24 Yao Qi <yao.qi@linaro.org>
1657
1658 PR server/20733
1659 * linux-aarch64-low.c (append_insns): Cast the return value to
1660 'uint32_t *'.
1661
a1078bea
YQ
16622016-10-10 Yao Qi <yao.qi@linaro.org>
1663
1664 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1665
1fb77080
SDJ
16662016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1667
1668 * target.c (target_supports_multi_process): New function, moved
1669 from...
1670 * target.h (target_supports_multi_process): ... here. Remove
1671 macro.
1672
39b5a3b9
TT
16732016-10-05 Tom Tromey <tom@tromey.com>
1674
1675 PR remote/20655:
1676 * tracepoint.c (handle_tracepoint_bkpts): Check
1677 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1678
c1d0b70a
YQ
16792016-10-05 Yao Qi <yao.qi@linaro.org>
1680
1681 * configure.srv: Update the path of arm-*.xml files.
1682
0a69eedb
YQ
16832016-10-05 Terry Guo <terry.guo@arm.com>
1684 Yao Qi <yao.qi@linaro.org>
1685
1686 * Makefile.in: Adjust the path of rules.
1687 * configure.srv: Update the path of xml files.
1688 * regformats/arm-with-iwmmxt.dat: Regenerated.
1689 * regformats/arm-with-neon.dat: Likewise.
1690 * regformats/arm-with-vfpv2.dat: Likewise.
1691 * regformats/arm-with-vfpv3.dat Likewise.
1692
17e16485
YQ
16932016-09-30 Yao Qi <yao.qi@linaro.org>
1694
1695 PR gdbserver/20627
1696 * target.c (target_stop_and_wait): Don't call
1697 target_continue_no_signal, use resume_stop instead.
1698
edeeb602
YQ
16992016-09-26 Yao Qi <yao.qi@linaro.org>
1700
1701 * linux-low.c (linux_wait_1): Call debug_exit.
1702
503b1c39
PA
17032016-09-23 Pedro Alves <palves@redhat.com>
1704
1705 * Makefile.in (SFILES): Add common/new-op.c.
1706 (OBS): Add common/new-op.o.
1707 (new-op.o): New rule.
1708
74172ecf
SM
17092016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1710
1711 * .gitinore: Ignore more files.
1712
fc6cda2e
YQ
17132016-09-21 Yao Qi <yao.qi@linaro.org>
1714
1715 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1716 23.
1717
bc1e6c81
SDJ
17182016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1719
1720 * server.c (start_inferior): Call target_mourn_inferior instead of
1721 mourn_inferior; pass ptid_t argument to it.
1722 (resume): Likewise.
1723 (handle_target_event): Likewise.
1724 * target.c (target_mourn_inferior): New function.
1725 * target.h (mourn_inferior): Delete macro.
1726
0e00e962
AA
17272016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1728
1729 * linux-low.c (lwp_is_stepping): New function.
1730
1d8cb77d
CL
17312016-09-06 Carl Love <cel@us.ibm.com>
1732
1733 * server.c (start_inferior): Fixed comment, requested comment change
1734 didn't get updated correctly. Removed reference to ptrace () call as
1735 it is only true on Linux systems.
1736
7313bced
CL
17372016-09-06 Carl Love <cel@us.ibm.com>
1738
1739 * server.c (start_inferior): Do not call
1740 function target_post_create_inferior () if the
1741 inferior process has already exited.
1742
cf6de44d
PA
17432016-09-05 Pedro Alves <palves@redhat.com>
1744
1745 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1746 (COMPILE.pre, CC_LD): Use CXX directly.
1747 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1748 * acinclude.m4: Don't include build-with-cxx.m4.
1749 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1750 * configure: Regenerate.
1751
c1da6748
AT
17522016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1753
1754 PR gdb/19495
1755 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1756 call writing data to own_buf.
1757
f2b9e3df
SDJ
17582016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1759
1760 * target.c (mywait): Call target_wait instead of
1761 the_target->wait.
1762 (target_wait): New function.
1763
049a8570
SDJ
17642016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1765
1766 * server.c (start_inferior): New variable 'ptid'. Replace calls
1767 to the_target->resume by target_continue{,_no_signal}, depending
1768 on the case.
1769 * target.c (target_stop_and_wait): Call target_continue_no_signal
1770 instead of the_target->resume.
1771 (target_continue): New function.
1772
3aa5cfa0
AT
17732016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1774
1775 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1776
754653a7
AZ
17772016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1778
1779 PR server/20491
1780 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1781 ps_prochandle.
1782 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1783 * linux-arm-low.c (ps_get_thread_area): Likewise.
1784 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1785 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1786 * linux-mips-low.c (ps_get_thread_area): Likewise.
1787 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1788 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1789 * linux-x86-low.c (ps_get_thread_area): Likewise.
1790 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1791
ed036b40
PA
17922016-08-19 Pedro Alves <palves@redhat.com>
1793
1794 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1795
c8ef42ee
PA
17962016-08-19 Pedro Alves <palves@redhat.com>
1797
1798 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1799 comment. Use memcpy instead of casting through unsigned long.
1800
9c235a72
PA
18012016-08-19 Pedro Alves <palves@redhat.com>
1802
1803 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1804 allocating around 0x80000000.
1805
201506da
PA
18062016-08-19 Pedro Alves <palves@redhat.com>
1807
1808 PR gdb/20415
1809 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1810 (x32-avx512-linux-ipa.o): New rules.
1811 * configure.ac (x86_64-*-linux*): New x32 check.
1812 * configure.srv (ipa_x32_linux_regobj): New.
1813 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1814 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1815 descriptions.
1816 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1817 descriptions.
1818 * configure: Regenerate.
1819
f348d89a
PA
18202016-08-09 Pedro Alves <palves@redhat.com>
1821
1822 PR gdb/18653
1823 * Makefile.in (OBS): Add signals-state-save-restore.o.
1824 (signals-state-save-restore.o): New rule.
1825 * config.in: Regenerate.
1826 * configure: Regenerate.
1827 * linux-low.c: Include "signals-state-save-restore.h".
1828 (linux_create_inferior): Call
1829 restore_original_signals_state.
1830 * server.c: Include "dispositions-save-restore.h".
1831 (captured_main): Call save_original_signals_state.
1832
1baf5149
PA
18332016-08-05 Pedro Alves <palves@redhat.com>
1834
1835 * configure: Regenerate.
1836
fcd4a73d
YQ
18372016-08-04 Yao Qi <yao.qi@linaro.org>
1838
1839 * linux-low.c (regsets_fetch_inferior_registers): Check
1840 errno is ESRCH or not.
1841
979659d0
YQ
18422016-08-02 Yao Qi <yao.qi@linaro.org>
1843
1844 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1845 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1846 (thread_db_load_search): Update.
1847 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1848 td_ta_set_event and td_ta_event_getmsg.
1849
6598661d
PA
18502016-07-26 Pedro Alves <palves@redhat.com>
1851
1852 PR server/20414
1853 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1854 of unsigned long for 64-bit registers and use uint32_t instead of
1855 unsigned int for 32-bit registers.
1856
9cf12d57
PA
18572016-07-26 Pedro Alves <palves@redhat.com>
1858
1859 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1860 to 'ptrace'.
1861
305450ed
TT
18622016-07-21 Tom Tromey <tom@tromey.com>
1863
1864 * configure: Rebuild.
1865
2583da7c
YQ
18662016-07-21 Yao Qi <yao.qi@linaro.org>
1867
1868 * mem-break.c (find_gdb_breakpoint): Cast bp to
1869 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1870
21536b36
YQ
18712016-07-21 Yao Qi <yao.qi@linaro.org>
1872
1873 * server.c (handle_v_requests): Support s and S actions
1874 if target_supports_software_single_step return true.
1875
8901d193
YQ
18762016-07-21 Yao Qi <yao.qi@linaro.org>
1877
1878 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1879 is resume_step, call maybe_hw_step.
1880 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1881 and unstop them.
1882 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1883 breakpoints or not.
1884 (proceed_one_lwp): If resume request is resume_step, install
1885 reinsert breakpoints and call maybe_hw_step.
1886
0e9a339e
YQ
18872016-07-21 Yao Qi <yao.qi@linaro.org>
1888
1889 * linux-low.c (proceed_one_lwp): Declare.
1890 (linux_resume_one_thread): Remove local variable 'step'.
1891 Lift code enqueue signal. Call proceed_one_lwp instead of
1892 linux_resume_one_lwp.
1893
4281b351
YQ
18942016-07-21 Yao Qi <yao.qi@linaro.org>
1895
1896 * linux-low.c (linux_resume_one_thread): Call
1897 enqueue_pending_signal.
1898
984a2c04
YQ
18992016-07-21 Yao Qi <yao.qi@linaro.org>
1900
1901 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1902 * inferiors.c (do_restore_current_thread_cleanup): New function.
1903 (make_cleanup_restore_current_thread): Likewise.
1904 * linux-low.c (install_software_single_step_breakpoints): Call
1905 make_cleanup_restore_current_thread. Switch current_thread to
1906 thread.
1907
bec903c9
YQ
19082016-07-21 Yao Qi <yao.qi@linaro.org>
1909
1910 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1911 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1912 (clone_one_breakpoint): Likewise.
1913 (delete_reinsert_breakpoints): Change parameter to thread.
1914 Callers updated.
1915 (has_reinsert_breakpoints): Likewise.
1916 (uninsert_reinsert_breakpoints): Likewise.
1917 (reinsert_reinsert_breakpoints): Likewise.
1918 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1919 (delete_reinsert_breakpoints): Likewise.
1920 (reinsert_reinsert_breakpoints): Likewise.
1921 (uninsert_reinsert_breakpoints): Likewise.
1922 (has_reinsert_breakpoints): Likewise.
1923
63c40ec7
YQ
19242016-07-21 Yao Qi <yao.qi@linaro.org>
1925
1926 * inferiors.c (get_thread_process): Make parameter const.
1927 * inferiors.h (get_thread_process): Update declaration.
1928 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1929 Add new parameters child_thread and parent_thread. Callers
1930 updated.
1931 * mem-break.h (clone_all_breakpoints): Update declaration.
1932
9aa76cd0
YQ
19332016-07-21 Yao Qi <yao.qi@linaro.org>
1934
1935 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1936 <command_list, handler>: Remove.
1937 (struct gdb_breakpoint): New.
1938 (struct other_breakpoint): New.
1939 (struct reinsert_breakpoint): New.
1940 (is_gdb_breakpoint): New function.
1941 (any_persistent_commands): Update command_list if
1942 is_gdb_breakpoint returns true.
1943 (set_breakpoint): Create breakpoints according to their types.
1944 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1945 (set_gdb_breakpoint_1): Likewise.
1946 (set_gdb_breakpoint): Likewise.
1947 (clear_breakpoint_conditions): Change parameter type to
1948 'struct gdb_breakpoint *'.
1949 (clear_breakpoint_commands): Likewise.
1950 (clear_breakpoint_conditions_and_commands): Likewise.
1951 (add_condition_to_breakpoint): Likewise.
1952 (add_breakpoint_condition): Likewise.
1953 (add_commands_to_breakpoint): Likewise.
1954 (check_breakpoints): Check other_breakpoint.
1955 (clone_one_breakpoint): Clone breakpopint according to its type.
1956 * mem-break.h (struct gdb_breakpoint): Declare.
1957 (set_gdb_breakpoint): Update declaration.
1958 (clear_breakpoint_conditions_and_commands): Likewise.
1959 (add_breakpoint_condition): Likewise.
1960 (add_breakpoint_commands): Likewise.
1961 * server.c (process_point_options): Change parameter type to
1962 'struct gdb_breakpoint *'.
1963
811f8301
YQ
19642016-07-21 Yao Qi <yao.qi@linaro.org>
1965
1966 * mem-break.c (set_breakpoint_at): Rename it to ...
1967 (set_breakpoint_type_at): ... it.
1968 (set_breakpoint_at): Call set_breakpoint_type_at.
1969 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1970 * mem-break.h (set_breakpoint_at): Update comments.
1971
b1c51e36
CLT
19722016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1973
1974 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1975 to buf parameter.
1976 (nios2_store_gregset): Likewise.
1977
ced2dffb
PA
19782016-07-01 Pedro Alves <palves@redhat.com>
1979 Antoine Tremblay <antoine.tremblay@ericsson.com>
1980
1981 * linux-low.c: Change interface to take the target lwp_info
1982 pointer directly and return void. Handle detaching from a zombie
1983 thread.
1984 (linux_detach_lwp_callback): New function.
1985 (linux_detach): Detach from the leader thread after detaching from
1986 the clone threads.
1987
2ac09a5b
YQ
19882016-06-28 Yao Qi <yao.qi@linaro.org>
1989
1990 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1991 for variable new_offset.
1992 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1993 (aarch64_ftrace_insn_reloc_cb): Likewise.
1994 (aarch64_ftrace_insn_reloc_tb): Likewise.
1995 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1996 PRIx64 instead of PRIx32.
1997
79e7fd4f
YQ
19982016-06-28 Yao Qi <yao.qi@linaro.org>
1999
2000 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2001 (the_low_target): Install arm_get_syscall_trapinfo.
2002
061fc021
YQ
20032016-06-28 Yao Qi <yao.qi@linaro.org>
2004
2005 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2006 function.
2007 (the_low_target): Install aarch64_get_syscall_trapinfo.
2008
4cc32bec
YQ
20092016-06-28 Yao Qi <yao.qi@linaro.org>
2010
2011 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2012 Callers updated.
2013 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2014 Remove parameter sysno.
2015 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2016 sysret.
2017
782c1122
AA
20182016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2019
2020 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2021 (s390_emit_ne_goto): Likewise.
2022 (s390_emit_lt_goto): Likewise.
2023 (s390_emit_le_goto): Likewise.
2024 (s390_emit_gt_goto): Likewise.
2025 (s390_emit_ge_goto): Likewise.
2026 (s390x_emit_eq_goto): Likewise.
2027 (s390x_emit_ne_goto): Likewise.
2028 (s390x_emit_lt_goto): Likewise.
2029 (s390x_emit_le_goto): Likewise.
2030 (s390x_emit_gt_goto): Likewise.
2031 (s390x_emit_ge_goto): Likewise.
2032 (s390_emit_ops_impl): Mark variable static.
2033 (s390x_emit_ops): Likewise.
2034
2e7b624b
YQ
20352016-06-17 Yao Qi <yao.qi@linaro.org>
2036
2037 * linux-low.c (handle_extended_wait): Call
2038 uninsert_reinsert_breakpoints for the parent process. Remove
2039 reinsert breakpoints from the child process. Reinsert them to
2040 the parent process when vfork is done.
2041 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2042 (reinsert_reinsert_breakpoints): New function.
2043 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2044 (reinsert_reinsert_breakpoints): Declare.
2045
8a81c5d7
YQ
20462016-06-17 Yao Qi <yao.qi@linaro.org>
2047
2048 * linux-low.c (handle_extended_wait): If the parent is doing
2049 step-over, remove the reinsert breakpoints from the forked child.
2050
f50bf8e5
YQ
20512016-06-17 Yao Qi <yao.qi@linaro.org>
2052
2053 * linux-low.c (unsuspend_all_lwps): Declare.
2054 (linux_low_filter_event): If thread exited, call finish_step_over.
2055 If step-over is finished, unsuspend other threads.
2056
8376a3cb
YQ
20572016-06-17 Yao Qi <yao.qi@linaro.org>
2058
2059 * linux-low.c (linux_resume_one_lwp_throw): Assert
2060 has_reinsert_breakpoints returns false.
2061 * mem-break.c (delete_disabled_breakpoints): Assert
2062 bp type isn't reinsert_breakpoint.
2063
f79b145d
YQ
20642016-06-17 Yao Qi <yao.qi@linaro.org>
2065
2066 * linux-low.c (maybe_hw_step): New function.
2067 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2068 (finish_step_over): Switch current_thread to lwp temporarily,
2069 and assert has_reinsert_breakpoints returns true.
2070 (proceed_one_lwp): Call maybe_hw_step.
2071 * mem-break.c (has_reinsert_breakpoints): New function.
2072 * mem-break.h (has_reinsert_breakpoints): Declare.
2073
0ae534d2
JT
20742016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2075
2076 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2077
fcdad592
YQ
20782016-05-17 Yao Qi <yao.qi@linaro.org>
2079
2080 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2081 instead of find_inferior.
2082
9e784964
YQ
20832016-05-05 Yao Qi <yao.qi@linaro.org>
2084
2085 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2086 Initialize res to zero.
2087
cf2ebb6e
YQ
20882016-05-05 Yao Qi <yao.qi@linaro.org>
2089
2090 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2091 to uint32_t.
2092
c1aebf87
UW
20932016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2094
2095 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2096 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2097 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2098
35fd2deb 20992016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2100 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2101
2102 * tracepoint.c (write_inferior_int8): New function.
2103 (cmd_qtenable_disable): Write enable flag using
2104 write_inferior_int8.
2105
484b3c32
YQ
21062016-04-25 Yao Qi <yao.qi@linaro.org>
2107
2108 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2109 (need_step_over_p): Return zero if the LWP has pending signals
2110 can be delivered on software single step target.
2111
85ba7d86
YQ
21122016-04-25 Yao Qi <yao.qi@linaro.org>
2113
2114 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2115 return instead of error.
2116
3539aa13
YQ
21172016-04-22 Yao Qi <yao.qi@linaro.org>
2118
2119 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2120 to 23.
2121
5b061e98
YQ
21222016-04-22 Yao Qi <yao.qi@linaro.org>
2123
2124 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2125 signal when stepping over breakpoint with software single
2126 step.
2127
3451269c
PA
21282016-04-21 Pedro Alves <palves@redhat.com>
2129
2130 * linux-s390-low.c (s390_collect_ptrace_register)
2131 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2132 add casts.
2133 (s390_check_regset): Use void * instead of gdb_byte *.
2134
a2358508
PA
21352016-04-20 Pedro Alves <palves@redhat.com>
2136
2137 * configure: Renegerate.
2138
6885166d
YQ
21392016-04-20 Yao Qi <yao.qi@linaro.org>
2140
2141 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2142 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2143 number 16.
2144 (arm_store_gregset): Likewise.
2145
2b863f51
WT
21462016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2147
2148 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2149 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2150 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2151 (amd64-avx-mpx-linux.c): New rules.
2152 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2153 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2154 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2155 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2156 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2157 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2158 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2159 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2160 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2161 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2162 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2163 * linux-x86-low.c (x86_linux_read_description): Add case for
2164 X86_XSTATE_AVX_MPX_MASK.
2165 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2166 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2167 init_registers_i386_avx_mpx_linux.
2168 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2169 (initialize_low_tracepoint): Call
2170 init_registers_i386_avx_mpx_linux.
2171 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2172 (initialize_low_tracepoint): Call
2173 init_registers_amd64_avx_mpx_linux.
2174 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2175 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2176 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2177 declarations.
2178
9b30624b
PA
21792016-04-18 Pedro Alves <palves@redhat.com>
2180
2181 * configure: Regenerate.
2182
45e3745e
AT
21832016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2184
2185 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2186 (aarch64_emit_sub): Likewise.
2187
2afc13ff
PA
21882016-04-12 Pedro Alves <palves@redhat.com>
2189
2190 * utils.c (prepare_to_throw_exception): Delete.
2191
6e774b13
SM
21922016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2193
2194 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2195
4dca19f8
MK
21962016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2197
2198 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2199
d0a9981f
MK
22002016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2201
2202 * linux-aarch64-ipa.c: Add <elf.h> include.
2203 * linux-ppc-ipa.c: Add <elf.h> include.
2204 * linux-s390-ipa.c: Add <elf.h> include.
2205
252db07e
MK
22062016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2207
2208 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2209 (get_raw_reg_ptr): Likewise.
2210 (get_trace_state_variable_value_ptr): Likewise.
2211 (set_trace_state_variable_value_ptr): Likewise.
2212 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2213 char *.
2214
14e2b6d9
MK
22152016-03-31 Wei-cheng Wang <cole945@gmail.com>
2216 Marcin Kościelnicki <koriakin@0x04.net>
2217
2218 PR/17221
2219 * linux-ppc-low.c (emit_insns): New function.
2220 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2221 (ppc_emit_prologue): New function.
2222 (ppc_emit_epilogue): New function.
2223 (ppc_emit_add): New function.
2224 (ppc_emit_sub): New function.
2225 (ppc_emit_mul): New function.
2226 (ppc_emit_lsh): New function.
2227 (ppc_emit_rsh_signed): New function.
2228 (ppc_emit_rsh_unsigned): New function.
2229 (ppc_emit_ext): New function.
2230 (ppc_emit_zero_ext): New function.
2231 (ppc_emit_log_not): New function.
2232 (ppc_emit_bit_and): New function.
2233 (ppc_emit_bit_or): New function.
2234 (ppc_emit_bit_xor): New function.
2235 (ppc_emit_bit_not): New function.
2236 (ppc_emit_equal): New function.
2237 (ppc_emit_less_signed): New function.
2238 (ppc_emit_less_unsigned): New function.
2239 (ppc_emit_ref): New function.
2240 (ppc_emit_const): New function.
2241 (ppc_emit_reg): New function.
2242 (ppc_emit_pop): New function.
2243 (ppc_emit_stack_flush): New function.
2244 (ppc_emit_swap): New function.
2245 (ppc_emit_stack_adjust): New function.
2246 (ppc_emit_call): New function.
2247 (ppc_emit_int_call_1): New function.
2248 (ppc_emit_void_call_2): New function.
2249 (ppc_emit_if_goto): New function.
2250 (ppc_emit_goto): New function.
2251 (ppc_emit_eq_goto): New function.
2252 (ppc_emit_ne_goto): New function.
2253 (ppc_emit_lt_goto): New function.
2254 (ppc_emit_le_goto): New function.
2255 (ppc_emit_gt_goto): New function.
2256 (ppc_emit_ge_goto): New function.
2257 (ppc_write_goto_address): New function.
2258 (ppc_emit_ops_impl): New static variable.
2259 (ppc64v1_emit_prologue): New function.
2260 (ppc64v2_emit_prologue): New function.
2261 (ppc64_emit_epilogue): New function.
2262 (ppc64_emit_add): New function.
2263 (ppc64_emit_sub): New function.
2264 (ppc64_emit_mul): New function.
2265 (ppc64_emit_lsh): New function.
2266 (ppc64_emit_rsh_signed): New function.
2267 (ppc64_emit_rsh_unsigned): New function.
2268 (ppc64_emit_ext): New function.
2269 (ppc64_emit_zero_ext): New function.
2270 (ppc64_emit_log_not): New function.
2271 (ppc64_emit_bit_and): New function.
2272 (ppc64_emit_bit_or): New function.
2273 (ppc64_emit_bit_xor): New function.
2274 (ppc64_emit_bit_not): New function.
2275 (ppc64_emit_equal): New function.
2276 (ppc64_emit_less_signed): New function.
2277 (ppc64_emit_less_unsigned): New function.
2278 (ppc64_emit_ref): New function.
2279 (ppc64_emit_const): New function.
2280 (ppc64v1_emit_reg): New function.
2281 (ppc64v2_emit_reg): New function.
2282 (ppc64_emit_pop): New function.
2283 (ppc64_emit_stack_flush): New function.
2284 (ppc64_emit_swap): New function.
2285 (ppc64v1_emit_call): New function.
2286 (ppc64v2_emit_call): New function.
2287 (ppc64v1_emit_int_call_1): New function.
2288 (ppc64v2_emit_int_call_1): New function.
2289 (ppc64v1_emit_void_call_2): New function.
2290 (ppc64v2_emit_void_call_2): New function.
2291 (ppc64_emit_if_goto): New function.
2292 (ppc64_emit_eq_goto): New function.
2293 (ppc64_emit_ne_goto): New function.
2294 (ppc64_emit_lt_goto): New function.
2295 (ppc64_emit_le_goto): New function.
2296 (ppc64_emit_gt_goto): New function.
2297 (ppc64_emit_ge_goto): New function.
2298 (ppc64v1_emit_ops_impl): New static variable.
2299 (ppc64v2_emit_ops_impl): New static variable.
2300 (ppc_emit_ops): New function.
2301 (linux_low_target): Wire in ppc_emit_ops.
2302
a2174ba4
MK
23032016-03-31 Wei-cheng Wang <cole945@gmail.com>
2304 Marcin Kościelnicki <koriakin@0x04.net>
2305
2306 PR/17221
2307 * Makefile.in: Add powerpc-*-ipa.o
2308 * configure.srv: Add ipa_obj for powerpc*-linux.
2309 * linux-ppc-ipa.c: New file.
2310 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2311 includes.
2312 (PPC_FIELD): New macro.
2313 (PPC_SEXT): New macro.
2314 (PPC_OP6): New macro.
2315 (PPC_BO): New macro.
2316 (PPC_LI): New macro.
2317 (PPC_BD): New macro.
2318 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2319 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2320 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2321 (ppc_get_thread_area): New function.
2322 (is_elfv2_inferior): New function.
2323 (gen_ds_form): New function.
2324 (GEN_STD): New macro.
2325 (GEN_STDU): New macro.
2326 (GEN_LD): New macro.
2327 (GEN_LDU): New macro.
2328 (gen_d_form): New function.
2329 (GEN_ADDI): New macro.
2330 (GEN_ADDIS): New macro.
2331 (GEN_LI): New macro.
2332 (GEN_LIS): New macro.
2333 (GEN_ORI): New macro.
2334 (GEN_ORIS): New macro.
2335 (GEN_LWZ): New macro.
2336 (GEN_STW): New macro.
2337 (GEN_STWU): New macro.
2338 (gen_xfx_form): New function.
2339 (GEN_MFSPR): New macro.
2340 (GEN_MTSPR): New macro.
2341 (GEN_MFCR): New macro.
2342 (GEN_MTCR): New macro.
2343 (GEN_SYNC): New macro.
2344 (GEN_LWSYNC): New macro.
2345 (gen_x_form): New function.
2346 (GEN_OR): New macro.
2347 (GEN_MR): New macro.
2348 (GEN_LWARX): New macro.
2349 (GEN_STWCX): New macro.
2350 (GEN_CMPW): New macro.
2351 (gen_md_form): New function.
2352 (GEN_RLDICL): New macro.
2353 (GEN_RLDICR): New macro.
2354 (gen_i_form): New function.
2355 (GEN_B): New macro.
2356 (GEN_BL): New macro.
2357 (gen_b_form): New function.
2358 (GEN_BNE): New macro.
2359 (GEN_LOAD): New macro.
2360 (GEN_STORE): New macro.
2361 (gen_limm): New function.
2362 (gen_atomic_xchg): New function.
2363 (gen_call): New function.
2364 (ppc_relocate_instruction): New function.
2365 (ppc_install_fast_tracepoint_jump_pad): New function.
2366 (ppc_get_min_fast_tracepoint_insn_len): New function.
2367 (ppc_get_ipa_tdesc_idx): New function.
2368 (the_low_target): Wire in the new functions.
2369 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2370 tdescs.
2371 * linux-ppc-tdesc.h: New file.
2372
a13c4696
MK
23732016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2374
2375 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2376 (alloc_jump_pad_buffer): New function.
2377 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2378 (alloc_jump_pad_buffer): New function.
2379 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2380 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2381 (alloc_jump_pad_buffer): New function.
2382 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2383 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2384 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2385 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2386
1cda1512
MK
23872016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2388
2389 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2390 * linux-amd64-ipa.c: Likewise.
2391 * linux-i386-ipa.c: Likewise.
2392 * linux-s390-ipa.c: Likewise.
2393 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2394 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2395 set_trace_state_variable_value_ptr.
2396 (struct ipa_sym_addresses): Likewise.
2397 (symbol_list): Likewise.
2398 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2399 accessing gdb_collect directly.
2400 (gdb_collect_ptr_type): New typedef.
2401 (get_raw_reg_ptr_type): New typedef.
2402 (get_trace_state_variable_value_ptr_type): New typedef.
2403 (set_trace_state_variable_value_ptr_type): New typedef.
2404 (gdb_collect_ptr): New global.
2405 (get_raw_reg_ptr): New global.
2406 (get_trace_state_variable_value_ptr): New global.
2407 (set_trace_state_variable_value_ptr): New global.
2408 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2409 accessing get_raw_reg directly.
2410 (get_get_tsv_func_addr): Likewise for
2411 get_trace_state_variable_value_ptr.
2412 (get_set_tsv_func_addr): Likewise for
2413 set_trace_state_variable_value_ptr.
2414 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2415
72fb5488
SM
24162016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2417
2418 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2419
28170b88
MK
24202016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2421
2422 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2423 packets.
2424 (relocate_instruction): Remove own_buf.
2425 * server.c (own_buf): Make global.
2426 (handle_v_requests): Make global.
2427 * server.h (own_buf): New declaration.
2428 (handle_v_requests): New prototype.
2429
f39e8743
MK
24302016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2431
2432 PR 18377
2433 * linux-s390-low.c (add_insns): New function.
2434 (s390_emit_prologue): New function.
2435 (s390_emit_epilogue): New function.
2436 (s390_emit_add): New function.
2437 (s390_emit_sub): New function.
2438 (s390_emit_mul): New function.
2439 (s390_emit_lsh): New function.
2440 (s390_emit_rsh_signed): New function.
2441 (s390_emit_rsh_unsigned): New function.
2442 (s390_emit_ext): New function.
2443 (s390_emit_log_not): New function.
2444 (s390_emit_bit_and): New function.
2445 (s390_emit_bit_or): New function.
2446 (s390_emit_bit_xor): New function.
2447 (s390_emit_bit_not): New function.
2448 (s390_emit_equal): New function.
2449 (s390_emit_less_signed): New function.
2450 (s390_emit_less_unsigned): New function.
2451 (s390_emit_ref): New function.
2452 (s390_emit_if_goto): New function.
2453 (s390_emit_goto): New function.
2454 (s390_write_goto_address): New function.
2455 (s390_emit_litpool): New function.
2456 (s390_emit_const): New function.
2457 (s390_emit_call): New function.
2458 (s390_emit_reg): New function.
2459 (s390_emit_pop): New function.
2460 (s390_emit_stack_flush): New function.
2461 (s390_emit_zero_ext): New function.
2462 (s390_emit_swap): New function.
2463 (s390_emit_stack_adjust): New function.
2464 (s390_emit_set_r2): New function.
2465 (s390_emit_int_call_1): New function.
2466 (s390_emit_void_call_2): New function.
2467 (s390_emit_eq_goto): New function.
2468 (s390_emit_ne_goto): New function.
2469 (s390_emit_lt_goto): New function.
2470 (s390_emit_le_goto): New function.
2471 (s390_emit_gt_goto): New function.
2472 (s390_emit_ge_goto): New function.
2473 (s390x_emit_prologue): New function.
2474 (s390x_emit_epilogue): New function.
2475 (s390x_emit_add): New function.
2476 (s390x_emit_sub): New function.
2477 (s390x_emit_mul): New function.
2478 (s390x_emit_lsh): New function.
2479 (s390x_emit_rsh_signed): New function.
2480 (s390x_emit_rsh_unsigned): New function.
2481 (s390x_emit_ext): New function.
2482 (s390x_emit_log_not): New function.
2483 (s390x_emit_bit_and): New function.
2484 (s390x_emit_bit_or): New function.
2485 (s390x_emit_bit_xor): New function.
2486 (s390x_emit_bit_not): New function.
2487 (s390x_emit_equal): New function.
2488 (s390x_emit_less_signed): New function.
2489 (s390x_emit_less_unsigned): New function.
2490 (s390x_emit_ref): New function.
2491 (s390x_emit_if_goto): New function.
2492 (s390x_emit_const): New function.
2493 (s390x_emit_call): New function.
2494 (s390x_emit_reg): New function.
2495 (s390x_emit_pop): New function.
2496 (s390x_emit_stack_flush): New function.
2497 (s390x_emit_zero_ext): New function.
2498 (s390x_emit_swap): New function.
2499 (s390x_emit_stack_adjust): New function.
2500 (s390x_emit_int_call_1): New function.
2501 (s390x_emit_void_call_2): New function.
2502 (s390x_emit_eq_goto): New function.
2503 (s390x_emit_ne_goto): New function.
2504 (s390x_emit_lt_goto): New function.
2505 (s390x_emit_le_goto): New function.
2506 (s390x_emit_gt_goto): New function.
2507 (s390x_emit_ge_goto): New function.
2508 (s390_emit_ops): New function.
2509 (struct linux_target_ops): Fill in emit_ops hook.
2510
abd9baf9
MK
25112016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2512
2513 PR 18377
2514 * Makefile.in: Add s390 IPA files.
2515 * configure.srv: Build IPA for s390.
2516 * linux-s390-ipa.c: New file.
2517 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2518 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2519 (tdesc_s390_linux32): Likewise.
2520 (init_registers_s390_linux32v1): Likewise.
2521 (tdesc_s390_linux32v1): Likewise.
2522 (init_registers_s390_linux32v2): Likewise.
2523 (tdesc_s390_linux32v2): Likewise.
2524 (init_registers_s390_linux64): Likewise.
2525 (tdesc_s390_linux64): Likewise.
2526 (init_registers_s390_linux64v1): Likewise.
2527 (tdesc_s390_linux64v1): Likewise.
2528 (init_registers_s390_linux64v2): Likewise.
2529 (tdesc_s390_linux64v2): Likewise.
2530 (init_registers_s390_te_linux64): Likewise.
2531 (tdesc_s390_te_linux64): Likewise.
2532 (init_registers_s390_vx_linux64): Likewise.
2533 (tdesc_s390_vx_linux64): Likewise.
2534 (init_registers_s390_tevx_linux64): Likewise.
2535 (tdesc_s390_tevx_linux64): Likewise.
2536 (init_registers_s390x_linux64): Likewise.
2537 (tdesc_s390x_linux64): Likewise.
2538 (init_registers_s390x_linux64v1): Likewise.
2539 (tdesc_s390x_linux64v1): Likewise.
2540 (init_registers_s390x_linux64v2): Likewise.
2541 (tdesc_s390x_linux64v2): Likewise.
2542 (init_registers_s390x_te_linux64): Likewise.
2543 (tdesc_s390x_te_linux64): Likewise.
2544 (init_registers_s390x_vx_linux64): Likewise.
2545 (tdesc_s390x_vx_linux64): Likewise.
2546 (init_registers_s390x_tevx_linux64): Likewise.
2547 (tdesc_s390x_tevx_linux64): Likewise.
2548 (have_hwcap_s390_vx): New static variable.
2549 (s390_arch_setup): Fill have_hwcap_s390_vx.
2550 (s390_get_thread_area): New function.
2551 (s390_ft_entry_gpr_esa): New const.
2552 (s390_ft_entry_gpr_zarch): New const.
2553 (s390_ft_entry_misc): New const.
2554 (s390_ft_entry_fr): New const.
2555 (s390_ft_entry_vr): New const.
2556 (s390_ft_main_31): New const.
2557 (s390_ft_main_64): New const.
2558 (s390_ft_exit_fr): New const.
2559 (s390_ft_exit_vr): New const.
2560 (s390_ft_exit_misc): New const.
2561 (s390_ft_exit_gpr_esa): New const.
2562 (s390_ft_exit_gpr_zarch): New const.
2563 (append_insns): New function.
2564 (s390_relocate_instruction): New function.
2565 (s390_install_fast_tracepoint_jump_pad): New function.
2566 (s390_get_min_fast_tracepoint_insn_len): New function.
2567 (s390_get_ipa_tdesc_idx): New function.
2568 (struct linux_target_ops): Wire in the above functions.
2569 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2570 * linux-s390-tdesc.h: New file.
2571
a4105d04
MK
25722016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2573
2574 * linux-s390-low.c (s390_supports_tracepoints): New function.
2575 (struct linux_target_ops): Fill supports_tracepoints hook.
2576
35ac8b3e
YQ
25772016-03-18 Yao Qi <yao.qi@linaro.org>
2578
2579 * linux-low.c (lwp_signal_can_be_delivered): New function.
2580 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2581
94610ec4
YQ
25822016-03-18 Yao Qi <yao.qi@linaro.org>
2583
2584 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2585 0 if signal is enqueued. Remove 'signal' from one debugging
2586 message. Move one debugging message to some lines below.
2587 Remove code setting 'signal' to 0.
2588
80aea927
YQ
25892016-03-18 Yao Qi <yao.qi@linaro.org>
2590
2591 * linux-low.c (linux_low_filter_event): Remove redundant
2592 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2593
b04fd3be
MK
25942016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2595
2596 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2597 (struct linux_target_ops): Wire in the above.
2598
c40c8d4b
YQ
25992016-03-03 Yao Qi <yao.qi@linaro.org>
2600
2601 * linux-low.c: Update comments to start_step_over.
2602
0f8288ae
YQ
26032016-03-03 Yao Qi <yao.qi@linaro.org>
2604
2605 PR server/19736
2606 * linux-low.c (handle_extended_wait): Set child suspended
2607 if event_lwp->bp_reinsert isn't zero.
2608
fdbd04a8
YQ
26092016-03-02 Yao Qi <yao.qi@linaro.org>
2610
2611 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2612 enqueue_pending_signal.
2613
6896a8fa
MK
26142016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2615
2616 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2617 is actually loaded.
2618
ab503087
MK
26192016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2620
2621 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2622 (s390_regmap_3264) [!__s390x__]: New global.
2623 (s390_collect_ptrace_register): Skip map entries containing -1.
2624 (s390_supply_ptrace_register): Ditto.
2625 (s390_fill_gprs_high): New function.
2626 (s390_store_gprs_high): New function.
2627 (s390_regsets): Add NT_S390_HIGH_GPRS.
2628 (s390_get_hwcap): Enable on 31-bit.
2629 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2630 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2631 Detect NT_S390_HIGH_GPRS.
2632 (s390_usrregs_info_3264): Enable on 31-bit.
2633 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2634 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2635
ae91f625
MK
26362016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2637
2638 PR gdb/13808
2639 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2640 * configure.srv: Ditto.
2641 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2642 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2643 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2644 (init_registers_amd64_linux): Remove prototype.
2645 (tdesc_amd64_linux): Remove declaration.
2646 (get_ipa_tdesc): New function.
2647 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2648 initialize remaining tdescs.
2649 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2650 (init_registers_i386_linux): Remove prototype.
2651 (tdesc_i386_linux): Remove declaration.
2652 (get_ipa_tdesc): New function.
2653 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2654 initialize remaining tdescs.
2655 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2656 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2657 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2658 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2659 (x86_get_ipa_tdesc_idx): New function.
2660 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2661 * linux-x86-tdesc.h: New file.
2662 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2663 (target_get_ipa_tdesc_idx): New macro.
2664 * tracepoint.c (ipa_tdesc_idx): New macro.
2665 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2666 (symbol_list): Add ipa_tdesc_idx.
2667 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2668 (ipa_tdesc): Remove.
2669 (ipa_tdesc_idx): New variable.
2670 (get_context_regcache): Use get_ipa_tdesc.
2671 (gdb_collect): Ditto.
2672 (gdb_probe): Ditto.
2673 * tracepoint.h (get_ipa_tdesc): New prototype.
2674 (ipa_tdesc): Remove.
2675
e7ad2f14
PA
26762016-02-24 Pedro Alves <palves@redhat.com>
2677
2678 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2679 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2680 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2681 Factor out common code between the USE_SIGTRAP_SIGINFO and
2682 !USE_SIGTRAP_SIGINFO blocks.
2683 (linux_low_filter_event): Call save_stop_reason instead of
2684 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2685 Update comments.
2686 (linux_wait_1): Update comments.
2687
657f9cde
WW
26882016-02-24 Wei-cheng Wang <cole945@gmail.com>
2689
2690 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2691 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2692 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2693 ppc_insert_point, ppc_remove_point.
2694
b00b61e1
MK
26952016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2696
2697 * linux-s390-low.c (s390_supports_z_point_type): New function.
2698 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2699
553cb527
YQ
27002016-02-16 Yao Qi <yao.qi@linaro.org>
2701
2702 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2703 PC. Get pc from regcache_read_pc.
2704
a5652c21
YQ
27052016-02-12 Yao Qi <yao.qi@linaro.org>
2706
2707 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2708 or linux_get_pc_32bit.
2709 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2710
ed443b61
YQ
27112016-02-12 Yao Qi <yao.qi@linaro.org>
2712
2713 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2714 arm_linux_get_next_pcs_fixup.
2715
020ecd38
MK
27162016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2717
2718 * tracepoint.c (x_tracepoint_action_download): Change
2719 write_inferior_data_ptr to write_inferior_data_pointer.
2720 (cmd_qtstart): Likewise.
2721 (write_inferior_data_ptr): Remove.
2722 (download_agent_expr): Change write_inferior_data_ptr to
2723 write_inferior_data_pointer.
2724 (download_tracepoint_1): Likewise.
2725 (download_tracepoint): Likewise.
2726 (download_trace_state_variables): Likewise.
2727
7cae9051
WW
27282016-02-11 Wei-cheng Wang <cole945@gmail.com>
2729 Marcin Kościelnicki <koriakin@0x04.net>
2730
2731 * tracepoint.c (struct tracepoint_action_ops): Remove.
2732 (struct tracepoint_action): Remove ops.
2733 (m_tracepoint_action_download, r_tracepoint_action_download)
2734 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2735 size and offset accordingly.
2736 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2737 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2738 (tracepoint_action_send, tracepoint_action_download): New functions.
2739 Helpers for trace action handlers.
2740 (add_tracepoint_action): Remove setup actions ops.
2741 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2742
9f6a71b4
YQ
27432016-02-10 Yao Qi <yao.qi@linaro.org>
2744
2745 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2746
1e94266c
SM
27472016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2748
2749 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2750 to AC_OUTPUT.
2751 * configure: Regenerate.
2752
8adce034
SM
27532016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2754
2755 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2756 void * to gdb_byte *.
2757 * linux-low.c (siginfo_fixup): Likewise.
2758 (linux_xfer_siginfo): Likewise.
2759 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2760 Likewise.
2761 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2762
93813b37
WT
27632016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2764
2765 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2766 to srv_tgtobj.
2767 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2768 to srv_tgtobj.
2769 * linux-x86-low.c [__x86_64__]: Include
2770 "nat/amd64-linux-siginfo.h".
2771 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2772 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2773 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2774 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2775 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2776 (cpt_si_fd, si_timerid, si_overrun): Move from
2777 nat/amd64-linux-siginfo.c.
2778 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2779
8424cc97
SM
27802016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2781
2782 * server.c (skip_to_semicolon): Remove.
2783 (process_point_options): Use strchrnul instead of
2784 skip_to_semicolon.
2785
4d18591b
YQ
27862016-01-26 Yao Qi <yao.qi@linaro.org>
2787
2788 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2789 * linux-low.c (install_software_single_step_breakpoints): Don't
2790 call regcache_read_pc.
2791 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2792 argument pc.
2793
d8020970
YQ
27942016-01-26 Yao Qi <yao.qi@linaro.org>
2795
2796 * linux-low.c (install_software_single_step_breakpoints): Call
2797 regcache_read_pc instead of get_pc.
2798
8b207339
YQ
27992016-01-26 Yao Qi <yao.qi@linaro.org>
2800
2801 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2802 (unblock_async_io): Rename to ...
2803 (block_unblock_async_io): ... it. New function.
2804 (enable_async_io): Don't install SIGIO handler. Unblock it
2805 instead.
2806 (disable_async_io): Don't ignore SIGIO. Block it instead.
2807 (initialize_async_io): Install SIGIO handler. Don't call
2808 unblock_async_io.
2809
18879fef
YQ
28102016-01-26 Yao Qi <yao.qi@linaro.org>
2811
2812 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2813 first character is '\003', call *the_target->request_interrupt.
2814
a0f8e08a
YQ
28152016-01-25 Yao Qi <yao.qi@linaro.org>
2816
2817 * remote-utils.c (new_thread_notify): Remove.
2818 (dead_thread_notify): Likewise.
2819 * remote-utils.h (new_thread_notify): Remove declaration.
2820 (dead_thread_notify): Likewise.
2821
cc5fd9ab
MK
28222016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2823
2824 * gdb.trace/pending.exp: Fix expected message on continue.
2825
99e8eb11
MK
28262016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2827
2828 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2829 it works properly on big-endian machines where sizeof (CORE_ADDR)
2830 != sizeof (void *).
2831
a994041d
PA
28322016-01-21 Pedro Alves <palves@redhat.com>
2833
2834 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2835 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2836 * configure: Regenerate.
2837
f7a6a40d
YQ
28382016-01-21 Yao Qi <yao.qi@linaro.org>
2839
2840 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2841 is_thumb and set it according to CPSR saved on the stack.
2842 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2843 arm_sigreturn_next_pc.
2844
6f69e520
YQ
28452016-01-18 Yao Qi <yao.qi@linaro.org>
2846
2847 * linux-low.c (linux_set_pc_64bit): New function.
2848 (linux_get_pc_64bit): New function.
2849 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2850 Declare.
2851 * linux-sparc-low.c (debug_threads): Remove declaration.
2852 (sparc_get_pc): Remove.
2853 (the_low_target): Use linux_get_pc_64bit instead of
2854 sparc_get_pc.
2855 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2856 (the_low_target): Use linux_get_pc_64bit and
2857 linux_set_pc_64bit.
2858
276d4552
YQ
28592016-01-18 Yao Qi <yao.qi@linaro.org>
2860
2861 * linux-arm-low.c (debug_threads): Remove declaration.
2862 (arm_get_pc, arm_set_pc): Remove.
2863 (the_low_target): Use linux_get_pc_32bit and
2864 linux_set_pc_32bit.
2865 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2866 (the_low_target): Use linux_get_pc_32bit and
2867 linux_set_pc_32bit.
2868 * linux-cris-low.c (debug_threads): Remove declaration.
2869 (cris_get_pc, cris_set_pc,): Remove.
2870 (the_low_target): Use linux_get_pc_32bit and
2871 linux_set_pc_32bit.
2872 * linux-crisv32-low.c (debug_threads): Remove declaration.
2873 (cris_get_pc, cris_set_pc): Remove.
2874 (the_low_target): Use linux_get_pc_32bit and
2875 linux_set_pc_32bit.
2876 * linux-low.c: Include inttypes.h.
2877 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2878 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2879 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2880 (the_low_target): Use linux_get_pc_32bit and
2881 linux_set_pc_32bit.
2882 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2883 (the_low_target): Use linux_get_pc_32bit and
2884 linux_set_pc_32bit.
2885 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2886 (the_low_target): Use linux_get_pc_32bit and
2887 linux_set_pc_32bit.
2888 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2889 (the_low_target): Use linux_get_pc_32bit and
2890 linux_set_pc_32bit.
2891 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2892 (the_low_target): Use linux_get_pc_32bit and
2893 linux_set_pc_32bit.
2894
eb0edac8
GB
28952016-01-18 Gary Benson <gbenson@redhat.com>
2896
2897 * configure.ac (AC_FUNC_FORK): New check.
2898 * config.in: Regenerate.
2899 * configure: Likewise.
2900
1b451dda
YQ
29012016-01-14 Yao Qi <yao.qi@linaro.org>
2902
2903 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2904 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2905 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2906 arm_get_next_pcs_ctor.
2907
82075af2
JS
29082016-01-12 Josh Stone <jistone@redhat.com>
2909 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2910
2911 * inferiors.h: Include "gdb_vecs.h".
2912 (struct process_info): Add syscalls_to_catch.
2913 * inferiors.c (remove_process): Free syscalls_to_catch.
2914 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2915 syscall_return stops.
2916 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2917 * server.c (handle_general_set): Handle QCatchSyscalls.
2918 (handle_query): Report support for QCatchSyscalls.
2919 * target.h (struct target_ops): Add supports_catch_syscall.
2920 (target_supports_catch_syscall): New macro.
2921 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2922 (struct lwp_info): Add syscall_state.
2923 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2924 Maintain syscall_state and syscalls_to_catch across exec.
2925 (get_syscall_trapinfo): New function, proxy to the_low_target.
2926 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2927 (linux_low_filter_event): Toggle syscall_state entry/return for
2928 syscall traps, and set it ignored for all others.
2929 (gdb_catching_syscalls_p): New function.
2930 (gdb_catch_this_syscall_p): New function.
2931 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2932 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2933 (linux_supports_catch_syscall): New function.
2934 (linux_target_ops): Install it.
2935 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2936 (the_low_target): Install it.
2937
8f13a3ce
MF
29382016-01-12 Mike Frysinger <vapier@gentoo.org>
2939
2940 * acinclude.m4: Include new ../warning.m4 file.
2941 * configure: Regenerated.
2942 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2943
5b3da067
MF
29442016-01-12 Mike Frysinger <vapier@gentoo.org>
2945
2946 * ax.c (is_goto_target): Mark static.
2947 * linux-low.c (register_addr): Likewise.
2948 (linux_fetch_registers, linux_store_registers): Likewise.
2949 * mem-break.c (any_persistent_commands): Fix old prototype.
2950 (add_commands_to_breakpoint): Mark static.
2951 * regcache.c (find_register_by_name): Delete unused func.
2952 * remote-utils.c (hex_or_minus_one): Mark static.
2953 * server.c (monitor_show_help): Mark static.
2954 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2955 handle_v_requests): Likewise.
2956
bc504a31
PA
29572016-01-12 Pedro Alves <palves@redhat.com>
2958
2959 Remove use of the registered trademark symbol throughout.
2960
5a0dd67a
YQ
29612016-01-08 Yao Qi <yao.qi@linaro.org>
2962
2963 * remote-utils.c (getpkt): If c is '\003', call target hook
2964 request_interrupt.
2965
b2ca446f
YQ
29662016-01-06 Yao Qi <yao.qi@linaro.org>
2967
2968 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2969 linux-aarch32-low.c.
2970 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2971 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2972 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2973 (thumb2_breakpoint): Declare.
2974 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2975 linux-aarch32-low.h.
2976 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2977 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2978 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2979
edd88788
JB
29802016-01-01 Joel Brobecker <brobecker@adacore.com>
2981
2982 * gdbreplay.c (gdbreplay_version): Change copyright year in
2983 version message.
2984 * server.c (gdbserver_version): Likewise.
2985
65da7f14
PP
29862015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2987
2988 * server.c (crc32_table): Delete.
2989 (crc32): Use libiberty's xcrc32 function.
2990
4abd5ed2
JB
29912015-12-22 Joel Brobecker <brobecker@adacore.com>
2992
2993 * lynx-low.c (lynx_delete_thread_callback): New function.
2994 (lynx_mourn): Properly delete our process and all of its
2995 threads. Remove call to clear_inferiors.
2996
0e50fe5c
JB
29972015-12-22 Joel Brobecker <brobecker@adacore.com>
2998
2999 * target.c (thread_search_callback): Add check that
3000 the thread_stopped target callback is not NULL before
3001 calling it.
3002
35adc03f
YQ
30032015-12-21 Yao Qi <yao.qi@linaro.org>
3004
3005 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3006 arm breakpoint.
3007
bd2b2909
AT
30082015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3009
3010 * server.c (handle_query): Call target_supports_software_single_step.
3011
7fe5e27e
AT
30122015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3013
3014 * linux-low.c (single_step): New function.
3015 (linux_resume_one_lwp_throw): Call single_step.
3016 (start_step_over): Likewise.
3017
d9311bfa
AT
30182015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3019
3020 * Makefile.in (SFILES): Append arch/arm-linux.c,
3021 arch/arm-get-next-pcs.c.
3022 (arm-linux.o): New rule.
3023 (arm-get-next-pcs.o): New rule.
3024 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3025 arm-linux.o.
3026 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3027 to linux-aarch32-low.c.
3028 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3029 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3030 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3031 (thumb2_breakpoint_len): Likewise.
3032 (arm_is_thumb_mode): Make non-static.
3033 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3034 from linux-aarch32-low.c.
3035 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3036 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3037 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3038 (thumb2_breakpoint_len): Likewise.
3039 (arm_is_thumb_mode): New declaration.
3040 * linux-arm-low.c: Include arch/arm-linux.h
3041 aarch/arm-get-next-pcs.h, sys/syscall.h.
3042 (get_next_pcs_ops): New struct.
3043 (get_next_pcs_addr_bits_remove): New function.
3044 (get_next_pcs_is_thumb): New function.
3045 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3046 (arm_sigreturn_next_pc): Likewise.
3047 (get_next_pcs_syscall_next_pc): Likewise.
3048 (arm_gdbserver_get_next_pcs): Likewise.
3049 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3050 Initialize.
3051 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3052 * server.h: Include gdb_vecs.h.
3053
68ce2059
AT
30542015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3055
3056 * Makefile.in (SFILES): Append common/common-regcache.c.
3057 (OBS): Append common-regcache.o.
3058 (common-regcache.o): New rule.
3059 * regcache.c (init_register_cache): Initialize cache to
3060 REG_UNAVAILABLE.
3061 (regcache_raw_read_unsigned): New function.
3062 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3063 register_status enum.
3064
fa5308bd
AT
30652015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3066
3067 * linux-aarch64-low.c (the_low_targets): Rename
3068 breakpoint_reinsert_addr to get_next_pcs.
3069 * linux-arm-low.c (the_low_targets): Likewise.
3070 * linux-bfin-low.c (the_low_targets): Likewise.
3071 * linux-cris-low.c (the_low_targets): Likewise.
3072 * linux-crisv32-low.c (the_low_targets): Likewise.
3073 * linux-low.c (can_software_single_step): Likewise.
3074 (install_software_single_step_breakpoints): New function.
3075 (start_step_over): Use install_software_single_step_breakpoints.
3076 * linux-low.h: New CORE_ADDR vector.
3077 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3078 get_next_pcs.
3079 * linux-mips-low.c (the_low_targets): Likewise.
3080 * linux-nios2-low.c (the_low_targets): Likewise.
3081 * linux-sparc-low.c (the_low_targets): Likewise.
3082
4a6ed09b
PA
30832015-12-17 Pedro Alves <palves@redhat.com>
3084
3085 * linux-low.c (linux_kill_one_lwp): Remove references to
3086 LinuxThreads.
3087 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3088 to 'kill'.
3089 (linux_init_signals): Delete.
3090 (initialize_low): Adjust.
3091 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3092
7544db95
PA
30932015-12-16 Pedro Alves <palves@redhat.com>
3094
3095 * configure.ac (compiler warning flags): When testing a
3096 -Wno-foo option, check whether -Wfoo works instead.
3097 * configure: Regenerate.
3098
8020350c
DB
30992015-12-11 Don Breazeal <donb@codesourcery.com>
3100
3101 * server.c (process_serial_event): Don't exit from gdbserver
3102 in remote mode if there are still active inferiors.
3103
db91f502
YQ
31042015-12-11 Yao Qi <yao.qi@linaro.org>
3105
3106 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3107 arm_breakpoint_at if the process is 32-bit.
3108
b37a6290
YQ
31092015-12-11 Yao Qi <yao.qi@linaro.org>
3110
3111 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3112 arm breakpoint.
3113
17b1509a
YQ
31142015-12-07 Yao Qi <yao.qi@linaro.org>
3115
3116 * configure.srv: Append arm.o to srv_tgtobj for
3117 aarch64*-*-linux* target.
3118 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3119 from linux-arm-low.c.
3120 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3121 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3122 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3123 (thumb2_breakpoint_len): Likewise.
3124 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3125 (arm_breakpoint_kinds): Likewise.
3126 (arm_breakpoint_kind_from_pc): Likewise.
3127 (arm_sw_breakpoint_from_kind): Likewise.
3128 (arm_breakpoint_kind_from_current_state): Likewise.
3129 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3130 (arm_sw_breakpoint_from_kind): Declare.
3131 (arm_breakpoint_kind_from_current_state): Declare.
3132 (arm_breakpoint_at): Declare.
3133 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3134 arm_sw_breakpoint_from_kind if process is 32-bit.
3135 (aarch64_breakpoint_kind_from_pc): New function.
3136 (aarch64_breakpoint_kind_from_current_state): New function.
3137 (the_low_target): Initialize fields breakpoint_kind_from_pc
3138 and breakpoint_kind_from_current_state.
3139 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3140 linux-aarch32-low.c.
3141 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3142 (arm_breakpoint, arm_breakpoint_len): Likewise.
3143 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3144 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3145 (arm_is_thumb_mode): Likewise.
3146 (arm_breakpoint_at): Likewise.
3147 (arm_breakpoint_kind_from_pc): Likewise.
3148 (arm_sw_breakpoint_from_kind): Likewise.
3149 (arm_breakpoint_kind_from_current_state): Likewise.
3150
3151 Revert:
3152 2015-08-04 Yao Qi <yao.qi@linaro.org>
3153
3154 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3155 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3156 * server.c (extended_protocol): Remove "static".
3157 * server.h (extended_protocol): Declare it.
3158
ece66d65
JS
31592015-12-04 Josh Stone <jistone@redhat.com>
3160
3161 * target.h (struct target_ops) <arch_setup>: Rename to ...
3162 (struct target_ops) <post_create_inferior>: ... this.
3163 (target_arch_setup): Rename to ...
3164 (target_post_create_inferior): ... this, calling post_create_inferior.
3165 * server.c (start_inferior): Update target_arch_setup calls to
3166 target_post_create_inferior.
3167 * linux-low.c (linux_low_ptrace_options): Forward declare.
3168 (linux_arch_setup): Update its comment for general use.
3169 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3170 (struct linux_target_ops): Use linux_post_create_inferior.
3171 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3172 to post_create_inferior.
3173 * nto-low.c (struct nto_target_ops): Likewise.
3174 * spu-low.c (struct spu_target_ops): Likewise.
3175 * win32-low.c (struct win32_target_ops): Likewise.
3176
e58c48b4
AT
31772015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3178
3179 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3180
fbec8956
AT
31812015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3182
3183 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3184 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3185 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3186 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3187 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3188 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3189 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3190 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3191 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3192 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3193 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3194 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3195
9b4c5f87
AT
31962015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3197
3198 * linux-low.c (linux_look_up_symbols): Don't call
3199 linux_supports_traceclone.
3200 * linux-low.h (thread_db_init): Remove use_events argument.
3201 * thread-db.c (thread_db_use_event): Remove global variable.
3202 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3203 (struct thread_db) <td_create_bp>: Remove field.
3204 (thread_db_create_event): Remove function.
3205 (thread_db_enable_reporting): Likewise.
3206 (find_one_thread): Don't check for thread_db_use_events.
3207 (attach_thread): Likewise.
3208 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3209 (try_thread_db_load_1): Don't check for thread_db_use_events.
3210 (thread_db_init): Remove use_events argument and thread events
3211 handling.
3212 (remove_thread_event_breakpoints): Remove function.
3213 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3214
7d00775e
AT
32152015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3216
3217 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3218 New function.
3219 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3220 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3221 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3222 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3223 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3224 Initialize.
3225 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3226 New function.
3227 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3228 * linux-low.c (can_hardware_single_step): Use
3229 supports_hardware_single_step.
3230 (can_software_single_step): New function.
3231 (start_step_over): Call can_software_single_step.
3232 (linux_supports_hardware_single_step): New function.
3233 (struct target_ops) <supports_software_single_step>: Initialize.
3234 * linux-low.h (struct linux_target_ops)
3235 <supports_hardware_single_step>: Initialize.
3236 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3237 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3238 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3239 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3240 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3241 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3242 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3243 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3244 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3245 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3246 Initialize.
3247 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3248 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3249 Initialize.
3250 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3251 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3252 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3253 New function.
3254 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3255 * target.h (struct target_ops): <supports_software_single_step>:
3256 New field.
3257 (target_supports_software_single_step): New macro.
3258
2d97cd35
AT
32592015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3260
3261 * linux-low.c (linux_wait_1): Fix pc advance condition.
3262 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3263 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3264
769ef81f
AT
32652015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3266
3267 * linux-arm-low.c (arm_is_thumb_mode): New function.
3268 (arm_breakpoint_at): Use arm_is_thumb_mode.
3269 (arm_breakpoint_kind_from_current_state): New function.
3270 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3271 Initialize.
3272 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3273 (linux_breakpoint_kind_from_current_state): New function.
3274 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3275 * linux-low.h (struct linux_target_ops)
3276 <breakpoint_kind_from_current_state>: New field.
3277 * target.h (struct target_ops): Likewise.
3278 (target_breakpoint_kind_from_current_state): New macro.
3279
1bebeeca
PA
32802015-11-30 Pedro Alves <palves@redhat.com>
3281
3282 * linux-low.c (linux_resume): Wake up the event loop before
3283 returning.
3284
a67a9fae
PA
32852015-11-30 Pedro Alves <palves@redhat.com>
3286
3287 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3288 check.
3289 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3290 to -1.
3291 * target.c (struct thread_search): New structure.
3292 (thread_search_callback): New function.
3293 (prev_general_thread): New global.
3294 (prepare_to_access_memory, done_accessing_memory): New functions.
3295 * target.h (prepare_to_access_memory, done_accessing_memory):
3296 Replace macros with function declarations.
3297
f2faf941
PA
32982015-11-30 Pedro Alves <palves@redhat.com>
3299
3300 PR 14618
3301 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3302 report TARGET_WAITKIND_NO_RESUMED.
3303 * remote-utils.c (prepare_resume_reply): Handle
3304 TARGET_WAITKIND_NO_RESUMED.
3305 * server.c (report_no_resumed): New global.
3306 (handle_query) <qSupported>: Handle "no-resumed+". Report
3307 "no-resumed+" support.
3308 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3309 return error if the client doesn't support no-resumed events.
3310 (push_stop_notification): New function.
3311 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3312 events if the client supports them.
3313
a681f9c9
PA
33142015-11-30 Pedro Alves <palves@redhat.com>
3315
3316 * linux-low.c (thread_still_has_status_pending_p): Don't check
3317 vCont;t here.
3318 (lwp_resumed): New function.
3319 (status_pending_p_callback): Return early if the LWP is not
3320 supposed to be resumed.
3321
65706a29
PA
33222015-11-30 Pedro Alves <palves@redhat.com>
3323
3324 * linux-low.c (handle_extended_wait): Assert that the LWP's
3325 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3326 thread create events, leave the new child's status pending.
3327 (linux_low_filter_event): If GDB wants to hear about thread exit
3328 events, leave the LWP marked dead and don't delete it.
3329 (linux_wait_for_event_filtered): Don't check for thread exit.
3330 (filter_exit_event): New function.
3331 (linux_wait_1): Use it, when returning an exit event.
3332 (linux_resume_one_lwp_throw): Assert that the LWP's
3333 waitstatus is TARGET_WAITKIND_IGNORE.
3334 * remote-utils.c (prepare_resume_reply): Handle
3335 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3336 * server.c (report_thread_events): New global.
3337 (handle_general_set): Handle QThreadEvents.
3338 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3339 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3340 TARGET_WAITKIND_THREAD_EXITED.
3341 * server.h (report_thread_events): Declare.
3342
56cf4bed
PA
33432015-11-30 Pedro Alves <palves@redhat.com>
3344
3345 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3346 the thread's last_resume_kind was resume_stop.
3347
500c1d85
PA
33482015-11-30 Pedro Alves <palves@redhat.com>
3349
3350 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3351 before returning.
3352
de979965
PA
33532015-11-30 Pedro Alves <palves@redhat.com>
3354
3355 * server.c (handle_v_requests): Handle vCtrlC.
3356
34c65914
PA
33572015-11-30 Pedro Alves <palves@redhat.com>
3358
3359 * gdbthread.h (find_any_thread_of_pid): Declare.
3360 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3361 functions.
3362 * server.c (handle_query): If current_thread is NULL, look for
3363 another thread of the selected process.
3364
79efa585 33652015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3366 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3367
3368 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3369 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3370 name in reply.
3371 * target.h (struct target_ops) <thread_name>: New field.
3372 (target_thread_name): New macro.
3373
80d82c19
JB
33742015-11-23 Joel Brobecker <brobecker@adacore.com>
3375
3376 * regcache.h (regcache_invalidate_pid): Add declaration.
3377 * regcache.c (regcache_invalidate_pid): New function, extracted
3378 from regcache_invalidate.
3379 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3380 Add trivial documentation comment.
3381 * lynx-low.c: Use regcache_invalidate_pid instead of
3382 regcache_invalidate.
3383
64da5dd5
JB
33842015-11-23 Joel Brobecker <brobecker@adacore.com>
3385
3386 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3387 and Elf64_auxv_t if the target is Android.
3388
37ce4055
DE
33892015-11-22 Doug Evans <xdje42@gmail.com>
3390
3391 * target.h: #include <sys/types.h>.
3392
06e03fff
PA
33932015-11-19 Pedro Alves <palves@redhat.com>
3394
3395 * linux-low.c (linux_process_qsupported): Change prototype.
3396 Adjust.
3397 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3398 Change prototype.
3399 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3400 and adjust to loop over all features.
3401 * server.c (handle_query) <qSupported>: Adjust to call
3402 target_process_qsupported once, passing it a vector of unprocessed
3403 features.
3404 * target.h (struct target_ops) <process_qsupported>: Change
3405 prototype.
3406 (target_process_qsupported): Adjust.
3407
9a084706
PA
34082015-11-19 Pedro Alves <palves@redhat.com>
3409
3410 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3411 mode.
3412 * configure: Regenerate.
3413
dad44a1f
PA
34142015-11-19 Pedro Alves <palves@redhat.com>
3415
3416 * configure: Regenerate.
3417
231c0592
YQ
34182015-11-19 Yao Qi <yao.qi@linaro.org>
3419
3420 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3421 type to uint32_t.
3422
6c1c9a8b
YQ
34232015-11-19 Yao Qi <yao.qi@linaro.org>
3424
3425 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3426 (struct aarch64_operand): Move enum out.
3427
9caa3311
YQ
34282015-11-19 Yao Qi <yao.qi@linaro.org>
3429
3430 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3431 struct user_fpsimd_state *.
3432 (aarch64_store_fpregset): Likewise.
3433
6a69a054
YQ
34342015-11-19 Yao Qi <yao.qi@linaro.org>
3435
3436 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3437 struct user_pt_regs *.
3438 (aarch64_store_gregset): Likewise.
3439
1798301e
PA
34402015-11-18 Pedro Alves <palves@redhat.com>
3441
3442 * Makefile.in (all_object_files): Add $IPA_OBJS.
3443
ce7715e2
PA
34442015-11-17 Pedro Alves <palves@redhat.com>
3445
3446 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3447 GDB_SIGNAL_0 and gdb_signal_to_string.
3448
c0879059
PA
34492015-11-17 Pedro Alves <palves@redhat.com>
3450
3451 * win32-low.c (handle_output_debug_string): Remove parameter.
3452 (win32_kill): Remove our_status local and adjust call to
3453 handle_output_debug_string.
3454 (get_child_debug_event): Adjust call to
3455 handle_output_debug_string.
3456
1996e237
SM
34572015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3458
3459 * linux-mips-low.c (mips_fill_gregset): Add cast.
3460 (mips_store_gregset): Likewise.
3461 (mips_fill_fpregset): Likewise.
3462 (mips_store_fpregset): Likewise.
3463
cbec665b
SM
34642015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3465
3466 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3467 priv.
3468
eb3e3c67
SM
34692015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3470
3471 * linux-mips-low.c (mips_linux_new_thread): Change type of
3472 watch_type to enum target_hw_bp_type.
3473
171de4b8
SM
34742015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3475
3476 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3477 Change return type to arm_hwbp_type.
3478
04248ead
SM
34792015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3480
3481 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3482 (arm_store_gregset): Likewise.
3483 * linux-arm-low.c (arm_get_hwcap): Likewise.
3484 (arm_read_description): Likewise.
3485
04b3479c
SM
34862015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3487
3488 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3489
2bc84e8a
SM
34902015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3491
3492 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3493 (ppc_fill_vsxregset): Likewise.
3494 (ppc_store_vsxregset): Likewise.
3495 (ppc_fill_vrregset): Likewise.
3496 (ppc_store_vrregset): Likewise.
3497 (ppc_fill_evrregset): Likewise.
3498 (ppc_store_evrregset): Likewise.
3499
e6c5bb05
SM
35002015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3501
3502 * linux-ppc-low.c (ppc_usrregs_info): Remove
3503 forward-declaration.
3504 (ppc_arch_setup): Move lower in file.
3505
7ea45d72
SM
35062015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3507
3508 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3509 (ps_pdwrite): Likewise.
3510
69291610
HW
35112015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3512
3513 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3514 to after assert checks.
3515
b42945fd
SM
35162015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3517
3518 * proc-service.c (ps_pdread): Add/adjust casts.
3519 (ps_pdwrite): Add/adjust casts.
3520
d6f85c84
SM
35212015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3522
3523 * server.c (handle_search_memory_1): Cast return value of
3524 memmem.
3525
f98cd059
SM
35262015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3527
3528 * server.c (write_qxfer_response): Change type of data to
3529 gdb_byte *.
3530
d2412fa5
PA
35312015-10-29 Pedro Alves <palves@redhat.com>
3532
3533 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3534
c17414a2
PA
35352015-10-29 Pedro Alves <palves@redhat.com>
3536
3537 * tracepoint.c (clear_installed_tracepoints): Add casts.
3538
e053fbc4
PA
35392015-10-29 Pedro Alves <palves@redhat.com>
3540
3541 * server.c (handle_v_cont, process_serial_event): Add enum
3542 gdb_signal casts to signal parsing code.
3543
add67df8
PA
35442015-10-29 Pedro Alves <palves@redhat.com>
3545
3546 * linux-low.h (NULL_REGSET): Define.
3547 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3548 * linux-arm-low.c (arm_regsets): Likewise.
3549 * linux-crisv32-low.c (cris_regsets): Likewise.
3550 * linux-m68k-low.c (m68k_regsets): Likewise.
3551 * linux-mips-low.c (mips_regsets): Likewise.
3552 * linux-nios2-low.c (nios2_regsets): Likewise.
3553 * linux-ppc-low.c (ppc_regsets): Likewise.
3554 * linux-s390-low.c (s390_regsets): Likewise.
3555 * linux-sh-low.c (sh_regsets): Likewise.
3556 * linux-sparc-low.c (sparc_regsets): Likewise.
3557 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3558 * linux-tile-low.c (tile_regsets): Likewise.
3559 * linux-x86-low.c (x86_regsets): Likewise.
3560 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3561
50bc912a
PA
35622015-10-29 Pedro Alves <palves@redhat.com>
3563
3564 * linux-low.h (NULL_REGSET): Define.
3565 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3566 * linux-arm-low.c (arm_regsets): Likewise.
3567 * linux-crisv32-low.c (cris_regsets): Likewise.
3568 * linux-m68k-low.c (m68k_regsets): Likewise.
3569 * linux-mips-low.c (mips_regsets): Likewise.
3570 * linux-nios2-low.c (nios2_regsets): Likewise.
3571 * linux-ppc-low.c (ppc_regsets): Likewise.
3572 * linux-s390-low.c (s390_regsets): Likewise.
3573 * linux-sh-low.c (sh_regsets): Likewise.
3574 * linux-sparc-low.c (sparc_regsets): Likewise.
3575 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3576 * linux-tile-low.c (tile_regsets): Likewise.
3577 * linux-x86-low.c (x86_regsets): Likewise.
3578 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3579
682b2546
DE
35802015-10-26 Doug Evans <dje@google.com>
3581
3582 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3583
963843d4
DE
35842015-10-26 Doug Evans <dje@google.com>
3585
3586 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3587
d41401ac
DE
35882015-10-26 Doug Evans <dje@google.com>
3589
3590 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3591 for debug_printf.
3592 (attach_thread, find_new_threads_callback): Ditto.
3593
3db28855
AT
35942015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3595
3596 * mem-break.h (set_breakpoint_data): Remove.
3597
fb78e89c
AT
35982015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3599
3600 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3601 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3602 (initialize_low): Remove set_breakpoint_data call.
3603 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3604 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3605 (initialize_low): Remove set_breakpoint_data call.
3606 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3607 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3608 (initialize_low): Remove set_breakpoint_data call.
3609
2e6ee069
AT
36102015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3611
3612 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3613 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3614 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3615 * target.h (target_breakpoint_kind_from_pc): New macro.
3616
1652a986
AT
36172015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3618
3619 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3620 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3621 the default breakpoint kind.
3622
abeead09
AT
36232015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3624
3625 * linux-arm-low.c (arm_supports_z_point_type): Add software
3626 breakpoint support.
3627
b0b4b501
AT
36282015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3629
3630 * linux-arm-low.c: Refactor breakpoint definitions.
3631 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3632 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3633
8689682c
AT
36342015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3635
3636 * Makefile.in: Add arm.c/o.
3637 * configure.srv: Likewise.
3638 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3639 (arm_breakpoint_kind_from_pc): New function.
3640 (arm_sw_breakpoint_from_kind): Return proper kind.
3641 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3642
27165294
AT
36432015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3644
3645 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3646 removal.
3647 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3648 (struct raw_breakpoint) <size>: Remove.
3649 (struct raw_breakpoint) <kind>: Add.
3650 (bp_size): New function.
3651 (bp_opcode): Likewise.
3652 (find_raw_breakpoint_at): Adjust for kind.
3653 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3654 (remove_memory_breakpoint): Adjust for kind call bp_size.
3655 (set_raw_breakpoint_at): Adjust for kind.
3656 (set_breakpoint): Likewise.
3657 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3658 (delete_raw_breakpoint): Adjust for kind.
3659 (delete_breakpoint): Likewise.
3660 (find_gdb_breakpoint): Likewise.
3661 (set_gdb_breakpoint_1): Likewise.
3662 (set_gdb_breakpoint): Likewise.
3663 (delete_gdb_breakpoint_1): Likewise.
3664 (delete_gdb_breakpoint): Likewise.
3665 (uninsert_raw_breakpoint): Likewise.
3666 (reinsert_raw_breakpoint): Likewise.
3667 (set_breakpoint_data): Remove.
3668 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3669 (check_mem_read): Adjust for kind call bp_size.
3670 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3671 (clone_one_breakpoint): Adjust for kind.
3672 * mem-break.h (set_gdb_breakpoint): Likewise.
3673 (delete_gdb_breakpoint): Likewise.
3674 * server.c (process_serial_event): Likewise.
3675
dd373349
AT
36762015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3677
3678 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3679 (struct linux_target_ops) <breakpoint>: Remove.
3680 (struct linux_target_ops) <breakpoint_len>: Remove.
3681 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3682 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3683 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3684 (arm_sw_breakpoint_from_kind): New function.
3685 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3686 (struct linux_target_ops) <breakpoint>: Remove.
3687 (struct linux_target_ops) <breakpoint_len>: Remove.
3688 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3689 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3690 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3691 (struct linux_target_ops) <breakpoint>: Remove.
3692 (struct linux_target_ops) <breakpoint_len>: Remove.
3693 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3694 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3695 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3696 (struct linux_target_ops) <breakpoint>: Remove.
3697 (struct linux_target_ops) <breakpoint_len>: Remove.
3698 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3699 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3700 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3701 and sw_breakpoint_from_kind to increment the pc.
3702 (linux_breakpoint_kind_from_pc): New function.
3703 (linux_sw_breakpoint_from_kind): New function.
3704 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3705 (initialize_low): Call breakpoint_kind_from_pc and
3706 sw_breakpoint_from_kind to replace breakpoint_data/len.
3707 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3708 New field.
3709 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3710 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3711 (struct linux_target_ops) <breakpoint>: Remove.
3712 (struct linux_target_ops) <breakpoint_len>: Remove.
3713 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3714 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3715 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3716 (struct linux_target_ops) <breakpoint>: Remove.
3717 (struct linux_target_ops) <breakpoint_len>: Remove.
3718 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3719 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3720 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3721 (struct linux_target_ops) <breakpoint>: Remove.
3722 (struct linux_target_ops) <breakpoint_len>: Remove.
3723 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3724 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3725 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3726 (struct linux_target_ops) <breakpoint>: Remove.
3727 (struct linux_target_ops) <breakpoint_len>: Remove.
3728 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3729 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3730 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3731 (struct linux_target_ops) <breakpoint>: Remove.
3732 (struct linux_target_ops) <breakpoint_len>: Remove.
3733 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3734 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3735 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3736 (struct linux_target_ops) <breakpoint>: Remove.
3737 (struct linux_target_ops) <breakpoint_len>: Remove.
3738 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3739 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3740 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3741 (struct linux_target_ops) <breakpoint>: Remove.
3742 (struct linux_target_ops) <breakpoint_len>: Remove.
3743 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3744 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3745 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3746 (struct linux_target_ops) <breakpoint>: Remove.
3747 (struct linux_target_ops) <breakpoint_len>: Remove.
3748 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3749 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3750 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3751 (struct linux_target_ops) <breakpoint>: Remove.
3752 (struct linux_target_ops) <breakpoint_len>: Remove.
3753 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3754 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3755 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3756 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3757 (struct linux_target_ops) <breakpoint>: Remove.
3758 (struct linux_target_ops) <breakpoint_len>: Remove.
3759 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3760 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3761 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3762 (struct linux_target_ops) <breakpoint>: Remove.
3763 (struct linux_target_ops) <breakpoint_len>: Remove.
3764 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3765 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3766
4cd98a19
AT
37672015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3768
3769 * linux-cris-low.c (cris_get_pc): Remove void arg.
3770
774ee6d2
AR
37712015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3772
3773 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3774 variable name.
3775
833dcd29
AR
37762015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3777
3778 * inferiors.c (thread_pid_matches_callback): New function.
3779 (find_thread_process): New function.
3780 (remove_thread): Reset current_thread.
3781 (remove_process): Assert threads have been removed first.
3782
8d689ee5
YQ
37832015-10-15 Yao Qi <yao.qi@linaro.org>
3784
3785 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3786 if it is 3.
3787 (aarch64_remove_point): Likewise.
3788 * regcache.c (regcache_register_size): New function.
3789
1c2e1515
YQ
37902015-10-12 Yao Qi <yao.qi@linaro.org>
3791
3792 * linux-aarch64-low.c: Update all callers as emit_load_store
3793 is renamed to aarch64_emit_load_store.
3794
e1c587c3
YQ
37952015-10-12 Yao Qi <yao.qi@linaro.org>
3796
3797 * linux-aarch64-low.c: Update all callers of function renaming
3798 from emit_insn to aarch64_emit_insn.
3799
b6542f81
YQ
38002015-10-12 Yao Qi <yao.qi@linaro.org>
3801
3802 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3803 arch/aarch64-insn.h.
3804 (struct aarch64_memory_operand): Likewise.
3805 (ENCODE): Likewise.
3806 (emit_insn): Move to arch/aarch64-insn.c.
3807 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3808 (emit_load_store): Move to arch/aarch64-insn.c.
3809 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3810 (can_encode_int32): Remove.
3811
246994ce
YQ
38122015-10-12 Yao Qi <yao.qi@linaro.org>
3813
3814 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3815 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3816 (aarch64_relocate_instruction): Likewise.
3817 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3818 (struct aarch64_insn_visitor): Likewise.
3819
0badd99f
YQ
38202015-10-12 Yao Qi <yao.qi@linaro.org>
3821
3822 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3823 (struct aarch64_insn_visitor): New.
3824 (struct aarch64_insn_relocation_data): New.
3825 (aarch64_ftrace_insn_reloc_b): New function.
3826 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3827 (aarch64_ftrace_insn_reloc_cb): Likewise.
3828 (aarch64_ftrace_insn_reloc_tb): Likewise.
3829 (aarch64_ftrace_insn_reloc_adr): Likewise.
3830 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3831 (aarch64_ftrace_insn_reloc_others): Likewise.
3832 (visitor): New.
3833 (aarch64_relocate_instruction): Use visitor.
3834
dfaffe9d
YQ
38352015-10-12 Yao Qi <yao.qi@linaro.org>
3836
3837 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3838 int. Add argument buf.
3839 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3840 aarch64_relocate_instruction.
3841
70b439f0
YQ
38422015-10-12 Yao Qi <yao.qi@linaro.org>
3843
3844 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3845 argument insn. Remove local variable insn. Don't call
3846 target_read_uint32.
3847 (aarch64_install_fast_tracepoint_jump_pad): Call
3848 target_read_uint32.
3849
7781c06f
YQ
38502015-09-30 Yao Qi <yao.qi@linaro.org>
3851
3852 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3853 (emit_load_store_pair): Likewise.
3854
9a3c8263
SM
38552015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3856
3857 * dll.c (match_dll): Add cast(s).
3858 (unloaded_dll): Likewise.
3859 * linux-low.c (second_thread_of_pid_p): Likewise.
3860 (delete_lwp_callback): Likewise.
3861 (count_events_callback): Likewise.
3862 (select_event_lwp_callback): Likewise.
3863 (linux_set_resume_request): Likewise.
3864 * server.c (accumulate_file_name_length): Likewise.
3865 (emit_dll_description): Likewise.
3866 (handle_qxfer_threads_worker): Likewise.
3867 (visit_actioned_threads): Likewise.
3868 * thread-db.c (any_thread_of): Likewise.
3869 * tracepoint.c (same_process_p): Likewise.
3870 (match_blocktype): Likewise.
3871 (build_traceframe_info_xml): Likewise.
3872
224c3ddb
SM
38732015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3874
3875 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3876 assignment.
3877 (gdb_unparse_agent_expr): Likewise.
3878 * hostio.c (require_data): Likewise.
3879 (handle_pread): Likewise.
3880 * linux-low.c (disable_regset): Likewise.
3881 (fetch_register): Likewise.
3882 (store_register): Likewise.
3883 (get_dynamic): Likewise.
3884 (linux_qxfer_libraries_svr4): Likewise.
3885 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3886 (set_fast_tracepoint_jump): Likewise.
3887 (uninsert_fast_tracepoint_jumps_at): Likewise.
3888 (reinsert_fast_tracepoint_jumps_at): Likewise.
3889 (validate_inserted_breakpoint): Likewise.
3890 (clone_agent_expr): Likewise.
3891 * regcache.c (init_register_cache): Likewise.
3892 * remote-utils.c (putpkt_binary_1): Likewise.
3893 (decode_M_packet): Likewise.
3894 (decode_X_packet): Likewise.
3895 (look_up_one_symbol): Likewise.
3896 (relocate_instruction): Likewise.
3897 (monitor_output): Likewise.
3898 * server.c (handle_search_memory): Likewise.
3899 (handle_qxfer_exec_file): Likewise.
3900 (handle_qxfer_libraries): Likewise.
3901 (handle_qxfer): Likewise.
3902 (handle_query): Likewise.
3903 (handle_v_cont): Likewise.
3904 (handle_v_run): Likewise.
3905 (captured_main): Likewise.
3906 * target.c (write_inferior_memory): Likewise.
3907 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3908 * tracepoint.c (init_trace_buffer): Likewise.
3909 (add_tracepoint_action): Likewise.
3910 (add_traceframe): Likewise.
3911 (add_traceframe_block): Likewise.
3912 (cmd_qtdpsrc): Likewise.
3913 (cmd_qtdv): Likewise.
3914 (cmd_qtstatus): Likewise.
3915 (response_source): Likewise.
3916 (response_tsv): Likewise.
3917 (cmd_qtnotes): Likewise.
3918 (gdb_collect): Likewise.
3919 (initialize_tracepoint): Likewise.
3920
afbe19f8
PL
39212015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3922
3923 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3924 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3925 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3926 <NOP>: New.
3927 (enum aarch64_condition_codes): New enum.
3928 (w0): New static global.
3929 (fp): Likewise.
3930 (lr): Likewise.
3931 (struct aarch64_memory_operand) <type>: New
3932 MEMORY_OPERAND_POSTINDEX type.
3933 (postindex_memory_operand): New helper function.
3934 (emit_ret): New function.
3935 (emit_load_store_pair): New function, factored out of emit_stp
3936 with support for MEMORY_OPERAND_POSTINDEX.
3937 (emit_stp): Rewrite using emit_load_store_pair.
3938 (emit_ldp): New function.
3939 (emit_load_store): Likewise.
3940 (emit_ldr): Mention post-index instruction in comment.
3941 (emit_ldrh): New function.
3942 (emit_ldrb): New function.
3943 (emit_ldrsw): Mention post-index instruction in comment.
3944 (emit_str): Likewise.
3945 (emit_subs): New function.
3946 (emit_cmp): Likewise.
3947 (emit_and): Likewise.
3948 (emit_orr): Likewise.
3949 (emit_orn): Likewise.
3950 (emit_eor): Likewise.
3951 (emit_mvn): Likewise.
3952 (emit_lslv): Likewise.
3953 (emit_lsrv): Likewise.
3954 (emit_asrv): Likewise.
3955 (emit_mul): Likewise.
3956 (emit_sbfm): Likewise.
3957 (emit_sbfx): Likewise.
3958 (emit_ubfm): Likewise.
3959 (emit_ubfx): Likewise.
3960 (emit_csinc): Likewise.
3961 (emit_cset): Likewise.
3962 (emit_nop): Likewise.
3963 (emit_ops_insns): New helper function.
3964 (emit_pop): Likewise.
3965 (emit_push): Likewise.
3966 (aarch64_emit_prologue): New function.
3967 (aarch64_emit_epilogue): Likewise.
3968 (aarch64_emit_add): Likewise.
3969 (aarch64_emit_sub): Likewise.
3970 (aarch64_emit_mul): Likewise.
3971 (aarch64_emit_lsh): Likewise.
3972 (aarch64_emit_rsh_signed): Likewise.
3973 (aarch64_emit_rsh_unsigned): Likewise.
3974 (aarch64_emit_ext): Likewise.
3975 (aarch64_emit_log_not): Likewise.
3976 (aarch64_emit_bit_and): Likewise.
3977 (aarch64_emit_bit_or): Likewise.
3978 (aarch64_emit_bit_xor): Likewise.
3979 (aarch64_emit_bit_not): Likewise.
3980 (aarch64_emit_equal): Likewise.
3981 (aarch64_emit_less_signed): Likewise.
3982 (aarch64_emit_less_unsigned): Likewise.
3983 (aarch64_emit_ref): Likewise.
3984 (aarch64_emit_if_goto): Likewise.
3985 (aarch64_emit_goto): Likewise.
3986 (aarch64_write_goto_address): Likewise.
3987 (aarch64_emit_const): Likewise.
3988 (aarch64_emit_call): Likewise.
3989 (aarch64_emit_reg): Likewise.
3990 (aarch64_emit_pop): Likewise.
3991 (aarch64_emit_stack_flush): Likewise.
3992 (aarch64_emit_zero_ext): Likewise.
3993 (aarch64_emit_swap): Likewise.
3994 (aarch64_emit_stack_adjust): Likewise.
3995 (aarch64_emit_int_call_1): Likewise.
3996 (aarch64_emit_void_call_2): Likewise.
3997 (aarch64_emit_eq_goto): Likewise.
3998 (aarch64_emit_ne_goto): Likewise.
3999 (aarch64_emit_lt_goto): Likewise.
4000 (aarch64_emit_le_goto): Likewise.
4001 (aarch64_emit_gt_goto): Likewise.
4002 (aarch64_emit_ge_got): Likewise.
4003 (aarch64_emit_ops_impl): New static global variable.
4004 (aarch64_emit_ops): New target function, return
4005 &aarch64_emit_ops_impl.
4006 (struct linux_target_ops): Install it.
4007
bb903df0
PL
40082015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4009
4010 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4011 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4012 aarch64-ipa.o.
4013 * linux-aarch64-ipa.c: New file.
4014 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4015 and endian.h.
4016 (aarch64_get_thread_area): New target method.
4017 (extract_signed_bitfield): New helper function.
4018 (aarch64_decode_ldr_literal): New function.
4019 (enum aarch64_opcodes): New enum.
4020 (struct aarch64_register): New struct.
4021 (struct aarch64_operand): New struct.
4022 (x0): New static global.
4023 (x1): Likewise.
4024 (x2): Likewise.
4025 (x3): Likewise.
4026 (x4): Likewise.
4027 (w2): Likewise.
4028 (ip0): Likewise.
4029 (sp): Likewise.
4030 (xzr): Likewise.
4031 (aarch64_register): New helper function.
4032 (register_operand): Likewise.
4033 (immediate_operand): Likewise.
4034 (struct aarch64_memory_operand): New struct.
4035 (offset_memory_operand): New helper function.
4036 (preindex_memory_operand): Likewise.
4037 (enum aarch64_system_control_registers): New enum.
4038 (ENCODE): New macro.
4039 (emit_insn): New helper function.
4040 (emit_b): New function.
4041 (emit_bcond): Likewise.
4042 (emit_cb): Likewise.
4043 (emit_tb): Likewise.
4044 (emit_blr): Likewise.
4045 (emit_stp): Likewise.
4046 (emit_ldp_q_offset): Likewise.
4047 (emit_stp_q_offset): Likewise.
4048 (emit_load_store): Likewise.
4049 (emit_ldr): Likewise.
4050 (emit_ldrsw): Likewise.
4051 (emit_str): Likewise.
4052 (emit_ldaxr): Likewise.
4053 (emit_stxr): Likewise.
4054 (emit_stlr): Likewise.
4055 (emit_data_processing_reg): Likewise.
4056 (emit_data_processing): Likewise.
4057 (emit_add): Likewise.
4058 (emit_sub): Likewise.
4059 (emit_mov): Likewise.
4060 (emit_movk): Likewise.
4061 (emit_mov_addr): Likewise.
4062 (emit_mrs): Likewise.
4063 (emit_msr): Likewise.
4064 (emit_sevl): Likewise.
4065 (emit_wfe): Likewise.
4066 (append_insns): Likewise.
4067 (can_encode_int32_in): New helper function.
4068 (aarch64_relocate_instruction): New function.
4069 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4070 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4071 (struct linux_target_ops): Install aarch64_get_thread_area,
4072 aarch64_install_fast_tracepoint_jump_pad and
4073 aarch64_get_min_fast_tracepoint_insn_len.
4074
787749ea
PL
40752015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4076
4077 * Makefile.in (aarch64-insn.o): New rule.
4078 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4079
9812b2e6
YQ
40802015-09-21 Yao Qi <yao.qi@linaro.org>
4081
4082 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4083
18fe412b
YQ
40842015-09-21 Yao Qi <yao.qi@linaro.org>
4085
4086 * tracepoint.c (max_jump_pad_size): Remove.
4087
a0cc84cd
YQ
40882015-09-18 Yao Qi <yao.qi@linaro.org>
4089
4090 * linux-aarch64-low.c: Don't include sys/uio.h.
4091 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4092
d78908cf
WW
40932015-09-16 Wei-cheng Wang <cole945@gmail.com>
4094
4095 * tracepoint.c (eval_result_type): Change prototype.
4096 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4097
d57e0d50
PA
40982015-09-15 Pedro Alves <palves@redhat.com>
4099
4100 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4101 Check whether to report exec events instead of checking whether
4102 multiprocess is enabled.
4103
5a676acc
PA
41042015-09-15 Pedro Alves <palves@redhat.com>
4105
4106 PR remote/18965
4107 * remote-utils.c (prepare_resume_reply): Merge
4108 TARGET_WAITKIND_VFORK_DONE switch case with the
4109 TARGET_WAITKIND_FORKED case.
4110
7c5d0fad
YQ
41112015-09-15 Yao Qi <yao.qi@linaro.org>
4112
4113 * server.c (handle_query): Check string comparison using
4114 "else if" instead of "if".
4115
750ce8d1
YQ
41162015-09-15 Yao Qi <yao.qi@linaro.org>
4117
4118 * server.c (vCont_supported): New global variable.
4119 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4120 matches. Append ";vContSupported+" to own_buf.
4121 (handle_v_requests): Append ";s;S" to own_buf if target supports
4122 hardware single step or vCont_supported is false.
4123 (capture_main): Set vCont_supported to zero.
4124
70b90b91
YQ
41252015-09-15 Yao Qi <yao.qi@linaro.org>
4126
4127 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4128 it to ...
4129 (linux_supports_hardware_single_step): ... New function.
4130 (linux_target_ops): Update.
4131 * lynx-low.c (lynx_target_ops): Set field
4132 supports_hardware_single_step to target_can_do_hardware_single_step.
4133 * nto-low.c (nto_target_ops): Likewise.
4134 * spu-low.c (spu_target_ops): Likewise.
4135 * win32-low.c (win32_target_ops): Likewise.
4136 * target.c (target_can_do_hardware_single_step): New function.
4137 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4138 Remove. <supports_hardware_single_step>: New field.
4139 (target_supports_conditional_breakpoints): Remove.
4140 (target_supports_hardware_single_step): New macro.
4141 (target_can_do_hardware_single_step): Declare.
4142 * server.c (handle_query): Use target_supports_hardware_single_step
4143 instead of target_supports_conditional_breakpoints.
4144
ade90bde
YQ
41452015-09-15 Yao Qi <yao.qi@linaro.org>
4146
4147 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4148 function.
4149 (struct linux_target_ops the_low_target): Install
4150 aarch64_linux_siginfo_fixup.
4151
94585166
DB
41522015-09-11 Don Breazeal <donb@codesourcery.com>
4153 Luis Machado <lgustavo@codesourcery.com>
4154
4155 * linux-low.c (linux_mourn): Static declaration.
4156 (linux_arch_setup): Move in front of
4157 handle_extended_wait.
4158 (linux_arch_setup_thread): New function.
4159 (handle_extended_wait): Handle exec events. Call
4160 linux_arch_setup_thread. Make event_lwp argument a
4161 pointer-to-a-pointer.
4162 (check_zombie_leaders): Do not check stopped threads.
4163 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4164 (linux_low_filter_event): Add lwp and thread for exec'ing
4165 non-leader thread if leader thread has been deleted.
4166 Refactor code into linux_arch_setup_thread and call it.
4167 Pass child lwp pointer by reference to handle_extended_wait.
4168 (linux_wait_for_event_filtered): Update comment.
4169 (linux_wait_1): Prevent clobbering exec event status.
4170 (linux_supports_exec_events): New function.
4171 (linux_target_ops) <supports_exec_events>: Initialize new member.
4172 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4173 new member.
4174 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4175 * server.c (report_exec_events): New global variable.
4176 (handle_query): Handle qSupported query for exec-events feature.
4177 (captured_main): Initialize report_exec_events.
4178 * server.h (report_exec_events): Declare new global variable.
4179 * target.h (struct target_ops) <supports_exec_events>: New
4180 member.
4181 (target_supports_exec_events): New macro.
4182 * win32-low.c (win32_target_ops) <supports_exec_events>:
4183 Initialize new member.
4184
0568462b
MM
41852015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4186
4187 * linux-low.c (linux_low_enable_btrace): Remove.
4188 (linux_target_ops): Replace linux_low_enable_btrace with
4189 linux_enable_btrace.
4190
39edd165
YQ
41912015-09-03 Yao Qi <yao.qi@linaro.org>
4192
4193 * linux-aarch64-low.c (aarch64_insert_point): Call
4194 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4195 returns true.
4196
1db33b5a
UW
41972015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4198
4199 * linux-low.c (check_stopped_by_breakpoint): Use
4200 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4201
ab290430
PA
42022015-08-27 Pedro Alves <palves@redhat.com>
4203
4204 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4205
8d749320
SM
42062015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4207
6711b7f8
SM
4208 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4209 the XNEW-family equivalent.
8d749320
SM
4210 (compile_bytecodes): Likewise.
4211 * dll.c (loaded_dll): Likewise.
4212 * event-loop.c (append_callback_event): Likewise.
4213 (create_file_handler): Likewise.
4214 (create_file_event): Likewise.
4215 * hostio.c (handle_open): Likewise.
4216 * inferiors.c (add_thread): Likewise.
4217 (add_process): Likewise.
4218 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4219 * linux-arm-low.c (arm_new_process): Likewise.
4220 (arm_new_thread): Likewise.
4221 * linux-low.c (add_to_pid_list): Likewise.
4222 (linux_add_process): Likewise.
4223 (handle_extended_wait): Likewise.
4224 (add_lwp): Likewise.
4225 (enqueue_one_deferred_signal): Likewise.
4226 (enqueue_pending_signal): Likewise.
4227 (linux_resume_one_lwp_throw): Likewise.
4228 (linux_resume_one_thread): Likewise.
4229 (linux_read_memory): Likewise.
4230 (linux_write_memory): Likewise.
4231 * linux-mips-low.c (mips_linux_new_process): Likewise.
4232 (mips_linux_new_thread): Likewise.
4233 (mips_add_watchpoint): Likewise.
4234 * linux-x86-low.c (initialize_low_arch): Likewise.
4235 * lynx-low.c (lynx_add_process): Likewise.
4236 * mem-break.c (set_raw_breakpoint_at): Likewise.
4237 (set_breakpoint): Likewise.
4238 (add_condition_to_breakpoint): Likewise.
4239 (add_commands_to_breakpoint): Likewise.
4240 (clone_agent_expr): Likewise.
4241 (clone_one_breakpoint): Likewise.
4242 * regcache.c (new_register_cache): Likewise.
4243 * remote-utils.c (look_up_one_symbol): Likewise.
4244 * server.c (queue_stop_reply): Likewise.
4245 (start_inferior): Likewise.
4246 (queue_stop_reply_callback): Likewise.
4247 (handle_target_event): Likewise.
4248 * spu-low.c (fetch_ppc_memory): Likewise.
4249 (store_ppc_memory): Likewise.
4250 * target.c (set_target_ops): Likewise.
4251 * thread-db.c (thread_db_load_search): Likewise.
4252 (try_thread_db_load_1): Likewise.
4253 * tracepoint.c (add_tracepoint): Likewise.
4254 (add_tracepoint_action): Likewise.
4255 (create_trace_state_variable): Likewise.
4256 (cmd_qtdpsrc): Likewise.
4257 (cmd_qtro): Likewise.
4258 (add_while_stepping_state): Likewise.
4259 * win32-low.c (child_add_thread): Likewise.
4260 (get_image_name): Likewise.
4261
ed8b7b42
YQ
42622015-08-25 Yao Qi <yao.qi@linaro.org>
4263
4264 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4265
db3cb7cb
YQ
42662015-08-25 Yao Qi <yao.qi@linaro.org>
4267
4268 * Makefile.in (aarch64-linux.o): New rule.
4269 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4270 srv_tgtobj.
4271 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4272 (aarch64_init_debug_reg_state): Make it extern.
4273 (aarch64_linux_prepare_to_resume): Remove.
4274
f6011a1c
YQ
42752015-08-25 Yao Qi <yao.qi@linaro.org>
4276
4277 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4278 lwp_arch_private_info and ptid_of_lwp.
4279
88e2cf7e
YQ
42802015-08-25 Yao Qi <yao.qi@linaro.org>
4281
4282 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4283 Find proc_info by find_process_pid. All callers updated.
4284
5e35436e
YQ
42852015-08-25 Yao Qi <yao.qi@linaro.org>
4286
4287 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4288 Remove.
4289 (debug_reg_change_callback): Remove.
4290 (aarch64_notify_debug_reg_change): Remove.
4291
4a8a7965
YQ
42922015-08-25 Yao Qi <yao.qi@linaro.org>
4293
4294 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4295 Call current_lwp_ptid.
4296
32a271ee
YQ
42972015-08-25 Yao Qi <yao.qi@linaro.org>
4298
4299 * linux-aarch64-low.c (debug_reg_change_callback): Use
4300 debug_printf.
4301
0d51c8d7
YQ
43022015-08-25 Yao Qi <yao.qi@linaro.org>
4303
4304 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4305
31a43dd5
YQ
43062015-08-25 Yao Qi <yao.qi@linaro.org>
4307
4308 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4309
8ee52567
YQ
43102015-08-25 Yao Qi <yao.qi@linaro.org>
4311
4312 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4313 the code.
4314
ff3f0f45
YQ
43152015-08-25 Yao Qi <yao.qi@linaro.org>
4316
4317 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4318 Remove.
4319 (debug_reg_change_callback): Remove argument entry and add argument
4320 lwp. Remove local variable thread. Don't print thread id in the
4321 debugging output. Don't check whether pid of thread equals to pid.
4322 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4323 iterate_over_lwps instead find_inferior.
4324
3d40fbb5
PA
43252015-08-24 Pedro Alves <palves@redhat.com>
4326
4327 * inferiors.c (get_first_process): New function.
4328 * inferiors.h (get_first_process): New declaration.
4329 * remote-utils.c (read_ptid): Default to the first process in the
4330 list, instead of to the current thread's process.
4331
438e1e42
PA
43322015-08-24 Pedro Alves <palves@redhat.com>
4333
4334 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4335 * event-loop.c: Likewise.
4336 * remote-utils.c: Likewise.
4337 * tracepoint.c: Likewise.
4338
a8c6d4fc
PA
43392015-08-24 Pedro Alves <palves@redhat.com>
4340
4341 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4342 ptid_get_lwp.
4343
99b0bb12
PA
43442015-08-21 Pedro Alves <palves@redhat.com>
4345
4346 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4347 instead of literal 1.
4348
f8904751
PA
43492015-08-21 Pedro Alves <palves@redhat.com>
4350
4351 * tdesc.c (default_description): Explicitly zero-initialize.
4352
465a859e
PA
43532015-08-21 Pedro Alves <palves@redhat.com>
4354
4355 PR gdb/18749
4356 * inferiors.c (remove_thread): Discard any pending stop reply for
4357 this thread.
4358 * server.c (remove_all_on_match_pid): Rename to ...
4359 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4360 instead of a pid.
4361 (discard_queued_stop_replies): Change parameter to a ptid. Now
4362 extern.
4363 (handle_v_kill, kill_inferior_callback, captured_main)
4364 (process_serial_event): Adjust.
4365 * server.h (discard_queued_stop_replies): Declare.
4366
f0db101d
PA
43672015-08-21 Pedro Alves <palves@redhat.com>
4368
4369 * linux-low.c (wait_for_sigstop): Always switch to no thread
4370 selected if the previously current thread dies.
4371 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4372 process instead of the current thread's.
4373 * remote-utils.c (input_interrupt): Don't check if there's no
4374 current thread.
4375 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4376 current thread to the general thread fails, error out.
4377 (handle_qxfer_auxv, handle_qxfer_libraries)
4378 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4379 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4380 (handle_query): Check if there's a thread selected instead of
4381 checking whether there's any thread in the thread list.
4382 (handle_qxfer_threads, handle_qxfer_btrace)
4383 (handle_qxfer_btrace_conf): Don't error out early if there's no
4384 thread in the thread list.
4385 (handle_v_cont, myresume): Don't set the current thread to the
4386 continue thread.
4387 (process_serial_event) <Hg handling>: Also set thread_id if the
4388 previous general thread is still alive.
4389 (process_serial_event) <g/G handling>: If setting the current
4390 thread to the general thread fails, error out.
4391 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4392 thread's lwp instead of the current thread's.
4393 * target.c (set_desired_thread): If the desired thread was not
4394 found, leave the current thread pointing to NULL. Return an int
4395 (boolean) indicating success.
4396 * target.h (set_desired_thread): Change return type to int.
4397
40045d91
MF
43982015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4399
4400 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4401 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4402 #includes.
4403 (ps_get_thread_area): New function.
4404
45face3b
GB
44052015-08-19 Gary Benson <gbenson@redhat.com>
4406
4407 * hostio.c (handle_pread): Do not attempt to read more data
4408 than hostio_reply_with_data can fit in a packet.
4409
16d5f642
JB
44102015-08-18 Joel Brobecker <brobecker@adacore.com>
4411
4412 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4413
a738da3a
MF
44142015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4415
4416 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4417
33ebda9d
PA
44182015-08-06 Pedro Alves <palves@redhat.com>
4419
4420 * tracepoint.c (expr_eval_result): Now an int.
4421
a44892be
PA
44222015-08-06 Pedro Alves <palves@redhat.com>
4423
4424 * gdbthread.h (struct regcache): Forward declare.
4425 (struct thread_info) <regcache_data>: Now a struct regcache
4426 pointer.
4427 * inferiors.c (inferior_regcache_data)
4428 (set_inferior_regcache_data): Now work with struct regcache
4429 pointers.
4430 * inferiors.h (struct regcache): Forward declare.
4431 (inferior_regcache_data, set_inferior_regcache_data): Now work
4432 with struct regcache pointers.
4433 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4434 (free_register_cache_thread): Remove struct regcache pointer
4435 casts.
4436
608a1e46
PA
44372015-08-06 Pedro Alves <palves@redhat.com>
4438
4439 * server.c (captured_main): On error, print the exception message
4440 to stderr, and if run_once is set, throw a quit.
4441
f0ce0d3a
PA
44422015-08-06 Pedro Alves <palves@redhat.com>
4443
4444 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4445 the current thread.
4446
bf47e248
PA
44472015-08-06 Pedro Alves <palves@redhat.com>
4448
4449 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4450 reading beyond the passed in buffer length.
4451
b6b9ffcc
PL
44522015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4453
4454 * tracepoint.c (symbol_list) <required>: Remove.
4455
863d01bd
PA
44562015-08-06 Pedro Alves <palves@redhat.com>
4457
4458 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4459 count if stopping and suspending threads.
4460 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4461 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4462 (linux_detach): Complete an ongoing step-over.
4463 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4464 throughout.
4465 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4466 (linux_wait_1): If passing a signal to the inferior after
4467 finishing a step-over, unsuspend and re-resume all lwps. If we
4468 see a single-step event but the thread should be continuing, don't
4469 pass the trap to gdb.
4470 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4471 internal_error instead of gdb_assert.
4472 (enqueue_pending_signal): New function.
4473 (check_ptrace_stopped_lwp_gone): Add debug output.
4474 (start_step_over): Use internal_error instead of gdb_assert.
4475 (complete_ongoing_step_over): New function.
4476 (linux_resume_one_thread): Don't resume a suspended thread.
4477 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4478 it stepping.
4479
00db26fa
PA
44802015-08-06 Pedro Alves <palves@redhat.com>
4481
4482 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4483 (linux_thread_alive): Use lwp_is_marked_dead.
4484 (extended_event_reported): Delete.
4485 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4486 instead of extended_event_reported.
4487 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4488 as well.
4489 (lwp_is_marked_dead): New function.
4490 (lwp_running): Use lwp_is_marked_dead.
4491 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4492 comment.
4493
ad071a30
PA
44942015-08-06 Pedro Alves <palves@redhat.com>
4495
4496 * linux-low.c (linux_wait_1): Move fork event output out of the
4497 !report_to_gdb check. Pass event_child->waitstatus to
4498 target_waitstatus_to_string instead of ourstatus.
4499
524b57e6
YQ
45002015-08-04 Yao Qi <yao.qi@linaro.org>
4501
4502 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4503 if current_thread is 32 bit.
4504
6085d6f6
YQ
45052015-08-04 Yao Qi <yao.qi@linaro.org>
4506
4507 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4508 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4509 * server.c (extended_protocol): Remove "static".
4510 * server.h (extended_protocol): Declare it.
4511
8a7e4587
YQ
45122015-08-04 Yao Qi <yao.qi@linaro.org>
4513
4514 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4515 both aarch64 and aarch32.
4516 (aarch64_set_pc): Likewise.
4517
3b53ae99
YQ
45182015-08-04 Yao Qi <yao.qi@linaro.org>
4519
4520 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4521 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4522 arm-with-neon.xml to srv_xmlfiles.
4523 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4524 (is_64bit_tdesc): New function.
4525 (aarch64_linux_read_description): New function.
4526 (aarch64_arch_setup): Call aarch64_linux_read_description.
4527 (regs_info): Rename to regs_info_aarch64.
4528 (aarch64_regs_info): Return right regs_info.
4529 (initialize_low_arch): Call initialize_low_arch_aarch32.
4530
bd9e6534
YQ
45312015-08-04 Yao Qi <yao.qi@linaro.org>
4532
4533 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4534 * linux-aarch32-low.c: New file.
4535 * linux-aarch32-low.h: New file.
4536 * linux-arm-low.c (arm_fill_gregset): Move it to
4537 linux-aarch32-low.c.
4538 (arm_store_gregset): Likewise.
4539 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4540 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4541 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4542 (regs_info): Rename to regs_info_arm.
4543 (arm_regs_info): Return regs_info_aarch32 if
4544 have_ptrace_getregset is 1 and target description is
4545 arm_with_neon or arm_with_vfpv3.
4546 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4547 Call initialize_low_arch_aarch32 instead.
4548
ded48a5e
YQ
45492015-08-04 Yao Qi <yao.qi@linaro.org>
4550
4551 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4552 * linux-low.c: ... here.
4553 * linux-low.h (have_ptrace_getregset): Declare it.
4554
96e9210f
PA
45552015-08-04 Pedro Alves <palves@redhat.com>
4556
4557 * thread-db.c (struct thread_db): Use new typedefs.
4558 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4559 CHK calls.
4560 (disable_thread_event_reporting): Cast result of dlsym to
4561 destination function pointer type.
4562 (thread_db_mourn): Use td_ta_delete_ftype.
4563
af60a1ef
SL
45642015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4565
4566 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4567 arch variant.
4568 (CDX_BREAKPOINT): Define for R2.
4569 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4570 (the_low_target): Add comments.
4571
e8b41681
YQ
45722015-07-30 Yao Qi <yao.qi@linaro.org>
4573
4574 * linux-arm-low.c (arm_hwcap): Remove it.
4575 (arm_read_description): New local variable arm_hwcap. Don't
4576 set arm_hwcap to zero.
4577
89abb039
YQ
45782015-07-30 Yao Qi <yao.qi@linaro.org>
4579
4580 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4581 Use regcache->tdesc instead.
4582 (arm_store_wmmxregset): Likewise.
4583 (arm_fill_vfpregset): Likewise.
4584 (arm_store_vfpregset): Likewise.
4585
deca266c
YQ
45862015-07-30 Yao Qi <yao.qi@linaro.org>
4587
4588 * linux-arm-low.c: Include arch/arm.h.
4589 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4590 (arm_store_gregset): Likewise.
4591
aa58a496
SM
45922015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4593
4594 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4595 ptrace's 4th parameter.
4596
50904b25
YQ
45972015-07-27 Yao Qi <yao.qi@linaro.org>
4598
4599 * configure.srv (case aarch64*-*-linux*): Don't set
4600 srv_linux_usrregs.
4601
5826e159
PA
46022015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4603
4604 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4605 sys/ptrace.h.
4606 * linux-arm-low.c: Likewise.
4607 * linux-cris-low.c: Likewise.
4608 * linux-crisv32-low.c: Likewise.
4609 * linux-low.c: Likewise.
4610 * linux-m68k-low.c: Likewise.
4611 * linux-mips-low.c: Likewise.
4612 * linux-nios2-low.c: Likewise.
4613 * linux-s390-low.c: Likewise.
4614 * linux-sparc-low.c: Likewise.
4615 * linux-tic6x-low.c: Likewise.
4616 * linux-tile-low.c: Likewise.
4617 * linux-x86-low.c: Likewise.
4618
54019719
PA
46192015-07-24 Pedro Alves <palves@redhat.com>
4620
4621 * config.in: Regenerate.
4622 * configure: Regenerate.
4623
eb7aa561
PA
46242015-07-24 Pedro Alves <palves@redhat.com>
4625
4626 * acinclude.m4: Include ../ptrace.m4.
4627 * configure.ac: Call GDB_AC_PTRACE.
4628 * config.in, configure: Regenerate.
4629
55d7b841
YQ
46302015-07-24 Yao Qi <yao.qi@linaro.org>
4631
4632 * linux-low.c (linux_create_inferior): Remove setting to
4633 proc->priv->new_inferior.
4634 (linux_attach): Likewise.
4635 (linux_low_filter_event): Likewise.
4636 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4637
c06cbd92
YQ
46382015-07-24 Yao Qi <yao.qi@linaro.org>
4639
4640 * linux-low.c (linux_arch_setup): New function.
4641 (linux_low_filter_event): If proc->tdesc is NULL and
4642 proc->attached is true, call the_low_target.arch_setup.
4643 Otherwise, keep status pending, and return.
4644 (linux_resume_one_lwp_throw): Don't call get_pc if
4645 thread->while_stepping isn't NULL. Don't call
4646 get_thread_regcache if proc->tdesc is NULL.
4647 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4648 (linux_target_ops): Install arch_setup.
4649 * server.c (start_inferior): Call the_target->arch_setup.
4650 * target.h (struct target_ops) <arch_setup>: New field.
4651 (target_arch_setup): New marco.
4652 * lynx-low.c (lynx_target_ops): Update.
4653 * nto-low.c (nto_target_ops): Update.
4654 * spu-low.c (spu_target_ops): Update.
4655 * win32-low.c (win32_target_ops): Update.
4656
5ae3ebba
YQ
46572015-07-24 Yao Qi <yao.qi@linaro.org>
4658
4659 * linux-low.c (linux_add_process): Don't set
4660 proc->priv->new_inferior.
4661 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4662 (linux_attach): Likewise.
4663
eb97750b
YQ
46642015-07-24 Yao Qi <yao.qi@linaro.org>
4665
4666 * server.c (start_inferior): Code refactor.
4667
51aee833
YQ
46682015-07-24 Yao Qi <yao.qi@linaro.org>
4669
4670 * server.c (process_serial_event): Set general_thread.
4671
af1b22f3
YQ
46722015-07-21 Yao Qi <yao.qi@linaro.org>
4673
4674 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4675 aarch64_linux_get_debug_reg_capacity.
4676
554717a3
YQ
46772015-07-17 Yao Qi <yao.qi@linaro.org>
4678
4679 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4680 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4681 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4682 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4683 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4684 (AARCH64_HWP_ALIGNMENT): Likewise.
4685 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4686 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4687 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4688 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4689 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4690 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4691 (struct aarch64_debug_reg_state): Likewise.
4692 (struct arch_lwp_info): Likewise.
4693 (aarch64_align_watchpoint): Likewise.
4694 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4695 (aarch64_watchpoint_length): Likewise.
4696 (aarch64_point_encode_ctrl_reg): Likewise
4697 (aarch64_point_is_aligned): Likewise.
4698 (aarch64_align_watchpoint): Likewise.
4699 (aarch64_linux_set_debug_regs):
4700 (aarch64_dr_state_insert_one_point): Likewise.
4701 (aarch64_dr_state_remove_one_point): Likewise.
4702 (aarch64_handle_breakpoint): Likewise.
4703 (aarch64_handle_aligned_watchpoint): Likewise.
4704 (aarch64_handle_unaligned_watchpoint): Likewise.
4705 (aarch64_handle_watchpoint): Likewise.
4706
c67ca4de
YQ
47072015-07-17 Yao Qi <yao.qi@linaro.org>
4708
4709 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4710 and don't aarch64_get_debug_reg_state. All callers update.
4711 (aarch64_handle_aligned_watchpoint): Likewise.
4712 (aarch64_handle_unaligned_watchpoint): Likewise.
4713 (aarch64_handle_watchpoint): Likewise.
4714 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4715 (aarch64_remove_point): Likewise.
4716
25abf979
YQ
47172015-07-17 Yao Qi <yao.qi@linaro.org>
4718
4719 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4720 debug_printf.
4721 (aarch64_handle_unaligned_watchpoint): Likewise.
4722
db1ff28b
JK
47232015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4724
4725 Revert the previous 3 commits:
4726 Move gdb_regex* to common/
4727 Move linux_find_memory_regions_full & co.
4728 gdbserver build-id attribute generator
4729
700ca40f
JK
47302015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4731 Jan Kratochvil <jan.kratochvil@redhat.com>
4732
4733 gdbserver build-id attribute generator.
4734 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4735 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4736 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4737 (find_phdr): New.
4738 (get_dynamic): Use find_pdhr to traverse program headers.
4739 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4740 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4741 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4742 (get_hex_build_id): New.
4743 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4744 to reply XML document.
4745
9904185c
JK
47462015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4747 Jan Kratochvil <jan.kratochvil@redhat.com>
4748
4749 * target.c: Include target/target-utils.h and fcntl.h.
4750 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4751 (target_fileio_read_stralloc): New functions.
4752
6e5b4429
JK
47532015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4754
4755 * Makefile.in (OBS): Add gdb_regex.o.
4756 (gdb_regex.o): New.
4757 * config.in: Rebuilt.
4758 * configure: Rebuilt.
4759
ddc98fbf
JK
47602015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4761 Jan Kratochvil <jan.kratochvil@redhat.com>
4762
4763 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4764 * Makefile.in (OBS): Add target-utils.o.
4765 (linux-maps.o, target-utils.o): New.
4766 * configure.srv (srv_linux_obj): Add linux-maps.o.
4767
e57bb7a0
PL
47682015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4769
4770 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4771 function, return 1.
4772 (the_low_target): Install it.
4773
586b02a9
PA
47742015-07-14 Pedro Alves <palves@redhat.com>
4775
4776 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4777 Instead, ignore ECHILD, and throw an error for other errnos.
4778
58c1b36c
PA
47792015-07-10 Pedro Alves <palves@redhat.com>
4780
4781 * event-loop.c (struct callback_event) <data>: Change type to
4782 gdb_client_data instance instead of gdb_client_data pointer.
4783 (append_callback_event): Adjust.
4784
421530db
PL
47852015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4786
4787 * linux-aarch64-low.c: Add comments for each linux_target_ops
4788 method. Remove comments already covered in target_ops and
4789 linux_target_ops definitions.
4790 (the_low_target): Add comments for each unimplemented method.
4791
c2d65f38
YQ
47922015-07-09 Yao Qi <yao.qi@linaro.org>
4793
4794 * linux-aarch64-low.c (aarch64_regmap): Remove.
4795 (aarch64_usrregs_info): Remove.
4796 (regs_info): Set field usrregs to NULL.
4797
b20a6524
MM
47982015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4799
4800 * linux-low.c: Include "rsp-low.h"
4801 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4802 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4803 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4804 (handle_btrace_enable_pt): New.
4805 (handle_btrace_general_set): Support "pt".
4806 (handle_btrace_conf_general_set): Support "pt:size".
4807
96c97461
PL
48082015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4809
4810 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4811 Z_PACKET_SW_BP.
4812
37d66942
PL
48132015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4814
4815 * linux-aarch64-low.c: Remove comment about endianness.
4816 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4817 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4818 memcmp.
4819
dc06243f
GB
48202015-06-24 Gary Benson <gbenson@redhat.com>
4821
4822 * linux-i386-ipa.c (stdint.h): Do not include.
4823 * lynx-i386-low.c (stdint.h): Likewise.
4824 * lynx-ppc-low.c (stdint.h): Likewise.
4825 * mem-break.c (stdint.h): Likewise.
4826 * thread-db.c (stdint.h): Likewise.
4827 * tracepoint.c (stdint.h): Likewise.
4828 * win32-low.c (stdint.h): Likewise.
4829
124e13d9
SM
48302015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4831
4832 * server.c (write_qxfer_response): Update call to
4833 remote_escape_output.
4834
909c2cda
JK
48352015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4836 Jan Kratochvil <jan.kratochvil@redhat.com>
4837
4838 Merge multiple hex conversions.
4839 * gdbreplay.c (tohex): Rename to 'fromhex'.
4840 (logchar): Use fromhex.
4841
24c05f46
JK
48422015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4843
4844 * server.c (handle_qxfer_libraries): Set `version' attribute for
4845 <library-list>.
4846
14d2069a
GB
48472015-06-10 Gary Benson <gbenson@redhat.com>
4848
4849 * target.h (struct target_ops) <multifs_open>: New field.
4850 <multifs_unlink>: Likewise.
4851 <multifs_readlink>: Likewise.
4852 * linux-low.c (nat/linux-namespaces.h): New include.
4853 (linux_target_ops): Initialize the_target->multifs_open,
4854 the_target->multifs_unlink and the_target->multifs_readlink.
4855 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4856 * hostio.c (hostio_fs_pid): New static variable.
4857 (hostio_handle_new_gdb_connection): New function.
4858 (handle_setfs): Likewise.
4859 (handle_open): Use the_target->multifs_open as appropriate.
4860 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4861 (handle_readlink): Use the_target->multifs_readlink as
4862 appropriate.
4863 (handle_vFile): Handle vFile:setfs packets.
4864 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4865 after target_handle_new_gdb_connection.
4866
4b8b5e72
GB
48672015-06-10 Gary Benson <gbenson@redhat.com>
4868
4869 * configure.ac (AC_CHECK_FUNCS): Add setns.
4870 * config.in: Regenerate.
4871 * configure: Likewise.
4872 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4873 (linux-namespaces.o): New rule.
4874 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4875
3ac2e371
GB
48762015-06-09 Gary Benson <gbenson@redhat.com>
4877
4878 * hostio.c (handle_open): Process mode argument with
4879 fileio_to_host_mode.
4880
ca9b78ce
YQ
48812015-06-01 Yao Qi <yao.qi@linaro.org>
4882
4883 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4884 * linux-x86-low.c: Likewise.
4885
bfacd19d
DB
48862015-05-28 Don Breazeal <donb@codesourcery.com>
4887
4888 * linux-low.c (handle_extended_wait): Initialize
4889 thread_info.last_resume_kind for new fork children.
4890
452003ef
PA
48912015-05-15 Pedro Alves <palves@redhat.com>
4892
4893 * target.h (target_handle_new_gdb_connection): Rewrite using if
4894 wrapped in do/while.
4895
1041a03c
JB
48962015-05-14 Joel Brobecker <brobecker@adacore.com>
4897
4898 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4899 * configure, config.in: Regenerate.
4900 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4901 Declare typedef.
4902
c269dbdb
DB
49032015-05-12 Don Breazeal <donb@codesourcery.com>
4904
4905 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4906 PTRACE_EVENT_VFORK_DONE.
4907 (linux_low_ptrace_options, extended_event_reported): Add vfork
4908 events.
4909 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4910 and "vforkdone" for RSP 'T' Stop Reply Packet.
4911 * server.h (report_vfork_events): Declare
4912 global variable.
4913
3a8a0396
DB
49142015-05-12 Don Breazeal <donb@codesourcery.com>
4915
4916 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4917 (the_low_target) <new_fork>: Initialize new member.
4918 * linux-arm-low.c (arm_new_fork): New function.
4919 (the_low_target) <new_fork>: Initialize new member.
4920 * linux-low.c (handle_extended_wait): Call new target function
4921 new_fork.
4922 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4923 * linux-mips-low.c (mips_add_watchpoint): New function
4924 extracted from mips_insert_point.
4925 (the_low_target) <new_fork>: Initialize new member.
4926 (mips_linux_new_fork): New function.
4927 (mips_insert_point): Call mips_add_watchpoint.
4928 * linux-x86-low.c (x86_linux_new_fork): New function.
4929 (the_low_target) <new_fork>: Initialize new member.
4930
de0d863e
DB
49312015-05-12 Don Breazeal <donb@codesourcery.com>
4932
4933 * linux-low.c (handle_extended_wait): Implement return value,
4934 rename argument 'event_child' to 'event_lwp', handle
4935 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4936 (linux_low_ptrace_options): New function.
4937 (linux_low_filter_event): Call linux_low_ptrace_options,
4938 use different argument fo linux_enable_event_reporting,
4939 use return value from handle_extended_wait.
4940 (extended_event_reported): New function.
4941 (linux_wait_1): Call extended_event_reported and set
4942 status to report fork events.
4943 (linux_write_memory): Add pid to debug message.
4944 (reset_lwp_ptrace_options_callback): New function.
4945 (linux_handle_new_gdb_connection): New function.
4946 (linux_target_ops): Initialize new structure member.
4947 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4948 * lynx-low.c: Initialize new structure member.
4949 * remote-utils.c (prepare_resume_reply): Implement stop reason
4950 "fork" for "T" stop message.
4951 * server.c (handle_query): Call handle_new_gdb_connection.
4952 * server.h (report_fork_events): Declare global flag.
4953 * target.h (struct target_ops) <handle_new_gdb_connection>:
4954 New member.
4955 (target_handle_new_gdb_connection): New macro.
4956 * win32-low.c: Initialize new structure member.
4957
ddcbc397
DB
49582015-05-12 Don Breazeal <donb@codesourcery.com>
4959
4960 * mem-break.c (APPEND_TO_LIST): Define macro.
4961 (clone_agent_expr): New function.
4962 (clone_one_breakpoint): New function.
4963 (clone_all_breakpoints): New function.
4964 * mem-break.h: Declare new functions.
4965
89245bc0
DB
49662015-05-12 Don Breazeal <donb@codesourcery.com>
4967
4968 * linux-low.c (linux_supports_fork_events): New function.
4969 (linux_supports_vfork_events): New function.
4970 (linux_target_ops): Initialize new structure members.
4971 (initialize_low): Call linux_check_ptrace_features.
4972 * lynx-low.c (lynx_target_ops): Initialize new structure
4973 members.
4974 * server.c (report_fork_events, report_vfork_events):
4975 New global flags.
4976 (handle_query): Add new features to qSupported packet and
4977 response.
4978 (captured_main): Initialize new global variables.
4979 * target.h (struct target_ops) <supports_fork_events>:
4980 New member.
4981 <supports_vfork_events>: New member.
4982 (target_supports_fork_events): New macro.
4983 (target_supports_vfork_events): New macro.
4984 * win32-low.c (win32_target_ops): Initialize new structure
4985 members.
4986
835205d0
GB
49872015-05-12 Gary Benson <gbenson@redhat.com>
4988
4989 * server.c (handle_qxfer_exec_file): Use current process
4990 if annex is empty.
4991
21e94bd9
SL
49922015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4993
4994 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4995 Remove HAVE_PTRACE_GETREGS conditionals.
4996 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4997 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4998
45614f15
YQ
49992015-05-08 Yao Qi <yao.qi@linaro.org>
5000
5001 * linux-low.c (linux_supports_conditional_breakpoints): New
5002 function.
5003 (linux_target_ops): Install new target method.
5004 * lynx-low.c (lynx_target_ops): Install NULL hook for
5005 supports_conditional_breakpoints.
5006 * nto-low.c (nto_target_ops): Likewise.
5007 * spu-low.c (spu_target_ops): Likewise.
5008 * win32-low.c (win32_target_ops): Likewise.
5009 * server.c (handle_query): Check
5010 target_supports_conditional_breakpoints.
5011 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5012 New field.
5013 (target_supports_conditional_breakpoints): New macro.
5014
80ad801e
PA
50152015-05-06 Pedro Alves <palves@redhat.com>
5016
5017 PR server/18081
5018 * server.c (start_inferior): If the process exits, mourn it.
5019
819843c7
GB
50202015-04-21 Gary Benson <gbenson@redhat.com>
5021
5022 * hostio.c (fileio_open_flags_to_host): Factored out to
5023 fileio_to_host_openflags in common/fileio.c. Single use
5024 updated.
5025
a2d5a9d7
MF
50262015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5027
5028 * linux-xtensa-low.c (xtensa_fill_gregset)
5029 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5030 XCHAL_HAVE_LOOP.
5031
deb44829
MF
50322015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5033
5034 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5035 (regs_info): Replace usrregs pointer with NULL.
5036
e57f1de3
GB
50372015-04-17 Gary Benson <gbenson@redhat.com>
5038
5039 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5040 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5041 * server.c (handle_qxfer_exec_file): New function.
5042 (qxfer_packets): Add exec-file entry.
5043 (handle_query): Report qXfer:exec-file:read as supported packet.
5044
62828379
RN
50452015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5046
5047 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5048
b88bb450
GB
50492015-04-09 Gary Benson <gbenson@redhat.com>
5050
5051 * hostio-errno.c (errno_to_fileio_error): Remove function.
5052 Update caller to use remote_fileio_to_fio_error.
5053
c8f4bfdd
YQ
50542015-04-09 Yao Qi <yao.qi@linaro.org>
5055
5056 * linux-low.c (linux_insert_point): Call
5057 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5058 (linux_remove_point): Call remove_memory_breakpoint if type is
5059 raw_bkpt_type_sw.
5060 * linux-x86-low.c (x86_insert_point): Don't call
5061 insert_memory_breakpoint.
5062 (x86_remove_point): Don't call remove_memory_breakpoint.
5063
41f98f02
PA
50642015-04-01 Pedro Alves <palves@redhat.com>
5065 Cleber Rosa <crosa@redhat.com>
5066
5067 * server.c (gdbserver_usage): Reorganize and extend the usage
5068 message.
5069
2bf6fb9d
PA
50702015-03-24 Pedro Alves <palves@redhat.com>
5071
5072 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5073 output. Also dump TRAP_TRACE.
5074 (linux_low_filter_event): In debug output, distinguish a
5075 resume_stop SIGSTOP from a delayed SIGSTOP.
5076
369f6daa
GB
50772015-03-24 Gary Benson <gbenson@redhat.com>
5078
5079 * linux-x86-low.c (x86_linux_new_thread): Moved to
5080 nat/x86-linux.c.
5081 (x86_linux_prepare_to_resume): Likewise.
5082
8e5d4070
GB
50832015-03-24 Gary Benson <gbenson@redhat.com>
5084
5085 * Makefile.in (x86-linux-dregs.o): New rule.
5086 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5087 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5088 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5089 (x86_linux_dr_get): Likewise.
5090 (x86_linux_dr_set): Likewise.
5091 (update_debug_registers_callback): Likewise.
5092 (x86_linux_dr_set_addr): Likewise.
5093 (x86_linux_dr_get_addr): Likewise.
5094 (x86_linux_dr_set_control): Likewise.
5095 (x86_linux_dr_get_control): Likewise.
5096 (x86_linux_dr_get_status): Likewise.
5097 (x86_linux_update_debug_registers): Likewise.
5098
2b95d440
GB
50992015-03-24 Gary Benson <gbenson@redhat.com>
5100
5101 * linux-x86-low.c (x86_linux_update_debug_registers):
5102 New function, factored out from...
5103 (x86_linux_prepare_to_resume): ...this.
5104
14b0bc68
GB
51052015-03-24 Gary Benson <gbenson@redhat.com>
5106
5107 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5108 (x86_linux_dr_set): Likewise.
5109 (update_debug_registers_callback): Likewise.
5110 (x86_linux_dr_set_addr): Likewise.
5111 (x86_linux_dr_get_addr): Likewise.
5112 (x86_linux_dr_set_control): Likewise.
5113 (x86_linux_dr_get_control): Likewise.
5114 (x86_linux_dr_get_status): Likewise.
5115 (x86_linux_prepare_to_resume): Likewise.
5116
5dfe6ca8
GB
51172015-03-24 Gary Benson <gbenson@redhat.com>
5118
5119 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5120 Use perror_with_name. Pass string through gettext.
5121 (x86_linux_dr_set): Likewise.
5122
d33472ad
GB
51232015-03-24 Gary Benson <gbenson@redhat.com>
5124
5125 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5126 (x86_linux_dr_set_addr): ...this.
5127 (x86_dr_low_get_addr): Rename to...
5128 (x86_linux_dr_get_addr): ...this.
5129 (x86_dr_low_set_control): Rename to...
5130 (x86_linux_dr_set_control): ...this.
5131 (x86_dr_low_get_control): Rename to...
5132 (x86_linux_dr_get_control): ...this.
5133 (x86_dr_low_get_status): Rename to...
5134 (x86_linux_dr_get_status): ...this.
5135 (x86_dr_low): Update with new function names.
5136
4b134ca1
GB
51372015-03-24 Gary Benson <gbenson@redhat.com>
5138
5139 * Makefile.in (x86-linux.o): New rule.
5140 * configure.srv: Add x86-linux.o to relevant targets.
5141 * linux-low.c (lwp_set_arch_private_info): New function.
5142 (lwp_arch_private_info): Likewise.
5143 * linux-x86-low.c: Include nat/x86-linux.h.
5144 (arch_lwp_info): Removed structure.
5145 (update_debug_registers_callback):
5146 Use lwp_set_debug_registers_changed.
5147 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5148 and lwp_set_debug_registers_changed.
5149 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5150
34c703da
GB
51512015-03-24 Gary Benson <gbenson@redhat.com>
5152
5153 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5154 * linux-arm-low.c (arm_new_thread): Likewise.
5155 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5156 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5157 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5158 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5159
cff068da
GB
51602015-03-24 Gary Benson <gbenson@redhat.com>
5161
5162 * linux-low.c (ptid_of_lwp): New function.
5163 (lwp_is_stopped): Likewise.
5164 (lwp_stop_reason): Likewise.
5165 * linux-x86-low.c (update_debug_registers_callback):
5166 Use lwp_is_stopped.
5167 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5168 lwp_stop_reason.
5169
b2f7c7e8
GB
51702015-03-24 Gary Benson <gbenson@redhat.com>
5171
5172 * linux-low.h (linux_stop_lwp): Remove declaration.
5173
6d4ee8c6
GB
51742015-03-24 Gary Benson <gbenson@redhat.com>
5175
5176 * linux-low.h: Include nat/linux-nat.h.
5177 * linux-low.c (iterate_over_lwps_args): New structure.
5178 (iterate_over_lwps_filter): New function.
5179 (iterate_over_lwps): Likewise.
5180 * linux-x86-low.c (update_debug_registers_callback):
5181 Update signature to what iterate_over_lwps expects.
5182 Remove PID check that iterate_over_lwps now performs.
5183 (x86_dr_low_set_addr): Use iterate_over_lwps.
5184 (x86_dr_low_set_control): Likewise.
5185
70a0bb6b
GB
51862015-03-24 Gary Benson <gbenson@redhat.com>
5187
5188 * linux-x86-low.c (x86_debug_reg_state): New function.
5189 (x86_linux_prepare_to_resume): Use the above.
5190
7b669087
GB
51912015-03-24 Gary Benson <gbenson@redhat.com>
5192
5193 * linux-low.c (current_lwp_ptid): New function.
5194 * linux-x86-low.c: Include nat/linux-nat.h.
5195 (x86_dr_low_get_addr): Use current_lwp_ptid.
5196 (x86_dr_low_get_control): Likewise.
5197 (x86_dr_low_get_status): Likewise.
5198
eef49a3d
PA
51992015-03-20 Pedro Alves <palves@redhat.com>
5200
5201 * tracepoint.c (cmd_qtstatus): Make "str" const.
5202
b2333d22
PA
52032015-03-20 Pedro Alves <palves@redhat.com>
5204
5205 * server.c (handle_general_set): Make "req_str" const.
5206
23f238d3
PA
52072015-03-19 Pedro Alves <palves@redhat.com>
5208
5209 * linux-low.c (linux_resume_one_lwp): Rename to ...
5210 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5211 instead call perror_with_name.
5212 (check_ptrace_stopped_lwp_gone): New function.
5213 (linux_resume_one_lwp): Reimplement as wrapper around
5214 linux_resume_one_lwp_throw that swallows errors if the LWP is
5215 gone.
5216
91baf43f
PA
52172015-03-19 Pedro Alves <palves@redhat.com>
5218
5219 * linux-low.c (count_events_callback, select_event_lwp_callback):
5220 No longer check whether the thread has resume_stop as last resume
5221 kind.
5222
8bf3b159
PA
52232015-03-19 Pedro Alves <palves@redhat.com>
5224
5225 * linux-low.c (count_events_callback, select_event_lwp_callback):
5226 Use the lwp's status_pending_p field, not the thread's.
5227
b90fc188
PA
52282015-03-19 Pedro Alves <palves@redhat.com>
5229
5230 * linux-low.c (select_event_lwp_callback): Update comments to
5231 no longer mention SIGTRAP.
5232
464b0089
GB
52332015-03-18 Gary Benson <gbenson@redhat.com>
5234
5235 * server.c (handle_query): Do not report vFile:fstat as supported.
5236
aa9e327f
GB
52372015-03-11 Gary Benson <gbenson@redhat.com>
5238
5239 * hostio.c (sys/types.h): New include.
5240 (sys/stat.h): Likewise.
5241 (common-remote-fileio.h): Likewise.
5242 (handle_fstat): New function.
5243 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5244
791c0056
GB
52452015-03-11 Gary Benson <gbenson@redhat.com>
5246
5247 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5248 struct stat.st_blocks and struct stat.st_blksize.
5249 * configure: Regenerate.
5250 * config.in: Likewise.
5251 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5252 (OBS): Add common-remote-fileio.o.
5253 (common-remote-fileio.o): New rule.
5254
9a9df970
PA
52552015-03-09 Pedro Alves <palves@redhat.com>
5256
5257 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5258 'struct sockaddr' pointer in 'accept' call.
5259
9eb1356e
PA
52602015-03-09 Pedro Alves <palves@redhat.com>
5261
5262 Revert:
5263 2015-03-07 Pedro Alves <palves@redhat.com>
5264 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5265 or <winsock2.h> here. Instead include "gdb_socket.h".
5266 (remote_open): Use union gdb_sockaddr_u.
5267 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5268 or <winsock2.h> here. Instead include "gdb_socket.h".
5269 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5270 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5271 or <sys/un.h>.
5272 (init_named_socket, gdb_agent_helper_thread): Use union
5273 gdb_sockaddr_u.
5274
aac331e4
PA
52752015-03-07 Pedro Alves <palves@redhat.com>
5276
5277 * configure.ac (build_warnings): Move
5278 -Wdeclaration-after-statement to the C-specific set.
5279 * configure: Regenerate.
5280
366c75fc
PA
52812015-03-07 Pedro Alves <palves@redhat.com>
5282
5283 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5284 or <winsock2.h> here. Instead include "gdb_socket.h".
5285 (remote_open): Use union gdb_sockaddr_u.
5286 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5287 or <winsock2.h> here. Instead include "gdb_socket.h".
5288 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5289 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5290 or <sys/un.h>.
5291 (init_named_socket, gdb_agent_helper_thread): Use union
5292 gdb_sockaddr_u.
5293
492d29ea
PA
52942015-03-07 Pedro Alves <palves@redhat.com>
5295
5296 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5297 instead.
5298
60a191ed
YQ
52992015-03-06 Yao Qi <yao.qi@linaro.org>
5300
5301 * linux-aarch64-low.c (aarch64_insert_point): Use
5302 show_debug_regs as a boolean.
5303 (aarch64_remove_point): Likewise.
5304
f5771b1d
PA
53052015-03-05 Pedro Alves <palves@redhat.com>
5306
5307 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5308 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5309 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5310 * nto-low.c (nto_target_ops): Likewise.
5311 * spu-low.c (spu_target_ops): Likewise.
5312 * win32-low.c (win32_target_ops): Likewise.
5313
3e572f71
PA
53142015-03-04 Pedro Alves <palves@redhat.com>
5315
72f4393d 5316 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5317 Decide whether a breakpoint triggered based on the SIGTRAP's
5318 siginfo.si_code.
72f4393d
L
5319 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5320 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5321 (linux_low_filter_event): Check for breakpoints before checking
5322 watchpoints.
5323 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5324 siginfo.si_code.
72f4393d
L
5325 (linux_stopped_by_sw_breakpoint)
5326 (linux_supports_stopped_by_sw_breakpoint)
5327 (linux_stopped_by_hw_breakpoint)
5328 (linux_supports_stopped_by_hw_breakpoint): New functions.
5329 (linux_target_ops): Install new target methods.
3e572f71 5330
1ec68e26
PA
53312015-03-04 Pedro Alves <palves@redhat.com>
5332
5333 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5334 * server.c (swbreak_feature, hwbreak_feature): New globals.
5335 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5336 (captured_main): Clear swbreak_feature and hwbreak_feature.
5337 * server.h (swbreak_feature, hwbreak_feature): Declare.
5338 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5339 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5340 supports_stopped_by_hw_breakpoint>: New fields.
5341 (target_supports_stopped_by_sw_breakpoint)
5342 (target_stopped_by_sw_breakpoint)
5343 (target_supports_stopped_by_hw_breakpoint)
5344 (target_stopped_by_hw_breakpoint): Declare.
5345
15c66dd6
PA
53462015-03-04 Pedro Alves <palves@redhat.com>
5347
5348 enum lwp_stop_reason -> enum target_stop_reason
5349 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5350 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5351 (linux_wait_1, stuck_in_jump_pad_callback)
5352 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5353 (linux_stopped_by_watchpoint):
5354 * linux-low.h (enum lwp_stop_reason): Delete.
5355 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5356 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5357
98fc70d6
YQ
53582015-03-04 Yao Qi <yao.qi@linaro.org>
5359
5360 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5361
dd2ac174
GB
53622015-03-03 Gary Benson <gbenson@redhat.com>
5363
5364 * hostio.c (handle_vFile): Fix prefix lengths.
5365
d68e53f4
MM
53662015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5367
5368 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5369 ptr_bits.
5370
bf2d68ab
AA
53712015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5372
5373 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5374 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5375 (clean): Add "rm -f" for above C files.
5376 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5377 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5378 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5379 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5380 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5381 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5382 (init_registers_s390x_vx_linux64)
5383 (init_registers_s390x_tevx_linux64)
5384 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5385 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5386 declarations.
5387 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5388 (s390_store_vxrs_high): New functions.
5389 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5390 NT_S390_VXRS_HIGH.
5391 (s390_arch_setup): Add logic for selecting one of the new target
5392 descriptions. Activate the new vector regsets if applicable.
5393 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5394 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5395 and init_registers_s390x_tevx_linux64.
5396
c966a859
PA
53972015-03-01 Pedro Alves <palves@redhat.com>
5398
5399 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5400 parameter.
5401
4180215b
PA
54022015-02-27 Pedro Alves <palves@redhat.com>
5403
5404 * linux-x86-low.c (u_debugreg_offset): New function.
5405 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5406
749bab01
PA
54072015-02-27 Pedro Alves <palves@redhat.com>
5408
5409 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5410 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5411 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5412 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5413 (ps_lsetfpregs, ps_getpid)
5414 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5415 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5416 (ps_lsetxregs, ps_plog): Declare.
5417
3c14e5a3
PA
54182015-02-27 Pedro Alves <palves@redhat.com>
5419
5420 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5421 IP_AGENT_EXPORT_FUNC.
5422 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5423 IP_AGENT_EXPORT_FUNC.
5424 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5425 (IP_AGENT_EXPORT): Delete.
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, collecting, gdb_collect)
5429 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5430 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5431 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5432 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5433 (traceframe_read_count, traceframe_write_count)
5434 (traceframes_created, trace_state_variables, get_raw_reg)
5435 (get_trace_state_variable_value, set_trace_state_variable_value)
5436 (ust_loaded, helper_thread_id, cmd_buf): Use
5437 IPA_SYM_EXPORTED_NAME.
5438 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5439 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5440 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5441 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5442 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5443 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5444 EXTERN_C_PUSH/EXTERN_C_POP.
5445 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5446 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5447 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5448 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5449 (traceframe_write_count, traceframe_read_count)
5450 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5451 (about_to_request_buffer_space, get_trace_state_variable_value)
5452 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5453 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5454 EXTERN_C_PUSH/EXTERN_C_POP.
5455 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5456 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5457 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5458 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5459 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5460 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5461 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5462 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5463 Define.
5464 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5465 (IP_AGENT_EXPORT_VAR_DECL): Define.
5466 (tracing): Declare.
5467 (gdb_agent_get_raw_reg): Declare.
5468
fe978cb0
PA
54692015-02-27 Tom Tromey <tromey@redhat.com>
5470 Pedro Alves <palves@redhat.com>
5471
5472 Rename symbols whose names are reserved C++ keywords throughout.
5473
3bc3d82a
PA
54742015-02-27 Pedro Alves <palves@redhat.com>
5475
5476 * Makefile.in (COMPILER): New, get it from autoconf.
5477 (CXX): Get from autoconf instead.
5478 (COMPILE.pre): Use COMPILER.
5479 (CC-LD): Rename to ...
5480 (CC_LD): ... this. Use COMPILER.
5481 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5482 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5483 * acinclude.m4: Include build-with-cxx.m4.
5484 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5485 Disable -Werror by default if building in C++ mode.
5486 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5487 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5488 the C++ compiler. Save/restore CXXFLAGS too.
5489 * configure: Regenerate.
5490
07697489
PA
54912015-02-27 Pedro Alves <palves@redhat.com>
5492
5493 * acinclude.m4: Include libiberty.m4.
5494 * configure.ac: Call libiberty_INIT.
5495 * config.in, configure: Regenerate.
5496
9beb7c4e
PA
54972015-02-26 Pedro Alves <palves@redhat.com>
5498
5499 * linux-low.c (linux_wait_1): When incrementing the PC past a
5500 program breakpoint always use the_low_target.breakpoint_len as
5501 increment, rather than the maximum between that and
5502 the_low_target.decr_pc_after_break.
5503
8090aef2
PA
55042015-02-23 Pedro Alves <palves@redhat.com>
5505
5506 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5507 thread was doing a step-over; always adjust the PC if
5508 we stepped over a permanent breakpoint.
5509 (linux_wait_1): If we stepped over breakpoint that was on top of a
5510 permanent breakpoint, manually advance the PC past it.
5511
bc9540e8
PA
55122015-02-23 Pedro Alves <palves@redhat.com>
5513
5514 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5515 modes.
5516 (x86_fill_gregset, x86_store_gregset): Use it when handling
5517 $orig_eax.
5518
2db9a427
PA
55192015-02-20 Pedro Alves <palves@redhat.com>
5520
5521 * thread-db.c: Include "nat/linux-procfs.h".
5522 (thread_db_init): Skip listing new threads if the kernel supports
5523 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5524
afa8d396
PA
55252015-02-20 Pedro Alves <palves@redhat.com>
5526
5527 * linux-low.c (status_pending_p_callback): Use ptid_match.
5528
c9587f88
AT
55292015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5530
5531 PR breakpoints/16812
5532 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5533 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5534 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5535
b05ec7a5
AT
55362015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5537
5538 PR breakpoints/15956
5539 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5540
d33501a5
MM
55412015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5542
5543 * linux-low.c (linux_low_btrace_conf): Print size.
5544 * server.c (handle_btrace_conf_general_set): New.
5545 (hanle_general_set): Call handle_btrace_conf_general_set.
5546 (handle_query): Report Qbtrace-conf:bts:size as supported.
5547
f4abbc16
MM
55482015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5549
5550 * linux-low.c (linux_low_enable_btrace): Update parameters.
5551 (linux_low_btrace_conf): New.
5552 (linux_target_ops)<to_btrace_conf>: Initialize.
5553 * server.c (current_btrace_conf): New.
5554 (handle_btrace_enable): Rename to ...
5555 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5556 to target_enable_btrace. Update comment. Update users.
5557 (handle_qxfer_btrace_conf): New.
5558 (qxfer_packets): Add btrace-conf entry.
5559 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5560 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5561 (target_ops)<read_btrace_conf>: New.
5562 (target_enable_btrace): Update parameters.
5563 (target_read_btrace_conf): New.
5564
043c3577
MM
55652015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5566
5567 * server.c (handle_btrace_general_set): Remove call to
5568 target_supports_btrace.
5569 (supported_btrace_packets): New.
5570 (handle_query): Call supported_btrace_packets.
5571 * target.h: include btrace-common.h.
5572 (btrace_target_info): Removed.
5573 (supports_btrace, target_supports_btrace): Update parameters.
5574
734b0e4b
MM
55752015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5576
5577 * Makefile.in (SFILES): Add common/btrace-common.c.
5578 (OBS): Add common/btrace-common.o.
5579 (btrace-common.o): Add build rules.
5580 * linux-low: Include btrace-common.h.
5581 (linux_low_read_btrace): Use struct btrace_data. Call
5582 btrace_data_init and btrace_data_fini.
5583
d6c146e9
PA
55842015-02-06 Pedro Alves <palves@redhat.com>
5585
5586 * thread-db.c (find_new_threads_callback): Add debug output.
5587
20ba1ce6
PA
55882015-02-04 Pedro Alves <palves@redhat.com>
5589
5590 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5591 (resume_stopped_resumed_lwps): New function.
5592 (linux_wait_for_event_filtered): Use it.
5593
8cc73a39
SDJ
55942015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5595
5596 * Makefile.in (SFILES): Add linux-personality.c.
5597 (linux-personality.o): New rule.
5598 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5599 list of objects to be built.
5600 * linux-low.c: Include nat/linux-personality.h.
5601 (linux_create_inferior): Remove code to disable address space
5602 randomization (moved to ../nat/linux-personality.c). Create
5603 cleanup to disable address space randomization.
5604
fb23d554
SDJ
56052015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5606
5607 * Makefile.in (posix-strerror.o): New rule.
5608 (mingw-strerror.o): Likewise.
5609 * configure: Regenerated.
5610 * configure.ac: Source file ../common/common.host. Initialize new
5611 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5612
cdf43629
YQ
56132015-01-14 Yao Qi <yao@codesourcery.com>
5614
5615 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5616 (ppc-linux.o): New rule.
5617 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5618 * configure.ac: AC_CHECK_FUNCS(getauxval).
5619 * config.in: Re-generated.
5620 * configure: Re-generated.
5621 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5622 ppc64_64bit_inferior_p
5623
514c5338
YQ
56242015-01-14 Yao Qi <yao@codesourcery.com>
5625
5626 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5627 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5628 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5629 (PT_ORIG_R3, PT_TRAP): Likewise.
5630 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5631 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5632 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5633
3368c1e5
JB
56342015-01-10 Joel Brobecker <brobecker@adacore.com>
5635
5636 * i387-fp.c (i387_cache_to_xsave): In look over
5637 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5638 zmmh_low_space field by use of zmmh_high_space.
5639
582511be
PA
56402015-01-09 Pedro Alves <palves@redhat.com>
5641
5642 * linux-low.c (step_over_bkpt): Move higher up in the file.
5643 (handle_extended_wait): Don't store the stop_pc here.
5644 (get_stop_pc): Adjust comments and rename to ...
5645 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5646 stopped for a software breakpoint or hardware breakpoint.
5647 (thread_still_has_status_pending_p): New function.
5648 (status_pending_p_callback): Use
5649 thread_still_has_status_pending_p. If the event is no longer
5650 interesting, resume the LWP.
5651 (handle_tracepoints): Add assert.
5652 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5653 (wstatus_maybe_breakpoint): New function.
5654 (cancel_breakpoint): Delete function.
5655 (check_stopped_by_watchpoint): New function, factored out from
5656 linux_low_filter_event.
5657 (lp_status_maybe_breakpoint): Delete function.
5658 (linux_low_filter_event): Remove filter_ptid argument.
5659 Leave thread group exits pending here. Store the LWP's stop PC.
5660 Always leave events pending.
5661 (linux_wait_for_event_filtered): Pull all events out of the
5662 kernel, and leave them all pending.
5663 (count_events_callback, select_event_lwp_callback): Consider all
5664 events.
5665 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5666 (select_event_lwp): Only give preference to the stepping LWP in
5667 all-stop mode. Adjust comments.
5668 (ignore_event): New function.
5669 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5670 references to cancel_breakpoints. Adjust to renames. Also give
5671 equal priority to all LWPs that have had events in non-stop mode.
5672 If reporting a software breakpoint event, unadjust the LWP's PC.
5673 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5674 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5675 Adjust.
5676 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5677 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5678 (linux_stopped_by_watchpoint): Adjust.
5679 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5680 * linux-low.h (enum lwp_stop_reason): New.
5681 (struct lwp_info) <stop_pc>: Adjust comment.
5682 <stopped_by_watchpoint>: Delete field.
5683 <stop_reason>: New field.
5684 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5685 * mem-break.c (software_breakpoint_inserted_here)
5686 (hardware_breakpoint_inserted_here): New function.
5687 * mem-break.h (software_breakpoint_inserted_here)
5688 (hardware_breakpoint_inserted_here): Declare.
5689 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5690 (cancel_breakpoints): Delete.
5691 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5692 (upload_fast_traceframes): Remove references to
5693 cancel_breakpoints.
5694
a33e3959
PA
56952015-01-09 Pedro Alves <palves@redhat.com>
5696
5697 * thread-db.c (find_new_threads_callback): Ignore thread if the
5698 kernel thread ID is -1.
5699
8784d563
PA
57002015-01-09 Pedro Alves <palves@redhat.com>
5701
5702 * linux-low.c (linux_attach_fail_reason_string): Move to
5703 nat/linux-ptrace.c, and rename.
5704 (linux_attach_lwp): Update comment.
5705 (attach_proc_task_lwp_callback): New function.
5706 (linux_attach): Adjust to rename and use
5707 linux_proc_attach_tgid_threads.
5708 (linux_attach_fail_reason_string): Delete declaration.
5709
76f2b779
JB
57102015-01-01 Joel Brobecker <brobecker@adacore.com>
5711
5712 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5713 * server.c (gdbserver_version): Likewise.
5714
fafcc06a
SDJ
57152014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5716
5717 * remote-utils.c: Include ctype.h.
5718 (input_interrupt): Explicitly handle the case when the char
5719 received is the NUL byte. Improve the printing of non-ASCII
5720 characters.
5721
beed38b8
JB
57222014-12-16 Joel Brobecker <brobecker@adacore.com>
5723
5724 * linux-low.c (linux_low_filter_event): Update call to
5725 linux_enable_event_reporting following the addition of
5726 a new parameter to that function.
5727
bf330350
CU
57282014-12-16 Catalin Udma <catalin.udma@freescale.com>
5729
5730 PR server/17457
5731 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5732 (AARCH64_FPCR_REGNO): Likewise.
5733 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5734 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5735 (aarch64_store_fpregset): Likewise.
5736
5227d625
JB
57372014-12-15 Joel Brobecker <brobecker@adacore.com>
5738
5739 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5740 Remove FIXME comment about assumption about N.
5741
f93b65a0
JB
57422014-12-13 Joel Brobecker <brobecker@adacore.com>
5743
5744 * configure.ac: If large-file support is disabled in GDBserver,
5745 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5746 * configure: Regenerate.
5747
e5a9158d
AA
57482014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5749
5750 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5751 warning upon ENODATA from ptrace.
5752 * linux-s390-low.c (s390_store_tdb): New.
5753 (s390_regsets): Add regset for NT_S390_TDB.
5754
feea5f36
AA
57552014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5756
5757 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5758 without a fill_function.
5759 * linux-s390-low.c (s390_fill_last_break): Remove.
5760 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5761 (s390_arch_setup): Use regset's size instead of fill_function for
5762 loop end condition.
5763
098dbe61
AA
57642014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5765
5766 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5767 the regset's store function when ptrace returned an error.
5768 * regcache.c (get_thread_regcache): Invalidate register cache
5769 before fetching inferior's registers.
5770
28eef672
AA
57712014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5772
5773 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5774 while-loop as for-loop.
5775 (regsets_store_inferior_registers): Likewise.
5776
bdca27a2
YQ
57772014-11-28 Yao Qi <yao@codesourcery.com>
5778
5779 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5780 * config.in, configure: Re-generate.
5781 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5782 is defined.
5783
9c232dda
YQ
57842014-11-21 Yao Qi <yao@codesourcery.com>
5785
5786 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5787 (AC_CHECK_HEADERS): Remove malloc.h.
5788 * configure: Re-generated.
5789 * config.in: Re-generated.
5790 * server.h: Don't include alloca.h and malloc.h.
5791 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5792 Don't include malloc.h.
5793
43968415
JB
57942014-11-17 Joel Brobecker <brobecker@adacore.com>
5795
5796 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5797 corresponding ERRNO check in same block.
5798
40e91bc7
PA
57992014-11-12 Pedro Alves <palves@redhat.com>
5800
5801 * server.c (cont_thread): Update comment.
5802 (start_inferior, attach_inferior): No longer clear cont_thread.
5803 (handle_v_cont): No longer set cont_thread.
5804 (captured_main): Clear cont_thread each time a GDB connects.
5805
c2c118cf
PA
58062014-11-12 Pedro Alves <palves@redhat.com>
5807
5808 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5809 thread, and don't resume all threads if the Hc thread has exited.
5810
78708b7c
PA
58112014-11-12 Pedro Alves <palves@redhat.com>
5812
5813 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5814 the process group instead of to a specific LWP.
5815
a2abc7de
PA
58162014-10-15 Pedro Alves <palves@redhat.com>
5817
5818 PR server/17487
5819 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5820 parameter.
5821 (arm_set_thread_context): Delete.
5822 (the_low_target): Adjust.
5823 * win32-i386-low.c (debug_registers_changed)
5824 (debug_registers_used): Delete.
5825 (update_debug_registers_callback): New function.
5826 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5827 needing to update their debug registers.
5828 (win32_get_current_dr): New function.
5829 (x86_dr_low_get_addr, x86_dr_low_get_control)
5830 (x86_dr_low_get_status): Fetch the debug register from the thread
5831 record's context.
5832 (i386_initial_stuff): Adjust.
5833 (i386_get_thread_context): Remove current_event parameter. Don't
5834 clear debug_registers_changed nor copy DR values to
5835 debug_reg_state.
5836 (i386_set_thread_context): Delete.
5837 (i386_prepare_to_resume): New function.
5838 (i386_thread_added): Mark the thread as needing to update irs
5839 debug registers.
5840 (the_low_target): Remove i386_set_thread_context and install
5841 i386_prepare_to_resume.
5842 * win32-low.c (win32_get_thread_context): Adjust.
5843 (win32_set_thread_context): Use SetThreadContext
5844 directly.
5845 (win32_prepare_to_resume): New function.
5846 (win32_require_context): New function, factored out from ...
5847 (thread_rec): ... this.
5848 (continue_one_thread): Call win32_prepare_to_resume on each thread
5849 we're about to continue.
5850 (win32_resume): Call win32_prepare_to_resume on the event thread.
5851 * win32-low.h (struct win32_thread_info)
5852 <debug_registers_changed>: New field.
5853 (struct win32_target_ops): Change prototype of set_thread_context,
5854 delete set_thread_context and add prepare_to_resume.
5855 (win32_require_context): New declaration.
5856
a442d071
GB
58572014-10-08 Gary Benson <gbenson@redhat.com>
5858
5859 * server.h: Do not include common-exceptions.h.
5860
6f1947e8
GB
58612014-10-08 Gary Benson <gbenson@redhat.com>
5862
5863 * server.h: Do not include cleanups.h.
5864
63b434a4
JH
58652014-09-30 James Hogan <james.hogan@imgtec.com>
5866
5867 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5868 mips64-dsp-linux.c.
5869
c4d9ceb6
YQ
58702014-09-23 Yao Qi <yao@codesourcery.com>
5871
5872 * linux-low.c (lp_status_maybe_breakpoint): New function.
5873 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5874 (count_events_callback): Likewise.
5875 (select_event_lwp_callback): Likewise.
5876 (cancel_breakpoints_callback): Likewise.
5877
89a5711c
DB
58782014-09-19 Don Breazeal <donb@codesourcery.com>
5879
5880 * linux-low.c (handle_extended_wait): Call
5881 linux_ptrace_get_extended_event.
5882 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5883 linux_is_extended_waitstatus.
5884
bffc0964
JB
58852014-09-16 Joel Brobecker <brobecker@adacore.com>
5886
5887 * Makefile.in (CPPFLAGS): Define.
5888 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5889 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5890
0bfdf32f
GB
58912014-09-16 Gary Benson <gbenson@redhat.com>
5892
5893 * inferiors.h (current_inferior): Renamed as...
5894 (current_thread): New variable. All uses updated.
5895 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5896 (maybe_move_out_of_jump_pad): Likewise.
5897 (cancel_breakpoint): Likewise.
5898 (linux_low_filter_event): Likewise.
5899 (wait_for_sigstop): Likewise.
5900 (linux_resume_one_lwp): Likewise.
5901 (need_step_over_p): Likewise.
5902 (start_step_over): Likewise.
5903 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5904 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5905 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5906 and save_inferior as saved_thread.
5907 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5908 saved_thread.
5909 (regcache_invalidate_thread): Likewise.
5910 * remote-utils.c (prepare_resume_reply): Likewise.
5911 * thread-db.c (thread_db_get_tls_address): Likewise.
5912 (disable_thread_event_reporting): Likewise.
5913 (remove_thread_event_breakpoints): Likewise.
5914 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5915 as saved_thread.
5916 * target.h (set_desired_inferior): Renamed as...
5917 (set_desired_thread): New declaration. All uses updated.
5918 * server.c (myresume): Updated comment to reference thread instead
5919 of inferior.
5920 (handle_serial_event): Likewise.
5921 (handle_target_event): Likewise.
5922
361c8ade
GB
59232014-09-12 Tom Tromey <tromey@redhat.com>
5924 Gary Benson <gbenson@redhat.com>
5925
5926 * regcache.h: Include common-regcache.h.
5927 (regcache_read_pc): Don't declare.
5928 * regcache.c (get_thread_regcache_for_ptid): New function.
5929
bd9269f7
GB
59302014-09-11 Tom Tromey <tromey@redhat.com>
5931 Gary Benson <gbenson@redhat.com>
5932
5933 * symbol.c: New file.
5934 * Makefile.in (SFILES): Add symbol.c.
5935 (OBS): Add symbol.o.
5936
f8c1d06b
GB
59372014-09-11 Gary Benson <gbenson@redhat.com>
5938
5939 * target.c (target_stop_ptid, target_continue_ptid): New
5940 functions.
5941
721ec300
GB
59422014-09-11 Tom Tromey <tromey@redhat.com>
5943 Gary Benson <gbenson@redhat.com>
5944
5945 * target.h: Include target/target.h.
5946 * target.c (target_read_memory, target_read_uint32)
5947 (target_write_memory): New functions.
5948
c5e92cca
GB
59492014-09-11 Gary Benson <gbenson@redhat.com>
5950
5951 * server.h (debug_hw_points): Don't declare.
5952 * server.c (debug_hw_points): Don't define. Replace all uses
5953 with show_debug_regs.
5954 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5955 all uses with show_debug_regs.
5956
2e4bb98a
EBM
59572014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5958
5959 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5960 endianness into account.
5961 (ppc_supply_ptrace_register): Likewise.
5962
ac740bc7
JH
59632014-09-03 James Hogan <james.hogan@imgtec.com>
5964
5965 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5966 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5967
97ea6506
GB
59682014-09-03 Gary Benson <gbenson@redhat.com>
5969
5970 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5971 ALL_DEBUG_ADDRESS_REGISTERS.
5972
df7e5265
GB
59732014-09-02 Gary Benson <gbenson@redhat.com>
5974
5975 * i386-low.h: Renamed as...
5976 * x86-low.h: New file. All type, function and variable name
5977 prefixes changed from "i386_" to "x86_". All references updated.
5978 * i386-low.c: Renamed as...
5979 * x86-low.c: New file. All type, function and variable name
5980 prefixes changed from "i386_" to "x86_". All references updated.
5981
ed859da7
GB
59822014-09-02 Gary Benson <gbenson@redhat.com>
5983
5984 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5985 (x86_linux_new_thread): Likewise.
5986
860789c7
GB
59872014-08-29 Gary Benson <gbenson@redhat.com>
5988
5989 * server.h (setjmp.h): Do not include.
5990 (toplevel): Do not declare.
5991 (common-exceptions.h): Include.
5992 (cleanups.h): Likewise.
5993 * server.c (toplevel): Do not define.
5994 (exit_code): New static global.
5995 (detach_or_kill_for_exit_cleanup): New function.
5996 (main): New function. Original main renamed to...
5997 (captured_main): New function.
5998 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5999
ff55e1b5
GB
60002014-08-29 Gary Benson <gbenson@redhat.com>
6001
6002 * Makefile.in (SFILES): Add common/common-exceptions.c.
6003 (OBS): Add common-exceptions.o.
6004 (common-exceptions.o): New rule.
6005 * utils.c (prepare_to_throw_exception): New function.
6006
e9bcb658
GB
60072014-08-29 Gary Benson <gbenson@redhat.com>
6008
6009 * config.in: Regenerate.
6010 * configure: Likewise.
6011
e3180625
GB
60122014-08-29 Gary Benson <gbenson@redhat.com>
6013
6014 * Makefile.in (SFILES): Add common/cleanups.c.
6015 (OBS): cleanups.o.
6016 (cleanups.o): New rule.
6017
e3d6ba5d
GB
60182014-08-29 Gary Benson <gbenson@redhat.com>
6019
6020 * utils.c (internal_vwarning): New function.
6021
7096e886
GB
60222014-08-28 Gary Benson <gbenson@redhat.com>
6023
6024 * utils.h (fatal): Remove declaration.
6025 * utils.c (fatal): Remove function.
6026
14ce3192
GB
60272014-08-28 Gary Benson <gbenson@redhat.com>
6028
6029 * tracepoint.c (gdb_agent_init): Replace fatal with
6030 perror_with_name.
6031 (initialize_tracepoint): Likewise.
6032
50278d59
GB
60332014-08-28 Gary Benson <gbenson@redhat.com>
6034
6035 * remote-utils.c (remote_prepare): Replace fatal with error.
6036
aa96c426
GB
60372014-08-28 Gary Benson <gbenson@redhat.com>
6038
6039 * linux-low.c (linux_async): Replace fatal with warning.
6040 Tidy up and return.
6041 (linux_start_non_stop): Return -1 if linux_async failed.
6042
f7160e97
GB
60432014-08-28 Gary Benson <gbenson@redhat.com>
6044
6045 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6046 gdb_assert.
6047 (i386_dr_low_get_addr): Remove vague comment.
6048 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6049 gdb_assert.
6050
38e08fca
GB
60512014-08-28 Gary Benson <gbenson@redhat.com>
6052
6053 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6054 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6055 internal_error.
6056 (linux_resume_one_lwp): Likewise.
6057 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6058 gdb_assert.
6059 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6060 with internal_error.
6061 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6062 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6063 (find_register_by_name): Replace fatal with internal_error.
6064 (find_regno): Likewise.
6065 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6066 * thread-db.c (thread_db_create_event): Likewise.
6067 (thread_db_load_search): Likewise.
6068 (try_thread_db_load_1): Likewise.
6069 * tracepoint.c (get_jump_space_head): Replace fatal with
6070 internal_error.
6071 (claim_trampoline_space): Likewise.
6072 (have_fast_tracepoint_trampoline_buffer): Likewise.
6073 (cmd_qtstart): Likewise.
6074 (stop_tracing): Likewise.
6075 (fast_tracepoint_collecting): Likewise.
6076 (target_malloc): Likewise.
6077 (download_tracepoint): Likewise.
6078 (download_trace_state_variables): Replace check with gdb_assert.
6079 (upload_fast_traceframes): Replace fatal with internal_error.
6080
34abf635
GB
60812014-08-19 Tom Tromey <tromey@redhat.com>
6082 Gary Benson <gbenson@redhat.com>
6083
6084 * Makefile.in (SFILES): Add common/common-debug.c.
6085 (OBS): Add common-debug.o.
6086 (common-debug.o): New rule.
6087 * debug.h (debug_printf): Don't declare.
6088 * debug.c (debug_printf): Renamed and rewritten as...
6089 (debug_vprintf): New function.
6090
f6e94d78
GB
60912014-08-19 Gary Benson <gbenson@redhat.com>
6092
6093 * utils.h: Do not include print-utils.h.
6094
9239eeab
GB
60952014-08-19 Tom Tromey <tromey@redhat.com>
6096 Gary Benson <gbenson@redhat.com>
6097
6098 * server.h: Add static assertion.
6099 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6100
ef87c8bb
GB
61012014-08-19 Tom Tromey <tromey@redhat.com>
6102 Gary Benson <gbenson@redhat.com>
6103
6104 * Makefile.in (SFILES): Add common/errors.c.
6105 (OBS): Add errors.o.
6106 (IPA_OBS): Add errors-ipa.o.
6107 (errors.o): New rule.
6108 (errors-ipa.o): Likewise.
6109 * utils.h (perror_with_name, error, warning): Don't declare.
6110 * utils.c (warning): Renamed and rewritten as...
6111 (vwarning): New function.
6112 (error): Renamed and rewritten as...
6113 (verror): New function.
6114 (internal_error): Renamed and rewritten as...
6115 (internal_verror): New function.
6116
bb974a24
GB
61172014-08-07 Gary Benson <gbenson@redhat.com>
6118
6119 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6120 * configure: Regenerate.
6121 * config.in: Likewise.
6122 * server.h: Do not include errno.h.
6123 * event-loop.c: Likewise.
6124 * hostio-errno.c: Likewise.
6125 * linux-low.c: Likewise.
6126 * remote-utils.c: Likewise.
6127 * spu-low.c: Likewise.
6128 * utils.c: Likewise.
6129 * gdbreplay.c: Unconditionally include errno.h.
6130
6d3d12eb
GB
61312014-08-07 Gary Benson <gbenson@redhat.com>
6132
6133 * server.h: Do not include string.h.
6134 * event-loop.c: Likewise.
6135 * linux-low.c: Likewise.
6136 * regcache.c: Likewise.
6137 * remote-utils.c: Likewise.
6138 * spu-low.c: Likewise.
6139 * utils.c: Likewise.
6140
dccbb609
GB
61412014-08-07 Gary Benson <gbenson@redhat.com>
6142
6143 * server.h: Do not include gdb_assert.h.
6144
e76df0d0
GB
61452014-08-07 Gary Benson <gbenson@redhat.com>
6146
6147 * server.h: Do not include common-utils.h.
6148
4cb9c816
GB
61492014-08-07 Gary Benson <gbenson@redhat.com>
6150
6151 * server.h: Do not include ptid.h.
6152 * notif.h: Likewise.
6153
3995eeee
GB
61542014-08-07 Gary Benson <gbenson@redhat.com>
6155
6156 * server.h: Do not include gdb_locale.h.
6157
cb9f1a9b
GB
61582014-08-07 Gary Benson <gbenson@redhat.com>
6159
6160 * server.h: Do not include gdb/signals.h.
6161 * win32-low.c: Likewise.
6162
a5fceff8
GB
61632014-08-07 Gary Benson <gbenson@redhat.com>
6164
6165 * server.h: Do not include pathmax.h.
6166
b9391142
GB
61672014-08-07 Gary Benson <gbenson@redhat.com>
6168
6169 * server.h: Do not include libiberty.h.
6170 * linux-bfin-low.c: Likewise.
6171
0e443c87
GB
61722014-08-07 Gary Benson <gbenson@redhat.com>
6173
6174 * server.h: Do not include ansidecl.h.
6175
8ebb3f56
GB
61762014-08-07 Gary Benson <gbenson@redhat.com>
6177
6178 * linux-x86-low.c: Do not include stddef.h.
6179 * lynx-ppc-low.c: Likewise.
6180 * tracepoint.c: Likewise.
6181
8980bdf6
GB
61822014-08-07 Gary Benson <gbenson@redhat.com>
6183
6184 * server.h: Do not include stdarg.h.
6185 * nto-low.c: Likewise.
6186
d7096f71
GB
61872014-08-07 Gary Benson <gbenson@redhat.com>
6188
6189 * server.h: Do not include stdlib.h.
6190 * inferiors.c: Likewise.
6191 * linux-low.c: Likewise.
6192 * regcache.c: Likewise.
6193 * spu-low.c: Likewise.
6194 * tracepoint.c: Likewise.
6195 * utils.c: Likewise.
6196
d02f550d
GB
61972014-08-07 Gary Benson <gbenson@redhat.com>
6198
6199 * server.h: Do not include stdio.h.
6200 * linux-low.c: Likewise.
6201 * remote-utils.c: Likewise.
6202 * spu-low.c: Likewise.
6203 * utils.c: Likewise.
6204 * wincecompat.c: Likewise.
6205
87f6c4e3
GB
62062014-08-06 Gary Benson <gbenson@redhat.com>
6207
6208 * regcache.c (init_register_cache): Move conditionals inside if.
6209
7089dca4
GB
62102014-08-06 Gary Benson <gbenson@redhat.com>
6211
6212 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6213
462f517e
GB
62142014-07-31 Gary Benson <gbenson@redhat.com>
6215
6216 * ax.h: Do not include server.h.
6217 * gdbthread.h: Likewise.
6218 * lynx-low.h: Likewise.
6219 * notif.h: Likewise.
6220
976411d6
GB
62212014-07-30 Gary Benson <gbenson@redhat.com>
6222
6223 * server.h: Include common-defs.h.
6224 Do not include config.h or build-gnulib-gdbserver/config.h.
6225
d41f6d8e
GB
62262014-07-30 Gary Benson <gbenson@redhat.com>
6227
6228 * hostio-errno.c: Move server.h to top of includes list.
6229 * inferiors.c: Likewise.
6230 * linux-x86-low.c: Likewise.
6231 * notif.c: Include server.h.
6232
314c6a35
TT
62332014-07-24 Tom Tromey <tromey@redhat.com>
6234 Gary Benson <gbenson@redhat.com>
6235
6236 * server.h (CORE_ADDR): Now unsigned.
6237
69ff6be5
PA
62382014-07-16 Pedro Alves <palves@redhat.com>
6239
6240 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6241
ce9e3fe7
PA
62422014-07-15 Pedro Alves <palves@redhat.com>
6243
6244 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6245 copy.
6246
e76126e8
PA
62472014-07-11 Pedro Alves <palves@redhat.com>
6248
6249 * linux-low.c (kill_wait_lwp): New function, based on
6250 kill_one_lwp_callback, but use my_waitpid directly.
6251 (kill_one_lwp_callback, linux_kill): Use it.
6252
8e9db26e
PA
62532014-06-23 Pedro Alves <palves@redhat.com>
6254
6255 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6256 before setting DR0..DR3.
6257
698b3e08
GB
62582014-06-20 Gary Benson <gbenson@redhat.com>
6259
6260 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6261 * configure: Regenerated.
6262 * config.in: Likewise.
6263
125f8a3d
GB
62642014-06-20 Gary Benson <gbenson@redhat.com>
6265
6266 * Makefile.in (SFILES): Update locations for files moved
6267 from common to nat.
6268 (object file files): Reordered.
6269
42995dbd
GB
62702014-06-20 Gary Benson <gbenson@redhat.com>
6271
6272 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6273 (i386_dr_low_set_addr): Likewise.
6274 (i386_dr_low_get_addr): Likewise.
6275 (i386_dr_low_can_set_control): Likewise.
6276 (i386_dr_low_set_control): Likewise.
6277 (i386_dr_low_get_control): Likewise.
6278 (i386_dr_low_get_status): Likewise.
6279 (i386_get_debug_register_length): Likewise.
6280 * linux-x86-low.c (i386_dr_low_set_addr):
6281 Changed signature. Made static.
6282 (i386_dr_low_get_addr): Likewise.
6283 (i386_dr_low_set_control): Likewise.
6284 (i386_dr_low_get_control): Likewise.
6285 (i386_dr_low_get_status): Likewise.
6286 (i386_dr_low): New global variable.
6287 * win32-i386-low.c (i386_dr_low_set_addr):
6288 Changed signature. Made static.
6289 (i386_dr_low_get_addr): Likewise.
6290 (i386_dr_low_set_control): Likewise.
6291 (i386_dr_low_get_control): Likewise.
6292 (i386_dr_low_get_status): Likewise.
6293 (i386_dr_low): New global variable.
6294
e1d2394b
MS
62952014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6296
6297 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6298 * Makefile.in (AR, AR_FLAGS): Define.
6299 * configure: Regenerate.
6300
3a8ee006
GB
63012014-06-19 Gary Benson <gbenson@redhat.com>
6302
6303 * Makefile.in (i386-dregs.o): New rule.
6304 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6305 * i386-low.c (target.h): Remove include.
6306 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6307 (DR_CONTROL_SHIFT): Likewise.
6308 (DR_CONTROL_SIZE): Likewise.
6309 (DR_RW_EXECUTE): Likewise.
6310 (DR_RW_WRITE): Likewise.
6311 (DR_RW_READ): Likewise.
6312 (DR_RW_IORW): Likewise.
6313 (DR_LEN_1): Likewise.
6314 (DR_LEN_2): Likewise.
6315 (DR_LEN_4): Likewise.
6316 (DR_LEN_8): Likewise.
6317 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6318 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6319 (DR_ENABLE_SIZE): Likewise.
6320 (DR_LOCAL_SLOWDOWN): Likewise.
6321 (DR_GLOBAL_SLOWDOWN): Likewise.
6322 (DR_CONTROL_RESERVED): Likewise.
6323 (I386_DR_CONTROL_MASK): Likewise.
6324 (I386_DR_VACANT): Likewise.
6325 (I386_DR_LOCAL_ENABLE): Likewise.
6326 (I386_DR_GLOBAL_ENABLE): Likewise.
6327 (I386_DR_DISABLE): Likewise.
6328 (I386_DR_SET_RW_LEN): Likewise.
6329 (I386_DR_GET_RW_LEN): Likewise.
6330 (I386_DR_WATCH_HIT): Likewise.
6331 (i386_wp_op_t): Likewise.
6332 (i386_show_dr): Likewise.
6333 (i386_length_and_rw_bits): Likewise.
6334 (i386_insert_aligned_watchpoint): Likewise.
6335 (i386_remove_aligned_watchpoint): Likewise.
6336 (i386_handle_nonaligned_watchpoint): Likewise.
6337 i386_update_inferior_debug_regs(): Likewise.
6338 (i386_dr_insert_watchpoint): Likewise.
6339 (i386_dr_remove_watchpoint): Likewise.
6340 (i386_dr_region_ok_for_watchpoint): Likewise.
6341 (i386_dr_stopped_data_address): Likewise.
6342 (i386_dr_stopped_by_watchpoint): Likewise.
6343
8f26655c
GB
63442014-06-19 Gary Benson <gbenson@redhat.com>
6345
6346 * i386-low.c (i386_dr_show): Renamed to
6347 i386_show_dr and made static. All uses updated.
6348 (i386_dr_length_and_rw_bits): Renamed to
6349 i386_length_and_rw_bits and made static.
6350 All uses updated.
6351 (i386_dr_insert_aligned_watchpoint): Renamed to
6352 i386_insert_aligned_watchpoint and made static.
6353 All uses updated.
6354 (i386_dr_remove_aligned_watchpoint): Renamed to
6355 i386_remove_aligned_watchpoint and made static.
6356 All uses updated.
6357 (i386_dr_update_inferior_debug_regs): Renamed to
6358 i386_update_inferior_debug_regs and made static.
6359 All uses updated.
6360
b9228891
GB
63612014-06-18 Gary Benson <gbenson@redhat.com>
6362
5171def3
GB
6363 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6364 (i386_dr_low_can_set_control): Likewise.
6365 (i386_get_debug_register_length): Likewise.
6366 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6367 (i386_dr_low_can_set_control): Likewise.
6368 (i386_get_debug_register_length): Likewise.
6369
63702014-06-17 Gary Benson <gbenson@redhat.com>
6371
b9228891
GB
6372 * i386-low.h (i386-dregs.h): New include.
6373 (DR_FIRSTADDR): Now in i386-dregs.h.
6374 (DR_LASTADDR): Likewise.
6375 (DR_NADDR): Likewise.
6376 (DR_STATUS): Likewise.
6377 (DR_CONTROL): Likewise.
6378 (i386_debug_reg_state): Likewise.
6379 (i386_dr_insert_watchpoint): Likewise.
6380 (i386_dr_remove_watchpoint): Likewise.
6381 (i386_dr_region_ok_for_watchpoint): Likewise.
6382 (i386_dr_stopped_data_address): Likewise.
6383 (i386_dr_stopped_by_watchpoint): Likewise.
6384 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6385
4be83cc2
GB
63862014-06-18 Gary Benson <gbenson@redhat.com>
6387
6388 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6389 i386_dr_insert_watchpoint.
6390 (i386_low_remove_watchpoint): Renamed to
6391 i386_dr_remove_watchpoint.
6392 (i386_low_region_ok_for_watchpoint): Renamed to
6393 i386_dr_region_ok_for_watchpoint.
6394 (i386_low_stopped_data_address): Renamed to
6395 i386_dr_stopped_data_address.
6396 (i386_low_stopped_by_watchpoint): Renamed to
6397 i386_dr_stopped_by_watchpoint.
6398 * i386-low.c (i386_show_dr): Renamed to
6399 i386_dr_show and made nonstatic. All uses updated.
6400 (i386_length_and_rw_bits): Renamed to
6401 i386_dr_length_and_rw_bits and made nonstatic.
6402 All uses updated.
6403 (i386_insert_aligned_watchpoint): Renamed to
6404 i386_dr_insert_aligned_watchpoint and made nonstatic.
6405 All uses updated.
6406 (i386_remove_aligned_watchpoint): Renamed to
6407 i386_dr_remove_aligned_watchpoint and made nonstatic.
6408 All uses updated.
6409 (i386_update_inferior_debug_regs): Renamed to
6410 i386_dr_update_inferior_debug_regs and made nonstatic.
6411 All uses updated.
6412 (i386_low_insert_watchpoint): Renamed to
6413 i386_dr_insert_watchpoint. All uses updated.
6414 (i386_low_remove_watchpoint): Renamed to
6415 i386_dr_remove_watchpoint. All uses updated.
6416 (i386_low_region_ok_for_watchpoint): Renamed to
6417 i386_dr_region_ok_for_watchpoint. All uses updated.
6418 (i386_low_stopped_data_address): Renamed to
6419 i386_dr_stopped_data_address. All uses updated.
6420 (i386_low_stopped_by_watchpoint): Renamed to
6421 i386_dr_stopped_by_watchpoint. All uses updated.
6422
131aa0d4
GB
64232014-06-18 Gary Benson <gbenson@redhat.com>
6424
6425 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6426 (i386_dr_low_can_set_control): Likewise.
6427 (i386_insert_aligned_watchpoint): New check.
6428
d9305f7f
GB
64292014-06-18 Gary Benson <gbenson@redhat.com>
6430
6431 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6432 Renamed to state.
6433
e927c9fc
GB
64342014-06-18 Gary Benson <gbenson@redhat.com>
6435
6436 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6437 instead of fatal and error.
6438 (i386_handle_nonaligned_watchpoint): Likewise.
6439
1b6d4134
GB
64402014-06-18 Gary Benson <gbenson@redhat.com>
6441
6442 * i386-low.c (i386_get_debug_register_length): New macro.
6443 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6444 (i386_show_dr): Use debug_printf instead of fprintf. Use
6445 phex to format values.
6446
6e62758f
GB
64472014-06-18 Gary Benson <gbenson@redhat.com>
6448
6449 * i386-low.h: Comment changes.
6450 * i386-low.c: Likewise.
6451
fc6e2f03
GB
64522014-06-18 Gary Benson <gbenson@redhat.com>
6453
6454 * i386-low.c: Whitespace changes.
6455
f9d1eeed
TT
64562014-06-12 Tom Tromey <tromey@redhat.com>
6457
6458 * utils.c (freeargv): Remove.
6459
0b04e523
TT
64602014-06-12 Tom Tromey <tromey@redhat.com>
6461
6462 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6463 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6464 (parse_debug_format_options): Likewise.
6465 (gdbserver_usage): Likewise.
6466 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6467 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6468 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6469 against libiberty.
6470 ($(LIBGNU)): Depend on libiberty.
6471 (all-lib): Recurse into all subdirs.
6472 (install-only): Invoke "install" target in subdirs.
6473 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6474 targets.
6475 * configure: Rebuild.
6476 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6477 for vasprintf, vsnprintf, or gettimeofday.
6478 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6479 srv_tgtobj.
6480
270c9937
JB
64812014-06-05 Joel Brobecker <brobecker@adacore.com>
6482
6483 * development.sh: Delete.
6484 * Makefile.in (config.status): Adjust dependency on development.sh.
6485 * configure.ac: Adjust development.sh source call.
6486 * configure: Regenerate.
6487
0a261ed8
PA
64882014-06-02 Pedro Alves <palves@redhat.com>
6489
6490 * ax.c (gdb_free_agent_expr): New function.
6491 * ax.h (gdb_free_agent_expr): New declaration.
6492 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6493 list.
6494 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6495 static.
6496 (clear_breakpoint_conditions_and_commands): New function.
6497 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6498 (clear_breakpoint_conditions_and_commands): New declaration.
6499
e9dae05e
RR
65002014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6501
6502 * linux-aarch64-low.c (asm/ptrace.h): Include.
6503
5876f503
JK
65042014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6505
6506 Fix TLS access for -static -pthread.
6507 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6508 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6509 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6510
802e8e6d
PA
65112014-05-20 Pedro Alves <palves@redhat.com>
6512
6513 * linux-aarch64-low.c (aarch64_insert_point)
6514 (aarch64_remove_point): No longer check whether the type is
6515 supported here. Adjust to new interface.
6516 (the_low_target): Install aarch64_supports_z_point_type as
6517 supports_z_point_type method.
6518 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6519 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6520 instead of a Z packet char. Adjust.
6521 (arm_supports_z_point_type): New function.
6522 (arm_insert_point, arm_remove_point): Adjust to new interface.
6523 (the_low_target): Install arm_supports_z_point_type.
6524 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6525 (cris_insert_point, cris_remove_point): Adjust to new interface.
6526 Don't check whether the type is supported here.
6527 (the_low_target): Install cris_supports_z_point_type.
6528 * linux-low.c (linux_supports_z_point_type): New function.
6529 (linux_insert_point, linux_remove_point): Adjust to new interface.
6530 * linux-low.h (struct linux_target_ops) <insert_point,
6531 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6532 raw_breakpoint pointer parameter.
6533 <supports_z_point_type>: New method.
6534 * linux-mips-low.c (mips_supports_z_point_type): New function.
6535 (mips_insert_point, mips_remove_point): Adjust to new interface.
6536 Use mips_supports_z_point_type.
6537 (the_low_target): Install mips_supports_z_point_type.
6538 * linux-ppc-low.c (the_low_target): Install NULL as
6539 supports_z_point_type method.
6540 * linux-s390-low.c (the_low_target): Install NULL as
6541 supports_z_point_type method.
6542 * linux-sparc-low.c (the_low_target): Install NULL as
6543 supports_z_point_type method.
6544 * linux-x86-low.c (x86_supports_z_point_type): New function.
6545 (x86_insert_point): Adjust to new insert_point interface. Use
6546 insert_memory_breakpoint. Adjust to new
6547 i386_low_insert_watchpoint interface.
6548 (x86_remove_point): Adjust to remove_point interface. Use
6549 remove_memory_breakpoint. Adjust to new
6550 i386_low_remove_watchpoint interface.
6551 (the_low_target): Install x86_supports_z_point_type.
6552 * lynx-low.c (lynx_target_ops): Install NULL as
6553 supports_z_point_type callback.
6554 * nto-low.c (nto_supports_z_point_type): New.
6555 (nto_insert_point, nto_remove_point): Adjust to new interface.
6556 (nto_target_ops): Install nto_supports_z_point_type.
6557 * mem-break.c: Adjust intro comment.
6558 (struct raw_breakpoint) <raw_type, size>: New fields.
6559 <inserted>: Update comment.
6560 <shlib_disabled>: Delete field.
6561 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6562 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6563 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6564 (raw_bkpt_type_to_target_hw_bp_type): New function.
6565 (find_enabled_raw_code_breakpoint_at): New function.
6566 (find_raw_breakpoint_at): New type and size parameters. Use them.
6567 (insert_memory_breakpoint): New function, based off
6568 set_raw_breakpoint_at.
6569 (remove_memory_breakpoint): New function.
6570 (set_raw_breakpoint_at): Reimplement.
6571 (set_breakpoint): New, based on set_breakpoint_at.
6572 (set_breakpoint_at): Reimplement.
6573 (delete_raw_breakpoint): Go through the_target->remove_point
6574 instead of assuming memory breakpoints.
6575 (find_gdb_breakpoint_at): Delete.
6576 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6577 (find_gdb_breakpoint): New function.
6578 (set_gdb_breakpoint_at): Delete.
6579 (z_type_supported): New function.
6580 (set_gdb_breakpoint_1): New function, loosely based off
6581 set_gdb_breakpoint_at.
6582 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6583 (delete_gdb_breakpoint_at): Delete.
6584 (delete_gdb_breakpoint_1): New function, loosely based off
6585 delete_gdb_breakpoint_at.
6586 (delete_gdb_breakpoint): New function.
6587 (clear_gdb_breakpoint_conditions): Rename to ...
6588 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6589 breakpoint.
6590 (add_condition_to_breakpoint): Make static.
6591 (add_breakpoint_condition): Take a struct breakpoint pointer
6592 instead of an address. Adjust.
6593 (gdb_condition_true_at_breakpoint): Rename to ...
6594 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6595 z_type parameter.
6596 (gdb_condition_true_at_breakpoint): Reimplement.
6597 (add_breakpoint_commands): Take a struct breakpoint pointer
6598 instead of an address. Adjust.
6599 (gdb_no_commands_at_breakpoint): Rename to ...
6600 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6601 parameter. Return true if no breakpoint was found. Change debug
6602 output.
6603 (gdb_no_commands_at_breakpoint): Reimplement.
6604 (run_breakpoint_commands): Rename to ...
6605 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6606 and change return type to boolean.
6607 (run_breakpoint_commands): New function.
6608 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6609 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6610 breakpoint. Go through the_target->remove_point instead of
6611 assuming memory breakpoint.
6612 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6613 software and hardware breakpoints.
6614 (reinsert_raw_breakpoint): Go through the_target->insert_point
6615 instead of assuming memory breakpoint.
6616 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6617 software and hardware breakpoints.
6618 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6619 Check both software and hardware breakpoints.
6620 (validate_inserted_breakpoint): Assert the breakpoint is a
6621 software breakpoint. Set the inserted flag to -1 instead of
6622 setting shlib_disabled.
6623 (delete_disabled_breakpoints): Adjust.
6624 (validate_breakpoints): Only validate software breakpoints.
6625 Adjust to inserted flag change.
6626 (check_mem_read, check_mem_write): Skip breakpoint types other
6627 than software breakpoints. Adjust to inserted flag change.
6628 * mem-break.h (enum raw_bkpt_type): New enum.
6629 (raw_breakpoint, struct process_info): Forward declare.
6630 (Z_packet_to_target_hw_bp_type): Delete declaration.
6631 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6632 (set_gdb_breakpoint, delete_gdb_breakpoint)
6633 (clear_breakpoint_conditions): New declarations.
6634 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6635 (breakpoint_inserted_here): Update comment.
6636 (add_breakpoint_condition, add_breakpoint_commands): Replace
6637 address parameter with a breakpoint pointer parameter.
6638 (gdb_breakpoint_here): Update comment.
6639 (delete_gdb_breakpoint_at): Delete.
6640 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6641 * server.c (process_point_options): Take a struct breakpoint
6642 pointer instead of an address. Adjust.
6643 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6644 delete_gdb_breakpoint.
6645 * spu-low.c (spu_target_ops): Install NULL as
6646 supports_z_point_type method.
6647 * target.h: Include mem-break.h.
6648 (struct target_ops) <prepare_to_access_memory>: Update comment.
6649 <supports_z_point_type>: New field.
6650 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6651 instead of a char. Also take a raw breakpoint pointer.
6652 * win32-arm-low.c (the_low_target): Install NULL as
6653 supports_z_point_type.
6654 * win32-i386-low.c (i386_supports_z_point_type): New function.
6655 (i386_insert_point, i386_remove_point): Adjust to new interface.
6656 (the_low_target): Install i386_supports_z_point_type.
6657 * win32-low.c (win32_supports_z_point_type): New function.
6658 (win32_insert_point, win32_remove_point): Adjust to new interface.
6659 (win32_target_ops): Install win32_supports_z_point_type.
6660 * win32-low.h (struct win32_target_ops):
6661 <supports_z_point_type>: New method.
6662 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6663 instead of a char. Also take a raw breakpoint pointer.
6664
932539e3
PA
66652014-05-20 Pedro Alves <palves@redhat.com>
6666
6667 * mem-break.h: Include break-common.h.
6668 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6669 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6670 (Z_packet_to_target_hw_bp_type): New declaration.
6671 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6672 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6673 (Z_PACKET_ACCESS_WP): Delete macros.
6674 (Z_packet_to_hw_type): Delete function.
6675 * i386-low.h: Don't include break-common.h here.
6676 (Z_packet_to_hw_type): Delete declaration.
6677 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6678 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6679 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6680 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6681 * linux-aarch64-low.c: Don't include break-common.h here.
6682 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6683 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6684 (Z_packet_to_target_hw_bp_type): Delete function.
6685 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6686 function.
6687 (mips_insert_point, mips_remove_point): Use
6688 Z_packet_to_target_hw_bp_type.
6689
4ff0d3d8
PA
66902014-05-20 Pedro Alves <palves@redhat.com>
6691
6692 * linux-aarch64-low.c: Include break-common.h.
6693 (enum target_point_type): Delete.
6694 (Z_packet_to_point_type): Rename to ...
6695 (Z_packet_to_target_hw_bp_type): ... this, and return a
6696 target_hw_bp_type instead.
6697 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6698 instead of an enum target_point_type.
6699 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6700 breakpoint type.
6701 (aarch64_dr_state_insert_one_point)
6702 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6703 (aarch64_handle_aligned_watchpoint)
6704 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6705 Take an enum target_hw_bp_type instead of an enum
6706 target_point_type.
6707 (aarch64_supports_z_point_type): New function.
6708 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6709 use Z_packet_to_target_hw_bp_type.
6710
786dc519
JB
67112014-05-20 Joel Brobecker <brobecker@adacore.com>
6712
6713 * configure.ac: Only use -Werror by default when DEVELOPMENT
6714 is true.
6715 * configure: Regenerate.
6716
9e0aa64f
JK
67172014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6718
6719 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6720 * linux-x86-low.c (X86_64_USER_REGS): New.
6721 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6722
2b577b92
YQ
67232014-04-28 Yao Qi <yao@codesourcery.com>
6724
6725 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6726 name.
6727
94611da2
PA
67282014-04-25 Pedro Alves <palves@redhat.com>
6729
6730 PR server/16255
6731 * linux-low.c (linux_attach_fail_reason_string): New function.
6732 (linux_attach_lwp): Delete.
6733 (linux_attach_lwp_1): Rename to ...
6734 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6735 argument. Remove "initial" parameter. Return int instead of
6736 void. Don't error or warn here.
6737 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6738 failure to attach to the tgid. Call warning when failing to
6739 attach to an lwp.
6740 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6741 argument. Remove "initial" parameter. Return int instead of
6742 void. Don't error or warn here.
6743 (linux_attach_fail_reason_string): New declaration.
6744 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6745 interface change. Use linux_attach_fail_reason_string.
6746
01f9f808
MS
67472014-04-24 Michael Sturm <michael.sturm@mintel.com>
6748 Walfred Tedeschi <walfred.tedeschi@intel.com>
6749
6750 * Makefile.in: Added rules to handle new files
6751 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6752 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6753 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6754 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6755 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6756 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6757 x32-avx512-linux.o.
6758 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6759 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6760 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6761 i386/x32-avx512.xml.
6762 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6763 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6764 i386/x32-avx512-linux.xml.
6765 * i387-fp.c (num_avx512_k_registers): New constant for number
6766 of K registers.
6767 (num_avx512_zmmh_low_registers): New constant for number of
6768 lower ZMM registers (0-15).
6769 (num_avx512_zmmh_high_registers): New constant for number of
6770 higher ZMM registers (16-31).
6771 (num_avx512_ymmh_registers): New contant for number of higher
6772 YMM registers (ymm16-31 added by avx521 on x86_64).
6773 (num_avx512_xmm_registers): New constant for number of higher
6774 XMM registers (xmm16-31 added by AVX512 on x86_64).
6775 (struct i387_xsave): Add space for AVX512 registers.
6776 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6777 Add code to handle AVX512 registers.
6778 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6779 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6780 prototypei from generated file.
6781 (tdesc_amd64_avx512_linux): Likewise.
6782 (init_registers_x32_avx512_linux): Likewise.
6783 (tdesc_x32_avx512_linux): Likewise.
6784 (init_registers_i386_avx512_linux): Likewise.
6785 (tdesc_i386_avx512_linux): Likewise.
6786 (x86_64_regmap): Add AVX512 registers.
6787 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6788 mask.
6789 (initialize_low_arch): Add code to initialize AVX512 registers.
6790
51aa91f9
PA
67912014-04-23 Pedro Alves <palves@redhat.com>
6792
6793 * mem-break.c (find_gdb_breakpoint_at): Make static.
6794 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6795
a4165e94
PA
67962014-04-23 Pedro Alves <palves@redhat.com>
6797
6798 * i386-low.c: Don't include break-common.h here.
6799 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6800 prototype to take target_hw_bp_type as argument instead of a Z
6801 packet char.
6802 * i386-low.h: Include break-common.h here.
6803 (Z_packet_to_hw_type): Declare.
6804 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6805 prototypes.
6806 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6807 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6808 (x86_remove_point): Convert the packet number to a
6809 target_hw_bp_type before calling i386_low_remove_watchpoint.
6810 * win32-i386-low.c (i386_insert_point): Convert the packet number
6811 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6812 (i386_remove_point): Convert the packet number to a
6813 target_hw_bp_type before calling i386_low_remove_watchpoint.
6814
b8acf843
PA
68152014-04-23 Pedro Alves <palves@redhat.com>
6816
6817 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6818
d708bcd1
PA
68192014-04-10 Pedro Alves <palves@redhat.com>
6820
6821 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6822 Check if the condition or command is NULL before checking if the
6823 breakpoint is known. On success, return true.
6824 * mem-break.h (add_breakpoint_condition): Document return.
6825 (add_breakpoint_commands): Add describing comment.
6826 * server.c (skip_to_semicolon): New function.
6827 (process_point_options): Use it.
6828
2eec7d5b
PA
68292014-04-09 Pedro Alves <palves@redhat.com>
6830
6831 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6832 to lwpid_of.
6833
fa96cb38
PA
68342014-02-27 Pedro Alves <palves@redhat.com>
6835
6836 PR 12702
6837 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6838 macros.
6839 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6840 output.
6841 (last_thread_of_process_p): Take a PID argument instead of a
6842 thread pointer.
6843 (linux_wait_for_lwp): Delete.
6844 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6845 functions.
6846 (linux_low_filter_event): New function, party factored out from
6847 linux_wait_for_event.
6848 (linux_wait_for_event): Rename to ...
6849 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6850 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6851 sigsuspend. Check for zombie leaders.
6852 (linux_wait_for_event): Reimplement as wrapper around
6853 linux_wait_for_event_filtered.
6854 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6855 a normal or signal exit is seen, it's the whole process exiting.
6856 (wait_for_sigstop): No longer a for_each_inferior callback.
6857 Rewrite on top of linux_wait_for_event_filtered.
6858 (stop_all_lwps): Call wait_for_sigstop directly.
6859 * server.c (resume, handle_target_event): Handle
6860 TARGET_WAITKIND_NO_RESUMED.
6861
d763de10
JB
68622014-02-26 Joel Brobecker <brobecker@adacore.com>
6863
6864 * win32-low.c (psapi_get_dll_name,
6865 * win32_CreateToolhelp32Snapshot): Delete.
6866 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6867 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6868 Delete.
6869 (handle_load_dll): Add function description.
6870 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6871
850a0f76
JB
68722014-02-26 Joel Brobecker <brobecker@adacore.com>
6873
6874 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6875 Add comment.
6876 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6877 base address when calling win32_add_one_solib.
6878 (handle_load_dll): Delete local variable load_addr.
6879 Remove 0x1000 offset applied to DLL base address when calling
6880 win32_add_one_solib.
6881 (handle_unload_dll): Add comment.
6882
f25b3fc3
JB
68832014-02-26 Joel Brobecker <brobecker@adacore.com>
6884
6885 * win32-low.c (win32_add_all_dlls): Renames
6886 win32_ensure_ntdll_loaded. Rewrite function documentation.
6887 Adjust implementation to always load all DLLs.
6888 Add 0x1000 offset to DLL base address when calling
6889 win32_add_one_solib.
6890 (child_initialization_done): New static global.
6891 (do_initial_child_stuff): Set child_initialization_done to
6892 zero during child initialization, and 1 after. Replace call
6893 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6894 Add comment.
6895 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6896 (handle_unload_dll): Add function documentation.
6897 (get_child_debug_event): Ignore load and unload DLL events
6898 during child initialization.
6899
d86d4aaf
DE
69002014-02-20 Doug Evans <dje@google.com>
6901
3bc32da3 6902 Remove global all_lwps.
d86d4aaf
DE
6903 * inferiors.h (ptid_of): Move here from linux-low.h.
6904 (pid_of, lwpid_of): Ditto.
6905 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6906 parameter is a struct thread_info * now.
6907 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6908 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6909 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6910 directly.
6911 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6912 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6913 * linux-arm-low.c (update_registers_callback): Update, "entry"
6914 parameter is a struct thread_info * now.
6915 Fetch lwpid from current_inferior directly.
6916 (arm_insert_point): Pass &all_threads to find_inferior instead of
6917 &all_lwps.
6918 (arm_remove_point): Ditto.
6919 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6920 (arm_prepare_to_resume): Fetch pid from thread.
6921 (arm_read_description): Fetch lwpid from current_inferior directly.
6922 * linux-low.c (all_lwps): Delete.
6923 (delete_lwp): Delete call to remove_inferior.
6924 (handle_extended_wait): Fetch lwpid from thread.
6925 (add_lwp): Don't set lwp->entry.id. Remove call to
6926 add_inferior_to_list.
6927 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6928 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6929 (kill_one_lwp_callback): Ditto.
6930 (linux_kill): Don't dereference NULL pointer.
6931 Fetch ptid,lwpid from thread.
6932 (get_detach_signal): Fetch ptid from thread.
6933 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6934 Simplify call to regcache_invalidate_thread.
6935 (delete_lwp_callback): Update, "entry" parameter is a
6936 struct thread_info * now. Fetch pid from thread.
6937 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6938 (status_pending_p_callback): Update, "entry" parameter is a
6939 struct thread_info * now. Fetch ptid from thread.
6940 (find_lwp_pid): Update, "entry" parameter is a
6941 struct thread_info * now.
6942 (linux_wait_for_lwp): Fetch pid from thread.
6943 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6944 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6945 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6946 (dequeue_one_deferred_signal): Ditto.
6947 (cancel_breakpoint): Fetch ptid from current_inferior.
6948 (linux_wait_for_event): Pass &all_threads to find_inferior,
6949 not &all_lwps. Fetch ptid, lwpid from thread.
6950 (count_events_callback): Update, "entry" parameter is a
6951 struct thread_info * now.
6952 (select_singlestep_lwp_callback): Ditto.
6953 (select_event_lwp_callback): Ditto.
6954 (cancel_breakpoints_callback): Ditto.
6955 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6956 not &all_lwps.
6957 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6958 (unsuspend_one_lwp): Update, "entry" parameter is a
6959 struct thread_info * now.
6960 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6961 not &all_lwps.
6962 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6963 Fetch lwpid from thread, not lwp.
6964 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6965 Pass &all_threads to find_inferior, not &all_lwps.
6966 (send_sigstop): Fetch lwpid from thread, not lwp.
6967 (send_sigstop_callback): Update, "entry" parameter is a
6968 struct thread_info * now.
6969 (suspend_and_send_sigstop_callback): Ditto.
6970 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6971 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6972 struct thread_info * now.
6973 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6974 from thread, lwp.
6975 (lwp_running): Update, "entry" parameter is a
6976 struct thread_info * now.
6977 (stop_all_lwps): Fetch ptid from thread.
6978 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6979 (linux_resume_one_lwp): Fetch lwpid from thread.
6980 (linux_set_resume_request): Update, "entry" parameter is a
6981 struct thread_info * now. Fetch pid, lwpid from thread.
6982 (resume_status_pending_p): Update, "entry" parameter is a
6983 struct thread_info * now.
6984 (need_step_over_p): Ditto. Fetch lwpid from thread.
6985 (start_step_over): Fetch lwpid from thread.
6986 (linux_resume_one_thread): Update, "entry" parameter is a
6987 struct thread_info * now. Fetch lwpid from thread.
6988 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6989 (proceed_one_lwp): Update, "entry" parameter is a
6990 struct thread_info * now. Fetch lwpid from thread.
6991 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6992 struct thread_info * now.
6993 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6994 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6995 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6996 directly.
6997 (regsets_store_inferior_registers): Ditto.
6998 (fetch_register, store_register): Ditto.
6999 (linux_read_memory, linux_write_memory): Ditto.
7000 (linux_request_interrupt): Ditto.
7001 (linux_read_auxv): Ditto.
7002 (linux_xfer_siginfo): Ditto.
7003 (linux_qxfer_spu): Ditto.
7004 (linux_qxfer_libraries_svr4): Ditto.
7005 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7006 moved to inferiors.h.
7007 (get_lwp): Delete.
7008 (get_thread_lwp): Update.
7009 (struct lwp_info): Delete member "entry". Simplify comment for
7010 member "thread".
7011 (all_lwps): Delete.
7012 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7013 current_inferior directly.
7014 (update_watch_registers_callback): Update, "entry" parameter is a
7015 struct thread_info * now. Fetch pid from thread.
7016 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7017 (mips_insert_point): Fetch lwpid from current_inferior.
7018 Pass &all_threads to find_inferior, not &all_lwps.
7019 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7020 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7021 directly.
7022 (mips_stopped_data_address): Ditto.
7023 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7024 directly.
7025 * linux-tile-low.c (tile_arch_setup): Ditto.
7026 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7027 (update_debug_registers_callback): Update, "entry" parameter is a
7028 struct thread_info * now. Fetch pid from thread.
7029 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7030 Pass &all_threads to find_inferior, not &all_lwps.
7031 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7032 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7033 Pass &all_threads to find_inferior, not &all_lwps.
7034 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7035 (i386_dr_low_get_status): Ditto.
7036 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7037 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7038 (x86_linux_read_description): Ditto.
7039 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7040
3b8361aa
DE
70412014-02-20 Doug Evans <dje@google.com>
7042
7043 * inferiors.c (get_first_inferior): Fix buglet.
7044
f7667f0d
DE
70452014-02-19 Doug Evans <dje@google.com>
7046
7047 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7048 * inferiors.c (add_thread): Change result type to struct thread_info *.
7049 All callers updated.
7050 (add_lwp): Call add_thread here instead of in callers.
7051 All callers updated.
7052 * linux-low.h (get_lwp_thread): Rewrite.
7053 (struct lwp_info): New member "thread".
7054
b3312d80
DE
70552014-02-19 Doug Evans <dje@google.com>
7056
7057 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7058 All callers updated.
7059
ecc6f45c
DE
70602014-02-19 Doug Evans <dje@google.com>
7061
7062 * inferiors.c (add_thread): Fix whitespace.
7063
649ebbca
DE
70642014-02-19 Doug Evans <dje@google.com>
7065
7066 * dll.c (clear_dlls): Replace accessing list implemention details
7067 with API function.
7068 * gdbthread.h (get_first_thread): Declare.
7069 * inferiors.c (for_each_inferior_with_data): New function.
7070 (get_first_thread): New function.
7071 (find_thread_ptid): Simplify.
7072 (get_first_inferior): New function.
7073 (clear_list): Delete.
7074 (one_inferior_p): New function.
7075 (clear_inferior_list): New function.
7076 (clear_inferiors): Update.
7077 * inferiors.h (for_each_inferior_with_data): Declare.
7078 (clear_inferior_list): Declare.
7079 (one_inferior_p): Declare.
7080 (get_first_inferior): Declare.
7081 * linux-low.c (linux_wait_for_event): Replace accessing list
7082 implemention details with API function.
7083 * server.c (target_running): Ditto.
7084 (accumulate_file_name_length): New function.
7085 (emit_dll_description): New function.
7086 (handle_qxfer_libraries): Replace accessing list implemention
7087 details with API function.
7088 (handle_qxfer_threads_worker): New function.
7089 (handle_qxfer_threads_proper): Replace accessing list implemention
7090 details with API function.
7091 (handle_query): Ditto.
7092 (visit_actioned_threads_callback_ftype): New typedef.
7093 (visit_actioned_threads_data): New struct.
7094 (visit_actioned_threads): Rewrite to be find_inferior callback.
7095 (resume): Call find_inferior.
7096 (handle_status): Replace accessing list implemention
7097 details with API function.
7098 (process_serial_event): Replace accessing list implemention details
7099 with API function.
7100 * target.c (set_desired_inferior): Replace accessing list implemention
7101 details with API function.
7102 * tracepoint.c (same_process_p): New function.
7103 (gdb_agent_about_to_close): Replace accessing list implemention
7104 details with API function.
7105 * win32-low.c (child_delete_thread): Replace accessing list
7106 implemention details with API function.
7107 (match_dll_by_basename): New function.
7108 (dll_is_loaded_by_basename): New function.
7109 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7110 details call to dll_is_loaded_by_basename.
7111
80894984
DE
71122014-02-19 Doug Evans <dje@google.com>
7113
7114 * dll.h (struct dll_info): Add comment.
7115 * gdbthread.h (struct thread_info): Add comment.
7116 (current_ptid): Simplify.
7117 * inferiors.c (add_process): Update.
7118 (remove_process): Update.
7119 * inferiors.h (struct process_info): Rename member "head" to "entry".
7120 * linux-low.c (delete_lwp): Update.
7121 (add_lwp): Update.
7122 (last_thread_of_process_p): Update.
7123 (kill_one_lwp_callback, linux_kill): Update.
7124 (status_pending_p_callback): Update.
7125 (wait_for_sigstop): Update. Simplify read of ptid.
7126 (start_step_over): Update.
7127 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7128 (get_lwp_thread): Update.
7129 (struct lwp_info): Rename member "head" to "entry".
7130 * regcache.h (inferior_list_entry): Delete.
7131 * server.c (kill_inferior_callback): Update.
7132 (detach_or_kill_inferior_callback): Update.
7133 (print_started_pid): Update.
7134 (print_attached_pid): Update.
7135 (process_serial_event): Simplify read of ptid.
7136 * thread-db.c (thread_db_create_event): Update.
7137 (thread_db_get_tls_address): Update.
7138 * win32-low.c (current_inferior_ptid): Simplify.
7139
46917d26
TT
71402014-02-19 Tom Tromey <tromey@redhat.com>
7141
7142 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7143 argument.
7144 (target_supports_btrace): Update.
7145
0759a81e
YQ
71462014-02-14 Yao Qi <yao@codesourcery.com>
7147
7148 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7149 (rsp-low-ipa.o): New target.
7150
a7191e8b
TT
71512014-02-12 Tom Tromey <tromey@redhat.com>
7152
7153 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7154 convert_ascii_to_int.
7155 * regcache.c (registers_to_string): Likewise.
7156 * remote-utils.c (decode_M_packet): Likewise.
7157 * server.c (process_serial_event): Likewise.
7158
ff0e980e
TT
71592014-02-12 Tom Tromey <tromey@redhat.com>
7160
7161 * server.c (handle_query, handle_v_run): Use hex2bin, not
7162 unhexify.
7163 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7164
e9371aff
TT
71652014-02-12 Tom Tromey <tromey@redhat.com>
7166
7167 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7168 convert_int_to_ascii.
7169 * regcache.c (registers_to_string, collect_register_as_string):
7170 Likewise.
7171 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7172 Likewise.
7173 * server.c (process_serial_event): Likewise.
7174 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7175 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7176
971dc0b8
TT
71772014-02-12 Tom Tromey <tromey@redhat.com>
7178
7179 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7180 bin2hex, not hexify.
7181 * tracepoint.c (cmd_qtstatus): Likewise.
7182
0a822afb
TT
71832014-02-12 Tom Tromey <tromey@redhat.com>
7184
7185 * remote-utils.c (monitor_output): Pass explicit length to
7186 hexify.
7187
9c3d6531
TT
71882014-02-12 Tom Tromey <tromey@redhat.com>
7189
7190 * tracepoint.c: Include rsp-low.h.
7191 * server.c: Include rsp-low.h.
7192 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7193 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7194 declare.
7195 * remote-utils.c: Include rsp-low.h.
7196 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7197 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7198 (convert_int_to_ascii, convert_ascii_to_int): Move to
7199 common/rsp-low.c.
7200 * regcache.c: Include rsp-low.h.
7201 * ax.c: Include rsp-low.h.
7202 * Makefile.in (SFILES): Add common/rsp-low.c.
7203 (OBS): Add rsp-low.o.
7204 (rsp-low.o): New target.
7205
01fd3ea5
TT
72062014-02-12 Tom Tromey <tromey@redhat.com>
7207
7208 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7209 Include print-utils.h.
7210 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7211 (plongest, thirty_two, phex_nz): Remove.
7212 * Makefile.in (SFILES): Add common/print-utils.c.
7213 (OBS): Add print-utils.o.
7214 (print-utils-ipa.o): New target.
7215 (print-utils.o): New target.
7216 (IPA_OBJS): Add print-utils-ipa.o.
7217
e99dc820
TT
72182014-02-06 Tom Tromey <tromey@redhat.com>
7219
7220 * Makefile.in (SFILES): Fix indentation.
7221
ee1e2d4f
DE
72222014-02-05 Doug Evans <dje@google.com>
7223
7224 * linux-low.c (linux_wait_for_event): Improve comment.
7225 (linux_wait_1): Keep current_inferior in sync with event_child.
7226
f5a02773
DE
72272014-01-22 Doug Evans <dje@google.com>
7228
7229 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7230
87ce2a04
DE
72312014-01-22 Doug Evans <dje@google.com>
7232
7233 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7234 * configure: Regenerate.
7235 * config.in: Regenerate.
7236 * Makefile.in (SFILES): Add debug.c.
7237 (OBS): Add debug.o.
7238 * debug.c: New file.
7239 * debug.h: New file.
7240 * linux-aarch64-low.c (*): Update all debugging printfs to use
7241 debug_printf instead of fprintf.
7242 * linux-arm-low.c (*): Ditto.
7243 * linux-cris-low.c (*): Ditto.
7244 * linux-crisv32-low.c (*): Ditto.
7245 * linux-m32r-low.c (*): Ditto.
7246 * linux-sparc-low.c (*): Ditto.
7247 * linux-x86.c (*): Ditto.
7248 * linux-low.c (*): Ditto.
7249 (linux_wait_1): Add calls to debug_enter, debug_exit.
7250 (linux_wait): Remove redundant debugging printf.
7251 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7252 (linux_resume, unstop_all_lwps): Ditto.
7253 * mem-break.c (*): Update all debugging printfs to use
7254 debug_printf instead of fprintf.
7255 * remote-utils.c (*): Ditto.
7256 * thread-db.c (*): Ditto.
7257 * server.c #include <ctype.h>, "gdb_vecs.h".
7258 (debug_threads): Moved to debug.c.
7259 (*): Update all debugging printfs to use debug_printf instead of
7260 fprintf.
7261 (start_inferior): Replace call to fflush with call to debug_flush.
7262 (monitor_show_help): Mention set debug-format.
7263 (parse_debug_format_options): New function.
7264 (handle_monitor_command): Handle "monitor set debug-format".
7265 (gdbserver_usage): Mention --debug-format.
7266 (main): Parse --debug-format.
7267 * server.h (debug_threads): Declaration moved to debug.h.
7268 #include "debug.h".
7269 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7270 trace_debug_1 that uses debug_printf.
7271 (tracepoint_look_up_symbols): Update all debugging printfs to use
7272 debug_printf instead of fprintf.
7273
e671835b
BS
72742014-01-20 Baruch Siach <baruch@tkos.co.il>
7275
7276 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7277 sys/ptrace.h.
7278
b5737fa9
PA
72792014-01-17 Pedro Alves <palves@redhat.com>
7280
ea38d2a9 7281 PR build/16445
c7faa97a
PA
7282 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7283 defined after including gdb_proc_service.h.
b5737fa9 7284
40ed484e
DE
72852014-01-16 Doug Evans <dje@google.com>
7286
7287 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7288 (match_dll): Use it.
7289
969c39fb
MM
72902014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7291
7292 * target.h (target_ops) <read_btrace>: Change parameters and
7293 return type to allow error reporting.
7294 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7295 trace reading errors on.
7296 * linux-low.c (linux_low_read_btrace): Pass trace reading
7297 errors on.
7298 (linux_low_disable_btrace): New.
7299
ab7f45ba
DE
73002014-01-15 Doug Evans <dje@google.com>
7301
7302 * inferiors.c (thread_id_to_gdb_id): Delete.
7303 * inferiors.h (thread_id_to_gdb_id): Delete.
7304
66af0f44
EZ
73052014-01-13 Eli Zaretskii <eliz@gnu.org>
7306
7307 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7308 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7309 versions.
7310
9939e131
PA
73112014-01-08 Pedro Alves <palves@redhat.com>
7312
7313 * server.c (handle_status): Don't discard previous queued stop
7314 replies or thread's pending status here.
7315 (main) <disconnection>: Do it here instead.
7316
b7ea362b
PA
73172014-01-08 Pedro Alves <palves@redhat.com>
7318
7319 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7320 * server.c (visit_actioned_threads, handle_pending_status): New
7321 function.
7322 (handle_v_cont): Factor out parts to ...
7323 (resume): ... this new function. If in all-stop, and a thread
7324 being resumed has a pending status, report it without actually
7325 resuming.
7326 (myresume): Adjust to use the new 'resume' function.
7327 (clear_pending_status_callback, set_pending_status_callback)
7328 (find_status_pending_thread_callback): New functions.
7329 (handle_status): Handle the case of multiple threads having
7330 interesting statuses to report. Report threads' real last signal
7331 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7332 with an interesting thread to report the status for, instead of
7333 always reporting the status of the first thread.
7334
28498c42
JB
73352014-01-01 Joel Brobecker <brobecker@adacore.com>
7336
7337 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7338 * gdbreplay.c (gdbreplay_version): Likewise.
7339
f45c82da
YZ
73402013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7341
7342 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7343 iov.iov_len with the real length in use.
7344
379a5e2d
JB
73452013-12-13 Joel Brobecker <brobecker@adacore.com>
7346
7347 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7348 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7349 for all targets that use win32-low.c.
7350 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7351 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7352
4210d83e
PA
73532013-12-13 Pedro Alves <palves@redhat.com>
7354
7355 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7356 if equal to TARGET_WAITKIND_LOADED.
7357 * win32-low.c (cached_status): New static global.
7358 (win32_wait): Add declaration.
7359 (do_initial_child_stuff): Flush all initial pending debug events
7360 up to the initial breakpoint.
7361 (win32_wait): If CACHED_STATUS was set, return that instead
7362 of doing a real wait. Remove the code resuming the execution
7363 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7364 during the initial phase. Also remove the code changing
7365 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7366 TARGET_WAITKIND_STOPPED.
7367
e7f0d979
YQ
73682013-12-11 Yao Qi <yao@codesourcery.com>
7369
7370 * notif.c (handle_notif_ack): Return 0 if no notification
7371 matches.
7372
ebcf782c
DE
73732013-11-20 Doug Evans <dje@google.com>
7374
7375 * linux-low.c (linux_set_resume_request): Fix comment.
7376
20ad9378
DE
73772013-11-20 Doug Evans <dje@google.com>
7378
7379 * linux-low.c (resume_status_pending_p): Tweak comment.
7380
a196ebeb
WT
73812013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7382
7383 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7384 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7385 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7386 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7387 (srv_amd64_regobj): Add amd64-mpx.o.
7388 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7389 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7390 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7391 * i387-fp.c (num_pl_bnd_register) Added constant.
7392 (num_pl_bnd_cfg_registers) Added constant.
7393 (struct i387_xsave) Added reserved area and MPX fields.
7394 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7395 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7396 function.
7397 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7398 (init_registers_amd64_mpx_linux): Declare new function.
7399 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7400 (x86_64_regmap): Add MPX registers.
7401 (x86_linux_read_description): Add MPX case.
7402 (initialize_low_arch): Initialize MPX targets.
7403
0080a2f6
TT
74042013-11-18 Tom Tromey <tromey@redhat.com>
7405
7406 * configure: Rebuild.
7407 * configure.ac: Don't check for stdlib.h.
7408 * gdbreplay.c: Unconditionally include stdlib.h.
7409
2978b111
TT
74102013-11-18 Tom Tromey <tromey@redhat.com>
7411
7412 * config.in: Rebuild.
7413 * configure: Rebuild.
7414 * configure.ac: Don't use AC_HEADER_DIRENT.
7415
a3d08894
TT
74162013-11-18 Tom Tromey <tromey@redhat.com>
7417
7418 * server.h: Don't check HAVE_STRING_H.
7419 * gdbreplay.c: Don't check HAVE_STRING_H.
7420 * configure: Rebuild.
7421
0a5dd17d
TT
74222013-11-18 Tom Tromey <tromey@redhat.com>
7423
7424 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7425 LIBGNU.
7426
1bd2f0ba
TT
74272013-11-08 Tom Tromey <tromey@redhat.com>
7428
7429 * configure, config.in: Rebuild.
7430 * configure.ac: Remove unused configury.
7431
3266f10b
TT
74322013-11-08 Tom Tromey <tromey@redhat.com>
7433
7434 * acinclude.m4: Include common.m4, codeset.m4.
7435 * configure, config.in: Rebuild.
7436 * configure.ac: Use GDB_AC_COMMON.
7437
6682d959
AA
74382013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7439
7440 * linux-s390-low.c (HWCAP_S390_TE): New define.
7441 (s390_arch_setup): Consider the TE field in the HWCAP for
7442 determining 'have_regset_tdb'.
7443
fd0a4d76
SDJ
74442013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7445
7446 PR gdb/16014
7447 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7448 call to sizeof.
7449
1a3d890b
PA
74502013-10-02 Pedro Alves <palves@redhat.com>
7451
7452 * server.c (process_serial_event): Don't output "GDBserver
7453 exiting" if GDB is connected through stdio.
7454 * target.c (mywait): Likewise, be silent if GDB is connected
7455 through stdio.
7456
97ad4581
JB
74572013-10-01 Joel Brobecker <brobecker@adacore.com>
7458
7459 * lynx-low.c (lynx_add_threads_after_attach): New function.
7460 (lynx_attach): Remove call to add_thread. Add call to
7461 lynx_add_threads_after_attach instead.
7462
5b4e221c
MF
74632013-09-28 Mike Frysinger <vapier@gentoo.org>
7464
7465 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7466 * config.in, configure: Regenerated.
7467
ee47b2f8
YQ
74682013-09-18 Yao Qi <yao@codesourcery.com>
7469
7470 PR server/15959
7471 * server.c (start_inferior): Clear 'resume_info'.
7472
d6707650 74732013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7474
d6707650
JW
7475 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7476 for each register.
7477
9243dd0e 74782013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7479
9243dd0e
JW
7480 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7481 linux-tile-low.o to srv_tgtobj.
7482
c623a6ef
WN
74832013-09-16 Will Newton <will.newton@linaro.org>
7484
7485 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7486 out regs.
7487
fb71d39e
PA
74882013-09-06 Pedro Alves <palves@redhat.com>
7489
7490 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7491 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7492 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7493 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7494 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7495 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7496
8e7e9910
PA
74972013-09-06 Pedro Alves <palves@redhat.com>
7498
7499 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7500 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7501
7c3a12ca
PA
75022013-09-06 Pedro Alves <palves@redhat.com>
7503
7504 * linux-amd64-ipa.c: Include tracepoint.h.
7505 * linux-i386-ipa.c: Include tracepoint.h.
7506
8eb3d7b6
RW
75072013-09-06 Ricard Wanderlof <ricardw@axis.com>
7508
7509 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7510 (ps_get_thread_area): New function.
7511
eddddb9d
RW
75122013-09-06 Ricard Wanderlof <ricardw@axis.com>
7513
7514 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7515 (initialize_low_arch): Call init_registers_crisv32 rather than
7516 init_register_crisv32.
7517
533b0600
PA
75182013-09-05 Pedro Alves <palves@redhat.com>
7519
7520 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7521 to ...
7522 * hostio.h: ... this new file.
7523 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7524 win32-low.c: Include hostio.h.
7525
0ce3d3b5
PA
75262013-09-05 Pedro Alves <palves@redhat.com>
7527
7528 * server.h (gdb_client_data, handler_func, callback_handler_func)
7529 (delete_file_handler, add_file_handler, append_callback_event)
7530 (delete_callback_event, start_event_loop, initialize_event_loop):
7531 Move to event-loop.h and include it.
7532 * event-loop.h: New file.
7533
799cdc37
PA
75342013-09-05 Pedro Alves <palves@redhat.com>
7535
7536 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7537 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7538 (loaded_dll, unloaded_dll): Move to ...
7539 * dll.h: ... this new file.
7540 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7541
6a6bbd9d
PA
75422013-09-05 Pedro Alves <palves@redhat.com>
7543
7544 * server.h (current_process, get_thread_process, all_processes)
7545 (add_inferior_to_list, for_each_inferior, current_inferior)
7546 (remove_inferior, add_process, remove_process, find_process_pid)
7547 (have_started_inferiors_p, have_attached_inferiors_p)
7548 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7549 (clear_inferiors, find_inferior, find_inferior_id)
7550 (inferior_target_data, set_inferior_target_data)
7551 (inferior_regcache_data, set_inferior_regcache_data): Move to
7552 inferiors.h, and include it.
7553 * inferiors.h: New file.
7554
f699aaba
PA
75552013-09-05 Pedro Alves <palves@redhat.com>
7556
7557 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7558 Move ...
72f4393d 7559 * ax.h: ... here.
f699aaba 7560
c144c7a0
PA
75612013-09-05 Pedro Alves <palves@redhat.com>
7562
7563 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7564 tracepoint.h.
7565 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7566 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7567 (handle_tracepoint_general_set, handle_tracepoint_query)
7568 (tracepoint_finished_step, tracepoint_was_hit)
7569 (release_while_stepping_state_list, current_traceframe)
7570 (in_readonly_region, traceframe_read_mem)
7571 (fetch_traceframe_registers, traceframe_read_sdata)
7572 (traceframe_read_info, struct fast_tpoint_collect_status)
7573 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7574 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7575 (supply_fast_tracepoint_registers)
7576 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7577 (ipa_tdesc, claim_trampoline_space)
7578 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7579 (agent_mem_read, agent_get_trace_state_variable_value)
7580 (agent_set_trace_state_variable_value, agent_tsv_read)
7581 (agent_mem_read_string, get_raw_reg_func_addr)
7582 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7583 * tracepoint.h: ... this new file.
7584
ff42e6ab
PA
75852013-09-05 Pedro Alves <palves@redhat.com>
7586
7587 * server.h (perror_with_name, error, fatal, warning, paddress)
7588 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7589 include it.
7590 * utils.h: New file.
7591
541af0f4
PA
75922013-09-05 Pedro Alves <palves@redhat.com>
7593
7594 * server.h (remote_debug, noack_mode, transport_is_reliable)
7595 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7596 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7597 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7598 (write_enn, initialize_async_io, enable_async_io)
7599 (disable_async_io, check_remote_input_interrupt_request)
7600 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7601 (dead_thread_notify, prepare_resume_reply)
7602 (decode_address_to_semicolon, decode_address, decode_m_packet)
7603 (decode_M_packet, decode_X_packet, decode_xfer_write)
7604 (decode_search_memory_packet, unhexify, hexify)
7605 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7606 (look_up_one_symbol, relocate_instruction)
7607 (monitor_output): Move to remote-utils.h, and include it.
7608 * remote-utils.h: New file.
7609
eebdf26b
PA
76102013-09-05 Pedro Alves <palves@redhat.com>
7611
7612 * server.h (_): Delete.
7613
3aafd2ff
PA
76142013-09-02 Pedro Alves <palves@redhat.com>
7615
7616 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7617 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7618 allocated.
7619 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7620
cee83bcb
PM
76212013-09-02 Pierre Muller <muller@sourceware.org>
7622
7623 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7624 or WriteProcessMemory complete successfully and handle
7625 ERROR_PARTIAL_COPY error.
7626
9a13b2fa
PA
76272013-09-02 Pedro Alves <palves@redhat.com>
7628
7629 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7630 error instead of EIO.
7631
602e3198
JK
76322013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7633
7634 PR server/15604
7635 * linux-low.c: Include filestuff.h.
7636 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7637 * lynx-low.c: Include filestuff.h.
7638 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7639 * server.c: Include filestuff.h.
7640 (main): Call notice_open_fds.
7641 * spu-low.c: Include filestuff.h.
7642 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7643
96d7229d
LM
76442013-08-22 Luis Machado <lgustavo@codesourcery.com>
7645
7646 * Makefile.in: Explain why ../target and ../nat are not
7647 listed as include file search paths.
7648 (linux-waitpid.o): New object file rule.
7649 * configure.srv (srv_native_linux_obj): New variable.
7650 Replace all occurrences of linux native object files with
7651 $srv_native_linux_obj.
7652 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7653 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7654 (linux_enable_event_reporting): Remove declaration.
7655 (my_waitpid): Moved to common/linux-waitpid.c.
7656 (linux_wait_for_event): Pass ptid when calling
7657 linux_enable_event_reporting.
7658 (linux_supports_tracefork_flag): Remove.
7659 (linux_enable_event_reporting): Likewise.
7660 (linux_tracefork_grandchild): Remove.
7661 (STACK_SIZE): Moved to common/linux-ptrace.c.
7662 (linux_tracefork_child): Remove.
7663 (linux_test_for_tracefork): Remove.
7664 (linux_look_up_symbols): Call linux_supports_traceclone.
7665 (initialize_low): Remove call to linux_test_for_tracefork.
7666 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7667 common/linux-ptrace.h.
7668 (PTRACE_TYPE_ARG4): Likewise.
7669 Include linux-ptrace.h.
7670
32940073
PA
76712013-08-21 Pedro Alves <palves@redhat.com>
7672
7673 * config.in: Renegerate.
7674
33b60d58 76752013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7676
33b60d58
LM
7677 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7678 (SFILES): Remove $(srcdir)/common/target-common.c and
7679 add $(srcdir)/target/waitstatus.c.
7680 (OBS): Remove target-common.o and add waitstatus.o.
7681 (server_h): Remove $(srcdir)/../common/target-common.h and
7682 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7683 and $(srcdir)/../target/waitstatus.h.
7684 (target-common.o): Remove.
7685 (waitstatus.o): New target object file.
7686 * target.h: Do not include target-common.h and
7687 include target/resume.h, target/wait.h and
7688 target/waitstatus.h.
7689
b8e1b30e
LM
76902013-08-13 Luis Machado <lgustavo@codesourcery.com>
7691
7692 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7693 to PTRACE_TYPE_ARG3.
7694 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7695 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7696 PTRACE_TYPE_ARG4.
7697 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7698 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7699
7a60ad40
YQ
77002013-07-27 Jie Zhang <jie@codesourcery.com>
7701 Daniel Jacobowitz <dan@codesourcery.com>
7702 Yao Qi <yao@codesourcery.com>
7703
7704 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7705 (mips-linux-watch.o): New rule.
7706 (mips_linux_watch_h): New variable.
7707 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7708 srv_tgtobj.
7709 * linux-mips-low.c: Include mips-linux-watch.h.
7710 (struct arch_process_info, struct arch_lwp_info): New.
7711 (update_watch_registers_callback): New function.
7712 (mips_linux_new_process, mips_linux_new_thread) New functions.
7713 (mips_linux_prepare_to_resume, mips_insert_point): New
7714 functions.
7715 (mips_remove_point, mips_stopped_by_watchpoint): New
7716 functions.
7717 (rsp_bp_type_to_target_hw_bp_type): New function.
7718 (mips_stopped_data_address): New function.
7719 (the_low_target): Add watchpoint support functions.
7720
de6f69ad
YQ
77212013-07-27 Yao Qi <yao@codesourcery.com>
7722
7723 * i386-low.c: Include break-common.h.
7724 (enum target_hw_bp_type): Remove.
7725
3360c0bf
LM
77262013-07-24 Luis Machado <lgustavo@codesourcery.com>
7727
7728 * Makefile.in (SFILES): /common/target-common.c.
7729 (OBS): Add target-common.o.
7730 (server_h): Add $(srcdir)/../common/target-common.h.
7731 (target-common.o): New target.
7732 * server.c (queue_stop_reply_callback): Free
7733 status string after use.
7734 * target.c (target_waitstatus_to_string): Remove.
7735 * target.h: Include target-common.h.
7736 (resume_kind): Likewise.
7737 (target_waitkind): Likewise.
7738 (target_waitstatus): Likewise.
7739 (TARGET_WNOHANG): Likewise.
7740
bd885420
YQ
77412013-07-04 Yao Qi <yao@codesourcery.com>
7742
7743 * Makefile.in (host_alias): Use @host_noncanonical@.
7744 (target_alias): Use @target_noncanonical@.
7745 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7746 ACX_NONCANONICAL_HOST.
7747 * configure: Regenerated.
7748
7749 Revert:
7750 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7751
7752 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7753 * configure: Rebuild.
7754 * Makefile.in (version_host, version_target): Get from configure.
7755 (version.c): Use $(version_host) and $(version_target).
7756
17ef446e
PA
77572013-07-03 Pedro Alves <palves@redhat.com>
7758
7759 * Makefile.in (config.status): Depend on development.sh.
7760 * acinclude.m4: Include libmcheck.m4.
7761 * configure: Regenerate.
7762
7a9a7487
MG
77632013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7764
7765 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7766 attribute inside the parentheses.
7767 (winapi_DebugSetProcessKillOnExit): Ditto.
7768 (winapi_DebugBreakProcess): Ditto.
7769 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7770
49b64de6
MG
77712013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7772
7773 * notif.h (notif_event): Add a dummy member to avoid compiler
7774 errors.
7775
d5749ee7
PA
77762013-07-01 Pedro Alves <palves@redhat.com>
7777
7778 * hostio.c (HOSTIO_PATH_MAX): Define.
7779 (require_filename, handle_open, handle_unlink, handle_readlink):
7780 Use it.
7781
d8d2a3ee
PA
77822013-07-01 Pedro Alves <palves@redhat.com>
7783
7784 * server.h: Include "pathmax.h".
7785 * linux-low.c: Don't include sys/param.h.
7786 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7787 MAXPATHLEN.
7788 * win32-low.c: Don't include sys/param.h.
7789 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7790
bc7dea8d
PA
77912013-07-01 Pedro Alves <palves@redhat.com>
7792
7793 * event-loop.c: Don't check HAVE_UNISTD_H before including
7794 <unistd.h>.
7795 * gdbreplay.c: Likewise.
7796 * remote-utils.c: Likewise.
7797 * server.c: Likewise.
7798 * configure.ac: Don't check for unistd.h.
7799 * configure: Regenerate.
7800
d6c2da54
TT
78012013-06-28 Tom Tromey <tromey@redhat.com>
7802
7803 * Makefile.in (version.c): Use version.in, not
7804 common/version.in.
7805
257b6bec
MG
78062013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7807
7808 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7809 * configure: Rebuild.
7810 * Makefile.in (version_host, version_target): Get from configure.
7811 (version.c): Use $(version_host) and $(version_target).
7812
86ebe149
DK
78132013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7814
7815 Fix trace-status to output user name without trailing colon.
7816 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7817
f30aa5af
DK
78182013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7819
7820 Fix trace-status to output proper start-time and stop-time.
7821 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7822 output start time and stop time in hex as gdb expects.
7823
28a93511
YQ
78242013-06-26 Pedro Alves <pedro@codesourcery.com>
7825
7826 * tracepoint.c (build_traceframe_info_xml): Output trace state
7827 variables present in the trace buffer.
7828
01208463
TT
78292013-06-24 Tom Tromey <tromey@redhat.com>
7830
7831 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7832 create-version.sh.
7833 (version.o): Remove.
7834 * gdbreplay.c: Include version.h.
7835 (version, host_name): Don't declare.
7836 * server.h: Include version.h.
7837 (version, host_name): Don't declare.
7838
760256f9
PA
78392013-06-12 Pedro Alves <palves@redhat.com>
7840
7841 * linux-x86-low.c (linux_is_elf64): Delete global.
7842 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7843 with local linux_pid_exe_is_elf_64_file use.
7844
030031ee
PA
78452013-06-11 Pedro Alves <palves@redhat.com>
7846
7847 * linux-low.c (regset_disabled, disable_regset): New functions.
7848 (regsets_fetch_inferior_registers)
7849 (regsets_store_inferior_registers): Use them.
7850 (initialize_regsets_info); Don't allocate the disabled_regsets
7851 array here.
7852 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7853 comment.
7854
5da6eb0a
PA
78552013-06-11 Pedro Alves <palves@redhat.com>
7856
7857 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7858 xmalloc.
7859
7e5aaa09
PA
78602013-06-11 Pedro Alves <palves@redhat.com>
7861
7862 * linux-x86-low.c (initialize_low_arch): Call
7863 init_registers_x32_avx_linux.
7864
d878444c
JK
78652013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7866
7867 Fix compatibility with Android Bionic.
7868 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7869 it is not empty.
7870
3aee8918
PA
78712013-06-07 Pedro Alves <palves@redhat.com>
7872
5f2b57b5 7873 PR server/14823
3aee8918
PA
7874 * Makefile.in (OBS): Add tdesc.o.
7875 (IPA_OBJS): Add tdesc-ipa.o.
7876 (tdesc-ipa.o): New rule.
7877 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7878 interface.
7879 * linux-low.c (new_inferior): Delete.
7880 (disabled_regsets, num_regsets): Delete.
7881 (linux_add_process): Adjust to set the new per-process
7882 new_inferior flag.
7883 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7884 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7885 was a stop. When calling arch_setup, switch the current inferior
7886 to the thread that got an event.
7887 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7888 (regsets_fetch_inferior_registers)
7889 (regsets_store_inferior_registers): New regsets_info parameter.
7890 Adjust to use it.
7891 (linux_register_in_regsets): New regs_info parameter. Adjust to
7892 use it.
7893 (register_addr, fetch_register, store_register): New usrregs_info
7894 parameter. Adjust to use it.
7895 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7896 parameter regs_info. Adjust to use it.
7897 (linux_fetch_registers): Get the current inferior's regs_info, and
7898 adjust to use it.
7899 (linux_store_registers): Ditto.
7900 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7901 (initialize_low): Don't initialize the target_regsets here. Call
7902 initialize_low_arch.
7903 * linux-low.h (target_regsets): Delete declaration.
7904 (struct regsets_info): New.
7905 (struct usrregs_info): New.
7906 (struct regs_info): New.
7907 (struct process_info_private) <new_inferior>: New field.
7908 (struct linux_target_ops): Delete the num_regs, regmap, and
7909 regset_bitmap fields. New field regs_info.
7910 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7911 * i387-fp.c (num_xmm_registers): Delete.
7912 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7913 calls to new interface.
7914 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7915 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7916 Infer the number of xmm registers from the regcache's target
7917 description.
7918 * i387-fp.h (num_xmm_registers): Delete.
7919 * inferiors.c (add_thread): Don't install the thread's regcache
7920 here.
7921 * proc-service.c (gregset_info): Fetch the current inferior's
7922 regs_info. Adjust to use it.
7923 * regcache.c: Include tdesc.h.
7924 (register_bytes, reg_defs, num_registers)
7925 (gdbserver_expedite_regs): Delete.
7926 (get_thread_regcache): If the thread doesn't have a regcache yet,
7927 create one, instead of aborting gdbserver.
7928 (regcache_invalidate_one): Rename to ...
7929 (regcache_invalidate_thread): ... this.
7930 (regcache_invalidate_one): New.
7931 (regcache_invalidate): Only invalidate registers of the current
7932 process.
7933 (init_register_cache): Add target_desc parameter, and use it.
7934 (new_register_cache): Ditto. Assert the target description has a
7935 non zero registers_size.
7936 (regcache_cpy): Add assertions. Adjust.
7937 (realloc_register_cache, set_register_cache): Delete.
7938 (registers_to_string, registers_from_string): Adjust.
7939 (find_register_by_name, find_regno, find_register_by_number)
7940 (register_cache_size): Add target_desc parameter, and use it.
7941 (free_register_cache_thread, free_register_cache_thread_one)
7942 (regcache_release, register_cache_size): New.
7943 (register_size): Add target_desc parameter, and use it.
7944 (register_data, supply_register, supply_register_zeroed)
7945 (supply_regblock, supply_register_by_name, collect_register)
7946 (collect_register_as_string, collect_register_by_name): Adjust.
7947 * regcache.h (struct target_desc): Forward declare.
7948 (struct regcache) <tdesc>: New field.
7949 (init_register_cache, new_register_cache): Add target_desc
7950 parameter.
7951 (regcache_invalidate_thread): Declare.
7952 (regcache_invalidate_one): Delete declaration.
7953 (regcache_release): Declare.
7954 (find_register_by_number, register_cache_size, register_size)
7955 (find_regno): Add target_desc parameter.
7956 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7957 declarations.
7958 * remote-utils.c: Include tdesc.h.
7959 (outreg, prepare_resume_reply): Adjust.
7960 * server.c: Include tdesc.h.
7961 (gdbserver_xmltarget): Delete declaration.
7962 (get_features_xml, process_serial_event): Adjust.
7963 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7964 declare.
7965 (struct process_info) <tdesc>: New field.
7966 (ipa_tdesc): Declare.
7967 * tdesc.c: New file.
7968 * tdesc.h: New file.
7969 * tracepoint.c: Include tdesc.h.
7970 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7971 (get_context_regcache): Adjust to pass ipa_tdesc down.
7972 (do_action_at_tracepoint): Adjust to get the register cache size
7973 from the context regcache's description.
7974 (traceframe_walk_blocks): Adjust to get the register cache size
7975 from the current trace frame's description.
7976 (traceframe_get_pc): Adjust to get current trace frame's
7977 description and pass it down.
7978 (gdb_collect): Adjust to get the register cache size from the
7979 IPA's description.
7980 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7981 (gdbserver_xmltarget): Delete.
7982 (initialize_low_tracepoint): Set the ipa's target description.
7983 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7984 (initialize_low_tracepoint): Set the ipa's target description.
7985 * linux-x86-low.c: Include tdesc.h.
7986 [__x86_64__] (is_64bit_tdesc): New.
7987 (ps_get_thread_area, x86_get_thread_area): Use it.
7988 (i386_cannot_store_register): Rename to ...
7989 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7990 (i386_cannot_fetch_register): Rename to ...
7991 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7992 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7993 to new interface.
7994 (target_regsets): Rename to ...
7995 (x86_regsets): ... this.
7996 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7997 interface.
7998 (x86_siginfo_fixup): Use is_64bit_tdesc.
7999 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8000 (tdesc_x32_avx_linux, tdesc_x32_linux)
8001 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8002 Declare.
8003 (x86_linux_update_xmltarget): Delete.
8004 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8005 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8006 (AMD64_LINUX_USER64_CS): New.
8007 (x86_linux_read_description): New, based on
8008 x86_linux_update_xmltarget.
8009 (same_process_callback): New.
8010 (x86_arch_setup_process_callback): New.
8011 (x86_linux_update_xmltarget): New.
8012 (x86_regsets_info): New.
8013 (amd64_linux_regs_info): New.
8014 (i386_linux_usrregs_info): New.
8015 (i386_linux_regs_info): New.
8016 (x86_linux_regs_info): New.
8017 (x86_arch_setup): Reimplement.
8018 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8019 (x86_emit_ops): Ditto.
8020 (the_low_target): Adjust. Install x86_linux_regs_info,
8021 x86_cannot_fetch_register, and x86_cannot_store_register.
8022 (initialize_low_arch): New.
8023 * linux-ia64-low.c (tdesc_ia64): Declare.
8024 (ia64_fetch_register): Adjust.
8025 (ia64_usrregs_info, regs_info): New globals.
8026 (ia64_regs_info): New function.
8027 (the_low_target): Adjust.
8028 (initialize_low_arch): New function.
8029 * linux-sparc-low.c (tdesc_sparc64): Declare.
8030 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8031 Adjust.
8032 (sparc_arch_setup): New function.
8033 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8034 (the_low_target): Adjust.
8035 (initialize_low_arch): New function.
8036 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8037 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8038 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8039 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8040 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8041 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8042 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8043 (tdesc_powerpc_isa205_vsx64l): Declare.
8044 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8045 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8046 (ppc_set_pc, ppc_get_hwcap): Adjust.
8047 (ppc_usrregs_info): Forward declare.
8048 (!__powerpc64__) ppc_regmap_adjusted: New global.
8049 (ppc_arch_setup): Adjust to the current process'es target
8050 description.
8051 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8052 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8053 (ppc_store_evrregset): Adjust.
8054 (target_regsets): Rename to ...
8055 (ppc_regsets): ... this, and make static.
8056 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8057 (ppc_regs_info): New function.
8058 (the_low_target): Adjust.
8059 (initialize_low_arch): New function.
8060 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8061 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8062 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8063 (tdesc_s390x_linux64v2): Declare.
8064 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8065 (s390_fill_gregset, s390_store_last_break): Adjust.
8066 (target_regsets): Rename to ...
8067 (s390_regsets): ... this, and make static.
8068 (s390_get_pc, s390_set_pc): Adjust.
8069 (s390_get_hwcap): New target_desc parameter, and use it.
8070 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8071 (s390_arch_setup): Adjust to set the current process'es target
8072 description. Don't adjust the regmap.
8073 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8074 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8075 (regs_info_3264): New globals.
8076 (s390_regs_info): New function.
8077 (the_low_target): Adjust.
8078 (initialize_low_arch): New function.
8079 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8080 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8081 [__mips64] (init_registers_mips_linux)
8082 (init_registers_mips_dsp_linux): Delete defines.
8083 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8084 (have_dsp): New global.
8085 (mips_read_description): New, based on mips_arch_setup.
8086 (mips_arch_setup): Reimplement.
8087 (get_usrregs_info): New function.
8088 (mips_cannot_fetch_register, mips_cannot_store_register)
8089 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8090 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8091 (target_regsets): Rename to ...
8092 (mips_regsets): ... this, and make static.
8093 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8094 (dsp_regs_info, regs_info): New globals.
8095 (mips_regs_info): New function.
8096 (the_low_target): Adjust.
8097 (initialize_low_arch): New function.
8098 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8099 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8100 Declare.
8101 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8102 (arm_read_description): New, with bits factored from
8103 arm_arch_setup.
8104 (arm_arch_setup): Reimplement.
8105 (target_regsets): Rename to ...
8106 (arm_regsets): ... this, and make static.
8107 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8108 (arm_regs_info): New function.
8109 (the_low_target): Adjust.
8110 (initialize_low_arch): New function.
8111 * linux-m68k-low.c (tdesc_m68k): Declare.
8112 (target_regsets): Rename to ...
8113 (m68k_regsets): ... this, and make static.
8114 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8115 (m68k_regs_info): New function.
8116 (m68k_arch_setup): New function.
8117 (the_low_target): Adjust.
8118 (initialize_low_arch): New function.
8119 * linux-sh-low.c (tdesc_sharch): Declare.
8120 (target_regsets): Rename to ...
8121 (sh_regsets): ... this, and make static.
8122 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8123 (sh_regs_info, sh_arch_setup): New functions.
8124 (the_low_target): Adjust.
8125 (initialize_low_arch): New function.
8126 * linux-bfin-low.c (tdesc_bfin): Declare.
8127 (bfin_arch_setup): New function.
8128 (bfin_usrregs_info, regs_info): New globals.
8129 (bfin_regs_info): New function.
8130 (the_low_target): Adjust.
8131 (initialize_low_arch): New function.
8132 * linux-cris-low.c (tdesc_cris): Declare.
8133 (cris_arch_setup): New function.
8134 (cris_usrregs_info, regs_info): New globals.
8135 (cris_regs_info): New function.
8136 (the_low_target): Adjust.
8137 (initialize_low_arch): New function.
8138 * linux-cris-low.c (tdesc_crisv32): Declare.
8139 (cris_arch_setup): New function.
8140 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8141 (cris_regs_info): New function.
8142 (the_low_target): Adjust.
8143 (initialize_low_arch): New function.
8144 * linux-m32r-low.c (tdesc_m32r): Declare.
8145 (m32r_arch_setup): New function.
8146 (m32r_usrregs_info, regs_info): New globals.
8147 (m32r_regs_info): Adjust.
8148 (initialize_low_arch): New function.
8149 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8150 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8151 (tic6x_usrregs_info): Forward declare.
8152 (tic6x_read_description): New function, based on ...
8153 (tic6x_arch_setup): ... this. Reimplement.
8154 (target_regsets): Rename to ...
8155 (tic6x_regsets): ... this, and make static.
8156 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8157 (tic6x_regs_info): New function.
8158 (the_low_target): Adjust.
8159 (initialize_low_arch): New function.
8160 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8161 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8162 (target_regsets): Rename to ...
8163 (xtensa_regsets): ... this, and make static.
8164 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8165 globals.
8166 (xtensa_arch_setup, xtensa_regs_info): New functions.
8167 (the_low_target): Adjust.
8168 (initialize_low_arch): New function.
8169 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8170 (nios2_arch_setup): Set the current process'es tdesc.
8171 (target_regsets): Rename to ...
8172 (nios2_regsets): ... this.
8173 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8174 (nios2_regs_info): New function.
8175 (the_low_target): Adjust.
8176 (initialize_low_arch): New function.
a261b8f5
PA
8177 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8178 (aarch64_arch_setup): Set the current process'es tdesc.
8179 (target_regsets): Rename to ...
8180 (aarch64_regsets): ... this.
8181 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8182 (aarch64_regs_info): New function.
8183 (the_low_target): Adjust.
8184 (initialize_low_arch): New function.
3aee8918
PA
8185 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8186 globals.
8187 (target_regsets): Rename to ...
8188 (tile_regsets): ... this.
8189 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8190 (tile_regs_info): New function.
8191 (tile_arch_setup): Set the current process'es tdesc.
8192 (the_low_target): Adjust.
8193 (initialize_low_arch): New function.
8194 * spu-low.c (tdesc_spu): Declare.
8195 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8196 * win32-arm-low.c (tdesc_arm): Declare.
8197 (arm_arch_setup): New function.
8198 (the_low_target): Install arm_arch_setup instead of
8199 init_registers_arm.
8200 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8201 (init_windows_x86): Rename to ...
8202 (i386_arch_setup): ... this. Set `win32_tdesc'.
8203 (the_low_target): Adjust.
8204 * win32-low.c (win32_tdesc): New global.
8205 (child_add_thread): Don't create the thread cache here.
8206 (do_initial_child_stuff): Set the new process'es tdesc.
8207 * win32-low.h (struct target_desc): Forward declare.
8208 (win32_tdesc): Declare.
8209 * lynx-i386-low.c (tdesc_i386): Declare global.
8210 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8211 * lynx-low.c (lynx_tdesc): New global.
8212 (lynx_add_process): Set the new process'es tdesc.
8213 * lynx-low.h (struct target_desc): Forward declare.
8214 (lynx_tdesc): Declare global.
8215 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8216 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8217 * nto-low.c (nto_tdesc): New global.
8218 (do_attach): Set the new process'es tdesc.
8219 * nto-low.h (struct target_desc): Forward declare.
8220 (nto_tdesc): Declare.
8221 * nto-x86-low.c (tdesc_i386): Declare.
8222 (nto_x86_arch_setup): Set `nto_tdesc'.
8223
b1fbec62
GB
82242013-06-04 Gary Benson <gbenson@redhat.com>
8225
8226 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8227 to qSupported response when appropriate.
8228 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8229 with nonzero-length annex.
8230 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8231 arguments supplied in annex.
8232
d1ec4ce7
DE
82332013-05-31 Doug Evans <dje@google.com>
8234
ac44adcb 8235 PR server/15594
d1ec4ce7
DE
8236 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8237 64 bits in 64-cross-32 environment.
8238
9b25f2d3
PA
82392013-05-28 Pedro Alves <palves@redhat.com>
8240
8241 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8242 (aarch64-without-fpu.c): Delete rule.
8243 * configure.srv (aarch64*-*-linux*): Remove references to
8244 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8245 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8246 declaration.
8247
6740dc9c
PA
82482013-05-24 Pedro Alves <palves@redhat.com>
8249
8250 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8251 instead of strchr/decode_address. Error if the range isn't split
8252 with a ','. Don't assume there's be a ':' in the action.
8253
c2d6af84
PA
82542013-05-23 Yao Qi <yao@codesourcery.com>
8255 Pedro Alves <palves@redhat.com>
8256
8257 * linux-low.c (lwp_in_step_range): New function.
8258 (linux_wait_1): If the thread was range stepping and stopped
8259 outside the stepping range, report the stop to GDB. Otherwise,
8260 continue stepping. Add range stepping debug output.
8261 (linux_set_resume_request): Copy the step range from the resume
8262 request to the lwp.
8263 (linux_supports_range_stepping): New.
8264 (linux_target_ops) <supports_range_stepping>: Set to
8265 linux_supports_range_stepping.
8266 * linux-low.h (struct linux_target_ops)
8267 <supports_range_stepping>: New field.
8268 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8269 * linux-x86-low.c (x86_supports_range_stepping): New.
8270 (the_low_target) <supports_range_stepping>: Set to
8271 x86_supports_range_stepping.
8272 * server.c (handle_v_cont): Handle 'r' action.
8273 (handle_v_requests): Append ";r" if the target supports range
8274 stepping.
8275 * target.h (struct thread_resume) <step_range_start,
8276 step_range_end>: New fields.
8277 (struct target_ops) <supports_range_stepping>:
8278 New field.
8279 (target_supports_range_stepping): New macro.
8280
58794e1a
JB
82812013-05-17 Joel Brobecker <brobecker@adacore.com>
8282
8283 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8284 confusion in comment.
8285
d631c5a7
JB
82862013-05-17 Joel Brobecker <brobecker@adacore.com>
8287
8288 * lynx-low.c (struct process_info_private): New type.
8289 (lynx_add_process): New function.
8290 (lynx_create_inferior, lynx_attach): Replace calls to
8291 add_process by calls to lynx_add_process.
8292 (lynx_resume): If PTID is null, then try using
8293 current_process()->private->last_wait_event_ptid.
8294 Add comments.
8295 (lynx_clear_inferiors): Delete. The contents of that function
8296 has been inlined in lynx_mourn;
8297 (lynx_wait_1): Save the ptid in the process's private data.
8298 (lynx_mourn): Free the process' private data. Replace call
8299 to lynx_clear_inferiors by call to clear_inferiors.
8300
96f7a20f
YQ
83012013-05-17 Yao Qi <yao@codesourcery.com>
8302
8303 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8304 the right place.
8305
db0dfaa0
LM
83062013-05-16 Luis Machado <lgustavo@codesourcery.com>
8307
8308 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8309 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8310 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8311 PT_TEXT_END_ADDR guards. Update comments.
8312 (linux_target_op) <read_offsets>: Conditionally define to
8313 linux_read_offsets if the target is UCLIBC and if it defines
8314 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8315
68f5f838
SL
83162013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8317 Andrew Jenner <andrew@codesourcery.com>
8318
8319 * Makefile.in (SFILES): Add linux-nios2-low.c.
8320 (clean): Add action to delete nios2-linux.c.
8321 (nios2-linux.c): New rule.
8322 * configure.srv: Add nios2*-*-linux*.
8323 * linux-nios2-low.c: New.
8324
1ebff1fd
HAQ
83252013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8326
8327 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8328
f6150862
HZ
83292013-04-25 Hui Zhu <hui@codesourcery.com>
8330
8331 PR gdb/15186
f6150862
HZ
8332 * ax.c (ax_printf): Add fflush.
8333
614c279d
TT
83342013-04-22 Tom Tromey <tromey@redhat.com>
8335
8336 * Makefile.in (SFILES): Add filestuff.c.
8337 (OBS): Add filestuff.o.
8338 (filestuff.o): New target.
8339 * config.in, configure: Rebuild.
8340 * configure.ac: Check for fdwalk, pipe2.
8341
7d4e5717
PA
83422013-04-17 Pedro Alves <palves@redhat.com>
8343
8344 * configure.ac (USE_THREAD_DB): Delete variable.
8345 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8346 Don't AC_SUBST USE_THREAD_DB.
8347 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8348 * config.in, configure: Regenerate.
8349
d5c93e41
PA
83502013-04-16 Pedro Alves <palves@redhat.com>
8351
8352 * linux-low.h (struct lwp_info) <thread_known>: Move under
8353 the USE_THREAD_DB #ifdef.
8354
04f5fe89
PA
83552013-04-16 Pedro Alves <palves@redhat.com>
8356
8357 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8358 (linux-low.o): Delete rule.
8359 * linux-low.h: Always include "gdb_thread_db.h" instead of
8360 conditionally including thread_db.h.
8361 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8362 HAVE_THREAD_DB_H.
8363
480b27bf
JK
83642013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8365
8366 * Makefile.in (install-only): Fix make install regression.
8367
43662968
JK
83682013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8369
8370 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8371 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8372 installation.
8373 * gdbserver.1: Remove.
8374
3e74e146
PA
83752013-03-22 Pedro Alves <palves@redhat.com>
8376
8377 * linux-low.c (handle_extended_wait): Don't call
8378 linux_enable_event_reporting.
8379
a8347a2a
TT
83802013-03-15 Tony Theodore <tonyt@logyst.com>
8381
8382 PR build/9098:
8383 * Makefile.in (SHELL): Use @SHELL@.
8384
eeb56fa7
SDJ
83852013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8386
8387 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8388 compiler warning.
8389
4fa7e2ff
JB
83902013-03-13 Joel Brobecker <brobecker@adacore.com>
8391
8392 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8393 Remove extraneous NULL element.
8394
8ddb1965
YQ
83952013-03-13 Yao Qi <yao@codesourcery.com>
8396
8397 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8398 'V' block in trace frame.
8399
9accd112
MM
84002013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8401
8402 * target.h (struct target_ops): Add btrace ops.
8403 (target_supports_btrace): New macro.
8404 (target_enable_btrace): New macro.
8405 (target_disable_btrace): New macro.
8406 (target_read_btrace): New macro.
8407 * gdbthread.h (struct thread_info): Add btrace field.
8408 * server.c: Include btrace-common.h.
8409 (handle_btrace_general_set): New function.
8410 (handle_btrace_enable): New function.
8411 (handle_btrace_disable): New function.
8412 (handle_general_set): Call handle_btrace_general_set.
8413 (handle_qxfer_btrace): New function.
8414 (struct qxfer qxfer_packets[]): Add btrace entry.
8415 * inferiors.c (remove_thread): Disable btrace.
8416 * linux-low: Include linux-btrace.h.
8417 (linux_low_enable_btrace): New function.
8418 (linux_low_read_btrace): New function.
8419 (linux_target_ops): Add btrace ops.
8420 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8421 Add srv_linux_btrace=yes.
8422 (x86_64-*-linux*): Add linux-btrace.o.
8423 Add srv_linux_btrace=yes.
8424 * configure.ac: Define HAVE_LINUX_BTRACE.
8425 * config.in: Regenerated.
8426 * configure: Regenerated.
8427
5cc22e4c
MM
84282013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8429
8430 * server.c (handle_qxfer): Preserve error message if -3 is
8431 returned.
8432 (qxfer): Document the -3 return value.
8433
7c97f91e
MM
84342013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8435
8436 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8437 (linux_btrace_h): New variable.
8438 (linux-btrace.o): New rule.
8439
be9a119c 84402013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8441 Hafiz Abid Qadeer <abidh@codesourcery.com>
8442
8443 * tracepoint.c (trace_buffer_size): New global.
8444 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8445 (init_trace_buffer): Change to one-argument function. Allocate
8446 trace buffer memory.
8447 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8448 handle QTBuffer:size packet.
8449 (cmd_bigqtbuffer_size): New function.
8450 (initialize_tracepoint): Call init_trace_buffer with
8451 DEFAULT_TRACE_BUFFER_SIZE.
8452 * server.c (handle_query): Add QTBuffer:size in the
8453 supported packets.
8454
e64f7499
YQ
84552013-03-07 Yao Qi <yao@codesourcery.com>
8456
8457 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8458 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8459 of -1.
8460 (cmd_qtsp): Adjust condition. Do post increment.
8461 Set cur_action and cur_step_action back to 0.
8462
f0ae6fc3
PA
84632013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8464
8465 PR server/15236
8466 * linux-low.c (linux_write_memory): Return early success if LEN is
8467 zero.
8468
b5b0b0af
CV
84692013-03-05 Corinna Vinschen <vinschen@redhat.de>
8470
334ad4a8 8471 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8472
589bc927
TT
84732013-02-28 Tom Tromey <tromey@redhat.com>
8474
8475 * configure.ac: Invoke AC_SYS_LARGEFILE.
8476 * configure, config.in: Rebuild.
8477
dfe07582
CV
84782013-02-28 Corinna Vinschen <vinschen@redhat.com>
8479
8480 * win32-low.c: Throughout, fix format strings and casts of
8481 printf-like functions to avoid type related warnings on all
8482 platforms.
8483 (get_child_debug_event): Print dwDebugEventCode as hex since
8484 that's how it's usually documented.
8485
736cd585
YQ
84862013-02-28 Yao Qi <yao@codesourcery.com>
8487
8488 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8489 pulongest.
8490
e1f58301
JW
84912013-02-27 Jiong Wang <jiwang@tilera.com>
8492
8493 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8494 (reg-tilegx32.c): New rule.
8495 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8496 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8497 different register info initializer according to elf class.
8498 (init_registers_tilgx32): New function. The tilegx32 register info
8499 initializer.
8500 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8501 (tile_store_gregset): Likewise.
8502
d171ca78
YQ
85032013-02-27 Yao Qi <yao@codesourcery.com>
8504
8505 * server.c (process_point_options): Print debug message when
8506 debug_threads is true.
8507
282bbdf3
YQ
85082013-02-26 Yao Qi <yao@codesourcery.com>
8509
8510 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8511
aca22551
PA
85122013-02-19 Pedro Alves <palves@redhat.com>
8513 Kai Tietz <ktietz@redhat.com>
8514
8515 PR gdb/15161
8516
8517 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8518 instead of strtoul to extract address from packet.
8519 (process_serial_event) <'z'>: Likewise.
8520
4f3cee1c
YQ
85212013-02-18 Yao Qi <yao@codesourcery.com>
8522
8523 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8524
8e1d55a3
PA
85252013-02-14 Pedro Alves <palves@redhat.com>
8526
8527 Plug memory leak.
8528
8529 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8530 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8531
458820da
PA
85322013-02-14 Pedro Alves <palves@redhat.com>
8533
8534 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8535
baea0dae
PA
85362013-02-14 Pedro Alves <palves@redhat.com>
8537
8538 * tracepoint.c (save_string): Delete.
8539 (add_tracepoint_action): Use savestring instead of save_string.
8540
0b1afbb3
PA
85412013-02-12 Pedro Alves <palves@redhat.com>
8542
8543 * linux-xtensa-low.c: Ditto.
8544 * xtensa-xtregs.c: Ditto.
8545
8a4ac37e
PA
85462013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8547
8548 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8549 thread_db.
8550
148de6bb
MS
85512013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8552
8553 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8554 aarch64_num_wp_regs and aarch64_num_bp_regs to
8555 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8556
55fac6e0
MS
85572013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8558
8559 * linux-aarch64-low.c (ps_get_thread_area): Replace
8560 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8561
176eb98c
MS
85622013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8563 Marcus Shawcroft <marcus.shawcroft@arm.com>
8564 Nigel Stephens <nigel.stephens@arm.com>
8565 Yufeng Zhang <yufeng.zhang@arm.com>
8566
8567 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8568 (aarch64.c, aarch64-without-fpu.c): New targets.
8569 * configure.srv (aarch64*-*-linux*): New.
8570 * linux-aarch64-low.c: New file.
8571
56f7af9c
MS
85722013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8573
43aaf8b6 8574 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8575 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8576 (dequeue_one_deferred_signal, linux_resume_one_thread)
8577 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8578 (linux_tracefork_grandchild, linux_test_for_tracefork)
8579 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8580 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8581 where the argument is 0.
8582
60f662b0
YQ
85832013-01-25 Yao Qi <yao@codesourcery.com>
8584
8585 * event-loop.c: Include "queue.h".
8586 (gdb_event_p): New typedef.
8587 (struct gdb_event) <next_event>: Remove.
8588 (event_queue): Change to QUEUE(gdb_event_p).
8589 (async_queue_event): Remove.
8590 (gdb_event_xfree): New.
8591 (initialize_event_loop): New.
8592 (process_event): Use API from QUEUE.
8593 (wait_for_event): Likewise.
8594 * server.c (main): Call initialize_event_loop.
8595 * server.h (initialize_event_loop): Declare.
8596
5ae4861a
YQ
85972013-01-18 Yao Qi <yao@codesourcery.com>
8598
8599 * ax.h (struct eval_agent_expr_context): New.
8600 (gdb_eval_agent_expr): Update declaration.
8601 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8602 TFRAME. Add new argument CTX.
8603 * server.h (struct eval_agent_expr_context): Declare.
8604 (agent_mem_read, agent_tsv_read): Update declaration.
8605 (agent_mem_read_string): Likewise.
8606 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8607 (add_traceframe_block): Add new argument TPOINT.
8608 Increase TPOINT->traceframe_usage.
8609 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8610 eval_tracepoint_agent_expr.
8611 (condition_true_at_tracepoint): Likewise.
8612 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8613 (agent_mem_read_string, agent_tsv_read): Likewise.
8614
85e00e85
YQ
86152013-01-16 Yao Qi <yao@codesourcery.com>
8616
8617 * linux-low.c (linux_resume_one_lwp): Don't check
8618 'lwp->bp_reinsert != 0'.
8619
4039cf45
JB
86202013-01-07 Joel Brobecker <brobecker@adacore.com>
8621 Pedro Alves <palves@redhat.com>
8622
8623 * lynx-low.c (ptrace_request_to_str): Define a temporary
8624 macro and use it to simplify this function's implementation.
8625
9044dee2
JB
86262013-01-07 Joel Brobecker <brobecker@adacore.com>
8627
8628 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8629 sets errno.
8630
e6352c8f
JB
86312013-01-07 Joel Brobecker <brobecker@adacore.com>
8632
8633 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8634
50681a27
JB
86352013-01-07 Joel Brobecker <brobecker@adacore.com>
8636
8637 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8638
3f6e77ef
JB
86392013-01-07 Joel Brobecker <brobecker@adacore.com>
8640
8641 * lynx-low.c (lynx_resume): Use the resume_info parameter
8642 to determine the ptid for the lynx_ptrace call, unless
8643 it is equal to minus_one_ptid, in which case we use the
8644 ptid of the current_inferior.
8645 (lynx_wait_1): After having received a thread create/exit
8646 event, resume the inferior's execution using the signaling
8647 thread's ptid, rather than the old ptid.
8648
7fda33ae
JB
86492013-01-07 Joel Brobecker <brobecker@adacore.com>
8650
8651 * lynx-low.c (lynx_resume): Delete variable ret.
8652
b9786c74
JB
86532013-01-01 Joel Brobecker <brobecker@adacore.com>
8654
8655 * gdbreplay.c (gdbreplay_version): Update copyright year.
8656 * server.c (gdbserver_version): Likewise.
8657
8b93d60f
JB
86582012-12-17 Joel Brobecker <brobecker@adacore.com>
8659
8660 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8661 new thread.
8662
037335a7
JB
86632012-12-17 Joel Brobecker <brobecker@adacore.com>
8664
8665 * lynx-low.c (ptrace_request_to_str): Add handling for
8666 PTRACE_GETTRACESIG.
8667
52d4cbd8
JB
86682012-12-17 Joel Brobecker <brobecker@adacore.com>
8669
8670 * lynx-low.c (lynx_attach): Delete variable new_process.
8671
ab8f6ca9
JB
86722012-12-17 Joel Brobecker <brobecker@adacore.com>
8673
8674 * lynx-low.c (lynx_create_inferior): Delete variable
8675 new_process.
8676
78cbc024
JB
86772012-12-17 Joel Brobecker <brobecker@adacore.com>
8678
8679 * lynx-low.c (ptrace_request_to_str): Do not handle
8680 PTRACE_GETTHREADLIST if this macro does not exist.
8681
14a00470
YQ
86822012-12-15 Yao Qi <yao@codesourcery.com>
8683
8684 * Makefile.in (OBS): Add notif.o.
8685 * notif.c, notif.h: New.
8686 * server.c: Include "notif.h".
8687 (struct vstop_notif) <next>: Remove.
8688 <base>: New field.
8689 (queue_stop_reply): Update.
8690 (push_event, send_next_stop_reply): Remove.
8691 (discard_queued_stop_replies): Update.
8692 (notif_stop): New variable.
8693 (handle_v_stopped): Remove.
8694 (handle_v_requests): Don't call handle_v_stopped. Call
8695 handle_ack_notif instead.
8696 (queue_stop_reply_callback): Call notif_event_enque instead
8697 of queue_stop_reply.
8698 (handle_status): Don't call send_next_stop_reply, call
8699 notif_write_event instead.
8700 (kill_inferior_callback): Likewise.
8701 (detach_or_kill_inferior_callback): Likewise.
8702 (main): Call initialize_notif.
8703 (process_serial_event): Call QUEUE_is_empty.
8704 (handle_target_event): Call notif_push instead of push event.
8705 * server.h (push_event): Remove declaration.
8706
61c125b9
TT
87072012-12-10 Tom Tromey <tromey@redhat.com>
8708
8709 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8710 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8711 macros.
8712 (.c.o): Rewrite.
8713 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8714 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8715 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8716 (amd64-linux-ipa.o, ax.o): Rewrite.
8717 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8718 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8719 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8720 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8721 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8722 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8723 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8724 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8725 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8726 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8727 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8728 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8729 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8730 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8731 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8732 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8733 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8734 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8735 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8736 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8737 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8738 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8739 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8740 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8741 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8742 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8743 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8744 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8745 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8746 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8747 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8748 (reg-tilegx.o): Remove.
8749 (all_object_files): New macro.
8750 Include .deps files.
8751 * aclocal.m4, configure: Rebuild.
8752 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8753 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8754 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8755
e90e9ad9
TT
87562012-12-05 Tom Tromey <tromey@redhat.com>
8757
8758 PR gdb/14917:
8759 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8760
02d403bf 87612012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8762
8763 * configure.ac: Check for linux/perf_event.h.
8764 * config.in: Regenerated.
8765 * configure: Regenerated.
8766
0270a750
PA
87672012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8768
8769 * hostio.c (handle_readlink): Decrease buffer size
8770 parameter passed to readlink by one byte.
8771
8c29b58e
YQ
87722012-11-26 Yao Qi <yao@codesourcery.com>
8773
8774 * configure.ac (build_warnings): Append '-Wempty-body'.
8775 * configure: Regenerated.
8776 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8777 body.
8778
8bdce1ff
PM
87792012-11-15 Pierre Muller <muller@sourceware.org>
8780
8781 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8782 * config.in: Regenerate.
8783 * configure: Regenerate.
8784 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8785 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8786 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8787 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8788 header.
8789 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8790 instead of <sys/wait.h> header.
8791 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8792
02d403bf 87932012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8794
8795 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8796 (various make rules): Remove -DGDBSERVER
8797
fbd5db48
YQ
87982012-11-09 Yao Qi <yao@codesourcery.com>
8799
8800 * spu-low.c (current_ptid): Move it to ..
8801 * gdbthread.h: ... here. New.
8802 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8803 * server.c (myresume, process_serial_event): Likewise.
8804 * thread-db.c (thread_db_find_new_threads): Likewise.
8805 * tracepoint.c (run_inferior_command): Likewise.
8806
b3dc46ff
AB
88072012-10-01 Andrew Burgess <aburgess@broadcom.com>
8808
8809 * server.c (handle_search_memory_1): Include access length in
8810 warning message.
8811
07c04788
HPN
88122012-09-05 Michael Brandt <michael.brandt@axis.com>
8813
8814 * linux-crisv32-low.c: Fix compile errors.
8815
918d227b
YQ
88162012-09-04 Yao Qi <yao@codesourcery.com>
8817
8818 * tracepoint.c (cmd_qtsv): Adjust debug message.
8819 Don't check CUR_TPOINT.
8820
18c1b81a
YQ
88212012-08-28 Yao Qi <yao@codesourcery.com>
8822
8823 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8824 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8825 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8826 Remove declarations of xmalloc, xreallloc, xstrdup and
8827 freeargv.
8828 * Makefile.in (libiberty_h): New.
8829 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8830 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8831
dc82f37b
YQ
88322012-08-23 Yao Qi <yao@codesourcery.com>
8833
8834 * server.h: Remove declaration of 'xsnprintf'.
8835
406b1477
KS
88362012-08-22 Keith Seitz <keiths@redhat.com>
8837
8838 * server.h: Include build-gnulib-gbserver/config.h.
8839 * gdbreplay.c: Likewise.
8840
e6712ff1
DE
88412012-08-08 Doug Evans <dje@google.com>
8842
8843 * Makefile.in (SFILES): Add gdb_vecs.c.
8844 (OBS): Add gdb_vecs.o.
8845 (gdb_vecs_h, host_defs_h): New variables.
8846 (thread-db.o): Add $(gdb_vecs_h) dependency.
8847 (gdb_vecs.o): New rule.
8848 * thread-db.c: #include "gdb_vecs.h".
8849 (thread_db_load_search): Use a vector to iterate over path elements.
8850 Handle text appearing after "$pdir".
8851
8852 * configure.ac: Add check for strstr.
8853 * config.in: Regenerate.
8854 * configure: Regenerate.
8855
7c3270ae
UW
88562012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8857
8858 * hostio.c (handle_pread): If pread fails, fall back to attempting
8859 lseek/read.
8860 (handle_pwrite): Likewise for pwrite.
8861
b62e2b27
UW
88622012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8863
8864 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8865 between unsupported TYPE and unimplementable ADDR/LEN combination.
8866 (arm_insert_point): Act on new return value.
8867
78a99e91
PA
88682012-07-31 Pedro Alves <palves@redhat.com>
8869
8870 * server.c (process_point_options): Only skip tokens if we find
8871 one that is unrecognized. Don't treat 'X' specially while
8872 skipping unrecognized tokens.
8873
fcf303ab
UW
88742012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8875
8876 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8877 to 4-byte-align HW breakpoint addresses for Thumb.
8878
7255706c
YQ
88792012-07-27 Yao Qi <yao@codesourcery.com>
8880
8881 PR remote/14161.
8882
8883 * server.h: Declare gdb_agent_about_to_close.
8884 * target.c (kill_inferior): Include "agent.h".
8885 New. Send command 'kill'.
8886 * target.h (kill_inferior): Removed macro.
8887 * tracepoint.c (gdb_agent_about_to_close): New.
8888 (gdb_agent_helper_thread): Handle command 'close'.
8889 Wait endlessly until the inferior stops.
8890 Install gdb_agent_remove_socket to atexit hook.
8891 (agent_socket_name): New static variable.
8892 (gdb_agent_socket_init): Replace local variable 'name' with
8893 'agent_socket_name'.
8894 (gdb_agent_remove_socket): New.
8895
5a3f286f
YQ
88962012-07-27 Yao Qi <yao@codesourcery.com>
8897
8898 * server.c (process_point_options): Stop at 'X' when parsing.
8899
961bd387
ME
89002012-07-19 Michael Eager <eager@eagercon.com>
8901
a261b8f5 8902 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8903 to hw_execute.
8904 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8905 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8906 hardware breakpoint.
8907
aa7c7447
JK
89082012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8909
8910 * gdbserver/linux-low.c (initialize_low): Call
8911 linux_ptrace_init_warnings.
8912
7f216e7c
DE
89132012-07-02 Doug Evans <dje@google.com>
8914
8915 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8916 pointer to int.
8917
d3ce09f5
SS
89182012-07-02 Stan Shebs <stan@codesourcery.com>
8919
8920 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8921 (ax.o): Add it to build rule.
8922 (ax-ipa.o): Ditto.
8923 (OBS): Add format.o.
8924 (IPA_OBS): Add format.o.
8925 * server.c (handle_query): Claim support for breakpoint commands.
8926 (process_point_options): Add command case.
8927 (process_serial_event): Leave running if there are printfs in
8928 effect.
8929 * mem-break.h (any_persistent_commands): Declare.
8930 (add_breakpoint_commands): Declare.
8931 (gdb_no_commands_at_breakpoint): Declare.
8932 (run_breakpoint_commands): Declare.
8933 * mem-break.c (struct point_command_list): New struct.
8934 (struct breakpoint): New field command_list.
8935 (any_persistent_commands): New function.
8936 (add_commands_to_breakpoint): New function.
8937 (add_breakpoint_commands): New function.
8938 (gdb_no_commands_at_breakpoint): New function.
8939 (run_breakpoint_commands): New function.
8940 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8941 locally.
8942 * ax.c: Include format.h.
8943 (ax_printf): New function.
8944 (gdb_eval_agent_expr): Add printf opcode.
8945
2f8f6aed
YQ
89462012-06-13 Yao Qi <yao@codesourcery.com>
8947
8948 * server.c (start_inferior): Remove duplicated writes to fields
8949 'last_resume_kind' and 'last_status' of 'current_inferior'.
8950
0c9070b3
YQ
89512012-06-12 Yao Qi <yao@codesourcery.com>
8952 Pedro Alves <palves@redhat.com>
8953
8954 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8955 comment.
8956 * server.c (handle_v_cont): Extend comment.
8957
c52daf70
YQ
89582012-06-11 Yao Qi <yao@codesourcery.com>
8959
8960 * linux-low.c (linux_attach): Add 'static'.
8961
d38bbb0a
YQ
89622012-06-06 Yao Qi <yao@codesourcery.com>
8963
8964 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8965
89dc0afd
JK
89662012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8967
8968 Fix gcc -flto compilation warning.
8969 * server.c (main): Make variable multi_mode and attach volatile.
8970
75f62ce7
TJB
89712012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8972
8973 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8974 if the platform doesn't know about it.
8975
65f479b6
PA
89762012-05-30 Jeff Kenton <jkenton@tilera.com>
8977
8978 * Makefile.in (SFILES): Add linux-tile-low.c.
8979 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8980 * configure.srv: Handle tilegx-*-linux*.
8981 * linux-tile-low.c: New file.
8982
0c5bf5a9
JK
89832012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8984
8985 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8986
a493e3e2
PA
89872012-05-24 Pedro Alves <palves@redhat.com>
8988
8989 PR gdb/7205
8990
43aaf8b6 8991 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8992
2ea28649
PA
89932012-05-24 Pedro Alves <palves@redhat.com>
8994
8995 PR gdb/7205
8996
8997 Replace target_signal with gdb_signal throughout.
8998
8d409d16
MR
89992012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9000
9001 * linux-low.c (linux_store_registers): Avoid the copying sequence
9002 when no data has been retrieved by ptrace.
9003
23512c01
MGD
90042012-05-22 Will Deacon <will.deacon@arm.com>
9005
9006 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9007 Include asm/ptrace.h.
9008 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9009 already defined.
9010
4934b29e
MR
90112012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9012
9013 * linux-low.c (linux_store_registers): Don't re-retrieve data
9014 with ptrace that has already been obtained from /proc. Always
9015 copy any data retrieved with ptrace to the buffer supplied.
9016
bde24c0a
PA
90172012-05-11 Yao Qi <yao@codesourcery.com>
9018 Pedro Alves <palves@redhat.com>
9019
9020 * linux-low.c (enum stopping_threads_kind): New.
9021 (stopping_threads): Change type to `enum stopping_threads_kind'.
9022 (handle_extended_wait): If stopping and suspending threads, leave
9023 the new_lwp suspended too.
9024 (linux_wait_for_event): Adjust.
9025 (stop_all_lwps): Set `stopping_threads' to
9026 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9027 whether we're suspending threads or just stopping them. Assert no
9028 recursion happens.
9029
623b6bdf
YQ
90302012-04-29 Yao Qi <yao@codesourcery.com>
9031
9032 * server.h: Move some code to ...
9033 * gdbthread.h: ... here. New.
9034 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9035 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9036 (nto-low.o, win32-low.o): Likewise.
9037 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9038 * regcache.c, remote-utils.c, server.c: Likewise.
9039 * target.c, tracepoint.c, win32-low.c: Likewise.
9040
f15f9948
TJB
90412012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9042
9043 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9044 (PTRACE_ARG4_TYPE): Likewise.
9045 (PTRACE_XFER_TYPE): Likewise.
9046 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9047 ptrace to PTRACE_ARG3_TYPE.
9048 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9049 (PTRACE_ARG4_TYPE): Likewise.
9050 (PTRACE_XFER_TYPE): Likewise.
9051 (linux_detach_one_lwp): Cast fourth argument of
9052 ptrace to long then PTRACE_ARG4_TYPE.
9053 (regsets_fetch_inferior_registers): Cast third argument of
9054 ptrace to long then PTRACE_ARG3_TYPE.
9055 (regsets_store_inferior_registers): Likewise.
9056
38ea300a
PA
90572012-04-20 Pedro Alves <palves@redhat.com>
9058
9059 * configure: Regenerate.
9060
c971b7fa
PA
90612012-04-19 Pedro Alves <palves@redhat.com>
9062
43aaf8b6 9063 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9064 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9065 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9066 (all, install-only, uninstall, clean-info, all-lib, clean): No
9067 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9068 (maintainer-clean realclean distclean): Use subdir_do.
9069 (subdir_do): New.
9070 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9071 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9072 * acinclude.m4: Include acx_configure_dir.m4.
9073 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9074 calls. Call AC_PROG_RANLIB. Configure gnulib using
9075 ACX_CONFIGURE_DIR.
9076 (GNULIB): New.
9077 (GNULIB_STDINT_H): Adjust.
9078 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9079 * gdbreplay.c: Include build-gnulib/config.h.
9080 * server.h: Likewise.
9081 * aclocal.m4: Regenerate.
9082 * config.in: Regenerate.
9083 * configure: Regenerate.
c971b7fa 9084
809277f8
PA
90852012-04-19 Pedro Alves <palves@redhat.com>
9086
9087 * Makefile.in (LIBGNU, INCGNU): Adjust.
9088 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9089 (all, install-only, uninstall, clean-info, all-lib, clean)
9090 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9091 * configure.ac: Adjust AC_OUTPUT output.
9092 * aclocal.m4: Regenerate.
9093 * configure: Regenerate.
9094
fd9bb8b8
PA
90952012-04-19 Pedro Alves <palves@redhat.com>
9096
9097 * Makefile.in (generated_files): New.
9098 (server_h): Remove the explicit dependency on config.h, and depend
9099 on $generated_files.
9100
1c298c66
PA
91012012-04-19 Pedro Alves <palves@redhat.com>
9102
9103 * Makefile.in (INCGNU): Add -Ignulib.
9104
57c4b50b
PA
91052012-04-19 Pedro Alves <palves@redhat.com>
9106
9107 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9108 (INCGNU): ... this, and spell out -I here.
9109 (GNULIB_LIB): Rename to ...
9110 (LIBGNU): ... this.
9111 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9112
1030e047
PA
91132012-04-19 Pedro Alves <palves@redhat.com>
9114
9115 * config.in: Regenerate.
9116
447d4319
PA
91172012-04-19 Pedro Alves <palves@redhat.com>
9118
9119 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9120 * server.h (memmem): Remove declaration.
9121 * config.in: Regenerate.
9122 * configure: Regenerate.
9123
aad9eab9
YQ
91242012-04-19 Yao Qi <yao@codesourcery.com>
9125
9126 * Makefile.in (SFILES): Add common/vec.c.
9127 (OBS): Add vec.o.
9128 (vec.o): New rule.
9129
3e10640f
YQ
91302012-04-19 Yao Qi <yao@codesourcery.com>
9131
9132 * remote-utils.c (prepare_resume_reply): Replace with macro
9133 target_core_of_thread.
9134 * server.c (handle_qxfer_threads_proper): Likewise.
9135 * target.h (traget_core_of_thread): New macro.
9136
71622373
PA
91372012-04-18 Pedro Alves <palves@redhat.com>
9138
9139 * aclocal.m4: Regenerate.
9140 * configure: Regenerate.
9141
80d26939
YQ
91422012-04-16 Yao Qi <yao@codesourcery.com>
9143
9144 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9145 duplicated on address.
9146
42476b70
YQ
91472012-04-16 Yao Qi <yao@codesourcery.com>
9148
9149 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9150 (struct tracepoint_action_ops) <send>: New field.
9151 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9152 (agent_expr_send, x_tracepoint_action_send): New.
9153 (l_tracepoint_action_send): New.
9154 (cmd_qtdp): Download and install tracepoint
9155 according to `use_agent'.
9156 (run_inferior_command): Add one more parameter `len'.
9157 Update callers.
9158 (tracepoint_send_agent): New.
9159 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9160
7bc83639
YQ
91612012-04-16 Yao Qi <yao@codesourcery.com>
9162
9163 * tracepoint.c (download_tracepoints): Moved to ...
9164 (cmd_qtstart): ... here.
9165
5f18041e
YQ
91662012-04-14 Yao Qi <yao@codesourcery.com>
9167
9168 * tracepoint.c: Include inttypes.h.
9169 (struct collect_memory_action): Use sized types.
9170 (struct tracepoint): Likewise.
9171 (cmd_qtdp, stop_tracing): Update print specifiers.
9172 (cmd_qtp, response_tracepoint): Likewise.
9173 (collect_data_at_tracepoint): Likewise.
9174 (collect_data_at_step): Likewise.
9175
55a8c076
YQ
91762012-04-14 Yao Qi <yao@codesourcery.com>
9177
9178 Import gnulib module inttypes.
9179 * aclocal.m4, config.in, configure: Regenerated.
9180
dc750257
YQ
91812012-04-14 Yao Qi <yao@codesourcery.com>
9182
9183 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9184 Makefile and config.status at last.
9185
0ab5faf9
YQ
91862012-04-13 Yao Qi <yao@codesourcery.com>
9187
9188 * tracepoint.c: Include stdint.h unconditionally.
9189
18f5fd81
TJB
91902012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9191
9192 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9193 on BFD_HAVE_SYS_PROCFS_TYPE.
9194 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9195 * configure: Regenerate.
9196 * config.in: Likewise.
9197
4d47af5c
L
91982012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9199
9200 * Makefile.in (clean): Also remove x32.c x32-linux.c
9201 x32-avx.c x32-avx-linux.c.
9202 (x32.o): New target.
9203 (x32.c): Likewise.
9204 (x32-linux.o): Likewise.
9205 (x32-linux.c): Likewise.
9206 (x32-avx.o): Likewise.
9207 (x32-avx.c): Likewise.
9208 (x32-avx-linux.o): Likewise.
9209 (x32-avx-linux.c): Likewise.
9210
9211 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9212 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9213 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9214 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9215 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9216 i386/x32-avx-linux.xml.
9217
9218 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9219 (init_registers_x32_avx_linux): Likwise.
9220 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9221 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9222
ecedbe58
PA
92232012-04-13 Pedro Alves <palves@redhat.com>
9224
9225 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9226 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9227 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9228 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9229 the sub-make.
9230
c92b5177
L
92312012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9232
9233 * linux-x86-low.c (compat_x32_clock_t): New.
9234 (compat_x32_siginfo_t): Likewise.
9235 (compat_x32_siginfo_from_siginfo): Likewise.
9236 (siginfo_from_compat_x32_siginfo): Likewise.
9237 (linux_is_elf64): Likewise.
9238 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9239 and siginfo_from_compat_x32_siginfo for x32.
9240 (x86_arch_setup): Set linux_is_elf64.
9241
214d508e
L
92422012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9243
9244 PR gdb/13969
9245 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9246 e_machine field.
9247 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9248 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9249 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9250 compatible with process.
9251
c9a1864a
YQ
92522012-04-12 Yao Qi <yao@codesourcery.com>
9253
9254 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9255 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9256 (install-only, install-info, clean): Handle sub dir gnulib.
9257 (all-lib, am--refresh): New targets.
9258 (memmem.o): Remove target.
9259 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9260 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9261 (AC_REPLACE_FUNCS): Remove memmem.
9262 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9263 (AC_OUTPUT): Generate Makefile in gnulib/.
9264 * aclocal.m4, config.in, configure: Regenerated.
9265
367ba2c2
MR
92662012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9267
9268 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9269
9d236627
PA
92702012-04-05 Pedro Alves <palves@redhat.com>
9271
9272 -Werror=strict-aliasing
9273
9274 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9275 pointer.
9276
111217b3
PA
92772012-04-04 Pedro Alves <palves@redhat.com>
9278
9279 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9280 (sparc_store_gregset_from_stack, sparc_store_gregset)
9281 (sparc_breakpoint_at): Fix formatting.
9282
8365dcf5
TJB
92832012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9284
9285 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9286 are available.
9287 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9288 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9289 * config.in: Regenerate.
9290 * configure: Likewise.
9291
689cc2ae
PA
92922012-03-29 Pedro Alves <palves@redhat.com>
9293
9294 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9295 Correct ptrace arguments.
9296
c14dfd32
PA
92972012-03-28 Pedro Alves <palves@redhat.com>
9298
9299 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9300 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9301 (IA64_FR1_REGNUM): New defines.
9302 (ia64_fetch_register): New.
9303 (the_low_target): Install it.
9304 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9305 field.
9306 * linux-low.c (linux_fetch_registers): Try the
9307 the_low_target.fetch_register hook first.
9308
9309 * linux-arm-low.c (the_low_target): Adjust.
9310 * linux-bfin-low.c (the_low_target): Adjust.
9311 * linux-cris-low.c (the_low_target): Adjust.
9312 * linux-crisv32-low.c (the_low_target): Adjust.
9313 * linux-m32r-low.c (the_low_target): Adjust.
9314 * linux-m68k-low.c (the_low_target): Adjust.
9315 * linux-mips-low.c (the_low_target): Adjust.
9316 * linux-ppc-low.c (the_low_target): Adjust.
9317 * linux-s390-low.c (the_low_target): Adjust.
9318 * linux-sh-low.c (the_low_target): Adjust.
9319 * linux-sparc-low.c (the_low_target): Adjust.
9320 * linux-tic6x-low.c (the_low_target): Adjust.
9321 * linux-x86-low.c (the_low_target): Adjust.
9322 * linux-xtensa-low.c (the_low_target): Adjust.
9323
63c88e13
PA
93242012-03-26 Pedro Alves <palves@redhat.com>
9325
9326 * server.c (handle_qxfer_libraries): Don't bail early if
9327 the_target->qxfer_libraries_svr4 is not NULL.
9328
fb723180
PA
93292012-03-26 Pedro Alves <palves@redhat.com>
9330
9331 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9332
0afae3cf
PA
93332012-03-23 Pedro Alves <palves@redhat.com>
9334
9335 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9336 "library-list-svr4" element's start tag when the the DSO list is
9337 empty.
9338
485f1ee4
PA
93392012-03-23 Pedro Alves <palves@redhat.com>
9340
9341 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9342 a variable whose type size is the same as the inferior's pointer
9343 size.
9344
a5362b9a
TS
93452012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9346
9347 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9348 struct siginfo.
9349 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9350 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9351 * linux-low.h: Include <signal.h>.
9352 (struct siginfo): Remove forward declaration.
9353 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9354 struct siginfo.
9355
d226c142
MF
93562012-03-21 Mike Frysinger <vapier@gentoo.org>
9357
9358 * .gitignore: Ignore more files.
9359
122f36ef
PA
93602012-03-19 Pedro Alves <palves@redhat.com>
9361 Jan Kratochvil <jan.kratochvil@redhat.com>
9362
9363 * server.c (cont_thread, general_thread): Add describing comments.
9364 (start_inferior): Clear `cont_thread'.
9365 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9366 of a process.
9367
fc3e5175
YQ
93682012-03-15 Yao Qi <yao@codesourcery.com>
9369
9370 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9371 handling to ...
9372 (cmd_qtdp): ... here.
9373
8d0d92cd
YQ
93742012-03-15 Yao Qi <yao@codesourcery.com>
9375
9376 * tracepoint.c (struct tracepoint_action_ops): New.
9377 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9378 (m_tracepoint_action_download): New.
9379 (r_tracepoint_action_download): New.
9380 (x_tracepoint_action_download): New.
9381 (l_tracepoint_action_download): New.
9382 (add_tracepoint_action): Install `action->ops' according type.
9383 (download_tracepoint_1): Move code `download' function pointer
9384 of various tracepoint_action_ops.
9385
87b0bb13
JK
93862012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9387
9388 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9389 linux_ptrace_attach_warnings.
9390
5f572dec
JK
93912012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9392
9393 * Makefile.in (linux-ptrace.o): New.
9394 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9395 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9396 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9397 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9398 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9399 of these targets.
9400 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9401
f4647387
YQ
94022012-03-08 Yao Qi <yao@codesourcery.com>
9403 Pedro Alves <palves@redhat.com>
9404
9405 Fix PR server/13392.
9406 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9407 offset of JMP insn.
9408 * tracepoint.c (remove_tracepoint): New.
9409 (cmd_qtdp): Call remove_tracepoint when failed to install.
9410
9b224c5e
PA
94112012-03-07 Pedro Alves <palves@redhat.com>
9412
9413 * linux-low.c (get_detach_signal): New.
9414 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9415 Pass on pending signals to PTRACE_DETACH. Check the result of the
9416 ptrace call.
9417 * server.c (program_signals, program_signals_p): New.
9418 (handle_general_set): Handle QProgramSignals.
9419 * server.h (program_signals, program_signals_p): Declare.
9420
e237a7e2
JK
94212012-03-05 Pedro Alves <palves@redhat.com>
9422 Jan Kratochvil <jan.kratochvil@redhat.com>
9423
9424 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9425 New comment why.
9426
5808517f
YQ
94272012-03-03 Yao Qi <yao@codesourcery.com>
9428
9429 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9430 agent_look_up_symbols.
9431
58b4daa5
YQ
94322012-03-03 Yao Qi <yao@codesourcery.com>
9433
9434 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9435 (linux-x86-low.o): Likewise.
9436 * server.h: Remove in_process_agent_loaded.
9437 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9438 common/agent.c.
9439 Update callers.
9440
8ffcbaaf
YQ
94412012-03-03 Yao Qi <yao@codesourcery.com>
9442
9443 * tracepoint.c (gdb_agent_capability): New global.
9444 (in_process_agent_loaded_ust): Renamed to
9445 `in_process_agent_supports_ust'.
9446 Update callers.
9447 (in_process_agent_supports_ust): Call agent_capability_check.
9448 (clear_installed_tracepoints): Assert that agent supports
9449 agent.
9450
d1feda86
YQ
94512012-03-03 Yao Qi <yao@codesourcery.com>
9452
9453 * linux-low.c (linux_supports_agent): New.
9454 (linux_target_ops): Initialize field `supports_agent' with
9455 linux_supports_agent.
9456 * target.h (struct target_ops) <supports_agent>: New.
9457 (target_supports_agent): New macro.
9458 * server.c (handle_general_set): Handle packet 'QAgent'.
9459 (handle_query): Send `QAgent+'.
9460 * Makefile.in (server.o): Depends on agent.h.
9461
2fa291ac
YQ
94622012-03-03 Yao Qi <yao@codesourcery.com>
9463
9464 * Makefile.in (OBS): Add agent.o.
9465 Add new rule for agent.o.
9466 Track dependence of tracepoint.c on agent.h.
9467 * tracepoint.c (run_inferior_command_1):
9468 (run_inferior_command): Call agent_run_command.
9469 (gdb_ust_connect_sync_socket): Deleted. Move it to
9470 common/agent.c.
9471 (resume_thread, stop_thread): Likewise.
9472 (gdb_ust_socket_init): Renamed to ...
9473 (gdb_agent_socket_init): ... New.
9474 (gdb_ust_thread): Renamed to ...
9475 (gdb_agent_helper_thread): ... New.
9476 (gdb_ust_init): Move some code to ...
9477 (gdb_agent_init): ... here. New.
9478 [HAVE_UST]: Call gdb_ust_init.
9479 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9480 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9481 * config.in, configure: Regenerated.
9482
05044653
PA
94832012-03-02 Pedro Alves <palves@redhat.com>
9484
9485 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9486 * linux-low.c (struct simple_pid_list): New.
9487 (stopped_pids): New a struct simple_pid_list pointer.
9488 (add_to_pid_list, pull_pid_from_list): New.
9489 (handle_extended_wait): Don't assume the first signal new children
9490 report is SIGSTOP. Adjust call to pull_pid_from_list.
9491 (linux_wait_for_lwp): Adjust.
9492
8d00225b
YQ
94932012-03-02 Yao Qi <yao@codesourcery.com>
9494
9495 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9496 debug log.
9497
19560ba5
YQ
94982012-03-02 Yao Qi <yao@codesourcery.com>
9499
9500 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9501 `stop_pc' and `tpoint'. Update caller.
9502
1faeff08
MR
95032012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9504
9505 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9506 * linux-low.c (use_linux_regsets): New macro.
9507 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9508 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9509 (linux_register_in_regsets): New function.
9510 (usr_fetch_inferior_registers): Skip registers covered by
9511 regsets.
9512 (usr_store_inferior_registers): Likewise.
9513 (usr_fetch_inferior_registers): New macro.
9514 (usr_store_inferior_registers): Likewise.
9515 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9516 (linux_store_registers): Likewise.
9517 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9518 prototype.
9519 (init_registers_mips64_dsp_linux): Likewise.
9520 (init_registers_mips_linux): New macro.
9521 (init_registers_mips_dsp_linux): Likewise.
9522 (mips_dsp_num_regs): Likewise.
9523 (DSP_BASE, DSP_CONTROL): New fallback macros.
9524 (mips_base_regs): New macro.
9525 (mips_regmap): Use it. Fix the size.
9526 (mips_dsp_regmap): New variable.
9527 (mips_dsp_regset_bitmap): Likewise.
9528 (mips_arch_setup): New function.
9529 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9530 than mips_regmap.
9531 (mips_cannot_store_register): Likewise.
9532 (the_low_target): Update .arch_setup, .num_regs and .regmap
9533 initializers. Add .regset_bitmap initializer.
9534 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9535 initializer.
9536 * linux-bfin-low.c (the_low_target): Likewise.
9537 * linux-cris-low.c (the_low_target): Likewise.
9538 * linux-crisv32-low.c (the_low_target): Likewise.
9539 * linux-ia64-low.c (the_low_target): Likewise.
9540 * linux-m32r-low.c (the_low_target): Likewise.
9541 * linux-m68k-low.c (the_low_target): Likewise.
9542 * linux-ppc-low.c (the_low_target): Likewise.
9543 * linux-s390-low.c (the_low_target): Likewise.
9544 * linux-sh-low.c (the_low_target): Likewise.
9545 * linux-sparc-low.c (the_low_target): Likewise.
9546 * linux-tic6x-low.c (the_low_target): Likewise.
9547 * linux-x86-low.c (the_low_target): Likewise.
9548 * linux-xtensa-low.c (the_low_target): Likewise.
9549 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9550 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9551 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9552 srv_xmlfiles.
9553 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9554 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9555
c03e6ccc
YQ
95562012-02-29 Yao Qi <yao@codesourcery.com>
9557 Pedro Alves <palves@redhat.com>
9558
9559 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9560 `step_over_finished' is true.
9561
644cebc9
PA
95622012-02-27 Pedro Alves <palves@redhat.com>
9563
9564 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9565 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9566
c14d7ab2
PA
95672012-02-27 Pedro Alves <palves@redhat.com>
9568
9569 PR server/9684
9570 * linux-low.c (pid_is_stopped): New.
9571 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9572
412c89dd
LM
95732012-02-25 Luis Machado <lgustavo@codesourcery.com>
9574
9575 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9576 of conditions.
9577
b745defe
MR
95782012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9579
9580 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9581
9f3a5c85
LM
95822012-02-24 Luis Machado <lgustavo@codesourcery>
9583
9584 * server.c (handle_query): Advertise support for target-side
9585 breakpoint condition evaluation.
9586 (process_point_options): New function.
9587 (process_serial_event): When inserting a breakpoint, check for
9588 a target-side condition that should be evaluated.
9589
9590 * mem-break.c: Include regcache.h and ax.h.
9591 (point_cond_list_t): New data structure.
9592 (breakpoint) <cond_list>: New field.
9593 (find_gdb_breakpoint_at): Make non-static.
9594 (delete_gdb_breakpoint_at): Clear any target-side
9595 conditions.
9596 (clear_gdb_breakpoint_conditions): New function.
9597 (add_condition_to_breakpoint): Likewise.
9598 (add_breakpoint_condition): Likewise.
9599 (gdb_condition_true_at_breakpoint): Likewise.
9600 (gdb_breakpoint_here): Return result directly instead
9601 of going through a local variable.
9602
9603 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9604 (clear_gdb_breakpoint_conditions): Likewise.
9605 (add_breakpoint_condition): Likewise.
9606 (gdb_condition_true_at_breakpoint): Likewise.
9607
9608 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9609 (need_step_over_p): Take target-side breakpoint condition into
9610 consideration.
9611
5e1dc496
LM
96122012-02-24 Luis Machado <lgustavo@codesourcery>
9613
9614 * server.h: Include tracepoint.h.
9615 (agent_mem_read, agent_get_trace_state_variable_value,
9616 agent_set_trace_state_variable_value,
9617 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9618 get_set_tsv_func_addr): New prototypes.
9619
9620 * ax.h: New include file.
9621 * ax.c: New source file.
9622
9623 * tracepoint.c: Include ax.h.
9624 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9625 agent_expr, eval_result_type): Move to ax.h.
9626 (parse_agent_expr): Rename to ...
9627 (gdb_parse_agent_expr): ... this, make it non-static and move
9628 to ax.h.
9629 (unparse_agent_expr) Rename to ...
9630 (gdb_unparse_agent_expr): ... this, make it non-static and move
9631 to ax.h.
9632 (eval_agent_expr): Rename to ...
9633 (eval_tracepoint_agent_expr): ... this.
9634 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9635 forward declarations.
9636 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9637 (agent_get_trace_state_variable_value): New function.
9638 (agent_set_trace_state_variable_value): New function.
9639 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9640 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9641 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9642 (condition_true_at_tracepoint): Likewise.
9643 (parse_agent_expr): Rename to ...
9644 (gdb_parse_agent_expr): ... this and move to ax.c.
9645 (unparse_agent_expr): Rename to ...
9646 (gdb_unparse_agent_expr): ... this and move to ax.c.
9647 (gdb_agent_op_name): Move to ax.c.
9648 (eval_agent_expr): Rename to ...
9649 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9650 and move to ax.c.
9651 (eval_tracepoint_agent_expr): New function.
9652 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9653 non-static.
5e1dc496
LM
9654 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9655 ax.c.
9656 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9657 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9658 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9659 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9660 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9661 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9662 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9663 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9664 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9665 (compile_bytecodes): Remove forward declaration.
9666 (is_goto_target): Move to ax.c.
9667 (compile_bytecodes): Move to ax.c and call
9668 agent_get_trace_state_variable_value (...) and
9669 agent_set_trace_state_variable_value (...).
9670
9671 * Makefile.in: Update ax.c and IPA dependencies.
9672
277e4e52
PA
96732012-02-24 Pedro Alves <palves@redhat.com>
9674
9675 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9676 (cmd_bigqtbuffer_circular): ... this. Only handle
9677 'QTBuffer:circular:'.
9678 (handle_tracepoint_general_set): Adjust.
9679
bf4c19f7
YQ
96802012-02-16 Yao Qi <yao@codesourcery.com>
9681
9682 * inferiors.c: Move code to ...
9683 * dll.c: .... here. New.
9684 * server.h: Declare clear_dlls.
9685 * Makefile.in (SFILES): Add dll.c.
9686 (OBS): Add dll.o
9687 (dll.o): New rule.
9688
d73f2619
YQ
96892012-02-11 Yao Qi <yao@codesourcery.com>
9690
9691 * server.c: (handle_monitor_command): Add a new parameter
9692 `own_buf'.
9693 (handle_query): Update caller.
9694
f8255c2a
JB
96952012-02-09 Joel Brobecker <brobecker@adacore.com>
9696
9697 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9698 * configure, config.in: Regenerate.
9699 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9700 is not defined.
9701
da84f473
PA
97022012-02-02 Pedro Alves <palves@redhat.com>
9703
9704 Try SIGKILL first, then PTRACE_KILL.
9705 * linux-low.c (linux_kill_one_lwp): New.
9706 (linux_kill_one_lwp): Rename to ...
9707 (kill_one_lwp_callback): ... this. Use the new
9708 linux_kill_one_lwp.
9709
e886a173
PA
97102012-02-02 Pedro Alves <palves@redhat.com>
9711
9712 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9713 inferior.
9714
be07f1a2
PA
97152012-01-27 Pedro Alves <palves@redhat.com>
9716
9717 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9718 (elf_64_file_p): Make static.
9719 (linux_pid_exe_is_elf_64_file): New.
9720 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9721 Delete declarations.
9722 (linux_pid_exe_is_elf_64_file): Declare.
9723 * linux-x86-low.c (x86_arch_setup): Use
9724 linux_pid_exe_is_elf_64_file.
9725
d8301ad1
JK
97262012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9727
9728 * linux-low.c (linux_wait_for_event_1): Rename to ...
9729 (linux_wait_for_event): ... here and merge it with former
9730 linux_wait_for_event - new variable wait_ptid, use it.
9731 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9732
01b17894
PA
97332012-01-23 Pedro Alves <palves@redhat.com>
9734
9735 * server.c (main): Avoid yet another case of infinite loop while
9736 detaching/killing after a longjmp.
9737
e825046f
JK
97382012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9739
9740 Code cleanup.
9741 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9742
b9e7b9c3
UW
97432012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9744
9745 * hostio.c (handle_readlink): New function.
9746 (handle_vFile): Call it to handle "vFile:readlink" packets.
9747
901f9912
UW
97482012-01-20 Pedro Alves <palves@redhat.com>
9749 Ulrich Weigand <ulrich.weigand@linaro.org>
9750
9751 * server.c (handle_v_requests): Only support vAttach and vRun to
9752 start multiple processes when in extended protocol mode.
9753
fc1ab1a0
PA
97542012-01-17 Pedro Alves <palves@redhat.com>
9755
9756 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9757 memalign plus mprotect to allocate the scratch buffer.
9758
7d5d4e98
PA
97592012-01-13 Pedro Alves <palves@redhat.com>
9760
9761 * server.c (attach_inferior): Clear `cont_thread'.
9762
f128d5e9
PA
97632012-01-13 Pedro Alves <palves@redhat.com>
9764
9765 * server.c (main): Avoid infinite loop while detaching/killing
9766 after a longjmp.
9767
06db92f0
DE
97682012-01-09 Doug Evans <dje@google.com>
9769
9770 * server.c (start_inferior): Set last_ptid in --wrapper case.
9771
32d92999
YQ
97722012-01-06 Yao Qi <yao@codesourcery.com>
9773
9774 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9775 defined.
9776 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9777
5e0a92a9
YQ
97782012-01-04 Yao Qi <yao@codesourcery.com>
9779
9780 * tracepoint.c (cmd_qtdp): Print debug message
9781 for static tracepoint.
9782
ae639e8c
YQ
97832012-01-04 Yao Qi <yao@codesourcery.com>
9784
9785 * tracepoint.c (trace_vdebug): Differentiate debug message
9786 between gdbserver and IPA.
9787
f72429c5
YQ
97882012-01-03 Yao Qi <yao@codesourcery.com>
9789
9790 * tracepoint.c (tracepoint_was_hit): Don't collect for
9791 static tracepoint.
9792
12c3e59c
JB
97932012-01-02 Joel Brobecker <brobecker@adacore.com>
9794
9795 * terminal.h: Reformat copyright header.
9796
67827812
JB
97972012-01-02 Joel Brobecker <brobecker@adacore.com>
9798
9799 * server.c (gdbserver_version): Update copyright year.
9800 * gdbreplay.c (gdbreplay_version): Likewise.
9801
3e52c33d
JK
98022011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9803
9804 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9805
9806 Revert:
9807 2011-12-18 Hui Zhu <teawater@gmail.com>
9808 * linux-low.c (linux_create_inferior): Save return value to ret.
9809
66f1260e
HZ
98102011-12-18 Hui Zhu <teawater@gmail.com>
9811
9812 * linux-low.c (linux_create_inferior): Save return value to ret.
9813
e77616d7
DE
98142011-12-16 Doug Evans <dje@google.com>
9815
e7b06c57
DE
9816 * linux-low.c (linux_create_inferior): If stdio connection,
9817 redirect stdin from /dev/null, stdout to stderr.
9818 * remote-utils.c (remote_is_stdio): New static global.
9819 (remote_connection_is_stdio): New function.
9820 (remote_prepare): Handle stdio connection.
9821 (remote_open): Ditto.
9822 (remote_close): Don't close stdin for stdio connections.
9823 (read_prim,write_prim): New functions. Replace all calls to
9824 read/write to these.
9825 * server.c (main): Watch for "-" argument. Move call to
9826 remote_prepare before start_inferior.
9827 * server.h (STDIO_CONNECTION_NAME): New macro.
9828 (remote_connection_is_stdio): Declare.
9829
e77616d7
DE
9830 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9831 in debugging output.
9832
82067193
YQ
98332011-12-15 Yao Qi <yao@codesourcery.com>
9834
9835 * tracepoint.c: Include sys/syscall.h.
9836 (gdb_ust_thread): Remove preprocessor conditional.
9837
82bfbe7e
PA
98382011-12-14 Pedro Alves <pedro@codesourcery.com>
9839
9840 * linux-low.c (linux_detach_one_lwp): Call
9841 the_low_target.prepare_to_resume before detaching.
9842
712c6575
YQ
98432011-12-14 Yao Qi <yao@codesourcery.com>
9844
9845 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9846 of write.
9847
d54d1edf
YQ
98482011-12-14 Yao Qi <yao@codesourcery.com>
9849
9850 * i386-low.c (i386_low_stopped_data_address): Initialize local
9851 variable `control'.
9852
6210a125
PA
98532011-12-13 Pedro Alves <pedro@codesourcery.com>
9854
9855 PR remote/13492
9856
9857 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9858 DR_CONTROL unless necessary. Extend comments.
9859 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9860 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9861
2ece8244
YQ
98622011-12-13 Yao Qi <yao@codesourcery.com>
9863
9864 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9865 macros.
9866 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9867
784867a5
JK
98682011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9869
9870 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9871 Print new debug message for such case.
9872
6bf36717
JK
98732011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9874
9875 Fix overlapping memcpy.
9876 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9877 the read_inferior_memory transfer.
9878 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9879 write_inferior_memory transfer.
9880 (set_fast_tracepoint_jump): New variable buf. Use it for the
9881 read_inferior_memory and write_inferior_memory transfers.
9882 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9883 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9884 Use it for the write_inferior_memory transfer.
9885 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9886 buffers.
9887
50275556
MR
98882011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9889
9890 * linux-low.c (fetch_register, store_register): Make code
9891 consistent, fix formatting.
9892
7325beb4
MR
98932011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9894
9895 * linux-low.c (usr_store_inferior_registers): Factor out code
9896 to handle individual registers into...
9897 (store_register): ... this new function.
9898
c642a434
UW
98992011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9900
9901 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9902 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9903 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9904 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9905 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9906 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9907 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9908 (srv_xmlfiles): Add new XML files.
9909
9910 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9911 and <sys/uio.h>.
9912 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9913 (init_registers_s390_linux32v1): Add prototype.
9914 (init_registers_s390_linux32v2): Likewise.
9915 (init_registers_s390_linux64v1): Likewise.
9916 (init_registers_s390_linux64v2): Likewise.
9917 (init_registers_s390x_linux64v1): Likewise.
9918 (init_registers_s390x_linux64v2): Likewise.
9919 (s390_num_regs): Increment to 52.
9920 (s390_regmap): Add orig_r2 register.
9921 (s390_num_regs_3264): Increment to 68.
9922 (s390_regmap_3264): Add orig_r2 register.
9923 (s390_collect_ptrace_register): Handle orig_r2 register.
9924 (s390_supply_ptrace_register): Likewise.
9925 (s390_fill_last_break): New function.
9926 (s390_store_last_break): Likewise.
9927 (s390_fill_system_call): New function.
9928 (s390_store_system_call): Likewise.
9929 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9930 register sets.
9931 (s390_check_regset): New function.
9932 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9933 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9934 Update target_regsets for available register sets.
9935
2268b414
JK
99362011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9937 Jan Kratochvil <jan.kratochvil@redhat.com>
9938
9939 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9940 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9941 New.
9942 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9943 * linux-low.h (struct process_info_private): New member r_debug.
9944 * server.c (handle_qxfer_libraries): Call
9945 the_target->qxfer_libraries_svr4.
9946 (handle_qxfer_libraries_svr4): New function.
9947 (qxfer_packets): New entry "libraries-svr4".
9948 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9949 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9950 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9951 PACKET_qXfer_libraries_svr4.
9952
d6db1fab
UW
99532011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9954
9955 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9956 PSW address/mask between 8-byte and 16-byte formats.
9957 (s390_supply_ptrace_register): Likewise.
9958 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9959 basic addressing mode bit.
9960
242f5f1c
SS
99612011-11-24 Stan Shebs <stan@codesourcery.com>
9962
9963 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9964
f196051f
SS
99652011-11-17 Stan Shebs <stan@codesourcery.com>
9966
9967 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9968 (tracing_start_time): New global.
9969 (tracing_stop_time): New global.
9970 (tracing_user_name): New global.
9971 (tracing_notes): New global.
9972 (tracing_stop_note): New global.
9973 (cmd_qtstart): Set traceframe_usage, start_time.
9974 (stop_tracing): Set stop_time.
9975 (cmd_qtstatus): Report additional status.
9976 (cmd_qtp): New function.
9977 (handle_tracepoint_query): Call it.
9978 (cmd_qtnotes): New function.
9979 (handle_tracepoint_general_set): Call it.
9980 (get_timestamp): Rename from tsv_get_timestamp.
9981
405f8e94
SS
99822011-11-14 Stan Shebs <stan@codesourcery.com>
9983 Kwok Cheung Yeung <kcy@codesourcery.com>
9984
9985 * linux-x86-low.c (small_jump_insn): New.
9986 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9987 trampoline and error message, build a trampoline and issue a small
9988 jump instruction to it.
9989 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9990 trampoline and error message.
9991 (x86_get_min_fast_tracepoint_insn_len): New.
9992 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9993 * linux-low.h (struct linux_target_ops): Add arguments to
9994 install_fast_tracepoint_jump_pad operation, add new operation.
9995 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9996 arguments.
9997 (linux_get_min_fast_tracepoint_insn_len): New function.
9998 (linux_target_op): Add new operation.
9999 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10000 (gdb_trampoline_buffer_end): Ditto.
10001 (gdb_trampoline_buffer_error): Ditto.
10002 (struct ipa_sym_addresses): Add fields for new IPA variables.
10003 (symbol_list): Add entries for new IPA variables.
10004 (struct tracepoint): Add fields to hold the address range of the
10005 trampoline used by the tracepoint.
10006 (trampoline_buffer_head): New static variable.
10007 (trampoline_buffer_tail): Ditto.
10008 (claim_trampoline_space): New function.
10009 (have_fast_tracepoint_trampoline_buffer): New function.
10010 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10011 structure.
10012 (install_fast_tracepoint): Ditto, also add error buffer argument.
10013 (cmd_qtminftpilen): New function.
10014 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10015 (fast_tracepoint_from_trampoline_address): New function.
10016 (fast_tracepoint_collecting): Handle trampoline as part of jump
10017 pad space.
10018 (set_trampoline_buffer_space): New function.
10019 (initialize_tracepoint): Initialize new IPA variables.
10020 * target.h (struct target_ops): Add arguments to
10021 install_fast_tracepoint_jump_pad operation, add new
10022 get_min_fast_tracepoint_insn_len operation.
10023 (target_get_min_fast_tracepoint_insn_len): New.
10024 (install_fast_tracepoint_jump_pad): Add arguments.
10025 * server.h (IPA_BUFSIZ): Define.
10026 * linux-i386-ipa.c: Include extra header files.
10027 (initialize_fast_tracepoint_trampoline_buffer): New function.
10028 (initialize_low_tracepoint): Call it.
10029 * server.h (set_trampoline_buffer_space): Declare.
10030 (claim_trampoline_space): Ditto.
10031 (have_fast_tracepoint_trampoline_buffer): Ditto.
10032
1e4d1764
YQ
100332011-11-14 Yao Qi <yao@codesourcery.com>
10034
10035 * server.c (handle_query): Handle InstallInTrace for qSupported.
10036 * tracepoint.c (add_tracepoint): Sort list.
10037 (install_tracepoint, download_tracepoint): New.
10038 (cmd_qtdp): Call them to install and download tracepoints.
10039 (sort_tracepoints): Removed.
10040 (cmd_qtstart): Update.
10041
5c73ff4e
YQ
100422011-11-14 Yao Qi <yao@codesourcery.com>
10043
10044 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10045 * mem-break.h: Declare.
10046 * tracepoint.c (cmd_qtstart): Move some code to ...
10047 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10048 New.
10049 (download_tracepoints): Move some code to ...
10050 (download_tracepoint_1): ... here. New.
10051
86a30030
YQ
100522011-11-08 Yao Qi <yao@codesourcery.com>
10053
10054 * remote-utils.c (relocate_instruction): A comment fix.
10055
8d26e50c
JB
100562011-11-07 Joel Brobecker <brobecker@adacore.com>
10057
10058 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10059 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10060 dr_status_mirror and dr_control_mirror from debug_reg_state.
10061 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10062 (i386_initial_stuff): Remove use of deleted globals.
10063 (i386_get_thread_context, i386_set_thread_context,
10064 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10065 from debug_reg_state.
10066
a59306a3
YQ
100672011-11-05 Yao Qi <yao@codesourcery.com>
10068
10069 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10070 address as TPOINT's.
10071
3065dfb6
SS
100722011-11-02 Stan Shebs <stan@codesourcery.com>
10073
10074 * tracepoint.c (agent_mem_read_string): New function.
10075 (eval_agent_expr): Call it for tracenz.
10076 * server.c (handle_query): Report support for tracenz.
10077
fd0d8c7c
YQ
100782011-11-02 Yao Qi <yao@codesourcery.com>
10079
10080 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10081
609086b1
YQ
100822011-11-02 Yao Qi <yao@codesourcery.com>
10083
10084 * target.h: Fix a typo in comment.
10085
b9fd1791
PA
100862011-10-31 Pedro Alves <pedro@codesourcery.com>
10087
10088 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10089 clobber the breakpoints' shadows with fast tracepoint jumps.
10090 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10091 * target.c (write_inferior_memory): Also pass MYADDR down to
10092 check_mem_write.
10093
03583c20
UW
100942011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10095
10096 * configure.ac: Check support for personality routine.
10097 * configure: Regenerate.
10098 * config.in: Likewise.
10099 * linux-low.c: Include <sys/personality.h>.
10100 Define ADDR_NO_RANDOMIZE if necessary.
10101 (linux_create_inferior): Disable address space randomization when
10102 forking inferior, if requested.
10103 (linux_supports_disable_randomization): New function.
10104 (linux_target_ops): Install it.
10105 * server.h (disable_randomization): Declare.
10106 * server.c (disable_randomization): New global variable.
10107 (handle_general_set): Handle QDisableRandomization.
10108 (handle_query): Likewise for qSupported.
10109 (main): Support --disable-randomization and --no-disable-randomization
10110 command line arguments.
10111 * target.h (struct target_ops): Add supports_disable_randomization.
10112 (target_supports_disable_randomization): New macro.
10113
723b724b
MF
101142011-09-29 Mike Frysinger <vapier@gentoo.org>
10115
10116 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10117 ifdef check.
10118 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10119 [!PT_GETDSBT] (target_loadmap): New definition.
10120 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10121 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10122 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10123 and PT_GETDSBT to LINUX_LOADMAP.
10124 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10125 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10126
55329a5c 101272011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10128
10129 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10130 (arm_linux_hwbp_cap): New static variable.
10131 (arm_linux_get_hwbp_cap): Replace by ...
10132 (arm_linux_init_hwbp_cap): ... this new function.
10133 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10134 (arm_linux_get_hw_watchpoint_count): Likewise.
10135 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10136 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10137 (arm_prepare_to_resume): Use perror_with_name instead of error.
10138
55329a5c 101392011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10140
10141 * linux-arm-low.c: Include <signal.h>.
10142 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10143 (struct arm_linux_hwbp_cap): New data type.
10144 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10145 (struct arm_linux_hw_breakpoint): New data type.
10146 (MAX_BPTS, MAX_WPTS): Define.
10147 (struct arch_process_info, struct arch_lwp_info): New data types.
10148 (arm_linux_get_hwbp_cap): New function.
10149 (arm_linux_get_hw_breakpoint_count): Likewise.
10150 (arm_linux_get_hw_watchpoint_count): Likewise.
10151 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10152 (arm_hwbp_control_initialize): Likewise.
10153 (arm_hwbp_control_is_enabled): Likewise.
10154 (arm_hwbp_control_is_initialized): Likewise.
10155 (arm_hwbp_control_disable): Likewise.
10156 (arm_linux_hw_breakpoint_equal): Likewise.
10157 (arm_linux_hw_point_initialize): Likewise.
10158 (struct update_registers_data): New data structure.
10159 (update_registers_callback: New function.
10160 (arm_insert_point): Likewise.
10161 (arm_remove_point): Likewise.
10162 (arm_stopped_by_watchpoint): Likewise.
10163 (arm_stopped_data_address): Likewise.
10164 (arm_new_process): Likewise.
10165 (arm_new_thread): Likewise.
10166 (arm_prepare_to_resume): Likewise.
10167 (the_low_target): Register arm_insert_point, arm_remove_point,
10168 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10169 arm_new_thread, and arm_prepare_to_resume.
10170
6b9801d4
SS
101712011-09-15 Stan Shebs <stan@codesourcery.com>
10172
10173 * server.h (struct emit_ops): Add compare-goto fields.
10174 * tracepoint.c (gdb_agent_op_sizes): New table.
10175 (emit_eq_goto): New function.
10176 (emit_ne_goto): New function.
10177 (emit_lt_goto): New function.
10178 (emit_le_goto): New function.
10179 (emit_gt_goto): New function.
10180 (emit_ge_goto): New function.
10181 (is_goto_target): New function.
10182 (compile_bytecodes): Recognize special cases of compare-goto
10183 combinations and call specialized emitters for them.
10184 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10185 (amd64_emit_ne_goto): New function.
10186 (amd64_emit_lt_goto): New function.
10187 (amd64_emit_le_goto): New function.
10188 (amd64_emit_gt_goto): New function.
10189 (amd64_emit_ge_goto): New function.
10190 (amd64_emit_ops): Add the new functions.
10191 (i386_emit_eq_goto): New function.
10192 (i386_emit_ne_goto): New function.
10193 (i386_emit_lt_goto): New function.
10194 (i386_emit_le_goto): New function.
10195 (i386_emit_gt_goto): New function.
10196 (i386_emit_ge_goto): New function.
10197 (i386_emit_ops): Add the new functions.
10198
bf15cbda
SS
101992011-09-08 Stan Shebs <stan@codesourcery.com>
10200
10201 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10202 (i386_emit_epilogue): Restore %ebx.
10203
943ca1dd
JZ
102042011-08-31 Jie Zhang <jzhang918@gmail.com>
10205
10206 * server.c (step_thread): Remove definition.
10207 (process_serial_event): Don't handle Hs.
10208 * server.h (step_thread): Remove declaration.
10209 * target.c (set_desired_inferior): Remove use of step_thread.
10210
e3deef73
LM
102112011-08-24 Luis Machado <lgustavo@codesourcery.com>
10212
10213 * linux-low.c: Include linux-procfs.h.
10214 (linux_attach_lwp_1): Update comments.
10215 (linux_attach): Scan for existing threads when attaching to a
10216 process that is the tgid.
10217 * Makefile.in: Update dependencies.
10218
13da1c97
LM
102192011-08-24 Luis Machado <lgustavo@codesourcery.com>
10220
10221 * configure.srv: Add linux-procfs.o dependencies.
10222
881127c9
YQ
102232011-08-14 Yao Qi <yao@codesourcery.com>
10224
10225 * target.h (struct target_ops): Fix indent.
10226 * win32-low.c (win32_target_ops): Fix comment.
10227
58dbd541
YQ
102282011-08-14 Andrew Jenner <andrew@codesourcery.com>
10229 Yao Qi <yao@codesourcery.com>
10230
10231 * Makefile.in (clean): Remove tic6x-*.c files.
10232 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10233 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10234 (tic6x-c64xp-linux.c): Likewise.
10235 * configure.srv: Add support for tic6x-*-uclinux.
10236 * linux-tic6x-low.c: New.
10237 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10238
78d85199
YQ
102392011-08-14 Andrew Stubbs <ams@codesourcery.com>
10240 Yao Qi <yao@codesourcery.com>
10241
10242 * target.h (struct target_ops): Add read_loadmap.
10243 * linux-low.c (struct target_loadseg): New type.
10244 (struct target_loadmap): New type.
10245 (linux_read_loadmap): New function.
10246 (linux_target_ops): Add linux_read_loadmap.
10247 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10248 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10249 to NULL.
78d85199 10250
a959a88d
EZ
102512011-08-05 Eli Zaretskii <eliz@gnu.org>
10252
10253 * win32-low.c: Include <stdint.h>.
10254
1ced966e
PA
102552011-07-22 Pedro Alves <pedro@codesourcery.com>
10256
10257 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10258 to the inferior here.
10259 (i386_remove_aligned_watchpoint): Ditto.
10260 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10261 fit part of the watchpoint in the debug registers.
10262 (i386_update_inferior_debug_regs): New.
10263 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10264 registers, and only update the inferior on success.
10265 (i386_low_remove_watchpoint): Ditto.
10266
d26e3629
KY
102672011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10268
10269 * linux-low.c (compare_ints, unique, list_threads, show_process,
10270 linux_core_of_thread): Delete.
10271 (linux_target_ops): Change linux_core_of_thread to
10272 linux_common_core_of_thread.
10273 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10274 * utils.c (malloc_failure): Change type of argument.
10275 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10276 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10277 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10278 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10279 (IPA_OBJS): Add common-utils-ipa.o.
10280 (ptid_h, linux_osdata_h): New macros.
10281 (server_h): Add common/common-utils.h, common/xml-utils.h,
10282 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10283 common/ptid.h.
10284 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10285 ptid.o, buffer.o): New rules.
10286 (linux-low.o): Add common/linux-osdata.h as a dependency.
10287 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10288 * configure.ac: Add AC_HEADER_DIRENT check.
10289 * config.in: Regenerate.
10290 * configure: Regenerate.
10291 * remote-utils.c (xml_escape_text): Delete.
10292 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10293 buffer_xml_printf): Move to common/buffer.c.
10294 * server.c (main): Remove call to initialize_inferiors.
10295 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10296 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10297 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10298 internal_error, gdb_assert, gdb_assert_fail): Delete.
10299 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10300 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10301 common/buffer.h.
10302 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10303 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10304 initialize_inferiors): Delete.
10305
2275a1a7
PA
103062011-07-20 Pedro Alves <pedro@codesourcery.com>
10307
10308 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10309 symbol error.
10310
0a5b1e09
PA
103112011-05-31 Pedro Alves <pedro@codesourcery.com>
10312
10313 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10314 assertion.
10315 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10316
6938fd34
YQ
103172011-05-26 Yao Qi <yao@codesourcery.com>
10318
10319 * Makefile.in (thread-db.o): Track dependence to
10320 common/gdb_thread_db.h.
10321 * thread-db.c: include gdb_thread_db.h from right place.
10322
b481f9e0
TT
103232011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10324
10325 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10326 __FILE__ and __LINE__ to internal_error.
10327
98a5dd13
DE
103282011-05-13 Doug Evans <dje@google.com>
10329
10330 * thread-db.c (try_thread_db_load_from_sdir): New function.
10331 (try_thread_db_load_from_dir): New function.
10332 (thread_db_load_search): Handle $sdir, ignore $pdir.
10333 Remove trying of system directories if search of
10334 libthread-db-search-path fails, that is now done via $sdir.
10335
d248b706
KY
103362011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10337
10338 * server.c (handle_query): Add EnableDisableTracepoints to the list
10339 of supported features.
43aaf8b6 10340 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10341 tracepoints.
43aaf8b6
PA
10342 (cmd_qtenable_disable): New.
10343 (cmd_qtstart): Install tracepoints even if disabled.
10344 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10345 receiving a QTEnable or QTDisable packet.
10346 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10347 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10348 tracepoints.
10349 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10350
84e578fb
DE
103512011-05-10 Doug Evans <dje@google.com>
10352
10353 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10354
71f55dd8
DE
103552011-05-04 Doug Evans <dje@google.com>
10356
10357 * linux-low.c (linux_join): Skip process lookup.
10358 * spu-low.c (spu_join): Ditto.
10359 * server.c (join_inferiors_callback): Delete.
10360 (process_serial_event): For 'D' packet (detach) call join_inferior
10361 directly.
10362
4d393d60
JM
103632011-05-04 Joseph Myers <joseph@codesourcery.com>
10364
10365 * README: Don't mention xscale*-*-linux*.
10366 * configure.srv (xscale*-*-linux*): Don't handle target.
10367
b00ad6ff
NF
103682011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10369
10370 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10371 casting pointers.
10372 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10373 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10374 (i386_emit_void_call_2): Likewise.
10375
af96c192
YQ
103762011-04-26 Yao Qi <yao@codesourcery.com>
10377
43aaf8b6
PA
10378 * linux-low.c: Move common macros to linux-ptrace.h.
10379 Include linux-ptrace.h.
af96c192
YQ
10380 * Makefile.in (linux_ptrace_h): New.
10381 (linux-low.o): Depends on linux-ptrace.h.
10382
03f2bd59
JK
103832011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10384
10385 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10386 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10387 (remote_prepare): New function with most of the TCP code from ...
10388 (remote_open): ... here. Detect PORT here unconditionally. Move also
10389 setting transport_is_reliable.
10390 * server.c (run_once): New variable.
10391 (gdbserver_usage): Document it.
10392 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10393 the first run if RUN_ONCE.
10394 * server.h (run_once, remote_prepare): New declarations.
10395
7a9dd1b2
TT
103962011-04-19 Tom Tromey <tromey@redhat.com>
10397
10398 * win32-low.c (handle_load_dll): Remove duplicate "the".
10399
81239425
PM
104002011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10401
10402 Remove support for old Cygwin 1.5 versions.
10403 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10404 function to avoid warning.
10405 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10406 warning.
10407
9e0627f1
PM
104082011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10409
10410 * gdbserver/server.h (Macro _): Define it if not available.
10411
588eebee
MS
104122011-03-14 Michael Snyder <msnyder@vmware.com>
10413
348af9f7 10414 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10415
43f70d4c
JB
104162011-03-10 Joel Brobecker <brobecker@adacore.com>
10417
10418 * Makefile.in (maintainer-clean realclean distclean): Remove
10419 "make ... subdir_do" command.
10420
348af9f7
MS
104212011-03-10 Michael Snyder <msnyder@vmware.com>
10422
10423 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10424
10425 * server.c (handle_v_run): Free alloced buffer on early return.
10426
e637a4f5
YQ
104272011-03-09 Yao Qi <yao@codesourcery.com>
10428
10429 Revert:
10430 2011-03-04 Yao Qi <yao@codesourcery.com>
10431
10432 * Makefile.in: Remove GNU make feature --directory.
10433
10434 2011-03-05 Yao Qi <yao@codesourcery.com>
10435
10436 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10437 (subdir_do): New make target. Copied from gdb/Makefile.
10438 (maintainer-clean, realclean, distclean, clean): Call corresponding
10439 make targets in common/Makefile.
10440
10441 2011-02-11 Yao Qi <yao@codesourcery.com>
10442
10443 * configure.ac: Call AC_PROG_RANLIB.
10444 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10445 * configure: Regenerate.
10446
e6edda56
JK
104472011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10448
10449 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10450
e5141119
JB
104512011-03-06 Yao Qi <yao@codesourcery.com>
10452
10453 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10454
64794aa4
JB
104552011-03-05 Yao Qi <yao@codesourcery.com>
10456
10457 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10458 (subdir_do): New make target. Copied from gdb/Makefile.
10459 (maintainer-clean, realclean, distclean, clean): Call corresponding
10460 make targets in common/Makefile.
10461
7a762829
YQ
104622011-03-04 Yao Qi <yao@codesourcery.com>
10463
10464 * Makefile.in: Remove GNU make feature --directory.
10465
348af9f7
MS
104662011-03-04 Michael Snyder <msnyder@vmware.com>
10467
10468 * server.c (queue_stop_reply): Call xmalloc not malloc.
10469
104702011-03-02 Michael Snyder <msnyder@vmware.com>
10471
10472 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10473
9f72fee2
MS
104742011-02-28 Michael Snyder <msnyder@vmware.com>
10475
588eebee
MS
10476 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10477 (cmd_qtframe): Ditto.
10478 (cmd_qtbuffer): Ditto.
10479 (cmd_bigqtbuffer): Ditto.
10480
9f72fee2
MS
10481 * utils.c (decimal2str): Initialize 'width' to nine, then
10482 don't mess with it.
10483
8040bd49
UW
104842011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10485
10486 * hostio.c (require_data): Free *data, not data.
10487
7e52cbd0
JK
104882011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10489
10490 * hostio.c (require_data): Use free, not xfree.
10491
9130f83e
MS
104922011-02-27 Michael Snyder <msnyder@vmware.com>
10493
4b812f4e
MS
10494 * server.c (handle_query): Discard unused value.
10495
9130f83e
MS
10496 * hostio.c (require_data): Free malloc memory before returning
10497 error.
10498
69d37113
MS
104992011-02-26 Michael Snyder <msnyder@vmware.com>
10500
10501 * linux-low.c (list_threads): Call closedir for dirent.
10502
35f5825a
MS
105032011-02-27 Michael Snyder <msnyder@vmware.com>
10504
2a589cef
MS
10505 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10506 a case statement falls through.
10507
0adea5f7
MS
10508 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10509
35f5825a
MS
10510 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10511 in comparison.
10512
238f1c74
MS
105132011-02-26 Michael Snyder <msnyder@vmware.com>
10514
10515 * utils.c (decimal2str): Eliminate dead code and dead param.
10516 (pulongest): Drop dead param from call to decimal2str.
10517 (plongest): Ditto.
10518
633ff500
JB
105192011-02-24 Joel Brobecker <brobecker@adacore.com>
10520
10521 Revert the following patch (not approved yet):
10522 2011-02-21 Hui Zhu <teawater@gmail.com>
10523 * tracepoint.c (tp_printf): New function.
10524 (eval_agent_expr): Handle gdb_agent_op_printf.
10525
f9c6ff72
HZ
105262011-02-21 Hui Zhu <teawater@gmail.com>
10527
10528 * tracepoint.c (tp_printf): New function.
10529 (eval_agent_expr): Handle gdb_agent_op_printf.
10530
94d5e490
TT
105312011-02-18 Tom Tromey <tromey@redhat.com>
10532
10533 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10534 (tracepoint.o): Likewise.
10535 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10536 (gdb_agent_op_names): Likewise.
10537
c7f96d2b
TT
105382011-02-18 Tom Tromey <tromey@redhat.com>
10539
10540 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10541 gdb_agent_op_rot>: New constants.
10542 (gdb_agent_op_names): Add pick and roll.
10543 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10544 cases.
10545
0feedb2c
JK
105462011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10547
10548 * aclocal.m4: Regenerated with aclocal-1.11.1.
10549
b3b9301e
PA
105502011-02-14 Pedro Alves <pedro@codesourcery.com>
10551
10552 * server.c (handle_qxfer_traceframe_info): New.
10553 (qxfer_packets): Register "traceframe-info".
10554 (handle_query): Report support for qXfer:traceframe-info:read+.
10555 * tracepoint.c (match_blocktype): New.
10556 (traceframe_find_block_type): Rename to ...
10557 (traceframe_walk_blocks): ... this. Add callback filter argument,
10558 and use it.
10559 (traceframe_find_block_type): New, reimplemented on top of
10560 traceframe_walk_blocks.
10561 (build_traceframe_info_xml): New.
10562 (traceframe_read_info): New.
10563 * server.h (traceframe_read_info): Declare.
10564
4f3e6fb7
YQ
105652011-02-11 Yao Qi <yao@codesourcery.com>
10566
10567 * configure.ac: Call AC_PROG_RANLIB.
10568 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10569 * configure: Regenerate.
10570
764880b7
PA
105712011-02-07 Pedro Alves <pedro@codesourcery.com>
10572
10573 * server.c (gdb_read_memory): Change return semantics to allow
10574 partial transfers.
10575 (handle_search_memory_1): Adjust.
10576 (process_serial_event) <'m' packet>: Handle partial transfers.
10577 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10578
1c79eb8a
PA
105792011-01-28 Pedro Alves <pedro@codesourcery.com>
10580
10581 * regcache.c (init_register_cache): Initialize
10582 regcache->register_status.
10583 (free_register_cache): Release regcache->register_status.
10584 (regcache_cpy): Copy register_status.
10585 (registers_to_string): Print 'x's for unavailable registers.
10586 (supply_register): Mark the register's status valid or
10587 unavailable, depending on whether a buffer was passed in or not.
10588 (supply_register_zeroed): New.
10589 (supply_regblock): Mark the registers' status valid or
10590 unavailable, depending on whether a buffer was passed in or not.
10591 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10592 (struct regcache): New `register_status' field.
10593 (supply_register_zeroed): Declare.
10594 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10595 supply_register_zeroed, rather than passing a NULL buffer to
10596 supply_register.
10597 * tracepoint.c (fetch_traceframe_registers): Update comment.
10598
85724a0e
PA
105992011-01-28 Pedro Alves <pedro@codesourcery.com>
10600
10601 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10602 buffer explicit.
10603
d08aafef
PA
106042011-01-25 Pedro Alves <pedro@codesourcery.com>
10605
10606 * server.h (decode_xfer_write): Change prototype.
10607 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10608 and don't extract the annex here.
10609 * server.c (decode_xfer_read): Remove `annex' parameter,
10610 and don't extract the annex here.
10611 (decode_xfer): New.
10612 (struct qxfer): New.
10613 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10614 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10615 (handle_qxfer_statictrace): New functions, abstracted out from
10616 handle_query, and made to use the struct qxfer interface.
10617 (handle_threads_qxfer_proper): Rename to ...
10618 (handle_qxfer_threads_proper): ... this.
10619 (handle_threads_qxfer): Rename to ...
10620 (handle_qxfer_threads): ... this. Adjust.
10621 (qxfer_packets): New array.
10622 (handle_qxfer): New function.
10623 (handle_query): Use handle_qxfer.
10624
493e2a69
MS
106252011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10626
10627 * gdbreplay.c: Shorten lines of >= 80 columns.
10628 * linux-low.c: Ditto.
10629 * linux-ppc-low.c: Ditto.
10630 * linux-s390-low.c: Ditto.
10631 * linux-sparc-low.c: Ditto.
10632 * linux-x86-low.c: Ditto.
10633 * linux-xtensa-low.c: Ditto.
10634 * mem-break.c: Ditto.
10635 * nto-low.c: Ditto.
10636 * regcache.h: Ditto.
10637 * remote-utils.c: Ditto.
10638 * server.c: Ditto.
10639 * server.h: Ditto.
10640 * thread-db.c: Ditto.
10641 * tracepoint.c: Ditto.
10642 * utils.c: Ditto.
10643 * win32-low.h: Ditto.
10644
44944448
JB
106452011-01-05 Joel Brobecker <brobecker@adacore.com>
10646
10647 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10648 update.
10649
71ce852c
JB
106502011-01-01 Joel Brobecker <brobecker@adacore.com>
10651
10652 * server.c (gdbserver_version): Update copyright year in version
10653 output.
10654 * gdbreplay.c (gdbreplay_version): Ditto.
10655
eb826dc6
MF
106562010-12-29 Jie Zhang <jie.zhang@analog.com>
10657
10658 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10659 * linux-bfin-low.c: New file.
10660 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10661 PT_DATA_ADDR for BFIN targets.
10662 * Makefile.in (SFILES): Add linux-bfin-low.c.
10663 (clean): Remove reg-bfin.c.
10664 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10665 * README: Mention supported Blackfin targets.
10666
39ab222a
MF
106672010-12-23 Mike Frysinger <vapier@gentoo.org>
10668
10669 * .gitignore: New file.
10670
a1f2ce7d
MF
106712010-11-16 Mike Frysinger <vapier@gentoo.org>
10672
10673 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10674
f474844c
JZ
106752010-10-22 Jie Zhang <jie@codesourcery.com>
10676
10677 * Makefile.in: Add FLAGS_TO_PASS variable.
10678 (install): Remove dependency of install-only and recursively
10679 invoke make for install-only.
10680
f1048712
DE
106812010-10-04 Doug Evans <dje@google.com>
10682
10683 * Makefile.in (uninstall): Use $(DESTDIR).
10684
b53a1623
PA
106852010-09-24 Pedro Alves <pedro@codesourcery.com>
10686
e6ee044d
PA
10687 PR gdb/11842
10688
b53a1623
PA
10689 * linux-x86-low.c (compat_siginfo_from_siginfo)
10690 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10691 si_code is < 0. Check for si_code == SI_TIMER before checking for
10692 si_code < 0.
10693
fa1bd1e4
JB
106942010-09-13 Joel Brobecker <brobecker@adacore.com>
10695
10696 * lynx-i386-low.c: New file.
10697 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10698
47fac8f8
JB
106992010-09-13 Joel Brobecker <brobecker@adacore.com>
10700
10701 * lynx-low.c (ptrace_request_to_str): Remove handling for
10702 request values that have been removed in LynxOS 5.x.
10703
1adfc54d
JB
107042010-09-13 Joel Brobecker <brobecker@adacore.com>
10705
10706 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10707 <ptrace.h>
10708
c2a66c29
NS
107092010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10710
10711 * configure.ac: Add --enable-inprocess-agent option.
10712 * configure: Rebuilt.
10713
32fcada3
YQ
107142010-09-06 Yao Qi <yao@codesourcery.com>
10715
10716 * linux-low.c (linux_kill): Remove unused variable.
10717 (linux_stabilize_threads): Likewise.
10718 * server.c (start_inferior): Likewise.
10719 (queue_stop_reply_callback): Likewise.
10720 * tracepoint.c (do_action_at_tracepoint): Likewise.
10721
0cccb683
YQ
107222010-09-06 Yao Qi <yao@codesourcery.com>
10723
10724 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10725 on return.
10726
423ec54c
JK
107272010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10728
10729 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10730
12ac6819
PA
107312010-09-06 Pedro Alves <pedro@codesourcery.com>
10732
10733 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10734 "$(IPA_DEPFILES)".
10735
8ed54b31
JB
107362010-09-01 Joel Brobecker <brobecker@adacore.com>
10737
10738 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10739 gdbserver/lynx-ppc-low.c: New files.
10740 * Makefile.in (lynx_low_h): New variable.
10741 (lynx-low.o, lynx-ppc-low.o): New rules.
10742 * configure.ac: On LynxOS, link with -lnetinet.
10743 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10744 * configure: regenerate.
10745
bb0116a4
JB
107462010-09-01 Joel Brobecker <brobecker@adacore.com>
10747
10748 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10749 * configure.ac: Add check for vasprintf and vsnprintf.
10750 * configure, config.in: Regenerate.
10751 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10752
a778ab81 107532010-09-01 Joel Brobecker <brobecker@adacore.com>
10754
10755 * gdbreplay.c: Move include of alloca.h up, next to include of
10756 malloc.h.
10757 * server.h: Add include of malloc.h.
10758 * mem-break.c: Remove include of malloc.h.
10759 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10760
8b034a19 107612010-09-01 Joel Brobecker <brobecker@adacore.com>
10762
10763 * Makefile.in (memmem.o): Build with -Wno-error.
10764
107652010-09-01 Joel Brobecker <brobecker@adacore.com>
10766
10767 * utils.c (xsnprintf): Make non-static.
10768 * server.h: Add xsnprintf declaration.
10769 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10770 replace calls to snprintf by calls to xsnprintf throughout.
10771
107722010-09-01 Joel Brobecker <brobecker@adacore.com>
10773
10774 * configure.ac: Add configure check for alloca.
10775 * configure, config.in: Regenerate.
10776 * server.h: Include alloca.h if it exists.
10777 * gdbreplay.c: Include alloca.h if it exists.
10778
1a981360
PA
107792010-08-28 Pedro Alves <pedro@codesourcery.com>
10780
10781 * linux-low.c (__SIGRTMIN): Define if not already defined.
10782 (linux_create_inferior): Check for __ANDROID__ rather than
10783 __SIGRTMIN.
10784 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10785 are already deferred.
10786 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10787 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10788 stopped and already has a pending signal to report.
10789 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10790 a pending signal to report or is moving out of a jump pad.
10791 (linux_init_signals): Check for __ANDROID__ rather than
10792 __SIGRTMIN.
10793
b4d51a55
PA
107942010-08-28 Pedro Alves <pedro@codesourcery.com>
10795
10796 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10797 debug_threads check. Avoid a linear search when not doing debug
10798 output.
10799
ec48365d
PA
108002010-08-27 Pedro Alves <pedro@codesourcery.com>
10801
10802 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10803 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10804 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10805 (process_event): Change local fd's type to gdb_fildes_t.
10806 (create_file_handler): Adjust prototype.
10807 (delete_file_handler): Adjust prototype.
10808 (handle_file_event): Adjust prototype. Use pfildes.
10809 (create_file_event): Adjsut prototype.
10810 * remote-utils.c (remote_desc, listen_desc): Change type to
10811 gdb_fildes_t.
10812 * server.h: New gdb_fildes_t typedef.
10813 [USE_WIN32API]: Include winsock2.h.
10814 (delete_file_handler, add_file_handler): Adjust prototypes.
10815 (pfildes): Declare.
10816 * utils.c (pfildes): New.
10817
854d88f0
PA
108182010-08-27 Pedro Alves <pedro@codesourcery.com>
10819
10820 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10821 * configure: Regenerate.
10822
0146f85b
PA
108232010-08-27 Pedro Alves <pedro@codesourcery.com>
10824
10825 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10826 (linux_done_accessing_memory): ... this.
10827 (linux_target_ops): Adjust.
10828 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10829 * nto-low.c (nto_target_ops): Adjust comment.
10830 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10831 * spu-low.c (spu_target_ops): Adjust comment.
10832 * target.h (target_ops): Rename unprepare_to_access_memory field
10833 to done_accessing_memory.
10834 (unprepare_to_access_memory): Rename to ...
10835 (done_accessing_memory): ... this.
10836
90d74c30
PA
108372010-08-26 Pedro Alves <pedro@codesourcery.com>
10838
10839 * linux-low.c (linux_prepare_to_access_memory): New.
10840 (linux_unprepare_to_access_memory): New.
10841 (linux_target_ops): Install them.
10842 * server.c (read_memory): Rename to ...
10843 (gdb_read_memory): ... this. Use
10844 prepare_to_access_memory/prepare_to_access_memory.
10845 (write_memory): Rename to ...
10846 (gdb_write_memory): ... this. Use
10847 prepare_to_access_memory/prepare_to_access_memory.
10848 (handle_search_memory_1): Adjust.
10849 (process_serial_event): Adjust.
10850 * target.h (struct target_ops): New fields
10851 prepare_to_access_memory and unprepare_to_access_memory.
10852 (prepare_to_access_memory, unprepare_to_access_memory): New.
10853 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10854 prepare_to_access_memory/prepare_to_access_memory.
10855 * nto-low.c (nto_target_ops): Adjust.
10856 * spu-low.c (spu_target_ops): Adjust.
10857 * win32-low.c (win32_target_ops): Adjust.
10858
fd467969
PA
108592010-08-26 Pedro Alves <pedro@codesourcery.com>
10860
10861 * Makefile.in (WARN_CFLAGS): Get it from configure.
10862 (WERROR_CFLAGS): New.
10863 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10864 * configure.ac: Introduce --enable-werror, which adds -Werror to
10865 the compiler command line. Enabled by default. Disable with
10866 --disable-werror. Add -Wdeclaration-after-statement
10867 Wpointer-arith and -Wformat-nonliteral to warning flags.
10868 * configure: Regenerate.
10869
331e2f5f
PA
108702010-08-26 Pedro Alves <pedro@codesourcery.com>
10871
10872 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10873
e581f2b4
PA
108742010-08-26 Pedro Alves <pedro@codesourcery.com>
10875
10876 * gdbreplay.c (remote_error): New.
10877 (gdbchar): New.
10878 (expect): Use gdbchar. Check for error reading from GDB.
10879 Clarify sync error output.
10880 (play): Check for errors writing to GDB.
10881 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10882 * remote-utils.c (getpkt): Check for errors writing to the remote
10883 descriptor.
10884
3c11dd79
PA
108852010-08-25 Pedro Alves <pedro@codesourcery.com>
10886
10887 * linux-low.c (linux_wait_1): Move non-debugging code out of
10888 `debug_threads' control.
10889
d20a8ad9
PA
108902010-08-25 Pedro Alves <pedro@codesourcery.com>
10891
10892 * linux-low.c (linux_wait_1): Don't set last_status here.
10893 * server.c (push_event, queue_stop_reply_callback): Assert we're
10894 not pushing a TARGET_WAITKIND_IGNORE event.
10895 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10896 (myresume, handle_target_event): Set the thread's last_resume_kind
10897 and last_status from the target returned status.
10898
964e4306
PA
108992010-08-25 Pedro Alves <pedro@codesourcery.com>
10900
10901 PR threads/10729
10902
10903 * linux-x86-low.c (update_debug_registers_callback): New.
10904 (i386_dr_low_set_addr): Use it.
10905 (i386_dr_low_get_addr): New.
10906 (i386_dr_low_set_control): Use update_debug_registers_callback.
10907 (i386_dr_low_get_control): New.
10908 (i386_dr_low_get_status): Adjust.
10909 * linux-low.c (linux_stop_lwp): New.
10910 * linux-low.h (linux_stop_lwp): Declare.
10911
10912 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10913 argument instead of a i386_debug_reg_state.
10914 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10915 a i386_debug_reg_state.
10916 (i386_insert_aligned_watchpoint): Adjust.
10917 (i386_remove_aligned_watchpoint): Adjust.
10918 (i386_low_stopped_data_address): Read the debug registers from the
10919 inferior instead of from the mirrors.
10920 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10921 (i386_dr_low_get_addr): Declare.
10922 (i386_dr_low_get_control): Declare.
10923 (i386_dr_low_get_status): Change prototype.
10924
10925 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10926 (i386_dr_low_get_addr): New.
10927 (i386_dr_low_get_control): New.
10928 (i386_dr_low_get_status): Adjust prototype. Return
10929 dr_status_mirror.
10930 (i386_initial_stuff): Clear dr_status_mirror and
10931 dr_control_mirror.
10932 (i386_get_thread_context): Adjust.
10933 (i386_set_thread_context): Adjust.
10934 (i386_thread_added): Adjust.
10935
5f21a75b
PA
109362010-08-24 Pedro Alves <pedro@codesourcery.com>
10937
10938 * linux-low.h (linux_thread_area): Delete declaration.
10939
3e4c1235
TS
109402010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10941
10942 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10943 after its termination.
10944
1971b033
PA
109452010-08-09 Pedro Alves <pedro@codesourcery.com>
10946
10947 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10948 (gdb_wants_all_stopped): Delete.
10949 (linux_wait_1): Don't call them.
10950 * server.c (handle_v_cont): Tag all threads as want-stopped.
10951 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10952 stopped as "client-wants-stopped".
10953
310444ac
PA
109542010-07-31 Pedro Alves <pedro@codesourcery.com>
10955
10956 * Makefile.in (signals_h): New.
10957 (server_h): Depend on it.
10958 (server.o): Don't depend on $(signals_def).
10959 (signals.o): Depend on $(signals_def).
10960
a19cae16
JK
109612010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10962
10963 * Makefile.in (signals_def): New.
10964 (server_h): Append include/gdb/signals.h and signals_def.
10965 (server.o): Append signals_def.
10966
30d50328
JK
109672010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10968
10969 * server.c (handle_target_event): Use target_signal_to_host for
10970 resume_info.sig initialization.
10971 * target.h (struct thread_resume) <sig>: New comment.
10972
5c3216e2
OS
109732010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10974
c6f46ca0
OS
10975 * server.c (handle_query): strcpy() the returned string from paddress()
10976 instead of sprintf().
5c3216e2
OS
10977 * utils.c (paddress): Return phex_nz().
10978
6bd31874
JB
109792010-07-07 Joel Brobecker <brobecker@adacore.com>
10980
10981 * server.c (handle_v_cont): Call mourn_inferior if process
10982 just exited.
10983 (myresume): Likewise.
10984
0fb4aa4b
PA
109852010-07-01 Pedro Alves <pedro@codesourcery.com>
10986
10987 Static tracepoints, and integration with UST.
10988
10989 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10990 * mem-break.c (uninsert_all_breakpoints)
10991 (reinsert_all_breakpoints): New.
10992 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10993 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10994 (gdb_agent_ust_loaded, helper_thread_id)
10995 (gdb_agent_helper_thread_id): New macros.
10996 (struct ipa_sym_addresses): Add addr_ust_loaded,
10997 addr_helper_thread_id, addr_cmd_buf.
10998 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10999 (in_process_agent_loaded_ust): New.
11000 (write_e_ust_not_loaded): New.
11001 (maybe_write_ipa_ust_not_loaded): New.
11002 (struct collect_static_trace_data_action): New.
11003 (enum tracepoint_type) <static_tracepoint>: New.
11004 (struct tracepoint) <handle>: Mention static tracepoints.
11005 (struct static_tracepoint_ctx): New.
11006 (CMD_BUF_SIZE): New.
11007 (add_tracepoint_action): Handle static tracepoint actions.
11008 (unprobe_marker_at): New.
11009 (clear_installed_tracepoints): Handle static tracepoints.
11010 (cmd_qtdp): Handle static tracepoints.
11011 (probe_marker_at): New.
11012 (cmd_qtstart): Handle static tracepoints.
11013 (response_tracepoint): Handle static tracepoints.
11014 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11015 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11016 (get_context_regcache): Handle static tracepoints.
11017 (do_action_at_tracepoint): Handle static tracepoint actions.
11018 (traceframe_find_block_type): Handle static trace data blocks.
11019 (traceframe_read_sdata): New.
11020 (download_tracepoints): Download static tracepoint actions.
11021 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11022 (GDB_PROBE_NAME): New.
11023 (ust_ops): New.
11024 (GET_UST_SYM): New.
11025 (USTF): New.
11026 (dlsym_ust): New.
11027 (ust_marker_to_static_tracepoint): New.
11028 (gdb_probe): New.
11029 (collect_ust_data_at_tracepoint): New.
11030 (gdb_ust_probe): New.
11031 (UNIX_PATH_MAX, SOCK_DIR): New.
11032 (gdb_ust_connect_sync_socket): New.
11033 (resume_thread, stop_thread): New.
11034 (run_inferior_command): New.
11035 (init_named_socket): New.
11036 (gdb_ust_socket_init): New.
11037 (cstr_to_hexstr): New.
11038 (next_st): New.
11039 (first_marker, next_marker): New.
11040 (response_ust_marker): New.
11041 (cmd_qtfstm, cmd_qtsstm): New.
11042 (unprobe_marker_at, probe_marker_at): New.
11043 (cmd_qtstmat, gdb_ust_thread): New.
11044 (gdb_ust_init): New.
11045 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11046 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11047 (ST_REGENTRY): New.
11048 (x86_64_st_collect_regmap): New.
11049 (X86_64_NUM_ST_COLLECT_GREGS): New.
11050 (AMD64_RIP_REGNUM): New.
11051 (supply_static_tracepoint_registers): New.
11052 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11053 (ST_REGENTRY): New.
11054 (i386_st_collect_regmap): New.
11055 (i386_NUM_ST_COLLECT_GREGS): New.
11056 (supply_static_tracepoint_registers): New.
11057 * server.c (handle_query): Handle qXfer:statictrace:read.
11058 <qSupported>: Report support for StaticTracepoints, and
11059 qXfer:statictrace:read features.
11060 * server.h (traceframe_read_sdata)
11061 (supply_static_tracepoint_registers): Declare.
11062 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11063 (unpack_varlen_hex): Include in IPA build.
11064 * Makefile.in (ustlibs, ustinc): New.
11065 (IPA_OBJS): Add remote-utils-ipa.o.
11066 ($(IPA_LIB)): Link -ldl and -lpthread.
11067 (UST_CFLAGS): New.
11068 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11069 * config.in, configure: Regenerate.
11070
9e4344e5
PA
110712010-06-20 Ian Lance Taylor <iant@google.com>
11072 Pedro Alves <pedro@codesourcery.com>
11073
11074 * linux-x86-low.c (always_true): Delete.
11075 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11076 trying to fool the compiler with always_true.
11077
c6beb2cb
PA
110782010-06-20 Pedro Alves <pedro@codesourcery.com>
11079
11080 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11081 conditions in gdbserver.
11082
d2ed6730
UW
110832010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11084
11085 * spu-low.c (spu_read_memory): Wrap around local store limit.
11086 (spu_write_memory): Likewise.
11087
4e29fb54
PA
110882010-06-15 Pedro Alves <pedro@codesourcery.com>
11089
11090 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11091 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11092 LONGEST uses.
11093 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11094 uses.
11095 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11096 uses with LONGEST uses.
11097
6a271cae
PA
110982010-06-14 Stan Shebs <stan@codesourcery.com>
11099 Pedro Alves <pedro@codesourcery.com>
11100
11101 Bytecode compiler.
11102
11103 * linux-x86-low.c: Include limits.h.
11104 (add_insns): New.
11105 (always_true): New.
11106 (EMIT_ASM): New.
11107 (EMIT_ASM32): New.
11108 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11109 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11110 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11111 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11112 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11113 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11114 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11115 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11116 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11117 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11118 (amd64_emit_void_call_2): New.
11119 (amd64_emit_ops): New.
11120 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11121 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11122 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11123 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11124 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11125 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11126 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11127 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11128 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11129 (i386_emit_stack_adjust, i386_emit_int_call_1)
11130 (i386_emit_void_call_2): New.
11131 (i386_emit_ops): New.
11132 (x86_emit_ops): New.
11133 (the_low_target): Install x86_emit_ops.
11134 * server.h (struct emit_ops): New.
11135 (get_raw_reg_func_addr): Declare.
11136 (current_insn_ptr, emit_error): Declare.
11137 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11138 (set_trace_state_variable_value): New defines.
11139 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11140 addr_get_trace_state_variable_value and
11141 addr_set_trace_state_variable_value.
11142 (symbol_list): New fields for get_raw_reg,
11143 get_trace_state_variable_value and set_trace_state_variable_value.
11144 (condfn): New typedef.
11145 (struct tracepoint): New field `compiled_cond'.
11146 (do_action_at_tracepoint): Clear compiled_cond.
11147 (get_trace_state_variable_value, set_trace_state_variable_value):
11148 Export in the IPA.
11149 (condition_true_at_tracepoint): If there's a compiled condition,
11150 run that.
11151 (current_insn_ptr, emit_error): New globals.
11152 (struct bytecode_address): New.
11153 (get_raw_reg_func_addr): New.
11154 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11155 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11156 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11157 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11158 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11159 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11160 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11161 (compile_tracepoint_condition, compile_bytecodes): New.
11162 * target.h (emit_ops): Forward declare.
11163 (struct target_ops): New field emit_ops.
11164 (target_emit_ops): New.
11165 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11166 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11167 * linux-low.c (linux_emit_ops): New.
11168 (linux_target_ops): Install it.
11169 * linux-low.h (struct linux_target_ops): New field emit_ops.
11170
92b72907
UW
111712010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11172
11173 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11174 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11175
fa593d66
PA
111762010-06-01 Pedro Alves <pedro@codesourcery.com>
11177 Stan Shebs <stan@codesourcery.com>
11178
11179 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11180 (all): Depend on $(extra_libraries).
11181 (install-only): Install the IPA.
11182 (IPA_OBJS, IPA_LIB): New.
11183 (clean): Remove the IPA lib.
11184 (IPAGENT_CFLAGS): New.
11185 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11186 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11187 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11188 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11189 * configure.ac: Check for atomic builtins support in the compiler.
11190 (IPA_DEPFILES, extra_libraries): Define.
11191 * configure.srv (ipa_obj): Add description.
11192 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11193 (i[34567]86-*-linux*): Set ipa_obj.
11194 (x86_64-*-linux*): Set ipa_obj.
11195 * linux-low.c (stabilizing_threads): New.
11196 (supports_fast_tracepoints): New.
11197 (linux_detach): Stabilize threads before detaching.
11198 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11199 the lwp is either not stabilizing, or is moving out of a jump pad.
11200 (linux_fast_tracepoint_collecting): New.
11201 (maybe_move_out_of_jump_pad): New.
11202 (enqueue_one_deferred_signal): New.
11203 (dequeue_one_deferred_signal): New.
11204 (linux_wait_for_event_1): If moving out of a jump pad, defer
11205 pending signals to later.
11206 (linux_stabilize_threads): New.
11207 (linux_wait_1): Check if threads need moving out of jump pads, and
11208 do it if so.
11209 (stuck_in_jump_pad_callback): New.
11210 (move_out_of_jump_pad_callback): New.
11211 (lwp_running): New.
11212 (linux_resume_one_lwp): Handle moving out of jump pads.
11213 (linux_set_resume_request): Dequeue deferred signals.
11214 (need_step_over_p): Also step over fast tracepoint jumps.
11215 (start_step_over): Also uninsert fast tracepoint jumps.
11216 (finish_step_over): Also reinsert fast tracepoint jumps.
11217 (linux_install_fast_tracepoint_jump): New.
11218 (linux_target_ops): Install linux_stabilize_threads and
11219 linux_install_fast_tracepoint_jump_pad.
11220 * linux-low.h (linux_target_ops) <get_thread_area,
11221 install_fast_tracepoint_jump_pad>: New fields.
11222 (struct lwp_info) <collecting_fast_tracepoint,
11223 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11224 (linux_get_thread_area): Declare.
11225 * linux-x86-low.c (jump_insn): New.
11226 (x86_get_thread_area): New.
11227 (append_insns): New.
11228 (push_opcode): New.
11229 (amd64_install_fast_tracepoint_jump_pad): New.
11230 (i386_install_fast_tracepoint_jump_pad): New.
11231 (x86_install_fast_tracepoint_jump_pad): New.
11232 (the_low_target): Install x86_get_thread_area and
11233 x86_install_fast_tracepoint_jump_pad.
11234 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11235 (struct fast_tracepoint_jump): New.
11236 (fast_tracepoint_jump_insn): New.
11237 (fast_tracepoint_jump_shadow): New.
11238 (find_fast_tracepoint_jump_at): New.
11239 (fast_tracepoint_jump_here): New.
11240 (delete_fast_tracepoint_jump): New.
11241 (set_fast_tracepoint_jump): New.
11242 (uninsert_fast_tracepoint_jumps_at): New.
11243 (reinsert_fast_tracepoint_jumps_at): New.
11244 (set_breakpoint_at): Use write_inferior_memory.
11245 (uninsert_raw_breakpoint): Use write_inferior_memory.
11246 (check_mem_read): Mask out fast tracepoint jumps.
11247 (check_mem_write): Mask out fast tracepoint jumps.
11248 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11249 (set_fast_tracepoint_jump): Declare.
11250 (delete_fast_tracepoint_jump)
11251 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11252 (reinsert_fast_tracepoint_jumps_at): Declare.
11253 * regcache.c: Don't compile many functions when building the
11254 in-process agent library.
11255 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11256 the register buffer in the heap.
11257 (free_register_cache): If the register buffer isn't owned by the
11258 regcache, don't free it.
11259 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11260 pre-existing register caches.
11261 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11262 type.
11263 (convert_ascii_to_int): : Constify `from' parameter type.
11264 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11265 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11266 the needed buffer in-place.
11267 (relocate_instruction): New.
11268 * server.c (handle_query) <qSymbols>: If the target supports
11269 tracepoints, give it a chance of looking up symbols. Report
11270 support for fast tracepoints.
11271 (handle_status): Stabilize threads.
11272 (process_serial_event): Adjust.
11273 * server.h (struct fast_tracepoint_jump): Forward declare.
11274 (struct process_info) <fast_tracepoint_jumps>: New field.
11275 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11276 (decode_X_packet, decode_M_packet): Adjust.
11277 (relocate_instruction): Declare.
11278 (in_process_agent_loaded): Declare.
11279 (tracepoint_look_up_symbols): Declare.
11280 (struct fast_tpoint_collect_status): Declare.
11281 (fast_tracepoint_collecting): Declare.
11282 (force_unlock_trace_buffer): Declare.
11283 (handle_tracepoint_bkpts): Declare.
11284 (initialize_low_tracepoint)
11285 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11286 * target.h (struct target_ops) <stabilize_threads,
11287 install_fast_tracepoint_jump_pad>: New fields.
11288 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11289 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11290 [HAVE_STDINT_H]: Include stdint.h.
11291 (trace_debug_1): Rename to ...
11292 (trace_vdebug): ... this.
11293 (trace_debug): Rename to ...
11294 (trace_debug_1): ... this. Add `level' parameter.
11295 (trace_debug): New.
11296 (ATTR_USED, ATTR_NOINLINE): New.
11297 (IP_AGENT_EXPORT): New.
11298 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11299 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11300 (about_to_request_buffer_space, trace_buffer_is_full)
11301 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11302 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11303 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11304 (traceframe_write_count, traceframes_created)
11305 (trace_state_variables)
11306 New renaming defines.
11307 (struct ipa_sym_addresses): New.
11308 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11309 (symbol_list): New.
11310 (ipa_sym_addrs): New.
11311 (all_tracepoint_symbols_looked_up): New.
11312 (in_process_agent_loaded): New.
11313 (write_e_ipa_not_loaded): New.
11314 (maybe_write_ipa_not_loaded): New.
11315 (tracepoint_look_up_symbols): New.
11316 (debug_threads) [IN_PROCESS_AGENT]: New.
11317 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11318 (UNKNOWN_SIDE_EFFECTS): New.
11319 (stop_tracing): New.
11320 (flush_trace_buffer): New.
11321 (stop_tracing_bkpt): New.
11322 (flush_trace_buffer_bkpt): New.
11323 (read_inferior_integer): New.
11324 (read_inferior_uinteger): New.
11325 (read_inferior_data_pointer): New.
11326 (write_inferior_data_pointer): New.
11327 (write_inferior_integer): New.
11328 (write_inferior_uinteger): New.
11329 (struct collect_static_trace_data_action): Delete.
11330 (enum tracepoint_type): New.
11331 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11332 <actions_str, step_actions, step_actions_str>: Only include in
11333 GDBserver.
fa593d66
PA
11334 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11335 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11336 (tracepoints): Use IP_AGENT_EXPORT.
11337 (last_tracepoint): Don't include in the IPA.
11338 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11339 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11340 (alloced_trace_state_variables): New.
11341 (trace_state_variables): Use IP_AGENT_EXPORT.
11342 (traceframe_t): Delete unused variable.
11343 (circular_trace_buffer): Don't include in the IPA.
11344 (trace_buffer_start): Delete.
11345 (struct trace_buffer_control): New.
11346 (trace_buffer_free): Delete.
11347 (struct ipa_trace_buffer_control): New.
11348 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11349 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11350 New.
11351 (trace_buffer_ctrl): New.
11352 (TRACE_BUFFER_CTRL_CURR): New.
11353 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11354 Reimplement as macros.
11355 (trace_buffer_wrap): Delete.
11356 (traceframe_write_count, traceframe_read_count)
11357 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11358 (struct tracepoint_hit_ctx) <type>: New field.
11359 (struct fast_tracepoint_ctx): New.
11360 (memory_barrier): New.
11361 (cmpxchg): New.
11362 (record_tracepoint_error): Update atomically in the IPA.
11363 (clear_inferior_trace_buffer): New.
11364 (about_to_request_buffer_space): New.
11365 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11366 updating the same buffer.
11367 (add_tracepoint): Default the tracepoint's type to trap
11368 tracepoint, and orig_size to -1.
11369 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11370 internal variables.
11371 (create_trace_state_variable): New parameter `gdb'. Handle it.
11372 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11373 (cmd_qtdp): Handle fast tracepoints.
11374 (cmd_qtdv): Adjust.
11375 (max_jump_pad_size): New.
11376 (gdb_jump_pad_head): New.
11377 (get_jump_space_head): New.
11378 (claim_jump_space): New.
11379 (sort_tracepoints): New.
11380 (MAX_JUMP_SIZE): New.
11381 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11382 IPA.
11383 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11384 support. Upload fast traceframes, and delete internal IPA
11385 breakpoints.
11386 (stop_tracing_handler): New.
11387 (flush_trace_buffer_handler): New.
11388 (cmd_qtstop): Upload fast tracepoints.
11389 (response_tracepoint): Handle fast tracepoints.
11390 (tracepoint_finished_step): Upload fast traceframes. Set the
11391 tracepoint hit context's tracepoint type.
11392 (handle_tracepoint_bkpts): New.
11393 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11394 type. Add comment about fast tracepoints.
11395 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11396 non-existing action_str field.
11397 (get_context_regcache): Handle fast tracepoints.
11398 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11399 to the regcache.
11400 (fast_tracepoint_from_jump_pad_address): New.
11401 (fast_tracepoint_from_ipa_tpoint_address): New.
11402 (collecting_t): New.
11403 (force_unlock_trace_buffer): New.
11404 (fast_tracepoint_collecting): New.
11405 (collecting): New.
11406 (gdb_collect): New.
11407 (write_inferior_data_ptr): New.
11408 (target_tp_heap): New.
11409 (target_malloc): New.
11410 (download_agent_expr): New.
11411 (UALIGN): New.
11412 (download_tracepoints): New.
11413 (download_trace_state_variables): New.
11414 (upload_fast_traceframes): New.
11415 (IPA_FIRST_TRACEFRAME): New.
11416 (IPA_NEXT_TRACEFRAME_1): New.
11417 (IPA_NEXT_TRACEFRAME): New.
11418 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11419 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11420 (gdb_jump_pad_buffer_end): New.
11421 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11422 (initialize_tracepoint): Adjust.
11423 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11424 buffer. Initialize the low module.
11425 * utils.c (PREFIX, TOOLNAME): New.
11426 (malloc_failure): Use PREFIX.
11427 (error): In the IPA, an error causes an exit.
11428 (fatal, warning): Use PREFIX.
11429 (internal_error): Use TOOLNAME.
11430 (NUMCELLS): Increase to 10.
11431 * configure, config.in: Regenerate.
11432
d149dd1d
PA
114332010-06-01 Pedro Alves <pedro@codesourcery.com>
11434
11435 * server.c (handle_query) <qSupported>: Do two passes over the
11436 qSupported string to avoid nesting strtok.
11437
f6528abd
JK
114382010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11439
11440 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11441 (CDEPS): New.
11442 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11443 -Wl,--dynamic-list.
11444 * configure: Regenerate.
11445 * proc-service.list: New.
11446
ca2a87a0
JK
114472010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11448
11449 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11450 New comment.
11451
363a6e9f
OS
114522010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11453
11454 * gdbreplay.c (remote_open): Check error return from socket() call by
11455 its equality to -1 not by it being negative.
11456 * remote-utils.c (remote_open): Likewise.
11457
d23b6cb1
PA
114582010-05-23 Pedro Alves <pedro@codesourcery.com>
11459
11460 * config.h: Regenerate.
11461
28d3cf85
MK
114622010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11463
11464 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11465 doesn't provide PTRACE_GET_THREAD_AREA.
11466
fea36a59
MK
114672010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11468
11469 * linux-m68k-low.c: Include <asm/ptrace.h>
11470 (ps_get_thread_area): Implement.
11471
24b066ba
DE
114722010-05-03 Doug Evans <dje@google.com>
11473
11474 * event-loop.c (struct callback_event): New struct.
11475 (callback_list): New global.
11476 (append_callback_event, delete_callback_event): New functions.
11477 (process_callback): New function.
11478 (start_event_loop): Call it.
11479 * remote-utils.c (NOT_SCHEDULED): Define.
11480 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11481 moved out of readchar.
11482 (readchar): Rewrite. Call reschedule before returning.
11483 (reset_readchar): New function.
11484 (remote_close): Call it.
11485 (process_remaining, reschedule): New functions.
11486 * server.h (callback_handler_func): New typedef.
11487 (append_callback_event, delete_callback_event): Declare.
11488
9836d6ea
PA
114892010-05-03 Pedro Alves <pedro@codesourcery.com>
11490
11491 * proc-service.c (ps_pglobal_lookup): Use
11492 thread_db_look_up_one_symbol.
11493 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11494 parameter. Use it instead of all_symbols_looked_up.
11495 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11496 field.
11497 (all_symbols_looked_up): Don't declare.
11498 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11499 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11500 field.
11501 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11502 Set all_symbols_looked_up here.
11503 (thread_db_look_up_one_symbol): New.
11504 (thread_db_get_tls_address): Adjust.
11505 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11506 thread_db object on the heap, and tentatively set it in the
11507 process structure.
11508 (thread_db_init): Don't set all_symbols_looked_up here.
11509 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11510
7984d532
PA
115112010-05-03 Pedro Alves <pedro@codesourcery.com>
11512
11513 * linux-low.c (linux_kill, linux_detach): Adjust.
11514 (status_pending_p_callback): Remove redundant statement. Check
11515 for !TARGET_WAITIKIND_IGNORE, instead of
11516 TARGET_WAITKIND_STOPPED.
11517 (handle_tracepoints): Make sure LWP is locked. Adjust.
11518 (linux_wait_for_event_1): Adjust.
11519 (linux_cancel_breakpoints): New.
11520 (unsuspend_one_lwp): New.
11521 (unsuspend_all_lwps): New.
11522 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11523 (send_sigstop_callback): Change return type to int, add new
11524 `except' parameter and handle it.
11525 (suspend_and_send_sigstop_callback): New.
11526 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11527 pass them down. If SUSPEND, also increment the lwp's suspend
11528 count.
11529 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11530 (need_step_over_p): Don't consider suspended LWPs.
11531 (start_step_over): Adjust.
11532 (proceed_one_lwp): Change return type to int, add new `except'
11533 parameter and handle it.
11534 (unsuspend_and_proceed_one_lwp): New.
11535 (proceed_all_lwps): Use find_inferior instead of
11536 for_each_inferior.
11537 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11538 also decrement the suspend count of LWPs. Pass `except' down,
11539 instead of hacking its suspend count.
11540 (linux_pause_all): Add `freeze' parameter. Adjust.
11541 (linux_unpause_all): New.
11542 (linux_target_ops): Install linux_unpause_all.
11543 * server.c (handle_status): Adjust.
11544 * target.h (struct target_ops): New fields `unpause_all' and
11545 `cancel_breakpoints'. Add new parameter to `pause_all'.
11546 (pause_all): Add new `freeze' parameter.
11547 (unpause_all): New.
11548 (cancel_breakpoints): New.
11549 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11550 cancel breakpoints.
11551 (cmd_qtstart): Pause threads.
11552 (stop_tracing): Pause threads, and cancel breakpoints.
11553 * win32-low.c (win32_target_ops): Adjust.
11554
e471f25b
PA
115552010-05-03 Pedro Alves <pedro@codesourcery.com>
11556
11557 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11558 the inferior right away from here...
11559 (linux_wait_1): ... to here, and adjust to check the thread's
11560 last_resume_kind instead of the lwp's step or stop_expected flags.
11561
1915ef4f
PA
115622010-05-02 Pedro Alves <pedro@codesourcery.com>
11563
11564 * README: Use consistent `GDB' and `GDBserver' spellings.
11565
f9e39928
PA
115662010-05-02 Pedro Alves <pedro@codesourcery.com>
11567
11568 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11569 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11570 (linux_detach_one_lwp): Assume the lwp is stopped.
11571 (any_thread_of): Delete.
11572 (linux_detach): Stop all lwps here. Don't blindly delete all
11573 breakpoints.
11574 (delete_lwp_callback): New.
11575 (linux_mourn): Delete all lwps of the process that is gone.
11576 (linux_wait_1): Don't delete the last lwp of the process here.
11577 * mem-break.h (mark_breakpoints_out): Declare.
11578 * mem-break.c (mark_breakpoints_out): New.
11579 (free_all_breakpoints): Use it.
11580 * server.c (handle_target_event): If the process is gone, mark
11581 breakpoints out.
11582 * thread-db.c (struct thread_db) <create_bp>: New field.
11583 (thread_db_enable_reporting): Fix prototype. Store a thread event
11584 breakpoint reference in the thread_db struct.
11585 (thread_db_load_search): Clear the thread_db object.
11586 (try_thread_db_load_1): Ditto.
11587 (switch_to_process): New.
11588 (disable_thread_event_reporting): Use it.
11589 (remove_thread_event_breakpoints): New.
11590 (thread_db_detach, thread_db_mourn): Use it.
11591
1e7fc18c
PA
115922010-05-01 Pedro Alves <pedro@codesourcery.com>
11593
11594 * linux-low.c (linux_enable_event_reporting): New.
11595 (linux_wait_for_event_1, handle_extended_wait): Use it.
11596
02fc4de7
PA
115972010-04-30 Pedro Alves <pedro@codesourcery.com>
11598
11599 * linux-low.c (linux_kill_one_lwp, linux_kill)
11600 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11601 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11602 SIGSTOP even if the LWP is stopped.
11603 (send_sigstop_callback): New.
11604 (stop_all_lwps): Use send_sigstop_callback instead.
11605 (linux_resume_one_thread): Adjust.
11606 (proceed_one_lwp): Still proceed an LWP that the client has
11607 requested to stop, if we haven't reported it as stopped yet. Make
11608 sure that LWPs the client want stopped, have a pending SIGSTOP.
11609
bc3b5632
DE
116102010-04-26 Doug Evans <dje@google.com>
11611
ae1ada35
DE
11612 * server.c (handle_general_set): Make static.
11613
bc3b5632
DE
11614 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11615 Print received char after testing for error/eof instead of before.
11616 (input_interrupt): Tweak comment.
11617
65730243
DE
116182010-04-23 Doug Evans <dje@google.com>
11619
11620 * server.c (start_inferior): Print inferior argv if --debug.
11621
a8ae7dc0
AR
116222010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11623
11624 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11625 * nto-x86-low.c: Include server.h
11626
1c07cc19
PM
116272010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11628
11629 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11630 be consistent with other sources of this directory.
11631 (init_registers_amd64): Correct name of source file of this function
11632 in the comment.
11633
e0a61e09
PM
116342010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11635
11636 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11637 64-bit executables.
11638
54709339
PM
116392010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11640
11641 * win32-i386-low.c: Add 64-bit support.
11642 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11643 (init_registers_amd64): Declare.
11644 (mappings): Add 64-bit version of array.
11645 (init_windows_x86): New function.
11646 (the_low_target): Change init_arch field to init_windows_x86.
11647
e8f0053d
PM
116482010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11649
11650 * win32-low.c: Adapt to support also 64-bit architecture.
11651 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11652 (get_image_name): Use SIZE_T type for local variable `done'.
11653 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11654 (toolhelp_get_dll_name): Idem.
11655 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11656 Use uintptr_t typecast to avoid warning.
11657 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11658 (handle_exception): Use phex_nz to avoid warning.
11659 (win32_wait): Remove unused local variable `process'.
11660
c481e77e
PM
116612010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11662
11663 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11664 `amd64-avx.o'.
11665
12ea4b69
PM
116662010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11667
11668 * configure.ac: Use `ws2_32' library for srv_mingw.
11669 * configure: Regenerate.
11670 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11671 * remote-utils.c: Likewise.
11672
f6d1620c
L
116732010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11674
11675 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11676 if __x86_64__ is defined.
11677
8e642873
PM
116782010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11679
11680 * configure: Regenerate.
11681
711e434b
PM
116822010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11683
11684 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11685 * target.h (target_ops): New get_tib_address field.
11686 * win32-low.h (win32_thread_info): Add thread_local_base field.
11687 * win32-low.c (child_add_thread): Add tlb argument.
11688 Set thread_local_base field to TLB.
11689 (get_child_debug_event): Adapt to child_add_thread change.
11690 (win32_get_tib_address): New function.
11691 (win32_target_ops): Set get_tib_address field to
11692 win32_get_tib_address.
11693 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11694
505106cd
PA
116952010-04-12 Pedro Alves <pedro@codesourcery.com>
11696
505106cd
PA
11697 * linux-low.c (linux_mourn): Also remove the process.
11698 * server.c (handle_target_event): Don't remove the process here.
11699 * nto-low.c (nto_mourn): New.
11700 (nto_target_ops): Install it.
11701 * spu-low.c (spu_mourn): New.
11702 (spu_target_ops): Install it.
11703 * win32-low.c (win32_mourn): New.
11704 (win32_target_ops): Install it.
11705
e8470a06
PA
117062010-04-12 Pedro Alves <pedro@codesourcery.com>
11707
11708 * server.h (buffer_xml_printf): Remove redundant `;'.
11709
45ba0d02
PA
117102010-04-12 Pedro Alves <pedro@codesourcery.com>
11711
11712 * regcache.c (set_register_cache): Invalidate regcaches before
11713 changing the register cache layout.
11714 (regcache_invalidate_one): Allow a NULL regcache.
11715 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11716 regcaches before changing the register cache layout or the target
11717 regsets.
11718
59e04013
L
117192010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11720
11721 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11722 variable warning on Linux/x86-64.
11723
8336d594
PA
117242010-04-11 Pedro Alves <pedro@codesourcery.com>
11725
11726 GDBserver disconnected tracing support.
11727
11728 * linux-low.c (linux_remove_process): Delete.
11729 (add_lwp): Don't set last_resume_kind here.
11730 (linux_kill): Use `mourn'.
11731 (linux_detach): Use `thread_db_detach', and `mourn'.
11732 (linux_mourn): New.
11733 (linux_attach_lwp_1): Adjust comment.
11734 (linux_attach): last_resume_kind moved the thread_info; adjust.
11735 (status_pending_p_callback): Adjust.
11736 (linux_wait_for_event_1): Adjust.
11737 (count_events_callback, select_singlestep_lwp_callback)
11738 (select_event_lwp_callback, cancel_breakpoints_callback)
11739 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11740 (proceed_one_lwp): Adjust.
11741 (linux_async): Add debug output.
11742 (linux_thread_stopped): New.
11743 (linux_pause_all): New.
11744 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11745 linux_pause_all.
11746 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11747 (thread_db_free): Delete declaration.
11748 (thread_db_detach, thread_db_mourn): Declare.
11749 * thread-db.c (thread_db_init): Use thread_db_mourn.
11750 (thread_db_free): Delete, split in two.
11751 (disable_thread_event_reporting): New.
11752 (thread_db_detach): New.
11753 (thread_db_mourn): New.
11754
11755 * server.h (struct thread_info) <last_resume_kind>: New field.
11756 <attached>: Add comment.
11757 <gdb_detached>: New field.
11758 (handler_func): Change return type to int.
11759 (handle_serial_event, handle_target_event): Ditto.
11760 (gdb_connected): Declare.
11761 (tracing): Delete.
11762 (disconnected_tracing): Declare.
11763 (stop_tracing): Declare.
11764
11765 * server.c (handle_query) <qSupported>: Report support for
11766 disconnected tracing.
11767 (queue_stop_reply_callback): Account for running threads.
11768 (gdb_wants_thread_stopped): New.
11769 (gdb_wants_all_threads_stopped): New.
11770 (gdb_reattached_process): New.
11771 (handle_status): Clear the `gdb_detached' flag of all processes.
11772 In all-stop, stop all threads.
11773 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11774 (process_serial_event): If the remote connection breaks, or if an
11775 exit was forced with "monitor exit", force an event loop exit.
11776 Handle disconnected tracing on detach.
11777 (handle_serial_event): Adjust.
11778 (handle_target_event): If GDB isn't connected, forward events back
11779 to the inferior, unless the last process exited, in which case,
11780 exit gdbserver. Adjust interface.
11781
11782 * remote-utils.c (remote_open): Don't block in accept. Instead
11783 register an event loop source on the listen socket file
11784 descriptor. Refactor bits into ...
11785 (listen_desc): ... this new global.
11786 (gdb_connected): ... this new function.
11787 (enable_async_notification): ... this new function.
11788 (handle_accept_event): ... this new function.
11789 (remote_close): Clear remote_desc.
11790
11791 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11792
11793 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11794 New fields.
11795 (mourn_inferior): Define.
11796 (target_process_qsupported): Avoid the dangling else problem.
11797 (thread_stopped): Define.
11798 (pause_all): Define.
11799 (target_waitstatus_to_string): Declare.
11800 * target.c (target_waitstatus_to_string): New.
11801
11802 * tracepoint.c (tracing): Make extern.
11803 (disconnected_tracing): New.
11804 (stop_tracing): Make extern. Handle tracing stops due to GDB
11805 disconnecting.
11806 (cmd_qtdisconnected): New.
11807 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11808 (handle_tracepoint_general_set): Handle QTDisconnected.
11809
11810 * event-loop.c (event_handler_func): Change return type to int.
11811 (process_event): Bail out if the event handler wants the event
11812 loop to stop.
11813 (handle_file_event): Ditto.
11814 (start_event_loop): Bail out if the event handler wants the event
11815 loop to stop.
11816
11817 * nto-low.c (nto_target_ops): Adjust.
11818 * spu-low.c (spu_wait): Don't remove the process here.
11819 (spu_target_ops): Adjust.
11820 * win32-low.c (win32_wait): Don't remove the process here.
11821 (win32_target_ops): Adjust.
11822
5d267c4c
PA
118232010-04-11 Pedro Alves <pedro@codesourcery.com>
11824
11825 * regcache.c (realloc_register_cache): Invalidate inferior's
11826 regcache before recreating it.
11827
623ccd72
PA
118282010-04-09 Pedro Alves <pedro@codesourcery.com>
11829
11830 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11831
219f2f23
PA
118322010-04-09 Stan Shebs <stan@codesourcery.com>
11833 Pedro Alves <pedro@codesourcery.com>
11834
11835 * server.h (LONGEST): New.
11836 (struct thread_info) <while_stepping>: New field.
11837 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11838 Declare.
11839 (initialize_tracepoint, handle_tracepoint_general_set)
11840 (handle_tracepoint_query, tracepoint_finished_step)
11841 (tracepoint_was_hit, release_while_stepping_state_list):
11842 (current_traceframe): Declare.
11843 * server.c (handle_general_set): Handle tracepoint packets.
11844 (read_memory): New.
11845 (write_memory): New.
11846 (handle_search_memory_1): Use read_memory.
11847 (handle_query): Report support for conditional tracepoints, trace
11848 state variables, and tracepoint sources. Handle tracepoint
11849 queries.
11850 (main): Initialize the tracepoints module.
11851 (process_serial_event): Handle traceframe reads/writes.
11852
11853 * linux-low.c (handle_tracepoints): New.
11854 (linux_wait_1): Call it.
11855 (linux_resume_one_lwp): Handle while-stepping.
11856 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11857 (linux_target_ops): Install them.
11858 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11859 New field.
11860 * linux-x86-low.c (x86_supports_tracepoints): New.
11861 (the_low_target). Install it.
11862
11863 * mem-break.h (delete_breakpoint): Declare.
11864 * mem-break.c (delete_breakpoint): Make external.
11865
11866 * target.h (struct target_ops): Add `supports_tracepoints',
11867 `read_pc', and `write_pc' fields.
11868 (target_supports_tracepoints): Define.
11869 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11870 (phex_nz): New.
11871
11872 * regcache.h (struct regcache) <registers_owned>: New field.
11873 (init_register_cache, regcache_cpy): Declare.
11874 (regcache_read_pc, regcache_write_pc): Declare.
11875 (register_cache_size): Declare.
11876 (supply_regblock): Declare.
11877 * regcache.c (init_register_cache): New.
11878 (new_register_cache): Use it.
11879 (regcache_cpy): New.
11880 (register_cache_size): New.
11881 (supply_regblock): New.
11882 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11883
219f2f23
PA
11884 * tracepoint.c: New.
11885
11886 * Makefile.in (OBS): Add tracepoint.o.
11887 (tracepoint.o): New rule.
11888
3a13a53b
L
118892010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11890
11891 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11892 (i386-mmx.o): New.
11893 (i386-mmx.c): Likewise.
11894 (i386-mmx-linux.o): Likewise.
11895 (i386-mmx-linux.c): Likewise.
11896
11897 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11898 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11899 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11900 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11901
11902 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11903 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11904 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11905
1570b33e
L
119062010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11907
11908 * Makefile.in (clean): Updated.
11909 (i386-avx.o): New.
11910 (i386-avx.c): Likewise.
11911 (i386-avx-linux.o): Likewise.
11912 (i386-avx-linux.c): Likewise.
11913 (amd64-avx.o): Likewise.
11914 (amd64-avx.c): Likewise.
11915 (amd64-avx-linux.o): Likewise.
11916 (amd64-avx-linux.c): Likewise.
11917
11918 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11919 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11920 (srv_amd64_regobj): Add amd64-avx.o.
11921 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11922 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11923 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11924 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11925 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11926 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11927 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11928
11929 * i387-fp.c: Include "i386-xstate.h".
11930 (i387_xsave): New.
11931 (i387_cache_to_xsave): Likewise.
11932 (i387_xsave_to_cache): Likewise.
11933 (x86_xcr0): Likewise.
11934
11935 * i387-fp.h (i387_cache_to_xsave): Likewise.
11936 (i387_xsave_to_cache): Likewise.
11937 (x86_xcr0): Likewise.
11938
11939 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11940 * linux-crisv32-low.c (target_regsets): Likewise.
11941 * linux-m68k-low.c (target_regsets): Likewise.
11942 * linux-mips-low.c (target_regsets): Likewise.
11943 * linux-ppc-low.c (target_regsets): Likewise.
11944 * linux-s390-low.c (target_regsets): Likewise.
11945 * linux-sh-low.c (target_regsets): Likewise.
11946 * linux-sparc-low.c (target_regsets): Likewise.
11947 * linux-xtensa-low.c (target_regsets): Likewise.
11948
11949 * linux-low.c: Include <sys/uio.h>.
11950 (regsets_fetch_inferior_registers): Support nt_type.
11951 (regsets_store_inferior_registers): Likewise.
11952 (linux_process_qsupported): New.
11953 (linux_target_ops): Add linux_process_qsupported.
11954
11955 * linux-low.h (regset_info): Add nt_type.
11956 (linux_target_ops): Add process_qsupported.
11957
11958 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11959 and <sys/uio.h>.
11960 (init_registers_i386_avx_linux): New.
11961 (init_registers_amd64_avx_linux): Likewise.
11962 (xmltarget_i386_linux_no_xml): Likewise.
11963 (xmltarget_amd64_linux_no_xml): Likewise.
11964 (PTRACE_GETREGSET): Likewise.
11965 (PTRACE_SETREGSET): Likewise.
11966 (x86_fill_xstateregset): Likewise.
11967 (x86_store_xstateregset): Likewise.
11968 (use_xml): Likewise.
11969 (x86_linux_update_xmltarget): Likewise.
11970 (x86_linux_process_qsupported): Likewise.
11971 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11972 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11973 init_registers_i386_linux here. Call
11974 x86_linux_update_xmltarget.
11975 (the_low_target): Add x86_linux_process_qsupported.
11976
11977 * server.c (handle_query): Call target_process_qsupported.
11978
11979 * target.h (target_ops): Add process_qsupported.
11980 (target_process_qsupported): New.
11981
fc7238bb
PA
119822010-04-03 Pedro Alves <pedro@codesourcery.com>
11983
11984 * inferiors.c (add_thread): Set last_status kind to
11985 TARGET_WAITKIND_IGNORE.
11986 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11987 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11988 (linux_wait_1): Move `thread' local definition to block that uses
11989 it. Don't NULL initialize `event_child'.
11990 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11991 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11992 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11993
bdabb078
PA
119942010-04-01 Pedro Alves <pedro@codesourcery.com>
11995
11996 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11997 an extended waitstatus, or by a watchpoint.
11998 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11999 thread was stepping or has been stopped by a watchpoint.
12000
d3bbe7a0
PA
120012010-04-01 Pedro Alves <pedro@codesourcery.com>
12002
12003 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12004 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12005 of another, then delete the previous, and validate all
12006 breakpoints.
12007 (validate_inserted_breakpoint): New.
12008 (delete_disabled_breakpoints): New.
12009 (validate_breakpoints): New.
12010 (check_mem_read): Validate breakpoints before trusting their
12011 shadow. Delete disabled breakpoints.
12012 (check_mem_write): Validate breakpoints before trusting they
12013 should be inserted. Delete disabled breakpoints.
12014 * mem-break.h (validate_breakpoints):
12015 * server.c (handle_query): Validate breakpoints when we see a
12016 qSymbol query.
12017
8b07ae33
PA
120182010-04-01 Pedro Alves <pedro@codesourcery.com>
12019
12020 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12021 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12022 if we could tell there's a GDB breakpoint at stop_pc.
12023 (need_step_over_p): Don't do a step over if we find a GDB
12024 breakpoint at the resume PC.
12025
12026 * mem-break.c (struct raw_breakpoint): New.
12027 (enum bkpt_type): New type `gdb_breakpoint'.
12028 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12029 fields. New field `raw'.
12030 (find_raw_breakpoint_at): New.
12031 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12032 breakpoint instead.
12033 (set_breakpoint_at): Adjust.
12034 (delete_raw_breakpoint): New.
12035 (release_breakpoint): New.
12036 (delete_breakpoint): Rename to...
12037 (delete_breakpoint_1): ... this. Add proc parameter. Use
12038 release_breakpoint. Return ENOENT.
12039 (delete_breakpoint): Reimplement.
12040 (find_breakpoint_at): Delete.
12041 (find_gdb_breakpoint_at): New.
12042 (delete_breakpoint_at): Delete.
12043 (set_gdb_breakpoint_at): New.
12044 (delete_gdb_breakpoint_at): New.
12045 (gdb_breakpoint_here): New.
12046 (set_reinsert_breakpoint): Use release_breakpoint.
12047 (uninsert_breakpoint): Rename to ...
12048 (uninsert_raw_breakpoint): ... this.
12049 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12050 (reinsert_raw_breakpoint): Change parameter type to
12051 raw_breakpoint.
12052 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12053 instead.
12054 (check_breakpoints): Adjust. Use release_breakpoint.
12055 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12056 (breakpoint_inserted_here): Ditto.
12057 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12058 Don't trust the breakpoint's shadow if it is not inserted.
12059 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12060 (delete_all_breakpoints): Adjust.
12061 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12062 use delete_breakpoint_1.
12063
12064 * mem-break.h (breakpoints_supported): Delete declaration.
12065 (set_gdb_breakpoint_at): Declare.
12066 (gdb_breakpoint_here): Declare.
12067 (delete_breakpoint_at): Delete.
12068 (delete_gdb_breakpoint_at): Declare.
12069
12070 * server.h (struct raw_breakpoint): Forward declare.
12071 (struct process_info): New field `raw_breakpoints'.
12072
12073 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12074 breakpoints.
12075
6bf5e0ba
PA
120762010-03-24 Pedro Alves <pedro@codesourcery.com>
12077
12078 * linux-low.c (status_pending_p_callback): Fix comment.
12079 (linux_wait_for_event_1): Move most of the internal breakpoint
12080 handling from here...
12081 (linux_wait_1): ... to here.
12082 (count_events_callback): New.
12083 (select_singlestep_lwp_callback): New.
12084 (select_event_lwp_callback): New.
12085 (cancel_breakpoints_callback): New.
12086 (select_event_lwp): New.
12087 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12088 priority to all LWPs that have had events that should be reported
12089 to the client. Cancel breakpoints when about to reporting the
12090 event to the client, not while stopping lwps. No longer cancel
12091 finished single-steps here.
12092 (cancel_finished_single_step): Delete.
12093 (cancel_finished_single_steps): Delete.
12094
414a389f
PA
120952010-03-24 Pedro Alves <pedro@codesourcery.com>
12096
12097 * mem-break.c (enum bkpt_type): New.
12098 (struct breakpoint): New field `type'.
12099 (set_breakpoint_at): Change return type to struct breakpoint
12100 pointer. Set type to `other_breakpoint' by default.
12101 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12102 in the breakpoint list.
12103 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12104 (reinsert_breakpoint): Rename to ...
12105 (reinsert_raw_breakpoint): ... this.
12106 (reinsert_breakpoints_at): Adjust.
12107 * mem-break.h (struct breakpoint): Declare.
12108 (set_breakpoint_at): Change return type to struct breakpoint
12109 pointer.
12110
2280c721
PA
121112010-03-24 Pedro Alves <pedro@codesourcery.com>
12112
12113 * server.c (handle_query): Assign, not compare.
12114
d50171e4
PA
121152010-03-24 Pedro Alves <pedro@codesourcery.com>
12116
12117 Teach linux gdbserver to step-over-breakpoints.
12118
12119 * linux-low.c (can_hardware_single_step): New.
12120 (supports_breakpoints): New.
12121 (handle_extended_wait): If stopping threads, read the stop pc of
12122 the new cloned LWP.
12123 (get_pc): New.
12124 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12125 low target doesn't support retrieving the PC.
12126 (add_lwp): Set last_resume_kind to resume_continue.
12127 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12128 (linux_attach): Don't clear stop_expected. Set the lwp's
12129 last_resume_kind to resume_stop.
12130 (linux_detach_one_lwp): Don't check for removed breakpoints.
12131 (check_removed_breakpoint): Delete.
12132 (status_pending_p): Rename to ...
12133 (status_pending_p_callback): ... this. Don't check for removed
12134 breakpoints. Don't consider threads that are stopped from GDB's
12135 perspective.
12136 (linux_wait_for_lwp): Always read the stop_pc here.
12137 (cancel_breakpoint): New.
12138 (step_over_bkpt): New global.
12139 (linux_wait_for_event_1): Implement stepping over breakpoints.
12140 (gdb_wants_lwp_stopped): New.
12141 (gdb_wants_all_stopped): New.
12142 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12143 single-step traps here. Store the thread's last reported target
12144 wait status.
12145 (send_sigstop): Don't clear stop_expected. Always set it,
12146 instead.
12147 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12148 (cancel_finished_single_step): New.
12149 (cancel_finished_single_steps): New.
12150 (wait_for_sigstop): Don't cancel finished single-step traps here.
12151 (linux_resume_one_lwp): Don't check for removed breakpoints.
12152 Don't set `step' on non-hardware step archs.
12153 (linux_set_resume_request): Ignore resume_stop requests if already
12154 stopping or stopped. Set the lwp's last_resume_kind.
12155 (resume_status_pending_p): Don't check for removed breakpoints.
12156 (need_step_over_p): New.
12157 (start_step_over): New.
12158 (finish_step_over): New.
12159 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12160 requests. Clear the thread's last reported target waitstatus.
12161 Don't use the `suspended' flag. Don't consider pending breakpoints.
12162 (linux_resume): Start a step-over if necessary.
12163 (proceed_one_lwp): New.
12164 (proceed_all_lwps): New.
12165 (unstop_all_lwps): New.
12166 * linux-low.h (struct lwp_info): Rewrite comment for the
12167 `suspended' flag. Add the `stop_pc' field. Delete the
12168 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12169 Add `'last_resume_kind' and `need_step_over' fields.
12170 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12171 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12172 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12173 (set_raw_breakpoint_at): New.
12174 (set_breakpoint_at): Rewrite to use it.
12175 (reinsert_breakpoint_handler): Delete.
12176 (set_reinsert_breakpoint): New.
12177 (reinsert_breakpoint_by_bp): Delete.
12178 (delete_reinsert_breakpoints): New.
12179 (uninsert_breakpoint): Rewrite.
12180 (uninsert_breakpoints_at): New.
12181 (reinsert_breakpoint): Rewrite.
12182 (reinsert_breakpoints_at): New.
12183 (check_breakpoints): Rewrite.
12184 (breakpoint_here): New.
12185 (breakpoint_inserted_here): New.
12186 (check_mem_read): Adjust.
12187 * mem-break.h (breakpoints_supported, breakpoint_here)
12188 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12189 (reinsert_breakpoint_by_bp): Delete declaration.
12190 (delete_reinsert_breakpoints): Declare.
12191 (reinsert_breakpoint): Delete declaration.
12192 (reinsert_breakpoints_at): Declare.
12193 (uninsert_breakpoint): Delete declaration.
12194 (uninsert_breakpoints_at): Declare.
12195 (check_breakpoints): Adjust prototype.
12196 * server.h: Adjust include order.
12197 (struct thread_info): Declare here. Add a `last_status' field.
12198
30ba68cb
MS
121992010-03-23 Michael Snyder <msnyder@vmware.com>
12200
12201 * server.c (crc32): New function.
12202 (handle_query): Add handling for 'qCRC:' request.
12203
b9a881c2
PA
122042010-03-23 Pedro Alves <pedro@codesourcery.com>
12205
12206 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12207 lwp had been stopped by a watchpoint.
12208
e92d13d5
PA
122092010-03-16 Pedro Alves <pedro@codesourcery.com>
12210
12211 * server.h (internal_error): Declare.
12212 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12213 * utils.c (internal_error): New function.
12214
64daa791
AS
122152010-03-15 Andreas Schwab <schwab@redhat.com>
12216
12217 * configure.srv: Fix typo setting srv_regobj.
12218
f52cd8cd
PA
122192010-03-15 Pedro Alves <pedro@codesourcery.com>
12220
12221 * linux-low.c (fetch_register): Avoid passing a non string literal
12222 format to `error'.
12223 (usr_store_inferior_registers): Ditto.
12224
93ae6fdc
PA
122252010-03-14 Pedro Alves <pedro@codesourcery.com>
12226
12227 * linux-low.c (linux_write_memory): Bail out early if peeking
12228 memory failed.
12229
c3adc08c
PA
122302010-03-14 Pedro Alves <pedro@codesourcery.com>
12231
12232 * linux-low.h (struct lwp_info): New fields
12233 `stopped_by_watchpoint' and `stopped_data_address'.
12234 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12235 here, and cache them in the lwp object.
12236 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12237 directly.
12238 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12239 field.
12240 (linux_stopped_by_watchpoint): Rewrite.
12241 (linux_stopped_data_address): Rewrite.
12242
bce522a2
PA
122432010-03-06 Simo Melenius <simo.melenius@iki.fi>
12244
12245 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12246 switching the current inferior, not before.
12247
90884b2b
L
122482010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12249
12250 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12251 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12252 i386-linux.c and amd64-linux.c.
12253 (reg-i386.o): Removed.
12254 (reg-i386.c): Likewise.
12255 (reg-i386-linux.o): Likewise.
12256 (reg-i386-linux.c): Likewise.
12257 (reg-x86-64.o): Likewise.
12258 (reg-x86-64.c): Likewise.
12259 (reg-x86-64-linux.o): Likewise.
12260 (reg-x86-64-linux.c): Likewise.
12261 (i386.o): New.
12262 (i386.c): Likewise.
12263 (i386-linux.o): Likewise.
12264 (i386-linux.c): Likewise.
12265 (amd64.o): Likewise.
12266 (amd64.c): Likewise.
12267 (amd64-linux.o): Likewise.
12268 (amd64-linux.c): Likewise.
12269
12270 * configure.srv (srv_i386_regobj): New.
12271 (srv_i386_linux_regobj): Likewise.
12272 (srv_amd64_regobj): Likewise.
12273 (srv_amd64_linux_regobj): Likewise.
12274 (srv_i386_32bit_xmlfiles): Likewise.
12275 (srv_i386_64bit_xmlfiles): Likewise.
12276 (srv_i386_xmlfiles): Likewise.
12277 (srv_amd64_xmlfiles): Likewise.
12278 (srv_i386_linux_xmlfiles): Likewise.
12279 (srv_amd64_linux_xmlfiles): Likewise.
12280 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12281 srv_xmlfiles to $srv_i386_xmlfiles.
12282 (i[34567]86-*-mingw32ce*): Likewise.
12283 (i[34567]86-*-mingw*): Likewise.
12284 (i[34567]86-*-nto*): Likewise.
12285 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12286 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12287 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12288 (x86_64-*-linux*): Likewise.
12289
12290 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12291 (init_registers_amd64_linux): New.
12292 (x86_arch_setup): Replace init_registers_x86_64_linux with
12293 init_registers_amd64_linux.
12294
193f13e6
MK
122952010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12296
12297 * configure.ac: Check for libdl. If it is not available link against
12298 static libthread_db.
12299 * configure: Regenerate.
12300
85d721b8
PA
123012010-02-22 Pedro Alves <pedro@codesourcery.com>
12302
12303 PR9605
12304
12305 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12306 handing a read watchpoint.
12307 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12308
6076632b
DE
123092010-02-12 Doug Evans <dje@google.com>
12310
12311 * linux-low.c (linux_supports_tracefork_flag): Document.
12312 (linux_look_up_symbols): Add comment.
12313
3327ccf7
L
123142010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12315
12316 * regcache.c (supply_register): Clear regcache if buf is NULL.
12317
0718675c 123182010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12319 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12320
12321 * inferiors.c (find_inferior): Add function documentation.
12322 (unloaded_dll): Handle the case where the unloaded dll has not
12323 been previously registered in the dll list.
12324
177321bd
DJ
123252010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12326
12327 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12328 (thumb2_breakpoint): New.
12329 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12330
2b009048
DJ
123312010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12332
12333 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12334 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12335 breakpoints.
12336
3be029c7
PA
123372010-01-21 Pedro Alves <pedro@codesourcery.com>
12338
12339 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12340
18f5de3b
JK
123412010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12342
12343 * linux-s390-low.c (s390_collect_ptrace_register)
12344 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12345
3743bb4f
DE
123462010-01-21 Doug Evans <dje@google.com>
12347
14ce3065
DE
12348 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12349 (PTRACE_ARG4_TYPE): New macro.
12350 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12351 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12352 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12353 (usr_store_inferior_registers): Ditto.
12354 (linux_read_memory, linux_write_memory): Ditto.
12355 (linux_test_for_tracefork): Ditto.
12356
3743bb4f
DE
12357 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12358 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12359
8b315be5
PA
123602010-01-21 Pedro Alves <pedro@codesourcery.com>
12361
12362 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12363 target.
12364
85492558
PA
123652010-01-21 Pedro Alves <pedro@codesourcery.com>
12366
12367 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12368 prototype to take a regcache. Adjust.
12369
442ea881
PA
123702010-01-20 Pedro Alves <pedro@codesourcery.com>
12371
12372 * regcache.h (struct thread_info): Forward declare.
12373 (struct regcache): New.
12374 (new_register_cache): Adjust prototype.
12375 (get_thread_regcache): Declare.
12376 (free_register_cache): Adjust prototype.
12377 (registers_to_string, registers_from_string): Ditto.
12378 (supply_register, supply_register_by_name, collect_register)
12379 (collect_register_as_string, collect_register_by_name): Ditto.
12380 * regcache.c (struct inferior_regcache_data): Delete.
12381 (get_regcache): Rename to ...
12382 (get_thread_regcache): ... this. Adjust. Switch inferior before
12383 fetching registers.
12384 (regcache_invalidate_one): Adjust.
12385 (regcache_invalidate): Fix prototype.
12386 (new_register_cache): Return the new register cache.
12387 (free_register_cache): Change prototype.
12388 (realloc_register_cache): Adjust.
12389 (registers_to_string): Change prototype to take a regcache. Adjust.
12390 (registers_from_string): Ditto.
12391 (register_data): Ditto.
12392 (supply_register): Ditto.
12393 (supply_register_by_name): Ditto.
12394 (collect_register): Ditto.
12395 (collect_register_as_string): Ditto.
12396 (collect_register_by_name): Ditto.
12397 * server.c (process_serial_event): Adjust.
12398 * linux-low.h (regset_fill_func, regset_store_func): Change
12399 prototype.
12400 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12401 Change prototype.
12402 * linux-low.c (get_stop_pc): Adjust.
12403 (check_removed_breakpoint): Adjust.
12404 (linux_wait_for_event): Adjust.
12405 (linux_resume_one_lwp): Adjust.
12406 (fetch_register): Add regcache parameter. Adjust.
12407 (usr_store_inferior_registers): Ditto.
12408 (regsets_fetch_inferior_registers): Ditto.
12409 (regsets_store_inferior_registers): Ditto.
12410 (linux_fetch_registers, linux_store_registers): Ditto.
12411 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12412 regcache. Adjust.
43aaf8b6
PA
12413 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12414 Ditto.
442ea881
PA
12415 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12416 prototype to take a regcache.
12417 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12418 * remote-utils.c (convert_ascii_to_int, outreg)
12419 (prepare_resume_reply): Change prototype to take a regcache.
12420 Adjust.
12421 * target.h (struct target_ops) <fetch_registers, store_registers>:
12422 Change prototype to take a regcache.
12423 (fetch_inferior_registers, store_inferior_registers): Change
12424 prototype to take a regcache. Adjust.
12425 * proc-service.c (ps_lgetregs): Adjust.
12426 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12427 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12428 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12429 take a regcache. Adjust.
12430 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12431 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12432 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12433 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12434 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12435 (cris_cannot_fetch_register):
12436 (cris_breakpoint_at): Change prototype to take a regcache.
12437 Adjust.
12438 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12439 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12440 to take a regcache. Adjust.
12441 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12442 Adjust.
12443 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12444 take a regcache. Adjust.
12445 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12446 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12447 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12448 * linux-mips-low.c (mips_get_pc):
12449 (mips_set_pc): Change prototype to take a regcache. Adjust.
12450 (mips_reinsert_addr): Adjust.
12451 (mips_collect_register): Change prototype to take a regcache.
12452 Adjust.
12453 (mips_supply_register):
12454 (mips_collect_register_32bit, mips_supply_register_32bit)
12455 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12456 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12457 * linux-ppc-low.c (ppc_supply_ptrace_register)
12458 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12459 (parse_spufs_run): Adjust.
12460 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12461 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12462 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12463 take a regcache. Adjust.
12464 * linux-s390-low.c (s390_collect_ptrace_register)
12465 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12466 (s390_set_pc): Change prototype to take a regcache. Adjust.
12467 (s390_arch_setup): Adjust.
12468 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12469 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12470 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12471 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12472 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12473 regcache. Adjust.
12474 (sparc_breakpoint_at): Adjust.
12475 * linux-xtensa-low.c (xtensa_fill_gregset):
12476 (xtensa_store_gregset):
12477 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12478 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12479 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12480 prototype to take a regcache. Adjust.
12481 * win32-arm-low.c (arm_fetch_inferior_register)
12482 (arm_store_inferior_register): Change prototype to take a
12483 regcache. Adjust.
12484 * win32-i386-low.c (i386_fetch_inferior_register)
12485 (i386_store_inferior_register): Change prototype to take a
12486 regcache. Adjust.
12487 * win32-low.c (child_fetch_inferior_registers)
12488 (child_store_inferior_registers): Change prototype to take a
12489 regcache. Adjust.
12490 (win32_wait): Adjust.
12491 (win32_fetch_inferior_registers): Change prototype to take a
12492 regcache. Adjust.
12493 (win32_store_inferior_registers): Adjust.
12494 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12495 store_inferior_register>: Change prototype to take a regcache.
12496
60c3d7b0
DE
124972010-01-20 Doug Evans <dje@google.com>
12498
12499 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12500 #ifdef.
12501 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12502 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12503
dc146f7c
VP
125042010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12505
12506 * linux-low.c (linux_core_of_thread): New.
12507 (compare_ints, show_process, list_threads): New.
12508 (linux_qxfer_osdata): Report threads and cores.
12509 (linux_target_op): Register linux_core_of_thread.
12510 * remote-utils.c (prepare_resume_reply): Report the core.
12511 (buffer_xml_printf): Support %d specifier.
12512 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12513 New.
12514 (handle_query): Handle qXfer:threads. Announce availability
12515 thereof.
12516 * target.h (struct target_ops): New field core_of_thread.
12517
7803799a
UW
125182010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12519
12520 * Makefile.in (clean): Remove new generated files.
12521 (reg-s390.o, reg-s390.c): Remove rules.
12522 (reg-s390x.o, reg-s390x.c): Likewise.
12523 (s390-linux32.o, s390-linux32.c): Add rules.
12524 (s390-linux64.o, s390-linux64.c): Likewise.
12525 (s390x-linux64.o, s390x-linux64.c): Likewise.
12526 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12527 * linux-s390-low.c: Include <elf.h>.
12528 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12529 (init_registers_s390): Remove prototype.
12530 (init_registers_s390x): Likewise.
12531 (init_registers_s390_linux32): Add prototype.
12532 (init_registers_s390_linux64): Likewise.
12533 (init_registers_s390x_linux64): Likewise.
12534 (s390_num_regs_3264): New define.
12535 (s390_regmap_3264): New global variable.
12536 (s390_cannot_fetch_register): Remove obsolete check.
12537 (s390_cannot_store_register): Likewise.
12538 (s390_collect_ptrace_register): Handle upper/lower register halves.
12539 (s390_supply_ptrace_register): Likewise.
12540 (s390_fill_gregset): Update to register number changes.
12541 (s390_get_hwcap): New routine.
12542 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12543 Install appropriate regmap and register set.
12544
6e7ffa39
JB
125452010-01-01 Joel Brobecker <brobecker@adacore.com>
12546
12547 * server.c (gdbserver_version): Update copyright year to 2010.
12548 * gdbreplay.c (gdbreplay_version): Likewise.
12549
957f3f49
DE
125502009-12-28 Doug Evans <dje@google.com>
12551
12552 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12553 elf/external.h. Include <elf.h> instead but only if necessary.
12554
ca5c370d
PA
125552009-12-28 Pedro Alves <pedro@codesourcery.com>
12556
12557 * linux-low.c (linux_remove_process): Remove `detaching'
12558 parameter. Don't release/detach from thread_db here.
12559 (linux_kill): Release/detach from thread_db here, ...
12560 (linux_detach): ... and here, before actually detaching.
12561 (linux_wait_1): ... and here, when a process exits.
12562 * thread-db.c (any_thread_of): New.
12563 (thread_db_free): Switch the current inferior to a thread of the
12564 passed in process.
12565
4ee62156
DE
125662009-12-21 Doug Evans <dje@google.com>
12567
d90e6a88
DE
12568 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12569
c5f62d5f
DE
12570 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12571 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12572 warning ifndef __NR_tkill. Move setting of errno there too.
12573 Delete unnecessary resetting of errno after syscall.
12574 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12575
10e86dd7
DE
12576 * configure.ac: Check for dladdr.
12577 * config.in: Regenerate.
12578 * configure: Regenerate.
12579 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12580 (try_thread_db_load): Update.
12581
4ee62156
DE
12582 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12583
00f515da
DE
125842009-12-18 Doug Evans <dje@google.com>
12585
e9464885
DE
12586 * event-loop.c: Include unistd.h if it exists.
12587
07d4f67e
DE
12588 * linux-low.c (my_waitpid): Move definition away from being in
12589 between linux_tracefork_child/linux_test_for_tracefork.
12590
00f515da
DE
12591 * gdb_proc_service.h (psaddr_t): Fix type.
12592 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12593 signature to match glibc.
12594
1de1badb
DE
125952009-12-16 Doug Evans <dje@google.com>
12596
12597 * linux-low.c (linux_read_memory): Fix argument to read.
12598
aeeb81d1
PA
125992009-11-26 Pedro Alves <pedro@codesourcery.com>
12600
12601 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12602 events, don't leave current_inferior pointing at null.
12603
10357975
PA
126042009-11-26 Pedro Alves <pedro@codesourcery.com>
12605
12606 * win32-low.c (LOG): Delete.
12607 (OUTMSG): Output to stderr.
12608 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12609 on compile time LOG macro.
12610 (win32_wait): Fix debug output.
12611
cf6e3471
PA
126122009-11-26 Pedro Alves <pedro@codesourcery.com>
12613
12614 * win32-low.c (win32_add_one_solib): If the dll name is
12615 "ntdll.dll", prepend the system directory to the dll path.
12616
0c85e18e
MK
126172009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12618
12619 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12620
9ac544ce 126212009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12622 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12623
12624 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12625 * configure.ac: Check for __mcoldfire__ and set
12626 gdb_cv_m68k_is_coldfire.
12627 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12628 reg-cf.o and reg-m68k.o.
12629 * configure: Regenerated.
12630
fd7dd3e6
PA
126312009-11-16 Pedro Alves <pedro@codesourcery.com>
12632
12633 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12634 Pass it to thread_db_free.
12635 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12636 proper `detaching' argument to linux_remove_process.
12637 * linux-low.h (thread_db_free): Add `detaching' parameter.
12638 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12639 to thread_db_free.
12640 (thread_db_free): Add `detaching' parameter. Only
12641 call td_ta_clear_event if detaching from process.
12642
75aa492e
MK
126432009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12644
12645 * thread-db.c (thread_db_free): Fix typo.
12646
21e1bee4
PP
126472009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12648
12649 PR gdb/10838
12650 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12651
8838b45e
NS
126522009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12653
12654 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12655 with an i686 compiler.
12656 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12657 needed.
12658 * configure: Rebuilt.
12659
8a35fb51
SL
126602009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12661
12662 PR gdb/10783
12663
12664 * server.c (handle_search_memory_1): Correct read_addr initialization
12665 in loop for searching subsequent chunks.
12666
96f15937
PP
126672009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12668
12669 * configure.ac: New --with-libthread-db option.
12670 * thread-db.c: Allow direct dependence on libthread_db.
12671 (thread_db_free): Adjust.
12672 * config.in: Regenerate.
12673 * configure: Likewise.
889bf7c5 12674
5f7d1694
PP
126752009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12676
12677 PR gdb/10757
12678 * thread-db.c (attach_thread): New function.
12679 (maybe_attach_thread): Return success/failure.
12680 (find_new_threads_callback): Adjust.
889bf7c5
PA
12681 (thread_db_find_new_threads): Loop until no new threads.
12682
88e3b899
PA
126832009-10-13 Pedro Alves <pedro@codesourcery.com>
12684
12685 * proc-service.c (ps_lgetregs): Formatting.
12686
cdbfd419
PP
126872009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12688
12689 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12690 * configure.ac: Adjust.
12691 * linux-low.h (struct process_info_private): Move members to struct
12692 thread_db.
12693 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12694 * linux-low.c (linux_remove_process): Adjust.
12695 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12696 * server.c (handle_query): Move code ...
12697 (handle_monitor_command): ... here. New function.
12698 * target.h (struct target_ops): New member.
12699 * thread-db.c (struct thread_db): New.
12700 (libthread_db_search_path): New variable.
12701 (thread_db_create_event, thread_db_enable_reporting)
12702 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12703 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12704 (try_thread_db_load_1, dladdr_to_soname): New functions.
12705 (try_thread_db_load, thread_db_load_search): New functions.
12706 (thread_db_init): Search for libthread_db.
12707 (thread_db_free): New function.
12708 (thread_db_handle_monitor_command): Likewise.
12709 * config.in: Regenerate.
12710 * configure: Regenerate.
889bf7c5 12711
4168d2d6
UW
127122009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12713
12714 * spu-low.c (spu_kill): Wait for inferior to terminate.
12715 Call clear_inferiors.
12716 (spu_detach): Call clear_inferiors.
12717
81ecdfbb
RW
127182009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12719
12720 * aclocal.m4: Regenerate.
12721 * config.in: Likewise.
12722 * configure: Likewise.
12723
0b9ff2c0
UW
127242009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12725
12726 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12727 (parse_spufs_run): New function.
12728 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12729 (ppc_breakpoint_at): Handle SPU breakpoints.
12730
efcbbd14
UW
127312009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12732
12733 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12734 (SPUFS_MAGIC): Define.
12735 (spu_enumerate_spu_ids): New function.
12736 (linux_qxfer_spu): New function.
12737 (linux_target_ops): Install linux_qxfer_spu.
12738
f4d9bade
UW
127392009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12740
12741 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12742 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12743 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12744 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12745 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12746 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12747 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12748 (init_registers_powerpc_cell32l): Add prototype.
12749 (init_registers_powerpc_cell64l): Likewise.
12750 (ppc_arch_setup): Detect Cell/B.E. architecture.
12751
96e946ca
RW
127522009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12753
12754 * Makefile.in (datarootdir): New variable.
12755
58d6951d
DJ
127562009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12757
12758 * linux-low.c (linux_write_memory): Update debugging output.
12759 * Makefile.in (clean): Add new descriptions.
12760 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12761 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12762 * configure.srv: Add new files for arm*-*-linux*.
12763 * linux-arm-low.c: Add new declarations.
12764 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12765 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12766 (HWCAP_VFPv3D16): New.
12767 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12768 instead of __IWMMXT__.
12769 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12770 (arm_arch_setup): New.
12771 (target_regsets): Remove #ifdef. Add VFP regset.
12772 (the_low_target): Use arm_arch_setup.
12773
12b42a12
DJ
127742009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12775
12776 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12777 the main thread again.
12778
ac8c974e
AR
127792009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12780
12781 Adding Neutrino gdbserver.
12782 * configure: Regenerated.
12783 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12784 * configure.srv (i[34567]86-*-nto*): New target.
12785 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12786 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12787 (nto_comctrl) [__QNX__]: New function.
12788 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12789
4424e0c3 127902009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12791
12792 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12793 srv_tgtobj.
12794
912cf4ba
PA
127952009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12796 Pedro Alves <pedro@codesourcery.com>
12797
12798 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12799 don't support CONTEXT_EXTENDED_REGISTERS.
12800 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12801 (the_low_target): Install them.
12802 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12803 failing with ERROR_PIPE_NOT_CONNECTED.
12804
aa5ca48f
DE
128052009-06-30 Doug Evans <dje@google.com>
12806 Pierre Muller <muller@ics.u-strasbg.fr>
12807
12808 Add h/w watchpoint support to x86-linux, win32-i386.
12809 * Makefile.in (SFILES): Add i386-low.c
12810 (i386_low_h): Define.
12811 (i386-low.o): Add dependencies.
12812 (linux-x86-low.o): Add i386-low.h dependency.
12813 (win32-i386-low.o): Ditto.
12814 * i386-low.c: New file.
12815 * i386-low.h: New file.
12816 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12817 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12818 * linux-low.c (linux_add_process): Initialize arch_private.
12819 (linux_remove_process): Free arch_private.
12820 (add_lwp): Initialize arch_private.
12821 (delete_lwp): Free arch_private.
12822 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12823 provided.
12824 * linux-low.h (process_info_private): New member arch_private.
12825 (lwp_info): New member arch_private.
12826 (linux_target_ops): New members new_process, new_thread,
12827 prepare_to_resume.
12828 (ptid_of): New macro.
12829 * linux-x86-low.c: Include stddef.h, i386-low.h.
12830 (arch_process_info): New struct.
12831 (arch_lwp_info): New struct.
12832 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12833 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12834 (i386_dr_low_get_status): New function.
12835 (x86_insert_point, x86_remove_point): New functions.
12836 (x86_stopped_by_watchpoint): New function.
12837 (x86_stopped_data_address): New function.
12838 (x86_linux_new_process, x86_linux_new_thread): New functions.
12839 (x86_linux_prepare_to_resume): New function.
12840 (the_low_target): Add entries for insert_point, remove_point,
12841 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12842 prepare_to_resume.
12843 * server.c (debug_hw_points): New global.
12844 (monitor_show_help): Document set debug-hw-points.
12845 (handle_query): Process "set debug-hw-points".
12846 * server.h (debug_hw_points): Declare.
12847 (paddress): Declare.
12848 * utils.c (NUMCELLS, CELLSIZE): New macros.
12849 (get_sell, xsnprintf, paddress): New functions.
12850 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12851 remove_point, stopped_by_watchpoint, stopped_data_address.
12852 * win32-i386-low.c: Include i386-low.h.
12853 (debug_reg_state): Replaces dr.
12854 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12855 (i386_dr_low_get_status): New function.
12856 (i386_insert_point, i386_remove_point): New functions.
12857 (i386_stopped_by_watchpoint): New function.
12858 (i386_stopped_data_address): New function.
12859 (i386_initial_stuff): Update.
12860 (get_thread_context,set_thread_context,i386_thread_added): Update.
12861 (the_low_target): Add entries for insert_point,
12862 remove_point, stopped_by_watchpoint, stopped_data_address.
12863 * win32-low.c (win32_insert_watchpoint): New function.
12864 (win32_remove_watchpoint): New function.
12865 (win32_stopped_by_watchpoint): New function.
12866 (win32_stopped_data_address): New function.
12867 (win32_target_ops): Add entries for insert_watchpoint,
12868 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12869 * win32-low.h (win32_target_ops): New members insert_point,
12870 remove_point, stopped_by_watchpoint, stopped_data_address.
12871
d993e290
PA
128722009-06-25 Pedro Alves <pedro@codesourcery.com>
12873
12874 * server.c (process_serial_event): Re-return unsupported, not
12875 error, if the type isn't recognized. Re-allow supporting only
12876 insert or remove packets. Also call require_running for
12877 breakpoints. Add missing break statement to default case. Tidy.
12878 * target.h (struct target_ops): Rename insert_watchpoint to
12879 insert_point, and remove_watchpoint to remove_point.
12880
12881 * linux-low.h (struct linux_target_ops): Likewise.
12882 * linux-low.c (linux_insert_watchpoint): Rename to ...
12883 (linux_insert_point): ... this. Adjust.
12884 (linux_remove_watchpoint): Rename to ...
12885 (linux_remove_point): ... this. Adjust.
12886 (linux_target_ops): Adjust.
12887 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12888 (cris_insert_point): ... this.
12889 (cris_remove_watchpoint): Rename to ...
12890 (cris_remove_point): ... this.
12891 (the_low_target): Adjust.
12892
0f54c268
PM
128932009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12894
12895 * server.c (handle_v_kill): Pass signal_pid to
12896 kill_inferior if multi_process is zero.
12897
c6314022
AR
128982009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12899
12900 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12901 * target.h (target_ops): Comment for *_watchpoint to make it clear
12902 the functions can get types '0' and '1'.
12903
4463ce24
AR
129042009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12905
12906 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12907 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12908 * regcache.c (get_regcache): Likewise.
12909 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12910 * win32-low.c (child_fetch_inferior_registers): Remove check for
12911 regno 0.
12912
cf8fd78b
PA
129132009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12914 Pedro Alves <pedro@codesourcery.com>
12915
12916 * target.h (struct target_ops) <supports_multi_process>: New
12917 callback.
12918 (target_supports_multi_process): New.
12919 * server.c (handle_query): Even if GDB reports support, only
12920 enable multi-process if the target also supports it. Report
12921 multi-process support only if the target backend supports it.
12922 * linux-low.c (linux_supports_multi_process): New function.
12923 (linux_target_ops): Install it as target_supports_multi_process
12924 callback.
12925
47c0c975
DE
129262009-05-24 Doug Evans <dje@google.com>
12927
e09875d4
DE
12928 Global renaming of find_thread_pid to find_thread_ptid.
12929 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12930 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12931 All callers updated.
12932
e27d73f6
DE
12933 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12934 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12935 directly.
12936
47c0c975
DE
12937 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12938 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12939 (linux_resume_one_lwp): Ditto.
12940
2acc282a
DE
129412009-05-23 Doug Evans <dje@google.com>
12942
12943 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12944 from struct inferior_list_entry * to struct lwp_info *.
12945 All callers updated.
12946
9f1036c1
DE
129472009-05-13 Doug Evans <dje@google.com>
12948
12949 * linux-x86-low.c: Don't include assert.h.
12950 (x86_siginfo_fixup): Use fatal, not assert.
12951 (x86_arch_setup): Fix comment.
12952
d0722149
DE
129532009-05-12 Doug Evans <dje@google.com>
12954
12955 Biarch support for i386/amd64 gdbserver.
12956 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12957 Add linux-x86-low.c.
12958 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12959 (linux-x86-low.o): Add.
12960 * linux-x86-64-low.c: Delete.
12961 * linux-i386-low.c: Delete.
12962 * linux-x86-low.c: New file.
12963 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12964 linux-x86-low.o.
12965 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12966 linux-x86-low.o.
12967 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12968 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12969 (linux_child_pid_to_exec_file): New function.
12970 (elf_64_header_p, elf_64_file_p): New functions.
12971 (siginfo_fixup): New function.
12972 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12973 give target a chance to convert layout.
12974 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12975 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12976
fdeb2a12
DE
129772009-05-07 Doug Evans <dje@google.com>
12978
12979 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12980 (regsets_store_inferior_registers): Ditto.
12981
a6dbe5df
PA
129822009-05-06 Pedro Alves <pedro@codesourcery.com>
12983
12984 PR server/10048
12985
12986 * linux-low.c (must_set_ptrace_flags): Delete.
12987 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12988 of the global.
12989 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12990 `lwp->must_set_ptrace_flags' instead.
ba42693b 12991 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12992 (linux_wait_1): ... not here.
12993
5091eb23
DE
129942009-04-30 Doug Evans <dje@google.com>
12995
9f767825
DE
12996 * inferiors.c (started_inferior_callback): New function.
12997 (attached_inferior_callback): New function.
12998 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12999 * server.c (print_started_pid, print_attached_pid): New functions.
13000 (detach_or_kill_for_exit): New function.
13001 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13002 * server.h (have_started_inferiors_p): Declare.
13003 (have_attached_inferiors_p): Declare.
13004
5091eb23
DE
13005 * inferiors.c (remove_process): Fix memory leak, free process.
13006 * linux-low.c (linux_remove_process): New function.
13007 (linux_kill): Call it instead of remove_process.
13008 (linux_detach, linux_wait_1): Ditto.
13009
155c8968
PA
130102009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13011
13012 * configure.srv: Add x86 Windows CE target.
13013
7fe519cb
UW
130142009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13015
13016 * inferiors.c (get_thread_process): Make global.
13017 * server.h (get_thread_process): Add prototype.
13018 * thread-db.c (find_one_thread): Use get_thread_process
13019 instead of current_process.
13020 (thread_db_get_tls_address): Do not crash if called when
13021 thread layer is not yet initialized.
13022
5472f405
UW
130232009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13024
13025 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13026 * spu-low.c (current_tid): Rename to ...
13027 (current_ptid): ... this.
13028 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13029 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13030 ptid_get_lwp (current_ptid) instead of current_tid.
13031 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13032 instead of current_tid. Use find_process_pid to verify pid
13033 argument is valid. Pass proper argument to remove_process.
13034 (spu_thread_alive): Compare current_ptid instead of current_tid.
13035 (spu_resume): Likewise.
13036
55ac2b99
PA
130372009-04-02 Pedro Alves <pedro@codesourcery.com>
13038
13039 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13040 variable.
13041
95954743
PA
130422009-04-01 Pedro Alves <pedro@codesourcery.com>
13043
13044 Implement the multiprocess extensions, and add linux multiprocess
13045 support.
13046
13047 * server.h (ULONGEST): Declare.
13048 (struct ptid, ptid_t): New.
13049 (minus_one_ptid, null_ptid): Declare.
13050 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13051 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13052 (struct inferior_list_entry): Change `id' type from unsigned from
13053 to ptid_t.
13054 (struct sym_cache, struct breakpoint, struct
13055 process_info_private): Forward declare.
13056 (struct process_info): Declare.
13057 (current_process): Declare.
13058 (all_processes): Declare.
13059 (initialize_inferiors): Declare.
13060 (add_thread): Adjust to use ptid_t.
13061 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13062 (add_process, remove_process, find_thread_pid): Declare.
13063 (find_inferior_id): Adjust to use ptid_t.
13064 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13065 (multi_process): Declare.
13066 (push_event): Adjust to use ptid_t.
13067 (read_ptid, write_ptid): Declare.
13068 (prepare_resume_reply): Adjust to use ptid_t.
13069 (clear_symbol_cache): Declare.
13070 * inferiors.c (all_processes): New.
13071 (null_ptid, minus_one_ptid): New.
13072 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13073 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13074 (add_thread): Change unsigned long to ptid. Remove gdb_id
13075 parameter. Adjust.
13076 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13077 (gdb_id_to_thread): Rename to ...
13078 (find_thread_pid): ... this. Change unsigned long to ptid.
13079 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13080 (loaded_dll, pull_pid_from_list): Adjust.
13081 (add_process, remove_process, find_process_pid)
13082 (get_thread_process, current_process, initialize_inferiors): New.
13083 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13084 (struct target_waitstatus) <related_pid>: Ditto.
13085 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13086 return type to int.
13087 (struct target_ops) <join>: Add `pid' argument.
13088 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13089 (struct target_ops) <wait>: Add `ptid' field. Change return type
13090 to ptid.
13091 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13092 (mywait): Add `ptid' argument. Change return type to ptid_t.
13093 (target_pid_to_str): Declare.
13094 * target.c (set_desired_inferior): Adjust to use ptids.
13095 (mywait): Add new `ptid' argument. Adjust.
13096 (target_pid_to_str): New.
13097 * mem-break.h (free_all_breakpoints): Declare.
13098 * mem-break.c (breakpoints): Delelete.
13099 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13100 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13101 to use per-process breakpoint list.
13102 (free_all_breakpoints): New.
13103 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13104 (symbol_cache, all_symbols_looked_up): Delete.
13105 (hexchars): New.
13106 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13107 read_ptid): New.
13108 (prepare_resume_reply): Change ptid argument's type from unsigned
13109 long to ptid_t. Adjust. Implement W;process and X;process.
13110 (free_sym_cache, clear_symbol_cache): New.
13111 (look_up_one_symbol): Adjust to per-process symbol cache. *
13112 * server.c (cont_thread, general_thread, step_thread): Change type
13113 to ptid_t.
13114 (attached): Delete.
13115 (multi_process): New.
13116 (last_ptid): Change type to ptid_t.
13117 (struct vstop_notif) <ptid>: Change type to ptid_t.
13118 (queue_stop_reply, push_event): Change `ptid' argument's type to
13119 ptid_t.
13120 (discard_queued_stop_replies): Add `pid' argument.
13121 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13122 changes. Don't reference the `attached' global.
13123 (attach_inferior): Adjust to mywait interface changes.
13124 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13125 features. Handle and report "multiprocess+". Handle
13126 "qAttached:PID".
13127 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13128 changes.
13129 (handle_v_kill): New.
13130 (handle_v_stopped): Adjust to use target_pid_to_str.
13131 (handle_v_requests): Allow multiple attaches and runs when
13132 multiprocess extensions are in effect. Handle "vKill".
13133 (myresume): Adjust to use ptids.
13134 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13135 (handle_status): Adjust to discard_queued_stop_replies interface
13136 change.
13137 (first_thread_of, kill_inferior_callback)
13138 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13139 (main): Call initialize_inferiors. Adjust to use ptids, killing
13140 and detaching from all inferiors. Handle multiprocess packet
13141 variants.
13142 * linux-low.h: Include gdb_proc_service.h.
13143 (struct process_info_private): New.
13144 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13145 <lwpid_of>: Use ptid_get_lwp.
13146 (get_lwp_thread): Adjust.
13147 (struct lwp_info): Add `dead' member.
13148 (find_lwp_pid): Declare.
13149 * linux-low.c (thread_db_active): Delete.
13150 (new_inferior): Adjust comment.
13151 (inferior_pid): Delete.
13152 (linux_add_process): New.
13153 (handle_extended_wait): Adjust.
13154 (add_lwp): Change unsigned long to ptid.
13155 (linux_create_inferior): Add process to processes table. Adjust
13156 to use ptids. Don't set new_inferior here.
13157 (linux_attach_lwp): Rename to ...
13158 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13159 it. Adjust to use ptids.
13160 (linux_attach_lwp): New.
13161 (linux_attach): Add process to processes table. Don't set
13162 new_inferior here.
13163 (struct counter): New.
13164 (second_thread_of_pid_p, last_thread_of_process_p): New.
13165 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13166 multiple processes.
13167 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13168 processes. Remove process from process table.
13169 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13170 to multiple processes.
13171 (any_thread_of): New.
13172 (linux_detach): Add `pid' argument, and handle it. Remove process
13173 from processes table.
13174 (linux_join): Add `pid' argument. Handle it.
13175 (linux_thread_alive): Change unsighed long argument to ptid_t.
13176 Consider dead lwps as not being alive.
13177 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13178 threads we're not interested in.
13179 (same_lwp, find_lwp_pid): New.
13180 (linux_wait_for_lwp): Change `pid' argument's type from int to
13181 ptid_t. Adjust.
13182 (linux_wait_for_event): Rename to ...
13183 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13184 from int to ptid_t. Adjust.
13185 (linux_wait_for_event): New.
13186 (linux_wait_1): Add `ptid' argument. Change return type to
13187 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13188 that exit from the process table.
13189 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13190 Adjust.
13191 (mark_lwp_dead): New.
13192 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13193 stopping all threads, mark its main lwp as dead.
13194 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13195 ptids.
13196 (fetch_register, usr_store_inferior_registers)
13197 (regsets_fetch_inferior_registers)
13198 (regsets_store_inferior_registers, linux_read_memory)
13199 (linux_write_memory): Inline `inferior_pid'.
13200 (linux_look_up_symbols): Adjust to use per-process
13201 `thread_db_active'.
13202 (linux_request_interrupt): Adjust to use ptids.
13203 (linux_read_auxv): Inline `inferior_pid'.
13204 (initialize_low): Don't reference thread_db_active.
13205 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13206 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13207 (ps_getpid): Return the pid of the current inferior.
13208 * thread-db.c (proc_handle, thread_agent): Delete.
13209 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13210 per-process data.
13211 (find_one_thread): Change argument type to ptid_t. Adjust to
13212 per-process data.
13213 (maybe_attach_thread): Adjust to per-process data and ptids.
13214 (thread_db_find_new_threads): Ditto.
13215 (thread_db_init): Ditto.
13216 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13217 processes table. Adjust to use ptids.
13218 (spu_kill, spu_detach): Adjust interface. Remove process from
13219 processes table.
13220 (spu_join, spu_thread_alive): Adjust interface.
13221 (spu_wait): Adjust interface. Remove process from processes
13222 table. Adjust to use ptids.
13223 * win32-low.c (current_inferior_tid): Delete.
13224 (current_inferior_ptid): New.
13225 (debug_event_ptid): New.
13226 (thread_rec): Take a ptid. Adjust.
13227 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13228 (child_delete_thread): Ditto.
13229 (do_initial_child_stuff): Add `attached' argument. Add process to
13230 processes table.
13231 (child_fetch_inferior_registers, child_store_inferior_registers):
13232 Adjust.
13233 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13234 (win32_attach): Pass 1 to do_initial_child_stuff.
13235 (win32_kill): Adjust interface. Remove process from processes
13236 table.
13237 (win32_detach): Ditto.
13238 (win32_join): Adjust interface.
13239 (win32_thread_alive): Take a ptid.
13240 (win32_resume): Adjust to use ptids.
13241 (get_child_debug_event): Ditto.
13242 (win32_wait): Adjust interface. Remove exiting process from
13243 processes table.
13244
bd99dc85
PA
132452009-04-01 Pedro Alves <pedro@codesourcery.com>
13246
13247 Non-stop mode support.
13248
13249 * server.h (non_stop): Declare.
13250 (gdb_client_data, handler_func): Declare.
13251 (delete_file_handler, add_file_handler, start_event_loop):
13252 Declare.
13253 (handle_serial_event, handle_target_event, push_event)
13254 (putpkt_notif): Declare.
13255 * target.h (enum resume_kind): New.
13256 (struct thread_resume): Replace `step' field by `kind' field.
13257 (TARGET_WNOHANG): Define.
13258 (struct target_ops) <wait>: Add `options' argument.
13259 <supports_non_stop, async, start_non_stop>: New fields.
13260 (target_supports_non_stop, target_async): New.
13261 (start_non_stop): Declare.
13262 (mywait): Add `options' argument.
13263 * target.c (mywait): Add `options' argument. Print child exit
13264 notifications here.
13265 (start_non_stop): New.
13266 * server.c (non_stop, own_buf, mem_buf): New globals.
13267 (struct vstop_notif): New.
13268 (notif_queue): New global.
13269 (queue_stop_reply, push_event, discard_queued_stop_replies)
13270 (send_next_stop_reply): New.
13271 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13272 interface changes.
13273 (attach_inferior): In non-stop mode, don't wait for the target
13274 here.
13275 (handle_general_set): Handle QNonStop.
13276 (handle_query): When handling qC, return the current general
13277 thread, instead of the first thread of the list.
13278 (handle_query): If the backend supports non-stop mode, include
13279 QNonStop+ in the qSupported query response.
13280 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13281 and non-stop mode.
13282 (handle_v_attach, handle_v_run): Handle non-stop mode.
13283 (handle_v_stopped): New.
13284 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13285 (myresume): Adjust to use resume_kind. Handle non-stop.
13286 (queue_stop_reply_callback): New.
13287 (handle_status): Handle non-stop mode.
13288 (main): Clear non_stop flag on reconnection. Use the event-loop.
13289 Refactor serial protocol handling from here ...
13290 (process_serial_event): ... to this new function. When GDB
13291 selects any thread, select one here. In non-stop mode, wait until
13292 GDB acks all pending events before exiting.
13293 (handle_serial_event, handle_target_event): New.
13294 * remote-utils.c (remote_open): Install remote_desc in the event
13295 loop.
13296 (remote_close): Remove remote_desc from the event loop.
13297 (putpkt_binary): Rename to...
13298 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13299 (putpkt_binary): New as wrapper around putpkt_binary_1.
13300 (putpkt_notif): New.
13301 (prepare_resume_reply): In non-stop mode, don't change the
13302 general_thread.
13303 * event-loop.c: New.
13304 * Makefile.in (OBJ): Add event-loop.o.
13305 (event-loop.o): New rule.
13306
13307 * linux-low.h (pid_of): Moved here.
13308 (lwpid_of): New.
13309 (get_lwp_thread): Use lwpid_of.
13310 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13311 * linux-low.c (pid_of): Delete.
13312 (inferior_pid): Use lwpid_of.
13313 (linux_event_pipe): New.
13314 (target_is_async_p): New.
13315 (delete_lwp): New.
13316 (handle_extended_wait): Use lwpid_of.
13317 (add_lwp): Don't set lwpid field.
13318 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13319 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13320 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13321 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13322 first. Adjust to linux_wait_for_event interface changes. Use
13323 lwpid_of.
13324 (linux_detach): Don't delete the main lwp here.
13325 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13326 (status_pending_p): Don't consider explicitly suspended lwps.
13327 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13328 pointer. Add OPTIONS argument. Change return type to int. Use
13329 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13330 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13331 pointer. Add status pointer argument. Return a pid instead of a
13332 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13333 changes. In non-stop mode, don't switch to a random thread.
13334 (linux_wait): Rename to...
13335 (linux_wait_1): ... this. Add target_options argument, and handle
13336 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13337 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13338 clean exit and signal exit code. Don't stop all threads in
13339 non-stop mode. In all-stop mode, only stop all threads when
13340 reporting a stop to GDB. Handle explicit thread stop requests.
13341 (async_file_flush, async_file_mark): New.
13342 (linux_wait): New.
13343 (send_sigstop): Use lwpid_of.
13344 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13345 interface changes. In non-stop mode, don't switch to a random
13346 thread.
13347 (linux_resume_one_lwp): Use lwpid_of.
13348 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13349 (linux_resume_one_thread): ... this. Handle resume_stop. In
13350 non-stop mode, don't look for pending flag in all threads.
13351 (resume_status_pending_p): Don't consider explicitly suspended
13352 threads.
13353 (my_waitpid): Reimplement. Emulate __WALL.
13354 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13355 Use lwpid_of.
13356 (sigchld_handler, linux_supports_non_stop, linux_async)
13357 (linux_start_non_stop): New.
13358 (linux_target_ops): Register linux_supports_non_stop, linux_async
13359 and linux_start_non_stop.
13360 (initialize_low): Install SIGCHLD handler.
13361 * thread-db.c (thread_db_create_event, find_one_thread)
13362 (thread_db_get_tls_address): Use lwpid_of.
13363 * win32-low.c (win32_detach): Adjust to use resume_kind.
13364 (win32_wait): Add `options' argument.
13365 * spu-low.c (spu_resume): Adjust to use resume_kind.
13366 (spu_wait): Add `options' argument.
13367
5b1c542e
PA
133682009-04-01 Pedro Alves <pedro@codesourcery.com>
13369
13370 Decouple target code from remote protocol.
13371
13372 * target.h (enum target_waitkind): New.
13373 (struct target_waitstatus): New.
13374 (struct target_ops) <wait>: Return an unsigned long. Take a
13375 target_waitstatus pointer instead of a char pointer.
13376 (mywait): Likewise.
13377 * target.c (mywait): Change prototype to return an unsigned long.
13378 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13379 * server.h (thread_from_wait, old_thread_from_wait): Delete
13380 declarations.
13381 (prepare_resume_reply): Change prototype to take a
13382 target_waitstatus.
13383 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13384 (last_status, last_ptid): New.
13385 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13386 pid instead of a signal.
13387 (attach_inferior): Remove "status" and "signal" parameters.
13388 Adjust.
13389 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13390 not as an address.
13391 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13392 (handle_v_requests, myresume): Remove "status" and "signal"
13393 parameters. Adjust.
13394 (handle_status): New.
13395 (main): Delete local `status'. Adjust.
13396 * remote-utils.c: Include target.h.
13397 (prepare_resume_reply): Change prototype to take a
13398 target_waitstatus. Adjust.
13399
13400 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13401 interface.
13402 * spu-low.c (spu_wait): Adjust.
13403 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13404 Delete.
13405 (win32_wait): Adjust.
13406
2bd7c093
PA
134072009-04-01 Pedro Alves <pedro@codesourcery.com>
13408
13409 * target.h (struct thread_resume): Delete leave_stopped member.
13410 (struct target_ops): Add a `n' argument to the `resume' callback.
13411 * server.c (start_inferior): Adjust.
13412 (handle_v_cont, myresume): Adjust.
13413 * linux-low.c (check_removed_breakpoint): Adjust to resume
13414 interface change, and to removed leave_stopped field.
13415 (resume_ptr): Delete.
13416 (struct thread_resume_array): New.
13417 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13418 resume interface change.
13419 (linux_continue_one_thread, linux_queue_one_thread)
13420 (resume_status_pending_p): Check if the resume field is NULL
13421 instead of checking the leave_stopped member.
13422 (linux_resume): Adjust to the target resume interface change.
13423 * spu-low.c (spu_resume): Adjust to the target resume interface
13424 change.
13425 * win32-low.c (win32_detach, win32_resume): Ditto.
13426
c35fafde
PA
134272009-04-01 Pedro Alves <pedro@codesourcery.com>
13428
13429 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13430 flag.
13431 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13432 pending.
13433 (linux_continue_one_thread): Only preserve the stepping flag if
13434 there's a pending breakpoint.
13435
0a59d50b
PA
134362009-03-31 Pedro Alves <pedro@codesourcery.com>
13437
13438 * server.c (main): After the inferior having exited, call
13439 remote_close before exiting gdbserver.
13440
f04c6d38
TJB
134412009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13442
13443 Fix size of FPSCR in Power 7 processors.
13444 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13445 (PPC_FEATURE_HAS_DFP): New #define.
13446 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13447 size of the FPSCR.
13448
78e5cee6
PA
134492009-03-23 Pedro Alves <pedro@codesourcery.com>
13450
13451 * server.c (handle_query) Whitespace and formatting.
13452
1b3f6016
PA
134532009-03-22 Pedro Alves <pedro@codesourcery.com>
13454
13455 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13456 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13457 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13458 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13459 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13460 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13461 Makefile.in, configure.ac: Fix whitespace throughout.
13462 * configure: Regenerate.
13463
a07b2135
PA
134642009-03-22 Pedro Alves <pedro@codesourcery.com>
13465
13466 * inferiors.c (find_inferior): Make it safe for the callback
13467 function to delete the currently iterated inferior.
13468
67cc2626
PA
134692009-03-22 Pedro Alves <pedro@codesourcery.com>
13470
13471 * Makefile.in (linuw_low_h): Move higher.
13472 (thread-db.o): Depend on $(linux_low_h).
13473
54a0b537
PA
134742009-03-17 Pedro Alves <pedro@codesourcery.com>
13475
13476 Rename "process" to "lwp" throughout.
13477
13478 * linux-low.c (all_processes): Rename to...
13479 (all_lwps): ... this.
13480 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13481 (add_process): Rename to ...
13482 (add_lwp): ... this. Adjust.
13483 (linux_create_inferior): Adjust.
13484 (linux_attach_lwp): Adjust.
13485 (linux_attach): Adjust.
13486 (linux_kill_one_process): Rename to ...
13487 (linux_kill_one_lwp): ... this. Adjust.
13488 (linux_kill): Adjust.
13489 (linux_detach_one_process): Rename to ...
13490 (linux_detach_one_lwp): ... this. Adjust.
13491 (linux_detach): Adjust.
13492 (check_removed_breakpoint): Adjust.
13493 (status_pending_p): Adjust.
13494 (linux_wait_for_process): Rename to ...
13495 (linux_wait_for_lwp): ... this. Adjust.
13496 (linux_wait_for_event): Adjust.
13497 (send_sigstop): Adjust.
13498 (wait_for_sigstop): Adjust.
13499 (stop_all_processes): Rename to ...
13500 (stop_all_lwps): ... this.
13501 (linux_resume_one_process): Rename to ...
13502 (linux_resume_one_lwp): ... this. Adjust.
13503 (linux_set_resume_request, linux_continue_one_thread)
13504 (linux_queue_one_thread, resume_status_pending_p)
13505 (usr_store_inferior_registers, regsets_store_inferior_registers)
13506 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13507 Adjust.
13508 * linux-low.h (get_process): Rename to ...
13509 (get_lwp): ... this. Adjust.
13510 (get_thread_process): Rename to ...
13511 (get_thread_lwp): ... this. Adjust.
13512 (get_process_thread): Rename to ...
13513 (get_lwp_thread): ... this. Adjust.
13514 (struct process_info): Rename to ...
13515 (struct lwp_info): ... this.
13516 (all_processes): Rename to ...
13517 (all_lwps): ... this.
13518 * proc-service.c (ps_lgetregs): Adjust.
13519 * thread-db.c (thread_db_create_event, find_one_thread)
13520 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13521
0b16c5cf
PA
135222009-03-14 Pedro Alves <pedro@codesourcery.com>
13523
13524 * server.c (handle_query): Handle "qAttached".
13525
32de4b9d
NS
135262009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13527
13528 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13529 GPLv3, update license URL.
13530
2aecd87f
DE
135312009-03-01 Doug Evans <dje@google.com>
13532
93efd302 13533 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13534 (server_h): Add gdb_signals.h.
13535 (signals.o): Update.
13536 * server.h (target_signal_from_host,target_signal_to_host_p)
13537 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13538
86b1f9c5
PM
135392009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13540
13541 * remote-utils.c (getpkt): Also generate remote-debug
13542 information if noack_mode is set.
13543
4aa995e1
PA
135442009-02-06 Pedro Alves <pedro@codesourcery.com>
13545
13546 * server.c (handle_query): Report qXfer:siginfo:read and
13547 qXfer:siginfo:write as supported and handle them.
13548 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13549 * linux-low.c (linux_xfer_siginfo): New.
13550 (linux_target_ops): Set it.
13551
62709adf
PA
135522009-01-26 Pedro Alves <pedro@codesourcery.com>
13553
13554 * server.c (gdbserver_usage): Mention --remote-debug.
13555 (main): Accept '--remote-debug' switch.
13556
aef93bd7
DE
135572009-01-18 Doug Evans <dje@google.com>
13558
13559 * regcache.c (new_register_cache): No need to check result of xcalloc.
13560 * server.c (handle_search_memory): Back out calls to xmalloc,
13561 result is checked and error is returned to user upon failure.
13562 (handle_query): Ditto. Add more checks for result of malloc.
13563 (handle_v_cont): Check result of malloc, report error back to
13564 user upon failure.
13565 (handle_v_run): Ditto. Call freeargv.
13566 * server.h (freeargv): Declare.
13567 * utils.c (freeargv): New fn.
13568
54363045
DE
135692009-01-15 Doug Evans <dje@google.com>
13570
f626972c
DE
13571 * gdbreplay.c (perror_with_name): Make arg const char *.
13572 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13573 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13574 * utils.c (perror_with_name): Make arg const char *.
54363045 13575
18aae699
PA
135762009-01-14 Pedro Alves <pedro@codesourcery.com>
13577
13578 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13579 when handling a EXIT_PROCESS_DEBUG_EVENT.
13580
ff703abe
JB
135812009-01-06 Joel Brobecker <brobecker@adacore.com>
13582
13583 * gdbreplay.c (gdbreplay_version): Update copyright year.
13584 * server.c (gdbserver_version): Likewise.
13585
f21cc1a2 135862009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13587
13588 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13589 (handle_extended_wait): Improve comment.
0e21c1ec 13590
bca929d3
DE
135912008-12-13 Doug Evans <dje@google.com>
13592
13593 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13594 * server.h (ATTR_MALLOC): New macro.
13595 (xmalloc,xcalloc,xstrdup): Declare.
13596 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13597 * inferiors.c: Ditto.
13598 * linux-low.c: Ditto.
13599 * mem-break.c: Ditto.
13600 * regcache.c: Ditto.
13601 * remote-utils.c: Ditto.
13602 * server.c: Ditto.
13603 * target.c: Ditto.
13604 * win32-low.c: Ditto.
13605
97438e3f
DE
136062008-12-12 Doug Evans <dje@google.com>
13607
896c7fbb
DE
13608 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13609 in debugging printf.
13610
97438e3f
DE
13611 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13612
e3b886f8
DE
136132008-12-09 Doug Evans <dje@google.com>
13614
13615 * linux-low.h (struct process_info): Delete member tid, unused.
13616 * thread-db.c (find_one_thread): Update.
13617 (maybe_attach_thread): Update.
13618
07e059b5
VP
136192008-12-02 Pedro Alves <pedro@codesourcery.com>
13620
889bf7c5
PA
13621 * target.h (struct target_ops): Add qxfer_osdata member.
13622 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13623 and dirent.h.
13624 (linux_qxfer_osdata): New functions.
13625 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13626 callback.
13627 * server.c (handle_query): Handle "qXfer:osdata:read:".
13628 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13629 (buffer_xml_printf): New functions.
13630 * server.h (struct buffer): New.
13631 (buffer_grow_str, buffer_grow_str0): New macros.
13632 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13633 (buffer_xml_printf): Declare.
07e059b5 13634
4cab47ab
DE
136352008-11-24 Doug Evans <dje@google.com>
13636
13637 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13638
f142445f
DJ
136392008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13640
13641 * server.c (handle_v_run): Always use the supplied argument list.
13642
d0107bb6 136432008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13644
d0107bb6
BW
13645 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13646 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13647
2c4ad781
TJB
136482008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13649
13650 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13651 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13652 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13653 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13654 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13655 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13656 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13657 XML target descriptions.
13658 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13659 when inferior is running on an ISA 2.05 or later processor. Add
13660 special case to return offset for full 64-bit slot of FPSCR when
13661 in 32-bits.
13662
dfb64f85
DJ
136632008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13664
13665 * Makefile.in (SFILES, clean): Added sparc64 files.
13666 (reg-sparc64.o, reg-sparc64.c): New.
13667 * configure.srv (sparc*-*-linux*): New configuration.
13668 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13669 syscall arguments for SPARC.
13670 (regsets_store_inferior_registers): Likewise.
13671 * linux-sparc-low.c: New file.
13672
66b6e1dd
DE
136732008-10-21 Doug Evans <dje@google.com>
13674
13675 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13676 (READLINE_DIR,READLINE_DEP): Delete.
13677 (INTERNAL_CFLAGS): Update.
13678 (LINTFLAGS): Update.
13679
9b710a42
PA
136802008-10-10 Pedro Alves <pedro@codesourcery.com>
13681
13682 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13683 whole argv from the last run, not just argv[0].
13684
5822d809
PA
136852008-09-08 Pedro Alves <pedro@codesourcery.com>
13686
13687 * regcache.c (new_register_cache): Return NULL if the register
13688 cache size isn't known yet.
13689 (free_register_cache): Avoid dereferencing a NULL regcache.
13690
74aac56f
DJ
136912008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13692
13693 * configure.srv: Merge MIPS and MIPS64.
13694
400b20f5
MR
136952008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13696
13697 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13698
677c5bb1
LM
136992008-08-18 Luis Machado <luisgpm@br.ibm.com>
13700
13701 * Makefile.in: Add required vsx dependencies.
13702
13703 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13704 Declare init_registers_powerpc_vsx32l.
13705 Declare init_registers_powerpc_vsx64l.
13706 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13707 (ppc_arch_setup): Check for VSX in hwcap.
13708 (ppc_fill_vsxregset): New function.
13709 (ppc_store_vsxregset): New function.
13710 Add new VSX entry in regset_info target_regsets.
13711
13712 * configure.srv: Add new VSX dependencies.
13713
a6f3e723
SL
137142008-08-12 Pedro Alves <pedro@codesourcery.com>
13715
13716 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13717 (remote_open): Set or clear transport_is_reliable.
13718 (putpkt_binary): Don't expect acks in noack mode.
13719 (getpkt): Don't send ack/nac in noack mode.
13720 * server.c (handle_general_set): Handle QStartNoAckMode.
13721 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13722 qSupported.
13723 (main): Reset noack_mode on every connection.
13724 * server.h (noack_mode): Declare.
13725
a417dc56
RW
137262008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13727
13728 * Makefile.in (GDBREPLAY_OBS): New variable.
13729 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13730
3221518c
UW
137312008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13732 Daniel Jacobowitz <dan@codesourcery.com>
13733
13734 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13735 (usr_store_inferior_registers): Likewise.
13736 (regsets_store_inferior_registers): Likewise.
13737
ec56be1b
PA
137382008-07-31 Rolf Jansen <rj@surtec.com>
13739 Pedro Alves <pedro@codesourcery.com>
13740
13741 * configure.ac: Check for memmem declaration.
13742 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13743 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13744 (disable_packet_qfThreadInfo): Unconditionally compile.
13745 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13746 * configure, config.in: Regenerate.
13747
2fe5e3ff
DE
137482008-07-28 Doug Kwan <dougkwan@google.com>
13749
13750 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13751 (linux_write_memory): Remove declaration of errno.
13752
836acd6d
UW
137532008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13754
13755 * linux-low.c (handle_extended_wait): Do not use "status"
13756 variable uninitialized.
13757
aeba519e
PA
137582008-07-07 Pedro Alves <pedro@codesourcery.com>
13759
13760 * server.c (handle_v_attach): Inhibit reporting dll changes.
13761
db42f210
PA
137622008-06-27 Pedro Alves <pedro@codesourcery.com>
13763
13764 * remote-utils.c (prepare_resume_reply): If requested, don't
13765 output "thread:TID" in the T stop reply.
13766
13767 * server.c (disable_packet_vCont, disable_packet_Tthread)
13768 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13769 (handle_query): If requested, disable support for qC, qfThreadInfo
13770 and qsThreadInfo.
13771 (handle_v_requests): If requested, disable support for vCont.
13772 (gdbserver_show_disableable): New.
13773 (main): Handle --disable-packet and --disable-packet=LIST.
13774
13775 * server.h (disable_packet_vCont, disable_packet_Tthread)
13776 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13777
8e4c5421
CD
137782008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13779
13780 * server.c (gdbserver_usage): Mention --version.
13781
6e23a804
DJ
137822008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13783
13784 * Makefile.in (gdbreplay.o): New rule.
13785
90aa6a40
JM
137862008-06-06 Joseph Myers <joseph@codesourcery.com>
13787
13788 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13789 message, not gdbserver.
13790
c16158bc 137912008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13792 Nathan Sidwell <nathan@codesourcery.com>
13793 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13794
13795 * acinclude.m4: Include ../../config/acx.m4.
13796 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13797 * configure, config.in: Regenerate.
13798 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13799 * server.c (gdbserver_version): Print PKGVERSION.
13800 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13801 (main): Adjust gdbserver_usage calls.
13802 * gdbreplay.c (version, host_name): Add declarations.
13803 (gdbreplay_version, gdbreplay_usage): New.
13804 (main): Accept --version and --help options.
13805
aeb75bf5
DJ
138062008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13807
13808 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13809 (arm_breakpoint_at): Handle Thumb.
13810 (the_low_target): Add comment.
13811
76b233dd
UW
138122008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13813
13814 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13815
08388c79
DE
138162008-05-09 Doug Evans <dje@google.com>
13817
a3c83fae
DE
13818 * server.h (decode_search_memory_packet): Declare.
13819 * remote-utils.c (decode_search_memory_packet): New fn.
13820 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13821 (handle_search_memory): New fn.
13822 (handle_query): Process qSearch:memory packets.
13823
bb9c3d36
UW
138242008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13825
13826 * regcache.c (registers_length): Remove.
13827 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13828 full register packet.
13829 * regcache.h (registers_length): Remove prototype.
13830 * server.h (PBUFSIZ): Define to 16384.
13831
7284e1be
UW
138322008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13833
13834 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13835 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13836 powerpc-64l.o, and powerpc-altivec64l.o.
13837 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13838 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13839 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13840 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13841 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13842 to srv_xmlfiles.
13843
13844 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13845 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13846 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13847 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13848 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13849 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13850 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13851 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13852 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13853 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13854 (clean): Update.
13855
13856 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13857 (init_registers_powerpc_32l): ... this new prototype.
13858 (init_registers_powerpc_32): Remove, replace by ...
13859 (init_registers_powerpc_altivec32l): ... this new prototype.
13860 (init_registers_powerpc_e500): Remove, replace by ...
13861 (init_registers_powerpc_e500l): ... this new prototype.
13862 (init_registers_ppc64): Remove, replace by ...
13863 (init_registers_powerpc_64l): ... this new prototype.
13864 (init_registers_powerpc_64): Remove, replace by ...
13865 (init_registers_powerpc_altivec64l): ... this new prototype.
13866 (ppc_num_regs): Set to 73.
13867 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13868 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13869 (ppc_cannot_store_register): Handle orig_r3 and trap.
13870 (ppc_arch_setup): Update init_registers_... calls.
13871 (ppc_fill_gregset): Handle orig_r3 and trap.
13872
13873 * inferiors.c (clear_inferiors): Reset current_inferior.
13874
fdc59709
PB
138752008-04-23 Paolo Bonzini <bonzini@gnu.org>
13876
889bf7c5
PA
13877 * acinclude.m4: Add override.m4.
13878 * configure: Regenerate.
fdc59709 13879
c9b2f845
UW
138802008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13881
13882 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13883 initial call to init_register_ppc64.
13884
550512b8
UW
138852008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13886
43aaf8b6
PA
13887 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13888 single powerpc*-*-linux* case.
550512b8
UW
13889 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13890
b6430ec3
UW
138912008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13892
13893 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13894 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13895 from reg_xmlfiles.
13896 * linux-ppc-low.c: Include <elf.h>.
13897 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13898 (ppc_hwcap): New global variable.
13899 (ppc_regmap): Remove __SPE__ #ifdef sections.
13900 (ppc_regmap_e500): New global variable.
13901 (ppc_cannot_store_register): Update __SPE__ special case.
13902 (ppc_get_hwcap): New function.
13903 (ppc_arch_setup): Use it to determine whether inferior supports
13904 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13905 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13906 Do not access registers if target does not support AltiVec.
13907 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13908 Do not access registers if target does not support SPE.
13909 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13910
52fa2412
UW
139112008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13912
13913 * linux-low.c (disabled_regsets, num_regsets): New.
13914 (use_regsets_p): Delete.
13915 (linux_wait_for_process): Clear disabled_regsets.
13916 (regsets_fetch_inferior_registers): Check and set it.
13917 (regsets_store_inferior_registers): Likewise.
13918 (linux_fetch_registers, linux_store_registers): Do not use
13919 use_regsets_p.
13920 (initialize_low): Allocate disabled_regsets.
13921
e28b3332
DJ
139222008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13923
13924 * Makefile.in (LIBOBJS): New.
13925 (OBS): Use LIBOBJS.
13926 (memmem.o): New rule.
13927 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13928 * configure: Regenerated.
13929
4536995d
UW
139302008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13931
13932 * server.c (handle_query): Never return "unsupported" for
13933 qXfer:features:read queries.
13934
221c031f
UW
139352008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13936
13937 * server.c (get_features_xml): Fix inverted condition.
13938 (handle_query): Always support qXfer:feature:read.
13939
ccd213ac
DJ
139402008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13941
13942 * server.c (wrapper_argv): New.
13943 (start_inferior): Handle wrapper_argv. If set, expect an extra
13944 trap.
13945 (gdbserver_usage): Document --wrapper.
13946 (main): Parse --wrapper.
13947
6fe305f7
UW
139482008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13949
13950 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13951 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13952 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13953 (ppc_set_pc): Likewise.
13954 (ppc_arch_setup): New function.
13955 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13956 of collect_register.
889bf7c5 13957 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13958
5b0a002e
UW
139592008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13960
13961 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13962 instead of linux-ppc64-low.o.
13963 * linux-ppc64-low.c: Remove file.
13964 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13965 (linux-ppc64-low.o): Remove rule.
13966
13967 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13968 (init_registers_powerpc_64): Likewise.
13969 (ppc_regmap): Conditionally define depending on __powerpc64__.
13970 (ppc_cannot_store_register): Do not special-case "fpscr" when
13971 compiled on __powerpc64__.
13972 (ppc_collect_ptrace_register): New function.
13973 (ppc_supply_ptrace_register): New function.
13974 (ppc_breakpoint): Change type to "unsigned int".
13975 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13976 (the_low_target): Conditionally provide initializers for the
889bf7c5 13977 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13978 collect_ptrace_register and supply_ptrace_register members.
13979
9b4b61c8
UW
139802008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13981
13982 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13983 * server.c (gdbserver_xmltarget): Define.
13984 (get_features_xml): Use it to replace "target.xml" and arch_string.
13985
13986 * configure.srv: Remove srv_xmltarget. Add XML files that were
13987 mentioned there to srv_xmlfiles instead. Remove conditional tests
13988 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13989 srv_xmlfiles and srv_regobj to include all possible choices.
13990 * configure.ac (srv_xmltarget): Remove.
13991 (srv_xmlfiles): Do not add "target.xml".
13992 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13993 checks for supplementary target information.
13994 * configure: Regenerate.
13995 * Makefile.in (XML_TARGET): Remove.
13996 (target.xml): Remove rule.
13997 (clean): Do not clean up target.xml.
13998 (.PRECIOUS): Do not mention target.xml.
13999
14000 * target.h (struct target_ops): Remove arch_string member.
14001 * linux-low.c (linux_arch_string): Remove.
14002 (linux_target_ops): Remove arch_string initializer.
14003 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14004 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14005 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14006 * spu-low.c (spu_arch_string): Remove.
14007 (spu_target_ops): Remove arch_string initializer.
14008 * win32-low.c (win32_arch_string): Remove.
14009 (win32_target_ops): Remove arch_string initializer.
14010 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14011 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14012 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14013
ee1a7ae4
UW
140142008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14015
14016 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14017 by collect_ptrace_register and supply_ptrace_register hooks.
14018 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14019 instead of checking for the_low_target.left_pad_xfer.
14020 (usr_store_inferior_registers): Use collect_ptrace_register callback
14021 instead of checking for the_low_target.left_pad_xfer.
14022
14023 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14024 (s390_supply_ptrace_register): Likewise.
14025 (s390_fill_gregset): Call s390_collect_ptrace_register.
14026 (the_low_target): Update.
14027
14028 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14029 (ppc_supply_ptrace_register): Likewise.
14030 (the_low_target): Update.
14031
14032 * linux-i386-low.c (the_low_target): Update.
14033 * linux-x86-64-low.c (the_low_target): Update.
14034
d61ddec4
UW
140352008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14036
14037 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14038 reg-s390.o and reg-s390x.o.
14039
14040 * linux-low.c (new_inferior): New global variable.
14041 (linux_create_inferior, linux_attach): Set it.
14042 (linux_wait_for_process): Call the_low_target.arch_setup after the
14043 target has stopped for the first time.
14044 (initialize_low): Do not call the_low_target.arch_setup.
14045
14046 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14047 (s390_set_pc): Likewise.
14048 (s390_arch_setup): New function.
14049 (the_low_target): Use s390_arch_setup as arch_setup routine.
14050
14051 * regcache.c (realloc_register_cache): New function.
14052 (set_register_cache): Call it for each existing regcache.
14053
d05b4ac3
UW
140542008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14055
14056 * server.h (init_registers): Remove prototype.
14057
14058 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14059 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14060 instead of init_registers ().
14061 * linux-arm-low.c (init_registers_arm): Add prototype.
14062 (init_registers_arm_with_iwmmxt): Likewise.
14063 (the_low_target): Add initializer for arch_setup field.
14064 * linux-cris-low.c (init_registers_cris): Add prototype.
14065 (the_low_target): Add initializer for arch_setup field.
14066 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14067 (the_low_target): Add initializer for arch_setup field.
14068 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14069 (the_low_target): Add initializer for arch_setup field.
14070 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14071 (the_low_target): Add initializer for arch_setup field.
14072 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14073 (the_low_target): Add initializer for arch_setup field.
14074 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14075 (the_low_target): Add initializer for arch_setup field.
14076 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14077 (init_registers_mips64_linux): Likewise.
14078 (the_low_target): Add initializer for arch_setup field.
14079 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14080 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14081 (the_low_target): Add initializer for arch_setup field.
14082 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14083 (init_registers_powerpc_64): Likewise.
14084 (the_low_target): Add initializer for arch_setup field.
14085 * linux-s390-low.c (init_registers_s390): Add prototype.
14086 (init_registers_s390x): Likewise.
14087 (the_low_target): Add initializer for arch_setup field.
14088 * linux-sh-low.c (init_registers_sh): Add prototype.
14089 (the_low_target): Add initializer for arch_setup field.
14090 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14091 (the_low_target): Add initializer for arch_setup field.
14092 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14093 (the_low_target): Add initializer for arch_setup field.
14094
14095 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14096 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14097 instead of init_registers ().
14098 * win32-arm-low.c (init_registers_arm): Add prototype.
14099 (the_low_target): Add initializer for arch_setup field.
14100 * win32-i386-low.c (init_registers_i386): Add prototype.
14101 (the_low_target): Add initializer for arch_setup field.
14102
14103 * spu-low.c (init_registers_spu): Add prototype.
14104 (initialize_low): Call initialie_registers_spu () instead of
14105 initialize_registers ().
14106
fd96d250
PA
141072008-02-19 Pedro Alves <pedro@codesourcery.com>
14108
14109 * server.c (handle_v_requests): When handling the vRun and vAttach
14110 packets, if already debugging a process, don't kill it. Return an
14111 error instead.
14112
d41b6bb4
DJ
141132008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14114
14115 * server.c (handle_query): Correct length check.
14116
5ac588cf
PA
141172008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14118
14119 * win32-low.c (do_initial_child_stuff): Add process handle
14120 parameter. Set current_process_handle and current_process_id from the
14121 parameters. Clear globals.
14122 (win32_create_inferior): Don't set current_process_handle and
14123 current_process_id here. Instead pass them on the call to
14124 do_initial_child_stuff.
14125 (win32_attach): Likewise.
14126 (win32_clear_inferiors): New.
14127 (win32_kill): Don't close the current process handle or the
14128 current thread handle here. Instead call win32_clear_inferiors.
14129 (win32_detach): Don't open a new handle to the process. Call
14130 win32_clear_inferiors.
14131 (win32_join): Don't rely on current_process_handle; open a new
14132 handle using the process id.
14133 (win32_wait): Call win32_clear_inferiors when the inferior process
14134 has exited.
14135
ecd7ecbc
DJ
141362008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14137
14138 * server.c (monitor_show_help): Add "exit".
14139
1525d545
MG
141402008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14141
ecd7ecbc 14142 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14143 (clean): Add reg-xtensa.c.
14144 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14145 * configure.srv (xtensa*-*-linux*) New target.
14146 * linux-xtensa-low.c: New.
14147 * xtensa-xtregs.c: New.
1525d545 14148
59a016f0
PA
141492008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14150
14151 * hostio.c: Don't include errno.h.
14152 (errno_to_fileio_errno): Move to hostio-errno.
14153 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14154 error number outputting to the target->hostio_last_error callback.
14155 (hostio_packet_error): Use FILEIO_EINVAL directly.
14156 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14157 calls to hostio_error.
14158 * hostio-errno.c: New.
14159 * server.h (hostio_last_error_from_errno): Declare.
14160 * target.h (target_ops): Add hostio_last_error member.
14161 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14162 as hostio_last_error handler.
889bf7c5 14163 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14164 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14165 (wince_hostio_last_error): New functions.
14166 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14167 as hostio_last_error handler.
14168 (win32_target_ops) [!_WIN32_WCE]: Register
14169 hostio_last_error_from_errno as hostio_last_error handler.
14170 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14171 (hostio-errno.o): New rule.
14172 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14173 * configure.srv (srv_hostio_err_objs): New variable. Default to
14174 hostio-errno.o.
14175 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14176 * configure: Regenerate.
14177
2d717e4f
DJ
141782008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14179
14180 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14181 (linux_kill, linux_detach): Clean up the process list.
14182 * remote-utils.c (remote_open): Improve port number parsing.
14183 (putpkt_binary, input_interrupt): Only send interrupts if the target
14184 is running.
14185 * server.c (extended_protocol): Make static.
14186 (attached): Define earlier.
14187 (exit_requested, response_needed, program_argv): New variables.
14188 (target_running): New.
14189 (start_inferior): Clear attached here.
14190 (attach_inferior): Set attached here.
14191 (require_running): Define.
14192 (handle_query): Use require_running and target_running. Implement
14193 "monitor exit".
14194 (handle_v_attach, handle_v_run): New.
14195 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14196 (gdbserver_usage): Update.
14197 (main): Redo argument parsing. Handle --debug and --multi. Handle
14198 --attach along with other options or after the port. Save
14199 program_argv. Support no initial program. Resynchronize
14200 communication with GDB after an error. Handle "monitor exit".
14201 Use require_running and target_running. Always allow the extended
14202 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14203 restart in extended mode.
14204 * README: Refer to the GDB manual. Update --attach usage.
14205
7407e2de
AS
142062007-12-20 Andreas Schwab <schwab@suse.de>
14207
14208 * linux-low.c (STACK_SIZE): Define.
14209 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14210 (linux_test_for_tracefork): Likewise.
14211
b65d95c5
DJ
142122007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14213
14214 * linux-low.c (linux_wait_for_event): Update messages. Do not
14215 reinsert auto-delete breakpoints.
14216 * mem-break.c (struct breakpoint): Change return type of handler to
14217 int.
14218 (set_breakpoint_at): Update handler type.
14219 (reinsert_breakpoint_handler): Return 1 instead of calling
14220 delete_breakpoint.
14221 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14222 setting a new one.
14223 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14224 * mem-break.h (set_breakpoint_at): Update handler type.
14225 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14226 * win32-low.c (auto_delete_breakpoint): New.
14227 (get_child_debug_event): Use it.
14228
4e799345
DJ
142292007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14230
14231 * configure.ac: Check for pread and pwrite.
14232 * hostio.c (handle_pread): Fall back to lseek and read.
14233 (handle_pwrite): Fall back to lseek and write.
14234 * config.in, configure: Regenerated.
14235
27524b67
DJ
142362007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14237
14238 * server.c (myresume): Add own_buf argument.
14239 (main): Update calls.
14240
a20d5e98
DJ
142412007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14242
14243 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14244 * remote-utils.c (remote_open): Do not call disable_async_io.
14245 (block_async_io): Delete.
14246 (unblock_async_io): Make static.
14247 (initialize_async_io): New.
14248 * server.c (handle_v_cont): Handle async I/O here.
14249 (myresume): Likewise. Move other common resume tasks here...
14250 (main): ... from here. Call initialize_async_io. Disable async
14251 I/O before the main loop.
14252 * server.h (initialize_async_io): Declare.
14253 (block_async_io, unblock_async_io): Delete prototypes.
14254 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14255
b79d787e
DJ
142562007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14257
14258 * remote-utils.c (readchar): Allow binary data in received messages.
14259
d97903b2
PA
142602007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14261
14262 * win32-low.c (attaching): New global.
14263 (win32_create_inferior): Clear the `attaching' global.
14264 (win32_attach): Set the `attaching' global.
14265 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14266 attaching. Only set a breakpoint at the entry point if not
14267 attaching.
14268
311de423
PA
142692007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14270
14271 * server.c (main): Don't report dll events on the initial
14272 connection on attaches.
14273
6c2d16d2
PA
142742007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14275
14276 * server.c (main): Relax numerical bases supported for the pid of
14277 the --attach command line argument.
14278
5ca906e6
PA
142792007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14280
14281 * win32-low.c (win32_attach): Call OpenProcess before
14282 DebugActiveProcess, not after. Add last error output to error
14283 call.
14284
9c6c8194
PA
142852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14286
14287 * win32-low.c (win32_get_thread_context)
14288 (win32_set_thread_context): New functions.
14289 (thread_rec): Use win32_get_thread_context.
14290 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14291 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14292 field.
14293
4d5d1aaa
PA
142942007-12-03 Leo Zayas
14295 Pedro Alves <pedro_alves@portugalmail.pt>
14296
14297 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14298 global variables.
14299 (child_add_thread): Minor cleanup.
14300 (child_continue): Resume artificially suspended threads before
14301 calling ContinueDebugEvent.
14302 (suspend_one_thread): New.
14303 (fake_breakpoint_event): New.
14304 (get_child_debug_event): Change return type to int. Check here if
14305 gdb sent an interrupt request. If a soft interrupt was requested,
14306 fake a breakpoint event. Return 0 if there is no event to handle,
14307 and 1 otherwise.
14308 (win32_wait): Don't check here if gdb sent an interrupt request.
14309 Ensure there is a valid event to handle.
14310 (win32_request_interrupt): Add soft interruption method as last
14311 resort.
14312
c436e841
PA
143132007-12-03 Leo Zayas
14314 Pedro Alves <pedro_alves@portugalmail.pt>
14315
14316 * win32-low.h (win32_thread_info): Add descriptions to the
14317 structure members. Replace `suspend_count' counter by a
14318 `suspended' flag.
14319 * win32-low.c (thread_rec): Update condition of when to get the
14320 context from the inferior. Rely on ContextFlags being set if it
14321 has already been retrieved. Only suspend the inferior thread if
14322 we haven't already. Warn if that fails.
14323 (continue_one_thread): s/suspend_count/suspended/. Only call
14324 ResumeThread once. Warn if that fails.
14325
e7b5fa67
PA
143262007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14327
14328 * win32-low.c (win32_wait): Don't read from the inferior when it
14329 has already exited.
14330
a385171d
PA
143312007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14332
14333 * Makefile.in (win32_low_h): New variable.
14334 (win32-low.o): Add dependency on $(win32_low_h).
14335 (win32-arm-low.o, win32-i386-low.o): New rules.
14336
f80c84b3
DJ
143372007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14338
14339 * hostio.c: Correct copyright year.
14340
a6b151f1
DJ
143412007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14342
14343 * Makefile.in (OBS): Add hostio.o.
14344 (hostio.o): New rule.
14345 * server.h (handle_vFile): Declare.
14346 * hostio.c: New file.
14347 * server.c (handle_v_requests): Take packet_len and new_packet_len
14348 for binary packets. Call handle_vFile.
14349 (main): Update call to handle_v_requests.
14350
f9387fc3
DJ
143512007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14352
14353 * linux-low.c: Include <sched.h>.
14354
51c2684e
DJ
143552007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14356
14357 * linux-low.c (linux_tracefork_grandchild): New.
14358 (linux_tracefork_child): Use clone.
14359 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14360
75f83163
JB
143612007-10-31 Joel Brobecker <brobecker@adacore.com>
14362
14363 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14364
da5898ce
DJ
143652007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14366
14367 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14368
24a09b5f
DJ
143692007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14370
14371 * inferiors.c (change_inferior_id): Delete.
14372 (add_pid_to_list, pull_pid_from_list): New.
14373 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14374 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14375 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14376 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14377 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14378 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14379 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14380 (using_threads): Always set to 1.
14381 (handle_extended_wait): New.
14382 (add_process): Do not set TID.
14383 (linux_create_inferior): Set must_set_ptrace_flags.
14384 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14385 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14386 (linux_thread_alive): Rename TID argument to LWPID.
14387 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14388 (linux_wait_for_event): Do not use TID or check using_threads. Update
14389 call to dead_thread_notify. Call handle_extended_wait.
14390 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14391 (send_sigstop): Delete sigstop_sent.
14392 (wait_for_sigstop): Avoid TID.
14393 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14394 (linux_test_for_tracefork): New.
14395 (linux_lookup_signals): Use thread_db_active and
14396 linux_supports_tracefork_flag.
14397 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14398 * linux-low.h (get_process_thread): Avoid TID.
14399 (struct process_ifo): Move thread_known and tid to the end. Remove
14400 sigstop_sent.
14401 (linux_attach_lwp, thread_db_init): Update prototypes.
14402 * server.h (change_inferior_id): Delete prototype.
14403 (add_pid_to_list, pull_pid_from_list): New prototypes.
14404 * thread-db.c (thread_db_use_events): New.
14405 (find_first_thread): Rename to...
14406 (find_one_thread): ...this. Update callers and messages. Do not
14407 call fatal. Check thread_db_use_events. Do not call
14408 change_inferior_id or new_thread_notify.
14409 (maybe_attach_thread): Update. Do not call new_thread_notify.
14410 (thread_db_init): Set thread_db_use_events. Check use_events.
14411 * utils.c (fatal, warning): Correct message prefix.
14412
30ed0a8f
DJ
144132007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14414
14415 * Makefile.in (clean): Remove new files.
14416 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14417 (powerpc-64.o, powerpc-64.c): New rules.
14418 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14419 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14420 with SPE.
14421 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14422 SPE targets.
14423 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14424 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14425 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14426 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14427 (target_regsets): Add AltiVec and SPE register sets.
14428 * configure.ac: Check for AltiVec and SPE.
14429 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14430 (ppc_fill_vrregset, ppc_store_vrregset): New.
14431 (target_regsets): Add AltiVec register set.
14432 * configure: Regenerated.
14433
fd462a61
DJ
144342007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14435
14436 * linux-low.c (O_LARGEFILE): Define.
14437 (linux_read_memory): Use /proc/PID/mem.
14438 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14439 * configure, config.in: Regenerated.
14440
69f223ed
DJ
144412007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14442
14443 * linux-low.c (linux_wait_for_event): Do not pass signals while
14444 single-stepping.
14445
aec18585
PA
144462007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14447
14448 * win32-low.c (create_process): New.
14449 (win32_create_inferior): Use create_process instead of
14450 CreateProcess. If create_process failed retry appending an ".exe"
14451 suffix. Store the GetLastError result immediatelly after
14452 create_process calls and use it on the call to error.
14453
34d86ddd
PA
144542007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14455
14456 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14457
5a0e3bd0
JB
144582007-08-23 Joel Brobecker <brobecker@adacore.com>
14459
14460 * configure.ac: Switch license to GPLv3.
14461
f88c79e6
MS
144622007-08-01 Michael Snyder <msnyder@access-company.com>
14463
14464 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14465
6b3d9b83
PA
144662007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14467
14468 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14469 typedef.
14470 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14471 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14472 CloseToolhelp32Snapshot.
14473 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14474 CloseToolhelp32Snapshot.
14475
c588c53c
MS
144762007-07-27 Michael Snyder <michael.snyder@access-company.com>
14477
14478 * server.c (main): Check for inferior exit before main loop.
14479
aa0403d9
PA
144802007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14481
14482 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14483 instead of on tmp_desc.
14484
255e7678
DJ
144852007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14486 Daniel Jacobowitz <dan@codesourcery.com>
14487
14488 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14489 (add_thread): Minor cleanups.
14490 (clear_inferiors): Move lower in the file. Clear the DLL
14491 list.
14492 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14493 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14494 (xml_escape_text): New.
14495 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14496 for qSupported.
14497 (handle_v_cont): Report errors.
14498 (gdbserver_version): Update.
14499 (main): Correct size of own_buf. Do not report initial DLL events.
14500 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14501 (unloaded_dll, xml_escape_text): New.
14502 * win32-low.c (enum target_waitkind): Update comments.
14503 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14504 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14505 (win32_EnumProcessModules, win32_GetModuleInformation)
14506 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14507 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14508 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14509 (win32_Module32First, win32_Module32Next, load_toolhelp)
14510 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14511 (get_child_debug_event): Handle DLL events.
14512 (win32_wait): Likewise.
14513
0d37add9
DJ
145142007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14515
14516 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14517 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14518
45e2715e
PA
145192007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14520
14521 * win32-low.c (handle_output_debug_string): Ignore event if not
14522 waiting.
14523
c5674cf1
PA
145242007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14525
14526 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14527
2bbe3cc1
DJ
145282007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14529
14530 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14531
ae13219e
DJ
145322007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14533
14534 * inferiors.c (change_inferior_id): Add comment.
14535 * linux-low.c (check_removed_breakpoint): Add an early
14536 prototype. Improve debug output.
14537 (linux_attach): Doc update.
14538 (linux_detach_one_process, linux_detach): Clean up before releasing
14539 each process.
14540 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14541 * linux-low.h (struct process_info): Doc improvement.
14542 * mem-break.c (delete_all_breakpoints): New.
14543 * mem-break.h (delete_all_breakpoints): New prototype.
14544 * thread-db.c (find_first_thread): New.
14545 (thread_db_create_event): Call it instead of
14546 thread_db_find_new_threads. Clean up unused variables.
14547 (maybe_attach_thread): Remove first thread handling.
14548 (thread_db_find_new_threads): Use find_first_thread.
14549 (thread_db_get_tls_address): Likewise.
14550
4105de34
DJ
145512007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14552
14553 * thread-db.c (thread_db_find_new_threads): Add prototype.
14554 (thread_db_create_event): Check for the main thread before adding
14555 a new thread.
14556 (maybe_attach_thread): Only enable event reporting if TID == 0.
14557 (thread_db_get_tls_address): Check for new threads.
14558
2b876972
DJ
145592007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14560
14561 * linux-low.c (linux_create_inferior): Try execv before execvp.
14562 * spu-low.c (spu_create_inferior): Likewise.
14563
7a245884
DJ
145642007-06-13 Mike Frysinger <vapier@gentoo.org>
14565
14566 * linux-low.c (linux_create_inferior): Change execv to execvp.
14567 * spu-low.c (spu_create_inferior): Likewies.
14568
117ce543
DJ
145692007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14570
14571 * Makefile.in (clean): Clean new files instead of deleted ones.
14572 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14573 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14574 rules.
14575 * configure.srv: Specify XML files and new regformats for MIPS and
14576 MIPS64 GNU/Linux.
14577 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14578 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14579 an entry for the restart register.
14580 (mips_cannot_fetch_register, mips_cannot_store_register)
14581 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14582 register names to match the XML descriptions.
14583 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14584 restart register instead of $0.
14585
0e7f50da
UW
145862007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14587 Markus Deuling <deuling@de.ibm.com>
14588
14589 * remote-utils.c (decode_xfer_write): New function.
14590 * server.h (decode_xfer_write): Add prototype.
14591 * server.c (handle_query): Add PACKET_LEN argument. Support
14592 qXfer:spu:read and qXfer:spu:write packets.
14593 (main): Pass packet_len to handle_query.
14594 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14595 * target.h (target_ops): Add qxfer_spu.
14596
374c1d38
UW
145972007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14598
14599 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14600 accessing non-seekable spufs files.
14601
bb63802a
UW
146022007-05-16 Markus Deuling <deuling@de.ibm.com>
14603
889bf7c5 14604 * server.c (handle_query): Add reply for qC packet.
bb63802a 14605
7390519e
PA
146062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14607 Leo Zayas <lerele@champenstudios@com>
14608
14609 * server.h (check_remote_input_interrupt_request): New function.
14610 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14611 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14612 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14613 (check_remote_input_interrupt_request): New function.
14614 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14615 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14616 winapi_GenerateConsoleCtrlEvent): New typedefs.
14617 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14618 to 250 ms.
14619 (win32_wait): Check for remote interrupt request
14620 with check_remote_input_interrupt_request.
14621 (win32_request_interrupt): New function.
14622 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14623
34b34921
PA
146242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14625
14626 * win32-low.c (debug_registers_changed,
14627 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14628 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14629 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14630 (thread_rec): Get context using the low target.
14631 (child_add_thread): Call thread_added on the low target,
14632 which does the same thing.
14633 (regptr): Delete.
14634 (do_initial_child_stuff): Remove debug registers references.
14635 Set context using the low target. Resume threads after
14636 setting the contexts.
14637 (child_continue): Remove dead variable. Remove debug
14638 registers references.
14639 (child_fetch_inferior_registers): Go through the low target.
14640 (do_child_store_inferior_registers): Remove.
14641 (child_store_inferior_registers): Go through the low target.
14642 (win32_resume): Remove debug registers references.
14643 Set context using the low target.
14644 (handle_exception): Change return type to void. Don't record
14645 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14646 first chance exception.
889bf7c5 14647 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14648 goto loop. Always return after waiting for debug event.
14649 (win32_wait): Convert to switch statement. Handle spurious
14650 events.
14651
14652 * win32-i386-low.c (debug_registers_changed,
14653 debug_registers_used): New.
14654 (initial_stuff): Rename to ...
14655 (i386_initial_stuff): ... this. Clear debug registers
14656 state variables.
14657 (store_debug_registers): Delete.
14658 (i386_get_thread_context): New.
14659 (load_debug_registers): Delete.
14660 (i386_set_thread_context): New.
14661 (i386_thread_added): New.
14662 (single_step): Rename to ...
14663 (i386_single_step): ... this.
14664 (do_fetch_inferior_registers): Rename to ...
14665 (i386_fetch_inferior_register): ... this.
14666 (i386_store_inferior_register): New.
14667 (the_low_target): Adapt to new interface.
14668
14669 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14670 (arm_get_thread_context): New.
14671 (arm_set_thread_context): New.
14672 (regptr): New.
14673 (do_fetch_inferior_registers): Rename to ...
14674 (arm_fetch_inferior_register): ... this.
14675 (arm_store_inferior_register): New.
14676 (arm_wince_breakpoint): Reimplement as unsigned long.
14677 (arm_wince_breakpoint_len): Define.
14678 (the_low_target): Adapt to new interface.
14679
14680 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14681 load_debug_registers. Add get_thread_context, set_thread_context,
14682 thread_added and store_inferior_register. Rename
14683 fetch_inferior_registers to fetch_inferior_register.
14684 (regptr): Remove declaration.
14685
dd6953e1
PA
146862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14687
14688 * linux-low.c (linux_detach): Change return type to int. Return 0.
14689 * spu-low.c (spu_detach): Likewise.
14690
444d6139
PA
146912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14692
14693 * target.h (target_ops): Change return type of detach to int.
14694 Add join.
14695 (join_inferior): New.
14696 * server.c (main): Don't skip detach support on mingw32.
14697 If the inferior doesn't support detaching return error.
14698 Call join_inferior instead of using waitpid.
14699 * linux-low.c (linux_join): New.
14700 (linux_target_op): Add linux_join.
14701 * spu-low.c (spu_join): New.
14702 (spu_target_ops): Add spu_join.
14703 * win32-low.c (win32_detach): Adapt to new interface.
14704 Reopen current_process_handle before detaching. Issue a child
14705 resume before detaching.
14706 (win32_join): New.
14707 (win32_target_op): Add win32_join.
14708
1d5315fe
PA
147092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14710
14711 * win32-low.c (win32-attach): Fix return value.
14712 * target.h (target_ops): Describe ATTACH return values.
14713
bf914831
PA
147142007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14715
14716 * win32-low.c (GETPROCADDRESS): Define.
14717 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14718 (winapi_DebugSetProcessKillOnExit): Likewise.
14719 (win32_create_inferior): Force usage of ansi CreateProcessA.
14720 (win32_attach): Use GETPROCADDRESS.
14721 (win32_detach): Likewise.
14722
f72f3e60
PA
147232007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14724
14725 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14726
ed50f18f
PA
147272007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14728
14729 * win32-low.c: Commit leftover changes from 2007-03-29.
14730
0c2ead7e
DJ
147312007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14732
14733 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14734 fields short instead of int. Add explicit padding.
14735 (i387_cache_to_fsave): Remove unnecessary casts.
14736 (i387_fsave_to_cache): Doc fix.
14737 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14738
73725ff3
DJ
147392007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14740
14741 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14742 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14743
d99f33d8
PA
147442007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14745
14746 * configure.srv (arm*-*-mingw32ce*): Move near the other
14747 arm targets.
14748
68070c10
PA
147492007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14750
2482afc6 14751 * configure.ac: Add errno checking.
68070c10
PA
14752 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14753 sys/file.h and malloc.h.
14754 (AC_CHECK_DECLS): Add perror.
14755 (srv_mingwce): Handle.
2482afc6 14756 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14757 win32-i386-low.o to srv_tgtobj.
14758 (i[34567]86-*-mingw*): Likewise.
14759 (arm*-*-mingw32ce*): Add case.
14760 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14761 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14762 [__MINGW32CE__] (strerror): New function.
14763 [__MINGW32CE__] (errno): Define to GetLastError.
14764 [__MINGW32CE__] (COUNTOF): New macro.
14765 (remote_open): Remove extra close call.
14766 * mem-break.c (delete_breakpoint_at): New function.
14767 * mem-break.h (delete_breakpoint_at): Declare.
14768 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14769 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14770 [USE_WIN32API] (read, write): Add char* casts.
14771 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14772 * server.h: Include wincecompat.h on Windows CE.
14773 [HAVE_ERRNO_H]: Check.
14774 (perror): Declare if not declared.
14775 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14776 (perror_with_name): Remove errno declaration.
14777 * wincecompat.h: New.
14778 * wincecompat.c: New.
14779 * win32-low.h: New.
14780 * win32-arm-low.c: New.
14781 * win32-i386-low.c: New.
14782 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14783 (OUTMSG2): Make it safe.
14784 (_T): New macro.
14785 (COUNTOF): New macro.
14786 (NUM_REGS): Get it from the low target.
14787 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14788 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14789 (thread_rec): Let low target handle debug registers.
14790 (child_add_thread): Likewise.
14791 (child_init_thread_list): Likewise.
14792 (continue_one_thread): Likewise.
14793 (regptr): New.
14794 (do_child_fetch_inferior_registers): Move to ...
14795 * win32-i386-low.c: ... here, and rename to ...
14796 (do_fetch_inferior_registers): ... this.
889bf7c5 14797 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14798 Go through the low target.
14799 (do_child_store_inferior_registers): Use regptr.
14800 (strwinerror): New function.
14801 (win32_create_inferior): Handle Windows CE.
14802 Use strwinerror instead of strerror on Windows error
14803 codes. Add program to the error output.
14804 Don't close the main thread handle on Windows CE.
14805 (win32_attach): Use coredll.dll on Windows CE.
14806 (win32_kill): Close current process and current
14807 thread handles.
14808 (win32_detach): Use coredll.dll on Windows CE.
14809 (win32_resume): Let low target handle debug registers, and
14810 step request.
14811 (handle_exception): Add/Remove initial breakpoint. Avoid
14812 non-existant WSTOPSIG on Windows CE.
14813 (win32_read_inferior_memory): Cast to remove warning.
14814 (win32_arch_string): Go through the low target.
14815 (initialize_low): Call set_breakpoint_data with the low
14816 target's breakpoint.
14817 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14818 FOP_REGNUM, mappings): Move to ...
14819 * win32-i386-low.c: ... here.
14820 * win32-low.c (win32_thread_info): Move to ...
14821 * win32-low.h: ... here.
14822 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14823 win32-arm-low.c and wincecompat.c.
14824 (all:): Add $EXEEXT.
14825 (install-only:): Likewise.
14826 (gdbserver:): Likewise.
14827 (gdbreplay:): Likewise.
14828 * config.in: Regenerate.
14829 * configure: Regenerate.
14830
41093d81
PA
148312007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14832
14833 * win32-low.c: Rename typedef thread_info to
14834 win32_thread_info throughout.
14835
544afa54
PA
148362007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14837
14838 * win32-i386-low.c: Rename to ...
14839 * win32-low.c: ... this.
14840 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14841 * Makefile.in: Likewise.
14842
bce7165d
PA
148432007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14844
14845 * remote-utils.c (monitor_output): Constify msg parameter.
14846 * server.h (monitor_output): Likewise.
14847 * win32-i386-low.c (handle_output_debug_string): New.
14848 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14849 handle_output_debug_string.
14850 (get_child_debug_event): Likewise.
14851
506c7aa0
DJ
148522007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14853
14854 * server.c (main): Correct strtoul check.
14855
42c81e2a
DJ
148562007-03-27 Jon Ringle <jon@ringle.org>
14857
14858 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14859
9453113a
DJ
148602007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14861
14862 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14863
64a69107
DJ
148642007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14865
14866 * terminal.h: Check HAVE_SGTTY_H.
14867
148682007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14869
14870 * remote-utils.c (remote_open): Print out the assigned port number.
14871
c74d0ad8
DJ
148722007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14873
14874 * remote-utils.c (monitor_output): New function.
14875 * server.c (debug_threads): Define here.
14876 (monitor_show_help): New function.
14877 (handle_query): Handle qRcmd.
14878 (main): Do not handle 'd' packet.
14879 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14880 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14881 of debug_threads.
14882
de7c3b4a
PA
148832007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14884
14885 * Makefile.in (EXEEXT): New.
14886 (clean): Use $(EXEEXT).
14887
ef57601b
PA
148882007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14889
14890 * target.h (target_ops): Rename send_signal to request_interrupt,
14891 and remove enum target_signal parameter.
14892 * linux-low.c (linux_request_interrupt): Rename from
14893 linux_send_signal, and always send SIGINT.
14894 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14895 and always send SIGINT.
14896 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14897 of send_signal.
14898 (input_interrupt): Likewise.
14899
820f2bda
PA
149002007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14901
14902 * server.c (get_features_xml): Check if target implemented
14903 arch_string.
14904 * win32-i386-low.c (win32_arch_string): New.
14905 (win32_target_ops): Add win32_arch_string as arch_string member.
14906
ab39bf24
UW
149072007-02-22 Markus Deuling <deuling@de.ibm.com>
14908
14909 * spu-low.c (spu_arch_string): New.
14910 (spu_target_ops): Add spu_arch_string.
14911
61ff6e04
DJ
149122007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14913
14914 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14915 * configure.ac: Do not check for terminal.h.
14916 * configure, config.in: Regenerated.
14917
fb1e4ffc
DJ
149182007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14919
14920 * Makefile.in (OBS): Add $(XML_BUILTIN).
14921 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14922 (clean): Update.
14923 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14924 (arm-with-iwmmxt.c): New.
14925 * config.in, configure: Regenerate.
14926 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14927 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14928 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14929 (arm*-*-linux*): Add iWMMXt and regset support.
14930 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14931 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14932 (arm_store_wmmxregset, target_regsets): New.
14933 * server.c (get_features_xml): Take annex argument. Check builtin
14934 XML documents.
14935 (handle_query): Handle multiple annexes.
14936
0f48aa01
DJ
149372007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14938
14939 * remote-utils.c [USE_WIN32API] (read, write): Define.
14940 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14941 write.
14942
23181151
DJ
149432007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14944
14945 * linux-i386-low.c (the_low_target): Set arch_string.
14946 * linux-x86-64-low.c (the_low_target): Likewise.
14947 * linux-low.c (linux_arch_string): New.
14948 (linux_target_ops): Add it.
14949 * linux-low.h (struct linux_target_ops): Add arch_string.
14950 * server.c (write_qxfer_response): Use const void * for DATA.
14951 (get_features_xml): New.
14952 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14953 * target.h (struct target_ops): Add arch_string method.
14954
9d606399
DJ
149552007-01-03 Denis Pilat <denis.pilat@st.com>
14956 Daniel Jacobowitz <dan@codesourcery.com>
14957
14958 * linux-low.c (linux_kill): Handle being called with no threads.
14959 * win32-i386-low.c (win32_kill): Likewise.
14960 (get_child_debug_event): Clear current_process_handle.
14961
149622006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14963 Daniel Jacobowitz <dan@codesourcery.com>
14964
14965 * remote-utils.c (remote_open): Check the type of specified
14966 serial port devices before opening them.
14967 * server.c (main): Kill the inferior if an error occurs during
14968 the first remote_open.
14969
a5e13d24
DJ
149702006-12-05 Markus Deuling <deuling@de.ibm.com>
14971
14972 * README: Update supported targets.
14973
186947f7
DJ
149742006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14975
14976 * Makefile.in (clean): Remove reg-mips64.c.
14977 (reg-mips64.c, reg-mips64.o): New rules.
14978 * configure.srv: Handle mips64. Include regset support for mips.
14979 * linux-mips-low.c (union mips_register): New.
14980 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14981 (mips_breakpoint, mips_breakpoint_at): Use int.
14982 (mips_collect_register, mips_supply_register)
14983 (mips_collect_register_32bit, mips_supply_register_32bit)
14984 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14985 (mips_store_fpregset, target_regsets): New.
14986 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14987
a13e2c95
UW
149882006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14989
14990 * configure.srv: Add target "spu*-*-*".
14991 * Makefile.in (clean): Remove reg-spu.c.
14992 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14993 * spu-low.c: New file.
14994
cb7283db
DJ
149952006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14996
14997 * configure.ac: Correct td_thr_tls_get_addr test.
14998 * configure: Regenerated.
14999
89be2091
DJ
150002006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15001
15002 * linux-low.c (linux_wait_for_event): Reformat. Use the
15003 pass_signals array.
15004 * remote-utils.c (decode_address_to_semicolon): New.
15005 * server.c (pass_signals, handle_general_set): New.
15006 (handle_query): Mention QPassSignals for qSupported.
15007 (main): Call handle_general_set.
15008 * server.h (pass_signals, decode_address_to_semicolon): New.
15009
000ef4f0
DJ
150102006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15011
15012 * server.c (handle_query): Correct error handling for read_auxv.
15013
b7149293
UW
150142005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15015
15016 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15017 and srv_linux_thread_db to yes.
15018 * linux-s390-low.c (s390_fill_gregset): New function.
15019 (target_regsets): Define data structure.
15020
dae5f5cf
DJ
150212006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15022
15023 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15024 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15025 * config.in, configure: Regenerated.
15026 * inferiors.c (gdb_id_to_thread): New function.
15027 (gdb_id_to_thread_id): Use it.
15028 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15029 * linux-low.h (struct process_info): Add th member.
15030 (thread_db_get_tls_address): New prototype.
15031 * remote-utils.c (decode_address): Make non-static.
15032 * server.c (handle_query): Handle qGetTLSAddr.
15033 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15034 * target.h (struct target_ops): Add get_tls_address.
15035 * thread-db.c (maybe_attach_thread): Save the thread handle.
15036 (thread_db_get_tls_address): New.
15037
32ca6d61
DJ
150382006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15039
15040 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15041 (linux_resume_one_process): Take a siginfo_t *. Update all
15042 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15043 (struct pending_signals): Add a siginfo_t.
15044 (linux_wait_for_process): Always set last_status.
15045 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15046 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15047 * linux-low.h (struct process_info): Add last_status.
15048
5ffff7c1
DJ
150492006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15050
15051 * remote-utils.c (try_rle): New function.
15052 (putpkt_binary): Use it.
15053
8695c747
DJ
150542006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15055
15056 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15057 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15058 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15059 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15060 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15061 point registers.
15062
290fadea
RS
150632006-08-08 Richard Sandiford <richard@codesourcery.com>
15064
15065 * server.c (terminal_fd): New variable.
15066 (old_foreground_pgrp): Likewise.
15067 (restore_old_foreground_pgrp): New function.
15068 (start_inferior): Record the terminal file descriptor in terminal_fd
15069 and its original foreground group in old_foreground_pgrp. Register
15070 restore_old_foreground_pgrp with atexit().
15071
9f2e1e63
DJ
150722006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15073
15074 * server.c (handle_query): Correct qPart to qXfer.
15075
b80864fb
DJ
150762006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15077
15078 * configure.ac: Check for more headers which are missing on
15079 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15080 * configure.srv: Add Cygwin and mingw32.
15081 * remote-utils.c: Don't include headers unconditionally which
15082 are missing on mingw32. Include <winsock.h> for mingw32.
15083 (remote_open): Adjust for mingw32 support. Flush
15084 standard error after writing to it.
15085 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15086 (unblock_async_io, enable_async_io, disable_async_io)
15087 (readchar, getpkt): Update for Winsock support.
15088 (prepare_resume_reply): Expect a protocol signal number.
15089 * server.c: Disable <sys/wait.h> on mingw32.
15090 (start_inferior): Adjust for mingw32 support. Flush
15091 standard error after writing to it.
15092 (attach_inferior): Likewise. Use protocol signal
15093 numbers.
15094 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15095 and names.
15096 * win32-i386-low.c: New file.
15097 * Makefile.in (XM_CLIBS): Set.
15098 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15099 (win32-i386-low.o): New dependency rule.
15100 * linux-low.c (linux_wait): Use target signal numbers.
15101 * target.h (struct target_ops): Doc fix.
15102 * server.h (target_signal_to_name): New prototype.
15103 * gdbreplay.c: Don't include headers unconditionally which
15104 are missing on mingw32. Include <winsock.h> for mingw32.
15105 (remote_close, remote_open): Adjust for Winsock support.
15106 * configure, config.in: Regenerated.
15107
0876f84a
DJ
151082006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15109
15110 * server.c (decode_xfer_read, write_qxfer_response): New.
15111 (handle_query): Take a packet length argument. Handle
15112 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15113 the qSupported response.
15114 (main): Update call to handle_query.
15115
01f9e8fa
DJ
151162006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15117
15118 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15119 (putpkt_binary): Renamed from putpkt and adjusted for binary
15120 data.
15121 (putpkt): New wrapper for putpkt_binary.
15122 (readchar): Don't mask off the high bit.
15123 (decode_X_packet): New function.
15124 * server.c (main): Call putpkt_binary if a handler sets the packet
15125 length. Save the length of the incoming packet. Handle 'X'.
15126 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15127
be2a5f71
DJ
151282006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15129
15130 * server.c (handle_query): Handle qSupported.
15131
ea025f5f
DJ
151322006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15133
15134 * remote-utils.c (all_symbols_looked_up): New variable.
15135 (look_up_one_symbol): Check it.
15136 * server.h (look_up_one_symbol): New declaration.
15137 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15138
9308fc88
DJ
151392006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15140
15141 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15142 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15143 (PTRACE_GET_THREAD_AREA): Define.
15144 (ps_get_thread_area): New function.
15145
52fb6437
NS
151462006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15147
15148 * configure.srv (m68k*-*-uclinux*): New target.
15149 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15150 (linux_resume_one_process): Remove extraneous cast.
15151 (linux_read_offsets): New.
15152 (linux_target_op): Add linux_read_offsets on mmuless systems.
15153 * server.c (handle_query): Add qOffsets logic.
15154 * target.h (struct target_ops): Add read_offsets.
15155
21b0f40c
DJ
151562006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15157
15158 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15159 (PTRACE_GET_THREAD_AREA): Define.
15160 (ps_get_thread_area): New function.
15161 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15162 (linux-x86-64-low.o): Update.
15163
0050a760
DJ
151642006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15165
15166 * configure.ac: Remove checks for prfpregset_t.
15167 * gdb_proc_service.h: New file.
15168 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15169 new "gdb_proc_service.h".
15170 * proc-service.c: Likewise.
15171 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15172 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15173 * Makefile.in (gdb_proc_service_h): Updated.
15174 * configure, config.in: Regenerated.
15175
b92a518e
DJ
151762006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15177
15178 * remote-utils.c (prepare_resume_reply): Move declaration
15179 of gdb_id_from_wait to the top of the block.
15180
545587ee
DJ
151812006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15182
15183 * linux-low.c (regsets_store_inferior_registers): Read the regset
15184 from the target before filling it.
15185
9db87ebd
DJ
151862006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15187
15188 * server.c (attach_inferior): Return SIGTRAP for a successful
15189 attach.
15190
dd24457d
DJ
151912006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15192
15193 * Makefile.in (OBS): Add version.o.
15194 (STAGESTUFF): Delete.
15195 (version.o): Add dependencies.
15196 (version.c): Replace rule.
15197 (clean): Remove version.c.
15198 * server.c (gdbserver_version): New.
15199 (gdbserver_usage): Use printf.
15200 (main): Handle --version and --help.
15201 * server.h (version, host_name): Add declarations.
15202
6f0f660e
EZ
152032005-12-23 Eli Zaretskii <eliz@gnu.org>
15204
889bf7c5
PA
15205 * linux-arm-low.c:
15206 * linux-arm-low.c:
15207 * inferiors.c:
15208 * i387-fp.h:
15209 * i387-fp.c:
15210 * gdbreplay.c:
15211 * regcache.c:
15212 * proc-service.c:
15213 * mem-break.h:
15214 * mem-break.c:
15215 * linux-x86-64-low.c:
15216 * linux-sh-low.c:
15217 * linux-s390-low.c:
15218 * linux-ppc64-low.c:
15219 * linux-ppc-low.c:
15220 * linux-mips-low.c:
15221 * linux-m68k-low.c:
15222 * linux-m32r-low.c:
15223 * linux-low.h:
15224 * linux-low.c:
15225 * linux-ia64-low.c:
15226 * linux-i386-low.c:
15227 * linux-crisv32-low.c:
15228 * thread-db.c:
15229 * terminal.h:
15230 * target.h:
15231 * target.c:
15232 * server.h:
15233 * server.c:
15234 * remote-utils.c:
15235 * regcache.h:
15236 * utils.c:
15237 * Makefile.in:
15238 * configure.ac:
6f0f660e
EZ
15239 * gdbserver.1: Add (C) after Copyright. Update the FSF
15240 address.
15241
9d1fb177
DJ
152422005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15243
15244 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15245 (arm_breakpoint_at): Recognize both breakpoints.
15246 (the_low_target): Use the correct breakpoint instruction.
15247
011a70c2
DJ
152482005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15249
15250 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15251 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15252 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15253 (the_low_target): Update.
15254
7fb85e41
AS
152552005-10-25 Andreas Schwab <schwab@suse.de>
15256
15257 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15258
15259 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15260 (ia64_num_regs): Reduce to 462.
15261
3db0444b
DJ
152622005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15263
15264 * acinclude.m4: Correct quoting.
15265 * aclocal.m4: Regenerated.
15266
15267 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15268 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15269 (thread_db_init): Call thread_db_err_str.
15270 * configure.ac: Check for TD_VERSION.
15271 * config.in, configure: Regenerated.
15272
bee0189a
DJ
152732005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15274
15275 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15276
e9d25b98
DJ
152772005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15278
15279 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15280 is not available. Define HAVE_PTRACE_GETREGS if it is.
15281 * config.in, configure: Regenerated.
15282 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15283 * linux-i386-low.c, linux-m68k-low.c: Update to use
15284 HAVE_PTRACE_GETREGS.
15285 * linux-low.c (regsets_fetch_inferior_registers)
15286 (regsets_store_inferior_registers): Only return 0 if we processed
15287 GENERAL_REGS.
15288 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15289 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15290
a06660f7
DJ
152912005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15292
15293 * inferiors.c (struct thread_info): Add gdb_id.
15294 (add_thread): Add gdb_id argument.
15295 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15296 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15297 calls to add_thread.
15298 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15299 * server.c (handle_query): Use thread_to_gdb_id.
15300 (handle_v_cont, main): Use gdb_id_to_thread_id.
15301 * server.h (add_thread): Update prototype.
15302 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15303 prototypes.
15304
5a1f5858
DJ
153052005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15306
15307 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15308 left-padded registers.
15309 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15310 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15311
e122f1f5
SE
153122005-07-01 Steve Ellcey <sje@cup.hp.com>
15313
15314 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15315 * configure: Regenerate.
15316 * config.in: Regenerate.
15317 * server.h (NEED_DECLARATION_STRERROR):
15318 Replace with !HAVE_DECL_STRERROR.
15319
d592fa2f
DJ
153202005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15321
15322 * linux-low.c (linux_wait, linux_send_signal): Don't test
15323 an unsigned long variable for > 0 if it could be MAX_ULONG.
15324 * server.c (myresume): Likewise.
15325 * target.c (set_desired_inferior): Likewise.
15326
ccbd4912
MK
153272005-06-13 Mark Kettenis <kettenis@gnu.org>
15328
15329 * configure.ac: Simplify and improve check for socklen_t.
15330 * configure, config.in: Regenerate.
15331
f450004a
DJ
153322005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15333
15334 * acconfig.h: Remove.
15335 * configure.ac: Add a test for socklen_t. Use three-argument
15336 AC_DEFINE throughout.
15337 * config.in: Regenerated using autoheader 2.59.
15338 * configure: Regenerated.
15339
15340 * gdbreplay.c (socklen_t): Provide a default.
15341 (remote_open): Use socklen_t.
15342 * remote-utils.c (socklen_t): Provide a default.
15343 (remote_open): Use socklen_t.
15344 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15345 unsigned char.
15346
15347 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15348 char for buffers.
15349 * linux-low.c (linux_read_memory, linux_write_memory)
15350 (linux_read_auxv): Likewise.
15351 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15352 (check_mem_write): Likewise.
15353 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15354 Likewise.
15355 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15356 (registers_from_string, register_data): Likewise.
15357 * server.c (handle_query, main): Likewise.
15358 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15359 (decode_M_packet): Likewise.
15360 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15361 * target.h (struct target_ops): Update read_memory, write_memory,
15362 and read_auxv.
15363 (read_inferior_memory, write_inferior_memory): Update.
15364 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15365 to unsigned char *.
15366 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15367 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15368 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15369 linux-s390-low.c, linux-sh-low.c: Update for changes in
15370 read_inferior_memory and the_low_target->breakpoint.
15371
eee84df1
DJ
153722005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15373
15374 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15375 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15376 * configure.srv: Add powerpc64-*-linux*.
15377 * linux-ppc64-low.c: New file.
15378
45b134e5
OF
153792005-05-23 Orjan Friberg <orjanf@axis.com>
15380
15381 * linux-cris-low.c: New file with support for CRIS.
15382 * linux-crisv32-low.c: Ditto for CRISv32.
15383 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15384 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15385 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15386 reg-crisv32.o, and reg-crisv32.c to make rules.
15387 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15388 recognized targets.
15389
48d93c75
UW
153902005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15391
15392 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15393 of sizeof (PTRACE_XFER_TYPE).
15394 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15395
e013ee27
OF
153962005-05-12 Orjan Friberg <orjanf@axis.com>
15397
889bf7c5 15398 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15399 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15400 pointers for hardware watchpoint support.
15401 * linux-low.h (struct linux_target_ops): Ditto.
15402 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15403 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15404 to linux_target_ops.
15405 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15406 reply packet.
15407 * server.c (main): Recognize 'Z' and 'z' packets.
15408
b0ded00b
UW
154092005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15410
15411 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15412 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15413 (the_low_target): Add new members.
15414
8643e2ad
DJ
154152005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15416
15417 * proc-service.c (ps_lgetregs): Search all_processes instead of
15418 all_threads.
15419
fc620387
DJ
154202005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15421
15422 * server.c (start_inferior): Change return type to int.
15423 (attach_inferior): Change sigptr to int *.
15424 (handle_v_cont, handle_v_requests): Change signal to int *.
15425 (main): Change signal to int.
15426
154272005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15428
15429 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15430 * configure.srv: Add m32r*-*-linux*.
15431 * linux-m32r-low.c: New file.
15432
e0e76420
DJ
154332005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15434
15435 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15436
a1928bad
DJ
154372005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15438
15439 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15440 Take unsigned long arguments for PIDs.
15441 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15442 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15443 (wait_for_sigstop, linux_resume_one_process)
15444 (regsets_fetch_inferior_registers, linux_send_signal)
15445 (linux_read_auxv): Likewise. Update the types of variables holding
15446 PIDs. Update format string specifiers.
15447 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15448 * remote-utils.c (prepare_resume_reply): Likewise.
15449 * server.c (cont_thread, general_thread, step_thread)
15450 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15451 unsigned long.
15452 (handle_query): Update format specifiers.
15453 (handle_v_cont, main): Use strtoul for thread IDs.
15454 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15455 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15456 (general_thread, step_thread, thread_from_wait)
15457 (old_thread_from_wait): Update.
15458 * target.h (struct thread_resume): Use unsigned long for THREAD.
15459 (struct target_ops): Use unsigned long for arguments to attach and
15460 thread_alive.
15461
dcdb98d2
DJ
154622005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15463
15464 * acinclude.m4: Include bfd/bfd.m4 directly.
15465 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15466 <agriffis@toolchain.org>.
15467 * aclocal.m4, configure: Regenerated.
15468
bec39cab
AC
154692005-01-07 Andrew Cagney <cagney@gnu.org>
15470
15471 * configure.ac: Rename configure.in, require autoconf 2.59.
15472 * configure: Re-generate.
15473
434c4c77
DJ
154742004-12-08 Daniel Jacobowitz <dan@debian.org>
15475
15476 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15477 LIBS when finished.
15478 * aclocal.m4: Regenerated.
15479 * configure: Regenerated.
15480
db1d3e1b
AS
154812004-11-21 Andreas Schwab <schwab@suse.de>
15482
15483 * linux-m68k-low.c (m68k_num_gregs): Define.
15484 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15485 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15486 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15487 (m68k_breakpoint_at): New. Add to the_low_target.
15488
15489 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15490 srv_linux_thread_db to yes.
15491
43360365
JB
154922004-10-20 Joel Brobecker <brobecker@gnat.com>
15493
15494 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15495 (ARCH_SET_FS): Likewise.
15496 (ARCH_GET_FS): Likewise.
15497 (ARCH_GET_GS): Likewise.
15498
fd500816
DJ
154992004-10-16 Daniel Jacobowitz <dan@debian.org>
15500
15501 * linux-i386-low.c (ps_get_thread_area): New.
15502 * linux-x86-64-low.c (ps_get_thread_area): New.
15503 * linux-low.c: Include <sys/syscall.h>.
15504 (linux_kill_one_process): Don't kill the first thread here.
15505 (linux_kill): Kill the first thread here.
15506 (kill_lwp): New function.
15507 (send_sigstop, linux_send_signal): Use it.
15508 * proc-service.c: Clean up #ifdefs.
15509 (fpregset_info): Delete.
15510 (ps_lgetregs): Update and enable implementation.
15511 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15512 implementations.
15513 * remote-utils.c (struct sym_cache, symbol_cache): New.
15514 (input_interrupt): Print a clearer message.
15515 (async_io_enabled): New variable.
15516 (enable_async_io, disable_async_io): Use it. Update comments.
15517 (look_up_one_symbol): Use the symbol cache.
15518 * thread-db.c (thread_db_look_up_symbols): New function.
15519 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15520
f6de3c42
DJ
155212004-10-16 Daniel Jacobowitz <dan@debian.org>
15522
15523 * configure.in: Test for -rdynamic.
15524 * configure: Regenerated.
15525 * Makefile (INTERNAL_LDFLAGS): New.
15526 (gdbserver, gdbreplay): Use it.
15527
2c0fc042
AC
155282004-09-02 Andrew Cagney <cagney@gnu.org>
15529
15530 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15531
075b3282
DJ
155322004-03-23 Daniel Jacobowitz <drow@mvista.com>
15533
15534 * linux-low.c (linux_wait): Clear all_processes list also.
15535
fa6a77dc
DJ
155362004-03-12 Daniel Jacobowitz <drow@mvista.com>
15537
15538 * linux-low.c: Include <errno.h>. Remove extern declaration of
15539 errno.
15540
6d782a97
DJ
155412004-03-12 Daniel Jacobowitz <drow@mvista.com>
15542
15543 * gdbreplay.c, server.h, utils.c: Update copyright years.
15544
3a7fb99b
DJ
155452004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15546
15547 * server.c (main): Print child status or termination signal from
15548 variable 'signal', not 'sig'.
15549
c3e735a6
DJ
155502004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15551
15552 * linux-low.c (linux_read_memory): Change return type to
15553 int. Check for and return error from ptrace().
15554 * target.c (read_inferior_memory): Change return type to int. Pass
15555 back return status from the_target->read_memory().
15556 * target.h (struct target_ops): Adapt *read_memory() prototype.
15557 Update comment.
15558 (read_inferior_memory): Adapt prototype.
15559 * server.c (main): Return an error packet if
15560 read_inferior_memory() returns an error.
15561
a59d1c82
DJ
155622004-03-04 Daniel Jacobowitz <drow@mvista.com>
15563
15564 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15565 Unify with other clean targets.
15566
dc3f8883
DJ
155672004-02-29 Daniel Jacobowitz <drow@mvista.com>
15568
15569 * server.c (handle_v_cont): Call set_desired_inferior.
15570
89a208da
DJ
155712004-02-29 Daniel Jacobowitz <drow@mvista.com>
15572
15573 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15574
62ea82f5
DJ
155752004-02-29 Daniel Jacobowitz <drow@mvista.com>
15576
15577 * linux-low.c (linux_wait): Unblock async I/O.
15578 (linux_resume): Block and enable async I/O.
15579 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15580 * server.h (block_async_io, unblock_async_io): Add prototypes.
15581
6910d122
DJ
155822004-02-29 Daniel Jacobowitz <drow@mvista.com>
15583
15584 * remote-utils.c (remote_open): Print a status notice after
15585 opening a TCP port.
15586 * server.c (attach_inferior): Print a status notice after
15587 attaching.
15588
155892004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15590
15591 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15592
c89dc5d4
DJ
155932004-02-26 Daniel Jacobowitz <drow@mvista.com>
15594
15595 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15596 error packet.
15597 * server.c, target.h: Update copyright years.
15598
4b8dad4a
RM
155992004-02-25 Roland McGrath <roland@redhat.com>
15600
15601 * target.h (struct target_ops): New member `read_auxv'.
15602 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15603 * linux-low.c (linux_read_auxv): New function.
15604 (linux_target_ops): Initialize `read_auxv' member to that.
15605
d7446758
JB
156062004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15607
15608 Committed by Jim Blandy <jimb@redhat.com>.
15609
15610 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15611 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15612 instead of GPR_SIZE to distiguish s390 and s390x targets.
15613
5544ad89
DJ
156142004-01-31 Daniel Jacobowitz <drow@mvista.com>
15615
15616 * linux-low.c: Update copyright year.
15617 (check_removed_breakpoint): Clear pending_is_breakpoint.
15618 (linux_set_resume_request, linux_queue_one_thread)
15619 (resume_status_pending_p): New functions.
15620 (linux_continue_one_thread): Use process->resume.
15621 (linux_resume): Only resume threads if there are no pending events.
15622 * linux-low.h (struct process_info): Add resume request
15623 pointer.
15624
2a68b70e
DJ
156252004-01-30 Daniel Jacobowitz <drow@mvista.com>
15626
15627 * regcache.c (new_register_cache): Clear the allocated register
15628 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15629
64386c31
DJ
156302003-10-13 Daniel Jacobowitz <drow@mvista.com>
15631
15632 * linux-low.c (linux_resume): Take a struct thread_resume *
15633 argument.
15634 (linux_wait): Update call.
15635 (resume_ptr): New static variable.
15636 (linux_continue_one_thread): Renamed from
15637 linux_continue_one_process. Use resume_ptr.
15638 (linux_resume): Use linux_continue_one_thread.
15639 * server.c (handle_v_cont, handle_v_requests): New functions.
15640 (myresume): New function.
15641 (main): Handle 'v' case.
15642 * target.h (struct thread_resume): New type.
15643 (struct target_ops): Change argument of "resume" to struct
15644 thread_resume *.
15645 (myresume): Delete macro.
15646
c938e9b0
L
156472003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15648
15649 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15650 (uninstall): Support DESTDIR.
15651
7f313d07
BC
15652Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15653
15654 * configure.srv: Add xscale*linux copy of arm*linux entry.
15655
3b2fc2ea
DJ
156562003-07-24 Daniel Jacobowitz <drow@mvista.com>
15657
15658 * linux-arm-low.c (arm_reinsert_addr): New function.
15659 (the_low_target): Add arm_reinsert_addr.
15660
1c0a559e
MK
156612003-07-08 Mark Kettenis <kettenis@gnu.org>
15662
15663 * mem-break.c: Remove whitespace at end of file.
15664
43d5792c
DJ
156652003-06-28 Daniel Jacobowitz <drow@mvista.com>
15666
15667 * configure.in: Check whether we need to prototype strerror.
15668 * server.h: Optionally prototype strerror.
15669 * gdbreplay.c (perror_with_name): Use strerror.
15670 * linux-low.c (linux_attach_lwp): Use strerror.
15671 * utils.c (perror_with_name): Use strerror.
15672 * config.in, configure: Regenerated.
15673
c8a86edf
DJ
156742003-06-28 Daniel Jacobowitz <drow@mvista.com>
15675
15676 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15677 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15678
73d37363
DJ
156792003-06-20 Daniel Jacobowitz <drow@mvista.com>
15680
15681 * Makefile.in (SFILES): Update.
15682 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15683 low-sun3.c: Remove files.
15684
6ad8ae5c
DJ
156852003-06-17 Daniel Jacobowitz <drow@mvista.com>
15686
15687 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15688 (linux_detach_one_process, linux_detach): New functions.
15689 (linux_target_ops): Add linux_detach.
15690 * server.c (main): Handle 'D' packet.
15691 * target.h (struct target_ops): Add "detach" member.
15692 (detach_inferior): Define.
15693
1581182a
MK
156942003-06-13 Mark Kettenis <kettenis@gnu.org>
15695
15696 From Kelley Cook <kelleycook@wideopenwest.com>:
15697 * configure.srv: Accept i[34567]86 variants.
15698
e5379b03
DJ
156992003-06-05 Daniel Jacobowitz <drow@mvista.com>
15700
15701 * linux-low.c (linux_wait_for_event): Correct comment typos.
15702 (linux_resume_one_process): Call check_removed_breakpoint.
15703 (linux_send_signal): New function.
15704 (linux_target_ops): Add linux_send_signal.
15705 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15706 of kill.
15707 * target.h (struct target_ops): Add send_signal.
15708
2ff29de4
JB
157092003-05-29 Jim Blandy <jimb@redhat.com>
15710
15711 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15712 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15713 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15714 away part of the register's value.
15715
254787d4
DJ
157162003-03-26 Daniel Jacobowitz <drow@mvista.com>
15717
15718 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15719 (linux_wait_for_event, linux_init_signals): Likewise.
15720
94e10508
DJ
157212003-03-17 Daniel Jacobowitz <drow@mvista.com>
15722
15723 * configure.in: Check for stdlib.h.
15724 * configure: Regenerated.
15725 * config.in: Regenerated.
15726
4c0711e0
DJ
157272003-01-04 Andreas Schwab <schwab@suse.de>
15728
15729 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15730
ef66e766
AC
157312003-01-02 Andrew Cagney <ac131313@redhat.com>
15732
15733 * Makefile.in: Remove obsolete code.
15734
a1358604
DJ
157352002-11-20 Daniel Jacobowitz <drow@mvista.com>
15736
15737 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15738 defined(PT_FPR0_HI).
15739
23ce3b1c
DJ
157402002-11-17 Stuart Hughes <seh@zee2.com>
15741
15742 * linux-arm-low.c (arm_num_regs): Increase.
15743 (arm_regmap): Include status register.
15744
157452002-11-17 Daniel Jacobowitz <drow@mvista.com>
15746
15747 * linux-low.c (register_addr): Remove incorrect -1 check.
15748
a9fa9f7d
DJ
157492002-08-29 Daniel Jacobowitz <drow@mvista.com>
15750
15751 * linux-low.c (linux_create_inferior): Call setpgid. Return
15752 the new PID.
15753 (unstopped_p, linux_signal_pid): Remove.
15754 (linux_target_ops): Remove linux_signal_pid.
15755 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15756 global instead of target method.
15757 * target.h (struct target_ops): Remove signal_pid. Update comment
15758 for create_inferior.
15759 * server.c (signal_pid): New variable.
15760 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15761 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15762 (attach_inferior): Set signal_pid.
15763
17574093
DJ
157642002-08-23 Daniel Jacobowitz <drow@mvista.com>
15765
15766 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15767
157682002-08-20 Jim Blandy <jimb@redhat.com>
15769
15770 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15771 default for this.
15772
157732002-08-01 Andrew Cagney <cagney@redhat.com>
15774
15775 * Makefile.in: Make chill references obsolete.
15776
157772002-07-24 Kevin Buettner <kevinb@redhat.com>
15778
15779 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15780 * configure: Regenerate.
15781 * config.in: Regenerate.
15782
157832002-07-09 David O'Brien <obrien@FreeBSD.org>
15784
15785 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15786 (perror_with_name, remote_close, remote_open, expect, play): Static.
15787
157882002-07-04 Michal Ludvig <mludvig@suse.cz>
15789
4b8dad4a 15790 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15791 byte offsets instead of an array of indexes.
15792 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15793
157942002-06-13 Daniel Jacobowitz <drow@mvista.com>
15795
15796 * regcache.c: Add comment.
15797
157982002-06-11 Daniel Jacobowitz <drow@mvista.com>
15799
15800 * thread-db.c: New file.
15801 * proc-service.c: New file.
15802 * acinclude.m4: New file.
15803 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15804 proc-service.o, and thread-db.o.
15805 (linux-low.o): Add USE_THREAD_DB.
15806 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15807 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15808 * aclocal.m4: Regenerated.
15809 * config.in: Regenerated.
15810 * configure: Regenerated.
15811 * configure.in: Check for proc_service.h, sys/procfs.h,
15812 thread_db.h, and linux/elf.h headrs.
15813 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15814 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15815 Check for -lthread_db and thread support.
15816 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15817 PowerPC, and SuperH.
15818 * i387-fp.c: Constify arguments.
15819 * i387-fp.h: Likewise.
15820 * inferiors.c: (struct thread_info): Renamed from
15821 `struct inferior_info'. Remove PID member. Use generic inferior
15822 list header. All uses updated.
15823 (inferiors, signal_pid): Removed.
15824 (all_threads): New variable.
15825 (get_thread): Define.
15826 (add_inferior_to_list): New function.
15827 (for_each_inferior): New function.
15828 (change_inferior_id): New function.
15829 (add_inferior): Removed.
15830 (remove_inferior): New function.
15831 (add_thread): New function.
15832 (free_one_thread): New function.
15833 (remove_thread): New function.
15834 (clear_inferiors): Use for_each_inferior and free_one_thread.
15835 (find_inferior): New function.
15836 (find_inferior_id): New function.
15837 (inferior_target_data): Update argument type.
15838 (set_inferior_target_data): Likewise.
15839 (inferior_regcache_data): Likewise.
15840 (set_inferior_regcache_data): Likewise.
15841 * linux-low.c (linux_bp_reinsert): Remove.
15842 (all_processes, stopping_threads, using_thrads)
15843 (struct pending_signals, debug_threads, pid_of): New.
15844 (inferior_pid): Replace with macro.
15845 (struct inferior_linux_data): Remove.
15846 (get_stop_pc, add_process): New functions.
15847 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15848 Use add_process and add_thread.
15849 (linux_attach_lwp): New function, based on old linux_attach. Use
15850 add_process and add_thread. Set stop_expected for new threads.
15851 (linux_attach): New function.
15852 (linux_kill_one_process): New function.
15853 (linux_kill): Kill all LWPs.
15854 (linux_thread_alive): Use find_inferior_id.
15855 (check_removed_breakpoints, status_pending_p): New functions.
15856 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15857 Update. Use WNOHANG. Wait for cloned processes also. Update process
15858 struct for the found process.
15859 (linux_wait_for_event): New function.
15860 (linux_wait): Use it. Support LWPs.
15861 (send_sigstop, wait_for_sigstop, stop_all_processes)
15862 (linux_resume_one_process, linux_continue_one_process): New functions.
15863 (linux_resume): Support LWPs.
15864 (REGISTER_RAW_SIZE): Remove.
15865 (fetch_register): Use register_size instead. Call supply_register.
15866 (usr_store_inferior_registers): Likewise. Call collect_register.
15867 Fix recursive case.
15868 (regsets_fetch_inferior_registers): Improve error message.
15869 (regsets_store_inferior_registers): Add debugging.
15870 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15871 (unstopped_p, linux_signal_pid): New functions.
15872 (linux_target_ops): Add linux_signal_pid.
15873 (linux_init_signals): New function.
15874 (initialize_low): Call it. Initialize using_threads.
15875 * regcache.c (inferior_regcache_data): Add valid
15876 flag.
15877 (get_regcache): Fetch registers lazily. Add fetch argument
15878 and update all callers.
15879 (regcache_invalidate_one, regcache_invalidate): New
15880 functions.
15881 (new_register_cache): Renamed from create_register_cache.
15882 Return the new regcache.
15883 (free_register_cache): Change argument to a void *.
15884 (registers_to_string, registers_from_string): Call get_regcache
15885 with fetch flag set.
15886 (register_data): Make static. Pass fetch flag to get_regcache.
15887 (supply_register): Call get_regcache with fetch flag clear.
15888 (collect_register): Call get_regcache with fetch flag set.
15889 (collect_register_as_string): New function.
15890 * regcache.h: Update.
15891 * remote-utils.c (putpkt): Flush after debug output and use
15892 stderr.
15893 Handle input interrupts while waiting for an ACK.
15894 (input_interrupt): Use signal_pid method.
15895 (getpkt): Flush after debug output and use stderr.
15896 (outreg): Use collect_register_as_string.
15897 (new_thread_notify, dead_thread_notify): New functions.
15898 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15899 and general_thread.
15900 (look_up_one_symbol): Flush after debug output.
15901 * server.c (step_thread, server_waiting): New variables.
15902 (start_inferior): Don't use signal_pid. Update call to mywait.
15903 (attach_inferior): Update call to mywait.
15904 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15905 (main): Don't fetch/store registers explicitly. Use
15906 set_desired_inferior. Support proposed ``Hs'' packet. Update
15907 calls to mywait.
15908 * server.h: Update.
15909 (struct inferior_list, struct_inferior_list_entry): New.
15910 * target.c (set_desired_inferior): New.
15911 (write_inferior_memory): Constify.
15912 (mywait): New function.
15913 * target.h: Update.
15914 (struct target_ops): New signal_pid method.
15915 (mywait): Removed macro, added prototype.
15916
15917 * linux-low.h (regset_func): Removed.
15918 (regset_fill_func, regset_store_func): New.
15919 (enum regset_type): New.
15920 (struct regset_info): Add type field. Use new operation types.
15921 (struct linux_target_ops): stop_pc renamed to get_pc.
15922 Add decr_pc_after_break and breakpoint_at.
15923 (get_process, get_thread_proess, get_process_thread)
15924 (strut process_info, all_processes, linux_attach_lwp)
15925 (thread_db_init): New.
15926
15927 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15928 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15929 (the_low_target): Add new members.
15930 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15931 (i386_store_fpxregset): Constify.
15932 (target_regsets): Add new kind identifier.
15933 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15934 (i386_set_pc): Add debugging.
15935 (i386_breakpoint_at): New function.
15936 (the_low_target): Add new members.
15937 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15938 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15939 (mips_breakpoint_at): New.
15940 (the_low_target): Add new members.
15941 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15942 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15943 (the_low_target): Add new members.
15944 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15945 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15946 (the_low_target): Add new members.
15947 * linux-x86-64-low.c (target_regsets): Add new kind
15948 identifier.
15949
159502002-05-15 Daniel Jacobowitz <drow@mvista.com>
15951
15952 From Martin Pool <mbp@samba.org>:
15953 * server.c (gdbserver_usage): New function.
15954 (main): Call it.
15955
159562002-05-14 Daniel Jacobowitz <drow@mvista.com>
15957
15958 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15959 stop_at -> stop_pc.
15960
159612002-05-04 Andrew Cagney <ac131313@redhat.com>
15962
15963 * Makefile.in: Remove obsolete code.
15964
159652002-04-24 Michal Ludvig <mludvig@suse.cz>
15966
15967 * linux-low.c (regsets_fetch_inferior_registers),
15968 (regsets_store_inferior_registers): Removed cast to int from
15969 ptrace() calls.
15970 * regcache.h: Added declaration of struct inferior_info.
15971
159722002-04-20 Daniel Jacobowitz <drow@mvista.com>
15973
15974 * inferiors.c (struct inferior_info): Add regcache_data.
15975 (add_inferior): Call create_register_cache.
15976 (clear_inferiors): Call free_register_cache.
15977 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15978 * regcache.c (struct inferior_regcache_data): New.
15979 (registers): Remove.
15980 (get_regcache): New function.
15981 (create_register_cache, free_register_cache): New functions.
15982 (set_register_cache): Don't initialize the register cache here.
15983 (registers_to_string, registers_from_string, register_data): Call
15984 get_regcache.
15985 * regcache.h: Add prototypes.
15986 * server.h: Likewise.
15987
159882002-04-20 Daniel Jacobowitz <drow@mvista.com>
15989
15990 * mem-break.c: New file.
15991 * mem-break.h: New file.
15992 * Makefile.in: Add mem-break.o rule; update server.h
15993 dependencies.
15994 * inferiors.c (struct inferior_info): Add target_data
15995 member.
15996 (clear_inferiors): Free target_data member if set.
15997 (inferior_target_data, set_inferior_target_data): New functions.
15998 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15999 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16000 * linux-low.c (linux_bp_reinsert): New variable.
16001 (struct inferior_linux_data): New.
16002 (linux_create_inferior): Use set_inferior_target_data.
16003 (linux_attach): Likewise. Call add_inferior.
16004 (linux_wait_for_one_inferior): New function.
16005 (linux_wait): Call it.
16006 (linux_write_memory): Add const.
16007 (initialize_low): Call set_breakpoint_data.
16008 * linux-low.h (struct linux_target_ops): Add breakpoint
16009 handling members.
16010 * server.c (attach_inferior): Remove extra add_inferior
16011 call.
16012 * server.h: Include mem-break.h. Update inferior.c
16013 prototypes.
16014 * target.c (read_inferior_memory)
16015 (write_inferior_memory): New functions.
16016 * target.h (read_inferior_memory)
16017 (write_inferior_memory): Change macros to prototypes.
16018 (struct target_ops): Update comments. Add const to write_memory
16019 definition.
16020
160212002-04-11 Daniel Jacobowitz <drow@mvista.com>
16022
16023 * linux-low.c (usr_store_inferior_registers): Support
16024 registers which are allowed to fail to store.
16025 * linux-low.h (linux_target_ops): Likewise.
16026 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16027 (ppc_cannot_store_register): FPSCR may not be storable.
16028
160292002-04-09 Daniel Jacobowitz <drow@mvista.com>
16030
16031 * server.h: Include <string.h> if HAVE_STRING_H.
16032 * ChangeLog: Correct paths in last ChangeLog entry.
16033
160342002-04-09 Daniel Jacobowitz <drow@mvista.com>
16035
16036 * linux-low.h: Remove obsolete prototypes.
16037 (struct linux_target_ops): New.
16038 (extern the_low_target): New.
16039 * linux-low.c (num_regs, regmap): Remove declarations.
16040 (register_addr): Use the_low_target explicitly.
16041 (fetch_register): Likewise.
16042 (usr_fetch_inferior_registers): Likewise.
16043 (usr_store_inferior_registers): Likewise.
16044 * linux-arm-low.c (num_regs): Remove.
16045 (arm_num_regs): Define.
16046 (arm_regmap): Renamed from regmap, made static.
16047 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16048 made static.
16049 (arm_cannot_store_register): Renamed from cannot_store_register,
16050 made static.
16051 (the_low_target): New.
16052 * linux-i386-low.c (num_regs): Remove.
16053 (i386_num_regs): Define.
16054 (i386_regmap): Renamed from regmap, made static.
16055 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16056 made static.
16057 (i386_cannot_store_register): Renamed from cannot_store_register,
16058 made static.
16059 (the_low_target): New.
16060 * linux-ia64-low.c (num_regs): Remove.
16061 (ia64_num_regs): Define.
16062 (ia64_regmap): Renamed from regmap, made static.
16063 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16064 made static.
16065 (ia64_cannot_store_register): Renamed from cannot_store_register,
16066 made static.
16067 (the_low_target): New.
16068 * linux-m68k-low.c (num_regs): Remove.
16069 (m68k_num_regs): Define.
16070 (m68k_regmap): Renamed from regmap, made static.
16071 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16072 made static.
16073 (m68k_cannot_store_register): Renamed from cannot_store_register,
16074 made static.
16075 (the_low_target): New.
16076 * linux-mips-low.c (num_regs): Remove.
16077 (mips_num_regs): Define.
16078 (mips_regmap): Renamed from regmap, made static.
16079 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16080 made static.
16081 (mips_cannot_store_register): Renamed from cannot_store_register,
16082 made static.
16083 (the_low_target): New.
16084 * linux-ppc-low.c (num_regs): Remove.
16085 (ppc_num_regs): Define.
16086 (ppc_regmap): Renamed from regmap, made static.
16087 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16088 made static.
16089 (ppc_cannot_store_register): Renamed from cannot_store_register,
16090 made static.
16091 (the_low_target): New.
16092 * linux-s390-low.c (num_regs): Remove.
16093 (s390_num_regs): Define.
16094 (s390_regmap): Renamed from regmap, made static.
16095 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16096 made static.
16097 (s390_cannot_store_register): Renamed from cannot_store_register,
16098 made static.
16099 (the_low_target): New.
16100 * linux-sh-low.c (num_regs): Remove.
16101 (sh_num_regs): Define.
16102 (sh_regmap): Renamed from regmap, made static.
16103 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16104 made static.
16105 (sh_cannot_store_register): Renamed from cannot_store_register,
16106 made static.
16107 (the_low_target): New.
16108 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16109 (the_low_target): New.
16110
161112002-04-09 Daniel Jacobowitz <drow@mvista.com>
16112
16113 * Makefile.in: Add stamp-h target.
16114 * configure.in: Create stamp-h.
16115 * configure: Regenerated.
16116
161172002-04-09 Daniel Jacobowitz <drow@mvista.com>
16118
16119 * inferiors.c: New file.
16120 * target.c: New file.
16121 * target.h: New file.
16122 * Makefile.in: Add target.o and inferiors.o. Update
16123 dependencies.
16124 * linux-low.c (inferior_pid): New static variable,
16125 moved from server.c.
16126 (linux_create_inferior): Renamed from create_inferior.
16127 Call add_inferior. Return 0 on success instead of a PID.
16128 (linux_attach): Renamed from myattach.
16129 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16130 (linux_thread_alive): Renamed from mythread_alive.
16131 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16132 child dies.
16133 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16134 (regsets_store_inferior_registers): Correct error message.
16135 Add missing ``return 0''.
16136 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16137 (linux_store_registers): Renamed from store_inferior_registers.
16138 (linux_read_memory): Renamed from read_inferior_memory.
16139 (linux_write_memory): Renamed from write_inferior_memory.
16140 (linux_target_ops): New structure.
16141 (initialize_low): Call set_target_ops ().
16142 * remote-utils.c (unhexify): New function.
16143 (hexify): New function.
16144 (input_interrupt): Send signals to ``signal_pid''.
16145 * server.c (inferior_pid): Remove.
16146 (start_inferior): Update create_inferior call.
16147 (attach_inferior): Call add_inferior.
16148 (handle_query): New function.
16149 (main): Call handle_query for `q' packets.
16150 * server.h: Include "target.h". Remove obsolete prototypes.
16151 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16152
161532002-04-09 Daniel Jacobowitz <drow@mvista.com>
16154
16155 * Makefile.in: Add WARN_CFLAGS. Update configury
16156 dependencies.
16157 * configure.in: Check for <string.h>
16158 * configure: Regenerate.
16159 * config.in: Regenerate.
16160 * gdbreplay.c: Include needed system headers.
16161 (remote_open): Remove strchr prototype.
16162 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16163 * regcache.c (supply_register): Change buf argument to const void *.
16164 (supply_register_by_name): Likewise.
16165 (collect_register): Change buf argument to void *.
16166 (collect_register_by_name): Likewise.
16167 * regcache.h: Add missing prototypes.
16168 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16169 * server.c (handle_query): New function.
16170 (attached): New static variable, moved out of main.
16171 (main): Quiet longjmp clobber warnings.
16172 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16173 * utils.c (error): Remove NORETURN.
16174 (fatal): Likewise.