]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
gdb: Fix ia64 defining TRAP_HWBKPT before including gdb_wait.h
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
4d9b86e1
SM
12018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2
3 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
4 linux_ptrace_attach_fail_reason_string now returning an
5 std::string.
6 (linux_attach): Likewise.
7 * thread-db.c (attach_thread): Likewise.
8
f517c180
EA
92018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10
11 PR gdb/21559
12 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13 checking for fs_base/gs_base fields in struct user_regs_struct.
14 * configure: Regenerate.
15
9a70f35c
YQ
162018-01-16 Yao Qi <yao.qi@linaro.org>
17
18 PR gdb/18749
19 * linux-low.c (fetch_register): Call supply_register instead of
20 error.
21
605fd3c6
YQ
222018-01-08 Yao Qi <yao.qi@linaro.org>
23 Simon Marchi <simon.marchi@ericsson.com>
24
25 * Makefile.in (OBS): Remove selftest.o.
26 * configure.ac: Set srv_selftest_objs if $development is true.
27 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
28 * configure: Re-generated.
29 * server.c (captured_main): Wrap variable selftest_filter with
30 GDB_SELF_TEST.
31
2cc05030
SM
322018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
33
34 * server.c (parse_debug_format_options): Return std::string.
35 (handle_monitor_command, captured_main): Adjust.
36
e379cee6
PA
372018-01-05 Pedro Alves <palves@redhat.com>
38
39 PR gdb/18653
40 * server.c (captured_main): Pass quiet=false to
41 save_original_signals_state.
42
82e1e79a
JB
432018-01-01 Joel Brobecker <brobecker@adacore.com>
44
45 * gdbreplay.c (gdbreplay_version): Update copyright year in
46 version message.
47 * server.c (gdbserver_version): Likewise.
48
8e481c3b
TT
492017-12-08 Tom Tromey <tom@tromey.com>
50
51 * ax.c (ax_printf): Update.
52
a8806230
YQ
532017-12-07 Yao Qi <yao.qi@linaro.org>
54
55 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
56 aarch64_linux_read_description.
57 * linux-amd64-ipa.c (idx2mask): New array.
58 (get_ipa_tdesc): Move idx2mask out.
59 (initialize_low_tracepoint): Initialize target descriptions.
60 * linux-i386-ipa.c (idx2mask): New array.
61 (get_ipa_tdesc): Move idx2mask out.
62 (initialize_low_tracepoint): Initialize target descriptions.
63
d4a0e8b5
SM
642017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
65
66 * tdesc.c (struct tdesc_type): Change return type.
67 (tdesc_add_flag): Change parameter type.
68 (tdesc_add_bitfield): Likewise.
69 (tdesc_add_field): Likewise.
70 (tdesc_set_struct_size): Likewise.
71
798a7429
SM
722017-12-05 Simon Marchi <simon.marchi@ericsson.com>
73
74 * regcache.c (registers_to_string): Remove unused variable.
75
c0e15c9b
SM
762017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
77
78 * inferiors.c (for_each_inferior_with_data): Remove.
79 * inferiors.h (for_each_inferior_with_data): Remove.
80 * server.c (handle_qxfer_threads_worker): Change parameter type.
81 (handle_qxfer_threads_proper): Use for_each_thread.
82
f0045347
SM
832017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
84
85 * inferiors.c (for_each_inferior): Remove.
86 (clear_inferiors): Use for_each_thread.
87 * inferiors.h (for_each_inferior): Remove.
88 * linux-low.c (linux_wait_for_event_filtered): Use
89 for_each_thread.
90 (linux_stabilize_threads): Likewise.
91 * regcache.c (regcache_release): Likewise.
92 * server.c (gdb_wants_all_threads_stopped): Likewise.
93 (clear_pending_status_callback): Remove.
94 (handle_status): Use for_each_thread.
95 (captured_main): Likewise.
96 * win32-low.c (child_init_thread_list): Likewise.
97 (win32_clear_inferiors): Likewise.
98 (fake_breakpoint_event): Likewise.
99
9521758b
SM
1002017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
101
102 * inferiors.h (find_inferior): Remove.
103 * inferiors.c (find_inferior): Remove.
104
8f86d7aa
SM
1052017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
106
107 * linux-low.c (resume_status_pending_p): Update comment.
108 (need_step_over_p): Update comment.
109
e2b44075
SM
1102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
111
112 * linux-low.c (proceed_one_lwp): Return void, change parameter
113 type.
114 (unsuspend_and_proceed_one_lwp): Likewise.
115 (proceed_all_lwps): Use for_each_thread.
116 (unstop_all_lwps): Likewise.
117
c80825ff
SM
1182017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
119
120 * linux-low.c (linux_resume_one_thread): Return void, take
121 parameter directly.
122 (linux_resume): Use for_each_thread.
123
df3e4dbe
SM
1242017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
125
126 * linux-low.c (send_sigstop_callback): Return void, change
127 parameter type. Rename to...
128 (send_sigstop): ... this.
129 (suspend_and_send_sigstop_callback): Return void, change parameter
130 type. Rename to...
131 (suspend_and_send_sigstop): ... this.
132 (stop_all_lwps): Use for_each_thread.
133
5a6b0a41
SM
1342017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
135
136 * linux-low.c (lwp_running): Return bool, remove unused
137 argument.
138 (linux_stabilize_threads): Use find_thread.
139
39a64da5
SM
1402017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
141
142 * linux-low.c (select_singlestep_lwp_callback): Remove.
143 (count_events_callback): Remove.
144 (select_event_lwp_callback): Remove.
145 (select_event_lwp): Use find_thread/for_each_thread.
146
a1385b7b
SM
1472017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
148
149 * linux-low.c (not_stopped_callback): Return bool, take filter
150 argument directly.
151 (linux_wait_for_event_filtered): Use find_thread.
152 (linux_wait_1): Likewise.
153
454296a2
SM
1542017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
155
156 * linux-low.c (same_lwp): Remove.
157 (find_lwp_pid): Use find_thread.
158
6b2a85da
SM
1592017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
160
161 * linux-low.c (delete_lwp_callback): Remove.
162 (linux_mourn): Use for_each_thread.
163
798a38e8
SM
1642017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
165
166 * linux-low.c (linux_detach_lwp_callback): Return void, remove
167 args parameter, don't check for pid.
168 (linux_detach): Use for_each_thread.
169
e4eb0dec
SM
1702017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
171
172 * linux-low.c (struct counter): Remove.
173 (second_thread_of_pid_p): Remove.
174 (last_thread_of_process_p): Use find_thread.
175
83e1b6c1
SM
1762017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
177
178 * inferiors.c (find_inferior_in_random): Remove.
179 * inferiors.h (find_inferior_in_random): Remove.
180 * linux-low.c (status_pending_p_callback): Return bool, accept
181 parameter ptid directly.
182 (linux_wait_for_event_filtered): Use find_thread_in_random.
183 (linux_wait_1): Likewise.
184
8dc7b443
SM
1852017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
186
187 * inferiors.c (find_inferior_id): Remove.
188 (find_thread_ptid): Move implemention from find_inferior_id to
189 here.
190 * inferiors.h (find_inferior_id): Remove.
191 * server.c (handle_status): Use find_thread_ptid.
192 (process_serial_event): Likewise.
193 * thread-db.c (find_one_thread): Likewise.
194 (thread_db_thread_handle): Likewise.
195 * win32-low.c (thread_rec): Likewise.
196 (child_delete_thread): Likewise.
197 (win32_thread_alive): Likewise.
198 (get_child_debug_event): Likewise.
199
da25033c
SM
2002017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
201
202 * linux-mips-low.c (update_watch_registers_callback): Return
203 void, remove pid_p parameter, don't check for pid.
204 (mips_insert_point, mips_remove_point): Use for_each_thread.
205
c91bb56b
SM
2062017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
207
208 * lynx.low (lynx_delete_thread_callback): Remove.
209 (lynx_mourn): Use for_each_thread.
210
634a3254
SM
2112017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
212
213 * regcache.c (regcache_invalidate_one): Remove.
214 (regcache_invalidate_pid): use for_each_thread.
215
41272101
TT
2162017-11-26 Tom Tromey <tom@tromey.com>
217
218 * linux-low.c (linux_create_inferior): Update.
219
f5291a6f
UW
2202017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
221
222 * spu-low.c (spu_create_inferior): Fix typo in argument name.
223
6654d750
AH
2242017-11-24 Alan Hayward <alan.hayward@arm.com>
225
226 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
227 * linux-aarch64-low.c (initialize_low_arch): Call init func.
228 * linux-aarch64-tdesc-selftest.c: New file.
229 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
230
2312017-11-24 Alan Hayward <alan.hayward@arm.com>
232
233 * configure.srv: Add new file.
234 * linux-aarch64-low.c (initialize_low_arch): Call init func.
235 * linux-aarch64-tdesc-selftest.c: New file.
236 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
237
49bdb7ee
AH
2382017-11-24 Alan Hayward <alan.hayward@arm.com>
239
240 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
241 * linux-aarch64-low.c (initialize_low_arch): Remove init.
242 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
243
d6d7ce56
AH
2442017-11-24 Alan Hayward <alan.hayward@arm.com>
245
246 * configure.srv: Add new files.
247 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
248 aarch64_linux_read_description.
249 * linux-aarch64-low.c (aarch64_linux_read_description):
250 Merge with aarch64_arch_setup.
251 (aarch64_arch_setup): Call aarch64_linux_read_description.
252 * linux-aarch64-tdesc.c: New file.
253 * linux-aarch64-tdesc.h: New file.
254
506fe5f4
YQ
2552017-11-24 Yao Qi <yao.qi@linaro.org>
256
257 * configure.srv: Set $srv_regobj for tic6x-linux.
258 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
259 (tic6x_read_description): Move some code to tic6x_arch_setup.
260 (tic6x_tdesc_test): New function.
261 (initialize_low_arch): Call selftests::register_test.
262
29f9a567
YQ
2632017-11-22 Yao Qi <yao.qi@linaro.org>
264
265 * remote-utils.c (prepare_resume_reply): Use memcpy.
266
578290ec
SM
2672017-11-19 Simon Marchi <simon.marchi@ericsson.com>
268
269 * linux-low.c (kill_one_lwp_callback): Return void, take
270 argument directly, don't filter on pid.
271 (linux_kill): Use for_each_thread.
272
eca55aec
SM
2732017-11-19 Simon Marchi <simon.marchi@ericsson.com>
274
275 * linux-low.c (need_step_over_p): Return bool, remove dummy
276 argument.
277 (linux_resume, proceed_all_lwps): Use find_thread.
278
25c28b4d
SM
2792017-11-19 Simon Marchi <simon.marchi@ericsson.com>
280
281 * linux-low.c (resume_status_pending_p): Return bool, remove
282 flag_p argument.
283 (linux_resume): Use find_thread.
284
5fdda392
SM
2852017-11-19 Simon Marchi <simon.marchi@ericsson.com>
286
287 * linux-low.c (struct thread_resume_array): Remove.
288 (linux_set_resume_request): Return void, take arguments
289 directly.
290 (linux_resume): Use for_each_thread.
291
fcb056a5
SM
2922017-11-19 Simon Marchi <simon.marchi@ericsson.com>
293
294 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
295 return bool, remove data argument.
296 (linux_stabilize_threads): Use find_thread.
297
139720c5
SM
2982017-11-19 Simon Marchi <simon.marchi@ericsson.com>
299
300 * linux-low.c (unsuspend_one_lwp): Remove.
301 (unsuspend_all_lwps): Use for_each_thread, inline code from
302 unsuspend_one_lwp.
303
6d1e5673
SM
3042017-11-19 Simon Marchi <simon.marchi@ericsson.com>
305
306 * gdbthread.h (find_thread): Add overload with ptid_t filter.
307 * linux-low.c (struct iterate_over_lwps_args): Remove.
308 (iterate_over_lwps_filter): Remove.
309 (iterate_over_lwps): Use find_thread.
310
bbf550d5
SM
3112017-11-19 Simon Marchi <simon.marchi@ericsson.com>
312
313 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
314 (linux_handle_new_gdb_connection): Use for_each_thread, inline
315 code from reset_lwp_ptrace_options_callback.
316
00192f77
SM
3172017-11-19 Simon Marchi <simon.marchi@ericsson.com>
318
319 * linux-arm-low.c (struct update_registers_data): Remove.
320 (update_registers_callback): Return void, take arguments
321 directly, don't check thread's pid.
322 (arm_insert_point, arm_remove_point): Use for_each_thread.
323
2bee2b6c
SM
3242017-11-19 Simon Marchi <simon.marchi@ericsson.com>
325
326 * win32-low.c (continue_one_thread): Return void, take argument
327 directly.
328 (child_continue): Use for_each_thread.
329
0b360f19
SM
3302017-11-19 Simon Marchi <simon.marchi@ericsson.com>
331
332 * win32-i386-low.c (update_debug_registers_callback): Rename
333 to ...
334 (update_debug_registers): ... this, return void, remove pid_p arg.
335 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
336
f27866ba
SM
3372017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
338
339 * inferiors.h (struct process_info): Add constructor, initialize
340 fields..
341 <syscalls_to_catch>: Change type to std::vector<int>.
342 * inferiors.c (add_process): Allocate process_info with new.
343 (remove_process): Free process_info with delete.
344 * linux-low.c (handle_extended_wait): Adjust.
345 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
346 * server.c (handle_general_set): Adjust.
347
e849ea89
PA
3482017-11-16 Pedro Alves <palves@redhat.com>
349
350 * remote-utils.c (remote_close): Block SIGIO signals instead of
351 uninstalling the SIGIO handler.
352
1d0aa65c
AH
3532017-11-16 Alan Hayward <alan.hayward@arm.com>
354
355 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
356
3491a34c
YQ
3572017-11-16 Yao Qi <yao.qi@linaro.org>
358
359 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
360 (tic6x_store_gregset): Likewise.
361 (tic6x_usrregs_info): Move it up.
362
a602f924
AH
3632017-11-15 Alan Hayward <alan.hayward@arm.com>
364
365 * Makefile.in: Update arch rules.
366 * configure.srv: Explicitly mark arch/ files.
367
5616b6c3
AS
3682017-11-13 Andreas Schwab <schwab@suse.de>
369
370 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
371 function.
372 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
373
d1928160
PA
3742017-11-06 Pedro Alves <palves@redhat.com>
375
376 * config.in, configure: Regenerate.
377
bac608e7
SM
3782017-10-27 Simon Marchi <simon.marchi@ericsson.com>
379
380 * target.c (struct thread_search): Remove.
381 (thread_search_callback): Remove.
382 (prepare_to_access_memory): Use for_each_thread instead of
383 find_inferior. Inline code from thread_search_callback.
384
eaddb425
SM
3852017-10-27 Simon Marchi <simon.marchi@ericsson.com>
386
387 * server.c (struct visit_actioned_threads_data): Remove.
388 (visit_actioned_threads): Change prototype to take arguments
389 directly.
390 (resume): Use find_thread instead of find_inferior.
391
99078d34
SM
3922017-10-27 Simon Marchi <simon.marchi@ericsson.com>
393
394 * server.c (queue_stop_reply_callback): Change prototype, return
395 void.
396 (find_status_pending_thread_callback): Remove.
397 (handle_status): Replace find_inferior with find_thread and
398 for_each_thread.
399
cc628f3d
AH
4002017-10-25 Alan Hayward <alan.hayward@arm.com>
401
402 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
403 with REGNO.
404 (aarch64_store_gregset): Likewise.
405 (aarch64_fill_fpregset): Likewise.
406 (aarch64_store_fpregset): Likewise.
407
4d3bb80e
SM
4082017-10-21 Simon Marchi <simon.marchi@ericsson.com>
409
410 * gdbthread.h (find_thread, for_each_thread): New functions.
411 * inferiors.c (thread_of_pid): Remove.
412 (find_any_thread_of_pid): Use find_thread.
413 * linux-low.c (num_lwps): Use for_each_thread.
414
7a7cdfa0
YQ
4152017-10-17 Yao Qi <yao.qi@linaro.org>
416
417 * Makefile.in: Remove one rule.
418 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
419
e675d170
YQ
4202017-10-17 Yao Qi <yao.qi@linaro.org>
421
422 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
423 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
424
7eb4e0f9
YQ
4252017-10-17 Yao Qi <yao.qi@linaro.org>
426
427 * configure.srv: Rename arm.o with arch/arm.o.
428
60d6cfc9
YQ
4292017-10-17 Yao Qi <yao.qi@linaro.org>
430
431 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
432 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
433 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
434 (arch-i386.o, arch-amd64.o): Remove rules.
435 (arch/%.o): New rule.
436 Update POSTCOMPILE and COMPILE.pre.
437 * configure.ac: Invoke AC_CONFIG_COMMANDS.
438 * configure: Re-generated.
439 * configure.srv: Replace arch-i386.o with arch/i386.o.
440 Replace arch-amd64.o with arch/amd64.o.
441
5bfda255
YQ
4422017-10-16 Yao Qi <yao.qi@linaro.org>
443
444 * configure: Regenerated.
445
9c80ecd6
SM
4462017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
447
448 * inferiors.h: (struct inferior_list): Remove.
449 (struct inferior_list_entry); Remove.
450 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
451 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
452 get_first_inferior): Remove.
453 (for_each_inferior, for_each_inferior_with_data, find_inferior,
454 find_inferior_id, find_inferior_in_random): Change signature.
455 * inferiors.c (all_threads): Change type to
456 std::list<thread_info *>.
457 (get_thread): Remove macro.
458 (find_inferior, find_inferior_id): Change signature, implement
459 using find_thread.
460 (find_inferior_in_random): Change signature, implement using
461 find_thread_in_random.
462 (for_each_inferior, for_each_inferior_with_data): Change
463 signature, implement using for_each_thread.
464 (add_inferior_to_list, remove_inferior): Remove.
465 (add_thread, get_first_thread, thread_of_pid,
466 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
467 (get_first_inferior, one_inferior_p, clear_inferior_list):
468 Remove.
469 (clear_inferiors, get_thread_process): Update.
470 * gdbthread.h: Include <list>.
471 (struct thread_info) <entry>: Remove field.
472 <id>: New field.
473 (all_threads): Change type to std::list<thread_info *>.
474 (get_first_inferior): Add doc.
475 (find_thread, for_each_thread, find_thread_in_random): New
476 functions.
477 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
478 * linux-arm-low.c (update_registers_callback): Update.
479 * linux-low.c (second_thread_of_pid_p): Update.
480 (kill_one_lwp_callback, linux_detach_lwp_callback,
481 delete_lwp_callback, status_pending_p_callback, same_lwp,
482 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
483 iterate_over_lwps, not_stopped_callback,
484 resume_stopped_resumed_lwps, count_events_callback,
485 select_singlestep_lwp_callback, select_event_lwp_callback,
486 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
487 suspend_and_send_sigstop_callback, wait_for_sigstop,
488 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
489 lwp_running, linux_set_resume_request, resume_status_pending_p,
490 need_step_over_p, start_step_over, linux_resume_one_thread,
491 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
492 reset_lwp_ptrace_options_callback): Update.
493 * linux-mips-low.c (update_watch_registers_callback): Update.
494 * regcache.c (regcache_invalidate_one, regcache_invalidate):
495 Update.
496 (free_register_cache_thread_one): Remove.
497 (regcache_release): Update.
498 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
499 handle_qxfer_threads_worker): Update.
500 (handle_query): Update, use list iterator.
501 (visit_actioned_threads, handle_pending_status,
502 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
503 clear_pending_status_callback, set_pending_status_callback,
504 find_status_pending_thread_callback, handle_status,
505 process_serial_event): Update.
506 * target.c (thread_search_callback): Update.
507 * thread-db.c (thread_db_get_tls_address): Update.
508 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
509 Update.
510 * win32-i386-low.c (update_debug_registers_callback): Update.
511 * win32-low.c (delete_thread_info, child_delete_thread,
512 continue_one_thread, suspend_one_thread,
513 get_child_debug_event): Adjust.
514
9179355e
SM
5152017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
516
517 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
518 * inferiors.h: Include <list>.
519 (struct process_info) <entry>: Remove field.
520 <pid>: New field.
521 (pid_of): Change macro to function.
522 (ptid_of, lwpid_of): Remove macro.
523 (all_processes): Change type to std::list<process_info *>.
524 (ALL_PROCESSES): Remove macro.
525 (for_each_process, find_process): New function.
526 * inferiors.c (all_processes): Change type to
527 std::list<process_info *>.
528 (find_thread_process): Adjust.
529 (add_process): Likewise.
530 (remove_process): Likewise.
531 (find_process_pid): Likewise.
532 (get_first_process): Likewise.
533 (started_inferior_callback): Remove.
534 (have_started_inferiors_p): Adjust.
535 (attached_inferior_callback): Remove.
536 (have_attached_inferiors_p): Adjust.
537 * linux-low.c (check_zombie_leaders): Likewise.
538 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
539 (x86_linux_update_xmltarget): Adjust.
540 * server.c (handle_query): Likewise.
541 (gdb_reattached_process): Remove.
542 (handle_status): Adjust.
543 (kill_inferior_callback): Likewise.
544 (detach_or_kill_inferior): Remove.
545 (print_started_pid): Likewise.
546 (print_attached_pid): Likewise.
547 (detach_or_kill_for_exit): Update.
548 (process_serial_event): Likewise.
549 * linux-arm-low.c (arm_new_fork): Likewise.
550
c9cb8905
SM
5512017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
552
553 * dll.h: Include <list>.
554 (struct dll_info): Add constructor.
555 <entry>: Remove field.
556 (all_dlls): Change type to std::list<dll_info>.
557 * dll.c: Include <algorithm>.
558 (get_dll): Remove macro.
559 (all_dlls): Change type to std::list<dll_info *>.
560 (free_one_dll): Remove.
561 (match_dll): Likewise.
562 (loaded_dll): Adjust.
563 (unloaded_dll): Adjust to all_dlls type change, use
564 std::find_if. Inline code from match_dll.
565 (clear_dlls): Adjust to all_dlls type change.
566 * server.c (emit_dll_description): Remove.
567 (handle_qxfer_libraries): Adjust to all_dlls type change,
568 integrate emit_dll_description's functionality.
569
04ec7890
SM
5702017-10-12 Simon Marchi <simon.marchi@ericsson.com>
571
572 * linux-low.h (struct linux_target_ops) <delete_process>: New
573 field.
574 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
575 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
576 (struct linux_target_ops): Add delete_process callback.
577 * linux-arm-low.c (arm_delete_process): New.
578 (struct linux_target_ops): Add delete_process callback.
579 * linux-bfin-low.c (struct linux_target_ops): Likewise.
580 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
581 * linux-m32r-low.c (struct linux_target_ops): Likewise.
582 * linux-mips-low.c (mips_linux_delete_process): New.
583 (struct linux_target_ops): Add delete_process callback.
584 * linux-ppc-low.c (struct linux_target_ops): Likewise.
585 * linux-s390-low.c (struct linux_target_ops): Likewise.
586 * linux-sh-low.c (struct linux_target_ops): Likewise.
587 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
588 * linux-tile-low.c (struct linux_target_ops): Likewise.
589 * linux-x86-low.c (x86_linux_delete_process): New.
590 (struct linux_target_ops): Add delete_process callback.
591 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
592
466eecee
SM
5932017-10-12 Simon Marchi <simon.marchi@ericsson.com>
594
595 * linux-aarch64-low.c (the_low_target): Add thread delete
596 callback.
597 * linux-arm-low.c (arm_delete_thread): New function.
598 (the_low_target): Add thread delete callback.
599 * linux-bfin-low.c (the_low_target): Likewise.
600 * linux-crisv32-low.c (the_low_target): Likewise.
601 * linux-low.c (delete_lwp): Invoke delete_thread callback if
602 set.
603 * linux-low.h (struct linux_target_ops) <delete_thread>: New
604 field.
605 * linux-m32r-low.c (the_low_target): Add thread delete callback.
606 * linux-mips-low.c (mips_linux_delete_thread): New function.
607 (the_low_target): Add thread delete callback.
608 * linux-ppc-low.c (the_low_target): Likewise.
609 * linux-s390-low.c (the_low_target): Likewise.
610 * linux-sh-low.c (the_low_target): Likewise.
611 * linux-tic6x-low.c (the_low_target): Likewise.
612 * linux-tile-low.c (the_low_target): Likewise.
613 * linux-x86-low.c (the_low_target): Likewise.
614 * linux-xtensa-low.c (the_low_target): Likewise.
615
b79f7801
YZ
6162017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
617
618 * win32-low.c: Include "common-inferior.h".
619
bc3b087d
SDJ
6202017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
621
622 * inferiors.c (set_inferior_cwd): New function.
623 * server.c (handle_general_set): Handle QSetWorkingDir packet.
624 (handle_query): Inform that QSetWorkingDir is supported.
625 * win32-low.c (create_process): Pass the inferior's cwd to
626 CreateProcess.
627
d092c5a2
SDJ
6282017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
629
630 * inferiors.c (current_inferior_cwd): New global variable.
631 (get_inferior_cwd): New function.
632 * inferiors.h (struct process_info) <cwd>: New field.
633
7da0a886
SDJ
6342017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
635
636 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
637 (OBS): Add gdb_tilde_expand.o.
638
289a6840
SM
6392017-10-02 Simon Marchi <simon.marchi@ericsson.com>
640
641 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
642 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
643
256642e8
PA
6442017-09-29 Pedro Alves <palves@redhat.com>
645
646 * ax.c (gdb_parse_agent_expr): Constify.
647 * ax.h (gdb_parse_agent_expr): Constify.
648 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
649 Constify.
650 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
651 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
652 * remote-utils.h (read_ptid): Constify.
653 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
654 (process_point_options, process_serial_event): Constify.
655 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
656 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
657 (cmd_qtbuffer): Constify.
658
5b9ca4d4
PA
6592017-09-29 Pedro Alves <palves@redhat.com>
660
661 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
662 fails.
663
94c207e0
PA
6642017-09-29 Pedro Alves <palves@redhat.com>
665
666 * linux-low.c (handle_extended_wait): Pass parent thread instead
667 of process to thread_db_notice_clone.
668 * linux-low.h (thread_db_notice_clone): Replace parent process
669 parameter with parent thread parameter.
670 * thread-db.c (find_one_thread): Add comment.
671 (thread_db_notice_clone): Replace parent process parameter with
672 parent thread parameter. Temporarily switch to the parent thread.
673
75352e28
SDJ
6742017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
675
676 * gdbthread.h: Include "common-gdbthread.h".
677 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
678 "if" when validating the ptid.
679 * remote-utils.c: Include "gdbthread.h".
680 (prepare_resume_reply): Use "switch_to_thread".
681 * target.c (done_accessing_memory): Likewise.
682
ad339634
AA
6832017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
684
685 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
686 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
687 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
688 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
689 s390x-gs-linux64-ipa.o to ipa_obj.
690 * linux-s390-low.c (HWCAP_S390_GS): New define.
691 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
692 New functions.
693 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
694 (s390_arch_setup): Check for guarded-storage support and choose
695 appropriate tdesc.
696 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
697 init_registers_s390x_gs_linux64.
698 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
699 enum value.
700 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
701 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
702
cc4d742f
SM
7032017-09-22 Simon Marchi <simon.marchi@ericsson.com>
704
705 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
706
f6327dcb
KB
7072017-09-21 Kevin Buettner <kevinb@redhat.com>
708
709 * linux-low.h (struct lwp_info): Add new field, thread_handle.
710 (thread_db_thread_handle): Declare.
711 * linux-low.c (linux_target_ops): Initialize thread_handle.
712 * server.c (handle_qxfer_threads_worker): Add support for
713 "handle" attribute.
714 * target.h (struct target_ops): Add new function pointer,
715 thread_handle.
716 (target_thread_handle): Define.
717 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
718 field in lwp.
719 (thread_db_thread_handle): New function.
720
86299109
KB
7212017-09-21 Kevin Buettner <kevinb@redhat.com>
722
723 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
724 * linux-low.h (thread_db_notice_clone): Declare.
725 * thread-db.c (thread_db_notice_clone): New function.
726
f557a88a
PA
7272017-09-21 Pedro Alves <palves@redhat.com>
728
729 * server.c (gdb_read_memory, handle_status, process_serial_event)
730 (handle_serial_event, handle_target_event): Adjust to
731 set_desired_thread prototype change.
732 * target.c (set_desired_thread): Remove 'use_general' parameter
733 and adjust.
734 * target.h (set_desired_thread): Remove 'use_general' parameter.
735
223ffa71
TT
7362017-09-20 Tom Tromey <tom@tromey.com>
737
738 * target.c (target_terminal::terminal_state): Define.
739 (target_terminal::init): Rename from target_terminal_init.
740 (target_terminal::inferior): Rename from
741 target_terminal_inferior.
742 (target_terminal::ours): Rename from target_terminal_ours.
743 (target_terminal::ours_for_output, target_terminal::info): New.
744
04fd3ba9
SM
7452017-09-16 Simon Marchi <simon.marchi@ericsson.com>
746
747 * server.c (accumulate_file_name_length): Remove.
748 (emit_dll_description): Adjust to std::string change.
749 (handle_qxfer_libraries): Use std::string to hold document.
750
5e187554
SM
7512017-09-16 Simon Marchi <simon.marchi@ericsson.com>
752
753 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
754 return type of xml_escape_text.
755 * server.c (emit_dll_description): Likewise.
756
1526853e
SM
7572017-09-16 Simon Marchi <simon.marchi@ericsson.com>
758
759 * server.c (captured_main): Accept argument for --selftest.
760 Update run_tests call.
761 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
762 when registering selftests.
763
c4dfafab
SDJ
7642017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
765
766 * regcache.c (get_thread_regcache): Update code to use "std::vector"
767 instead of "VEC" for "target_desc.reg_defs".
768 (regcache_cpy): Likewise.
769 (registers_to_string): Likewise.
770 (registers_from_string): Likewise.
771 (find_regno): Likewise.
772 (supply_regblock): Likewise.
773 (regcache_raw_read_unsigned): Likewise.
774 * tdesc.c (init_target_desc): Likewise.
775 (tdesc_create_reg): Likewise.
776 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
777 (struct target_desc) <reg_defs>: Convert to "std::vector".
778 (target_desc): Do not initialize "reg_defs".
779 (~target_desc): Update code to use "std::vector" instead of "VEC"
780 for "target_desc.reg_defs".
781 (operator==): Likewise.
782
124aceb4
SM
7832017-09-15 Simon Marchi <simon.marchi@ericsson.com>
784
785 * inferiors.h (thread_to_gdb_id): Remove.
786 * inferiors.c (thread_to_gdb_id): Remove.
787 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
788 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
789 lynx_store_registers, lynx_read_memory, lynx_write_memory):
790 Likewise.
791 * nto-low.c (nto_fetch_registers, nto_store_registers,
792 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
793
96cde54f
SM
7942017-09-15 Simon Marchi <simon.marchi@ericsson.com>
795
796 * inferiors.h (gdb_id_to_thread_id): Remove.
797 * inferiors.c (gdb_id_to_thread_id): Remove.
798 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
799 removal. Move pid declaration closer to where it's used.
800
e8ca139e
SM
8012017-09-15 Simon Marchi <simon.marchi@ericsson.com>
802
803 * server.c (handle_detach): New function.
804 (process_serial_event): Move code out, call handle_detach.
805
f8a4e119
SM
8062017-09-15 Simon Marchi <simon.marchi@ericsson.com>
807
808 * server.c (require_running): Rename to ...
809 (require_running_or_return): ... this ...
810 (require_running_or_break): ... and this.
811 (handle_query, process_serial_event): Adjust.
812
0eb0a407
SM
8132017-09-15 Simon Marchi <simon.marchi@ericsson.com>
814
815 * linux-low.c (linux_set_resume_request): Remove unused
816 variables.
817
785922a5
SM
8182017-09-15 Simon Marchi <simon.marchi@ericsson.com>
819
820 * server.c (first_thread_of): Remove.
821 (process_serial_event): Replace usage of first_thread_of with
822 find_any_thread_of_pid.
823 * tracepoint.c (same_process_p): Remove.
824 (gdb_agent_about_to_close): Replace usage of same_process_p with
825 find_any_thread_of_pid.
826 * linux-x86-low.c (same_process_callback): Remove.
827 (x86_arch_setup_process_callback): Replace usage of
828 same_process_callback with find_any_thread_of_pid.
829 * thread-db.c (any_thread_of): Remove.
830 (switch_to_process): Replace usage of any_thread_of with
831 find_any_thread_of_pid.
832 * inferiors.c (thread_pid_matches_callback): Remove.
833 (find_thread_process): Adjust to use find_any_thread_of_pid.
834
a059f00c
SDJ
8352017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
836
837 * regcache.c (get_thread_regcache): Guard calls to "memset"
838 with "!VEC_empty".
839
cc397f3a
SDJ
8402017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
841
842 * linux-low.c (handle_extended_wait): Use
843 "allocate_target_description" instead of "XNEW".
844 * linux-x86-low.c (initialize_low_arch): Likewise.
845
22916b07
YQ
8462017-09-05 Yao Qi <yao.qi@linaro.org>
847
848 * configure.srv (srv_i386_regobj): Remove.
849 (srv_amd64_regobj): Remove.
850 (srv_regobj): Set it to "" for x86 non-linux targets.
851 * linux-x86-tdesc.c (i386_linux_read_description):
852 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
853 (init_registers_i386): Remove the declaration.
854 (tdesc_i386): Remove the declaration.
855 (lynx_i386_arch_setup): Call i386_create_target_description.
856 * nto-x86-low.c: Likewise.
857 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
858 [!__x86_64__]: include arch/i386.h.
859 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
860
38602d55
YQ
8612017-09-05 Yao Qi <yao.qi@linaro.org>
862
863 * configure.srv (srv_amd64_linux_xmlfiles): Remove
864 i386/amd64-XXX-linux from it.
865
44b886ff
YQ
8662017-09-05 Yao Qi <yao.qi@linaro.org>
867
868 * configure.srv: Empty srv_amd64_linux_regobj if $development is
869 false.
870 (ipa_amd64_linux_regobj): Remove.
871 (ipa_x32_linux_regobj): Remove.
872
b4570e4b
YQ
8732017-09-05 Yao Qi <yao.qi@linaro.org>
874
875 * Makefile.in (arch-amd64.o): New rule.
876 * configure.srv: Append arch-amd64.o.
877 * linux-amd64-ipa.c: Include common/x86-xstate.h.
878 (get_ipa_tdesc): Call amd64_linux_read_description.
879 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
880 and init_registers_amd64_XXX.
881 * linux-x86-low.c (x86_linux_read_description): Call
882 amd64_linux_read_description.
883 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
884 (initialize_low_arch): Don't call init_registers_x32_XXX and
885 init_registers_amd64_XXX.
886 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
887 and tdesc_amd64_XXX.
888 [__x86_64__] (amd64_tdesc_test): New function.
889 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
890 and init_registers_amd64_XXX.
891 * linux-x86-tdesc.c: Include arch/amd64.h.
892 (xcr0_to_tdesc_idx): New function.
893 (i386_linux_read_description): New function.
894 (amd64_get_ipa_tdesc_idx): New function.
895 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
896 (amd64_get_ipa_tdesc): Declare.
897
d1f28ea2
YQ
8982017-09-05 Yao Qi <yao.qi@linaro.org>
899
900 * configure.srv (srv_i386_linux_xmlfiles): Remove
901 i386/i386-XXX-linux.xml from it.
902
25a93583
YQ
9032017-09-05 Yao Qi <yao.qi@linaro.org>
904
905 * configure.srv: Set srv_i386_linux_regobj empty if $development
906 is false.
907 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
908 initialize_low_tdesc.
909 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
910 with #if initialize_low_tdesc.
911 * linux-x86-tdesc-selftest.c: New file.
912 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
913
5f035c07
YQ
9142017-09-05 Yao Qi <yao.qi@linaro.org>
915
916 * Makefile.in (arch-i386.o): New rule.
917 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
918 (x86_64-*-linux*): Likewise.
919 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
920 include arch/i386.h.
921 (i386_linux_read_description): Remove code and call
922 i386_create_target_description.
923 * tdesc.c (allocate_target_description): New function.
924 * tdesc.h (set_tdesc_architecture): Remove declaration.
925 (set_tdesc_osabi): Likewise.
926
0abe8a89
YQ
9272017-09-05 Yao Qi <yao.qi@linaro.org>
928
929 * linux-x86-tdesc.c: Don't include <inttypes.h>.
930 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
931 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
932 .xmltarget.
933 * server.c (get_features_xml): Call tdesc_get_features_xml.
934 * tdesc.c (set_tdesc_architecture): New function.
935 (set_tdesc_osabi): New function.
936 (tdesc_get_features_xml): New function.
937 (tdesc_create_feature): Add an argument.
938 * tdesc.h (struct target_desc) <features>: New field.
939 <arch, osabi>: New field.
940 (~target_desc): xfree features, arch, and osabi.
941 (target_desc::oerator==): Don't compare .xmltarget.
942 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
943 (set_tdesc_osabi): Likewise.
944 (tdesc_get_features_xml): Likewise.
945
0a188386
YQ
9462017-09-05 Yao Qi <yao.qi@linaro.org>
947
948 * linux-x86-tdesc.c: Include selftest.h.
949 (i386_tdesc_test): New function.
950 (initialize_low_tdesc): Call selftests::register_test.
951 * tdesc.h: Include regdef.h.
952 (target_desc): Override operator == and !=.
953
f49ff000
YQ
9542017-09-05 Yao Qi <yao.qi@linaro.org>
955
956 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
957 (ipa_obj): Likewise.
958 * linux-i386-ipa.c: Include common/x86-xstate.h
959 (get_ipa_tdesc): Call i386_linux_read_description.
960 (initialize_low_tracepoint): Don't call init_registers_XXX
961 functions, call initialize_low_tdesc instead.
962 * linux-x86-low.c (x86_linux_read_description): Call
963 i386_linux_read_description.
964 (initialize_low_arch): Don't call init_registers_i386_XXX
965 functions, call initialize_low_tdesc.
966 * linux-x86-tdesc.c: New file.
967 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
968 (i386_get_ipa_tdesc_idx): Declare.
969 (i386_get_ipa_tdesc): Declare.
970 (initialize_low_tdesc): Declare.
971
2b68ef2f
YQ
9722017-09-05 Yao Qi <yao.qi@linaro.org>
973
974 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
975 instead of 0.
976
f7000548
YQ
9772017-09-05 Yao Qi <yao.qi@linaro.org>
978
979 * Makefile.in (IPA_OBJS): Add vec-ipa.o
980 * regcache.c (get_thread_regcache): Use VEC_length.
981 (init_register_cache): Likewise.
982 (regcache_cpy): Likewise.
983 (registers_to_string): Iterate reg_defs via VEC_iterate.
984 (find_regno): Likewise.
985 (find_register_by_number): Use VEC_index.
986 (register_size): Call find_register_by_number.
987 (register_data): Call find_register_by_number.
988 (supply_regblock): Use VEC_length.
989 (regcache_raw_read_unsigned): Likewise.
990 * tdesc.c (init_target_desc): Iterate reg_defs via
991 VEC_iterate.
992 (default_description): Update initializer.
993 (copy_target_description): Don't update field num_registers.
994 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
995 <num_registers>: Remove.
996
50a421ac
SM
9972017-09-04 Simon Marchi <simon.marchi@ericsson.com>
998
999 * Makefile.in (.SECONDARY): Define target.
1000
23fdd69e
SM
10012017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1002
1003 * linux-low.c (linux_wait_1): Adjust.
1004 * server.c (queue_stop_reply_callback): Adjust.
1005
0a2dde4a
SDJ
10062017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1007
1008 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1009 QEnvironmentUnset and QEnvironmentReset packets.
1010 (handle_query): Inform remote that QEnvironmentHexEncoded,
1011 QEnvironmentUnset and QEnvironmentReset are supported.
1012
6afd337d
SM
10132017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1014
1015 * inferiors.h (inferior_target_data): Rename to ...
1016 (thread_target_data): ... this.
1017 (inferior_regcache_data): Rename to ...
1018 (thread_regcache_data): ... this.
1019 (set_inferior_regcache_data): Rename to ...
1020 (set_thread_regcache_data): ... this.
1021 * inferiors.c (inferior_target_data): Rename to ...
1022 (thread_target_data): ... this.
1023 (inferior_regcache_data): Rename to ...
1024 (thread_regcache_data): ... this.
1025 (set_inferior_regcache_data): Rename to ...
1026 (set_thread_regcache_data): ... this.
1027 (free_one_thread): Update.
1028 * linux-low.h (get_thread_lwp): Update.
1029 * regcache.c (get_thread_regcache): Update.
1030 (regcache_invalidate_thread): Update.
1031 (free_register_cache_thread): Update.
1032 * win32-i386-low.c (update_debug_registers_callback): Update.
1033 (win32_get_current_dr): Update.
1034 * win32-low.c (thread_rec): Update.
1035 (delete_thread_info): Update.
1036 (continue_one_thread): Update.
1037 (suspend_one_thread): Update.
1038
a160cc46
SM
10392017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1040
1041 * inferiors.c (set_inferior_target_data): Remove.
1042 * inferiors.h (set_inferior_target_data): Remove.
1043
6d580b63
YQ
10442017-08-18 Yao Qi <yao.qi@linaro.org>
1045
1046 * Makefile.in (OBS): Add selftest.o.
1047 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1048 * configure, config.in: Re-generated.
1049 * server.c: Include common/sefltest.h.
1050 (captured_main): Handle option --selftest.
1051
f5a29eb0
YQ
10522017-08-09 Yao Qi <yao.qi@linaro.org>
1053
1054 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1055 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1056 i386-avx-mpx.o and i386-mmx.o.
1057 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1058 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1059 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1060 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1061 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1062 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1063 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1064 i386/amd64-avx-mpx.xml.
1065
57757c2f
YQ
10662017-08-09 Yao Qi <yao.qi@linaro.org>
1067
1068 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1069 and x32-avx-avx512.o.
1070 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1071 i386/x32-avx-avx512.xml.
1072
229d26fc
SM
10732017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1074
1075 * tracepoint.h (enum class fast_tpoint_collect_result): New
1076 enumeration.
1077 (fast_tracepoint_collecting): Change return type to
1078 fast_tpoint_collect_result.
1079 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1080 * linux-low.h: Include tracepoint.h.
1081 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1082 fast_tpoint_collect_result.
1083 * linux-low.c (handle_tracepoints): Adjust.
1084 (linux_fast_tracepoint_collecting): Change return type to
1085 fast_tpoint_collect_result.
1086 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1087 linux_wait_1, stuck_in_jump_pad_callback,
1088 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1089 proceed_one_lwp): Adjust to type change.
1090
2e1e43e1
YQ
10912017-07-10 Yao Qi <yao.qi@linaro.org>
1092
1093 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1094
adc764e7
YQ
10952017-06-29 Yao Qi <yao.qi@linaro.org>
1096
1097 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1098 Remove.
1099 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1100
a206891a
SM
11012017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1102
1103 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1104
9a6c7d9c
SDJ
11052017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1106
1107 * linux-low.c (linux_create_inferior): Adjust code to access the
1108 environment information via 'gdb_environ' class.
1109 * lynx-low.c (lynx_create_inferior): Likewise.
1110 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1111 (get_environ): Return a pointer to 'our_environ'.
1112 (captured_main): Initialize 'our_environ'.
1113 * server.h (get_environ): Adjust prototype.
1114 * spu-low.c (spu_create_inferior): Adjust code to access the
1115 environment information via 'gdb_environ' class.
1116
ae3e2ccf
SM
11172017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1118
1119 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1120 usage of "register" keyword.
1121
3e019bdc
SM
11222017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1123
1124 * configure: Re-generate.
1125
8465943a
SM
11262017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1127
1128 * configure: Re-generate.
1129
cf0dd6f0
SM
11302017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1131
1132 * Makefile.in (COMPILE.pre): Add "-x c++".
1133
9845682b
SDJ
11342017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1135
1136 * fork-child.c: Conditionally include <signal.h>.
1137
aefd8b33
SDJ
11382017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1139
1140 * server.c (handle_general_set): Handle new packet
1141 "QStartupWithShell".
1142 (handle_query): Add "QStartupWithShell" to the list of supported
1143 packets.
1144 (gdbserver_usage): Add help text explaining the
1145 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1146 options.
1147 (captured_main): Recognize and act upon the presence of the new
1148 CLI options.
1149
2090129c
SDJ
11502017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1151 Pedro Alves <palves@redhat.com>
1152
1153 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1154 * configure: Regenerate.
1155 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1156 "fork-inferior.o".
1157 (i[34567]86-*-lynxos*): Likewise.
1158 (spu*-*-*): Likewise.
1159 * fork-child.c: New file.
1160 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1161 and "environ.h".
1162 (linux_ptrace_fun): New function.
1163 (linux_create_inferior): Adjust function prototype to reflect
1164 change on "target.h". Adjust function code to use
1165 "fork_inferior".
1166 (linux_request_interrupt): Delete "signal_pid".
1167 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1168 (lynx_ptrace_fun): New function.
1169 (lynx_create_inferior): Adjust function prototype to reflect
1170 change on "target.h". Adjust function code to use
1171 "fork_inferior".
1172 * nto-low.c (nto_create_inferior): Adjust function prototype and
1173 code to reflect change on "target.h". Update comments.
1174 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1175 "common-terminal.h" and "environ.h".
1176 (terminal_fd): Moved to fork-child.c.
1177 (old_foreground_pgrp): Likewise.
1178 (restore_old_foreground_pgrp): Likewise.
1179 (last_status): Make it global.
1180 (last_ptid): Likewise.
1181 (our_environ): New variable.
1182 (startup_with_shell): Likewise.
1183 (program_name): Likewise.
1184 (program_argv): Rename to...
1185 (program_args): ...this.
1186 (wrapper_argv): New variable.
1187 (start_inferior): Delete function.
1188 (get_exec_wrapper): New function.
1189 (get_exec_file): Likewise.
1190 (get_environ): Likewise.
1191 (prefork_hook): Likewise.
1192 (post_fork_inferior): Likewise.
1193 (postfork_hook): Likewise.
1194 (postfork_child_hook): Likewise.
1195 (handle_v_run): Update code to deal with arguments coming from the
1196 remote host. Update calls from "start_inferior" to
1197 "create_inferior".
1198 (captured_main): Likewise. Initialize environment variable. Call
1199 "have_job_control".
1200 * server.h (post_fork_inferior): New prototype.
1201 (get_environ): Likewise.
1202 (last_status): Declare.
1203 (last_ptid): Likewise.
1204 (signal_pid): Likewise.
1205 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1206 (spu_ptrace_fun): New function.
1207 (spu_create_inferior): Adjust function prototype to reflect change
1208 on "target.h". Adjust function code to use "fork_inferior".
1209 * target.c (target_terminal_init): New function.
1210 (target_terminal_inferior): Likewise.
1211 (target_terminal_ours): Likewise.
1212 * target.h: Include <vector>.
1213 (struct target_ops) <create_inferior>: Update prototype.
1214 (create_inferior): Update macro.
1215 * utils.c (gdb_flush_out_err): New function.
1216 * win32-low.c (win32_create_inferior): Adjust function prototype
1217 and code to reflect change on "target.h".
1218
043a4934
SDJ
12192017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1220
1221 * inferiors.c (switch_to_thread): New function.
1222
15652511
SDJ
12232017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1224
1225 * Makefile.in (SFILE): Add "common/job-control.c".
1226 (OBS): Add "job-control.o".
1227
21ea5acd
SDJ
12282017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1229
1230 * Makefile: Remove "@host_makefile_frag@".
1231
e13cb306
PA
12322017-05-05 Pedro Alves <palves@redhat.com>
1233
1234 * configure: Regenerate.
1235
c94fee56
SDJ
12362017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1237
1238 * configure: Regenerate.
1239
a0ff9e1a
SM
12402017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1241
1242 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1243 software_single_step change of return type to
1244 std::vector<CORE_ADDR>.
1245 * linux-low.c (install_software_single_step_breakpoints):
1246 Likewise.
1247 * linux-low.h (install_software_single_step_breakpoints):
1248 Likewise.
1249
be628ab8
SDJ
12502017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1251
1252 * remote-utils.c: Include "gdb_termios.h" instead of
1253 "terminal.h".
1254 * terminal.h: Delete file.
1255
7c5ded6a
SDJ
12562017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1257
1258 * server.c: Include <vector>.
1259 <program_argv, wrapper_argv>: Convert to std::vector.
1260 (start_inferior): Rewrite function to use C++.
1261 (handle_v_run): Likewise. Update code that calculates the argv
1262 based on the vRun packet; use C++.
1263 (captured_main): Likewise.
1264
436252de
SM
12652017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1266
1267 * server.c (handle_v_cont): Initialize thread_resume::thread
1268 with null_ptid.
1269
9bf2a700
PA
12702017-04-05 Pedro Alves <palves@redhat.com>
1271
1272 * configure: Regenerate.
1273
a121b7c1
PA
12742017-04-05 Pedro Alves <palves@redhat.com>
1275
1276 * gdbreplay.c (sync_error): Constify.
1277 * linux-x86-low.c (push_opcode): Constify.
1278
21c8a587
PA
12792017-04-05 Pedro Alves <palves@redhat.com>
1280
1281 * win32-low.c (get_child_debug_event)
1282 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1283 Report TARGET_WAITKIND_SPURIOUS instead.
1284
fb32b4f7
PA
12852017-04-05 Pedro Alves <palves@redhat.com>
1286
1287 * remote-utils.c (remote_prepare, remote_open): Constify.
1288 * remote-utils.h (remote_prepare, remote_open): Constify.
1289 * server.c (captured_main): Constify 'port' handling.
1290
65dd1e59
SM
12912017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1292
1293 * Makefile.in (clean): Clear .deps.
1294
8fa5b777
SM
12952017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1296
1297 * .gitignore: Remove generated files, replace with wildcard.
1298 * (clean): Replace removal of generated files with wildcard.
1299 (version.c): Replace with...
1300 (version-generated.c): ...this.
1301 (xml-builtin.c): Replace with...
1302 (xml-builtin-generated.c): ...this.
1303 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1304 (%.c: *regformats*): Replace with...
1305 (%-generated.c: *regformats*): ...this.
1306
a12e714b
MF
13072017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1308
1309 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1310 (xtensa_fill_gregset): Call collect_register_by_name for
1311 threadptr register.
1312 (xtensa_store_gregset): Call supply_register_by_name for
1313 threadptr register.
1314
1a09b50a
MF
13152017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1316
1317 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1318 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1319 (xtensa_store_gregset): Call supply_register for all registers in
1320 a0_regnum..a0_regnum + C0_NREGS range.
1321
1a01e7c6
SM
13222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1323
1324 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1325 (ax-ipa.o: ax.c): Remove.
1326 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1327 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1328 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1329 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1330 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1331
36bc18a8
SM
13322017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1333
1334 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1335 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1336 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1337 (errors-ipa.o: ../common/errors.c): Remove.
1338 (format-ipa.o: ../common/format.c): Remove.
1339 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1340
a8ebe3d5
SM
13412017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1342
1343 * Makefile.in (%-ipa.o: %.c): New rule.
1344 (tracepoint-ipa.o: tracepoint.c): Remove.
1345 (utils-ipa.o: utils.c): Remove.
1346 (remote-utils-ipa.o: remote-utils.c): Remove.
1347 (regcache-ipa.o: regcache.c): Remove.
1348 (i386-linux-ipa.o: i386-linux.c): Remove.
1349 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1350 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1351 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1352 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1353 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1354 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1355 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1356 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1357 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1358 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1359 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1360 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1361 (aarch64-ipa.o: aarch64.c): Remove.
1362 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1363 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1364 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1365 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1366 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1367 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1368 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1369 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1370 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1371 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1372 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1373 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1374 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1375 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1376 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1377 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1378 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1379 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1380 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1381 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1382 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1383 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1384 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1385 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1386 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1387 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1388 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1389 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1390 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1391 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1392 (tdesc-ipa.o: tdesc.c): Remove.
1393 (x32-linux-ipa.o: x32-linux.c): Remove.
1394 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1395 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1396
50cfacb7
SM
13972017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1398
1399 * Makefile.in (%.o: ../arch/%.c): New rule.
1400 (arm.o: ../arch/arm.c): Remove.
1401 (arm-linux.o: ../arch/arm-linux.c): Remove.
1402 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1403 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1404
c5a22423
SM
14052017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1406
1407 * Makefile.in (%.o: ../nat/%.c): New rule.
1408 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1409 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1410 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1411 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1412 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1413 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1414 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1415 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1416 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1417 (linux-personality.o: ../nat/linux-personality.c): Remove.
1418 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1419 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1420 (x86-linux.o: ../nat/x86-linux.c): Remove.
1421 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1422 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1423
6bda016b
SM
14242017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1425
1426 * Makefile.in (%.o: ../common/%.c): New rule.
1427 (signals.o: ../common/signals.c): Remove.
1428 (print-utils.o: ../common/print-utils.c): Remove.
1429 (rsp-low.o: ../common/rsp-low.c): Remove.
1430 (common-utils.o: ../common/common-utils.c): Remove.
1431 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1432 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1433 (vec.o: ../common/vec.c): Remove.
1434 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1435 (xml-utils.o: ../common/xml-utils.c): Remove.
1436 (ptid.o: ../common/ptid.c): Remove.
1437 (buffer.o: ../common/buffer.c): Remove.
1438 (format.o: ../common/format.c): Remove.
1439 (filestuff.o: ../common/filestuff.c): Remove.
1440 (agent.o: ../common/agent.c): Remove.
1441 (errors.o: ../common/errors.c): Remove.
1442 (environ.o: ../common/environ.c): Remove.
1443 (common-debug.o: ../common/common-debug.c): Remove.
1444 (cleanups.o: ../common/cleanups.c): Remove.
1445 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1446 (fileio.o: ../common/fileio.c): Remove.
1447 (common-regcache.o: ../common/common-regcache.c): Remove.
1448 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1449 (new-op.o: ../common/new-op.c): Remove.
1450 (btrace-common.o: ../common/btrace-common.c): Remove.
1451
21122961
SM
14522017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1453
1454 * Makefile.in (%.o: ../target/%.c): New rule.
1455 (waitstatus.o: ../target/waitstatus.c): Remove.
1456
c362e621
SM
14572017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1458
1459 * Makefile.in
1460 (%.c: ../regformats/%.dat,
1461 (%.c: ../regformats/arm/%.dat,
1462 (%.c: ../regformats/i386/%.dat,
1463 (%.c: ../regformats/rs6000/%.dat): New rules.
1464 (aarch64.c): Remove.
1465 (reg-arm.c): Remove.
1466 (arm-with-iwmmxt.c): Remove.
1467 (arm-with-vfpv2.c): Remove.
1468 (arm-with-vfpv3.c): Remove.
1469 (arm-with-neon.c): Remove.
1470 (reg-bfin.c): Remove.
1471 (reg-cris.c): Remove.
1472 (reg-crisv32.c): Remove.
1473 (i386.c): Remove.
1474 (i386-linux.c): Remove.
1475 (i386-avx.c): Remove.
1476 (i386-avx-linux.c): Remove.
1477 (i386-avx-avx512.c): Remove.
1478 (i386-avx-avx512-linux.c): Remove.
1479 (i386-mpx.c): Remove.
1480 (i386-mpx-linux.c): Remove.
1481 (i386-avx-mpx-avx512-pku.c): Remove.
1482 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1483 (i386-avx-mpx.c): Remove.
1484 (i386-avx-mpx-linux.c): Remove.
1485 (i386-mmx.c): Remove.
1486 (i386-mmx-linux.c): Remove.
1487 (reg-ia64.c): Remove.
1488 (reg-m32r.c): Remove.
1489 (reg-m68k.c): Remove.
1490 (reg-cf.c): Remove.
1491 (mips-linux.c): Remove.
1492 (mips-dsp-linux.c): Remove.
1493 (mips64-linux.c): Remove.
1494 (mips64-dsp-linux.c): Remove.
1495 (nios2-linux.c): Remove.
1496 (powerpc-32.c): Remove.
1497 (powerpc-32l.c): Remove.
1498 (powerpc-altivec32l.c): Remove.
1499 (powerpc-cell32l.c): Remove.
1500 (powerpc-vsx32l.c): Remove.
1501 (powerpc-isa205-32l.c): Remove.
1502 (powerpc-isa205-altivec32l.c): Remove.
1503 (powerpc-isa205-vsx32l.c): Remove.
1504 (powerpc-e500l.c): Remove.
1505 (powerpc-64l.c): Remove.
1506 (powerpc-altivec64l.c): Remove.
1507 (powerpc-cell64l.c): Remove.
1508 (powerpc-vsx64l.c): Remove.
1509 (powerpc-isa205-64l.c): Remove.
1510 (powerpc-isa205-altivec64l.c): Remove.
1511 (powerpc-isa205-vsx64l.c): Remove.
1512 (s390-linux32.c): Remove.
1513 (s390-linux32v1.c): Remove.
1514 (s390-linux32v2.c): Remove.
1515 (s390-linux64.c): Remove.
1516 (s390-linux64v1.c): Remove.
1517 (s390-linux64v2.c): Remove.
1518 (s390-te-linux64.c): Remove.
1519 (s390-vx-linux64.c): Remove.
1520 (s390-tevx-linux64.c): Remove.
1521 (s390x-linux64.c): Remove.
1522 (s390x-linux64v1.c): Remove.
1523 (s390x-linux64v2.c): Remove.
1524 (s390x-te-linux64.c): Remove.
1525 (s390x-vx-linux64.c): Remove.
1526 (s390x-tevx-linux64.c): Remove.
1527 (tic6x-c64xp-linux.c): Remove.
1528 (tic6x-c64x-linux.c): Remove.
1529 (tic6x-c62x-linux.c): Remove.
1530 (reg-sh.c): Remove.
1531 (reg-sparc64.c): Remove.
1532 (reg-spu.c): Remove.
1533 (amd64.c): Remove.
1534 (amd64-linux.c): Remove.
1535 (amd64-avx.c): Remove.
1536 (amd64-avx-linux.c): Remove.
1537 (amd64-avx-avx512.c): Remove.
1538 (amd64-avx-avx512-linux.c): Remove.
1539 (amd64-mpx.c): Remove.
1540 (amd64-mpx-linux.c): Remove.
1541 (amd64-avx-mpx-avx512-pku.c): Remove.
1542 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1543 (amd64-avx-mpx.c): Remove.
1544 (amd64-avx-mpx-linux.c): Remove.
1545 (x32.c): Remove.
1546 (x32-linux.c): Remove.
1547 (x32-avx.c): Remove.
1548 (x32-avx-linux.c): Remove.
1549 (x32-avx-avx512.c): Remove.
1550 (x32-avx-avx512-linux.c): Remove.
1551 (reg-xtensa.c): Remove.
1552 (reg-tilegx.c): Remove.
1553 (reg-tilegx32.c): Remove.
1554
1672e0d9
SDJ
15552017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1556
1557 * Makefile.in (SFILES): Add "common/environ.c".
1558 (OBJS): Add "common/environ.h".
1559
239b6d10
WT
15602017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1561
1562 * configure.ac: Check if the fs_base and gs_base members of
1563 `struct user_regs_struct' exist.
1564 * config.in: Regenerated.
1565 * configure: Likewise.
1566
694b382c
AT
15672017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1568
1569 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1570 target_read_memory.
1571 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1572 (get_next_pcs_syscall_next_pc): Likewise.
1573
7dc53023
LM
15742016-12-23 Luis Machado <lgustavo@codesourcery.com>
1575
1576 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1577 * nto-x86-low.c: Likewise.
1578
ad02e4fe
SM
15792016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1580
1581 * Makefile.in: Include disable-implicit-rules.mk.
1582
dcb07cfa
PA
15832016-11-23 Pedro Alves <palves@redhat.com>
1584
1585 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1586 (debug_vprintf): Use std::chrono::steady_clock instead of
1587 gettimeofday. Use '.' instead of ':'.
1588 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1589 (get_timestamp): Use std::chrono::steady_clock instead of
1590 gettimeofday.
1591
8629c02c
SM
15922016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1593
1594 * Makefile.in: Fix whitespace formatting.
1595
b593ecca
SM
15962016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1597
1598 * Makefile.in (SFILES, OBS): Flatten list and order
1599 alphabetically.
1600
9986ba08
PA
16012016-11-23 Pedro Alves <palves@redhat.com>
1602
1603 * event-loop.c (handle_file_event): Use warning.
1604 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1605 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1606 Use warning.
1607
4eefa7bc
PA
16082016-11-23 Pedro Alves <palves@redhat.com>
1609
1610 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1611 output.
1612 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1613 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1614 debug_printf and debug_flush for debug output.
1615 * server.c (handle_general_set): Likewise.
1616 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1617 output.
1618
5443506e
SM
16192016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1620
1621 * Makefile.in (.c.o): Replace rule with ...
1622 (%.o: %.c): ... this one.
1623
3b165252
SM
16242016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1625
1626 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1627 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1628 make.
1629 * configure.ac: Remove checks for the make program.
1630 * configure: Re-generate.
1631
0bcda685
PA
16322016-10-28 Pedro Alves <palves@redhat.com>
1633
1634 * Makefile.in (CXX_DIALECT): Get from configure.
1635 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1636 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1637 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1638 * config.in: Regenerate.
1639 * configure: Regenerate.
1640
c3805894
YQ
16412016-10-27 Yao Qi <yao.qi@linaro.org>
1642
1643 * linux-low.c (linux_supports_range_stepping): Return true if
1644 can_software_single_step return true.
1645
89342618
YQ
16462016-10-27 Yao Qi <yao.qi@linaro.org>
1647
1648 * inferiors.c (find_inferior_in_random): New function.
1649 * inferiors.h (find_inferior_in_random): Declare.
1650 * linux-low.c (linux_wait_for_event_filtered): Call
1651 find_inferior_in_random instead of find_inferior.
1652
e3652c84
YQ
16532016-10-27 Yao Qi <yao.qi@linaro.org>
1654
1655 * linux-low.c (linux_wait_1): If single-step breakpoints are
1656 inserted, remove them.
1657
5a04c4cf
PA
16582016-10-26 Pedro Alves <palves@redhat.com>
1659
1660 * linux-low.c (handle_extended_wait): Link parent/child fork
1661 threads.
1662 (linux_wait_1): Unlink them.
1663 (linux_set_resume_request): Ignore resume requests for
1664 already-resumed and unhandled fork child threads.
1665 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1666 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1667 New functions.
1668 (handle_v_requests) <vCont>: Don't call require_running.
1669 * server.h (in_queued_stop_replies): New declaration.
1670
cb93dc7f
YQ
16712016-10-24 Yao Qi <yao.qi@linaro.org>
1672
1673 PR server/20733
1674 * linux-aarch64-low.c (append_insns): Cast the return value to
1675 'uint32_t *'.
1676
a1078bea
YQ
16772016-10-10 Yao Qi <yao.qi@linaro.org>
1678
1679 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1680
1fb77080
SDJ
16812016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1682
1683 * target.c (target_supports_multi_process): New function, moved
1684 from...
1685 * target.h (target_supports_multi_process): ... here. Remove
1686 macro.
1687
39b5a3b9
TT
16882016-10-05 Tom Tromey <tom@tromey.com>
1689
1690 PR remote/20655:
1691 * tracepoint.c (handle_tracepoint_bkpts): Check
1692 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1693
c1d0b70a
YQ
16942016-10-05 Yao Qi <yao.qi@linaro.org>
1695
1696 * configure.srv: Update the path of arm-*.xml files.
1697
0a69eedb
YQ
16982016-10-05 Terry Guo <terry.guo@arm.com>
1699 Yao Qi <yao.qi@linaro.org>
1700
1701 * Makefile.in: Adjust the path of rules.
1702 * configure.srv: Update the path of xml files.
1703 * regformats/arm-with-iwmmxt.dat: Regenerated.
1704 * regformats/arm-with-neon.dat: Likewise.
1705 * regformats/arm-with-vfpv2.dat: Likewise.
1706 * regformats/arm-with-vfpv3.dat Likewise.
1707
17e16485
YQ
17082016-09-30 Yao Qi <yao.qi@linaro.org>
1709
1710 PR gdbserver/20627
1711 * target.c (target_stop_and_wait): Don't call
1712 target_continue_no_signal, use resume_stop instead.
1713
edeeb602
YQ
17142016-09-26 Yao Qi <yao.qi@linaro.org>
1715
1716 * linux-low.c (linux_wait_1): Call debug_exit.
1717
503b1c39
PA
17182016-09-23 Pedro Alves <palves@redhat.com>
1719
1720 * Makefile.in (SFILES): Add common/new-op.c.
1721 (OBS): Add common/new-op.o.
1722 (new-op.o): New rule.
1723
74172ecf
SM
17242016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1725
1726 * .gitinore: Ignore more files.
1727
fc6cda2e
YQ
17282016-09-21 Yao Qi <yao.qi@linaro.org>
1729
1730 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1731 23.
1732
bc1e6c81
SDJ
17332016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1734
1735 * server.c (start_inferior): Call target_mourn_inferior instead of
1736 mourn_inferior; pass ptid_t argument to it.
1737 (resume): Likewise.
1738 (handle_target_event): Likewise.
1739 * target.c (target_mourn_inferior): New function.
1740 * target.h (mourn_inferior): Delete macro.
1741
0e00e962
AA
17422016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1743
1744 * linux-low.c (lwp_is_stepping): New function.
1745
1d8cb77d
CL
17462016-09-06 Carl Love <cel@us.ibm.com>
1747
1748 * server.c (start_inferior): Fixed comment, requested comment change
1749 didn't get updated correctly. Removed reference to ptrace () call as
1750 it is only true on Linux systems.
1751
7313bced
CL
17522016-09-06 Carl Love <cel@us.ibm.com>
1753
1754 * server.c (start_inferior): Do not call
1755 function target_post_create_inferior () if the
1756 inferior process has already exited.
1757
cf6de44d
PA
17582016-09-05 Pedro Alves <palves@redhat.com>
1759
1760 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1761 (COMPILE.pre, CC_LD): Use CXX directly.
1762 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1763 * acinclude.m4: Don't include build-with-cxx.m4.
1764 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1765 * configure: Regenerate.
1766
c1da6748
AT
17672016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1768
1769 PR gdb/19495
1770 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1771 call writing data to own_buf.
1772
f2b9e3df
SDJ
17732016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1774
1775 * target.c (mywait): Call target_wait instead of
1776 the_target->wait.
1777 (target_wait): New function.
1778
049a8570
SDJ
17792016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1780
1781 * server.c (start_inferior): New variable 'ptid'. Replace calls
1782 to the_target->resume by target_continue{,_no_signal}, depending
1783 on the case.
1784 * target.c (target_stop_and_wait): Call target_continue_no_signal
1785 instead of the_target->resume.
1786 (target_continue): New function.
1787
3aa5cfa0
AT
17882016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1789
1790 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1791
754653a7
AZ
17922016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1793
1794 PR server/20491
1795 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1796 ps_prochandle.
1797 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1798 * linux-arm-low.c (ps_get_thread_area): Likewise.
1799 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1800 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1801 * linux-mips-low.c (ps_get_thread_area): Likewise.
1802 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1803 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1804 * linux-x86-low.c (ps_get_thread_area): Likewise.
1805 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1806
ed036b40
PA
18072016-08-19 Pedro Alves <palves@redhat.com>
1808
1809 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1810
c8ef42ee
PA
18112016-08-19 Pedro Alves <palves@redhat.com>
1812
1813 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1814 comment. Use memcpy instead of casting through unsigned long.
1815
9c235a72
PA
18162016-08-19 Pedro Alves <palves@redhat.com>
1817
1818 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1819 allocating around 0x80000000.
1820
201506da
PA
18212016-08-19 Pedro Alves <palves@redhat.com>
1822
1823 PR gdb/20415
1824 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1825 (x32-avx512-linux-ipa.o): New rules.
1826 * configure.ac (x86_64-*-linux*): New x32 check.
1827 * configure.srv (ipa_x32_linux_regobj): New.
1828 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1829 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1830 descriptions.
1831 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1832 descriptions.
1833 * configure: Regenerate.
1834
f348d89a
PA
18352016-08-09 Pedro Alves <palves@redhat.com>
1836
1837 PR gdb/18653
1838 * Makefile.in (OBS): Add signals-state-save-restore.o.
1839 (signals-state-save-restore.o): New rule.
1840 * config.in: Regenerate.
1841 * configure: Regenerate.
1842 * linux-low.c: Include "signals-state-save-restore.h".
1843 (linux_create_inferior): Call
1844 restore_original_signals_state.
1845 * server.c: Include "dispositions-save-restore.h".
1846 (captured_main): Call save_original_signals_state.
1847
1baf5149
PA
18482016-08-05 Pedro Alves <palves@redhat.com>
1849
1850 * configure: Regenerate.
1851
fcd4a73d
YQ
18522016-08-04 Yao Qi <yao.qi@linaro.org>
1853
1854 * linux-low.c (regsets_fetch_inferior_registers): Check
1855 errno is ESRCH or not.
1856
979659d0
YQ
18572016-08-02 Yao Qi <yao.qi@linaro.org>
1858
1859 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1860 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1861 (thread_db_load_search): Update.
1862 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1863 td_ta_set_event and td_ta_event_getmsg.
1864
6598661d
PA
18652016-07-26 Pedro Alves <palves@redhat.com>
1866
1867 PR server/20414
1868 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1869 of unsigned long for 64-bit registers and use uint32_t instead of
1870 unsigned int for 32-bit registers.
1871
9cf12d57
PA
18722016-07-26 Pedro Alves <palves@redhat.com>
1873
1874 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1875 to 'ptrace'.
1876
305450ed
TT
18772016-07-21 Tom Tromey <tom@tromey.com>
1878
1879 * configure: Rebuild.
1880
2583da7c
YQ
18812016-07-21 Yao Qi <yao.qi@linaro.org>
1882
1883 * mem-break.c (find_gdb_breakpoint): Cast bp to
1884 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1885
21536b36
YQ
18862016-07-21 Yao Qi <yao.qi@linaro.org>
1887
1888 * server.c (handle_v_requests): Support s and S actions
1889 if target_supports_software_single_step return true.
1890
8901d193
YQ
18912016-07-21 Yao Qi <yao.qi@linaro.org>
1892
1893 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1894 is resume_step, call maybe_hw_step.
1895 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1896 and unstop them.
1897 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1898 breakpoints or not.
1899 (proceed_one_lwp): If resume request is resume_step, install
1900 reinsert breakpoints and call maybe_hw_step.
1901
0e9a339e
YQ
19022016-07-21 Yao Qi <yao.qi@linaro.org>
1903
1904 * linux-low.c (proceed_one_lwp): Declare.
1905 (linux_resume_one_thread): Remove local variable 'step'.
1906 Lift code enqueue signal. Call proceed_one_lwp instead of
1907 linux_resume_one_lwp.
1908
4281b351
YQ
19092016-07-21 Yao Qi <yao.qi@linaro.org>
1910
1911 * linux-low.c (linux_resume_one_thread): Call
1912 enqueue_pending_signal.
1913
984a2c04
YQ
19142016-07-21 Yao Qi <yao.qi@linaro.org>
1915
1916 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1917 * inferiors.c (do_restore_current_thread_cleanup): New function.
1918 (make_cleanup_restore_current_thread): Likewise.
1919 * linux-low.c (install_software_single_step_breakpoints): Call
1920 make_cleanup_restore_current_thread. Switch current_thread to
1921 thread.
1922
bec903c9
YQ
19232016-07-21 Yao Qi <yao.qi@linaro.org>
1924
1925 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1926 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1927 (clone_one_breakpoint): Likewise.
1928 (delete_reinsert_breakpoints): Change parameter to thread.
1929 Callers updated.
1930 (has_reinsert_breakpoints): Likewise.
1931 (uninsert_reinsert_breakpoints): Likewise.
1932 (reinsert_reinsert_breakpoints): Likewise.
1933 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1934 (delete_reinsert_breakpoints): Likewise.
1935 (reinsert_reinsert_breakpoints): Likewise.
1936 (uninsert_reinsert_breakpoints): Likewise.
1937 (has_reinsert_breakpoints): Likewise.
1938
63c40ec7
YQ
19392016-07-21 Yao Qi <yao.qi@linaro.org>
1940
1941 * inferiors.c (get_thread_process): Make parameter const.
1942 * inferiors.h (get_thread_process): Update declaration.
1943 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1944 Add new parameters child_thread and parent_thread. Callers
1945 updated.
1946 * mem-break.h (clone_all_breakpoints): Update declaration.
1947
9aa76cd0
YQ
19482016-07-21 Yao Qi <yao.qi@linaro.org>
1949
1950 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1951 <command_list, handler>: Remove.
1952 (struct gdb_breakpoint): New.
1953 (struct other_breakpoint): New.
1954 (struct reinsert_breakpoint): New.
1955 (is_gdb_breakpoint): New function.
1956 (any_persistent_commands): Update command_list if
1957 is_gdb_breakpoint returns true.
1958 (set_breakpoint): Create breakpoints according to their types.
1959 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1960 (set_gdb_breakpoint_1): Likewise.
1961 (set_gdb_breakpoint): Likewise.
1962 (clear_breakpoint_conditions): Change parameter type to
1963 'struct gdb_breakpoint *'.
1964 (clear_breakpoint_commands): Likewise.
1965 (clear_breakpoint_conditions_and_commands): Likewise.
1966 (add_condition_to_breakpoint): Likewise.
1967 (add_breakpoint_condition): Likewise.
1968 (add_commands_to_breakpoint): Likewise.
1969 (check_breakpoints): Check other_breakpoint.
1970 (clone_one_breakpoint): Clone breakpopint according to its type.
1971 * mem-break.h (struct gdb_breakpoint): Declare.
1972 (set_gdb_breakpoint): Update declaration.
1973 (clear_breakpoint_conditions_and_commands): Likewise.
1974 (add_breakpoint_condition): Likewise.
1975 (add_breakpoint_commands): Likewise.
1976 * server.c (process_point_options): Change parameter type to
1977 'struct gdb_breakpoint *'.
1978
811f8301
YQ
19792016-07-21 Yao Qi <yao.qi@linaro.org>
1980
1981 * mem-break.c (set_breakpoint_at): Rename it to ...
1982 (set_breakpoint_type_at): ... it.
1983 (set_breakpoint_at): Call set_breakpoint_type_at.
1984 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1985 * mem-break.h (set_breakpoint_at): Update comments.
1986
b1c51e36
CLT
19872016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1988
1989 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1990 to buf parameter.
1991 (nios2_store_gregset): Likewise.
1992
ced2dffb
PA
19932016-07-01 Pedro Alves <palves@redhat.com>
1994 Antoine Tremblay <antoine.tremblay@ericsson.com>
1995
1996 * linux-low.c: Change interface to take the target lwp_info
1997 pointer directly and return void. Handle detaching from a zombie
1998 thread.
1999 (linux_detach_lwp_callback): New function.
2000 (linux_detach): Detach from the leader thread after detaching from
2001 the clone threads.
2002
2ac09a5b
YQ
20032016-06-28 Yao Qi <yao.qi@linaro.org>
2004
2005 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2006 for variable new_offset.
2007 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2008 (aarch64_ftrace_insn_reloc_cb): Likewise.
2009 (aarch64_ftrace_insn_reloc_tb): Likewise.
2010 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2011 PRIx64 instead of PRIx32.
2012
79e7fd4f
YQ
20132016-06-28 Yao Qi <yao.qi@linaro.org>
2014
2015 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2016 (the_low_target): Install arm_get_syscall_trapinfo.
2017
061fc021
YQ
20182016-06-28 Yao Qi <yao.qi@linaro.org>
2019
2020 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2021 function.
2022 (the_low_target): Install aarch64_get_syscall_trapinfo.
2023
4cc32bec
YQ
20242016-06-28 Yao Qi <yao.qi@linaro.org>
2025
2026 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2027 Callers updated.
2028 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2029 Remove parameter sysno.
2030 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2031 sysret.
2032
782c1122
AA
20332016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2034
2035 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2036 (s390_emit_ne_goto): Likewise.
2037 (s390_emit_lt_goto): Likewise.
2038 (s390_emit_le_goto): Likewise.
2039 (s390_emit_gt_goto): Likewise.
2040 (s390_emit_ge_goto): Likewise.
2041 (s390x_emit_eq_goto): Likewise.
2042 (s390x_emit_ne_goto): Likewise.
2043 (s390x_emit_lt_goto): Likewise.
2044 (s390x_emit_le_goto): Likewise.
2045 (s390x_emit_gt_goto): Likewise.
2046 (s390x_emit_ge_goto): Likewise.
2047 (s390_emit_ops_impl): Mark variable static.
2048 (s390x_emit_ops): Likewise.
2049
2e7b624b
YQ
20502016-06-17 Yao Qi <yao.qi@linaro.org>
2051
2052 * linux-low.c (handle_extended_wait): Call
2053 uninsert_reinsert_breakpoints for the parent process. Remove
2054 reinsert breakpoints from the child process. Reinsert them to
2055 the parent process when vfork is done.
2056 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2057 (reinsert_reinsert_breakpoints): New function.
2058 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2059 (reinsert_reinsert_breakpoints): Declare.
2060
8a81c5d7
YQ
20612016-06-17 Yao Qi <yao.qi@linaro.org>
2062
2063 * linux-low.c (handle_extended_wait): If the parent is doing
2064 step-over, remove the reinsert breakpoints from the forked child.
2065
f50bf8e5
YQ
20662016-06-17 Yao Qi <yao.qi@linaro.org>
2067
2068 * linux-low.c (unsuspend_all_lwps): Declare.
2069 (linux_low_filter_event): If thread exited, call finish_step_over.
2070 If step-over is finished, unsuspend other threads.
2071
8376a3cb
YQ
20722016-06-17 Yao Qi <yao.qi@linaro.org>
2073
2074 * linux-low.c (linux_resume_one_lwp_throw): Assert
2075 has_reinsert_breakpoints returns false.
2076 * mem-break.c (delete_disabled_breakpoints): Assert
2077 bp type isn't reinsert_breakpoint.
2078
f79b145d
YQ
20792016-06-17 Yao Qi <yao.qi@linaro.org>
2080
2081 * linux-low.c (maybe_hw_step): New function.
2082 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2083 (finish_step_over): Switch current_thread to lwp temporarily,
2084 and assert has_reinsert_breakpoints returns true.
2085 (proceed_one_lwp): Call maybe_hw_step.
2086 * mem-break.c (has_reinsert_breakpoints): New function.
2087 * mem-break.h (has_reinsert_breakpoints): Declare.
2088
0ae534d2
JT
20892016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2090
2091 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2092
fcdad592
YQ
20932016-05-17 Yao Qi <yao.qi@linaro.org>
2094
2095 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2096 instead of find_inferior.
2097
9e784964
YQ
20982016-05-05 Yao Qi <yao.qi@linaro.org>
2099
2100 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2101 Initialize res to zero.
2102
cf2ebb6e
YQ
21032016-05-05 Yao Qi <yao.qi@linaro.org>
2104
2105 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2106 to uint32_t.
2107
c1aebf87
UW
21082016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2109
2110 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2111 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2112 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2113
35fd2deb 21142016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2115 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2116
2117 * tracepoint.c (write_inferior_int8): New function.
2118 (cmd_qtenable_disable): Write enable flag using
2119 write_inferior_int8.
2120
484b3c32
YQ
21212016-04-25 Yao Qi <yao.qi@linaro.org>
2122
2123 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2124 (need_step_over_p): Return zero if the LWP has pending signals
2125 can be delivered on software single step target.
2126
85ba7d86
YQ
21272016-04-25 Yao Qi <yao.qi@linaro.org>
2128
2129 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2130 return instead of error.
2131
3539aa13
YQ
21322016-04-22 Yao Qi <yao.qi@linaro.org>
2133
2134 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2135 to 23.
2136
5b061e98
YQ
21372016-04-22 Yao Qi <yao.qi@linaro.org>
2138
2139 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2140 signal when stepping over breakpoint with software single
2141 step.
2142
3451269c
PA
21432016-04-21 Pedro Alves <palves@redhat.com>
2144
2145 * linux-s390-low.c (s390_collect_ptrace_register)
2146 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2147 add casts.
2148 (s390_check_regset): Use void * instead of gdb_byte *.
2149
a2358508
PA
21502016-04-20 Pedro Alves <palves@redhat.com>
2151
2152 * configure: Renegerate.
2153
6885166d
YQ
21542016-04-20 Yao Qi <yao.qi@linaro.org>
2155
2156 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2157 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2158 number 16.
2159 (arm_store_gregset): Likewise.
2160
2b863f51
WT
21612016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2162
2163 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2164 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2165 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2166 (amd64-avx-mpx-linux.c): New rules.
2167 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2168 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2169 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2170 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2171 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2172 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2173 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2174 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2175 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2176 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2177 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2178 * linux-x86-low.c (x86_linux_read_description): Add case for
2179 X86_XSTATE_AVX_MPX_MASK.
2180 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2181 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2182 init_registers_i386_avx_mpx_linux.
2183 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2184 (initialize_low_tracepoint): Call
2185 init_registers_i386_avx_mpx_linux.
2186 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2187 (initialize_low_tracepoint): Call
2188 init_registers_amd64_avx_mpx_linux.
2189 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2190 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2191 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2192 declarations.
2193
9b30624b
PA
21942016-04-18 Pedro Alves <palves@redhat.com>
2195
2196 * configure: Regenerate.
2197
45e3745e
AT
21982016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2199
2200 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2201 (aarch64_emit_sub): Likewise.
2202
2afc13ff
PA
22032016-04-12 Pedro Alves <palves@redhat.com>
2204
2205 * utils.c (prepare_to_throw_exception): Delete.
2206
6e774b13
SM
22072016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2208
2209 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2210
4dca19f8
MK
22112016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2212
2213 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2214
d0a9981f
MK
22152016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2216
2217 * linux-aarch64-ipa.c: Add <elf.h> include.
2218 * linux-ppc-ipa.c: Add <elf.h> include.
2219 * linux-s390-ipa.c: Add <elf.h> include.
2220
252db07e
MK
22212016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2222
2223 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2224 (get_raw_reg_ptr): Likewise.
2225 (get_trace_state_variable_value_ptr): Likewise.
2226 (set_trace_state_variable_value_ptr): Likewise.
2227 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2228 char *.
2229
14e2b6d9
MK
22302016-03-31 Wei-cheng Wang <cole945@gmail.com>
2231 Marcin Kościelnicki <koriakin@0x04.net>
2232
2233 PR/17221
2234 * linux-ppc-low.c (emit_insns): New function.
2235 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2236 (ppc_emit_prologue): New function.
2237 (ppc_emit_epilogue): New function.
2238 (ppc_emit_add): New function.
2239 (ppc_emit_sub): New function.
2240 (ppc_emit_mul): New function.
2241 (ppc_emit_lsh): New function.
2242 (ppc_emit_rsh_signed): New function.
2243 (ppc_emit_rsh_unsigned): New function.
2244 (ppc_emit_ext): New function.
2245 (ppc_emit_zero_ext): New function.
2246 (ppc_emit_log_not): New function.
2247 (ppc_emit_bit_and): New function.
2248 (ppc_emit_bit_or): New function.
2249 (ppc_emit_bit_xor): New function.
2250 (ppc_emit_bit_not): New function.
2251 (ppc_emit_equal): New function.
2252 (ppc_emit_less_signed): New function.
2253 (ppc_emit_less_unsigned): New function.
2254 (ppc_emit_ref): New function.
2255 (ppc_emit_const): New function.
2256 (ppc_emit_reg): New function.
2257 (ppc_emit_pop): New function.
2258 (ppc_emit_stack_flush): New function.
2259 (ppc_emit_swap): New function.
2260 (ppc_emit_stack_adjust): New function.
2261 (ppc_emit_call): New function.
2262 (ppc_emit_int_call_1): New function.
2263 (ppc_emit_void_call_2): New function.
2264 (ppc_emit_if_goto): New function.
2265 (ppc_emit_goto): New function.
2266 (ppc_emit_eq_goto): New function.
2267 (ppc_emit_ne_goto): New function.
2268 (ppc_emit_lt_goto): New function.
2269 (ppc_emit_le_goto): New function.
2270 (ppc_emit_gt_goto): New function.
2271 (ppc_emit_ge_goto): New function.
2272 (ppc_write_goto_address): New function.
2273 (ppc_emit_ops_impl): New static variable.
2274 (ppc64v1_emit_prologue): New function.
2275 (ppc64v2_emit_prologue): New function.
2276 (ppc64_emit_epilogue): New function.
2277 (ppc64_emit_add): New function.
2278 (ppc64_emit_sub): New function.
2279 (ppc64_emit_mul): New function.
2280 (ppc64_emit_lsh): New function.
2281 (ppc64_emit_rsh_signed): New function.
2282 (ppc64_emit_rsh_unsigned): New function.
2283 (ppc64_emit_ext): New function.
2284 (ppc64_emit_zero_ext): New function.
2285 (ppc64_emit_log_not): New function.
2286 (ppc64_emit_bit_and): New function.
2287 (ppc64_emit_bit_or): New function.
2288 (ppc64_emit_bit_xor): New function.
2289 (ppc64_emit_bit_not): New function.
2290 (ppc64_emit_equal): New function.
2291 (ppc64_emit_less_signed): New function.
2292 (ppc64_emit_less_unsigned): New function.
2293 (ppc64_emit_ref): New function.
2294 (ppc64_emit_const): New function.
2295 (ppc64v1_emit_reg): New function.
2296 (ppc64v2_emit_reg): New function.
2297 (ppc64_emit_pop): New function.
2298 (ppc64_emit_stack_flush): New function.
2299 (ppc64_emit_swap): New function.
2300 (ppc64v1_emit_call): New function.
2301 (ppc64v2_emit_call): New function.
2302 (ppc64v1_emit_int_call_1): New function.
2303 (ppc64v2_emit_int_call_1): New function.
2304 (ppc64v1_emit_void_call_2): New function.
2305 (ppc64v2_emit_void_call_2): New function.
2306 (ppc64_emit_if_goto): New function.
2307 (ppc64_emit_eq_goto): New function.
2308 (ppc64_emit_ne_goto): New function.
2309 (ppc64_emit_lt_goto): New function.
2310 (ppc64_emit_le_goto): New function.
2311 (ppc64_emit_gt_goto): New function.
2312 (ppc64_emit_ge_goto): New function.
2313 (ppc64v1_emit_ops_impl): New static variable.
2314 (ppc64v2_emit_ops_impl): New static variable.
2315 (ppc_emit_ops): New function.
2316 (linux_low_target): Wire in ppc_emit_ops.
2317
a2174ba4
MK
23182016-03-31 Wei-cheng Wang <cole945@gmail.com>
2319 Marcin Kościelnicki <koriakin@0x04.net>
2320
2321 PR/17221
2322 * Makefile.in: Add powerpc-*-ipa.o
2323 * configure.srv: Add ipa_obj for powerpc*-linux.
2324 * linux-ppc-ipa.c: New file.
2325 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2326 includes.
2327 (PPC_FIELD): New macro.
2328 (PPC_SEXT): New macro.
2329 (PPC_OP6): New macro.
2330 (PPC_BO): New macro.
2331 (PPC_LI): New macro.
2332 (PPC_BD): New macro.
2333 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2334 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2335 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2336 (ppc_get_thread_area): New function.
2337 (is_elfv2_inferior): New function.
2338 (gen_ds_form): New function.
2339 (GEN_STD): New macro.
2340 (GEN_STDU): New macro.
2341 (GEN_LD): New macro.
2342 (GEN_LDU): New macro.
2343 (gen_d_form): New function.
2344 (GEN_ADDI): New macro.
2345 (GEN_ADDIS): New macro.
2346 (GEN_LI): New macro.
2347 (GEN_LIS): New macro.
2348 (GEN_ORI): New macro.
2349 (GEN_ORIS): New macro.
2350 (GEN_LWZ): New macro.
2351 (GEN_STW): New macro.
2352 (GEN_STWU): New macro.
2353 (gen_xfx_form): New function.
2354 (GEN_MFSPR): New macro.
2355 (GEN_MTSPR): New macro.
2356 (GEN_MFCR): New macro.
2357 (GEN_MTCR): New macro.
2358 (GEN_SYNC): New macro.
2359 (GEN_LWSYNC): New macro.
2360 (gen_x_form): New function.
2361 (GEN_OR): New macro.
2362 (GEN_MR): New macro.
2363 (GEN_LWARX): New macro.
2364 (GEN_STWCX): New macro.
2365 (GEN_CMPW): New macro.
2366 (gen_md_form): New function.
2367 (GEN_RLDICL): New macro.
2368 (GEN_RLDICR): New macro.
2369 (gen_i_form): New function.
2370 (GEN_B): New macro.
2371 (GEN_BL): New macro.
2372 (gen_b_form): New function.
2373 (GEN_BNE): New macro.
2374 (GEN_LOAD): New macro.
2375 (GEN_STORE): New macro.
2376 (gen_limm): New function.
2377 (gen_atomic_xchg): New function.
2378 (gen_call): New function.
2379 (ppc_relocate_instruction): New function.
2380 (ppc_install_fast_tracepoint_jump_pad): New function.
2381 (ppc_get_min_fast_tracepoint_insn_len): New function.
2382 (ppc_get_ipa_tdesc_idx): New function.
2383 (the_low_target): Wire in the new functions.
2384 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2385 tdescs.
2386 * linux-ppc-tdesc.h: New file.
2387
a13c4696
MK
23882016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2389
2390 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2391 (alloc_jump_pad_buffer): New function.
2392 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2393 (alloc_jump_pad_buffer): New function.
2394 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2395 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2396 (alloc_jump_pad_buffer): New function.
2397 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2398 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2399 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2400 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2401
1cda1512
MK
24022016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2403
2404 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2405 * linux-amd64-ipa.c: Likewise.
2406 * linux-i386-ipa.c: Likewise.
2407 * linux-s390-ipa.c: Likewise.
2408 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2409 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2410 set_trace_state_variable_value_ptr.
2411 (struct ipa_sym_addresses): Likewise.
2412 (symbol_list): Likewise.
2413 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2414 accessing gdb_collect directly.
2415 (gdb_collect_ptr_type): New typedef.
2416 (get_raw_reg_ptr_type): New typedef.
2417 (get_trace_state_variable_value_ptr_type): New typedef.
2418 (set_trace_state_variable_value_ptr_type): New typedef.
2419 (gdb_collect_ptr): New global.
2420 (get_raw_reg_ptr): New global.
2421 (get_trace_state_variable_value_ptr): New global.
2422 (set_trace_state_variable_value_ptr): New global.
2423 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2424 accessing get_raw_reg directly.
2425 (get_get_tsv_func_addr): Likewise for
2426 get_trace_state_variable_value_ptr.
2427 (get_set_tsv_func_addr): Likewise for
2428 set_trace_state_variable_value_ptr.
2429 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2430
72fb5488
SM
24312016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2432
2433 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2434
28170b88
MK
24352016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2436
2437 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2438 packets.
2439 (relocate_instruction): Remove own_buf.
2440 * server.c (own_buf): Make global.
2441 (handle_v_requests): Make global.
2442 * server.h (own_buf): New declaration.
2443 (handle_v_requests): New prototype.
2444
f39e8743
MK
24452016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2446
2447 PR 18377
2448 * linux-s390-low.c (add_insns): New function.
2449 (s390_emit_prologue): New function.
2450 (s390_emit_epilogue): New function.
2451 (s390_emit_add): New function.
2452 (s390_emit_sub): New function.
2453 (s390_emit_mul): New function.
2454 (s390_emit_lsh): New function.
2455 (s390_emit_rsh_signed): New function.
2456 (s390_emit_rsh_unsigned): New function.
2457 (s390_emit_ext): New function.
2458 (s390_emit_log_not): New function.
2459 (s390_emit_bit_and): New function.
2460 (s390_emit_bit_or): New function.
2461 (s390_emit_bit_xor): New function.
2462 (s390_emit_bit_not): New function.
2463 (s390_emit_equal): New function.
2464 (s390_emit_less_signed): New function.
2465 (s390_emit_less_unsigned): New function.
2466 (s390_emit_ref): New function.
2467 (s390_emit_if_goto): New function.
2468 (s390_emit_goto): New function.
2469 (s390_write_goto_address): New function.
2470 (s390_emit_litpool): New function.
2471 (s390_emit_const): New function.
2472 (s390_emit_call): New function.
2473 (s390_emit_reg): New function.
2474 (s390_emit_pop): New function.
2475 (s390_emit_stack_flush): New function.
2476 (s390_emit_zero_ext): New function.
2477 (s390_emit_swap): New function.
2478 (s390_emit_stack_adjust): New function.
2479 (s390_emit_set_r2): New function.
2480 (s390_emit_int_call_1): New function.
2481 (s390_emit_void_call_2): New function.
2482 (s390_emit_eq_goto): New function.
2483 (s390_emit_ne_goto): New function.
2484 (s390_emit_lt_goto): New function.
2485 (s390_emit_le_goto): New function.
2486 (s390_emit_gt_goto): New function.
2487 (s390_emit_ge_goto): New function.
2488 (s390x_emit_prologue): New function.
2489 (s390x_emit_epilogue): New function.
2490 (s390x_emit_add): New function.
2491 (s390x_emit_sub): New function.
2492 (s390x_emit_mul): New function.
2493 (s390x_emit_lsh): New function.
2494 (s390x_emit_rsh_signed): New function.
2495 (s390x_emit_rsh_unsigned): New function.
2496 (s390x_emit_ext): New function.
2497 (s390x_emit_log_not): New function.
2498 (s390x_emit_bit_and): New function.
2499 (s390x_emit_bit_or): New function.
2500 (s390x_emit_bit_xor): New function.
2501 (s390x_emit_bit_not): New function.
2502 (s390x_emit_equal): New function.
2503 (s390x_emit_less_signed): New function.
2504 (s390x_emit_less_unsigned): New function.
2505 (s390x_emit_ref): New function.
2506 (s390x_emit_if_goto): New function.
2507 (s390x_emit_const): New function.
2508 (s390x_emit_call): New function.
2509 (s390x_emit_reg): New function.
2510 (s390x_emit_pop): New function.
2511 (s390x_emit_stack_flush): New function.
2512 (s390x_emit_zero_ext): New function.
2513 (s390x_emit_swap): New function.
2514 (s390x_emit_stack_adjust): New function.
2515 (s390x_emit_int_call_1): New function.
2516 (s390x_emit_void_call_2): New function.
2517 (s390x_emit_eq_goto): New function.
2518 (s390x_emit_ne_goto): New function.
2519 (s390x_emit_lt_goto): New function.
2520 (s390x_emit_le_goto): New function.
2521 (s390x_emit_gt_goto): New function.
2522 (s390x_emit_ge_goto): New function.
2523 (s390_emit_ops): New function.
2524 (struct linux_target_ops): Fill in emit_ops hook.
2525
abd9baf9
MK
25262016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2527
2528 PR 18377
2529 * Makefile.in: Add s390 IPA files.
2530 * configure.srv: Build IPA for s390.
2531 * linux-s390-ipa.c: New file.
2532 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2533 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2534 (tdesc_s390_linux32): Likewise.
2535 (init_registers_s390_linux32v1): Likewise.
2536 (tdesc_s390_linux32v1): Likewise.
2537 (init_registers_s390_linux32v2): Likewise.
2538 (tdesc_s390_linux32v2): Likewise.
2539 (init_registers_s390_linux64): Likewise.
2540 (tdesc_s390_linux64): Likewise.
2541 (init_registers_s390_linux64v1): Likewise.
2542 (tdesc_s390_linux64v1): Likewise.
2543 (init_registers_s390_linux64v2): Likewise.
2544 (tdesc_s390_linux64v2): Likewise.
2545 (init_registers_s390_te_linux64): Likewise.
2546 (tdesc_s390_te_linux64): Likewise.
2547 (init_registers_s390_vx_linux64): Likewise.
2548 (tdesc_s390_vx_linux64): Likewise.
2549 (init_registers_s390_tevx_linux64): Likewise.
2550 (tdesc_s390_tevx_linux64): Likewise.
2551 (init_registers_s390x_linux64): Likewise.
2552 (tdesc_s390x_linux64): Likewise.
2553 (init_registers_s390x_linux64v1): Likewise.
2554 (tdesc_s390x_linux64v1): Likewise.
2555 (init_registers_s390x_linux64v2): Likewise.
2556 (tdesc_s390x_linux64v2): Likewise.
2557 (init_registers_s390x_te_linux64): Likewise.
2558 (tdesc_s390x_te_linux64): Likewise.
2559 (init_registers_s390x_vx_linux64): Likewise.
2560 (tdesc_s390x_vx_linux64): Likewise.
2561 (init_registers_s390x_tevx_linux64): Likewise.
2562 (tdesc_s390x_tevx_linux64): Likewise.
2563 (have_hwcap_s390_vx): New static variable.
2564 (s390_arch_setup): Fill have_hwcap_s390_vx.
2565 (s390_get_thread_area): New function.
2566 (s390_ft_entry_gpr_esa): New const.
2567 (s390_ft_entry_gpr_zarch): New const.
2568 (s390_ft_entry_misc): New const.
2569 (s390_ft_entry_fr): New const.
2570 (s390_ft_entry_vr): New const.
2571 (s390_ft_main_31): New const.
2572 (s390_ft_main_64): New const.
2573 (s390_ft_exit_fr): New const.
2574 (s390_ft_exit_vr): New const.
2575 (s390_ft_exit_misc): New const.
2576 (s390_ft_exit_gpr_esa): New const.
2577 (s390_ft_exit_gpr_zarch): New const.
2578 (append_insns): New function.
2579 (s390_relocate_instruction): New function.
2580 (s390_install_fast_tracepoint_jump_pad): New function.
2581 (s390_get_min_fast_tracepoint_insn_len): New function.
2582 (s390_get_ipa_tdesc_idx): New function.
2583 (struct linux_target_ops): Wire in the above functions.
2584 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2585 * linux-s390-tdesc.h: New file.
2586
a4105d04
MK
25872016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2588
2589 * linux-s390-low.c (s390_supports_tracepoints): New function.
2590 (struct linux_target_ops): Fill supports_tracepoints hook.
2591
35ac8b3e
YQ
25922016-03-18 Yao Qi <yao.qi@linaro.org>
2593
2594 * linux-low.c (lwp_signal_can_be_delivered): New function.
2595 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2596
94610ec4
YQ
25972016-03-18 Yao Qi <yao.qi@linaro.org>
2598
2599 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2600 0 if signal is enqueued. Remove 'signal' from one debugging
2601 message. Move one debugging message to some lines below.
2602 Remove code setting 'signal' to 0.
2603
80aea927
YQ
26042016-03-18 Yao Qi <yao.qi@linaro.org>
2605
2606 * linux-low.c (linux_low_filter_event): Remove redundant
2607 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2608
b04fd3be
MK
26092016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2610
2611 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2612 (struct linux_target_ops): Wire in the above.
2613
c40c8d4b
YQ
26142016-03-03 Yao Qi <yao.qi@linaro.org>
2615
2616 * linux-low.c: Update comments to start_step_over.
2617
0f8288ae
YQ
26182016-03-03 Yao Qi <yao.qi@linaro.org>
2619
2620 PR server/19736
2621 * linux-low.c (handle_extended_wait): Set child suspended
2622 if event_lwp->bp_reinsert isn't zero.
2623
fdbd04a8
YQ
26242016-03-02 Yao Qi <yao.qi@linaro.org>
2625
2626 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2627 enqueue_pending_signal.
2628
6896a8fa
MK
26292016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2630
2631 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2632 is actually loaded.
2633
ab503087
MK
26342016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2635
2636 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2637 (s390_regmap_3264) [!__s390x__]: New global.
2638 (s390_collect_ptrace_register): Skip map entries containing -1.
2639 (s390_supply_ptrace_register): Ditto.
2640 (s390_fill_gprs_high): New function.
2641 (s390_store_gprs_high): New function.
2642 (s390_regsets): Add NT_S390_HIGH_GPRS.
2643 (s390_get_hwcap): Enable on 31-bit.
2644 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2645 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2646 Detect NT_S390_HIGH_GPRS.
2647 (s390_usrregs_info_3264): Enable on 31-bit.
2648 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2649 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2650
ae91f625
MK
26512016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2652
2653 PR gdb/13808
2654 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2655 * configure.srv: Ditto.
2656 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2657 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2658 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2659 (init_registers_amd64_linux): Remove prototype.
2660 (tdesc_amd64_linux): Remove declaration.
2661 (get_ipa_tdesc): New function.
2662 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2663 initialize remaining tdescs.
2664 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2665 (init_registers_i386_linux): Remove prototype.
2666 (tdesc_i386_linux): Remove declaration.
2667 (get_ipa_tdesc): New function.
2668 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2669 initialize remaining tdescs.
2670 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2671 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2672 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2673 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2674 (x86_get_ipa_tdesc_idx): New function.
2675 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2676 * linux-x86-tdesc.h: New file.
2677 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2678 (target_get_ipa_tdesc_idx): New macro.
2679 * tracepoint.c (ipa_tdesc_idx): New macro.
2680 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2681 (symbol_list): Add ipa_tdesc_idx.
2682 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2683 (ipa_tdesc): Remove.
2684 (ipa_tdesc_idx): New variable.
2685 (get_context_regcache): Use get_ipa_tdesc.
2686 (gdb_collect): Ditto.
2687 (gdb_probe): Ditto.
2688 * tracepoint.h (get_ipa_tdesc): New prototype.
2689 (ipa_tdesc): Remove.
2690
e7ad2f14
PA
26912016-02-24 Pedro Alves <palves@redhat.com>
2692
2693 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2694 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2695 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2696 Factor out common code between the USE_SIGTRAP_SIGINFO and
2697 !USE_SIGTRAP_SIGINFO blocks.
2698 (linux_low_filter_event): Call save_stop_reason instead of
2699 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2700 Update comments.
2701 (linux_wait_1): Update comments.
2702
657f9cde
WW
27032016-02-24 Wei-cheng Wang <cole945@gmail.com>
2704
2705 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2706 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2707 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2708 ppc_insert_point, ppc_remove_point.
2709
b00b61e1
MK
27102016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2711
2712 * linux-s390-low.c (s390_supports_z_point_type): New function.
2713 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2714
553cb527
YQ
27152016-02-16 Yao Qi <yao.qi@linaro.org>
2716
2717 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2718 PC. Get pc from regcache_read_pc.
2719
a5652c21
YQ
27202016-02-12 Yao Qi <yao.qi@linaro.org>
2721
2722 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2723 or linux_get_pc_32bit.
2724 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2725
ed443b61
YQ
27262016-02-12 Yao Qi <yao.qi@linaro.org>
2727
2728 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2729 arm_linux_get_next_pcs_fixup.
2730
020ecd38
MK
27312016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2732
2733 * tracepoint.c (x_tracepoint_action_download): Change
2734 write_inferior_data_ptr to write_inferior_data_pointer.
2735 (cmd_qtstart): Likewise.
2736 (write_inferior_data_ptr): Remove.
2737 (download_agent_expr): Change write_inferior_data_ptr to
2738 write_inferior_data_pointer.
2739 (download_tracepoint_1): Likewise.
2740 (download_tracepoint): Likewise.
2741 (download_trace_state_variables): Likewise.
2742
7cae9051
WW
27432016-02-11 Wei-cheng Wang <cole945@gmail.com>
2744 Marcin Kościelnicki <koriakin@0x04.net>
2745
2746 * tracepoint.c (struct tracepoint_action_ops): Remove.
2747 (struct tracepoint_action): Remove ops.
2748 (m_tracepoint_action_download, r_tracepoint_action_download)
2749 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2750 size and offset accordingly.
2751 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2752 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2753 (tracepoint_action_send, tracepoint_action_download): New functions.
2754 Helpers for trace action handlers.
2755 (add_tracepoint_action): Remove setup actions ops.
2756 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2757
9f6a71b4
YQ
27582016-02-10 Yao Qi <yao.qi@linaro.org>
2759
2760 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2761
1e94266c
SM
27622016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2763
2764 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2765 to AC_OUTPUT.
2766 * configure: Regenerate.
2767
8adce034
SM
27682016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2769
2770 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2771 void * to gdb_byte *.
2772 * linux-low.c (siginfo_fixup): Likewise.
2773 (linux_xfer_siginfo): Likewise.
2774 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2775 Likewise.
2776 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2777
93813b37
WT
27782016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2779
2780 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2781 to srv_tgtobj.
2782 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2783 to srv_tgtobj.
2784 * linux-x86-low.c [__x86_64__]: Include
2785 "nat/amd64-linux-siginfo.h".
2786 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2787 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2788 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2789 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2790 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2791 (cpt_si_fd, si_timerid, si_overrun): Move from
2792 nat/amd64-linux-siginfo.c.
2793 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2794
8424cc97
SM
27952016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2796
2797 * server.c (skip_to_semicolon): Remove.
2798 (process_point_options): Use strchrnul instead of
2799 skip_to_semicolon.
2800
4d18591b
YQ
28012016-01-26 Yao Qi <yao.qi@linaro.org>
2802
2803 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2804 * linux-low.c (install_software_single_step_breakpoints): Don't
2805 call regcache_read_pc.
2806 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2807 argument pc.
2808
d8020970
YQ
28092016-01-26 Yao Qi <yao.qi@linaro.org>
2810
2811 * linux-low.c (install_software_single_step_breakpoints): Call
2812 regcache_read_pc instead of get_pc.
2813
8b207339
YQ
28142016-01-26 Yao Qi <yao.qi@linaro.org>
2815
2816 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2817 (unblock_async_io): Rename to ...
2818 (block_unblock_async_io): ... it. New function.
2819 (enable_async_io): Don't install SIGIO handler. Unblock it
2820 instead.
2821 (disable_async_io): Don't ignore SIGIO. Block it instead.
2822 (initialize_async_io): Install SIGIO handler. Don't call
2823 unblock_async_io.
2824
18879fef
YQ
28252016-01-26 Yao Qi <yao.qi@linaro.org>
2826
2827 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2828 first character is '\003', call *the_target->request_interrupt.
2829
a0f8e08a
YQ
28302016-01-25 Yao Qi <yao.qi@linaro.org>
2831
2832 * remote-utils.c (new_thread_notify): Remove.
2833 (dead_thread_notify): Likewise.
2834 * remote-utils.h (new_thread_notify): Remove declaration.
2835 (dead_thread_notify): Likewise.
2836
cc5fd9ab
MK
28372016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2838
2839 * gdb.trace/pending.exp: Fix expected message on continue.
2840
99e8eb11
MK
28412016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2842
2843 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2844 it works properly on big-endian machines where sizeof (CORE_ADDR)
2845 != sizeof (void *).
2846
a994041d
PA
28472016-01-21 Pedro Alves <palves@redhat.com>
2848
2849 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2850 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2851 * configure: Regenerate.
2852
f7a6a40d
YQ
28532016-01-21 Yao Qi <yao.qi@linaro.org>
2854
2855 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2856 is_thumb and set it according to CPSR saved on the stack.
2857 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2858 arm_sigreturn_next_pc.
2859
6f69e520
YQ
28602016-01-18 Yao Qi <yao.qi@linaro.org>
2861
2862 * linux-low.c (linux_set_pc_64bit): New function.
2863 (linux_get_pc_64bit): New function.
2864 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2865 Declare.
2866 * linux-sparc-low.c (debug_threads): Remove declaration.
2867 (sparc_get_pc): Remove.
2868 (the_low_target): Use linux_get_pc_64bit instead of
2869 sparc_get_pc.
2870 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2871 (the_low_target): Use linux_get_pc_64bit and
2872 linux_set_pc_64bit.
2873
276d4552
YQ
28742016-01-18 Yao Qi <yao.qi@linaro.org>
2875
2876 * linux-arm-low.c (debug_threads): Remove declaration.
2877 (arm_get_pc, arm_set_pc): Remove.
2878 (the_low_target): Use linux_get_pc_32bit and
2879 linux_set_pc_32bit.
2880 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2881 (the_low_target): Use linux_get_pc_32bit and
2882 linux_set_pc_32bit.
2883 * linux-cris-low.c (debug_threads): Remove declaration.
2884 (cris_get_pc, cris_set_pc,): Remove.
2885 (the_low_target): Use linux_get_pc_32bit and
2886 linux_set_pc_32bit.
2887 * linux-crisv32-low.c (debug_threads): Remove declaration.
2888 (cris_get_pc, cris_set_pc): Remove.
2889 (the_low_target): Use linux_get_pc_32bit and
2890 linux_set_pc_32bit.
2891 * linux-low.c: Include inttypes.h.
2892 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2893 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2894 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2895 (the_low_target): Use linux_get_pc_32bit and
2896 linux_set_pc_32bit.
2897 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2898 (the_low_target): Use linux_get_pc_32bit and
2899 linux_set_pc_32bit.
2900 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2901 (the_low_target): Use linux_get_pc_32bit and
2902 linux_set_pc_32bit.
2903 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2904 (the_low_target): Use linux_get_pc_32bit and
2905 linux_set_pc_32bit.
2906 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2907 (the_low_target): Use linux_get_pc_32bit and
2908 linux_set_pc_32bit.
2909
eb0edac8
GB
29102016-01-18 Gary Benson <gbenson@redhat.com>
2911
2912 * configure.ac (AC_FUNC_FORK): New check.
2913 * config.in: Regenerate.
2914 * configure: Likewise.
2915
1b451dda
YQ
29162016-01-14 Yao Qi <yao.qi@linaro.org>
2917
2918 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2919 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2920 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2921 arm_get_next_pcs_ctor.
2922
82075af2
JS
29232016-01-12 Josh Stone <jistone@redhat.com>
2924 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2925
2926 * inferiors.h: Include "gdb_vecs.h".
2927 (struct process_info): Add syscalls_to_catch.
2928 * inferiors.c (remove_process): Free syscalls_to_catch.
2929 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2930 syscall_return stops.
2931 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2932 * server.c (handle_general_set): Handle QCatchSyscalls.
2933 (handle_query): Report support for QCatchSyscalls.
2934 * target.h (struct target_ops): Add supports_catch_syscall.
2935 (target_supports_catch_syscall): New macro.
2936 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2937 (struct lwp_info): Add syscall_state.
2938 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2939 Maintain syscall_state and syscalls_to_catch across exec.
2940 (get_syscall_trapinfo): New function, proxy to the_low_target.
2941 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2942 (linux_low_filter_event): Toggle syscall_state entry/return for
2943 syscall traps, and set it ignored for all others.
2944 (gdb_catching_syscalls_p): New function.
2945 (gdb_catch_this_syscall_p): New function.
2946 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2947 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2948 (linux_supports_catch_syscall): New function.
2949 (linux_target_ops): Install it.
2950 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2951 (the_low_target): Install it.
2952
8f13a3ce
MF
29532016-01-12 Mike Frysinger <vapier@gentoo.org>
2954
2955 * acinclude.m4: Include new ../warning.m4 file.
2956 * configure: Regenerated.
2957 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2958
5b3da067
MF
29592016-01-12 Mike Frysinger <vapier@gentoo.org>
2960
2961 * ax.c (is_goto_target): Mark static.
2962 * linux-low.c (register_addr): Likewise.
2963 (linux_fetch_registers, linux_store_registers): Likewise.
2964 * mem-break.c (any_persistent_commands): Fix old prototype.
2965 (add_commands_to_breakpoint): Mark static.
2966 * regcache.c (find_register_by_name): Delete unused func.
2967 * remote-utils.c (hex_or_minus_one): Mark static.
2968 * server.c (monitor_show_help): Mark static.
2969 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2970 handle_v_requests): Likewise.
2971
bc504a31
PA
29722016-01-12 Pedro Alves <palves@redhat.com>
2973
2974 Remove use of the registered trademark symbol throughout.
2975
5a0dd67a
YQ
29762016-01-08 Yao Qi <yao.qi@linaro.org>
2977
2978 * remote-utils.c (getpkt): If c is '\003', call target hook
2979 request_interrupt.
2980
b2ca446f
YQ
29812016-01-06 Yao Qi <yao.qi@linaro.org>
2982
2983 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2984 linux-aarch32-low.c.
2985 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2986 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2987 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2988 (thumb2_breakpoint): Declare.
2989 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2990 linux-aarch32-low.h.
2991 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2992 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2993 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2994
edd88788
JB
29952016-01-01 Joel Brobecker <brobecker@adacore.com>
2996
2997 * gdbreplay.c (gdbreplay_version): Change copyright year in
2998 version message.
2999 * server.c (gdbserver_version): Likewise.
3000
65da7f14
PP
30012015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3002
3003 * server.c (crc32_table): Delete.
3004 (crc32): Use libiberty's xcrc32 function.
3005
4abd5ed2
JB
30062015-12-22 Joel Brobecker <brobecker@adacore.com>
3007
3008 * lynx-low.c (lynx_delete_thread_callback): New function.
3009 (lynx_mourn): Properly delete our process and all of its
3010 threads. Remove call to clear_inferiors.
3011
0e50fe5c
JB
30122015-12-22 Joel Brobecker <brobecker@adacore.com>
3013
3014 * target.c (thread_search_callback): Add check that
3015 the thread_stopped target callback is not NULL before
3016 calling it.
3017
35adc03f
YQ
30182015-12-21 Yao Qi <yao.qi@linaro.org>
3019
3020 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3021 arm breakpoint.
3022
bd2b2909
AT
30232015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3024
3025 * server.c (handle_query): Call target_supports_software_single_step.
3026
7fe5e27e
AT
30272015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3028
3029 * linux-low.c (single_step): New function.
3030 (linux_resume_one_lwp_throw): Call single_step.
3031 (start_step_over): Likewise.
3032
d9311bfa
AT
30332015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3034
3035 * Makefile.in (SFILES): Append arch/arm-linux.c,
3036 arch/arm-get-next-pcs.c.
3037 (arm-linux.o): New rule.
3038 (arm-get-next-pcs.o): New rule.
3039 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3040 arm-linux.o.
3041 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3042 to linux-aarch32-low.c.
3043 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3044 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3045 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3046 (thumb2_breakpoint_len): Likewise.
3047 (arm_is_thumb_mode): Make non-static.
3048 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3049 from linux-aarch32-low.c.
3050 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3051 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3052 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3053 (thumb2_breakpoint_len): Likewise.
3054 (arm_is_thumb_mode): New declaration.
3055 * linux-arm-low.c: Include arch/arm-linux.h
3056 aarch/arm-get-next-pcs.h, sys/syscall.h.
3057 (get_next_pcs_ops): New struct.
3058 (get_next_pcs_addr_bits_remove): New function.
3059 (get_next_pcs_is_thumb): New function.
3060 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3061 (arm_sigreturn_next_pc): Likewise.
3062 (get_next_pcs_syscall_next_pc): Likewise.
3063 (arm_gdbserver_get_next_pcs): Likewise.
3064 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3065 Initialize.
3066 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3067 * server.h: Include gdb_vecs.h.
3068
68ce2059
AT
30692015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3070
3071 * Makefile.in (SFILES): Append common/common-regcache.c.
3072 (OBS): Append common-regcache.o.
3073 (common-regcache.o): New rule.
3074 * regcache.c (init_register_cache): Initialize cache to
3075 REG_UNAVAILABLE.
3076 (regcache_raw_read_unsigned): New function.
3077 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3078 register_status enum.
3079
fa5308bd
AT
30802015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3081
3082 * linux-aarch64-low.c (the_low_targets): Rename
3083 breakpoint_reinsert_addr to get_next_pcs.
3084 * linux-arm-low.c (the_low_targets): Likewise.
3085 * linux-bfin-low.c (the_low_targets): Likewise.
3086 * linux-cris-low.c (the_low_targets): Likewise.
3087 * linux-crisv32-low.c (the_low_targets): Likewise.
3088 * linux-low.c (can_software_single_step): Likewise.
3089 (install_software_single_step_breakpoints): New function.
3090 (start_step_over): Use install_software_single_step_breakpoints.
3091 * linux-low.h: New CORE_ADDR vector.
3092 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3093 get_next_pcs.
3094 * linux-mips-low.c (the_low_targets): Likewise.
3095 * linux-nios2-low.c (the_low_targets): Likewise.
3096 * linux-sparc-low.c (the_low_targets): Likewise.
3097
4a6ed09b
PA
30982015-12-17 Pedro Alves <palves@redhat.com>
3099
3100 * linux-low.c (linux_kill_one_lwp): Remove references to
3101 LinuxThreads.
3102 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3103 to 'kill'.
3104 (linux_init_signals): Delete.
3105 (initialize_low): Adjust.
3106 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3107
7544db95
PA
31082015-12-16 Pedro Alves <palves@redhat.com>
3109
3110 * configure.ac (compiler warning flags): When testing a
3111 -Wno-foo option, check whether -Wfoo works instead.
3112 * configure: Regenerate.
3113
8020350c
DB
31142015-12-11 Don Breazeal <donb@codesourcery.com>
3115
3116 * server.c (process_serial_event): Don't exit from gdbserver
3117 in remote mode if there are still active inferiors.
3118
db91f502
YQ
31192015-12-11 Yao Qi <yao.qi@linaro.org>
3120
3121 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3122 arm_breakpoint_at if the process is 32-bit.
3123
b37a6290
YQ
31242015-12-11 Yao Qi <yao.qi@linaro.org>
3125
3126 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3127 arm breakpoint.
3128
17b1509a
YQ
31292015-12-07 Yao Qi <yao.qi@linaro.org>
3130
3131 * configure.srv: Append arm.o to srv_tgtobj for
3132 aarch64*-*-linux* target.
3133 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3134 from linux-arm-low.c.
3135 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3136 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3137 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3138 (thumb2_breakpoint_len): Likewise.
3139 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3140 (arm_breakpoint_kinds): Likewise.
3141 (arm_breakpoint_kind_from_pc): Likewise.
3142 (arm_sw_breakpoint_from_kind): Likewise.
3143 (arm_breakpoint_kind_from_current_state): Likewise.
3144 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3145 (arm_sw_breakpoint_from_kind): Declare.
3146 (arm_breakpoint_kind_from_current_state): Declare.
3147 (arm_breakpoint_at): Declare.
3148 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3149 arm_sw_breakpoint_from_kind if process is 32-bit.
3150 (aarch64_breakpoint_kind_from_pc): New function.
3151 (aarch64_breakpoint_kind_from_current_state): New function.
3152 (the_low_target): Initialize fields breakpoint_kind_from_pc
3153 and breakpoint_kind_from_current_state.
3154 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3155 linux-aarch32-low.c.
3156 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3157 (arm_breakpoint, arm_breakpoint_len): Likewise.
3158 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3159 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3160 (arm_is_thumb_mode): Likewise.
3161 (arm_breakpoint_at): Likewise.
3162 (arm_breakpoint_kind_from_pc): Likewise.
3163 (arm_sw_breakpoint_from_kind): Likewise.
3164 (arm_breakpoint_kind_from_current_state): Likewise.
3165
3166 Revert:
3167 2015-08-04 Yao Qi <yao.qi@linaro.org>
3168
3169 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3170 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3171 * server.c (extended_protocol): Remove "static".
3172 * server.h (extended_protocol): Declare it.
3173
ece66d65
JS
31742015-12-04 Josh Stone <jistone@redhat.com>
3175
3176 * target.h (struct target_ops) <arch_setup>: Rename to ...
3177 (struct target_ops) <post_create_inferior>: ... this.
3178 (target_arch_setup): Rename to ...
3179 (target_post_create_inferior): ... this, calling post_create_inferior.
3180 * server.c (start_inferior): Update target_arch_setup calls to
3181 target_post_create_inferior.
3182 * linux-low.c (linux_low_ptrace_options): Forward declare.
3183 (linux_arch_setup): Update its comment for general use.
3184 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3185 (struct linux_target_ops): Use linux_post_create_inferior.
3186 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3187 to post_create_inferior.
3188 * nto-low.c (struct nto_target_ops): Likewise.
3189 * spu-low.c (struct spu_target_ops): Likewise.
3190 * win32-low.c (struct win32_target_ops): Likewise.
3191
e58c48b4
AT
31922015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3193
3194 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3195
fbec8956
AT
31962015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3197
3198 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3199 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3200 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3201 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3202 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3203 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3204 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3205 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3206 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3207 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3208 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3209 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3210
9b4c5f87
AT
32112015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3212
3213 * linux-low.c (linux_look_up_symbols): Don't call
3214 linux_supports_traceclone.
3215 * linux-low.h (thread_db_init): Remove use_events argument.
3216 * thread-db.c (thread_db_use_event): Remove global variable.
3217 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3218 (struct thread_db) <td_create_bp>: Remove field.
3219 (thread_db_create_event): Remove function.
3220 (thread_db_enable_reporting): Likewise.
3221 (find_one_thread): Don't check for thread_db_use_events.
3222 (attach_thread): Likewise.
3223 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3224 (try_thread_db_load_1): Don't check for thread_db_use_events.
3225 (thread_db_init): Remove use_events argument and thread events
3226 handling.
3227 (remove_thread_event_breakpoints): Remove function.
3228 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3229
7d00775e
AT
32302015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3231
3232 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3233 New function.
3234 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3235 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3236 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3237 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3238 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3239 Initialize.
3240 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3241 New function.
3242 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3243 * linux-low.c (can_hardware_single_step): Use
3244 supports_hardware_single_step.
3245 (can_software_single_step): New function.
3246 (start_step_over): Call can_software_single_step.
3247 (linux_supports_hardware_single_step): New function.
3248 (struct target_ops) <supports_software_single_step>: Initialize.
3249 * linux-low.h (struct linux_target_ops)
3250 <supports_hardware_single_step>: Initialize.
3251 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3252 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3253 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3254 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3255 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3256 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3257 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3258 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3259 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3260 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3261 Initialize.
3262 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3263 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3264 Initialize.
3265 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3266 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3267 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3268 New function.
3269 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3270 * target.h (struct target_ops): <supports_software_single_step>:
3271 New field.
3272 (target_supports_software_single_step): New macro.
3273
2d97cd35
AT
32742015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3275
3276 * linux-low.c (linux_wait_1): Fix pc advance condition.
3277 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3278 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3279
769ef81f
AT
32802015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3281
3282 * linux-arm-low.c (arm_is_thumb_mode): New function.
3283 (arm_breakpoint_at): Use arm_is_thumb_mode.
3284 (arm_breakpoint_kind_from_current_state): New function.
3285 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3286 Initialize.
3287 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3288 (linux_breakpoint_kind_from_current_state): New function.
3289 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3290 * linux-low.h (struct linux_target_ops)
3291 <breakpoint_kind_from_current_state>: New field.
3292 * target.h (struct target_ops): Likewise.
3293 (target_breakpoint_kind_from_current_state): New macro.
3294
1bebeeca
PA
32952015-11-30 Pedro Alves <palves@redhat.com>
3296
3297 * linux-low.c (linux_resume): Wake up the event loop before
3298 returning.
3299
a67a9fae
PA
33002015-11-30 Pedro Alves <palves@redhat.com>
3301
3302 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3303 check.
3304 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3305 to -1.
3306 * target.c (struct thread_search): New structure.
3307 (thread_search_callback): New function.
3308 (prev_general_thread): New global.
3309 (prepare_to_access_memory, done_accessing_memory): New functions.
3310 * target.h (prepare_to_access_memory, done_accessing_memory):
3311 Replace macros with function declarations.
3312
f2faf941
PA
33132015-11-30 Pedro Alves <palves@redhat.com>
3314
3315 PR 14618
3316 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3317 report TARGET_WAITKIND_NO_RESUMED.
3318 * remote-utils.c (prepare_resume_reply): Handle
3319 TARGET_WAITKIND_NO_RESUMED.
3320 * server.c (report_no_resumed): New global.
3321 (handle_query) <qSupported>: Handle "no-resumed+". Report
3322 "no-resumed+" support.
3323 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3324 return error if the client doesn't support no-resumed events.
3325 (push_stop_notification): New function.
3326 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3327 events if the client supports them.
3328
a681f9c9
PA
33292015-11-30 Pedro Alves <palves@redhat.com>
3330
3331 * linux-low.c (thread_still_has_status_pending_p): Don't check
3332 vCont;t here.
3333 (lwp_resumed): New function.
3334 (status_pending_p_callback): Return early if the LWP is not
3335 supposed to be resumed.
3336
65706a29
PA
33372015-11-30 Pedro Alves <palves@redhat.com>
3338
3339 * linux-low.c (handle_extended_wait): Assert that the LWP's
3340 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3341 thread create events, leave the new child's status pending.
3342 (linux_low_filter_event): If GDB wants to hear about thread exit
3343 events, leave the LWP marked dead and don't delete it.
3344 (linux_wait_for_event_filtered): Don't check for thread exit.
3345 (filter_exit_event): New function.
3346 (linux_wait_1): Use it, when returning an exit event.
3347 (linux_resume_one_lwp_throw): Assert that the LWP's
3348 waitstatus is TARGET_WAITKIND_IGNORE.
3349 * remote-utils.c (prepare_resume_reply): Handle
3350 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3351 * server.c (report_thread_events): New global.
3352 (handle_general_set): Handle QThreadEvents.
3353 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3354 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3355 TARGET_WAITKIND_THREAD_EXITED.
3356 * server.h (report_thread_events): Declare.
3357
56cf4bed
PA
33582015-11-30 Pedro Alves <palves@redhat.com>
3359
3360 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3361 the thread's last_resume_kind was resume_stop.
3362
500c1d85
PA
33632015-11-30 Pedro Alves <palves@redhat.com>
3364
3365 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3366 before returning.
3367
de979965
PA
33682015-11-30 Pedro Alves <palves@redhat.com>
3369
3370 * server.c (handle_v_requests): Handle vCtrlC.
3371
34c65914
PA
33722015-11-30 Pedro Alves <palves@redhat.com>
3373
3374 * gdbthread.h (find_any_thread_of_pid): Declare.
3375 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3376 functions.
3377 * server.c (handle_query): If current_thread is NULL, look for
3378 another thread of the selected process.
3379
79efa585 33802015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3381 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3382
3383 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3384 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3385 name in reply.
3386 * target.h (struct target_ops) <thread_name>: New field.
3387 (target_thread_name): New macro.
3388
80d82c19
JB
33892015-11-23 Joel Brobecker <brobecker@adacore.com>
3390
3391 * regcache.h (regcache_invalidate_pid): Add declaration.
3392 * regcache.c (regcache_invalidate_pid): New function, extracted
3393 from regcache_invalidate.
3394 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3395 Add trivial documentation comment.
3396 * lynx-low.c: Use regcache_invalidate_pid instead of
3397 regcache_invalidate.
3398
64da5dd5
JB
33992015-11-23 Joel Brobecker <brobecker@adacore.com>
3400
3401 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3402 and Elf64_auxv_t if the target is Android.
3403
37ce4055
DE
34042015-11-22 Doug Evans <xdje42@gmail.com>
3405
3406 * target.h: #include <sys/types.h>.
3407
06e03fff
PA
34082015-11-19 Pedro Alves <palves@redhat.com>
3409
3410 * linux-low.c (linux_process_qsupported): Change prototype.
3411 Adjust.
3412 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3413 Change prototype.
3414 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3415 and adjust to loop over all features.
3416 * server.c (handle_query) <qSupported>: Adjust to call
3417 target_process_qsupported once, passing it a vector of unprocessed
3418 features.
3419 * target.h (struct target_ops) <process_qsupported>: Change
3420 prototype.
3421 (target_process_qsupported): Adjust.
3422
9a084706
PA
34232015-11-19 Pedro Alves <palves@redhat.com>
3424
3425 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3426 mode.
3427 * configure: Regenerate.
3428
dad44a1f
PA
34292015-11-19 Pedro Alves <palves@redhat.com>
3430
3431 * configure: Regenerate.
3432
231c0592
YQ
34332015-11-19 Yao Qi <yao.qi@linaro.org>
3434
3435 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3436 type to uint32_t.
3437
6c1c9a8b
YQ
34382015-11-19 Yao Qi <yao.qi@linaro.org>
3439
3440 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3441 (struct aarch64_operand): Move enum out.
3442
9caa3311
YQ
34432015-11-19 Yao Qi <yao.qi@linaro.org>
3444
3445 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3446 struct user_fpsimd_state *.
3447 (aarch64_store_fpregset): Likewise.
3448
6a69a054
YQ
34492015-11-19 Yao Qi <yao.qi@linaro.org>
3450
3451 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3452 struct user_pt_regs *.
3453 (aarch64_store_gregset): Likewise.
3454
1798301e
PA
34552015-11-18 Pedro Alves <palves@redhat.com>
3456
3457 * Makefile.in (all_object_files): Add $IPA_OBJS.
3458
ce7715e2
PA
34592015-11-17 Pedro Alves <palves@redhat.com>
3460
3461 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3462 GDB_SIGNAL_0 and gdb_signal_to_string.
3463
c0879059
PA
34642015-11-17 Pedro Alves <palves@redhat.com>
3465
3466 * win32-low.c (handle_output_debug_string): Remove parameter.
3467 (win32_kill): Remove our_status local and adjust call to
3468 handle_output_debug_string.
3469 (get_child_debug_event): Adjust call to
3470 handle_output_debug_string.
3471
1996e237
SM
34722015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3473
3474 * linux-mips-low.c (mips_fill_gregset): Add cast.
3475 (mips_store_gregset): Likewise.
3476 (mips_fill_fpregset): Likewise.
3477 (mips_store_fpregset): Likewise.
3478
cbec665b
SM
34792015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3480
3481 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3482 priv.
3483
eb3e3c67
SM
34842015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3485
3486 * linux-mips-low.c (mips_linux_new_thread): Change type of
3487 watch_type to enum target_hw_bp_type.
3488
171de4b8
SM
34892015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3490
3491 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3492 Change return type to arm_hwbp_type.
3493
04248ead
SM
34942015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3495
3496 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3497 (arm_store_gregset): Likewise.
3498 * linux-arm-low.c (arm_get_hwcap): Likewise.
3499 (arm_read_description): Likewise.
3500
04b3479c
SM
35012015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3502
3503 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3504
2bc84e8a
SM
35052015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3506
3507 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3508 (ppc_fill_vsxregset): Likewise.
3509 (ppc_store_vsxregset): Likewise.
3510 (ppc_fill_vrregset): Likewise.
3511 (ppc_store_vrregset): Likewise.
3512 (ppc_fill_evrregset): Likewise.
3513 (ppc_store_evrregset): Likewise.
3514
e6c5bb05
SM
35152015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3516
3517 * linux-ppc-low.c (ppc_usrregs_info): Remove
3518 forward-declaration.
3519 (ppc_arch_setup): Move lower in file.
3520
7ea45d72
SM
35212015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3522
3523 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3524 (ps_pdwrite): Likewise.
3525
69291610
HW
35262015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3527
3528 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3529 to after assert checks.
3530
b42945fd
SM
35312015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3532
3533 * proc-service.c (ps_pdread): Add/adjust casts.
3534 (ps_pdwrite): Add/adjust casts.
3535
d6f85c84
SM
35362015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3537
3538 * server.c (handle_search_memory_1): Cast return value of
3539 memmem.
3540
f98cd059
SM
35412015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3542
3543 * server.c (write_qxfer_response): Change type of data to
3544 gdb_byte *.
3545
d2412fa5
PA
35462015-10-29 Pedro Alves <palves@redhat.com>
3547
3548 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3549
c17414a2
PA
35502015-10-29 Pedro Alves <palves@redhat.com>
3551
3552 * tracepoint.c (clear_installed_tracepoints): Add casts.
3553
e053fbc4
PA
35542015-10-29 Pedro Alves <palves@redhat.com>
3555
3556 * server.c (handle_v_cont, process_serial_event): Add enum
3557 gdb_signal casts to signal parsing code.
3558
add67df8
PA
35592015-10-29 Pedro Alves <palves@redhat.com>
3560
3561 * linux-low.h (NULL_REGSET): Define.
3562 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3563 * linux-arm-low.c (arm_regsets): Likewise.
3564 * linux-crisv32-low.c (cris_regsets): Likewise.
3565 * linux-m68k-low.c (m68k_regsets): Likewise.
3566 * linux-mips-low.c (mips_regsets): Likewise.
3567 * linux-nios2-low.c (nios2_regsets): Likewise.
3568 * linux-ppc-low.c (ppc_regsets): Likewise.
3569 * linux-s390-low.c (s390_regsets): Likewise.
3570 * linux-sh-low.c (sh_regsets): Likewise.
3571 * linux-sparc-low.c (sparc_regsets): Likewise.
3572 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3573 * linux-tile-low.c (tile_regsets): Likewise.
3574 * linux-x86-low.c (x86_regsets): Likewise.
3575 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3576
50bc912a
PA
35772015-10-29 Pedro Alves <palves@redhat.com>
3578
3579 * linux-low.h (NULL_REGSET): Define.
3580 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3581 * linux-arm-low.c (arm_regsets): Likewise.
3582 * linux-crisv32-low.c (cris_regsets): Likewise.
3583 * linux-m68k-low.c (m68k_regsets): Likewise.
3584 * linux-mips-low.c (mips_regsets): Likewise.
3585 * linux-nios2-low.c (nios2_regsets): Likewise.
3586 * linux-ppc-low.c (ppc_regsets): Likewise.
3587 * linux-s390-low.c (s390_regsets): Likewise.
3588 * linux-sh-low.c (sh_regsets): Likewise.
3589 * linux-sparc-low.c (sparc_regsets): Likewise.
3590 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3591 * linux-tile-low.c (tile_regsets): Likewise.
3592 * linux-x86-low.c (x86_regsets): Likewise.
3593 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3594
682b2546
DE
35952015-10-26 Doug Evans <dje@google.com>
3596
3597 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3598
963843d4
DE
35992015-10-26 Doug Evans <dje@google.com>
3600
3601 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3602
d41401ac
DE
36032015-10-26 Doug Evans <dje@google.com>
3604
3605 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3606 for debug_printf.
3607 (attach_thread, find_new_threads_callback): Ditto.
3608
3db28855
AT
36092015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3610
3611 * mem-break.h (set_breakpoint_data): Remove.
3612
fb78e89c
AT
36132015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3614
3615 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3616 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3617 (initialize_low): Remove set_breakpoint_data call.
3618 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3619 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3620 (initialize_low): Remove set_breakpoint_data call.
3621 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3622 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3623 (initialize_low): Remove set_breakpoint_data call.
3624
2e6ee069
AT
36252015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3626
3627 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3628 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3629 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3630 * target.h (target_breakpoint_kind_from_pc): New macro.
3631
1652a986
AT
36322015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3633
3634 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3635 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3636 the default breakpoint kind.
3637
abeead09
AT
36382015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3639
3640 * linux-arm-low.c (arm_supports_z_point_type): Add software
3641 breakpoint support.
3642
b0b4b501
AT
36432015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3644
3645 * linux-arm-low.c: Refactor breakpoint definitions.
3646 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3647 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3648
8689682c
AT
36492015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3650
3651 * Makefile.in: Add arm.c/o.
3652 * configure.srv: Likewise.
3653 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3654 (arm_breakpoint_kind_from_pc): New function.
3655 (arm_sw_breakpoint_from_kind): Return proper kind.
3656 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3657
27165294
AT
36582015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3659
3660 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3661 removal.
3662 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3663 (struct raw_breakpoint) <size>: Remove.
3664 (struct raw_breakpoint) <kind>: Add.
3665 (bp_size): New function.
3666 (bp_opcode): Likewise.
3667 (find_raw_breakpoint_at): Adjust for kind.
3668 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3669 (remove_memory_breakpoint): Adjust for kind call bp_size.
3670 (set_raw_breakpoint_at): Adjust for kind.
3671 (set_breakpoint): Likewise.
3672 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3673 (delete_raw_breakpoint): Adjust for kind.
3674 (delete_breakpoint): Likewise.
3675 (find_gdb_breakpoint): Likewise.
3676 (set_gdb_breakpoint_1): Likewise.
3677 (set_gdb_breakpoint): Likewise.
3678 (delete_gdb_breakpoint_1): Likewise.
3679 (delete_gdb_breakpoint): Likewise.
3680 (uninsert_raw_breakpoint): Likewise.
3681 (reinsert_raw_breakpoint): Likewise.
3682 (set_breakpoint_data): Remove.
3683 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3684 (check_mem_read): Adjust for kind call bp_size.
3685 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3686 (clone_one_breakpoint): Adjust for kind.
3687 * mem-break.h (set_gdb_breakpoint): Likewise.
3688 (delete_gdb_breakpoint): Likewise.
3689 * server.c (process_serial_event): Likewise.
3690
dd373349
AT
36912015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3692
3693 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3694 (struct linux_target_ops) <breakpoint>: Remove.
3695 (struct linux_target_ops) <breakpoint_len>: Remove.
3696 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3697 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3698 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3699 (arm_sw_breakpoint_from_kind): New function.
3700 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3701 (struct linux_target_ops) <breakpoint>: Remove.
3702 (struct linux_target_ops) <breakpoint_len>: Remove.
3703 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3704 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3705 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3706 (struct linux_target_ops) <breakpoint>: Remove.
3707 (struct linux_target_ops) <breakpoint_len>: Remove.
3708 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3709 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3710 * linux-crisv32-low.c (cris_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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3716 and sw_breakpoint_from_kind to increment the pc.
3717 (linux_breakpoint_kind_from_pc): New function.
3718 (linux_sw_breakpoint_from_kind): New function.
3719 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3720 (initialize_low): Call breakpoint_kind_from_pc and
3721 sw_breakpoint_from_kind to replace breakpoint_data/len.
3722 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3723 New field.
3724 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3725 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3756 (struct linux_target_ops) <breakpoint>: Remove.
3757 (struct linux_target_ops) <breakpoint_len>: Remove.
3758 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3759 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3760 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3761 (struct linux_target_ops) <breakpoint>: Remove.
3762 (struct linux_target_ops) <breakpoint_len>: Remove.
3763 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3764 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3765 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3766 (struct linux_target_ops) <breakpoint>: Remove.
3767 (struct linux_target_ops) <breakpoint_len>: Remove.
3768 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3769 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3770 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3771 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3772 (struct linux_target_ops) <breakpoint>: Remove.
3773 (struct linux_target_ops) <breakpoint_len>: Remove.
3774 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3775 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3776 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3777 (struct linux_target_ops) <breakpoint>: Remove.
3778 (struct linux_target_ops) <breakpoint_len>: Remove.
3779 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3780 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3781
4cd98a19
AT
37822015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3783
3784 * linux-cris-low.c (cris_get_pc): Remove void arg.
3785
774ee6d2
AR
37862015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3787
3788 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3789 variable name.
3790
833dcd29
AR
37912015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3792
3793 * inferiors.c (thread_pid_matches_callback): New function.
3794 (find_thread_process): New function.
3795 (remove_thread): Reset current_thread.
3796 (remove_process): Assert threads have been removed first.
3797
8d689ee5
YQ
37982015-10-15 Yao Qi <yao.qi@linaro.org>
3799
3800 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3801 if it is 3.
3802 (aarch64_remove_point): Likewise.
3803 * regcache.c (regcache_register_size): New function.
3804
1c2e1515
YQ
38052015-10-12 Yao Qi <yao.qi@linaro.org>
3806
3807 * linux-aarch64-low.c: Update all callers as emit_load_store
3808 is renamed to aarch64_emit_load_store.
3809
e1c587c3
YQ
38102015-10-12 Yao Qi <yao.qi@linaro.org>
3811
3812 * linux-aarch64-low.c: Update all callers of function renaming
3813 from emit_insn to aarch64_emit_insn.
3814
b6542f81
YQ
38152015-10-12 Yao Qi <yao.qi@linaro.org>
3816
3817 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3818 arch/aarch64-insn.h.
3819 (struct aarch64_memory_operand): Likewise.
3820 (ENCODE): Likewise.
3821 (emit_insn): Move to arch/aarch64-insn.c.
3822 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3823 (emit_load_store): Move to arch/aarch64-insn.c.
3824 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3825 (can_encode_int32): Remove.
3826
246994ce
YQ
38272015-10-12 Yao Qi <yao.qi@linaro.org>
3828
3829 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3830 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3831 (aarch64_relocate_instruction): Likewise.
3832 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3833 (struct aarch64_insn_visitor): Likewise.
3834
0badd99f
YQ
38352015-10-12 Yao Qi <yao.qi@linaro.org>
3836
3837 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3838 (struct aarch64_insn_visitor): New.
3839 (struct aarch64_insn_relocation_data): New.
3840 (aarch64_ftrace_insn_reloc_b): New function.
3841 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3842 (aarch64_ftrace_insn_reloc_cb): Likewise.
3843 (aarch64_ftrace_insn_reloc_tb): Likewise.
3844 (aarch64_ftrace_insn_reloc_adr): Likewise.
3845 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3846 (aarch64_ftrace_insn_reloc_others): Likewise.
3847 (visitor): New.
3848 (aarch64_relocate_instruction): Use visitor.
3849
dfaffe9d
YQ
38502015-10-12 Yao Qi <yao.qi@linaro.org>
3851
3852 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3853 int. Add argument buf.
3854 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3855 aarch64_relocate_instruction.
3856
70b439f0
YQ
38572015-10-12 Yao Qi <yao.qi@linaro.org>
3858
3859 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3860 argument insn. Remove local variable insn. Don't call
3861 target_read_uint32.
3862 (aarch64_install_fast_tracepoint_jump_pad): Call
3863 target_read_uint32.
3864
7781c06f
YQ
38652015-09-30 Yao Qi <yao.qi@linaro.org>
3866
3867 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3868 (emit_load_store_pair): Likewise.
3869
9a3c8263
SM
38702015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3871
3872 * dll.c (match_dll): Add cast(s).
3873 (unloaded_dll): Likewise.
3874 * linux-low.c (second_thread_of_pid_p): Likewise.
3875 (delete_lwp_callback): Likewise.
3876 (count_events_callback): Likewise.
3877 (select_event_lwp_callback): Likewise.
3878 (linux_set_resume_request): Likewise.
3879 * server.c (accumulate_file_name_length): Likewise.
3880 (emit_dll_description): Likewise.
3881 (handle_qxfer_threads_worker): Likewise.
3882 (visit_actioned_threads): Likewise.
3883 * thread-db.c (any_thread_of): Likewise.
3884 * tracepoint.c (same_process_p): Likewise.
3885 (match_blocktype): Likewise.
3886 (build_traceframe_info_xml): Likewise.
3887
224c3ddb
SM
38882015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3889
3890 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3891 assignment.
3892 (gdb_unparse_agent_expr): Likewise.
3893 * hostio.c (require_data): Likewise.
3894 (handle_pread): Likewise.
3895 * linux-low.c (disable_regset): Likewise.
3896 (fetch_register): Likewise.
3897 (store_register): Likewise.
3898 (get_dynamic): Likewise.
3899 (linux_qxfer_libraries_svr4): Likewise.
3900 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3901 (set_fast_tracepoint_jump): Likewise.
3902 (uninsert_fast_tracepoint_jumps_at): Likewise.
3903 (reinsert_fast_tracepoint_jumps_at): Likewise.
3904 (validate_inserted_breakpoint): Likewise.
3905 (clone_agent_expr): Likewise.
3906 * regcache.c (init_register_cache): Likewise.
3907 * remote-utils.c (putpkt_binary_1): Likewise.
3908 (decode_M_packet): Likewise.
3909 (decode_X_packet): Likewise.
3910 (look_up_one_symbol): Likewise.
3911 (relocate_instruction): Likewise.
3912 (monitor_output): Likewise.
3913 * server.c (handle_search_memory): Likewise.
3914 (handle_qxfer_exec_file): Likewise.
3915 (handle_qxfer_libraries): Likewise.
3916 (handle_qxfer): Likewise.
3917 (handle_query): Likewise.
3918 (handle_v_cont): Likewise.
3919 (handle_v_run): Likewise.
3920 (captured_main): Likewise.
3921 * target.c (write_inferior_memory): Likewise.
3922 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3923 * tracepoint.c (init_trace_buffer): Likewise.
3924 (add_tracepoint_action): Likewise.
3925 (add_traceframe): Likewise.
3926 (add_traceframe_block): Likewise.
3927 (cmd_qtdpsrc): Likewise.
3928 (cmd_qtdv): Likewise.
3929 (cmd_qtstatus): Likewise.
3930 (response_source): Likewise.
3931 (response_tsv): Likewise.
3932 (cmd_qtnotes): Likewise.
3933 (gdb_collect): Likewise.
3934 (initialize_tracepoint): Likewise.
3935
afbe19f8
PL
39362015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3937
3938 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3939 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3940 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3941 <NOP>: New.
3942 (enum aarch64_condition_codes): New enum.
3943 (w0): New static global.
3944 (fp): Likewise.
3945 (lr): Likewise.
3946 (struct aarch64_memory_operand) <type>: New
3947 MEMORY_OPERAND_POSTINDEX type.
3948 (postindex_memory_operand): New helper function.
3949 (emit_ret): New function.
3950 (emit_load_store_pair): New function, factored out of emit_stp
3951 with support for MEMORY_OPERAND_POSTINDEX.
3952 (emit_stp): Rewrite using emit_load_store_pair.
3953 (emit_ldp): New function.
3954 (emit_load_store): Likewise.
3955 (emit_ldr): Mention post-index instruction in comment.
3956 (emit_ldrh): New function.
3957 (emit_ldrb): New function.
3958 (emit_ldrsw): Mention post-index instruction in comment.
3959 (emit_str): Likewise.
3960 (emit_subs): New function.
3961 (emit_cmp): Likewise.
3962 (emit_and): Likewise.
3963 (emit_orr): Likewise.
3964 (emit_orn): Likewise.
3965 (emit_eor): Likewise.
3966 (emit_mvn): Likewise.
3967 (emit_lslv): Likewise.
3968 (emit_lsrv): Likewise.
3969 (emit_asrv): Likewise.
3970 (emit_mul): Likewise.
3971 (emit_sbfm): Likewise.
3972 (emit_sbfx): Likewise.
3973 (emit_ubfm): Likewise.
3974 (emit_ubfx): Likewise.
3975 (emit_csinc): Likewise.
3976 (emit_cset): Likewise.
3977 (emit_nop): Likewise.
3978 (emit_ops_insns): New helper function.
3979 (emit_pop): Likewise.
3980 (emit_push): Likewise.
3981 (aarch64_emit_prologue): New function.
3982 (aarch64_emit_epilogue): Likewise.
3983 (aarch64_emit_add): Likewise.
3984 (aarch64_emit_sub): Likewise.
3985 (aarch64_emit_mul): Likewise.
3986 (aarch64_emit_lsh): Likewise.
3987 (aarch64_emit_rsh_signed): Likewise.
3988 (aarch64_emit_rsh_unsigned): Likewise.
3989 (aarch64_emit_ext): Likewise.
3990 (aarch64_emit_log_not): Likewise.
3991 (aarch64_emit_bit_and): Likewise.
3992 (aarch64_emit_bit_or): Likewise.
3993 (aarch64_emit_bit_xor): Likewise.
3994 (aarch64_emit_bit_not): Likewise.
3995 (aarch64_emit_equal): Likewise.
3996 (aarch64_emit_less_signed): Likewise.
3997 (aarch64_emit_less_unsigned): Likewise.
3998 (aarch64_emit_ref): Likewise.
3999 (aarch64_emit_if_goto): Likewise.
4000 (aarch64_emit_goto): Likewise.
4001 (aarch64_write_goto_address): Likewise.
4002 (aarch64_emit_const): Likewise.
4003 (aarch64_emit_call): Likewise.
4004 (aarch64_emit_reg): Likewise.
4005 (aarch64_emit_pop): Likewise.
4006 (aarch64_emit_stack_flush): Likewise.
4007 (aarch64_emit_zero_ext): Likewise.
4008 (aarch64_emit_swap): Likewise.
4009 (aarch64_emit_stack_adjust): Likewise.
4010 (aarch64_emit_int_call_1): Likewise.
4011 (aarch64_emit_void_call_2): Likewise.
4012 (aarch64_emit_eq_goto): Likewise.
4013 (aarch64_emit_ne_goto): Likewise.
4014 (aarch64_emit_lt_goto): Likewise.
4015 (aarch64_emit_le_goto): Likewise.
4016 (aarch64_emit_gt_goto): Likewise.
4017 (aarch64_emit_ge_got): Likewise.
4018 (aarch64_emit_ops_impl): New static global variable.
4019 (aarch64_emit_ops): New target function, return
4020 &aarch64_emit_ops_impl.
4021 (struct linux_target_ops): Install it.
4022
bb903df0
PL
40232015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4024
4025 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4026 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4027 aarch64-ipa.o.
4028 * linux-aarch64-ipa.c: New file.
4029 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4030 and endian.h.
4031 (aarch64_get_thread_area): New target method.
4032 (extract_signed_bitfield): New helper function.
4033 (aarch64_decode_ldr_literal): New function.
4034 (enum aarch64_opcodes): New enum.
4035 (struct aarch64_register): New struct.
4036 (struct aarch64_operand): New struct.
4037 (x0): New static global.
4038 (x1): Likewise.
4039 (x2): Likewise.
4040 (x3): Likewise.
4041 (x4): Likewise.
4042 (w2): Likewise.
4043 (ip0): Likewise.
4044 (sp): Likewise.
4045 (xzr): Likewise.
4046 (aarch64_register): New helper function.
4047 (register_operand): Likewise.
4048 (immediate_operand): Likewise.
4049 (struct aarch64_memory_operand): New struct.
4050 (offset_memory_operand): New helper function.
4051 (preindex_memory_operand): Likewise.
4052 (enum aarch64_system_control_registers): New enum.
4053 (ENCODE): New macro.
4054 (emit_insn): New helper function.
4055 (emit_b): New function.
4056 (emit_bcond): Likewise.
4057 (emit_cb): Likewise.
4058 (emit_tb): Likewise.
4059 (emit_blr): Likewise.
4060 (emit_stp): Likewise.
4061 (emit_ldp_q_offset): Likewise.
4062 (emit_stp_q_offset): Likewise.
4063 (emit_load_store): Likewise.
4064 (emit_ldr): Likewise.
4065 (emit_ldrsw): Likewise.
4066 (emit_str): Likewise.
4067 (emit_ldaxr): Likewise.
4068 (emit_stxr): Likewise.
4069 (emit_stlr): Likewise.
4070 (emit_data_processing_reg): Likewise.
4071 (emit_data_processing): Likewise.
4072 (emit_add): Likewise.
4073 (emit_sub): Likewise.
4074 (emit_mov): Likewise.
4075 (emit_movk): Likewise.
4076 (emit_mov_addr): Likewise.
4077 (emit_mrs): Likewise.
4078 (emit_msr): Likewise.
4079 (emit_sevl): Likewise.
4080 (emit_wfe): Likewise.
4081 (append_insns): Likewise.
4082 (can_encode_int32_in): New helper function.
4083 (aarch64_relocate_instruction): New function.
4084 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4085 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4086 (struct linux_target_ops): Install aarch64_get_thread_area,
4087 aarch64_install_fast_tracepoint_jump_pad and
4088 aarch64_get_min_fast_tracepoint_insn_len.
4089
787749ea
PL
40902015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4091
4092 * Makefile.in (aarch64-insn.o): New rule.
4093 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4094
9812b2e6
YQ
40952015-09-21 Yao Qi <yao.qi@linaro.org>
4096
4097 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4098
18fe412b
YQ
40992015-09-21 Yao Qi <yao.qi@linaro.org>
4100
4101 * tracepoint.c (max_jump_pad_size): Remove.
4102
a0cc84cd
YQ
41032015-09-18 Yao Qi <yao.qi@linaro.org>
4104
4105 * linux-aarch64-low.c: Don't include sys/uio.h.
4106 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4107
d78908cf
WW
41082015-09-16 Wei-cheng Wang <cole945@gmail.com>
4109
4110 * tracepoint.c (eval_result_type): Change prototype.
4111 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4112
d57e0d50
PA
41132015-09-15 Pedro Alves <palves@redhat.com>
4114
4115 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4116 Check whether to report exec events instead of checking whether
4117 multiprocess is enabled.
4118
5a676acc
PA
41192015-09-15 Pedro Alves <palves@redhat.com>
4120
4121 PR remote/18965
4122 * remote-utils.c (prepare_resume_reply): Merge
4123 TARGET_WAITKIND_VFORK_DONE switch case with the
4124 TARGET_WAITKIND_FORKED case.
4125
7c5d0fad
YQ
41262015-09-15 Yao Qi <yao.qi@linaro.org>
4127
4128 * server.c (handle_query): Check string comparison using
4129 "else if" instead of "if".
4130
750ce8d1
YQ
41312015-09-15 Yao Qi <yao.qi@linaro.org>
4132
4133 * server.c (vCont_supported): New global variable.
4134 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4135 matches. Append ";vContSupported+" to own_buf.
4136 (handle_v_requests): Append ";s;S" to own_buf if target supports
4137 hardware single step or vCont_supported is false.
4138 (capture_main): Set vCont_supported to zero.
4139
70b90b91
YQ
41402015-09-15 Yao Qi <yao.qi@linaro.org>
4141
4142 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4143 it to ...
4144 (linux_supports_hardware_single_step): ... New function.
4145 (linux_target_ops): Update.
4146 * lynx-low.c (lynx_target_ops): Set field
4147 supports_hardware_single_step to target_can_do_hardware_single_step.
4148 * nto-low.c (nto_target_ops): Likewise.
4149 * spu-low.c (spu_target_ops): Likewise.
4150 * win32-low.c (win32_target_ops): Likewise.
4151 * target.c (target_can_do_hardware_single_step): New function.
4152 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4153 Remove. <supports_hardware_single_step>: New field.
4154 (target_supports_conditional_breakpoints): Remove.
4155 (target_supports_hardware_single_step): New macro.
4156 (target_can_do_hardware_single_step): Declare.
4157 * server.c (handle_query): Use target_supports_hardware_single_step
4158 instead of target_supports_conditional_breakpoints.
4159
ade90bde
YQ
41602015-09-15 Yao Qi <yao.qi@linaro.org>
4161
4162 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4163 function.
4164 (struct linux_target_ops the_low_target): Install
4165 aarch64_linux_siginfo_fixup.
4166
94585166
DB
41672015-09-11 Don Breazeal <donb@codesourcery.com>
4168 Luis Machado <lgustavo@codesourcery.com>
4169
4170 * linux-low.c (linux_mourn): Static declaration.
4171 (linux_arch_setup): Move in front of
4172 handle_extended_wait.
4173 (linux_arch_setup_thread): New function.
4174 (handle_extended_wait): Handle exec events. Call
4175 linux_arch_setup_thread. Make event_lwp argument a
4176 pointer-to-a-pointer.
4177 (check_zombie_leaders): Do not check stopped threads.
4178 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4179 (linux_low_filter_event): Add lwp and thread for exec'ing
4180 non-leader thread if leader thread has been deleted.
4181 Refactor code into linux_arch_setup_thread and call it.
4182 Pass child lwp pointer by reference to handle_extended_wait.
4183 (linux_wait_for_event_filtered): Update comment.
4184 (linux_wait_1): Prevent clobbering exec event status.
4185 (linux_supports_exec_events): New function.
4186 (linux_target_ops) <supports_exec_events>: Initialize new member.
4187 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4188 new member.
4189 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4190 * server.c (report_exec_events): New global variable.
4191 (handle_query): Handle qSupported query for exec-events feature.
4192 (captured_main): Initialize report_exec_events.
4193 * server.h (report_exec_events): Declare new global variable.
4194 * target.h (struct target_ops) <supports_exec_events>: New
4195 member.
4196 (target_supports_exec_events): New macro.
4197 * win32-low.c (win32_target_ops) <supports_exec_events>:
4198 Initialize new member.
4199
0568462b
MM
42002015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4201
4202 * linux-low.c (linux_low_enable_btrace): Remove.
4203 (linux_target_ops): Replace linux_low_enable_btrace with
4204 linux_enable_btrace.
4205
39edd165
YQ
42062015-09-03 Yao Qi <yao.qi@linaro.org>
4207
4208 * linux-aarch64-low.c (aarch64_insert_point): Call
4209 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4210 returns true.
4211
1db33b5a
UW
42122015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4213
4214 * linux-low.c (check_stopped_by_breakpoint): Use
4215 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4216
ab290430
PA
42172015-08-27 Pedro Alves <palves@redhat.com>
4218
4219 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4220
8d749320
SM
42212015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4222
6711b7f8
SM
4223 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4224 the XNEW-family equivalent.
8d749320
SM
4225 (compile_bytecodes): Likewise.
4226 * dll.c (loaded_dll): Likewise.
4227 * event-loop.c (append_callback_event): Likewise.
4228 (create_file_handler): Likewise.
4229 (create_file_event): Likewise.
4230 * hostio.c (handle_open): Likewise.
4231 * inferiors.c (add_thread): Likewise.
4232 (add_process): Likewise.
4233 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4234 * linux-arm-low.c (arm_new_process): Likewise.
4235 (arm_new_thread): Likewise.
4236 * linux-low.c (add_to_pid_list): Likewise.
4237 (linux_add_process): Likewise.
4238 (handle_extended_wait): Likewise.
4239 (add_lwp): Likewise.
4240 (enqueue_one_deferred_signal): Likewise.
4241 (enqueue_pending_signal): Likewise.
4242 (linux_resume_one_lwp_throw): Likewise.
4243 (linux_resume_one_thread): Likewise.
4244 (linux_read_memory): Likewise.
4245 (linux_write_memory): Likewise.
4246 * linux-mips-low.c (mips_linux_new_process): Likewise.
4247 (mips_linux_new_thread): Likewise.
4248 (mips_add_watchpoint): Likewise.
4249 * linux-x86-low.c (initialize_low_arch): Likewise.
4250 * lynx-low.c (lynx_add_process): Likewise.
4251 * mem-break.c (set_raw_breakpoint_at): Likewise.
4252 (set_breakpoint): Likewise.
4253 (add_condition_to_breakpoint): Likewise.
4254 (add_commands_to_breakpoint): Likewise.
4255 (clone_agent_expr): Likewise.
4256 (clone_one_breakpoint): Likewise.
4257 * regcache.c (new_register_cache): Likewise.
4258 * remote-utils.c (look_up_one_symbol): Likewise.
4259 * server.c (queue_stop_reply): Likewise.
4260 (start_inferior): Likewise.
4261 (queue_stop_reply_callback): Likewise.
4262 (handle_target_event): Likewise.
4263 * spu-low.c (fetch_ppc_memory): Likewise.
4264 (store_ppc_memory): Likewise.
4265 * target.c (set_target_ops): Likewise.
4266 * thread-db.c (thread_db_load_search): Likewise.
4267 (try_thread_db_load_1): Likewise.
4268 * tracepoint.c (add_tracepoint): Likewise.
4269 (add_tracepoint_action): Likewise.
4270 (create_trace_state_variable): Likewise.
4271 (cmd_qtdpsrc): Likewise.
4272 (cmd_qtro): Likewise.
4273 (add_while_stepping_state): Likewise.
4274 * win32-low.c (child_add_thread): Likewise.
4275 (get_image_name): Likewise.
4276
ed8b7b42
YQ
42772015-08-25 Yao Qi <yao.qi@linaro.org>
4278
4279 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4280
db3cb7cb
YQ
42812015-08-25 Yao Qi <yao.qi@linaro.org>
4282
4283 * Makefile.in (aarch64-linux.o): New rule.
4284 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4285 srv_tgtobj.
4286 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4287 (aarch64_init_debug_reg_state): Make it extern.
4288 (aarch64_linux_prepare_to_resume): Remove.
4289
f6011a1c
YQ
42902015-08-25 Yao Qi <yao.qi@linaro.org>
4291
4292 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4293 lwp_arch_private_info and ptid_of_lwp.
4294
88e2cf7e
YQ
42952015-08-25 Yao Qi <yao.qi@linaro.org>
4296
4297 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4298 Find proc_info by find_process_pid. All callers updated.
4299
5e35436e
YQ
43002015-08-25 Yao Qi <yao.qi@linaro.org>
4301
4302 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4303 Remove.
4304 (debug_reg_change_callback): Remove.
4305 (aarch64_notify_debug_reg_change): Remove.
4306
4a8a7965
YQ
43072015-08-25 Yao Qi <yao.qi@linaro.org>
4308
4309 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4310 Call current_lwp_ptid.
4311
32a271ee
YQ
43122015-08-25 Yao Qi <yao.qi@linaro.org>
4313
4314 * linux-aarch64-low.c (debug_reg_change_callback): Use
4315 debug_printf.
4316
0d51c8d7
YQ
43172015-08-25 Yao Qi <yao.qi@linaro.org>
4318
4319 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4320
31a43dd5
YQ
43212015-08-25 Yao Qi <yao.qi@linaro.org>
4322
4323 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4324
8ee52567
YQ
43252015-08-25 Yao Qi <yao.qi@linaro.org>
4326
4327 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4328 the code.
4329
ff3f0f45
YQ
43302015-08-25 Yao Qi <yao.qi@linaro.org>
4331
4332 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4333 Remove.
4334 (debug_reg_change_callback): Remove argument entry and add argument
4335 lwp. Remove local variable thread. Don't print thread id in the
4336 debugging output. Don't check whether pid of thread equals to pid.
4337 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4338 iterate_over_lwps instead find_inferior.
4339
3d40fbb5
PA
43402015-08-24 Pedro Alves <palves@redhat.com>
4341
4342 * inferiors.c (get_first_process): New function.
4343 * inferiors.h (get_first_process): New declaration.
4344 * remote-utils.c (read_ptid): Default to the first process in the
4345 list, instead of to the current thread's process.
4346
438e1e42
PA
43472015-08-24 Pedro Alves <palves@redhat.com>
4348
4349 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4350 * event-loop.c: Likewise.
4351 * remote-utils.c: Likewise.
4352 * tracepoint.c: Likewise.
4353
a8c6d4fc
PA
43542015-08-24 Pedro Alves <palves@redhat.com>
4355
4356 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4357 ptid_get_lwp.
4358
99b0bb12
PA
43592015-08-21 Pedro Alves <palves@redhat.com>
4360
4361 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4362 instead of literal 1.
4363
f8904751
PA
43642015-08-21 Pedro Alves <palves@redhat.com>
4365
4366 * tdesc.c (default_description): Explicitly zero-initialize.
4367
465a859e
PA
43682015-08-21 Pedro Alves <palves@redhat.com>
4369
4370 PR gdb/18749
4371 * inferiors.c (remove_thread): Discard any pending stop reply for
4372 this thread.
4373 * server.c (remove_all_on_match_pid): Rename to ...
4374 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4375 instead of a pid.
4376 (discard_queued_stop_replies): Change parameter to a ptid. Now
4377 extern.
4378 (handle_v_kill, kill_inferior_callback, captured_main)
4379 (process_serial_event): Adjust.
4380 * server.h (discard_queued_stop_replies): Declare.
4381
f0db101d
PA
43822015-08-21 Pedro Alves <palves@redhat.com>
4383
4384 * linux-low.c (wait_for_sigstop): Always switch to no thread
4385 selected if the previously current thread dies.
4386 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4387 process instead of the current thread's.
4388 * remote-utils.c (input_interrupt): Don't check if there's no
4389 current thread.
4390 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4391 current thread to the general thread fails, error out.
4392 (handle_qxfer_auxv, handle_qxfer_libraries)
4393 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4394 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4395 (handle_query): Check if there's a thread selected instead of
4396 checking whether there's any thread in the thread list.
4397 (handle_qxfer_threads, handle_qxfer_btrace)
4398 (handle_qxfer_btrace_conf): Don't error out early if there's no
4399 thread in the thread list.
4400 (handle_v_cont, myresume): Don't set the current thread to the
4401 continue thread.
4402 (process_serial_event) <Hg handling>: Also set thread_id if the
4403 previous general thread is still alive.
4404 (process_serial_event) <g/G handling>: If setting the current
4405 thread to the general thread fails, error out.
4406 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4407 thread's lwp instead of the current thread's.
4408 * target.c (set_desired_thread): If the desired thread was not
4409 found, leave the current thread pointing to NULL. Return an int
4410 (boolean) indicating success.
4411 * target.h (set_desired_thread): Change return type to int.
4412
40045d91
MF
44132015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4414
4415 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4416 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4417 #includes.
4418 (ps_get_thread_area): New function.
4419
45face3b
GB
44202015-08-19 Gary Benson <gbenson@redhat.com>
4421
4422 * hostio.c (handle_pread): Do not attempt to read more data
4423 than hostio_reply_with_data can fit in a packet.
4424
16d5f642
JB
44252015-08-18 Joel Brobecker <brobecker@adacore.com>
4426
4427 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4428
a738da3a
MF
44292015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4430
4431 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4432
33ebda9d
PA
44332015-08-06 Pedro Alves <palves@redhat.com>
4434
4435 * tracepoint.c (expr_eval_result): Now an int.
4436
a44892be
PA
44372015-08-06 Pedro Alves <palves@redhat.com>
4438
4439 * gdbthread.h (struct regcache): Forward declare.
4440 (struct thread_info) <regcache_data>: Now a struct regcache
4441 pointer.
4442 * inferiors.c (inferior_regcache_data)
4443 (set_inferior_regcache_data): Now work with struct regcache
4444 pointers.
4445 * inferiors.h (struct regcache): Forward declare.
4446 (inferior_regcache_data, set_inferior_regcache_data): Now work
4447 with struct regcache pointers.
4448 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4449 (free_register_cache_thread): Remove struct regcache pointer
4450 casts.
4451
608a1e46
PA
44522015-08-06 Pedro Alves <palves@redhat.com>
4453
4454 * server.c (captured_main): On error, print the exception message
4455 to stderr, and if run_once is set, throw a quit.
4456
f0ce0d3a
PA
44572015-08-06 Pedro Alves <palves@redhat.com>
4458
4459 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4460 the current thread.
4461
bf47e248
PA
44622015-08-06 Pedro Alves <palves@redhat.com>
4463
4464 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4465 reading beyond the passed in buffer length.
4466
b6b9ffcc
PL
44672015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4468
4469 * tracepoint.c (symbol_list) <required>: Remove.
4470
863d01bd
PA
44712015-08-06 Pedro Alves <palves@redhat.com>
4472
4473 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4474 count if stopping and suspending threads.
4475 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4476 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4477 (linux_detach): Complete an ongoing step-over.
4478 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4479 throughout.
4480 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4481 (linux_wait_1): If passing a signal to the inferior after
4482 finishing a step-over, unsuspend and re-resume all lwps. If we
4483 see a single-step event but the thread should be continuing, don't
4484 pass the trap to gdb.
4485 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4486 internal_error instead of gdb_assert.
4487 (enqueue_pending_signal): New function.
4488 (check_ptrace_stopped_lwp_gone): Add debug output.
4489 (start_step_over): Use internal_error instead of gdb_assert.
4490 (complete_ongoing_step_over): New function.
4491 (linux_resume_one_thread): Don't resume a suspended thread.
4492 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4493 it stepping.
4494
00db26fa
PA
44952015-08-06 Pedro Alves <palves@redhat.com>
4496
4497 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4498 (linux_thread_alive): Use lwp_is_marked_dead.
4499 (extended_event_reported): Delete.
4500 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4501 instead of extended_event_reported.
4502 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4503 as well.
4504 (lwp_is_marked_dead): New function.
4505 (lwp_running): Use lwp_is_marked_dead.
4506 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4507 comment.
4508
ad071a30
PA
45092015-08-06 Pedro Alves <palves@redhat.com>
4510
4511 * linux-low.c (linux_wait_1): Move fork event output out of the
4512 !report_to_gdb check. Pass event_child->waitstatus to
4513 target_waitstatus_to_string instead of ourstatus.
4514
524b57e6
YQ
45152015-08-04 Yao Qi <yao.qi@linaro.org>
4516
4517 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4518 if current_thread is 32 bit.
4519
6085d6f6
YQ
45202015-08-04 Yao Qi <yao.qi@linaro.org>
4521
4522 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4523 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4524 * server.c (extended_protocol): Remove "static".
4525 * server.h (extended_protocol): Declare it.
4526
8a7e4587
YQ
45272015-08-04 Yao Qi <yao.qi@linaro.org>
4528
4529 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4530 both aarch64 and aarch32.
4531 (aarch64_set_pc): Likewise.
4532
3b53ae99
YQ
45332015-08-04 Yao Qi <yao.qi@linaro.org>
4534
4535 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4536 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4537 arm-with-neon.xml to srv_xmlfiles.
4538 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4539 (is_64bit_tdesc): New function.
4540 (aarch64_linux_read_description): New function.
4541 (aarch64_arch_setup): Call aarch64_linux_read_description.
4542 (regs_info): Rename to regs_info_aarch64.
4543 (aarch64_regs_info): Return right regs_info.
4544 (initialize_low_arch): Call initialize_low_arch_aarch32.
4545
bd9e6534
YQ
45462015-08-04 Yao Qi <yao.qi@linaro.org>
4547
4548 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4549 * linux-aarch32-low.c: New file.
4550 * linux-aarch32-low.h: New file.
4551 * linux-arm-low.c (arm_fill_gregset): Move it to
4552 linux-aarch32-low.c.
4553 (arm_store_gregset): Likewise.
4554 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4555 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4556 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4557 (regs_info): Rename to regs_info_arm.
4558 (arm_regs_info): Return regs_info_aarch32 if
4559 have_ptrace_getregset is 1 and target description is
4560 arm_with_neon or arm_with_vfpv3.
4561 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4562 Call initialize_low_arch_aarch32 instead.
4563
ded48a5e
YQ
45642015-08-04 Yao Qi <yao.qi@linaro.org>
4565
4566 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4567 * linux-low.c: ... here.
4568 * linux-low.h (have_ptrace_getregset): Declare it.
4569
96e9210f
PA
45702015-08-04 Pedro Alves <palves@redhat.com>
4571
4572 * thread-db.c (struct thread_db): Use new typedefs.
4573 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4574 CHK calls.
4575 (disable_thread_event_reporting): Cast result of dlsym to
4576 destination function pointer type.
4577 (thread_db_mourn): Use td_ta_delete_ftype.
4578
af60a1ef
SL
45792015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4580
4581 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4582 arch variant.
4583 (CDX_BREAKPOINT): Define for R2.
4584 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4585 (the_low_target): Add comments.
4586
e8b41681
YQ
45872015-07-30 Yao Qi <yao.qi@linaro.org>
4588
4589 * linux-arm-low.c (arm_hwcap): Remove it.
4590 (arm_read_description): New local variable arm_hwcap. Don't
4591 set arm_hwcap to zero.
4592
89abb039
YQ
45932015-07-30 Yao Qi <yao.qi@linaro.org>
4594
4595 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4596 Use regcache->tdesc instead.
4597 (arm_store_wmmxregset): Likewise.
4598 (arm_fill_vfpregset): Likewise.
4599 (arm_store_vfpregset): Likewise.
4600
deca266c
YQ
46012015-07-30 Yao Qi <yao.qi@linaro.org>
4602
4603 * linux-arm-low.c: Include arch/arm.h.
4604 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4605 (arm_store_gregset): Likewise.
4606
aa58a496
SM
46072015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4608
4609 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4610 ptrace's 4th parameter.
4611
50904b25
YQ
46122015-07-27 Yao Qi <yao.qi@linaro.org>
4613
4614 * configure.srv (case aarch64*-*-linux*): Don't set
4615 srv_linux_usrregs.
4616
5826e159
PA
46172015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4618
4619 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4620 sys/ptrace.h.
4621 * linux-arm-low.c: Likewise.
4622 * linux-cris-low.c: Likewise.
4623 * linux-crisv32-low.c: Likewise.
4624 * linux-low.c: Likewise.
4625 * linux-m68k-low.c: Likewise.
4626 * linux-mips-low.c: Likewise.
4627 * linux-nios2-low.c: Likewise.
4628 * linux-s390-low.c: Likewise.
4629 * linux-sparc-low.c: Likewise.
4630 * linux-tic6x-low.c: Likewise.
4631 * linux-tile-low.c: Likewise.
4632 * linux-x86-low.c: Likewise.
4633
54019719
PA
46342015-07-24 Pedro Alves <palves@redhat.com>
4635
4636 * config.in: Regenerate.
4637 * configure: Regenerate.
4638
eb7aa561
PA
46392015-07-24 Pedro Alves <palves@redhat.com>
4640
4641 * acinclude.m4: Include ../ptrace.m4.
4642 * configure.ac: Call GDB_AC_PTRACE.
4643 * config.in, configure: Regenerate.
4644
55d7b841
YQ
46452015-07-24 Yao Qi <yao.qi@linaro.org>
4646
4647 * linux-low.c (linux_create_inferior): Remove setting to
4648 proc->priv->new_inferior.
4649 (linux_attach): Likewise.
4650 (linux_low_filter_event): Likewise.
4651 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4652
c06cbd92
YQ
46532015-07-24 Yao Qi <yao.qi@linaro.org>
4654
4655 * linux-low.c (linux_arch_setup): New function.
4656 (linux_low_filter_event): If proc->tdesc is NULL and
4657 proc->attached is true, call the_low_target.arch_setup.
4658 Otherwise, keep status pending, and return.
4659 (linux_resume_one_lwp_throw): Don't call get_pc if
4660 thread->while_stepping isn't NULL. Don't call
4661 get_thread_regcache if proc->tdesc is NULL.
4662 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4663 (linux_target_ops): Install arch_setup.
4664 * server.c (start_inferior): Call the_target->arch_setup.
4665 * target.h (struct target_ops) <arch_setup>: New field.
4666 (target_arch_setup): New marco.
4667 * lynx-low.c (lynx_target_ops): Update.
4668 * nto-low.c (nto_target_ops): Update.
4669 * spu-low.c (spu_target_ops): Update.
4670 * win32-low.c (win32_target_ops): Update.
4671
5ae3ebba
YQ
46722015-07-24 Yao Qi <yao.qi@linaro.org>
4673
4674 * linux-low.c (linux_add_process): Don't set
4675 proc->priv->new_inferior.
4676 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4677 (linux_attach): Likewise.
4678
eb97750b
YQ
46792015-07-24 Yao Qi <yao.qi@linaro.org>
4680
4681 * server.c (start_inferior): Code refactor.
4682
51aee833
YQ
46832015-07-24 Yao Qi <yao.qi@linaro.org>
4684
4685 * server.c (process_serial_event): Set general_thread.
4686
af1b22f3
YQ
46872015-07-21 Yao Qi <yao.qi@linaro.org>
4688
4689 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4690 aarch64_linux_get_debug_reg_capacity.
4691
554717a3
YQ
46922015-07-17 Yao Qi <yao.qi@linaro.org>
4693
4694 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4695 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4696 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4697 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4698 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4699 (AARCH64_HWP_ALIGNMENT): Likewise.
4700 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4701 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4702 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4703 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4704 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4705 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4706 (struct aarch64_debug_reg_state): Likewise.
4707 (struct arch_lwp_info): Likewise.
4708 (aarch64_align_watchpoint): Likewise.
4709 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4710 (aarch64_watchpoint_length): Likewise.
4711 (aarch64_point_encode_ctrl_reg): Likewise
4712 (aarch64_point_is_aligned): Likewise.
4713 (aarch64_align_watchpoint): Likewise.
4714 (aarch64_linux_set_debug_regs):
4715 (aarch64_dr_state_insert_one_point): Likewise.
4716 (aarch64_dr_state_remove_one_point): Likewise.
4717 (aarch64_handle_breakpoint): Likewise.
4718 (aarch64_handle_aligned_watchpoint): Likewise.
4719 (aarch64_handle_unaligned_watchpoint): Likewise.
4720 (aarch64_handle_watchpoint): Likewise.
4721
c67ca4de
YQ
47222015-07-17 Yao Qi <yao.qi@linaro.org>
4723
4724 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4725 and don't aarch64_get_debug_reg_state. All callers update.
4726 (aarch64_handle_aligned_watchpoint): Likewise.
4727 (aarch64_handle_unaligned_watchpoint): Likewise.
4728 (aarch64_handle_watchpoint): Likewise.
4729 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4730 (aarch64_remove_point): Likewise.
4731
25abf979
YQ
47322015-07-17 Yao Qi <yao.qi@linaro.org>
4733
4734 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4735 debug_printf.
4736 (aarch64_handle_unaligned_watchpoint): Likewise.
4737
db1ff28b
JK
47382015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4739
4740 Revert the previous 3 commits:
4741 Move gdb_regex* to common/
4742 Move linux_find_memory_regions_full & co.
4743 gdbserver build-id attribute generator
4744
700ca40f
JK
47452015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4746 Jan Kratochvil <jan.kratochvil@redhat.com>
4747
4748 gdbserver build-id attribute generator.
4749 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4750 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4751 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4752 (find_phdr): New.
4753 (get_dynamic): Use find_pdhr to traverse program headers.
4754 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4755 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4756 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4757 (get_hex_build_id): New.
4758 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4759 to reply XML document.
4760
9904185c
JK
47612015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4762 Jan Kratochvil <jan.kratochvil@redhat.com>
4763
4764 * target.c: Include target/target-utils.h and fcntl.h.
4765 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4766 (target_fileio_read_stralloc): New functions.
4767
6e5b4429
JK
47682015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4769
4770 * Makefile.in (OBS): Add gdb_regex.o.
4771 (gdb_regex.o): New.
4772 * config.in: Rebuilt.
4773 * configure: Rebuilt.
4774
ddc98fbf
JK
47752015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4776 Jan Kratochvil <jan.kratochvil@redhat.com>
4777
4778 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4779 * Makefile.in (OBS): Add target-utils.o.
4780 (linux-maps.o, target-utils.o): New.
4781 * configure.srv (srv_linux_obj): Add linux-maps.o.
4782
e57bb7a0
PL
47832015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4784
4785 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4786 function, return 1.
4787 (the_low_target): Install it.
4788
586b02a9
PA
47892015-07-14 Pedro Alves <palves@redhat.com>
4790
4791 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4792 Instead, ignore ECHILD, and throw an error for other errnos.
4793
58c1b36c
PA
47942015-07-10 Pedro Alves <palves@redhat.com>
4795
4796 * event-loop.c (struct callback_event) <data>: Change type to
4797 gdb_client_data instance instead of gdb_client_data pointer.
4798 (append_callback_event): Adjust.
4799
421530db
PL
48002015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4801
4802 * linux-aarch64-low.c: Add comments for each linux_target_ops
4803 method. Remove comments already covered in target_ops and
4804 linux_target_ops definitions.
4805 (the_low_target): Add comments for each unimplemented method.
4806
c2d65f38
YQ
48072015-07-09 Yao Qi <yao.qi@linaro.org>
4808
4809 * linux-aarch64-low.c (aarch64_regmap): Remove.
4810 (aarch64_usrregs_info): Remove.
4811 (regs_info): Set field usrregs to NULL.
4812
b20a6524
MM
48132015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4814
4815 * linux-low.c: Include "rsp-low.h"
4816 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4817 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4818 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4819 (handle_btrace_enable_pt): New.
4820 (handle_btrace_general_set): Support "pt".
4821 (handle_btrace_conf_general_set): Support "pt:size".
4822
96c97461
PL
48232015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4824
4825 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4826 Z_PACKET_SW_BP.
4827
37d66942
PL
48282015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4829
4830 * linux-aarch64-low.c: Remove comment about endianness.
4831 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4832 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4833 memcmp.
4834
dc06243f
GB
48352015-06-24 Gary Benson <gbenson@redhat.com>
4836
4837 * linux-i386-ipa.c (stdint.h): Do not include.
4838 * lynx-i386-low.c (stdint.h): Likewise.
4839 * lynx-ppc-low.c (stdint.h): Likewise.
4840 * mem-break.c (stdint.h): Likewise.
4841 * thread-db.c (stdint.h): Likewise.
4842 * tracepoint.c (stdint.h): Likewise.
4843 * win32-low.c (stdint.h): Likewise.
4844
124e13d9
SM
48452015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4846
4847 * server.c (write_qxfer_response): Update call to
4848 remote_escape_output.
4849
909c2cda
JK
48502015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4851 Jan Kratochvil <jan.kratochvil@redhat.com>
4852
4853 Merge multiple hex conversions.
4854 * gdbreplay.c (tohex): Rename to 'fromhex'.
4855 (logchar): Use fromhex.
4856
24c05f46
JK
48572015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4858
4859 * server.c (handle_qxfer_libraries): Set `version' attribute for
4860 <library-list>.
4861
14d2069a
GB
48622015-06-10 Gary Benson <gbenson@redhat.com>
4863
4864 * target.h (struct target_ops) <multifs_open>: New field.
4865 <multifs_unlink>: Likewise.
4866 <multifs_readlink>: Likewise.
4867 * linux-low.c (nat/linux-namespaces.h): New include.
4868 (linux_target_ops): Initialize the_target->multifs_open,
4869 the_target->multifs_unlink and the_target->multifs_readlink.
4870 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4871 * hostio.c (hostio_fs_pid): New static variable.
4872 (hostio_handle_new_gdb_connection): New function.
4873 (handle_setfs): Likewise.
4874 (handle_open): Use the_target->multifs_open as appropriate.
4875 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4876 (handle_readlink): Use the_target->multifs_readlink as
4877 appropriate.
4878 (handle_vFile): Handle vFile:setfs packets.
4879 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4880 after target_handle_new_gdb_connection.
4881
4b8b5e72
GB
48822015-06-10 Gary Benson <gbenson@redhat.com>
4883
4884 * configure.ac (AC_CHECK_FUNCS): Add setns.
4885 * config.in: Regenerate.
4886 * configure: Likewise.
4887 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4888 (linux-namespaces.o): New rule.
4889 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4890
3ac2e371
GB
48912015-06-09 Gary Benson <gbenson@redhat.com>
4892
4893 * hostio.c (handle_open): Process mode argument with
4894 fileio_to_host_mode.
4895
ca9b78ce
YQ
48962015-06-01 Yao Qi <yao.qi@linaro.org>
4897
4898 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4899 * linux-x86-low.c: Likewise.
4900
bfacd19d
DB
49012015-05-28 Don Breazeal <donb@codesourcery.com>
4902
4903 * linux-low.c (handle_extended_wait): Initialize
4904 thread_info.last_resume_kind for new fork children.
4905
452003ef
PA
49062015-05-15 Pedro Alves <palves@redhat.com>
4907
4908 * target.h (target_handle_new_gdb_connection): Rewrite using if
4909 wrapped in do/while.
4910
1041a03c
JB
49112015-05-14 Joel Brobecker <brobecker@adacore.com>
4912
4913 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4914 * configure, config.in: Regenerate.
4915 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4916 Declare typedef.
4917
c269dbdb
DB
49182015-05-12 Don Breazeal <donb@codesourcery.com>
4919
4920 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4921 PTRACE_EVENT_VFORK_DONE.
4922 (linux_low_ptrace_options, extended_event_reported): Add vfork
4923 events.
4924 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4925 and "vforkdone" for RSP 'T' Stop Reply Packet.
4926 * server.h (report_vfork_events): Declare
4927 global variable.
4928
3a8a0396
DB
49292015-05-12 Don Breazeal <donb@codesourcery.com>
4930
4931 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4932 (the_low_target) <new_fork>: Initialize new member.
4933 * linux-arm-low.c (arm_new_fork): New function.
4934 (the_low_target) <new_fork>: Initialize new member.
4935 * linux-low.c (handle_extended_wait): Call new target function
4936 new_fork.
4937 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4938 * linux-mips-low.c (mips_add_watchpoint): New function
4939 extracted from mips_insert_point.
4940 (the_low_target) <new_fork>: Initialize new member.
4941 (mips_linux_new_fork): New function.
4942 (mips_insert_point): Call mips_add_watchpoint.
4943 * linux-x86-low.c (x86_linux_new_fork): New function.
4944 (the_low_target) <new_fork>: Initialize new member.
4945
de0d863e
DB
49462015-05-12 Don Breazeal <donb@codesourcery.com>
4947
4948 * linux-low.c (handle_extended_wait): Implement return value,
4949 rename argument 'event_child' to 'event_lwp', handle
4950 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4951 (linux_low_ptrace_options): New function.
4952 (linux_low_filter_event): Call linux_low_ptrace_options,
4953 use different argument fo linux_enable_event_reporting,
4954 use return value from handle_extended_wait.
4955 (extended_event_reported): New function.
4956 (linux_wait_1): Call extended_event_reported and set
4957 status to report fork events.
4958 (linux_write_memory): Add pid to debug message.
4959 (reset_lwp_ptrace_options_callback): New function.
4960 (linux_handle_new_gdb_connection): New function.
4961 (linux_target_ops): Initialize new structure member.
4962 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4963 * lynx-low.c: Initialize new structure member.
4964 * remote-utils.c (prepare_resume_reply): Implement stop reason
4965 "fork" for "T" stop message.
4966 * server.c (handle_query): Call handle_new_gdb_connection.
4967 * server.h (report_fork_events): Declare global flag.
4968 * target.h (struct target_ops) <handle_new_gdb_connection>:
4969 New member.
4970 (target_handle_new_gdb_connection): New macro.
4971 * win32-low.c: Initialize new structure member.
4972
ddcbc397
DB
49732015-05-12 Don Breazeal <donb@codesourcery.com>
4974
4975 * mem-break.c (APPEND_TO_LIST): Define macro.
4976 (clone_agent_expr): New function.
4977 (clone_one_breakpoint): New function.
4978 (clone_all_breakpoints): New function.
4979 * mem-break.h: Declare new functions.
4980
89245bc0
DB
49812015-05-12 Don Breazeal <donb@codesourcery.com>
4982
4983 * linux-low.c (linux_supports_fork_events): New function.
4984 (linux_supports_vfork_events): New function.
4985 (linux_target_ops): Initialize new structure members.
4986 (initialize_low): Call linux_check_ptrace_features.
4987 * lynx-low.c (lynx_target_ops): Initialize new structure
4988 members.
4989 * server.c (report_fork_events, report_vfork_events):
4990 New global flags.
4991 (handle_query): Add new features to qSupported packet and
4992 response.
4993 (captured_main): Initialize new global variables.
4994 * target.h (struct target_ops) <supports_fork_events>:
4995 New member.
4996 <supports_vfork_events>: New member.
4997 (target_supports_fork_events): New macro.
4998 (target_supports_vfork_events): New macro.
4999 * win32-low.c (win32_target_ops): Initialize new structure
5000 members.
5001
835205d0
GB
50022015-05-12 Gary Benson <gbenson@redhat.com>
5003
5004 * server.c (handle_qxfer_exec_file): Use current process
5005 if annex is empty.
5006
21e94bd9
SL
50072015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5008
5009 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5010 Remove HAVE_PTRACE_GETREGS conditionals.
5011 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5012 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5013
45614f15
YQ
50142015-05-08 Yao Qi <yao.qi@linaro.org>
5015
5016 * linux-low.c (linux_supports_conditional_breakpoints): New
5017 function.
5018 (linux_target_ops): Install new target method.
5019 * lynx-low.c (lynx_target_ops): Install NULL hook for
5020 supports_conditional_breakpoints.
5021 * nto-low.c (nto_target_ops): Likewise.
5022 * spu-low.c (spu_target_ops): Likewise.
5023 * win32-low.c (win32_target_ops): Likewise.
5024 * server.c (handle_query): Check
5025 target_supports_conditional_breakpoints.
5026 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5027 New field.
5028 (target_supports_conditional_breakpoints): New macro.
5029
80ad801e
PA
50302015-05-06 Pedro Alves <palves@redhat.com>
5031
5032 PR server/18081
5033 * server.c (start_inferior): If the process exits, mourn it.
5034
819843c7
GB
50352015-04-21 Gary Benson <gbenson@redhat.com>
5036
5037 * hostio.c (fileio_open_flags_to_host): Factored out to
5038 fileio_to_host_openflags in common/fileio.c. Single use
5039 updated.
5040
a2d5a9d7
MF
50412015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5042
5043 * linux-xtensa-low.c (xtensa_fill_gregset)
5044 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5045 XCHAL_HAVE_LOOP.
5046
deb44829
MF
50472015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5048
5049 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5050 (regs_info): Replace usrregs pointer with NULL.
5051
e57f1de3
GB
50522015-04-17 Gary Benson <gbenson@redhat.com>
5053
5054 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5055 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5056 * server.c (handle_qxfer_exec_file): New function.
5057 (qxfer_packets): Add exec-file entry.
5058 (handle_query): Report qXfer:exec-file:read as supported packet.
5059
62828379
RN
50602015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5061
5062 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5063
b88bb450
GB
50642015-04-09 Gary Benson <gbenson@redhat.com>
5065
5066 * hostio-errno.c (errno_to_fileio_error): Remove function.
5067 Update caller to use remote_fileio_to_fio_error.
5068
c8f4bfdd
YQ
50692015-04-09 Yao Qi <yao.qi@linaro.org>
5070
5071 * linux-low.c (linux_insert_point): Call
5072 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5073 (linux_remove_point): Call remove_memory_breakpoint if type is
5074 raw_bkpt_type_sw.
5075 * linux-x86-low.c (x86_insert_point): Don't call
5076 insert_memory_breakpoint.
5077 (x86_remove_point): Don't call remove_memory_breakpoint.
5078
41f98f02
PA
50792015-04-01 Pedro Alves <palves@redhat.com>
5080 Cleber Rosa <crosa@redhat.com>
5081
5082 * server.c (gdbserver_usage): Reorganize and extend the usage
5083 message.
5084
2bf6fb9d
PA
50852015-03-24 Pedro Alves <palves@redhat.com>
5086
5087 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5088 output. Also dump TRAP_TRACE.
5089 (linux_low_filter_event): In debug output, distinguish a
5090 resume_stop SIGSTOP from a delayed SIGSTOP.
5091
369f6daa
GB
50922015-03-24 Gary Benson <gbenson@redhat.com>
5093
5094 * linux-x86-low.c (x86_linux_new_thread): Moved to
5095 nat/x86-linux.c.
5096 (x86_linux_prepare_to_resume): Likewise.
5097
8e5d4070
GB
50982015-03-24 Gary Benson <gbenson@redhat.com>
5099
5100 * Makefile.in (x86-linux-dregs.o): New rule.
5101 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5102 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5103 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5104 (x86_linux_dr_get): Likewise.
5105 (x86_linux_dr_set): Likewise.
5106 (update_debug_registers_callback): Likewise.
5107 (x86_linux_dr_set_addr): Likewise.
5108 (x86_linux_dr_get_addr): Likewise.
5109 (x86_linux_dr_set_control): Likewise.
5110 (x86_linux_dr_get_control): Likewise.
5111 (x86_linux_dr_get_status): Likewise.
5112 (x86_linux_update_debug_registers): Likewise.
5113
2b95d440
GB
51142015-03-24 Gary Benson <gbenson@redhat.com>
5115
5116 * linux-x86-low.c (x86_linux_update_debug_registers):
5117 New function, factored out from...
5118 (x86_linux_prepare_to_resume): ...this.
5119
14b0bc68
GB
51202015-03-24 Gary Benson <gbenson@redhat.com>
5121
5122 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5123 (x86_linux_dr_set): Likewise.
5124 (update_debug_registers_callback): Likewise.
5125 (x86_linux_dr_set_addr): Likewise.
5126 (x86_linux_dr_get_addr): Likewise.
5127 (x86_linux_dr_set_control): Likewise.
5128 (x86_linux_dr_get_control): Likewise.
5129 (x86_linux_dr_get_status): Likewise.
5130 (x86_linux_prepare_to_resume): Likewise.
5131
5dfe6ca8
GB
51322015-03-24 Gary Benson <gbenson@redhat.com>
5133
5134 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5135 Use perror_with_name. Pass string through gettext.
5136 (x86_linux_dr_set): Likewise.
5137
d33472ad
GB
51382015-03-24 Gary Benson <gbenson@redhat.com>
5139
5140 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5141 (x86_linux_dr_set_addr): ...this.
5142 (x86_dr_low_get_addr): Rename to...
5143 (x86_linux_dr_get_addr): ...this.
5144 (x86_dr_low_set_control): Rename to...
5145 (x86_linux_dr_set_control): ...this.
5146 (x86_dr_low_get_control): Rename to...
5147 (x86_linux_dr_get_control): ...this.
5148 (x86_dr_low_get_status): Rename to...
5149 (x86_linux_dr_get_status): ...this.
5150 (x86_dr_low): Update with new function names.
5151
4b134ca1
GB
51522015-03-24 Gary Benson <gbenson@redhat.com>
5153
5154 * Makefile.in (x86-linux.o): New rule.
5155 * configure.srv: Add x86-linux.o to relevant targets.
5156 * linux-low.c (lwp_set_arch_private_info): New function.
5157 (lwp_arch_private_info): Likewise.
5158 * linux-x86-low.c: Include nat/x86-linux.h.
5159 (arch_lwp_info): Removed structure.
5160 (update_debug_registers_callback):
5161 Use lwp_set_debug_registers_changed.
5162 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5163 and lwp_set_debug_registers_changed.
5164 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5165
34c703da
GB
51662015-03-24 Gary Benson <gbenson@redhat.com>
5167
5168 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5169 * linux-arm-low.c (arm_new_thread): Likewise.
5170 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5171 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5172 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5173 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5174
cff068da
GB
51752015-03-24 Gary Benson <gbenson@redhat.com>
5176
5177 * linux-low.c (ptid_of_lwp): New function.
5178 (lwp_is_stopped): Likewise.
5179 (lwp_stop_reason): Likewise.
5180 * linux-x86-low.c (update_debug_registers_callback):
5181 Use lwp_is_stopped.
5182 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5183 lwp_stop_reason.
5184
b2f7c7e8
GB
51852015-03-24 Gary Benson <gbenson@redhat.com>
5186
5187 * linux-low.h (linux_stop_lwp): Remove declaration.
5188
6d4ee8c6
GB
51892015-03-24 Gary Benson <gbenson@redhat.com>
5190
5191 * linux-low.h: Include nat/linux-nat.h.
5192 * linux-low.c (iterate_over_lwps_args): New structure.
5193 (iterate_over_lwps_filter): New function.
5194 (iterate_over_lwps): Likewise.
5195 * linux-x86-low.c (update_debug_registers_callback):
5196 Update signature to what iterate_over_lwps expects.
5197 Remove PID check that iterate_over_lwps now performs.
5198 (x86_dr_low_set_addr): Use iterate_over_lwps.
5199 (x86_dr_low_set_control): Likewise.
5200
70a0bb6b
GB
52012015-03-24 Gary Benson <gbenson@redhat.com>
5202
5203 * linux-x86-low.c (x86_debug_reg_state): New function.
5204 (x86_linux_prepare_to_resume): Use the above.
5205
7b669087
GB
52062015-03-24 Gary Benson <gbenson@redhat.com>
5207
5208 * linux-low.c (current_lwp_ptid): New function.
5209 * linux-x86-low.c: Include nat/linux-nat.h.
5210 (x86_dr_low_get_addr): Use current_lwp_ptid.
5211 (x86_dr_low_get_control): Likewise.
5212 (x86_dr_low_get_status): Likewise.
5213
eef49a3d
PA
52142015-03-20 Pedro Alves <palves@redhat.com>
5215
5216 * tracepoint.c (cmd_qtstatus): Make "str" const.
5217
b2333d22
PA
52182015-03-20 Pedro Alves <palves@redhat.com>
5219
5220 * server.c (handle_general_set): Make "req_str" const.
5221
23f238d3
PA
52222015-03-19 Pedro Alves <palves@redhat.com>
5223
5224 * linux-low.c (linux_resume_one_lwp): Rename to ...
5225 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5226 instead call perror_with_name.
5227 (check_ptrace_stopped_lwp_gone): New function.
5228 (linux_resume_one_lwp): Reimplement as wrapper around
5229 linux_resume_one_lwp_throw that swallows errors if the LWP is
5230 gone.
5231
91baf43f
PA
52322015-03-19 Pedro Alves <palves@redhat.com>
5233
5234 * linux-low.c (count_events_callback, select_event_lwp_callback):
5235 No longer check whether the thread has resume_stop as last resume
5236 kind.
5237
8bf3b159
PA
52382015-03-19 Pedro Alves <palves@redhat.com>
5239
5240 * linux-low.c (count_events_callback, select_event_lwp_callback):
5241 Use the lwp's status_pending_p field, not the thread's.
5242
b90fc188
PA
52432015-03-19 Pedro Alves <palves@redhat.com>
5244
5245 * linux-low.c (select_event_lwp_callback): Update comments to
5246 no longer mention SIGTRAP.
5247
464b0089
GB
52482015-03-18 Gary Benson <gbenson@redhat.com>
5249
5250 * server.c (handle_query): Do not report vFile:fstat as supported.
5251
aa9e327f
GB
52522015-03-11 Gary Benson <gbenson@redhat.com>
5253
5254 * hostio.c (sys/types.h): New include.
5255 (sys/stat.h): Likewise.
5256 (common-remote-fileio.h): Likewise.
5257 (handle_fstat): New function.
5258 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5259
791c0056
GB
52602015-03-11 Gary Benson <gbenson@redhat.com>
5261
5262 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5263 struct stat.st_blocks and struct stat.st_blksize.
5264 * configure: Regenerate.
5265 * config.in: Likewise.
5266 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5267 (OBS): Add common-remote-fileio.o.
5268 (common-remote-fileio.o): New rule.
5269
9a9df970
PA
52702015-03-09 Pedro Alves <palves@redhat.com>
5271
5272 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5273 'struct sockaddr' pointer in 'accept' call.
5274
9eb1356e
PA
52752015-03-09 Pedro Alves <palves@redhat.com>
5276
5277 Revert:
5278 2015-03-07 Pedro Alves <palves@redhat.com>
5279 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5280 or <winsock2.h> here. Instead include "gdb_socket.h".
5281 (remote_open): Use union gdb_sockaddr_u.
5282 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5283 or <winsock2.h> here. Instead include "gdb_socket.h".
5284 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5285 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5286 or <sys/un.h>.
5287 (init_named_socket, gdb_agent_helper_thread): Use union
5288 gdb_sockaddr_u.
5289
aac331e4
PA
52902015-03-07 Pedro Alves <palves@redhat.com>
5291
5292 * configure.ac (build_warnings): Move
5293 -Wdeclaration-after-statement to the C-specific set.
5294 * configure: Regenerate.
5295
366c75fc
PA
52962015-03-07 Pedro Alves <palves@redhat.com>
5297
5298 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5299 or <winsock2.h> here. Instead include "gdb_socket.h".
5300 (remote_open): Use union gdb_sockaddr_u.
5301 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5302 or <winsock2.h> here. Instead include "gdb_socket.h".
5303 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5304 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5305 or <sys/un.h>.
5306 (init_named_socket, gdb_agent_helper_thread): Use union
5307 gdb_sockaddr_u.
5308
492d29ea
PA
53092015-03-07 Pedro Alves <palves@redhat.com>
5310
5311 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5312 instead.
5313
60a191ed
YQ
53142015-03-06 Yao Qi <yao.qi@linaro.org>
5315
5316 * linux-aarch64-low.c (aarch64_insert_point): Use
5317 show_debug_regs as a boolean.
5318 (aarch64_remove_point): Likewise.
5319
f5771b1d
PA
53202015-03-05 Pedro Alves <palves@redhat.com>
5321
5322 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5323 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5324 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5325 * nto-low.c (nto_target_ops): Likewise.
5326 * spu-low.c (spu_target_ops): Likewise.
5327 * win32-low.c (win32_target_ops): Likewise.
5328
3e572f71
PA
53292015-03-04 Pedro Alves <palves@redhat.com>
5330
72f4393d 5331 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5332 Decide whether a breakpoint triggered based on the SIGTRAP's
5333 siginfo.si_code.
72f4393d
L
5334 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5335 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5336 (linux_low_filter_event): Check for breakpoints before checking
5337 watchpoints.
5338 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5339 siginfo.si_code.
72f4393d
L
5340 (linux_stopped_by_sw_breakpoint)
5341 (linux_supports_stopped_by_sw_breakpoint)
5342 (linux_stopped_by_hw_breakpoint)
5343 (linux_supports_stopped_by_hw_breakpoint): New functions.
5344 (linux_target_ops): Install new target methods.
3e572f71 5345
1ec68e26
PA
53462015-03-04 Pedro Alves <palves@redhat.com>
5347
5348 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5349 * server.c (swbreak_feature, hwbreak_feature): New globals.
5350 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5351 (captured_main): Clear swbreak_feature and hwbreak_feature.
5352 * server.h (swbreak_feature, hwbreak_feature): Declare.
5353 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5354 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5355 supports_stopped_by_hw_breakpoint>: New fields.
5356 (target_supports_stopped_by_sw_breakpoint)
5357 (target_stopped_by_sw_breakpoint)
5358 (target_supports_stopped_by_hw_breakpoint)
5359 (target_stopped_by_hw_breakpoint): Declare.
5360
15c66dd6
PA
53612015-03-04 Pedro Alves <palves@redhat.com>
5362
5363 enum lwp_stop_reason -> enum target_stop_reason
5364 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5365 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5366 (linux_wait_1, stuck_in_jump_pad_callback)
5367 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5368 (linux_stopped_by_watchpoint):
5369 * linux-low.h (enum lwp_stop_reason): Delete.
5370 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5371 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5372
98fc70d6
YQ
53732015-03-04 Yao Qi <yao.qi@linaro.org>
5374
5375 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5376
dd2ac174
GB
53772015-03-03 Gary Benson <gbenson@redhat.com>
5378
5379 * hostio.c (handle_vFile): Fix prefix lengths.
5380
d68e53f4
MM
53812015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5382
5383 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5384 ptr_bits.
5385
bf2d68ab
AA
53862015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5387
5388 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5389 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5390 (clean): Add "rm -f" for above C files.
5391 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5392 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5393 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5394 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5395 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5396 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5397 (init_registers_s390x_vx_linux64)
5398 (init_registers_s390x_tevx_linux64)
5399 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5400 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5401 declarations.
5402 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5403 (s390_store_vxrs_high): New functions.
5404 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5405 NT_S390_VXRS_HIGH.
5406 (s390_arch_setup): Add logic for selecting one of the new target
5407 descriptions. Activate the new vector regsets if applicable.
5408 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5409 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5410 and init_registers_s390x_tevx_linux64.
5411
c966a859
PA
54122015-03-01 Pedro Alves <palves@redhat.com>
5413
5414 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5415 parameter.
5416
4180215b
PA
54172015-02-27 Pedro Alves <palves@redhat.com>
5418
5419 * linux-x86-low.c (u_debugreg_offset): New function.
5420 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5421
749bab01
PA
54222015-02-27 Pedro Alves <palves@redhat.com>
5423
5424 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5425 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5426 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5427 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5428 (ps_lsetfpregs, ps_getpid)
5429 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5430 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5431 (ps_lsetxregs, ps_plog): Declare.
5432
3c14e5a3
PA
54332015-02-27 Pedro Alves <palves@redhat.com>
5434
5435 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5436 IP_AGENT_EXPORT_FUNC.
5437 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5438 IP_AGENT_EXPORT_FUNC.
5439 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5440 (IP_AGENT_EXPORT): Delete.
5441 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5442 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5443 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5444 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5445 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5446 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5447 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5448 (traceframe_read_count, traceframe_write_count)
5449 (traceframes_created, trace_state_variables, get_raw_reg)
5450 (get_trace_state_variable_value, set_trace_state_variable_value)
5451 (ust_loaded, helper_thread_id, cmd_buf): Use
5452 IPA_SYM_EXPORTED_NAME.
5453 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5454 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5455 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5456 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5457 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5458 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5459 EXTERN_C_PUSH/EXTERN_C_POP.
5460 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5461 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5462 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5463 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5464 (traceframe_write_count, traceframe_read_count)
5465 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5466 (about_to_request_buffer_space, get_trace_state_variable_value)
5467 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5468 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5469 EXTERN_C_PUSH/EXTERN_C_POP.
5470 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5471 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5472 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5473 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5474 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5475 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5476 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5477 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5478 Define.
5479 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5480 (IP_AGENT_EXPORT_VAR_DECL): Define.
5481 (tracing): Declare.
5482 (gdb_agent_get_raw_reg): Declare.
5483
fe978cb0
PA
54842015-02-27 Tom Tromey <tromey@redhat.com>
5485 Pedro Alves <palves@redhat.com>
5486
5487 Rename symbols whose names are reserved C++ keywords throughout.
5488
3bc3d82a
PA
54892015-02-27 Pedro Alves <palves@redhat.com>
5490
5491 * Makefile.in (COMPILER): New, get it from autoconf.
5492 (CXX): Get from autoconf instead.
5493 (COMPILE.pre): Use COMPILER.
5494 (CC-LD): Rename to ...
5495 (CC_LD): ... this. Use COMPILER.
5496 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5497 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5498 * acinclude.m4: Include build-with-cxx.m4.
5499 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5500 Disable -Werror by default if building in C++ mode.
5501 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5502 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5503 the C++ compiler. Save/restore CXXFLAGS too.
5504 * configure: Regenerate.
5505
07697489
PA
55062015-02-27 Pedro Alves <palves@redhat.com>
5507
5508 * acinclude.m4: Include libiberty.m4.
5509 * configure.ac: Call libiberty_INIT.
5510 * config.in, configure: Regenerate.
5511
9beb7c4e
PA
55122015-02-26 Pedro Alves <palves@redhat.com>
5513
5514 * linux-low.c (linux_wait_1): When incrementing the PC past a
5515 program breakpoint always use the_low_target.breakpoint_len as
5516 increment, rather than the maximum between that and
5517 the_low_target.decr_pc_after_break.
5518
8090aef2
PA
55192015-02-23 Pedro Alves <palves@redhat.com>
5520
5521 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5522 thread was doing a step-over; always adjust the PC if
5523 we stepped over a permanent breakpoint.
5524 (linux_wait_1): If we stepped over breakpoint that was on top of a
5525 permanent breakpoint, manually advance the PC past it.
5526
bc9540e8
PA
55272015-02-23 Pedro Alves <palves@redhat.com>
5528
5529 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5530 modes.
5531 (x86_fill_gregset, x86_store_gregset): Use it when handling
5532 $orig_eax.
5533
2db9a427
PA
55342015-02-20 Pedro Alves <palves@redhat.com>
5535
5536 * thread-db.c: Include "nat/linux-procfs.h".
5537 (thread_db_init): Skip listing new threads if the kernel supports
5538 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5539
afa8d396
PA
55402015-02-20 Pedro Alves <palves@redhat.com>
5541
5542 * linux-low.c (status_pending_p_callback): Use ptid_match.
5543
c9587f88
AT
55442015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5545
5546 PR breakpoints/16812
5547 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5548 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5549 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5550
b05ec7a5
AT
55512015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5552
5553 PR breakpoints/15956
5554 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5555
d33501a5
MM
55562015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5557
5558 * linux-low.c (linux_low_btrace_conf): Print size.
5559 * server.c (handle_btrace_conf_general_set): New.
5560 (hanle_general_set): Call handle_btrace_conf_general_set.
5561 (handle_query): Report Qbtrace-conf:bts:size as supported.
5562
f4abbc16
MM
55632015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5564
5565 * linux-low.c (linux_low_enable_btrace): Update parameters.
5566 (linux_low_btrace_conf): New.
5567 (linux_target_ops)<to_btrace_conf>: Initialize.
5568 * server.c (current_btrace_conf): New.
5569 (handle_btrace_enable): Rename to ...
5570 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5571 to target_enable_btrace. Update comment. Update users.
5572 (handle_qxfer_btrace_conf): New.
5573 (qxfer_packets): Add btrace-conf entry.
5574 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5575 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5576 (target_ops)<read_btrace_conf>: New.
5577 (target_enable_btrace): Update parameters.
5578 (target_read_btrace_conf): New.
5579
043c3577
MM
55802015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5581
5582 * server.c (handle_btrace_general_set): Remove call to
5583 target_supports_btrace.
5584 (supported_btrace_packets): New.
5585 (handle_query): Call supported_btrace_packets.
5586 * target.h: include btrace-common.h.
5587 (btrace_target_info): Removed.
5588 (supports_btrace, target_supports_btrace): Update parameters.
5589
734b0e4b
MM
55902015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5591
5592 * Makefile.in (SFILES): Add common/btrace-common.c.
5593 (OBS): Add common/btrace-common.o.
5594 (btrace-common.o): Add build rules.
5595 * linux-low: Include btrace-common.h.
5596 (linux_low_read_btrace): Use struct btrace_data. Call
5597 btrace_data_init and btrace_data_fini.
5598
d6c146e9
PA
55992015-02-06 Pedro Alves <palves@redhat.com>
5600
5601 * thread-db.c (find_new_threads_callback): Add debug output.
5602
20ba1ce6
PA
56032015-02-04 Pedro Alves <palves@redhat.com>
5604
5605 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5606 (resume_stopped_resumed_lwps): New function.
5607 (linux_wait_for_event_filtered): Use it.
5608
8cc73a39
SDJ
56092015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5610
5611 * Makefile.in (SFILES): Add linux-personality.c.
5612 (linux-personality.o): New rule.
5613 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5614 list of objects to be built.
5615 * linux-low.c: Include nat/linux-personality.h.
5616 (linux_create_inferior): Remove code to disable address space
5617 randomization (moved to ../nat/linux-personality.c). Create
5618 cleanup to disable address space randomization.
5619
fb23d554
SDJ
56202015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5621
5622 * Makefile.in (posix-strerror.o): New rule.
5623 (mingw-strerror.o): Likewise.
5624 * configure: Regenerated.
5625 * configure.ac: Source file ../common/common.host. Initialize new
5626 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5627
cdf43629
YQ
56282015-01-14 Yao Qi <yao@codesourcery.com>
5629
5630 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5631 (ppc-linux.o): New rule.
5632 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5633 * configure.ac: AC_CHECK_FUNCS(getauxval).
5634 * config.in: Re-generated.
5635 * configure: Re-generated.
5636 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5637 ppc64_64bit_inferior_p
5638
514c5338
YQ
56392015-01-14 Yao Qi <yao@codesourcery.com>
5640
5641 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5642 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5643 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5644 (PT_ORIG_R3, PT_TRAP): Likewise.
5645 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5646 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5647 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5648
3368c1e5
JB
56492015-01-10 Joel Brobecker <brobecker@adacore.com>
5650
5651 * i387-fp.c (i387_cache_to_xsave): In look over
5652 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5653 zmmh_low_space field by use of zmmh_high_space.
5654
582511be
PA
56552015-01-09 Pedro Alves <palves@redhat.com>
5656
5657 * linux-low.c (step_over_bkpt): Move higher up in the file.
5658 (handle_extended_wait): Don't store the stop_pc here.
5659 (get_stop_pc): Adjust comments and rename to ...
5660 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5661 stopped for a software breakpoint or hardware breakpoint.
5662 (thread_still_has_status_pending_p): New function.
5663 (status_pending_p_callback): Use
5664 thread_still_has_status_pending_p. If the event is no longer
5665 interesting, resume the LWP.
5666 (handle_tracepoints): Add assert.
5667 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5668 (wstatus_maybe_breakpoint): New function.
5669 (cancel_breakpoint): Delete function.
5670 (check_stopped_by_watchpoint): New function, factored out from
5671 linux_low_filter_event.
5672 (lp_status_maybe_breakpoint): Delete function.
5673 (linux_low_filter_event): Remove filter_ptid argument.
5674 Leave thread group exits pending here. Store the LWP's stop PC.
5675 Always leave events pending.
5676 (linux_wait_for_event_filtered): Pull all events out of the
5677 kernel, and leave them all pending.
5678 (count_events_callback, select_event_lwp_callback): Consider all
5679 events.
5680 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5681 (select_event_lwp): Only give preference to the stepping LWP in
5682 all-stop mode. Adjust comments.
5683 (ignore_event): New function.
5684 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5685 references to cancel_breakpoints. Adjust to renames. Also give
5686 equal priority to all LWPs that have had events in non-stop mode.
5687 If reporting a software breakpoint event, unadjust the LWP's PC.
5688 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5689 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5690 Adjust.
5691 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5692 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5693 (linux_stopped_by_watchpoint): Adjust.
5694 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5695 * linux-low.h (enum lwp_stop_reason): New.
5696 (struct lwp_info) <stop_pc>: Adjust comment.
5697 <stopped_by_watchpoint>: Delete field.
5698 <stop_reason>: New field.
5699 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5700 * mem-break.c (software_breakpoint_inserted_here)
5701 (hardware_breakpoint_inserted_here): New function.
5702 * mem-break.h (software_breakpoint_inserted_here)
5703 (hardware_breakpoint_inserted_here): Declare.
5704 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5705 (cancel_breakpoints): Delete.
5706 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5707 (upload_fast_traceframes): Remove references to
5708 cancel_breakpoints.
5709
a33e3959
PA
57102015-01-09 Pedro Alves <palves@redhat.com>
5711
5712 * thread-db.c (find_new_threads_callback): Ignore thread if the
5713 kernel thread ID is -1.
5714
8784d563
PA
57152015-01-09 Pedro Alves <palves@redhat.com>
5716
5717 * linux-low.c (linux_attach_fail_reason_string): Move to
5718 nat/linux-ptrace.c, and rename.
5719 (linux_attach_lwp): Update comment.
5720 (attach_proc_task_lwp_callback): New function.
5721 (linux_attach): Adjust to rename and use
5722 linux_proc_attach_tgid_threads.
5723 (linux_attach_fail_reason_string): Delete declaration.
5724
76f2b779
JB
57252015-01-01 Joel Brobecker <brobecker@adacore.com>
5726
5727 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5728 * server.c (gdbserver_version): Likewise.
5729
fafcc06a
SDJ
57302014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5731
5732 * remote-utils.c: Include ctype.h.
5733 (input_interrupt): Explicitly handle the case when the char
5734 received is the NUL byte. Improve the printing of non-ASCII
5735 characters.
5736
beed38b8
JB
57372014-12-16 Joel Brobecker <brobecker@adacore.com>
5738
5739 * linux-low.c (linux_low_filter_event): Update call to
5740 linux_enable_event_reporting following the addition of
5741 a new parameter to that function.
5742
bf330350
CU
57432014-12-16 Catalin Udma <catalin.udma@freescale.com>
5744
5745 PR server/17457
5746 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5747 (AARCH64_FPCR_REGNO): Likewise.
5748 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5749 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5750 (aarch64_store_fpregset): Likewise.
5751
5227d625
JB
57522014-12-15 Joel Brobecker <brobecker@adacore.com>
5753
5754 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5755 Remove FIXME comment about assumption about N.
5756
f93b65a0
JB
57572014-12-13 Joel Brobecker <brobecker@adacore.com>
5758
5759 * configure.ac: If large-file support is disabled in GDBserver,
5760 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5761 * configure: Regenerate.
5762
e5a9158d
AA
57632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5764
5765 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5766 warning upon ENODATA from ptrace.
5767 * linux-s390-low.c (s390_store_tdb): New.
5768 (s390_regsets): Add regset for NT_S390_TDB.
5769
feea5f36
AA
57702014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5771
5772 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5773 without a fill_function.
5774 * linux-s390-low.c (s390_fill_last_break): Remove.
5775 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5776 (s390_arch_setup): Use regset's size instead of fill_function for
5777 loop end condition.
5778
098dbe61
AA
57792014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5780
5781 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5782 the regset's store function when ptrace returned an error.
5783 * regcache.c (get_thread_regcache): Invalidate register cache
5784 before fetching inferior's registers.
5785
28eef672
AA
57862014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5787
5788 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5789 while-loop as for-loop.
5790 (regsets_store_inferior_registers): Likewise.
5791
bdca27a2
YQ
57922014-11-28 Yao Qi <yao@codesourcery.com>
5793
5794 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5795 * config.in, configure: Re-generate.
5796 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5797 is defined.
5798
9c232dda
YQ
57992014-11-21 Yao Qi <yao@codesourcery.com>
5800
5801 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5802 (AC_CHECK_HEADERS): Remove malloc.h.
5803 * configure: Re-generated.
5804 * config.in: Re-generated.
5805 * server.h: Don't include alloca.h and malloc.h.
5806 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5807 Don't include malloc.h.
5808
43968415
JB
58092014-11-17 Joel Brobecker <brobecker@adacore.com>
5810
5811 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5812 corresponding ERRNO check in same block.
5813
40e91bc7
PA
58142014-11-12 Pedro Alves <palves@redhat.com>
5815
5816 * server.c (cont_thread): Update comment.
5817 (start_inferior, attach_inferior): No longer clear cont_thread.
5818 (handle_v_cont): No longer set cont_thread.
5819 (captured_main): Clear cont_thread each time a GDB connects.
5820
c2c118cf
PA
58212014-11-12 Pedro Alves <palves@redhat.com>
5822
5823 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5824 thread, and don't resume all threads if the Hc thread has exited.
5825
78708b7c
PA
58262014-11-12 Pedro Alves <palves@redhat.com>
5827
5828 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5829 the process group instead of to a specific LWP.
5830
a2abc7de
PA
58312014-10-15 Pedro Alves <palves@redhat.com>
5832
5833 PR server/17487
5834 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5835 parameter.
5836 (arm_set_thread_context): Delete.
5837 (the_low_target): Adjust.
5838 * win32-i386-low.c (debug_registers_changed)
5839 (debug_registers_used): Delete.
5840 (update_debug_registers_callback): New function.
5841 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5842 needing to update their debug registers.
5843 (win32_get_current_dr): New function.
5844 (x86_dr_low_get_addr, x86_dr_low_get_control)
5845 (x86_dr_low_get_status): Fetch the debug register from the thread
5846 record's context.
5847 (i386_initial_stuff): Adjust.
5848 (i386_get_thread_context): Remove current_event parameter. Don't
5849 clear debug_registers_changed nor copy DR values to
5850 debug_reg_state.
5851 (i386_set_thread_context): Delete.
5852 (i386_prepare_to_resume): New function.
5853 (i386_thread_added): Mark the thread as needing to update irs
5854 debug registers.
5855 (the_low_target): Remove i386_set_thread_context and install
5856 i386_prepare_to_resume.
5857 * win32-low.c (win32_get_thread_context): Adjust.
5858 (win32_set_thread_context): Use SetThreadContext
5859 directly.
5860 (win32_prepare_to_resume): New function.
5861 (win32_require_context): New function, factored out from ...
5862 (thread_rec): ... this.
5863 (continue_one_thread): Call win32_prepare_to_resume on each thread
5864 we're about to continue.
5865 (win32_resume): Call win32_prepare_to_resume on the event thread.
5866 * win32-low.h (struct win32_thread_info)
5867 <debug_registers_changed>: New field.
5868 (struct win32_target_ops): Change prototype of set_thread_context,
5869 delete set_thread_context and add prepare_to_resume.
5870 (win32_require_context): New declaration.
5871
a442d071
GB
58722014-10-08 Gary Benson <gbenson@redhat.com>
5873
5874 * server.h: Do not include common-exceptions.h.
5875
6f1947e8
GB
58762014-10-08 Gary Benson <gbenson@redhat.com>
5877
5878 * server.h: Do not include cleanups.h.
5879
63b434a4
JH
58802014-09-30 James Hogan <james.hogan@imgtec.com>
5881
5882 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5883 mips64-dsp-linux.c.
5884
c4d9ceb6
YQ
58852014-09-23 Yao Qi <yao@codesourcery.com>
5886
5887 * linux-low.c (lp_status_maybe_breakpoint): New function.
5888 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5889 (count_events_callback): Likewise.
5890 (select_event_lwp_callback): Likewise.
5891 (cancel_breakpoints_callback): Likewise.
5892
89a5711c
DB
58932014-09-19 Don Breazeal <donb@codesourcery.com>
5894
5895 * linux-low.c (handle_extended_wait): Call
5896 linux_ptrace_get_extended_event.
5897 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5898 linux_is_extended_waitstatus.
5899
bffc0964
JB
59002014-09-16 Joel Brobecker <brobecker@adacore.com>
5901
5902 * Makefile.in (CPPFLAGS): Define.
5903 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5904 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5905
0bfdf32f
GB
59062014-09-16 Gary Benson <gbenson@redhat.com>
5907
5908 * inferiors.h (current_inferior): Renamed as...
5909 (current_thread): New variable. All uses updated.
5910 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5911 (maybe_move_out_of_jump_pad): Likewise.
5912 (cancel_breakpoint): Likewise.
5913 (linux_low_filter_event): Likewise.
5914 (wait_for_sigstop): Likewise.
5915 (linux_resume_one_lwp): Likewise.
5916 (need_step_over_p): Likewise.
5917 (start_step_over): Likewise.
5918 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5919 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5920 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5921 and save_inferior as saved_thread.
5922 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5923 saved_thread.
5924 (regcache_invalidate_thread): Likewise.
5925 * remote-utils.c (prepare_resume_reply): Likewise.
5926 * thread-db.c (thread_db_get_tls_address): Likewise.
5927 (disable_thread_event_reporting): Likewise.
5928 (remove_thread_event_breakpoints): Likewise.
5929 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5930 as saved_thread.
5931 * target.h (set_desired_inferior): Renamed as...
5932 (set_desired_thread): New declaration. All uses updated.
5933 * server.c (myresume): Updated comment to reference thread instead
5934 of inferior.
5935 (handle_serial_event): Likewise.
5936 (handle_target_event): Likewise.
5937
361c8ade
GB
59382014-09-12 Tom Tromey <tromey@redhat.com>
5939 Gary Benson <gbenson@redhat.com>
5940
5941 * regcache.h: Include common-regcache.h.
5942 (regcache_read_pc): Don't declare.
5943 * regcache.c (get_thread_regcache_for_ptid): New function.
5944
bd9269f7
GB
59452014-09-11 Tom Tromey <tromey@redhat.com>
5946 Gary Benson <gbenson@redhat.com>
5947
5948 * symbol.c: New file.
5949 * Makefile.in (SFILES): Add symbol.c.
5950 (OBS): Add symbol.o.
5951
f8c1d06b
GB
59522014-09-11 Gary Benson <gbenson@redhat.com>
5953
5954 * target.c (target_stop_ptid, target_continue_ptid): New
5955 functions.
5956
721ec300
GB
59572014-09-11 Tom Tromey <tromey@redhat.com>
5958 Gary Benson <gbenson@redhat.com>
5959
5960 * target.h: Include target/target.h.
5961 * target.c (target_read_memory, target_read_uint32)
5962 (target_write_memory): New functions.
5963
c5e92cca
GB
59642014-09-11 Gary Benson <gbenson@redhat.com>
5965
5966 * server.h (debug_hw_points): Don't declare.
5967 * server.c (debug_hw_points): Don't define. Replace all uses
5968 with show_debug_regs.
5969 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5970 all uses with show_debug_regs.
5971
2e4bb98a
EBM
59722014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5973
5974 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5975 endianness into account.
5976 (ppc_supply_ptrace_register): Likewise.
5977
ac740bc7
JH
59782014-09-03 James Hogan <james.hogan@imgtec.com>
5979
5980 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5981 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5982
97ea6506
GB
59832014-09-03 Gary Benson <gbenson@redhat.com>
5984
5985 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5986 ALL_DEBUG_ADDRESS_REGISTERS.
5987
df7e5265
GB
59882014-09-02 Gary Benson <gbenson@redhat.com>
5989
5990 * i386-low.h: Renamed as...
5991 * x86-low.h: New file. All type, function and variable name
5992 prefixes changed from "i386_" to "x86_". All references updated.
5993 * i386-low.c: Renamed as...
5994 * x86-low.c: New file. All type, function and variable name
5995 prefixes changed from "i386_" to "x86_". All references updated.
5996
ed859da7
GB
59972014-09-02 Gary Benson <gbenson@redhat.com>
5998
5999 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6000 (x86_linux_new_thread): Likewise.
6001
860789c7
GB
60022014-08-29 Gary Benson <gbenson@redhat.com>
6003
6004 * server.h (setjmp.h): Do not include.
6005 (toplevel): Do not declare.
6006 (common-exceptions.h): Include.
6007 (cleanups.h): Likewise.
6008 * server.c (toplevel): Do not define.
6009 (exit_code): New static global.
6010 (detach_or_kill_for_exit_cleanup): New function.
6011 (main): New function. Original main renamed to...
6012 (captured_main): New function.
6013 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6014
ff55e1b5
GB
60152014-08-29 Gary Benson <gbenson@redhat.com>
6016
6017 * Makefile.in (SFILES): Add common/common-exceptions.c.
6018 (OBS): Add common-exceptions.o.
6019 (common-exceptions.o): New rule.
6020 * utils.c (prepare_to_throw_exception): New function.
6021
e9bcb658
GB
60222014-08-29 Gary Benson <gbenson@redhat.com>
6023
6024 * config.in: Regenerate.
6025 * configure: Likewise.
6026
e3180625
GB
60272014-08-29 Gary Benson <gbenson@redhat.com>
6028
6029 * Makefile.in (SFILES): Add common/cleanups.c.
6030 (OBS): cleanups.o.
6031 (cleanups.o): New rule.
6032
e3d6ba5d
GB
60332014-08-29 Gary Benson <gbenson@redhat.com>
6034
6035 * utils.c (internal_vwarning): New function.
6036
7096e886
GB
60372014-08-28 Gary Benson <gbenson@redhat.com>
6038
6039 * utils.h (fatal): Remove declaration.
6040 * utils.c (fatal): Remove function.
6041
14ce3192
GB
60422014-08-28 Gary Benson <gbenson@redhat.com>
6043
6044 * tracepoint.c (gdb_agent_init): Replace fatal with
6045 perror_with_name.
6046 (initialize_tracepoint): Likewise.
6047
50278d59
GB
60482014-08-28 Gary Benson <gbenson@redhat.com>
6049
6050 * remote-utils.c (remote_prepare): Replace fatal with error.
6051
aa96c426
GB
60522014-08-28 Gary Benson <gbenson@redhat.com>
6053
6054 * linux-low.c (linux_async): Replace fatal with warning.
6055 Tidy up and return.
6056 (linux_start_non_stop): Return -1 if linux_async failed.
6057
f7160e97
GB
60582014-08-28 Gary Benson <gbenson@redhat.com>
6059
6060 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6061 gdb_assert.
6062 (i386_dr_low_get_addr): Remove vague comment.
6063 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6064 gdb_assert.
6065
38e08fca
GB
60662014-08-28 Gary Benson <gbenson@redhat.com>
6067
6068 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6069 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6070 internal_error.
6071 (linux_resume_one_lwp): Likewise.
6072 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6073 gdb_assert.
6074 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6075 with internal_error.
6076 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6077 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6078 (find_register_by_name): Replace fatal with internal_error.
6079 (find_regno): Likewise.
6080 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6081 * thread-db.c (thread_db_create_event): Likewise.
6082 (thread_db_load_search): Likewise.
6083 (try_thread_db_load_1): Likewise.
6084 * tracepoint.c (get_jump_space_head): Replace fatal with
6085 internal_error.
6086 (claim_trampoline_space): Likewise.
6087 (have_fast_tracepoint_trampoline_buffer): Likewise.
6088 (cmd_qtstart): Likewise.
6089 (stop_tracing): Likewise.
6090 (fast_tracepoint_collecting): Likewise.
6091 (target_malloc): Likewise.
6092 (download_tracepoint): Likewise.
6093 (download_trace_state_variables): Replace check with gdb_assert.
6094 (upload_fast_traceframes): Replace fatal with internal_error.
6095
34abf635
GB
60962014-08-19 Tom Tromey <tromey@redhat.com>
6097 Gary Benson <gbenson@redhat.com>
6098
6099 * Makefile.in (SFILES): Add common/common-debug.c.
6100 (OBS): Add common-debug.o.
6101 (common-debug.o): New rule.
6102 * debug.h (debug_printf): Don't declare.
6103 * debug.c (debug_printf): Renamed and rewritten as...
6104 (debug_vprintf): New function.
6105
f6e94d78
GB
61062014-08-19 Gary Benson <gbenson@redhat.com>
6107
6108 * utils.h: Do not include print-utils.h.
6109
9239eeab
GB
61102014-08-19 Tom Tromey <tromey@redhat.com>
6111 Gary Benson <gbenson@redhat.com>
6112
6113 * server.h: Add static assertion.
6114 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6115
ef87c8bb
GB
61162014-08-19 Tom Tromey <tromey@redhat.com>
6117 Gary Benson <gbenson@redhat.com>
6118
6119 * Makefile.in (SFILES): Add common/errors.c.
6120 (OBS): Add errors.o.
6121 (IPA_OBS): Add errors-ipa.o.
6122 (errors.o): New rule.
6123 (errors-ipa.o): Likewise.
6124 * utils.h (perror_with_name, error, warning): Don't declare.
6125 * utils.c (warning): Renamed and rewritten as...
6126 (vwarning): New function.
6127 (error): Renamed and rewritten as...
6128 (verror): New function.
6129 (internal_error): Renamed and rewritten as...
6130 (internal_verror): New function.
6131
bb974a24
GB
61322014-08-07 Gary Benson <gbenson@redhat.com>
6133
6134 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6135 * configure: Regenerate.
6136 * config.in: Likewise.
6137 * server.h: Do not include errno.h.
6138 * event-loop.c: Likewise.
6139 * hostio-errno.c: Likewise.
6140 * linux-low.c: Likewise.
6141 * remote-utils.c: Likewise.
6142 * spu-low.c: Likewise.
6143 * utils.c: Likewise.
6144 * gdbreplay.c: Unconditionally include errno.h.
6145
6d3d12eb
GB
61462014-08-07 Gary Benson <gbenson@redhat.com>
6147
6148 * server.h: Do not include string.h.
6149 * event-loop.c: Likewise.
6150 * linux-low.c: Likewise.
6151 * regcache.c: Likewise.
6152 * remote-utils.c: Likewise.
6153 * spu-low.c: Likewise.
6154 * utils.c: Likewise.
6155
dccbb609
GB
61562014-08-07 Gary Benson <gbenson@redhat.com>
6157
6158 * server.h: Do not include gdb_assert.h.
6159
e76df0d0
GB
61602014-08-07 Gary Benson <gbenson@redhat.com>
6161
6162 * server.h: Do not include common-utils.h.
6163
4cb9c816
GB
61642014-08-07 Gary Benson <gbenson@redhat.com>
6165
6166 * server.h: Do not include ptid.h.
6167 * notif.h: Likewise.
6168
3995eeee
GB
61692014-08-07 Gary Benson <gbenson@redhat.com>
6170
6171 * server.h: Do not include gdb_locale.h.
6172
cb9f1a9b
GB
61732014-08-07 Gary Benson <gbenson@redhat.com>
6174
6175 * server.h: Do not include gdb/signals.h.
6176 * win32-low.c: Likewise.
6177
a5fceff8
GB
61782014-08-07 Gary Benson <gbenson@redhat.com>
6179
6180 * server.h: Do not include pathmax.h.
6181
b9391142
GB
61822014-08-07 Gary Benson <gbenson@redhat.com>
6183
6184 * server.h: Do not include libiberty.h.
6185 * linux-bfin-low.c: Likewise.
6186
0e443c87
GB
61872014-08-07 Gary Benson <gbenson@redhat.com>
6188
6189 * server.h: Do not include ansidecl.h.
6190
8ebb3f56
GB
61912014-08-07 Gary Benson <gbenson@redhat.com>
6192
6193 * linux-x86-low.c: Do not include stddef.h.
6194 * lynx-ppc-low.c: Likewise.
6195 * tracepoint.c: Likewise.
6196
8980bdf6
GB
61972014-08-07 Gary Benson <gbenson@redhat.com>
6198
6199 * server.h: Do not include stdarg.h.
6200 * nto-low.c: Likewise.
6201
d7096f71
GB
62022014-08-07 Gary Benson <gbenson@redhat.com>
6203
6204 * server.h: Do not include stdlib.h.
6205 * inferiors.c: Likewise.
6206 * linux-low.c: Likewise.
6207 * regcache.c: Likewise.
6208 * spu-low.c: Likewise.
6209 * tracepoint.c: Likewise.
6210 * utils.c: Likewise.
6211
d02f550d
GB
62122014-08-07 Gary Benson <gbenson@redhat.com>
6213
6214 * server.h: Do not include stdio.h.
6215 * linux-low.c: Likewise.
6216 * remote-utils.c: Likewise.
6217 * spu-low.c: Likewise.
6218 * utils.c: Likewise.
6219 * wincecompat.c: Likewise.
6220
87f6c4e3
GB
62212014-08-06 Gary Benson <gbenson@redhat.com>
6222
6223 * regcache.c (init_register_cache): Move conditionals inside if.
6224
7089dca4
GB
62252014-08-06 Gary Benson <gbenson@redhat.com>
6226
6227 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6228
462f517e
GB
62292014-07-31 Gary Benson <gbenson@redhat.com>
6230
6231 * ax.h: Do not include server.h.
6232 * gdbthread.h: Likewise.
6233 * lynx-low.h: Likewise.
6234 * notif.h: Likewise.
6235
976411d6
GB
62362014-07-30 Gary Benson <gbenson@redhat.com>
6237
6238 * server.h: Include common-defs.h.
6239 Do not include config.h or build-gnulib-gdbserver/config.h.
6240
d41f6d8e
GB
62412014-07-30 Gary Benson <gbenson@redhat.com>
6242
6243 * hostio-errno.c: Move server.h to top of includes list.
6244 * inferiors.c: Likewise.
6245 * linux-x86-low.c: Likewise.
6246 * notif.c: Include server.h.
6247
314c6a35
TT
62482014-07-24 Tom Tromey <tromey@redhat.com>
6249 Gary Benson <gbenson@redhat.com>
6250
6251 * server.h (CORE_ADDR): Now unsigned.
6252
69ff6be5
PA
62532014-07-16 Pedro Alves <palves@redhat.com>
6254
6255 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6256
ce9e3fe7
PA
62572014-07-15 Pedro Alves <palves@redhat.com>
6258
6259 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6260 copy.
6261
e76126e8
PA
62622014-07-11 Pedro Alves <palves@redhat.com>
6263
6264 * linux-low.c (kill_wait_lwp): New function, based on
6265 kill_one_lwp_callback, but use my_waitpid directly.
6266 (kill_one_lwp_callback, linux_kill): Use it.
6267
8e9db26e
PA
62682014-06-23 Pedro Alves <palves@redhat.com>
6269
6270 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6271 before setting DR0..DR3.
6272
698b3e08
GB
62732014-06-20 Gary Benson <gbenson@redhat.com>
6274
6275 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6276 * configure: Regenerated.
6277 * config.in: Likewise.
6278
125f8a3d
GB
62792014-06-20 Gary Benson <gbenson@redhat.com>
6280
6281 * Makefile.in (SFILES): Update locations for files moved
6282 from common to nat.
6283 (object file files): Reordered.
6284
42995dbd
GB
62852014-06-20 Gary Benson <gbenson@redhat.com>
6286
6287 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6288 (i386_dr_low_set_addr): Likewise.
6289 (i386_dr_low_get_addr): Likewise.
6290 (i386_dr_low_can_set_control): Likewise.
6291 (i386_dr_low_set_control): Likewise.
6292 (i386_dr_low_get_control): Likewise.
6293 (i386_dr_low_get_status): Likewise.
6294 (i386_get_debug_register_length): Likewise.
6295 * linux-x86-low.c (i386_dr_low_set_addr):
6296 Changed signature. Made static.
6297 (i386_dr_low_get_addr): Likewise.
6298 (i386_dr_low_set_control): Likewise.
6299 (i386_dr_low_get_control): Likewise.
6300 (i386_dr_low_get_status): Likewise.
6301 (i386_dr_low): New global variable.
6302 * win32-i386-low.c (i386_dr_low_set_addr):
6303 Changed signature. Made static.
6304 (i386_dr_low_get_addr): Likewise.
6305 (i386_dr_low_set_control): Likewise.
6306 (i386_dr_low_get_control): Likewise.
6307 (i386_dr_low_get_status): Likewise.
6308 (i386_dr_low): New global variable.
6309
e1d2394b
MS
63102014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6311
6312 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6313 * Makefile.in (AR, AR_FLAGS): Define.
6314 * configure: Regenerate.
6315
3a8ee006
GB
63162014-06-19 Gary Benson <gbenson@redhat.com>
6317
6318 * Makefile.in (i386-dregs.o): New rule.
6319 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6320 * i386-low.c (target.h): Remove include.
6321 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6322 (DR_CONTROL_SHIFT): Likewise.
6323 (DR_CONTROL_SIZE): Likewise.
6324 (DR_RW_EXECUTE): Likewise.
6325 (DR_RW_WRITE): Likewise.
6326 (DR_RW_READ): Likewise.
6327 (DR_RW_IORW): Likewise.
6328 (DR_LEN_1): Likewise.
6329 (DR_LEN_2): Likewise.
6330 (DR_LEN_4): Likewise.
6331 (DR_LEN_8): Likewise.
6332 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6333 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6334 (DR_ENABLE_SIZE): Likewise.
6335 (DR_LOCAL_SLOWDOWN): Likewise.
6336 (DR_GLOBAL_SLOWDOWN): Likewise.
6337 (DR_CONTROL_RESERVED): Likewise.
6338 (I386_DR_CONTROL_MASK): Likewise.
6339 (I386_DR_VACANT): Likewise.
6340 (I386_DR_LOCAL_ENABLE): Likewise.
6341 (I386_DR_GLOBAL_ENABLE): Likewise.
6342 (I386_DR_DISABLE): Likewise.
6343 (I386_DR_SET_RW_LEN): Likewise.
6344 (I386_DR_GET_RW_LEN): Likewise.
6345 (I386_DR_WATCH_HIT): Likewise.
6346 (i386_wp_op_t): Likewise.
6347 (i386_show_dr): Likewise.
6348 (i386_length_and_rw_bits): Likewise.
6349 (i386_insert_aligned_watchpoint): Likewise.
6350 (i386_remove_aligned_watchpoint): Likewise.
6351 (i386_handle_nonaligned_watchpoint): Likewise.
6352 i386_update_inferior_debug_regs(): Likewise.
6353 (i386_dr_insert_watchpoint): Likewise.
6354 (i386_dr_remove_watchpoint): Likewise.
6355 (i386_dr_region_ok_for_watchpoint): Likewise.
6356 (i386_dr_stopped_data_address): Likewise.
6357 (i386_dr_stopped_by_watchpoint): Likewise.
6358
8f26655c
GB
63592014-06-19 Gary Benson <gbenson@redhat.com>
6360
6361 * i386-low.c (i386_dr_show): Renamed to
6362 i386_show_dr and made static. All uses updated.
6363 (i386_dr_length_and_rw_bits): Renamed to
6364 i386_length_and_rw_bits and made static.
6365 All uses updated.
6366 (i386_dr_insert_aligned_watchpoint): Renamed to
6367 i386_insert_aligned_watchpoint and made static.
6368 All uses updated.
6369 (i386_dr_remove_aligned_watchpoint): Renamed to
6370 i386_remove_aligned_watchpoint and made static.
6371 All uses updated.
6372 (i386_dr_update_inferior_debug_regs): Renamed to
6373 i386_update_inferior_debug_regs and made static.
6374 All uses updated.
6375
b9228891
GB
63762014-06-18 Gary Benson <gbenson@redhat.com>
6377
5171def3
GB
6378 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6379 (i386_dr_low_can_set_control): Likewise.
6380 (i386_get_debug_register_length): Likewise.
6381 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6382 (i386_dr_low_can_set_control): Likewise.
6383 (i386_get_debug_register_length): Likewise.
6384
63852014-06-17 Gary Benson <gbenson@redhat.com>
6386
b9228891
GB
6387 * i386-low.h (i386-dregs.h): New include.
6388 (DR_FIRSTADDR): Now in i386-dregs.h.
6389 (DR_LASTADDR): Likewise.
6390 (DR_NADDR): Likewise.
6391 (DR_STATUS): Likewise.
6392 (DR_CONTROL): Likewise.
6393 (i386_debug_reg_state): Likewise.
6394 (i386_dr_insert_watchpoint): Likewise.
6395 (i386_dr_remove_watchpoint): Likewise.
6396 (i386_dr_region_ok_for_watchpoint): Likewise.
6397 (i386_dr_stopped_data_address): Likewise.
6398 (i386_dr_stopped_by_watchpoint): Likewise.
6399 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6400
4be83cc2
GB
64012014-06-18 Gary Benson <gbenson@redhat.com>
6402
6403 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6404 i386_dr_insert_watchpoint.
6405 (i386_low_remove_watchpoint): Renamed to
6406 i386_dr_remove_watchpoint.
6407 (i386_low_region_ok_for_watchpoint): Renamed to
6408 i386_dr_region_ok_for_watchpoint.
6409 (i386_low_stopped_data_address): Renamed to
6410 i386_dr_stopped_data_address.
6411 (i386_low_stopped_by_watchpoint): Renamed to
6412 i386_dr_stopped_by_watchpoint.
6413 * i386-low.c (i386_show_dr): Renamed to
6414 i386_dr_show and made nonstatic. All uses updated.
6415 (i386_length_and_rw_bits): Renamed to
6416 i386_dr_length_and_rw_bits and made nonstatic.
6417 All uses updated.
6418 (i386_insert_aligned_watchpoint): Renamed to
6419 i386_dr_insert_aligned_watchpoint and made nonstatic.
6420 All uses updated.
6421 (i386_remove_aligned_watchpoint): Renamed to
6422 i386_dr_remove_aligned_watchpoint and made nonstatic.
6423 All uses updated.
6424 (i386_update_inferior_debug_regs): Renamed to
6425 i386_dr_update_inferior_debug_regs and made nonstatic.
6426 All uses updated.
6427 (i386_low_insert_watchpoint): Renamed to
6428 i386_dr_insert_watchpoint. All uses updated.
6429 (i386_low_remove_watchpoint): Renamed to
6430 i386_dr_remove_watchpoint. All uses updated.
6431 (i386_low_region_ok_for_watchpoint): Renamed to
6432 i386_dr_region_ok_for_watchpoint. All uses updated.
6433 (i386_low_stopped_data_address): Renamed to
6434 i386_dr_stopped_data_address. All uses updated.
6435 (i386_low_stopped_by_watchpoint): Renamed to
6436 i386_dr_stopped_by_watchpoint. All uses updated.
6437
131aa0d4
GB
64382014-06-18 Gary Benson <gbenson@redhat.com>
6439
6440 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6441 (i386_dr_low_can_set_control): Likewise.
6442 (i386_insert_aligned_watchpoint): New check.
6443
d9305f7f
GB
64442014-06-18 Gary Benson <gbenson@redhat.com>
6445
6446 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6447 Renamed to state.
6448
e927c9fc
GB
64492014-06-18 Gary Benson <gbenson@redhat.com>
6450
6451 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6452 instead of fatal and error.
6453 (i386_handle_nonaligned_watchpoint): Likewise.
6454
1b6d4134
GB
64552014-06-18 Gary Benson <gbenson@redhat.com>
6456
6457 * i386-low.c (i386_get_debug_register_length): New macro.
6458 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6459 (i386_show_dr): Use debug_printf instead of fprintf. Use
6460 phex to format values.
6461
6e62758f
GB
64622014-06-18 Gary Benson <gbenson@redhat.com>
6463
6464 * i386-low.h: Comment changes.
6465 * i386-low.c: Likewise.
6466
fc6e2f03
GB
64672014-06-18 Gary Benson <gbenson@redhat.com>
6468
6469 * i386-low.c: Whitespace changes.
6470
f9d1eeed
TT
64712014-06-12 Tom Tromey <tromey@redhat.com>
6472
6473 * utils.c (freeargv): Remove.
6474
0b04e523
TT
64752014-06-12 Tom Tromey <tromey@redhat.com>
6476
6477 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6478 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6479 (parse_debug_format_options): Likewise.
6480 (gdbserver_usage): Likewise.
6481 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6482 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6483 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6484 against libiberty.
6485 ($(LIBGNU)): Depend on libiberty.
6486 (all-lib): Recurse into all subdirs.
6487 (install-only): Invoke "install" target in subdirs.
6488 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6489 targets.
6490 * configure: Rebuild.
6491 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6492 for vasprintf, vsnprintf, or gettimeofday.
6493 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6494 srv_tgtobj.
6495
270c9937
JB
64962014-06-05 Joel Brobecker <brobecker@adacore.com>
6497
6498 * development.sh: Delete.
6499 * Makefile.in (config.status): Adjust dependency on development.sh.
6500 * configure.ac: Adjust development.sh source call.
6501 * configure: Regenerate.
6502
0a261ed8
PA
65032014-06-02 Pedro Alves <palves@redhat.com>
6504
6505 * ax.c (gdb_free_agent_expr): New function.
6506 * ax.h (gdb_free_agent_expr): New declaration.
6507 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6508 list.
6509 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6510 static.
6511 (clear_breakpoint_conditions_and_commands): New function.
6512 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6513 (clear_breakpoint_conditions_and_commands): New declaration.
6514
e9dae05e
RR
65152014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6516
6517 * linux-aarch64-low.c (asm/ptrace.h): Include.
6518
5876f503
JK
65192014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6520
6521 Fix TLS access for -static -pthread.
6522 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6523 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6524 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6525
802e8e6d
PA
65262014-05-20 Pedro Alves <palves@redhat.com>
6527
6528 * linux-aarch64-low.c (aarch64_insert_point)
6529 (aarch64_remove_point): No longer check whether the type is
6530 supported here. Adjust to new interface.
6531 (the_low_target): Install aarch64_supports_z_point_type as
6532 supports_z_point_type method.
6533 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6534 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6535 instead of a Z packet char. Adjust.
6536 (arm_supports_z_point_type): New function.
6537 (arm_insert_point, arm_remove_point): Adjust to new interface.
6538 (the_low_target): Install arm_supports_z_point_type.
6539 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6540 (cris_insert_point, cris_remove_point): Adjust to new interface.
6541 Don't check whether the type is supported here.
6542 (the_low_target): Install cris_supports_z_point_type.
6543 * linux-low.c (linux_supports_z_point_type): New function.
6544 (linux_insert_point, linux_remove_point): Adjust to new interface.
6545 * linux-low.h (struct linux_target_ops) <insert_point,
6546 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6547 raw_breakpoint pointer parameter.
6548 <supports_z_point_type>: New method.
6549 * linux-mips-low.c (mips_supports_z_point_type): New function.
6550 (mips_insert_point, mips_remove_point): Adjust to new interface.
6551 Use mips_supports_z_point_type.
6552 (the_low_target): Install mips_supports_z_point_type.
6553 * linux-ppc-low.c (the_low_target): Install NULL as
6554 supports_z_point_type method.
6555 * linux-s390-low.c (the_low_target): Install NULL as
6556 supports_z_point_type method.
6557 * linux-sparc-low.c (the_low_target): Install NULL as
6558 supports_z_point_type method.
6559 * linux-x86-low.c (x86_supports_z_point_type): New function.
6560 (x86_insert_point): Adjust to new insert_point interface. Use
6561 insert_memory_breakpoint. Adjust to new
6562 i386_low_insert_watchpoint interface.
6563 (x86_remove_point): Adjust to remove_point interface. Use
6564 remove_memory_breakpoint. Adjust to new
6565 i386_low_remove_watchpoint interface.
6566 (the_low_target): Install x86_supports_z_point_type.
6567 * lynx-low.c (lynx_target_ops): Install NULL as
6568 supports_z_point_type callback.
6569 * nto-low.c (nto_supports_z_point_type): New.
6570 (nto_insert_point, nto_remove_point): Adjust to new interface.
6571 (nto_target_ops): Install nto_supports_z_point_type.
6572 * mem-break.c: Adjust intro comment.
6573 (struct raw_breakpoint) <raw_type, size>: New fields.
6574 <inserted>: Update comment.
6575 <shlib_disabled>: Delete field.
6576 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6577 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6578 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6579 (raw_bkpt_type_to_target_hw_bp_type): New function.
6580 (find_enabled_raw_code_breakpoint_at): New function.
6581 (find_raw_breakpoint_at): New type and size parameters. Use them.
6582 (insert_memory_breakpoint): New function, based off
6583 set_raw_breakpoint_at.
6584 (remove_memory_breakpoint): New function.
6585 (set_raw_breakpoint_at): Reimplement.
6586 (set_breakpoint): New, based on set_breakpoint_at.
6587 (set_breakpoint_at): Reimplement.
6588 (delete_raw_breakpoint): Go through the_target->remove_point
6589 instead of assuming memory breakpoints.
6590 (find_gdb_breakpoint_at): Delete.
6591 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6592 (find_gdb_breakpoint): New function.
6593 (set_gdb_breakpoint_at): Delete.
6594 (z_type_supported): New function.
6595 (set_gdb_breakpoint_1): New function, loosely based off
6596 set_gdb_breakpoint_at.
6597 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6598 (delete_gdb_breakpoint_at): Delete.
6599 (delete_gdb_breakpoint_1): New function, loosely based off
6600 delete_gdb_breakpoint_at.
6601 (delete_gdb_breakpoint): New function.
6602 (clear_gdb_breakpoint_conditions): Rename to ...
6603 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6604 breakpoint.
6605 (add_condition_to_breakpoint): Make static.
6606 (add_breakpoint_condition): Take a struct breakpoint pointer
6607 instead of an address. Adjust.
6608 (gdb_condition_true_at_breakpoint): Rename to ...
6609 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6610 z_type parameter.
6611 (gdb_condition_true_at_breakpoint): Reimplement.
6612 (add_breakpoint_commands): Take a struct breakpoint pointer
6613 instead of an address. Adjust.
6614 (gdb_no_commands_at_breakpoint): Rename to ...
6615 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6616 parameter. Return true if no breakpoint was found. Change debug
6617 output.
6618 (gdb_no_commands_at_breakpoint): Reimplement.
6619 (run_breakpoint_commands): Rename to ...
6620 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6621 and change return type to boolean.
6622 (run_breakpoint_commands): New function.
6623 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6624 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6625 breakpoint. Go through the_target->remove_point instead of
6626 assuming memory breakpoint.
6627 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6628 software and hardware breakpoints.
6629 (reinsert_raw_breakpoint): Go through the_target->insert_point
6630 instead of assuming memory breakpoint.
6631 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6632 software and hardware breakpoints.
6633 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6634 Check both software and hardware breakpoints.
6635 (validate_inserted_breakpoint): Assert the breakpoint is a
6636 software breakpoint. Set the inserted flag to -1 instead of
6637 setting shlib_disabled.
6638 (delete_disabled_breakpoints): Adjust.
6639 (validate_breakpoints): Only validate software breakpoints.
6640 Adjust to inserted flag change.
6641 (check_mem_read, check_mem_write): Skip breakpoint types other
6642 than software breakpoints. Adjust to inserted flag change.
6643 * mem-break.h (enum raw_bkpt_type): New enum.
6644 (raw_breakpoint, struct process_info): Forward declare.
6645 (Z_packet_to_target_hw_bp_type): Delete declaration.
6646 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6647 (set_gdb_breakpoint, delete_gdb_breakpoint)
6648 (clear_breakpoint_conditions): New declarations.
6649 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6650 (breakpoint_inserted_here): Update comment.
6651 (add_breakpoint_condition, add_breakpoint_commands): Replace
6652 address parameter with a breakpoint pointer parameter.
6653 (gdb_breakpoint_here): Update comment.
6654 (delete_gdb_breakpoint_at): Delete.
6655 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6656 * server.c (process_point_options): Take a struct breakpoint
6657 pointer instead of an address. Adjust.
6658 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6659 delete_gdb_breakpoint.
6660 * spu-low.c (spu_target_ops): Install NULL as
6661 supports_z_point_type method.
6662 * target.h: Include mem-break.h.
6663 (struct target_ops) <prepare_to_access_memory>: Update comment.
6664 <supports_z_point_type>: New field.
6665 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6666 instead of a char. Also take a raw breakpoint pointer.
6667 * win32-arm-low.c (the_low_target): Install NULL as
6668 supports_z_point_type.
6669 * win32-i386-low.c (i386_supports_z_point_type): New function.
6670 (i386_insert_point, i386_remove_point): Adjust to new interface.
6671 (the_low_target): Install i386_supports_z_point_type.
6672 * win32-low.c (win32_supports_z_point_type): New function.
6673 (win32_insert_point, win32_remove_point): Adjust to new interface.
6674 (win32_target_ops): Install win32_supports_z_point_type.
6675 * win32-low.h (struct win32_target_ops):
6676 <supports_z_point_type>: New method.
6677 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6678 instead of a char. Also take a raw breakpoint pointer.
6679
932539e3
PA
66802014-05-20 Pedro Alves <palves@redhat.com>
6681
6682 * mem-break.h: Include break-common.h.
6683 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6684 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6685 (Z_packet_to_target_hw_bp_type): New declaration.
6686 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6687 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6688 (Z_PACKET_ACCESS_WP): Delete macros.
6689 (Z_packet_to_hw_type): Delete function.
6690 * i386-low.h: Don't include break-common.h here.
6691 (Z_packet_to_hw_type): Delete declaration.
6692 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6693 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6694 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6695 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6696 * linux-aarch64-low.c: Don't include break-common.h here.
6697 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6698 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6699 (Z_packet_to_target_hw_bp_type): Delete function.
6700 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6701 function.
6702 (mips_insert_point, mips_remove_point): Use
6703 Z_packet_to_target_hw_bp_type.
6704
4ff0d3d8
PA
67052014-05-20 Pedro Alves <palves@redhat.com>
6706
6707 * linux-aarch64-low.c: Include break-common.h.
6708 (enum target_point_type): Delete.
6709 (Z_packet_to_point_type): Rename to ...
6710 (Z_packet_to_target_hw_bp_type): ... this, and return a
6711 target_hw_bp_type instead.
6712 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6713 instead of an enum target_point_type.
6714 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6715 breakpoint type.
6716 (aarch64_dr_state_insert_one_point)
6717 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6718 (aarch64_handle_aligned_watchpoint)
6719 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6720 Take an enum target_hw_bp_type instead of an enum
6721 target_point_type.
6722 (aarch64_supports_z_point_type): New function.
6723 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6724 use Z_packet_to_target_hw_bp_type.
6725
786dc519
JB
67262014-05-20 Joel Brobecker <brobecker@adacore.com>
6727
6728 * configure.ac: Only use -Werror by default when DEVELOPMENT
6729 is true.
6730 * configure: Regenerate.
6731
9e0aa64f
JK
67322014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6733
6734 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6735 * linux-x86-low.c (X86_64_USER_REGS): New.
6736 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6737
2b577b92
YQ
67382014-04-28 Yao Qi <yao@codesourcery.com>
6739
6740 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6741 name.
6742
94611da2
PA
67432014-04-25 Pedro Alves <palves@redhat.com>
6744
6745 PR server/16255
6746 * linux-low.c (linux_attach_fail_reason_string): New function.
6747 (linux_attach_lwp): Delete.
6748 (linux_attach_lwp_1): Rename to ...
6749 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6750 argument. Remove "initial" parameter. Return int instead of
6751 void. Don't error or warn here.
6752 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6753 failure to attach to the tgid. Call warning when failing to
6754 attach to an lwp.
6755 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6756 argument. Remove "initial" parameter. Return int instead of
6757 void. Don't error or warn here.
6758 (linux_attach_fail_reason_string): New declaration.
6759 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6760 interface change. Use linux_attach_fail_reason_string.
6761
01f9f808
MS
67622014-04-24 Michael Sturm <michael.sturm@mintel.com>
6763 Walfred Tedeschi <walfred.tedeschi@intel.com>
6764
6765 * Makefile.in: Added rules to handle new files
6766 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6767 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6768 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6769 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6770 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6771 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6772 x32-avx512-linux.o.
6773 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6774 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6775 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6776 i386/x32-avx512.xml.
6777 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6778 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6779 i386/x32-avx512-linux.xml.
6780 * i387-fp.c (num_avx512_k_registers): New constant for number
6781 of K registers.
6782 (num_avx512_zmmh_low_registers): New constant for number of
6783 lower ZMM registers (0-15).
6784 (num_avx512_zmmh_high_registers): New constant for number of
6785 higher ZMM registers (16-31).
6786 (num_avx512_ymmh_registers): New contant for number of higher
6787 YMM registers (ymm16-31 added by avx521 on x86_64).
6788 (num_avx512_xmm_registers): New constant for number of higher
6789 XMM registers (xmm16-31 added by AVX512 on x86_64).
6790 (struct i387_xsave): Add space for AVX512 registers.
6791 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6792 Add code to handle AVX512 registers.
6793 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6794 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6795 prototypei from generated file.
6796 (tdesc_amd64_avx512_linux): Likewise.
6797 (init_registers_x32_avx512_linux): Likewise.
6798 (tdesc_x32_avx512_linux): Likewise.
6799 (init_registers_i386_avx512_linux): Likewise.
6800 (tdesc_i386_avx512_linux): Likewise.
6801 (x86_64_regmap): Add AVX512 registers.
6802 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6803 mask.
6804 (initialize_low_arch): Add code to initialize AVX512 registers.
6805
51aa91f9
PA
68062014-04-23 Pedro Alves <palves@redhat.com>
6807
6808 * mem-break.c (find_gdb_breakpoint_at): Make static.
6809 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6810
a4165e94
PA
68112014-04-23 Pedro Alves <palves@redhat.com>
6812
6813 * i386-low.c: Don't include break-common.h here.
6814 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6815 prototype to take target_hw_bp_type as argument instead of a Z
6816 packet char.
6817 * i386-low.h: Include break-common.h here.
6818 (Z_packet_to_hw_type): Declare.
6819 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6820 prototypes.
6821 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6822 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6823 (x86_remove_point): Convert the packet number to a
6824 target_hw_bp_type before calling i386_low_remove_watchpoint.
6825 * win32-i386-low.c (i386_insert_point): Convert the packet number
6826 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6827 (i386_remove_point): Convert the packet number to a
6828 target_hw_bp_type before calling i386_low_remove_watchpoint.
6829
b8acf843
PA
68302014-04-23 Pedro Alves <palves@redhat.com>
6831
6832 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6833
d708bcd1
PA
68342014-04-10 Pedro Alves <palves@redhat.com>
6835
6836 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6837 Check if the condition or command is NULL before checking if the
6838 breakpoint is known. On success, return true.
6839 * mem-break.h (add_breakpoint_condition): Document return.
6840 (add_breakpoint_commands): Add describing comment.
6841 * server.c (skip_to_semicolon): New function.
6842 (process_point_options): Use it.
6843
2eec7d5b
PA
68442014-04-09 Pedro Alves <palves@redhat.com>
6845
6846 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6847 to lwpid_of.
6848
fa96cb38
PA
68492014-02-27 Pedro Alves <palves@redhat.com>
6850
6851 PR 12702
6852 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6853 macros.
6854 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6855 output.
6856 (last_thread_of_process_p): Take a PID argument instead of a
6857 thread pointer.
6858 (linux_wait_for_lwp): Delete.
6859 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6860 functions.
6861 (linux_low_filter_event): New function, party factored out from
6862 linux_wait_for_event.
6863 (linux_wait_for_event): Rename to ...
6864 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6865 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6866 sigsuspend. Check for zombie leaders.
6867 (linux_wait_for_event): Reimplement as wrapper around
6868 linux_wait_for_event_filtered.
6869 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6870 a normal or signal exit is seen, it's the whole process exiting.
6871 (wait_for_sigstop): No longer a for_each_inferior callback.
6872 Rewrite on top of linux_wait_for_event_filtered.
6873 (stop_all_lwps): Call wait_for_sigstop directly.
6874 * server.c (resume, handle_target_event): Handle
6875 TARGET_WAITKIND_NO_RESUMED.
6876
d763de10
JB
68772014-02-26 Joel Brobecker <brobecker@adacore.com>
6878
6879 * win32-low.c (psapi_get_dll_name,
6880 * win32_CreateToolhelp32Snapshot): Delete.
6881 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6882 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6883 Delete.
6884 (handle_load_dll): Add function description.
6885 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6886
850a0f76
JB
68872014-02-26 Joel Brobecker <brobecker@adacore.com>
6888
6889 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6890 Add comment.
6891 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6892 base address when calling win32_add_one_solib.
6893 (handle_load_dll): Delete local variable load_addr.
6894 Remove 0x1000 offset applied to DLL base address when calling
6895 win32_add_one_solib.
6896 (handle_unload_dll): Add comment.
6897
f25b3fc3
JB
68982014-02-26 Joel Brobecker <brobecker@adacore.com>
6899
6900 * win32-low.c (win32_add_all_dlls): Renames
6901 win32_ensure_ntdll_loaded. Rewrite function documentation.
6902 Adjust implementation to always load all DLLs.
6903 Add 0x1000 offset to DLL base address when calling
6904 win32_add_one_solib.
6905 (child_initialization_done): New static global.
6906 (do_initial_child_stuff): Set child_initialization_done to
6907 zero during child initialization, and 1 after. Replace call
6908 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6909 Add comment.
6910 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6911 (handle_unload_dll): Add function documentation.
6912 (get_child_debug_event): Ignore load and unload DLL events
6913 during child initialization.
6914
d86d4aaf
DE
69152014-02-20 Doug Evans <dje@google.com>
6916
3bc32da3 6917 Remove global all_lwps.
d86d4aaf
DE
6918 * inferiors.h (ptid_of): Move here from linux-low.h.
6919 (pid_of, lwpid_of): Ditto.
6920 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6921 parameter is a struct thread_info * now.
6922 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6923 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6924 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6925 directly.
6926 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6927 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6928 * linux-arm-low.c (update_registers_callback): Update, "entry"
6929 parameter is a struct thread_info * now.
6930 Fetch lwpid from current_inferior directly.
6931 (arm_insert_point): Pass &all_threads to find_inferior instead of
6932 &all_lwps.
6933 (arm_remove_point): Ditto.
6934 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6935 (arm_prepare_to_resume): Fetch pid from thread.
6936 (arm_read_description): Fetch lwpid from current_inferior directly.
6937 * linux-low.c (all_lwps): Delete.
6938 (delete_lwp): Delete call to remove_inferior.
6939 (handle_extended_wait): Fetch lwpid from thread.
6940 (add_lwp): Don't set lwp->entry.id. Remove call to
6941 add_inferior_to_list.
6942 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6943 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6944 (kill_one_lwp_callback): Ditto.
6945 (linux_kill): Don't dereference NULL pointer.
6946 Fetch ptid,lwpid from thread.
6947 (get_detach_signal): Fetch ptid from thread.
6948 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6949 Simplify call to regcache_invalidate_thread.
6950 (delete_lwp_callback): Update, "entry" parameter is a
6951 struct thread_info * now. Fetch pid from thread.
6952 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6953 (status_pending_p_callback): Update, "entry" parameter is a
6954 struct thread_info * now. Fetch ptid from thread.
6955 (find_lwp_pid): Update, "entry" parameter is a
6956 struct thread_info * now.
6957 (linux_wait_for_lwp): Fetch pid from thread.
6958 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6959 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6960 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6961 (dequeue_one_deferred_signal): Ditto.
6962 (cancel_breakpoint): Fetch ptid from current_inferior.
6963 (linux_wait_for_event): Pass &all_threads to find_inferior,
6964 not &all_lwps. Fetch ptid, lwpid from thread.
6965 (count_events_callback): Update, "entry" parameter is a
6966 struct thread_info * now.
6967 (select_singlestep_lwp_callback): Ditto.
6968 (select_event_lwp_callback): Ditto.
6969 (cancel_breakpoints_callback): Ditto.
6970 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6971 not &all_lwps.
6972 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6973 (unsuspend_one_lwp): Update, "entry" parameter is a
6974 struct thread_info * now.
6975 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6976 not &all_lwps.
6977 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6978 Fetch lwpid from thread, not lwp.
6979 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6980 Pass &all_threads to find_inferior, not &all_lwps.
6981 (send_sigstop): Fetch lwpid from thread, not lwp.
6982 (send_sigstop_callback): Update, "entry" parameter is a
6983 struct thread_info * now.
6984 (suspend_and_send_sigstop_callback): Ditto.
6985 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6986 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6987 struct thread_info * now.
6988 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6989 from thread, lwp.
6990 (lwp_running): Update, "entry" parameter is a
6991 struct thread_info * now.
6992 (stop_all_lwps): Fetch ptid from thread.
6993 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6994 (linux_resume_one_lwp): Fetch lwpid from thread.
6995 (linux_set_resume_request): Update, "entry" parameter is a
6996 struct thread_info * now. Fetch pid, lwpid from thread.
6997 (resume_status_pending_p): Update, "entry" parameter is a
6998 struct thread_info * now.
6999 (need_step_over_p): Ditto. Fetch lwpid from thread.
7000 (start_step_over): Fetch lwpid from thread.
7001 (linux_resume_one_thread): Update, "entry" parameter is a
7002 struct thread_info * now. Fetch lwpid from thread.
7003 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7004 (proceed_one_lwp): Update, "entry" parameter is a
7005 struct thread_info * now. Fetch lwpid from thread.
7006 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7007 struct thread_info * now.
7008 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7009 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7010 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7011 directly.
7012 (regsets_store_inferior_registers): Ditto.
7013 (fetch_register, store_register): Ditto.
7014 (linux_read_memory, linux_write_memory): Ditto.
7015 (linux_request_interrupt): Ditto.
7016 (linux_read_auxv): Ditto.
7017 (linux_xfer_siginfo): Ditto.
7018 (linux_qxfer_spu): Ditto.
7019 (linux_qxfer_libraries_svr4): Ditto.
7020 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7021 moved to inferiors.h.
7022 (get_lwp): Delete.
7023 (get_thread_lwp): Update.
7024 (struct lwp_info): Delete member "entry". Simplify comment for
7025 member "thread".
7026 (all_lwps): Delete.
7027 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7028 current_inferior directly.
7029 (update_watch_registers_callback): Update, "entry" parameter is a
7030 struct thread_info * now. Fetch pid from thread.
7031 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7032 (mips_insert_point): Fetch lwpid from current_inferior.
7033 Pass &all_threads to find_inferior, not &all_lwps.
7034 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7035 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7036 directly.
7037 (mips_stopped_data_address): Ditto.
7038 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7039 directly.
7040 * linux-tile-low.c (tile_arch_setup): Ditto.
7041 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7042 (update_debug_registers_callback): Update, "entry" parameter is a
7043 struct thread_info * now. Fetch pid from thread.
7044 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7045 Pass &all_threads to find_inferior, not &all_lwps.
7046 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7047 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7048 Pass &all_threads to find_inferior, not &all_lwps.
7049 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7050 (i386_dr_low_get_status): Ditto.
7051 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7052 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7053 (x86_linux_read_description): Ditto.
7054 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7055
3b8361aa
DE
70562014-02-20 Doug Evans <dje@google.com>
7057
7058 * inferiors.c (get_first_inferior): Fix buglet.
7059
f7667f0d
DE
70602014-02-19 Doug Evans <dje@google.com>
7061
7062 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7063 * inferiors.c (add_thread): Change result type to struct thread_info *.
7064 All callers updated.
7065 (add_lwp): Call add_thread here instead of in callers.
7066 All callers updated.
7067 * linux-low.h (get_lwp_thread): Rewrite.
7068 (struct lwp_info): New member "thread".
7069
b3312d80
DE
70702014-02-19 Doug Evans <dje@google.com>
7071
7072 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7073 All callers updated.
7074
ecc6f45c
DE
70752014-02-19 Doug Evans <dje@google.com>
7076
7077 * inferiors.c (add_thread): Fix whitespace.
7078
649ebbca
DE
70792014-02-19 Doug Evans <dje@google.com>
7080
7081 * dll.c (clear_dlls): Replace accessing list implemention details
7082 with API function.
7083 * gdbthread.h (get_first_thread): Declare.
7084 * inferiors.c (for_each_inferior_with_data): New function.
7085 (get_first_thread): New function.
7086 (find_thread_ptid): Simplify.
7087 (get_first_inferior): New function.
7088 (clear_list): Delete.
7089 (one_inferior_p): New function.
7090 (clear_inferior_list): New function.
7091 (clear_inferiors): Update.
7092 * inferiors.h (for_each_inferior_with_data): Declare.
7093 (clear_inferior_list): Declare.
7094 (one_inferior_p): Declare.
7095 (get_first_inferior): Declare.
7096 * linux-low.c (linux_wait_for_event): Replace accessing list
7097 implemention details with API function.
7098 * server.c (target_running): Ditto.
7099 (accumulate_file_name_length): New function.
7100 (emit_dll_description): New function.
7101 (handle_qxfer_libraries): Replace accessing list implemention
7102 details with API function.
7103 (handle_qxfer_threads_worker): New function.
7104 (handle_qxfer_threads_proper): Replace accessing list implemention
7105 details with API function.
7106 (handle_query): Ditto.
7107 (visit_actioned_threads_callback_ftype): New typedef.
7108 (visit_actioned_threads_data): New struct.
7109 (visit_actioned_threads): Rewrite to be find_inferior callback.
7110 (resume): Call find_inferior.
7111 (handle_status): Replace accessing list implemention
7112 details with API function.
7113 (process_serial_event): Replace accessing list implemention details
7114 with API function.
7115 * target.c (set_desired_inferior): Replace accessing list implemention
7116 details with API function.
7117 * tracepoint.c (same_process_p): New function.
7118 (gdb_agent_about_to_close): Replace accessing list implemention
7119 details with API function.
7120 * win32-low.c (child_delete_thread): Replace accessing list
7121 implemention details with API function.
7122 (match_dll_by_basename): New function.
7123 (dll_is_loaded_by_basename): New function.
7124 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7125 details call to dll_is_loaded_by_basename.
7126
80894984
DE
71272014-02-19 Doug Evans <dje@google.com>
7128
7129 * dll.h (struct dll_info): Add comment.
7130 * gdbthread.h (struct thread_info): Add comment.
7131 (current_ptid): Simplify.
7132 * inferiors.c (add_process): Update.
7133 (remove_process): Update.
7134 * inferiors.h (struct process_info): Rename member "head" to "entry".
7135 * linux-low.c (delete_lwp): Update.
7136 (add_lwp): Update.
7137 (last_thread_of_process_p): Update.
7138 (kill_one_lwp_callback, linux_kill): Update.
7139 (status_pending_p_callback): Update.
7140 (wait_for_sigstop): Update. Simplify read of ptid.
7141 (start_step_over): Update.
7142 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7143 (get_lwp_thread): Update.
7144 (struct lwp_info): Rename member "head" to "entry".
7145 * regcache.h (inferior_list_entry): Delete.
7146 * server.c (kill_inferior_callback): Update.
7147 (detach_or_kill_inferior_callback): Update.
7148 (print_started_pid): Update.
7149 (print_attached_pid): Update.
7150 (process_serial_event): Simplify read of ptid.
7151 * thread-db.c (thread_db_create_event): Update.
7152 (thread_db_get_tls_address): Update.
7153 * win32-low.c (current_inferior_ptid): Simplify.
7154
46917d26
TT
71552014-02-19 Tom Tromey <tromey@redhat.com>
7156
7157 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7158 argument.
7159 (target_supports_btrace): Update.
7160
0759a81e
YQ
71612014-02-14 Yao Qi <yao@codesourcery.com>
7162
7163 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7164 (rsp-low-ipa.o): New target.
7165
a7191e8b
TT
71662014-02-12 Tom Tromey <tromey@redhat.com>
7167
7168 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7169 convert_ascii_to_int.
7170 * regcache.c (registers_to_string): Likewise.
7171 * remote-utils.c (decode_M_packet): Likewise.
7172 * server.c (process_serial_event): Likewise.
7173
ff0e980e
TT
71742014-02-12 Tom Tromey <tromey@redhat.com>
7175
7176 * server.c (handle_query, handle_v_run): Use hex2bin, not
7177 unhexify.
7178 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7179
e9371aff
TT
71802014-02-12 Tom Tromey <tromey@redhat.com>
7181
7182 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7183 convert_int_to_ascii.
7184 * regcache.c (registers_to_string, collect_register_as_string):
7185 Likewise.
7186 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7187 Likewise.
7188 * server.c (process_serial_event): Likewise.
7189 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7190 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7191
971dc0b8
TT
71922014-02-12 Tom Tromey <tromey@redhat.com>
7193
7194 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7195 bin2hex, not hexify.
7196 * tracepoint.c (cmd_qtstatus): Likewise.
7197
0a822afb
TT
71982014-02-12 Tom Tromey <tromey@redhat.com>
7199
7200 * remote-utils.c (monitor_output): Pass explicit length to
7201 hexify.
7202
9c3d6531
TT
72032014-02-12 Tom Tromey <tromey@redhat.com>
7204
7205 * tracepoint.c: Include rsp-low.h.
7206 * server.c: Include rsp-low.h.
7207 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7208 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7209 declare.
7210 * remote-utils.c: Include rsp-low.h.
7211 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7212 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7213 (convert_int_to_ascii, convert_ascii_to_int): Move to
7214 common/rsp-low.c.
7215 * regcache.c: Include rsp-low.h.
7216 * ax.c: Include rsp-low.h.
7217 * Makefile.in (SFILES): Add common/rsp-low.c.
7218 (OBS): Add rsp-low.o.
7219 (rsp-low.o): New target.
7220
01fd3ea5
TT
72212014-02-12 Tom Tromey <tromey@redhat.com>
7222
7223 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7224 Include print-utils.h.
7225 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7226 (plongest, thirty_two, phex_nz): Remove.
7227 * Makefile.in (SFILES): Add common/print-utils.c.
7228 (OBS): Add print-utils.o.
7229 (print-utils-ipa.o): New target.
7230 (print-utils.o): New target.
7231 (IPA_OBJS): Add print-utils-ipa.o.
7232
e99dc820
TT
72332014-02-06 Tom Tromey <tromey@redhat.com>
7234
7235 * Makefile.in (SFILES): Fix indentation.
7236
ee1e2d4f
DE
72372014-02-05 Doug Evans <dje@google.com>
7238
7239 * linux-low.c (linux_wait_for_event): Improve comment.
7240 (linux_wait_1): Keep current_inferior in sync with event_child.
7241
f5a02773
DE
72422014-01-22 Doug Evans <dje@google.com>
7243
7244 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7245
87ce2a04
DE
72462014-01-22 Doug Evans <dje@google.com>
7247
7248 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7249 * configure: Regenerate.
7250 * config.in: Regenerate.
7251 * Makefile.in (SFILES): Add debug.c.
7252 (OBS): Add debug.o.
7253 * debug.c: New file.
7254 * debug.h: New file.
7255 * linux-aarch64-low.c (*): Update all debugging printfs to use
7256 debug_printf instead of fprintf.
7257 * linux-arm-low.c (*): Ditto.
7258 * linux-cris-low.c (*): Ditto.
7259 * linux-crisv32-low.c (*): Ditto.
7260 * linux-m32r-low.c (*): Ditto.
7261 * linux-sparc-low.c (*): Ditto.
7262 * linux-x86.c (*): Ditto.
7263 * linux-low.c (*): Ditto.
7264 (linux_wait_1): Add calls to debug_enter, debug_exit.
7265 (linux_wait): Remove redundant debugging printf.
7266 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7267 (linux_resume, unstop_all_lwps): Ditto.
7268 * mem-break.c (*): Update all debugging printfs to use
7269 debug_printf instead of fprintf.
7270 * remote-utils.c (*): Ditto.
7271 * thread-db.c (*): Ditto.
7272 * server.c #include <ctype.h>, "gdb_vecs.h".
7273 (debug_threads): Moved to debug.c.
7274 (*): Update all debugging printfs to use debug_printf instead of
7275 fprintf.
7276 (start_inferior): Replace call to fflush with call to debug_flush.
7277 (monitor_show_help): Mention set debug-format.
7278 (parse_debug_format_options): New function.
7279 (handle_monitor_command): Handle "monitor set debug-format".
7280 (gdbserver_usage): Mention --debug-format.
7281 (main): Parse --debug-format.
7282 * server.h (debug_threads): Declaration moved to debug.h.
7283 #include "debug.h".
7284 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7285 trace_debug_1 that uses debug_printf.
7286 (tracepoint_look_up_symbols): Update all debugging printfs to use
7287 debug_printf instead of fprintf.
7288
e671835b
BS
72892014-01-20 Baruch Siach <baruch@tkos.co.il>
7290
7291 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7292 sys/ptrace.h.
7293
b5737fa9
PA
72942014-01-17 Pedro Alves <palves@redhat.com>
7295
ea38d2a9 7296 PR build/16445
c7faa97a
PA
7297 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7298 defined after including gdb_proc_service.h.
b5737fa9 7299
40ed484e
DE
73002014-01-16 Doug Evans <dje@google.com>
7301
7302 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7303 (match_dll): Use it.
7304
969c39fb
MM
73052014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7306
7307 * target.h (target_ops) <read_btrace>: Change parameters and
7308 return type to allow error reporting.
7309 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7310 trace reading errors on.
7311 * linux-low.c (linux_low_read_btrace): Pass trace reading
7312 errors on.
7313 (linux_low_disable_btrace): New.
7314
ab7f45ba
DE
73152014-01-15 Doug Evans <dje@google.com>
7316
7317 * inferiors.c (thread_id_to_gdb_id): Delete.
7318 * inferiors.h (thread_id_to_gdb_id): Delete.
7319
66af0f44
EZ
73202014-01-13 Eli Zaretskii <eliz@gnu.org>
7321
7322 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7323 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7324 versions.
7325
9939e131
PA
73262014-01-08 Pedro Alves <palves@redhat.com>
7327
7328 * server.c (handle_status): Don't discard previous queued stop
7329 replies or thread's pending status here.
7330 (main) <disconnection>: Do it here instead.
7331
b7ea362b
PA
73322014-01-08 Pedro Alves <palves@redhat.com>
7333
7334 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7335 * server.c (visit_actioned_threads, handle_pending_status): New
7336 function.
7337 (handle_v_cont): Factor out parts to ...
7338 (resume): ... this new function. If in all-stop, and a thread
7339 being resumed has a pending status, report it without actually
7340 resuming.
7341 (myresume): Adjust to use the new 'resume' function.
7342 (clear_pending_status_callback, set_pending_status_callback)
7343 (find_status_pending_thread_callback): New functions.
7344 (handle_status): Handle the case of multiple threads having
7345 interesting statuses to report. Report threads' real last signal
7346 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7347 with an interesting thread to report the status for, instead of
7348 always reporting the status of the first thread.
7349
28498c42
JB
73502014-01-01 Joel Brobecker <brobecker@adacore.com>
7351
7352 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7353 * gdbreplay.c (gdbreplay_version): Likewise.
7354
f45c82da
YZ
73552013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7356
7357 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7358 iov.iov_len with the real length in use.
7359
379a5e2d
JB
73602013-12-13 Joel Brobecker <brobecker@adacore.com>
7361
7362 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7363 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7364 for all targets that use win32-low.c.
7365 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7366 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7367
4210d83e
PA
73682013-12-13 Pedro Alves <palves@redhat.com>
7369
7370 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7371 if equal to TARGET_WAITKIND_LOADED.
7372 * win32-low.c (cached_status): New static global.
7373 (win32_wait): Add declaration.
7374 (do_initial_child_stuff): Flush all initial pending debug events
7375 up to the initial breakpoint.
7376 (win32_wait): If CACHED_STATUS was set, return that instead
7377 of doing a real wait. Remove the code resuming the execution
7378 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7379 during the initial phase. Also remove the code changing
7380 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7381 TARGET_WAITKIND_STOPPED.
7382
e7f0d979
YQ
73832013-12-11 Yao Qi <yao@codesourcery.com>
7384
7385 * notif.c (handle_notif_ack): Return 0 if no notification
7386 matches.
7387
ebcf782c
DE
73882013-11-20 Doug Evans <dje@google.com>
7389
7390 * linux-low.c (linux_set_resume_request): Fix comment.
7391
20ad9378
DE
73922013-11-20 Doug Evans <dje@google.com>
7393
7394 * linux-low.c (resume_status_pending_p): Tweak comment.
7395
a196ebeb
WT
73962013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7397
7398 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7399 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7400 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7401 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7402 (srv_amd64_regobj): Add amd64-mpx.o.
7403 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7404 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7405 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7406 * i387-fp.c (num_pl_bnd_register) Added constant.
7407 (num_pl_bnd_cfg_registers) Added constant.
7408 (struct i387_xsave) Added reserved area and MPX fields.
7409 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7410 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7411 function.
7412 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7413 (init_registers_amd64_mpx_linux): Declare new function.
7414 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7415 (x86_64_regmap): Add MPX registers.
7416 (x86_linux_read_description): Add MPX case.
7417 (initialize_low_arch): Initialize MPX targets.
7418
0080a2f6
TT
74192013-11-18 Tom Tromey <tromey@redhat.com>
7420
7421 * configure: Rebuild.
7422 * configure.ac: Don't check for stdlib.h.
7423 * gdbreplay.c: Unconditionally include stdlib.h.
7424
2978b111
TT
74252013-11-18 Tom Tromey <tromey@redhat.com>
7426
7427 * config.in: Rebuild.
7428 * configure: Rebuild.
7429 * configure.ac: Don't use AC_HEADER_DIRENT.
7430
a3d08894
TT
74312013-11-18 Tom Tromey <tromey@redhat.com>
7432
7433 * server.h: Don't check HAVE_STRING_H.
7434 * gdbreplay.c: Don't check HAVE_STRING_H.
7435 * configure: Rebuild.
7436
0a5dd17d
TT
74372013-11-18 Tom Tromey <tromey@redhat.com>
7438
7439 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7440 LIBGNU.
7441
1bd2f0ba
TT
74422013-11-08 Tom Tromey <tromey@redhat.com>
7443
7444 * configure, config.in: Rebuild.
7445 * configure.ac: Remove unused configury.
7446
3266f10b
TT
74472013-11-08 Tom Tromey <tromey@redhat.com>
7448
7449 * acinclude.m4: Include common.m4, codeset.m4.
7450 * configure, config.in: Rebuild.
7451 * configure.ac: Use GDB_AC_COMMON.
7452
6682d959
AA
74532013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7454
7455 * linux-s390-low.c (HWCAP_S390_TE): New define.
7456 (s390_arch_setup): Consider the TE field in the HWCAP for
7457 determining 'have_regset_tdb'.
7458
fd0a4d76
SDJ
74592013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7460
7461 PR gdb/16014
7462 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7463 call to sizeof.
7464
1a3d890b
PA
74652013-10-02 Pedro Alves <palves@redhat.com>
7466
7467 * server.c (process_serial_event): Don't output "GDBserver
7468 exiting" if GDB is connected through stdio.
7469 * target.c (mywait): Likewise, be silent if GDB is connected
7470 through stdio.
7471
97ad4581
JB
74722013-10-01 Joel Brobecker <brobecker@adacore.com>
7473
7474 * lynx-low.c (lynx_add_threads_after_attach): New function.
7475 (lynx_attach): Remove call to add_thread. Add call to
7476 lynx_add_threads_after_attach instead.
7477
5b4e221c
MF
74782013-09-28 Mike Frysinger <vapier@gentoo.org>
7479
7480 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7481 * config.in, configure: Regenerated.
7482
ee47b2f8
YQ
74832013-09-18 Yao Qi <yao@codesourcery.com>
7484
7485 PR server/15959
7486 * server.c (start_inferior): Clear 'resume_info'.
7487
d6707650 74882013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7489
d6707650
JW
7490 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7491 for each register.
7492
9243dd0e 74932013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7494
9243dd0e
JW
7495 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7496 linux-tile-low.o to srv_tgtobj.
7497
c623a6ef
WN
74982013-09-16 Will Newton <will.newton@linaro.org>
7499
7500 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7501 out regs.
7502
fb71d39e
PA
75032013-09-06 Pedro Alves <palves@redhat.com>
7504
7505 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7506 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7507 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7508 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7509 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7510 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7511
8e7e9910
PA
75122013-09-06 Pedro Alves <palves@redhat.com>
7513
7514 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7515 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7516
7c3a12ca
PA
75172013-09-06 Pedro Alves <palves@redhat.com>
7518
7519 * linux-amd64-ipa.c: Include tracepoint.h.
7520 * linux-i386-ipa.c: Include tracepoint.h.
7521
8eb3d7b6
RW
75222013-09-06 Ricard Wanderlof <ricardw@axis.com>
7523
7524 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7525 (ps_get_thread_area): New function.
7526
eddddb9d
RW
75272013-09-06 Ricard Wanderlof <ricardw@axis.com>
7528
7529 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7530 (initialize_low_arch): Call init_registers_crisv32 rather than
7531 init_register_crisv32.
7532
533b0600
PA
75332013-09-05 Pedro Alves <palves@redhat.com>
7534
7535 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7536 to ...
7537 * hostio.h: ... this new file.
7538 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7539 win32-low.c: Include hostio.h.
7540
0ce3d3b5
PA
75412013-09-05 Pedro Alves <palves@redhat.com>
7542
7543 * server.h (gdb_client_data, handler_func, callback_handler_func)
7544 (delete_file_handler, add_file_handler, append_callback_event)
7545 (delete_callback_event, start_event_loop, initialize_event_loop):
7546 Move to event-loop.h and include it.
7547 * event-loop.h: New file.
7548
799cdc37
PA
75492013-09-05 Pedro Alves <palves@redhat.com>
7550
7551 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7552 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7553 (loaded_dll, unloaded_dll): Move to ...
7554 * dll.h: ... this new file.
7555 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7556
6a6bbd9d
PA
75572013-09-05 Pedro Alves <palves@redhat.com>
7558
7559 * server.h (current_process, get_thread_process, all_processes)
7560 (add_inferior_to_list, for_each_inferior, current_inferior)
7561 (remove_inferior, add_process, remove_process, find_process_pid)
7562 (have_started_inferiors_p, have_attached_inferiors_p)
7563 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7564 (clear_inferiors, find_inferior, find_inferior_id)
7565 (inferior_target_data, set_inferior_target_data)
7566 (inferior_regcache_data, set_inferior_regcache_data): Move to
7567 inferiors.h, and include it.
7568 * inferiors.h: New file.
7569
f699aaba
PA
75702013-09-05 Pedro Alves <palves@redhat.com>
7571
7572 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7573 Move ...
72f4393d 7574 * ax.h: ... here.
f699aaba 7575
c144c7a0
PA
75762013-09-05 Pedro Alves <palves@redhat.com>
7577
7578 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7579 tracepoint.h.
7580 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7581 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7582 (handle_tracepoint_general_set, handle_tracepoint_query)
7583 (tracepoint_finished_step, tracepoint_was_hit)
7584 (release_while_stepping_state_list, current_traceframe)
7585 (in_readonly_region, traceframe_read_mem)
7586 (fetch_traceframe_registers, traceframe_read_sdata)
7587 (traceframe_read_info, struct fast_tpoint_collect_status)
7588 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7589 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7590 (supply_fast_tracepoint_registers)
7591 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7592 (ipa_tdesc, claim_trampoline_space)
7593 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7594 (agent_mem_read, agent_get_trace_state_variable_value)
7595 (agent_set_trace_state_variable_value, agent_tsv_read)
7596 (agent_mem_read_string, get_raw_reg_func_addr)
7597 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7598 * tracepoint.h: ... this new file.
7599
ff42e6ab
PA
76002013-09-05 Pedro Alves <palves@redhat.com>
7601
7602 * server.h (perror_with_name, error, fatal, warning, paddress)
7603 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7604 include it.
7605 * utils.h: New file.
7606
541af0f4
PA
76072013-09-05 Pedro Alves <palves@redhat.com>
7608
7609 * server.h (remote_debug, noack_mode, transport_is_reliable)
7610 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7611 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7612 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7613 (write_enn, initialize_async_io, enable_async_io)
7614 (disable_async_io, check_remote_input_interrupt_request)
7615 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7616 (dead_thread_notify, prepare_resume_reply)
7617 (decode_address_to_semicolon, decode_address, decode_m_packet)
7618 (decode_M_packet, decode_X_packet, decode_xfer_write)
7619 (decode_search_memory_packet, unhexify, hexify)
7620 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7621 (look_up_one_symbol, relocate_instruction)
7622 (monitor_output): Move to remote-utils.h, and include it.
7623 * remote-utils.h: New file.
7624
eebdf26b
PA
76252013-09-05 Pedro Alves <palves@redhat.com>
7626
7627 * server.h (_): Delete.
7628
3aafd2ff
PA
76292013-09-02 Pedro Alves <palves@redhat.com>
7630
7631 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7632 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7633 allocated.
7634 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7635
cee83bcb
PM
76362013-09-02 Pierre Muller <muller@sourceware.org>
7637
7638 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7639 or WriteProcessMemory complete successfully and handle
7640 ERROR_PARTIAL_COPY error.
7641
9a13b2fa
PA
76422013-09-02 Pedro Alves <palves@redhat.com>
7643
7644 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7645 error instead of EIO.
7646
602e3198
JK
76472013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7648
7649 PR server/15604
7650 * linux-low.c: Include filestuff.h.
7651 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7652 * lynx-low.c: Include filestuff.h.
7653 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7654 * server.c: Include filestuff.h.
7655 (main): Call notice_open_fds.
7656 * spu-low.c: Include filestuff.h.
7657 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7658
96d7229d
LM
76592013-08-22 Luis Machado <lgustavo@codesourcery.com>
7660
7661 * Makefile.in: Explain why ../target and ../nat are not
7662 listed as include file search paths.
7663 (linux-waitpid.o): New object file rule.
7664 * configure.srv (srv_native_linux_obj): New variable.
7665 Replace all occurrences of linux native object files with
7666 $srv_native_linux_obj.
7667 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7668 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7669 (linux_enable_event_reporting): Remove declaration.
7670 (my_waitpid): Moved to common/linux-waitpid.c.
7671 (linux_wait_for_event): Pass ptid when calling
7672 linux_enable_event_reporting.
7673 (linux_supports_tracefork_flag): Remove.
7674 (linux_enable_event_reporting): Likewise.
7675 (linux_tracefork_grandchild): Remove.
7676 (STACK_SIZE): Moved to common/linux-ptrace.c.
7677 (linux_tracefork_child): Remove.
7678 (linux_test_for_tracefork): Remove.
7679 (linux_look_up_symbols): Call linux_supports_traceclone.
7680 (initialize_low): Remove call to linux_test_for_tracefork.
7681 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7682 common/linux-ptrace.h.
7683 (PTRACE_TYPE_ARG4): Likewise.
7684 Include linux-ptrace.h.
7685
32940073
PA
76862013-08-21 Pedro Alves <palves@redhat.com>
7687
7688 * config.in: Renegerate.
7689
33b60d58 76902013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7691
33b60d58
LM
7692 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7693 (SFILES): Remove $(srcdir)/common/target-common.c and
7694 add $(srcdir)/target/waitstatus.c.
7695 (OBS): Remove target-common.o and add waitstatus.o.
7696 (server_h): Remove $(srcdir)/../common/target-common.h and
7697 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7698 and $(srcdir)/../target/waitstatus.h.
7699 (target-common.o): Remove.
7700 (waitstatus.o): New target object file.
7701 * target.h: Do not include target-common.h and
7702 include target/resume.h, target/wait.h and
7703 target/waitstatus.h.
7704
b8e1b30e
LM
77052013-08-13 Luis Machado <lgustavo@codesourcery.com>
7706
7707 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7708 to PTRACE_TYPE_ARG3.
7709 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7710 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7711 PTRACE_TYPE_ARG4.
7712 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7713 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7714
7a60ad40
YQ
77152013-07-27 Jie Zhang <jie@codesourcery.com>
7716 Daniel Jacobowitz <dan@codesourcery.com>
7717 Yao Qi <yao@codesourcery.com>
7718
7719 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7720 (mips-linux-watch.o): New rule.
7721 (mips_linux_watch_h): New variable.
7722 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7723 srv_tgtobj.
7724 * linux-mips-low.c: Include mips-linux-watch.h.
7725 (struct arch_process_info, struct arch_lwp_info): New.
7726 (update_watch_registers_callback): New function.
7727 (mips_linux_new_process, mips_linux_new_thread) New functions.
7728 (mips_linux_prepare_to_resume, mips_insert_point): New
7729 functions.
7730 (mips_remove_point, mips_stopped_by_watchpoint): New
7731 functions.
7732 (rsp_bp_type_to_target_hw_bp_type): New function.
7733 (mips_stopped_data_address): New function.
7734 (the_low_target): Add watchpoint support functions.
7735
de6f69ad
YQ
77362013-07-27 Yao Qi <yao@codesourcery.com>
7737
7738 * i386-low.c: Include break-common.h.
7739 (enum target_hw_bp_type): Remove.
7740
3360c0bf
LM
77412013-07-24 Luis Machado <lgustavo@codesourcery.com>
7742
7743 * Makefile.in (SFILES): /common/target-common.c.
7744 (OBS): Add target-common.o.
7745 (server_h): Add $(srcdir)/../common/target-common.h.
7746 (target-common.o): New target.
7747 * server.c (queue_stop_reply_callback): Free
7748 status string after use.
7749 * target.c (target_waitstatus_to_string): Remove.
7750 * target.h: Include target-common.h.
7751 (resume_kind): Likewise.
7752 (target_waitkind): Likewise.
7753 (target_waitstatus): Likewise.
7754 (TARGET_WNOHANG): Likewise.
7755
bd885420
YQ
77562013-07-04 Yao Qi <yao@codesourcery.com>
7757
7758 * Makefile.in (host_alias): Use @host_noncanonical@.
7759 (target_alias): Use @target_noncanonical@.
7760 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7761 ACX_NONCANONICAL_HOST.
7762 * configure: Regenerated.
7763
7764 Revert:
7765 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7766
7767 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7768 * configure: Rebuild.
7769 * Makefile.in (version_host, version_target): Get from configure.
7770 (version.c): Use $(version_host) and $(version_target).
7771
17ef446e
PA
77722013-07-03 Pedro Alves <palves@redhat.com>
7773
7774 * Makefile.in (config.status): Depend on development.sh.
7775 * acinclude.m4: Include libmcheck.m4.
7776 * configure: Regenerate.
7777
7a9a7487
MG
77782013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7779
7780 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7781 attribute inside the parentheses.
7782 (winapi_DebugSetProcessKillOnExit): Ditto.
7783 (winapi_DebugBreakProcess): Ditto.
7784 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7785
49b64de6
MG
77862013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7787
7788 * notif.h (notif_event): Add a dummy member to avoid compiler
7789 errors.
7790
d5749ee7
PA
77912013-07-01 Pedro Alves <palves@redhat.com>
7792
7793 * hostio.c (HOSTIO_PATH_MAX): Define.
7794 (require_filename, handle_open, handle_unlink, handle_readlink):
7795 Use it.
7796
d8d2a3ee
PA
77972013-07-01 Pedro Alves <palves@redhat.com>
7798
7799 * server.h: Include "pathmax.h".
7800 * linux-low.c: Don't include sys/param.h.
7801 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7802 MAXPATHLEN.
7803 * win32-low.c: Don't include sys/param.h.
7804 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7805
bc7dea8d
PA
78062013-07-01 Pedro Alves <palves@redhat.com>
7807
7808 * event-loop.c: Don't check HAVE_UNISTD_H before including
7809 <unistd.h>.
7810 * gdbreplay.c: Likewise.
7811 * remote-utils.c: Likewise.
7812 * server.c: Likewise.
7813 * configure.ac: Don't check for unistd.h.
7814 * configure: Regenerate.
7815
d6c2da54
TT
78162013-06-28 Tom Tromey <tromey@redhat.com>
7817
7818 * Makefile.in (version.c): Use version.in, not
7819 common/version.in.
7820
257b6bec
MG
78212013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7822
7823 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7824 * configure: Rebuild.
7825 * Makefile.in (version_host, version_target): Get from configure.
7826 (version.c): Use $(version_host) and $(version_target).
7827
86ebe149
DK
78282013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7829
7830 Fix trace-status to output user name without trailing colon.
7831 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7832
f30aa5af
DK
78332013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7834
7835 Fix trace-status to output proper start-time and stop-time.
7836 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7837 output start time and stop time in hex as gdb expects.
7838
28a93511
YQ
78392013-06-26 Pedro Alves <pedro@codesourcery.com>
7840
7841 * tracepoint.c (build_traceframe_info_xml): Output trace state
7842 variables present in the trace buffer.
7843
01208463
TT
78442013-06-24 Tom Tromey <tromey@redhat.com>
7845
7846 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7847 create-version.sh.
7848 (version.o): Remove.
7849 * gdbreplay.c: Include version.h.
7850 (version, host_name): Don't declare.
7851 * server.h: Include version.h.
7852 (version, host_name): Don't declare.
7853
760256f9
PA
78542013-06-12 Pedro Alves <palves@redhat.com>
7855
7856 * linux-x86-low.c (linux_is_elf64): Delete global.
7857 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7858 with local linux_pid_exe_is_elf_64_file use.
7859
030031ee
PA
78602013-06-11 Pedro Alves <palves@redhat.com>
7861
7862 * linux-low.c (regset_disabled, disable_regset): New functions.
7863 (regsets_fetch_inferior_registers)
7864 (regsets_store_inferior_registers): Use them.
7865 (initialize_regsets_info); Don't allocate the disabled_regsets
7866 array here.
7867 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7868 comment.
7869
5da6eb0a
PA
78702013-06-11 Pedro Alves <palves@redhat.com>
7871
7872 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7873 xmalloc.
7874
7e5aaa09
PA
78752013-06-11 Pedro Alves <palves@redhat.com>
7876
7877 * linux-x86-low.c (initialize_low_arch): Call
7878 init_registers_x32_avx_linux.
7879
d878444c
JK
78802013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7881
7882 Fix compatibility with Android Bionic.
7883 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7884 it is not empty.
7885
3aee8918
PA
78862013-06-07 Pedro Alves <palves@redhat.com>
7887
5f2b57b5 7888 PR server/14823
3aee8918
PA
7889 * Makefile.in (OBS): Add tdesc.o.
7890 (IPA_OBJS): Add tdesc-ipa.o.
7891 (tdesc-ipa.o): New rule.
7892 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7893 interface.
7894 * linux-low.c (new_inferior): Delete.
7895 (disabled_regsets, num_regsets): Delete.
7896 (linux_add_process): Adjust to set the new per-process
7897 new_inferior flag.
7898 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7899 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7900 was a stop. When calling arch_setup, switch the current inferior
7901 to the thread that got an event.
7902 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7903 (regsets_fetch_inferior_registers)
7904 (regsets_store_inferior_registers): New regsets_info parameter.
7905 Adjust to use it.
7906 (linux_register_in_regsets): New regs_info parameter. Adjust to
7907 use it.
7908 (register_addr, fetch_register, store_register): New usrregs_info
7909 parameter. Adjust to use it.
7910 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7911 parameter regs_info. Adjust to use it.
7912 (linux_fetch_registers): Get the current inferior's regs_info, and
7913 adjust to use it.
7914 (linux_store_registers): Ditto.
7915 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7916 (initialize_low): Don't initialize the target_regsets here. Call
7917 initialize_low_arch.
7918 * linux-low.h (target_regsets): Delete declaration.
7919 (struct regsets_info): New.
7920 (struct usrregs_info): New.
7921 (struct regs_info): New.
7922 (struct process_info_private) <new_inferior>: New field.
7923 (struct linux_target_ops): Delete the num_regs, regmap, and
7924 regset_bitmap fields. New field regs_info.
7925 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7926 * i387-fp.c (num_xmm_registers): Delete.
7927 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7928 calls to new interface.
7929 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7930 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7931 Infer the number of xmm registers from the regcache's target
7932 description.
7933 * i387-fp.h (num_xmm_registers): Delete.
7934 * inferiors.c (add_thread): Don't install the thread's regcache
7935 here.
7936 * proc-service.c (gregset_info): Fetch the current inferior's
7937 regs_info. Adjust to use it.
7938 * regcache.c: Include tdesc.h.
7939 (register_bytes, reg_defs, num_registers)
7940 (gdbserver_expedite_regs): Delete.
7941 (get_thread_regcache): If the thread doesn't have a regcache yet,
7942 create one, instead of aborting gdbserver.
7943 (regcache_invalidate_one): Rename to ...
7944 (regcache_invalidate_thread): ... this.
7945 (regcache_invalidate_one): New.
7946 (regcache_invalidate): Only invalidate registers of the current
7947 process.
7948 (init_register_cache): Add target_desc parameter, and use it.
7949 (new_register_cache): Ditto. Assert the target description has a
7950 non zero registers_size.
7951 (regcache_cpy): Add assertions. Adjust.
7952 (realloc_register_cache, set_register_cache): Delete.
7953 (registers_to_string, registers_from_string): Adjust.
7954 (find_register_by_name, find_regno, find_register_by_number)
7955 (register_cache_size): Add target_desc parameter, and use it.
7956 (free_register_cache_thread, free_register_cache_thread_one)
7957 (regcache_release, register_cache_size): New.
7958 (register_size): Add target_desc parameter, and use it.
7959 (register_data, supply_register, supply_register_zeroed)
7960 (supply_regblock, supply_register_by_name, collect_register)
7961 (collect_register_as_string, collect_register_by_name): Adjust.
7962 * regcache.h (struct target_desc): Forward declare.
7963 (struct regcache) <tdesc>: New field.
7964 (init_register_cache, new_register_cache): Add target_desc
7965 parameter.
7966 (regcache_invalidate_thread): Declare.
7967 (regcache_invalidate_one): Delete declaration.
7968 (regcache_release): Declare.
7969 (find_register_by_number, register_cache_size, register_size)
7970 (find_regno): Add target_desc parameter.
7971 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7972 declarations.
7973 * remote-utils.c: Include tdesc.h.
7974 (outreg, prepare_resume_reply): Adjust.
7975 * server.c: Include tdesc.h.
7976 (gdbserver_xmltarget): Delete declaration.
7977 (get_features_xml, process_serial_event): Adjust.
7978 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7979 declare.
7980 (struct process_info) <tdesc>: New field.
7981 (ipa_tdesc): Declare.
7982 * tdesc.c: New file.
7983 * tdesc.h: New file.
7984 * tracepoint.c: Include tdesc.h.
7985 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7986 (get_context_regcache): Adjust to pass ipa_tdesc down.
7987 (do_action_at_tracepoint): Adjust to get the register cache size
7988 from the context regcache's description.
7989 (traceframe_walk_blocks): Adjust to get the register cache size
7990 from the current trace frame's description.
7991 (traceframe_get_pc): Adjust to get current trace frame's
7992 description and pass it down.
7993 (gdb_collect): Adjust to get the register cache size from the
7994 IPA's description.
7995 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7996 (gdbserver_xmltarget): Delete.
7997 (initialize_low_tracepoint): Set the ipa's target description.
7998 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7999 (initialize_low_tracepoint): Set the ipa's target description.
8000 * linux-x86-low.c: Include tdesc.h.
8001 [__x86_64__] (is_64bit_tdesc): New.
8002 (ps_get_thread_area, x86_get_thread_area): Use it.
8003 (i386_cannot_store_register): Rename to ...
8004 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8005 (i386_cannot_fetch_register): Rename to ...
8006 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8007 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8008 to new interface.
8009 (target_regsets): Rename to ...
8010 (x86_regsets): ... this.
8011 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8012 interface.
8013 (x86_siginfo_fixup): Use is_64bit_tdesc.
8014 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8015 (tdesc_x32_avx_linux, tdesc_x32_linux)
8016 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8017 Declare.
8018 (x86_linux_update_xmltarget): Delete.
8019 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8020 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8021 (AMD64_LINUX_USER64_CS): New.
8022 (x86_linux_read_description): New, based on
8023 x86_linux_update_xmltarget.
8024 (same_process_callback): New.
8025 (x86_arch_setup_process_callback): New.
8026 (x86_linux_update_xmltarget): New.
8027 (x86_regsets_info): New.
8028 (amd64_linux_regs_info): New.
8029 (i386_linux_usrregs_info): New.
8030 (i386_linux_regs_info): New.
8031 (x86_linux_regs_info): New.
8032 (x86_arch_setup): Reimplement.
8033 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8034 (x86_emit_ops): Ditto.
8035 (the_low_target): Adjust. Install x86_linux_regs_info,
8036 x86_cannot_fetch_register, and x86_cannot_store_register.
8037 (initialize_low_arch): New.
8038 * linux-ia64-low.c (tdesc_ia64): Declare.
8039 (ia64_fetch_register): Adjust.
8040 (ia64_usrregs_info, regs_info): New globals.
8041 (ia64_regs_info): New function.
8042 (the_low_target): Adjust.
8043 (initialize_low_arch): New function.
8044 * linux-sparc-low.c (tdesc_sparc64): Declare.
8045 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8046 Adjust.
8047 (sparc_arch_setup): New function.
8048 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8049 (the_low_target): Adjust.
8050 (initialize_low_arch): New function.
8051 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8052 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8053 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8054 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8055 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8056 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8057 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8058 (tdesc_powerpc_isa205_vsx64l): Declare.
8059 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8060 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8061 (ppc_set_pc, ppc_get_hwcap): Adjust.
8062 (ppc_usrregs_info): Forward declare.
8063 (!__powerpc64__) ppc_regmap_adjusted: New global.
8064 (ppc_arch_setup): Adjust to the current process'es target
8065 description.
8066 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8067 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8068 (ppc_store_evrregset): Adjust.
8069 (target_regsets): Rename to ...
8070 (ppc_regsets): ... this, and make static.
8071 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8072 (ppc_regs_info): New function.
8073 (the_low_target): Adjust.
8074 (initialize_low_arch): New function.
8075 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8076 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8077 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8078 (tdesc_s390x_linux64v2): Declare.
8079 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8080 (s390_fill_gregset, s390_store_last_break): Adjust.
8081 (target_regsets): Rename to ...
8082 (s390_regsets): ... this, and make static.
8083 (s390_get_pc, s390_set_pc): Adjust.
8084 (s390_get_hwcap): New target_desc parameter, and use it.
8085 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8086 (s390_arch_setup): Adjust to set the current process'es target
8087 description. Don't adjust the regmap.
8088 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8089 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8090 (regs_info_3264): New globals.
8091 (s390_regs_info): New function.
8092 (the_low_target): Adjust.
8093 (initialize_low_arch): New function.
8094 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8095 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8096 [__mips64] (init_registers_mips_linux)
8097 (init_registers_mips_dsp_linux): Delete defines.
8098 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8099 (have_dsp): New global.
8100 (mips_read_description): New, based on mips_arch_setup.
8101 (mips_arch_setup): Reimplement.
8102 (get_usrregs_info): New function.
8103 (mips_cannot_fetch_register, mips_cannot_store_register)
8104 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8105 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8106 (target_regsets): Rename to ...
8107 (mips_regsets): ... this, and make static.
8108 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8109 (dsp_regs_info, regs_info): New globals.
8110 (mips_regs_info): New function.
8111 (the_low_target): Adjust.
8112 (initialize_low_arch): New function.
8113 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8114 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8115 Declare.
8116 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8117 (arm_read_description): New, with bits factored from
8118 arm_arch_setup.
8119 (arm_arch_setup): Reimplement.
8120 (target_regsets): Rename to ...
8121 (arm_regsets): ... this, and make static.
8122 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8123 (arm_regs_info): New function.
8124 (the_low_target): Adjust.
8125 (initialize_low_arch): New function.
8126 * linux-m68k-low.c (tdesc_m68k): Declare.
8127 (target_regsets): Rename to ...
8128 (m68k_regsets): ... this, and make static.
8129 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8130 (m68k_regs_info): New function.
8131 (m68k_arch_setup): New function.
8132 (the_low_target): Adjust.
8133 (initialize_low_arch): New function.
8134 * linux-sh-low.c (tdesc_sharch): Declare.
8135 (target_regsets): Rename to ...
8136 (sh_regsets): ... this, and make static.
8137 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8138 (sh_regs_info, sh_arch_setup): New functions.
8139 (the_low_target): Adjust.
8140 (initialize_low_arch): New function.
8141 * linux-bfin-low.c (tdesc_bfin): Declare.
8142 (bfin_arch_setup): New function.
8143 (bfin_usrregs_info, regs_info): New globals.
8144 (bfin_regs_info): New function.
8145 (the_low_target): Adjust.
8146 (initialize_low_arch): New function.
8147 * linux-cris-low.c (tdesc_cris): Declare.
8148 (cris_arch_setup): New function.
8149 (cris_usrregs_info, regs_info): New globals.
8150 (cris_regs_info): New function.
8151 (the_low_target): Adjust.
8152 (initialize_low_arch): New function.
8153 * linux-cris-low.c (tdesc_crisv32): Declare.
8154 (cris_arch_setup): New function.
8155 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8156 (cris_regs_info): New function.
8157 (the_low_target): Adjust.
8158 (initialize_low_arch): New function.
8159 * linux-m32r-low.c (tdesc_m32r): Declare.
8160 (m32r_arch_setup): New function.
8161 (m32r_usrregs_info, regs_info): New globals.
8162 (m32r_regs_info): Adjust.
8163 (initialize_low_arch): New function.
8164 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8165 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8166 (tic6x_usrregs_info): Forward declare.
8167 (tic6x_read_description): New function, based on ...
8168 (tic6x_arch_setup): ... this. Reimplement.
8169 (target_regsets): Rename to ...
8170 (tic6x_regsets): ... this, and make static.
8171 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8172 (tic6x_regs_info): New function.
8173 (the_low_target): Adjust.
8174 (initialize_low_arch): New function.
8175 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8176 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8177 (target_regsets): Rename to ...
8178 (xtensa_regsets): ... this, and make static.
8179 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8180 globals.
8181 (xtensa_arch_setup, xtensa_regs_info): New functions.
8182 (the_low_target): Adjust.
8183 (initialize_low_arch): New function.
8184 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8185 (nios2_arch_setup): Set the current process'es tdesc.
8186 (target_regsets): Rename to ...
8187 (nios2_regsets): ... this.
8188 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8189 (nios2_regs_info): New function.
8190 (the_low_target): Adjust.
8191 (initialize_low_arch): New function.
a261b8f5
PA
8192 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8193 (aarch64_arch_setup): Set the current process'es tdesc.
8194 (target_regsets): Rename to ...
8195 (aarch64_regsets): ... this.
8196 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8197 (aarch64_regs_info): New function.
8198 (the_low_target): Adjust.
8199 (initialize_low_arch): New function.
3aee8918
PA
8200 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8201 globals.
8202 (target_regsets): Rename to ...
8203 (tile_regsets): ... this.
8204 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8205 (tile_regs_info): New function.
8206 (tile_arch_setup): Set the current process'es tdesc.
8207 (the_low_target): Adjust.
8208 (initialize_low_arch): New function.
8209 * spu-low.c (tdesc_spu): Declare.
8210 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8211 * win32-arm-low.c (tdesc_arm): Declare.
8212 (arm_arch_setup): New function.
8213 (the_low_target): Install arm_arch_setup instead of
8214 init_registers_arm.
8215 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8216 (init_windows_x86): Rename to ...
8217 (i386_arch_setup): ... this. Set `win32_tdesc'.
8218 (the_low_target): Adjust.
8219 * win32-low.c (win32_tdesc): New global.
8220 (child_add_thread): Don't create the thread cache here.
8221 (do_initial_child_stuff): Set the new process'es tdesc.
8222 * win32-low.h (struct target_desc): Forward declare.
8223 (win32_tdesc): Declare.
8224 * lynx-i386-low.c (tdesc_i386): Declare global.
8225 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8226 * lynx-low.c (lynx_tdesc): New global.
8227 (lynx_add_process): Set the new process'es tdesc.
8228 * lynx-low.h (struct target_desc): Forward declare.
8229 (lynx_tdesc): Declare global.
8230 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8231 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8232 * nto-low.c (nto_tdesc): New global.
8233 (do_attach): Set the new process'es tdesc.
8234 * nto-low.h (struct target_desc): Forward declare.
8235 (nto_tdesc): Declare.
8236 * nto-x86-low.c (tdesc_i386): Declare.
8237 (nto_x86_arch_setup): Set `nto_tdesc'.
8238
b1fbec62
GB
82392013-06-04 Gary Benson <gbenson@redhat.com>
8240
8241 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8242 to qSupported response when appropriate.
8243 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8244 with nonzero-length annex.
8245 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8246 arguments supplied in annex.
8247
d1ec4ce7
DE
82482013-05-31 Doug Evans <dje@google.com>
8249
ac44adcb 8250 PR server/15594
d1ec4ce7
DE
8251 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8252 64 bits in 64-cross-32 environment.
8253
9b25f2d3
PA
82542013-05-28 Pedro Alves <palves@redhat.com>
8255
8256 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8257 (aarch64-without-fpu.c): Delete rule.
8258 * configure.srv (aarch64*-*-linux*): Remove references to
8259 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8260 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8261 declaration.
8262
6740dc9c
PA
82632013-05-24 Pedro Alves <palves@redhat.com>
8264
8265 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8266 instead of strchr/decode_address. Error if the range isn't split
8267 with a ','. Don't assume there's be a ':' in the action.
8268
c2d6af84
PA
82692013-05-23 Yao Qi <yao@codesourcery.com>
8270 Pedro Alves <palves@redhat.com>
8271
8272 * linux-low.c (lwp_in_step_range): New function.
8273 (linux_wait_1): If the thread was range stepping and stopped
8274 outside the stepping range, report the stop to GDB. Otherwise,
8275 continue stepping. Add range stepping debug output.
8276 (linux_set_resume_request): Copy the step range from the resume
8277 request to the lwp.
8278 (linux_supports_range_stepping): New.
8279 (linux_target_ops) <supports_range_stepping>: Set to
8280 linux_supports_range_stepping.
8281 * linux-low.h (struct linux_target_ops)
8282 <supports_range_stepping>: New field.
8283 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8284 * linux-x86-low.c (x86_supports_range_stepping): New.
8285 (the_low_target) <supports_range_stepping>: Set to
8286 x86_supports_range_stepping.
8287 * server.c (handle_v_cont): Handle 'r' action.
8288 (handle_v_requests): Append ";r" if the target supports range
8289 stepping.
8290 * target.h (struct thread_resume) <step_range_start,
8291 step_range_end>: New fields.
8292 (struct target_ops) <supports_range_stepping>:
8293 New field.
8294 (target_supports_range_stepping): New macro.
8295
58794e1a
JB
82962013-05-17 Joel Brobecker <brobecker@adacore.com>
8297
8298 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8299 confusion in comment.
8300
d631c5a7
JB
83012013-05-17 Joel Brobecker <brobecker@adacore.com>
8302
8303 * lynx-low.c (struct process_info_private): New type.
8304 (lynx_add_process): New function.
8305 (lynx_create_inferior, lynx_attach): Replace calls to
8306 add_process by calls to lynx_add_process.
8307 (lynx_resume): If PTID is null, then try using
8308 current_process()->private->last_wait_event_ptid.
8309 Add comments.
8310 (lynx_clear_inferiors): Delete. The contents of that function
8311 has been inlined in lynx_mourn;
8312 (lynx_wait_1): Save the ptid in the process's private data.
8313 (lynx_mourn): Free the process' private data. Replace call
8314 to lynx_clear_inferiors by call to clear_inferiors.
8315
96f7a20f
YQ
83162013-05-17 Yao Qi <yao@codesourcery.com>
8317
8318 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8319 the right place.
8320
db0dfaa0
LM
83212013-05-16 Luis Machado <lgustavo@codesourcery.com>
8322
8323 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8324 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8325 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8326 PT_TEXT_END_ADDR guards. Update comments.
8327 (linux_target_op) <read_offsets>: Conditionally define to
8328 linux_read_offsets if the target is UCLIBC and if it defines
8329 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8330
68f5f838
SL
83312013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8332 Andrew Jenner <andrew@codesourcery.com>
8333
8334 * Makefile.in (SFILES): Add linux-nios2-low.c.
8335 (clean): Add action to delete nios2-linux.c.
8336 (nios2-linux.c): New rule.
8337 * configure.srv: Add nios2*-*-linux*.
8338 * linux-nios2-low.c: New.
8339
1ebff1fd
HAQ
83402013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8341
8342 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8343
f6150862
HZ
83442013-04-25 Hui Zhu <hui@codesourcery.com>
8345
8346 PR gdb/15186
f6150862
HZ
8347 * ax.c (ax_printf): Add fflush.
8348
614c279d
TT
83492013-04-22 Tom Tromey <tromey@redhat.com>
8350
8351 * Makefile.in (SFILES): Add filestuff.c.
8352 (OBS): Add filestuff.o.
8353 (filestuff.o): New target.
8354 * config.in, configure: Rebuild.
8355 * configure.ac: Check for fdwalk, pipe2.
8356
7d4e5717
PA
83572013-04-17 Pedro Alves <palves@redhat.com>
8358
8359 * configure.ac (USE_THREAD_DB): Delete variable.
8360 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8361 Don't AC_SUBST USE_THREAD_DB.
8362 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8363 * config.in, configure: Regenerate.
8364
d5c93e41
PA
83652013-04-16 Pedro Alves <palves@redhat.com>
8366
8367 * linux-low.h (struct lwp_info) <thread_known>: Move under
8368 the USE_THREAD_DB #ifdef.
8369
04f5fe89
PA
83702013-04-16 Pedro Alves <palves@redhat.com>
8371
8372 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8373 (linux-low.o): Delete rule.
8374 * linux-low.h: Always include "gdb_thread_db.h" instead of
8375 conditionally including thread_db.h.
8376 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8377 HAVE_THREAD_DB_H.
8378
480b27bf
JK
83792013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8380
8381 * Makefile.in (install-only): Fix make install regression.
8382
43662968
JK
83832013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8384
8385 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8386 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8387 installation.
8388 * gdbserver.1: Remove.
8389
3e74e146
PA
83902013-03-22 Pedro Alves <palves@redhat.com>
8391
8392 * linux-low.c (handle_extended_wait): Don't call
8393 linux_enable_event_reporting.
8394
a8347a2a
TT
83952013-03-15 Tony Theodore <tonyt@logyst.com>
8396
8397 PR build/9098:
8398 * Makefile.in (SHELL): Use @SHELL@.
8399
eeb56fa7
SDJ
84002013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8401
8402 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8403 compiler warning.
8404
4fa7e2ff
JB
84052013-03-13 Joel Brobecker <brobecker@adacore.com>
8406
8407 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8408 Remove extraneous NULL element.
8409
8ddb1965
YQ
84102013-03-13 Yao Qi <yao@codesourcery.com>
8411
8412 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8413 'V' block in trace frame.
8414
9accd112
MM
84152013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8416
8417 * target.h (struct target_ops): Add btrace ops.
8418 (target_supports_btrace): New macro.
8419 (target_enable_btrace): New macro.
8420 (target_disable_btrace): New macro.
8421 (target_read_btrace): New macro.
8422 * gdbthread.h (struct thread_info): Add btrace field.
8423 * server.c: Include btrace-common.h.
8424 (handle_btrace_general_set): New function.
8425 (handle_btrace_enable): New function.
8426 (handle_btrace_disable): New function.
8427 (handle_general_set): Call handle_btrace_general_set.
8428 (handle_qxfer_btrace): New function.
8429 (struct qxfer qxfer_packets[]): Add btrace entry.
8430 * inferiors.c (remove_thread): Disable btrace.
8431 * linux-low: Include linux-btrace.h.
8432 (linux_low_enable_btrace): New function.
8433 (linux_low_read_btrace): New function.
8434 (linux_target_ops): Add btrace ops.
8435 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8436 Add srv_linux_btrace=yes.
8437 (x86_64-*-linux*): Add linux-btrace.o.
8438 Add srv_linux_btrace=yes.
8439 * configure.ac: Define HAVE_LINUX_BTRACE.
8440 * config.in: Regenerated.
8441 * configure: Regenerated.
8442
5cc22e4c
MM
84432013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8444
8445 * server.c (handle_qxfer): Preserve error message if -3 is
8446 returned.
8447 (qxfer): Document the -3 return value.
8448
7c97f91e
MM
84492013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8450
8451 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8452 (linux_btrace_h): New variable.
8453 (linux-btrace.o): New rule.
8454
be9a119c 84552013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8456 Hafiz Abid Qadeer <abidh@codesourcery.com>
8457
8458 * tracepoint.c (trace_buffer_size): New global.
8459 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8460 (init_trace_buffer): Change to one-argument function. Allocate
8461 trace buffer memory.
8462 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8463 handle QTBuffer:size packet.
8464 (cmd_bigqtbuffer_size): New function.
8465 (initialize_tracepoint): Call init_trace_buffer with
8466 DEFAULT_TRACE_BUFFER_SIZE.
8467 * server.c (handle_query): Add QTBuffer:size in the
8468 supported packets.
8469
e64f7499
YQ
84702013-03-07 Yao Qi <yao@codesourcery.com>
8471
8472 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8473 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8474 of -1.
8475 (cmd_qtsp): Adjust condition. Do post increment.
8476 Set cur_action and cur_step_action back to 0.
8477
f0ae6fc3
PA
84782013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8479
8480 PR server/15236
8481 * linux-low.c (linux_write_memory): Return early success if LEN is
8482 zero.
8483
b5b0b0af
CV
84842013-03-05 Corinna Vinschen <vinschen@redhat.de>
8485
334ad4a8 8486 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8487
589bc927
TT
84882013-02-28 Tom Tromey <tromey@redhat.com>
8489
8490 * configure.ac: Invoke AC_SYS_LARGEFILE.
8491 * configure, config.in: Rebuild.
8492
dfe07582
CV
84932013-02-28 Corinna Vinschen <vinschen@redhat.com>
8494
8495 * win32-low.c: Throughout, fix format strings and casts of
8496 printf-like functions to avoid type related warnings on all
8497 platforms.
8498 (get_child_debug_event): Print dwDebugEventCode as hex since
8499 that's how it's usually documented.
8500
736cd585
YQ
85012013-02-28 Yao Qi <yao@codesourcery.com>
8502
8503 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8504 pulongest.
8505
e1f58301
JW
85062013-02-27 Jiong Wang <jiwang@tilera.com>
8507
8508 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8509 (reg-tilegx32.c): New rule.
8510 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8511 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8512 different register info initializer according to elf class.
8513 (init_registers_tilgx32): New function. The tilegx32 register info
8514 initializer.
8515 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8516 (tile_store_gregset): Likewise.
8517
d171ca78
YQ
85182013-02-27 Yao Qi <yao@codesourcery.com>
8519
8520 * server.c (process_point_options): Print debug message when
8521 debug_threads is true.
8522
282bbdf3
YQ
85232013-02-26 Yao Qi <yao@codesourcery.com>
8524
8525 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8526
aca22551
PA
85272013-02-19 Pedro Alves <palves@redhat.com>
8528 Kai Tietz <ktietz@redhat.com>
8529
8530 PR gdb/15161
8531
8532 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8533 instead of strtoul to extract address from packet.
8534 (process_serial_event) <'z'>: Likewise.
8535
4f3cee1c
YQ
85362013-02-18 Yao Qi <yao@codesourcery.com>
8537
8538 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8539
8e1d55a3
PA
85402013-02-14 Pedro Alves <palves@redhat.com>
8541
8542 Plug memory leak.
8543
8544 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8545 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8546
458820da
PA
85472013-02-14 Pedro Alves <palves@redhat.com>
8548
8549 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8550
baea0dae
PA
85512013-02-14 Pedro Alves <palves@redhat.com>
8552
8553 * tracepoint.c (save_string): Delete.
8554 (add_tracepoint_action): Use savestring instead of save_string.
8555
0b1afbb3
PA
85562013-02-12 Pedro Alves <palves@redhat.com>
8557
8558 * linux-xtensa-low.c: Ditto.
8559 * xtensa-xtregs.c: Ditto.
8560
8a4ac37e
PA
85612013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8562
8563 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8564 thread_db.
8565
148de6bb
MS
85662013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8567
8568 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8569 aarch64_num_wp_regs and aarch64_num_bp_regs to
8570 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8571
55fac6e0
MS
85722013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8573
8574 * linux-aarch64-low.c (ps_get_thread_area): Replace
8575 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8576
176eb98c
MS
85772013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8578 Marcus Shawcroft <marcus.shawcroft@arm.com>
8579 Nigel Stephens <nigel.stephens@arm.com>
8580 Yufeng Zhang <yufeng.zhang@arm.com>
8581
8582 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8583 (aarch64.c, aarch64-without-fpu.c): New targets.
8584 * configure.srv (aarch64*-*-linux*): New.
8585 * linux-aarch64-low.c: New file.
8586
56f7af9c
MS
85872013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8588
43aaf8b6 8589 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8590 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8591 (dequeue_one_deferred_signal, linux_resume_one_thread)
8592 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8593 (linux_tracefork_grandchild, linux_test_for_tracefork)
8594 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8595 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8596 where the argument is 0.
8597
60f662b0
YQ
85982013-01-25 Yao Qi <yao@codesourcery.com>
8599
8600 * event-loop.c: Include "queue.h".
8601 (gdb_event_p): New typedef.
8602 (struct gdb_event) <next_event>: Remove.
8603 (event_queue): Change to QUEUE(gdb_event_p).
8604 (async_queue_event): Remove.
8605 (gdb_event_xfree): New.
8606 (initialize_event_loop): New.
8607 (process_event): Use API from QUEUE.
8608 (wait_for_event): Likewise.
8609 * server.c (main): Call initialize_event_loop.
8610 * server.h (initialize_event_loop): Declare.
8611
5ae4861a
YQ
86122013-01-18 Yao Qi <yao@codesourcery.com>
8613
8614 * ax.h (struct eval_agent_expr_context): New.
8615 (gdb_eval_agent_expr): Update declaration.
8616 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8617 TFRAME. Add new argument CTX.
8618 * server.h (struct eval_agent_expr_context): Declare.
8619 (agent_mem_read, agent_tsv_read): Update declaration.
8620 (agent_mem_read_string): Likewise.
8621 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8622 (add_traceframe_block): Add new argument TPOINT.
8623 Increase TPOINT->traceframe_usage.
8624 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8625 eval_tracepoint_agent_expr.
8626 (condition_true_at_tracepoint): Likewise.
8627 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8628 (agent_mem_read_string, agent_tsv_read): Likewise.
8629
85e00e85
YQ
86302013-01-16 Yao Qi <yao@codesourcery.com>
8631
8632 * linux-low.c (linux_resume_one_lwp): Don't check
8633 'lwp->bp_reinsert != 0'.
8634
4039cf45
JB
86352013-01-07 Joel Brobecker <brobecker@adacore.com>
8636 Pedro Alves <palves@redhat.com>
8637
8638 * lynx-low.c (ptrace_request_to_str): Define a temporary
8639 macro and use it to simplify this function's implementation.
8640
9044dee2
JB
86412013-01-07 Joel Brobecker <brobecker@adacore.com>
8642
8643 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8644 sets errno.
8645
e6352c8f
JB
86462013-01-07 Joel Brobecker <brobecker@adacore.com>
8647
8648 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8649
50681a27
JB
86502013-01-07 Joel Brobecker <brobecker@adacore.com>
8651
8652 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8653
3f6e77ef
JB
86542013-01-07 Joel Brobecker <brobecker@adacore.com>
8655
8656 * lynx-low.c (lynx_resume): Use the resume_info parameter
8657 to determine the ptid for the lynx_ptrace call, unless
8658 it is equal to minus_one_ptid, in which case we use the
8659 ptid of the current_inferior.
8660 (lynx_wait_1): After having received a thread create/exit
8661 event, resume the inferior's execution using the signaling
8662 thread's ptid, rather than the old ptid.
8663
7fda33ae
JB
86642013-01-07 Joel Brobecker <brobecker@adacore.com>
8665
8666 * lynx-low.c (lynx_resume): Delete variable ret.
8667
b9786c74
JB
86682013-01-01 Joel Brobecker <brobecker@adacore.com>
8669
8670 * gdbreplay.c (gdbreplay_version): Update copyright year.
8671 * server.c (gdbserver_version): Likewise.
8672
8b93d60f
JB
86732012-12-17 Joel Brobecker <brobecker@adacore.com>
8674
8675 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8676 new thread.
8677
037335a7
JB
86782012-12-17 Joel Brobecker <brobecker@adacore.com>
8679
8680 * lynx-low.c (ptrace_request_to_str): Add handling for
8681 PTRACE_GETTRACESIG.
8682
52d4cbd8
JB
86832012-12-17 Joel Brobecker <brobecker@adacore.com>
8684
8685 * lynx-low.c (lynx_attach): Delete variable new_process.
8686
ab8f6ca9
JB
86872012-12-17 Joel Brobecker <brobecker@adacore.com>
8688
8689 * lynx-low.c (lynx_create_inferior): Delete variable
8690 new_process.
8691
78cbc024
JB
86922012-12-17 Joel Brobecker <brobecker@adacore.com>
8693
8694 * lynx-low.c (ptrace_request_to_str): Do not handle
8695 PTRACE_GETTHREADLIST if this macro does not exist.
8696
14a00470
YQ
86972012-12-15 Yao Qi <yao@codesourcery.com>
8698
8699 * Makefile.in (OBS): Add notif.o.
8700 * notif.c, notif.h: New.
8701 * server.c: Include "notif.h".
8702 (struct vstop_notif) <next>: Remove.
8703 <base>: New field.
8704 (queue_stop_reply): Update.
8705 (push_event, send_next_stop_reply): Remove.
8706 (discard_queued_stop_replies): Update.
8707 (notif_stop): New variable.
8708 (handle_v_stopped): Remove.
8709 (handle_v_requests): Don't call handle_v_stopped. Call
8710 handle_ack_notif instead.
8711 (queue_stop_reply_callback): Call notif_event_enque instead
8712 of queue_stop_reply.
8713 (handle_status): Don't call send_next_stop_reply, call
8714 notif_write_event instead.
8715 (kill_inferior_callback): Likewise.
8716 (detach_or_kill_inferior_callback): Likewise.
8717 (main): Call initialize_notif.
8718 (process_serial_event): Call QUEUE_is_empty.
8719 (handle_target_event): Call notif_push instead of push event.
8720 * server.h (push_event): Remove declaration.
8721
61c125b9
TT
87222012-12-10 Tom Tromey <tromey@redhat.com>
8723
8724 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8725 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8726 macros.
8727 (.c.o): Rewrite.
8728 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8729 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8730 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8731 (amd64-linux-ipa.o, ax.o): Rewrite.
8732 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8733 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8734 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8735 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8736 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8737 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8738 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8739 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8740 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8741 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8742 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8743 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8744 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8745 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8746 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8747 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8748 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8749 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8750 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8751 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8752 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8753 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8754 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8755 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8756 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8757 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8758 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8759 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8760 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8761 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8762 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8763 (reg-tilegx.o): Remove.
8764 (all_object_files): New macro.
8765 Include .deps files.
8766 * aclocal.m4, configure: Rebuild.
8767 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8768 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8769 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8770
e90e9ad9
TT
87712012-12-05 Tom Tromey <tromey@redhat.com>
8772
8773 PR gdb/14917:
8774 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8775
02d403bf 87762012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8777
8778 * configure.ac: Check for linux/perf_event.h.
8779 * config.in: Regenerated.
8780 * configure: Regenerated.
8781
0270a750
PA
87822012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8783
8784 * hostio.c (handle_readlink): Decrease buffer size
8785 parameter passed to readlink by one byte.
8786
8c29b58e
YQ
87872012-11-26 Yao Qi <yao@codesourcery.com>
8788
8789 * configure.ac (build_warnings): Append '-Wempty-body'.
8790 * configure: Regenerated.
8791 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8792 body.
8793
8bdce1ff
PM
87942012-11-15 Pierre Muller <muller@sourceware.org>
8795
8796 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8797 * config.in: Regenerate.
8798 * configure: Regenerate.
8799 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8800 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8801 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8802 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8803 header.
8804 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8805 instead of <sys/wait.h> header.
8806 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8807
02d403bf 88082012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8809
8810 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8811 (various make rules): Remove -DGDBSERVER
8812
fbd5db48
YQ
88132012-11-09 Yao Qi <yao@codesourcery.com>
8814
8815 * spu-low.c (current_ptid): Move it to ..
8816 * gdbthread.h: ... here. New.
8817 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8818 * server.c (myresume, process_serial_event): Likewise.
8819 * thread-db.c (thread_db_find_new_threads): Likewise.
8820 * tracepoint.c (run_inferior_command): Likewise.
8821
b3dc46ff
AB
88222012-10-01 Andrew Burgess <aburgess@broadcom.com>
8823
8824 * server.c (handle_search_memory_1): Include access length in
8825 warning message.
8826
07c04788
HPN
88272012-09-05 Michael Brandt <michael.brandt@axis.com>
8828
8829 * linux-crisv32-low.c: Fix compile errors.
8830
918d227b
YQ
88312012-09-04 Yao Qi <yao@codesourcery.com>
8832
8833 * tracepoint.c (cmd_qtsv): Adjust debug message.
8834 Don't check CUR_TPOINT.
8835
18c1b81a
YQ
88362012-08-28 Yao Qi <yao@codesourcery.com>
8837
8838 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8839 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8840 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8841 Remove declarations of xmalloc, xreallloc, xstrdup and
8842 freeargv.
8843 * Makefile.in (libiberty_h): New.
8844 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8845 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8846
dc82f37b
YQ
88472012-08-23 Yao Qi <yao@codesourcery.com>
8848
8849 * server.h: Remove declaration of 'xsnprintf'.
8850
406b1477
KS
88512012-08-22 Keith Seitz <keiths@redhat.com>
8852
8853 * server.h: Include build-gnulib-gbserver/config.h.
8854 * gdbreplay.c: Likewise.
8855
e6712ff1
DE
88562012-08-08 Doug Evans <dje@google.com>
8857
8858 * Makefile.in (SFILES): Add gdb_vecs.c.
8859 (OBS): Add gdb_vecs.o.
8860 (gdb_vecs_h, host_defs_h): New variables.
8861 (thread-db.o): Add $(gdb_vecs_h) dependency.
8862 (gdb_vecs.o): New rule.
8863 * thread-db.c: #include "gdb_vecs.h".
8864 (thread_db_load_search): Use a vector to iterate over path elements.
8865 Handle text appearing after "$pdir".
8866
8867 * configure.ac: Add check for strstr.
8868 * config.in: Regenerate.
8869 * configure: Regenerate.
8870
7c3270ae
UW
88712012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8872
8873 * hostio.c (handle_pread): If pread fails, fall back to attempting
8874 lseek/read.
8875 (handle_pwrite): Likewise for pwrite.
8876
b62e2b27
UW
88772012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8878
8879 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8880 between unsupported TYPE and unimplementable ADDR/LEN combination.
8881 (arm_insert_point): Act on new return value.
8882
78a99e91
PA
88832012-07-31 Pedro Alves <palves@redhat.com>
8884
8885 * server.c (process_point_options): Only skip tokens if we find
8886 one that is unrecognized. Don't treat 'X' specially while
8887 skipping unrecognized tokens.
8888
fcf303ab
UW
88892012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8890
8891 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8892 to 4-byte-align HW breakpoint addresses for Thumb.
8893
7255706c
YQ
88942012-07-27 Yao Qi <yao@codesourcery.com>
8895
8896 PR remote/14161.
8897
8898 * server.h: Declare gdb_agent_about_to_close.
8899 * target.c (kill_inferior): Include "agent.h".
8900 New. Send command 'kill'.
8901 * target.h (kill_inferior): Removed macro.
8902 * tracepoint.c (gdb_agent_about_to_close): New.
8903 (gdb_agent_helper_thread): Handle command 'close'.
8904 Wait endlessly until the inferior stops.
8905 Install gdb_agent_remove_socket to atexit hook.
8906 (agent_socket_name): New static variable.
8907 (gdb_agent_socket_init): Replace local variable 'name' with
8908 'agent_socket_name'.
8909 (gdb_agent_remove_socket): New.
8910
5a3f286f
YQ
89112012-07-27 Yao Qi <yao@codesourcery.com>
8912
8913 * server.c (process_point_options): Stop at 'X' when parsing.
8914
961bd387
ME
89152012-07-19 Michael Eager <eager@eagercon.com>
8916
a261b8f5 8917 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8918 to hw_execute.
8919 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8920 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8921 hardware breakpoint.
8922
aa7c7447
JK
89232012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8924
8925 * gdbserver/linux-low.c (initialize_low): Call
8926 linux_ptrace_init_warnings.
8927
7f216e7c
DE
89282012-07-02 Doug Evans <dje@google.com>
8929
8930 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8931 pointer to int.
8932
d3ce09f5
SS
89332012-07-02 Stan Shebs <stan@codesourcery.com>
8934
8935 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8936 (ax.o): Add it to build rule.
8937 (ax-ipa.o): Ditto.
8938 (OBS): Add format.o.
8939 (IPA_OBS): Add format.o.
8940 * server.c (handle_query): Claim support for breakpoint commands.
8941 (process_point_options): Add command case.
8942 (process_serial_event): Leave running if there are printfs in
8943 effect.
8944 * mem-break.h (any_persistent_commands): Declare.
8945 (add_breakpoint_commands): Declare.
8946 (gdb_no_commands_at_breakpoint): Declare.
8947 (run_breakpoint_commands): Declare.
8948 * mem-break.c (struct point_command_list): New struct.
8949 (struct breakpoint): New field command_list.
8950 (any_persistent_commands): New function.
8951 (add_commands_to_breakpoint): New function.
8952 (add_breakpoint_commands): New function.
8953 (gdb_no_commands_at_breakpoint): New function.
8954 (run_breakpoint_commands): New function.
8955 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8956 locally.
8957 * ax.c: Include format.h.
8958 (ax_printf): New function.
8959 (gdb_eval_agent_expr): Add printf opcode.
8960
2f8f6aed
YQ
89612012-06-13 Yao Qi <yao@codesourcery.com>
8962
8963 * server.c (start_inferior): Remove duplicated writes to fields
8964 'last_resume_kind' and 'last_status' of 'current_inferior'.
8965
0c9070b3
YQ
89662012-06-12 Yao Qi <yao@codesourcery.com>
8967 Pedro Alves <palves@redhat.com>
8968
8969 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8970 comment.
8971 * server.c (handle_v_cont): Extend comment.
8972
c52daf70
YQ
89732012-06-11 Yao Qi <yao@codesourcery.com>
8974
8975 * linux-low.c (linux_attach): Add 'static'.
8976
d38bbb0a
YQ
89772012-06-06 Yao Qi <yao@codesourcery.com>
8978
8979 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8980
89dc0afd
JK
89812012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8982
8983 Fix gcc -flto compilation warning.
8984 * server.c (main): Make variable multi_mode and attach volatile.
8985
75f62ce7
TJB
89862012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8987
8988 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8989 if the platform doesn't know about it.
8990
65f479b6
PA
89912012-05-30 Jeff Kenton <jkenton@tilera.com>
8992
8993 * Makefile.in (SFILES): Add linux-tile-low.c.
8994 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8995 * configure.srv: Handle tilegx-*-linux*.
8996 * linux-tile-low.c: New file.
8997
0c5bf5a9
JK
89982012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8999
9000 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9001
a493e3e2
PA
90022012-05-24 Pedro Alves <palves@redhat.com>
9003
9004 PR gdb/7205
9005
43aaf8b6 9006 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9007
2ea28649
PA
90082012-05-24 Pedro Alves <palves@redhat.com>
9009
9010 PR gdb/7205
9011
9012 Replace target_signal with gdb_signal throughout.
9013
8d409d16
MR
90142012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9015
9016 * linux-low.c (linux_store_registers): Avoid the copying sequence
9017 when no data has been retrieved by ptrace.
9018
23512c01
MGD
90192012-05-22 Will Deacon <will.deacon@arm.com>
9020
9021 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9022 Include asm/ptrace.h.
9023 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9024 already defined.
9025
4934b29e
MR
90262012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9027
9028 * linux-low.c (linux_store_registers): Don't re-retrieve data
9029 with ptrace that has already been obtained from /proc. Always
9030 copy any data retrieved with ptrace to the buffer supplied.
9031
bde24c0a
PA
90322012-05-11 Yao Qi <yao@codesourcery.com>
9033 Pedro Alves <palves@redhat.com>
9034
9035 * linux-low.c (enum stopping_threads_kind): New.
9036 (stopping_threads): Change type to `enum stopping_threads_kind'.
9037 (handle_extended_wait): If stopping and suspending threads, leave
9038 the new_lwp suspended too.
9039 (linux_wait_for_event): Adjust.
9040 (stop_all_lwps): Set `stopping_threads' to
9041 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9042 whether we're suspending threads or just stopping them. Assert no
9043 recursion happens.
9044
623b6bdf
YQ
90452012-04-29 Yao Qi <yao@codesourcery.com>
9046
9047 * server.h: Move some code to ...
9048 * gdbthread.h: ... here. New.
9049 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9050 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9051 (nto-low.o, win32-low.o): Likewise.
9052 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9053 * regcache.c, remote-utils.c, server.c: Likewise.
9054 * target.c, tracepoint.c, win32-low.c: Likewise.
9055
f15f9948
TJB
90562012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9057
9058 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9059 (PTRACE_ARG4_TYPE): Likewise.
9060 (PTRACE_XFER_TYPE): Likewise.
9061 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9062 ptrace to PTRACE_ARG3_TYPE.
9063 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9064 (PTRACE_ARG4_TYPE): Likewise.
9065 (PTRACE_XFER_TYPE): Likewise.
9066 (linux_detach_one_lwp): Cast fourth argument of
9067 ptrace to long then PTRACE_ARG4_TYPE.
9068 (regsets_fetch_inferior_registers): Cast third argument of
9069 ptrace to long then PTRACE_ARG3_TYPE.
9070 (regsets_store_inferior_registers): Likewise.
9071
38ea300a
PA
90722012-04-20 Pedro Alves <palves@redhat.com>
9073
9074 * configure: Regenerate.
9075
c971b7fa
PA
90762012-04-19 Pedro Alves <palves@redhat.com>
9077
43aaf8b6 9078 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9079 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9080 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9081 (all, install-only, uninstall, clean-info, all-lib, clean): No
9082 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9083 (maintainer-clean realclean distclean): Use subdir_do.
9084 (subdir_do): New.
9085 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9086 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9087 * acinclude.m4: Include acx_configure_dir.m4.
9088 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9089 calls. Call AC_PROG_RANLIB. Configure gnulib using
9090 ACX_CONFIGURE_DIR.
9091 (GNULIB): New.
9092 (GNULIB_STDINT_H): Adjust.
9093 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9094 * gdbreplay.c: Include build-gnulib/config.h.
9095 * server.h: Likewise.
9096 * aclocal.m4: Regenerate.
9097 * config.in: Regenerate.
9098 * configure: Regenerate.
c971b7fa 9099
809277f8
PA
91002012-04-19 Pedro Alves <palves@redhat.com>
9101
9102 * Makefile.in (LIBGNU, INCGNU): Adjust.
9103 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9104 (all, install-only, uninstall, clean-info, all-lib, clean)
9105 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9106 * configure.ac: Adjust AC_OUTPUT output.
9107 * aclocal.m4: Regenerate.
9108 * configure: Regenerate.
9109
fd9bb8b8
PA
91102012-04-19 Pedro Alves <palves@redhat.com>
9111
9112 * Makefile.in (generated_files): New.
9113 (server_h): Remove the explicit dependency on config.h, and depend
9114 on $generated_files.
9115
1c298c66
PA
91162012-04-19 Pedro Alves <palves@redhat.com>
9117
9118 * Makefile.in (INCGNU): Add -Ignulib.
9119
57c4b50b
PA
91202012-04-19 Pedro Alves <palves@redhat.com>
9121
9122 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9123 (INCGNU): ... this, and spell out -I here.
9124 (GNULIB_LIB): Rename to ...
9125 (LIBGNU): ... this.
9126 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9127
1030e047
PA
91282012-04-19 Pedro Alves <palves@redhat.com>
9129
9130 * config.in: Regenerate.
9131
447d4319
PA
91322012-04-19 Pedro Alves <palves@redhat.com>
9133
9134 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9135 * server.h (memmem): Remove declaration.
9136 * config.in: Regenerate.
9137 * configure: Regenerate.
9138
aad9eab9
YQ
91392012-04-19 Yao Qi <yao@codesourcery.com>
9140
9141 * Makefile.in (SFILES): Add common/vec.c.
9142 (OBS): Add vec.o.
9143 (vec.o): New rule.
9144
3e10640f
YQ
91452012-04-19 Yao Qi <yao@codesourcery.com>
9146
9147 * remote-utils.c (prepare_resume_reply): Replace with macro
9148 target_core_of_thread.
9149 * server.c (handle_qxfer_threads_proper): Likewise.
9150 * target.h (traget_core_of_thread): New macro.
9151
71622373
PA
91522012-04-18 Pedro Alves <palves@redhat.com>
9153
9154 * aclocal.m4: Regenerate.
9155 * configure: Regenerate.
9156
80d26939
YQ
91572012-04-16 Yao Qi <yao@codesourcery.com>
9158
9159 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9160 duplicated on address.
9161
42476b70
YQ
91622012-04-16 Yao Qi <yao@codesourcery.com>
9163
9164 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9165 (struct tracepoint_action_ops) <send>: New field.
9166 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9167 (agent_expr_send, x_tracepoint_action_send): New.
9168 (l_tracepoint_action_send): New.
9169 (cmd_qtdp): Download and install tracepoint
9170 according to `use_agent'.
9171 (run_inferior_command): Add one more parameter `len'.
9172 Update callers.
9173 (tracepoint_send_agent): New.
9174 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9175
7bc83639
YQ
91762012-04-16 Yao Qi <yao@codesourcery.com>
9177
9178 * tracepoint.c (download_tracepoints): Moved to ...
9179 (cmd_qtstart): ... here.
9180
5f18041e
YQ
91812012-04-14 Yao Qi <yao@codesourcery.com>
9182
9183 * tracepoint.c: Include inttypes.h.
9184 (struct collect_memory_action): Use sized types.
9185 (struct tracepoint): Likewise.
9186 (cmd_qtdp, stop_tracing): Update print specifiers.
9187 (cmd_qtp, response_tracepoint): Likewise.
9188 (collect_data_at_tracepoint): Likewise.
9189 (collect_data_at_step): Likewise.
9190
55a8c076
YQ
91912012-04-14 Yao Qi <yao@codesourcery.com>
9192
9193 Import gnulib module inttypes.
9194 * aclocal.m4, config.in, configure: Regenerated.
9195
dc750257
YQ
91962012-04-14 Yao Qi <yao@codesourcery.com>
9197
9198 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9199 Makefile and config.status at last.
9200
0ab5faf9
YQ
92012012-04-13 Yao Qi <yao@codesourcery.com>
9202
9203 * tracepoint.c: Include stdint.h unconditionally.
9204
18f5fd81
TJB
92052012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9206
9207 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9208 on BFD_HAVE_SYS_PROCFS_TYPE.
9209 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9210 * configure: Regenerate.
9211 * config.in: Likewise.
9212
4d47af5c
L
92132012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9214
9215 * Makefile.in (clean): Also remove x32.c x32-linux.c
9216 x32-avx.c x32-avx-linux.c.
9217 (x32.o): New target.
9218 (x32.c): Likewise.
9219 (x32-linux.o): Likewise.
9220 (x32-linux.c): Likewise.
9221 (x32-avx.o): Likewise.
9222 (x32-avx.c): Likewise.
9223 (x32-avx-linux.o): Likewise.
9224 (x32-avx-linux.c): Likewise.
9225
9226 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9227 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9228 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9229 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9230 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9231 i386/x32-avx-linux.xml.
9232
9233 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9234 (init_registers_x32_avx_linux): Likwise.
9235 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9236 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9237
ecedbe58
PA
92382012-04-13 Pedro Alves <palves@redhat.com>
9239
9240 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9241 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9242 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9243 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9244 the sub-make.
9245
c92b5177
L
92462012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9247
9248 * linux-x86-low.c (compat_x32_clock_t): New.
9249 (compat_x32_siginfo_t): Likewise.
9250 (compat_x32_siginfo_from_siginfo): Likewise.
9251 (siginfo_from_compat_x32_siginfo): Likewise.
9252 (linux_is_elf64): Likewise.
9253 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9254 and siginfo_from_compat_x32_siginfo for x32.
9255 (x86_arch_setup): Set linux_is_elf64.
9256
214d508e
L
92572012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9258
9259 PR gdb/13969
9260 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9261 e_machine field.
9262 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9263 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9264 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9265 compatible with process.
9266
c9a1864a
YQ
92672012-04-12 Yao Qi <yao@codesourcery.com>
9268
9269 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9270 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9271 (install-only, install-info, clean): Handle sub dir gnulib.
9272 (all-lib, am--refresh): New targets.
9273 (memmem.o): Remove target.
9274 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9275 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9276 (AC_REPLACE_FUNCS): Remove memmem.
9277 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9278 (AC_OUTPUT): Generate Makefile in gnulib/.
9279 * aclocal.m4, config.in, configure: Regenerated.
9280
367ba2c2
MR
92812012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9282
9283 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9284
9d236627
PA
92852012-04-05 Pedro Alves <palves@redhat.com>
9286
9287 -Werror=strict-aliasing
9288
9289 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9290 pointer.
9291
111217b3
PA
92922012-04-04 Pedro Alves <palves@redhat.com>
9293
9294 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9295 (sparc_store_gregset_from_stack, sparc_store_gregset)
9296 (sparc_breakpoint_at): Fix formatting.
9297
8365dcf5
TJB
92982012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9299
9300 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9301 are available.
9302 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9303 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9304 * config.in: Regenerate.
9305 * configure: Likewise.
9306
689cc2ae
PA
93072012-03-29 Pedro Alves <palves@redhat.com>
9308
9309 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9310 Correct ptrace arguments.
9311
c14dfd32
PA
93122012-03-28 Pedro Alves <palves@redhat.com>
9313
9314 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9315 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9316 (IA64_FR1_REGNUM): New defines.
9317 (ia64_fetch_register): New.
9318 (the_low_target): Install it.
9319 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9320 field.
9321 * linux-low.c (linux_fetch_registers): Try the
9322 the_low_target.fetch_register hook first.
9323
9324 * linux-arm-low.c (the_low_target): Adjust.
9325 * linux-bfin-low.c (the_low_target): Adjust.
9326 * linux-cris-low.c (the_low_target): Adjust.
9327 * linux-crisv32-low.c (the_low_target): Adjust.
9328 * linux-m32r-low.c (the_low_target): Adjust.
9329 * linux-m68k-low.c (the_low_target): Adjust.
9330 * linux-mips-low.c (the_low_target): Adjust.
9331 * linux-ppc-low.c (the_low_target): Adjust.
9332 * linux-s390-low.c (the_low_target): Adjust.
9333 * linux-sh-low.c (the_low_target): Adjust.
9334 * linux-sparc-low.c (the_low_target): Adjust.
9335 * linux-tic6x-low.c (the_low_target): Adjust.
9336 * linux-x86-low.c (the_low_target): Adjust.
9337 * linux-xtensa-low.c (the_low_target): Adjust.
9338
63c88e13
PA
93392012-03-26 Pedro Alves <palves@redhat.com>
9340
9341 * server.c (handle_qxfer_libraries): Don't bail early if
9342 the_target->qxfer_libraries_svr4 is not NULL.
9343
fb723180
PA
93442012-03-26 Pedro Alves <palves@redhat.com>
9345
9346 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9347
0afae3cf
PA
93482012-03-23 Pedro Alves <palves@redhat.com>
9349
9350 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9351 "library-list-svr4" element's start tag when the the DSO list is
9352 empty.
9353
485f1ee4
PA
93542012-03-23 Pedro Alves <palves@redhat.com>
9355
9356 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9357 a variable whose type size is the same as the inferior's pointer
9358 size.
9359
a5362b9a
TS
93602012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9361
9362 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9363 struct siginfo.
9364 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9365 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9366 * linux-low.h: Include <signal.h>.
9367 (struct siginfo): Remove forward declaration.
9368 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9369 struct siginfo.
9370
d226c142
MF
93712012-03-21 Mike Frysinger <vapier@gentoo.org>
9372
9373 * .gitignore: Ignore more files.
9374
122f36ef
PA
93752012-03-19 Pedro Alves <palves@redhat.com>
9376 Jan Kratochvil <jan.kratochvil@redhat.com>
9377
9378 * server.c (cont_thread, general_thread): Add describing comments.
9379 (start_inferior): Clear `cont_thread'.
9380 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9381 of a process.
9382
fc3e5175
YQ
93832012-03-15 Yao Qi <yao@codesourcery.com>
9384
9385 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9386 handling to ...
9387 (cmd_qtdp): ... here.
9388
8d0d92cd
YQ
93892012-03-15 Yao Qi <yao@codesourcery.com>
9390
9391 * tracepoint.c (struct tracepoint_action_ops): New.
9392 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9393 (m_tracepoint_action_download): New.
9394 (r_tracepoint_action_download): New.
9395 (x_tracepoint_action_download): New.
9396 (l_tracepoint_action_download): New.
9397 (add_tracepoint_action): Install `action->ops' according type.
9398 (download_tracepoint_1): Move code `download' function pointer
9399 of various tracepoint_action_ops.
9400
87b0bb13
JK
94012012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9402
9403 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9404 linux_ptrace_attach_warnings.
9405
5f572dec
JK
94062012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9407
9408 * Makefile.in (linux-ptrace.o): New.
9409 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9410 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9411 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9412 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9413 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9414 of these targets.
9415 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9416
f4647387
YQ
94172012-03-08 Yao Qi <yao@codesourcery.com>
9418 Pedro Alves <palves@redhat.com>
9419
9420 Fix PR server/13392.
9421 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9422 offset of JMP insn.
9423 * tracepoint.c (remove_tracepoint): New.
9424 (cmd_qtdp): Call remove_tracepoint when failed to install.
9425
9b224c5e
PA
94262012-03-07 Pedro Alves <palves@redhat.com>
9427
9428 * linux-low.c (get_detach_signal): New.
9429 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9430 Pass on pending signals to PTRACE_DETACH. Check the result of the
9431 ptrace call.
9432 * server.c (program_signals, program_signals_p): New.
9433 (handle_general_set): Handle QProgramSignals.
9434 * server.h (program_signals, program_signals_p): Declare.
9435
e237a7e2
JK
94362012-03-05 Pedro Alves <palves@redhat.com>
9437 Jan Kratochvil <jan.kratochvil@redhat.com>
9438
9439 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9440 New comment why.
9441
5808517f
YQ
94422012-03-03 Yao Qi <yao@codesourcery.com>
9443
9444 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9445 agent_look_up_symbols.
9446
58b4daa5
YQ
94472012-03-03 Yao Qi <yao@codesourcery.com>
9448
9449 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9450 (linux-x86-low.o): Likewise.
9451 * server.h: Remove in_process_agent_loaded.
9452 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9453 common/agent.c.
9454 Update callers.
9455
8ffcbaaf
YQ
94562012-03-03 Yao Qi <yao@codesourcery.com>
9457
9458 * tracepoint.c (gdb_agent_capability): New global.
9459 (in_process_agent_loaded_ust): Renamed to
9460 `in_process_agent_supports_ust'.
9461 Update callers.
9462 (in_process_agent_supports_ust): Call agent_capability_check.
9463 (clear_installed_tracepoints): Assert that agent supports
9464 agent.
9465
d1feda86
YQ
94662012-03-03 Yao Qi <yao@codesourcery.com>
9467
9468 * linux-low.c (linux_supports_agent): New.
9469 (linux_target_ops): Initialize field `supports_agent' with
9470 linux_supports_agent.
9471 * target.h (struct target_ops) <supports_agent>: New.
9472 (target_supports_agent): New macro.
9473 * server.c (handle_general_set): Handle packet 'QAgent'.
9474 (handle_query): Send `QAgent+'.
9475 * Makefile.in (server.o): Depends on agent.h.
9476
2fa291ac
YQ
94772012-03-03 Yao Qi <yao@codesourcery.com>
9478
9479 * Makefile.in (OBS): Add agent.o.
9480 Add new rule for agent.o.
9481 Track dependence of tracepoint.c on agent.h.
9482 * tracepoint.c (run_inferior_command_1):
9483 (run_inferior_command): Call agent_run_command.
9484 (gdb_ust_connect_sync_socket): Deleted. Move it to
9485 common/agent.c.
9486 (resume_thread, stop_thread): Likewise.
9487 (gdb_ust_socket_init): Renamed to ...
9488 (gdb_agent_socket_init): ... New.
9489 (gdb_ust_thread): Renamed to ...
9490 (gdb_agent_helper_thread): ... New.
9491 (gdb_ust_init): Move some code to ...
9492 (gdb_agent_init): ... here. New.
9493 [HAVE_UST]: Call gdb_ust_init.
9494 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9495 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9496 * config.in, configure: Regenerated.
9497
05044653
PA
94982012-03-02 Pedro Alves <palves@redhat.com>
9499
9500 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9501 * linux-low.c (struct simple_pid_list): New.
9502 (stopped_pids): New a struct simple_pid_list pointer.
9503 (add_to_pid_list, pull_pid_from_list): New.
9504 (handle_extended_wait): Don't assume the first signal new children
9505 report is SIGSTOP. Adjust call to pull_pid_from_list.
9506 (linux_wait_for_lwp): Adjust.
9507
8d00225b
YQ
95082012-03-02 Yao Qi <yao@codesourcery.com>
9509
9510 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9511 debug log.
9512
19560ba5
YQ
95132012-03-02 Yao Qi <yao@codesourcery.com>
9514
9515 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9516 `stop_pc' and `tpoint'. Update caller.
9517
1faeff08
MR
95182012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9519
9520 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9521 * linux-low.c (use_linux_regsets): New macro.
9522 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9523 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9524 (linux_register_in_regsets): New function.
9525 (usr_fetch_inferior_registers): Skip registers covered by
9526 regsets.
9527 (usr_store_inferior_registers): Likewise.
9528 (usr_fetch_inferior_registers): New macro.
9529 (usr_store_inferior_registers): Likewise.
9530 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9531 (linux_store_registers): Likewise.
9532 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9533 prototype.
9534 (init_registers_mips64_dsp_linux): Likewise.
9535 (init_registers_mips_linux): New macro.
9536 (init_registers_mips_dsp_linux): Likewise.
9537 (mips_dsp_num_regs): Likewise.
9538 (DSP_BASE, DSP_CONTROL): New fallback macros.
9539 (mips_base_regs): New macro.
9540 (mips_regmap): Use it. Fix the size.
9541 (mips_dsp_regmap): New variable.
9542 (mips_dsp_regset_bitmap): Likewise.
9543 (mips_arch_setup): New function.
9544 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9545 than mips_regmap.
9546 (mips_cannot_store_register): Likewise.
9547 (the_low_target): Update .arch_setup, .num_regs and .regmap
9548 initializers. Add .regset_bitmap initializer.
9549 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9550 initializer.
9551 * linux-bfin-low.c (the_low_target): Likewise.
9552 * linux-cris-low.c (the_low_target): Likewise.
9553 * linux-crisv32-low.c (the_low_target): Likewise.
9554 * linux-ia64-low.c (the_low_target): Likewise.
9555 * linux-m32r-low.c (the_low_target): Likewise.
9556 * linux-m68k-low.c (the_low_target): Likewise.
9557 * linux-ppc-low.c (the_low_target): Likewise.
9558 * linux-s390-low.c (the_low_target): Likewise.
9559 * linux-sh-low.c (the_low_target): Likewise.
9560 * linux-sparc-low.c (the_low_target): Likewise.
9561 * linux-tic6x-low.c (the_low_target): Likewise.
9562 * linux-x86-low.c (the_low_target): Likewise.
9563 * linux-xtensa-low.c (the_low_target): Likewise.
9564 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9565 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9566 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9567 srv_xmlfiles.
9568 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9569 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9570
c03e6ccc
YQ
95712012-02-29 Yao Qi <yao@codesourcery.com>
9572 Pedro Alves <palves@redhat.com>
9573
9574 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9575 `step_over_finished' is true.
9576
644cebc9
PA
95772012-02-27 Pedro Alves <palves@redhat.com>
9578
9579 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9580 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9581
c14d7ab2
PA
95822012-02-27 Pedro Alves <palves@redhat.com>
9583
9584 PR server/9684
9585 * linux-low.c (pid_is_stopped): New.
9586 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9587
412c89dd
LM
95882012-02-25 Luis Machado <lgustavo@codesourcery.com>
9589
9590 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9591 of conditions.
9592
b745defe
MR
95932012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9594
9595 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9596
9f3a5c85
LM
95972012-02-24 Luis Machado <lgustavo@codesourcery>
9598
9599 * server.c (handle_query): Advertise support for target-side
9600 breakpoint condition evaluation.
9601 (process_point_options): New function.
9602 (process_serial_event): When inserting a breakpoint, check for
9603 a target-side condition that should be evaluated.
9604
9605 * mem-break.c: Include regcache.h and ax.h.
9606 (point_cond_list_t): New data structure.
9607 (breakpoint) <cond_list>: New field.
9608 (find_gdb_breakpoint_at): Make non-static.
9609 (delete_gdb_breakpoint_at): Clear any target-side
9610 conditions.
9611 (clear_gdb_breakpoint_conditions): New function.
9612 (add_condition_to_breakpoint): Likewise.
9613 (add_breakpoint_condition): Likewise.
9614 (gdb_condition_true_at_breakpoint): Likewise.
9615 (gdb_breakpoint_here): Return result directly instead
9616 of going through a local variable.
9617
9618 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9619 (clear_gdb_breakpoint_conditions): Likewise.
9620 (add_breakpoint_condition): Likewise.
9621 (gdb_condition_true_at_breakpoint): Likewise.
9622
9623 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9624 (need_step_over_p): Take target-side breakpoint condition into
9625 consideration.
9626
5e1dc496
LM
96272012-02-24 Luis Machado <lgustavo@codesourcery>
9628
9629 * server.h: Include tracepoint.h.
9630 (agent_mem_read, agent_get_trace_state_variable_value,
9631 agent_set_trace_state_variable_value,
9632 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9633 get_set_tsv_func_addr): New prototypes.
9634
9635 * ax.h: New include file.
9636 * ax.c: New source file.
9637
9638 * tracepoint.c: Include ax.h.
9639 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9640 agent_expr, eval_result_type): Move to ax.h.
9641 (parse_agent_expr): Rename to ...
9642 (gdb_parse_agent_expr): ... this, make it non-static and move
9643 to ax.h.
9644 (unparse_agent_expr) Rename to ...
9645 (gdb_unparse_agent_expr): ... this, make it non-static and move
9646 to ax.h.
9647 (eval_agent_expr): Rename to ...
9648 (eval_tracepoint_agent_expr): ... this.
9649 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9650 forward declarations.
9651 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9652 (agent_get_trace_state_variable_value): New function.
9653 (agent_set_trace_state_variable_value): New function.
9654 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9655 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9656 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9657 (condition_true_at_tracepoint): Likewise.
9658 (parse_agent_expr): Rename to ...
9659 (gdb_parse_agent_expr): ... this and move to ax.c.
9660 (unparse_agent_expr): Rename to ...
9661 (gdb_unparse_agent_expr): ... this and move to ax.c.
9662 (gdb_agent_op_name): Move to ax.c.
9663 (eval_agent_expr): Rename to ...
9664 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9665 and move to ax.c.
9666 (eval_tracepoint_agent_expr): New function.
9667 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9668 non-static.
5e1dc496
LM
9669 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9670 ax.c.
9671 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9672 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9673 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9674 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9675 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9676 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9677 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9678 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9679 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9680 (compile_bytecodes): Remove forward declaration.
9681 (is_goto_target): Move to ax.c.
9682 (compile_bytecodes): Move to ax.c and call
9683 agent_get_trace_state_variable_value (...) and
9684 agent_set_trace_state_variable_value (...).
9685
9686 * Makefile.in: Update ax.c and IPA dependencies.
9687
277e4e52
PA
96882012-02-24 Pedro Alves <palves@redhat.com>
9689
9690 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9691 (cmd_bigqtbuffer_circular): ... this. Only handle
9692 'QTBuffer:circular:'.
9693 (handle_tracepoint_general_set): Adjust.
9694
bf4c19f7
YQ
96952012-02-16 Yao Qi <yao@codesourcery.com>
9696
9697 * inferiors.c: Move code to ...
9698 * dll.c: .... here. New.
9699 * server.h: Declare clear_dlls.
9700 * Makefile.in (SFILES): Add dll.c.
9701 (OBS): Add dll.o
9702 (dll.o): New rule.
9703
d73f2619
YQ
97042012-02-11 Yao Qi <yao@codesourcery.com>
9705
9706 * server.c: (handle_monitor_command): Add a new parameter
9707 `own_buf'.
9708 (handle_query): Update caller.
9709
f8255c2a
JB
97102012-02-09 Joel Brobecker <brobecker@adacore.com>
9711
9712 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9713 * configure, config.in: Regenerate.
9714 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9715 is not defined.
9716
da84f473
PA
97172012-02-02 Pedro Alves <palves@redhat.com>
9718
9719 Try SIGKILL first, then PTRACE_KILL.
9720 * linux-low.c (linux_kill_one_lwp): New.
9721 (linux_kill_one_lwp): Rename to ...
9722 (kill_one_lwp_callback): ... this. Use the new
9723 linux_kill_one_lwp.
9724
e886a173
PA
97252012-02-02 Pedro Alves <palves@redhat.com>
9726
9727 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9728 inferior.
9729
be07f1a2
PA
97302012-01-27 Pedro Alves <palves@redhat.com>
9731
9732 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9733 (elf_64_file_p): Make static.
9734 (linux_pid_exe_is_elf_64_file): New.
9735 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9736 Delete declarations.
9737 (linux_pid_exe_is_elf_64_file): Declare.
9738 * linux-x86-low.c (x86_arch_setup): Use
9739 linux_pid_exe_is_elf_64_file.
9740
d8301ad1
JK
97412012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9742
9743 * linux-low.c (linux_wait_for_event_1): Rename to ...
9744 (linux_wait_for_event): ... here and merge it with former
9745 linux_wait_for_event - new variable wait_ptid, use it.
9746 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9747
01b17894
PA
97482012-01-23 Pedro Alves <palves@redhat.com>
9749
9750 * server.c (main): Avoid yet another case of infinite loop while
9751 detaching/killing after a longjmp.
9752
e825046f
JK
97532012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9754
9755 Code cleanup.
9756 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9757
b9e7b9c3
UW
97582012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9759
9760 * hostio.c (handle_readlink): New function.
9761 (handle_vFile): Call it to handle "vFile:readlink" packets.
9762
901f9912
UW
97632012-01-20 Pedro Alves <palves@redhat.com>
9764 Ulrich Weigand <ulrich.weigand@linaro.org>
9765
9766 * server.c (handle_v_requests): Only support vAttach and vRun to
9767 start multiple processes when in extended protocol mode.
9768
fc1ab1a0
PA
97692012-01-17 Pedro Alves <palves@redhat.com>
9770
9771 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9772 memalign plus mprotect to allocate the scratch buffer.
9773
7d5d4e98
PA
97742012-01-13 Pedro Alves <palves@redhat.com>
9775
9776 * server.c (attach_inferior): Clear `cont_thread'.
9777
f128d5e9
PA
97782012-01-13 Pedro Alves <palves@redhat.com>
9779
9780 * server.c (main): Avoid infinite loop while detaching/killing
9781 after a longjmp.
9782
06db92f0
DE
97832012-01-09 Doug Evans <dje@google.com>
9784
9785 * server.c (start_inferior): Set last_ptid in --wrapper case.
9786
32d92999
YQ
97872012-01-06 Yao Qi <yao@codesourcery.com>
9788
9789 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9790 defined.
9791 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9792
5e0a92a9
YQ
97932012-01-04 Yao Qi <yao@codesourcery.com>
9794
9795 * tracepoint.c (cmd_qtdp): Print debug message
9796 for static tracepoint.
9797
ae639e8c
YQ
97982012-01-04 Yao Qi <yao@codesourcery.com>
9799
9800 * tracepoint.c (trace_vdebug): Differentiate debug message
9801 between gdbserver and IPA.
9802
f72429c5
YQ
98032012-01-03 Yao Qi <yao@codesourcery.com>
9804
9805 * tracepoint.c (tracepoint_was_hit): Don't collect for
9806 static tracepoint.
9807
12c3e59c
JB
98082012-01-02 Joel Brobecker <brobecker@adacore.com>
9809
9810 * terminal.h: Reformat copyright header.
9811
67827812
JB
98122012-01-02 Joel Brobecker <brobecker@adacore.com>
9813
9814 * server.c (gdbserver_version): Update copyright year.
9815 * gdbreplay.c (gdbreplay_version): Likewise.
9816
3e52c33d
JK
98172011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9818
9819 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9820
9821 Revert:
9822 2011-12-18 Hui Zhu <teawater@gmail.com>
9823 * linux-low.c (linux_create_inferior): Save return value to ret.
9824
66f1260e
HZ
98252011-12-18 Hui Zhu <teawater@gmail.com>
9826
9827 * linux-low.c (linux_create_inferior): Save return value to ret.
9828
e77616d7
DE
98292011-12-16 Doug Evans <dje@google.com>
9830
e7b06c57
DE
9831 * linux-low.c (linux_create_inferior): If stdio connection,
9832 redirect stdin from /dev/null, stdout to stderr.
9833 * remote-utils.c (remote_is_stdio): New static global.
9834 (remote_connection_is_stdio): New function.
9835 (remote_prepare): Handle stdio connection.
9836 (remote_open): Ditto.
9837 (remote_close): Don't close stdin for stdio connections.
9838 (read_prim,write_prim): New functions. Replace all calls to
9839 read/write to these.
9840 * server.c (main): Watch for "-" argument. Move call to
9841 remote_prepare before start_inferior.
9842 * server.h (STDIO_CONNECTION_NAME): New macro.
9843 (remote_connection_is_stdio): Declare.
9844
e77616d7
DE
9845 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9846 in debugging output.
9847
82067193
YQ
98482011-12-15 Yao Qi <yao@codesourcery.com>
9849
9850 * tracepoint.c: Include sys/syscall.h.
9851 (gdb_ust_thread): Remove preprocessor conditional.
9852
82bfbe7e
PA
98532011-12-14 Pedro Alves <pedro@codesourcery.com>
9854
9855 * linux-low.c (linux_detach_one_lwp): Call
9856 the_low_target.prepare_to_resume before detaching.
9857
712c6575
YQ
98582011-12-14 Yao Qi <yao@codesourcery.com>
9859
9860 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9861 of write.
9862
d54d1edf
YQ
98632011-12-14 Yao Qi <yao@codesourcery.com>
9864
9865 * i386-low.c (i386_low_stopped_data_address): Initialize local
9866 variable `control'.
9867
6210a125
PA
98682011-12-13 Pedro Alves <pedro@codesourcery.com>
9869
9870 PR remote/13492
9871
9872 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9873 DR_CONTROL unless necessary. Extend comments.
9874 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9875 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9876
2ece8244
YQ
98772011-12-13 Yao Qi <yao@codesourcery.com>
9878
9879 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9880 macros.
9881 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9882
784867a5
JK
98832011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9884
9885 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9886 Print new debug message for such case.
9887
6bf36717
JK
98882011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9889
9890 Fix overlapping memcpy.
9891 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9892 the read_inferior_memory transfer.
9893 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9894 write_inferior_memory transfer.
9895 (set_fast_tracepoint_jump): New variable buf. Use it for the
9896 read_inferior_memory and write_inferior_memory transfers.
9897 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9898 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9899 Use it for the write_inferior_memory transfer.
9900 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9901 buffers.
9902
50275556
MR
99032011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9904
9905 * linux-low.c (fetch_register, store_register): Make code
9906 consistent, fix formatting.
9907
7325beb4
MR
99082011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9909
9910 * linux-low.c (usr_store_inferior_registers): Factor out code
9911 to handle individual registers into...
9912 (store_register): ... this new function.
9913
c642a434
UW
99142011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9915
9916 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9917 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9918 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9919 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9920 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9921 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9922 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9923 (srv_xmlfiles): Add new XML files.
9924
9925 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9926 and <sys/uio.h>.
9927 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9928 (init_registers_s390_linux32v1): Add prototype.
9929 (init_registers_s390_linux32v2): Likewise.
9930 (init_registers_s390_linux64v1): Likewise.
9931 (init_registers_s390_linux64v2): Likewise.
9932 (init_registers_s390x_linux64v1): Likewise.
9933 (init_registers_s390x_linux64v2): Likewise.
9934 (s390_num_regs): Increment to 52.
9935 (s390_regmap): Add orig_r2 register.
9936 (s390_num_regs_3264): Increment to 68.
9937 (s390_regmap_3264): Add orig_r2 register.
9938 (s390_collect_ptrace_register): Handle orig_r2 register.
9939 (s390_supply_ptrace_register): Likewise.
9940 (s390_fill_last_break): New function.
9941 (s390_store_last_break): Likewise.
9942 (s390_fill_system_call): New function.
9943 (s390_store_system_call): Likewise.
9944 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9945 register sets.
9946 (s390_check_regset): New function.
9947 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9948 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9949 Update target_regsets for available register sets.
9950
2268b414
JK
99512011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9952 Jan Kratochvil <jan.kratochvil@redhat.com>
9953
9954 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9955 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9956 New.
9957 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9958 * linux-low.h (struct process_info_private): New member r_debug.
9959 * server.c (handle_qxfer_libraries): Call
9960 the_target->qxfer_libraries_svr4.
9961 (handle_qxfer_libraries_svr4): New function.
9962 (qxfer_packets): New entry "libraries-svr4".
9963 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9964 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9965 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9966 PACKET_qXfer_libraries_svr4.
9967
d6db1fab
UW
99682011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9969
9970 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9971 PSW address/mask between 8-byte and 16-byte formats.
9972 (s390_supply_ptrace_register): Likewise.
9973 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9974 basic addressing mode bit.
9975
242f5f1c
SS
99762011-11-24 Stan Shebs <stan@codesourcery.com>
9977
9978 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9979
f196051f
SS
99802011-11-17 Stan Shebs <stan@codesourcery.com>
9981
9982 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9983 (tracing_start_time): New global.
9984 (tracing_stop_time): New global.
9985 (tracing_user_name): New global.
9986 (tracing_notes): New global.
9987 (tracing_stop_note): New global.
9988 (cmd_qtstart): Set traceframe_usage, start_time.
9989 (stop_tracing): Set stop_time.
9990 (cmd_qtstatus): Report additional status.
9991 (cmd_qtp): New function.
9992 (handle_tracepoint_query): Call it.
9993 (cmd_qtnotes): New function.
9994 (handle_tracepoint_general_set): Call it.
9995 (get_timestamp): Rename from tsv_get_timestamp.
9996
405f8e94
SS
99972011-11-14 Stan Shebs <stan@codesourcery.com>
9998 Kwok Cheung Yeung <kcy@codesourcery.com>
9999
10000 * linux-x86-low.c (small_jump_insn): New.
10001 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10002 trampoline and error message, build a trampoline and issue a small
10003 jump instruction to it.
10004 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10005 trampoline and error message.
10006 (x86_get_min_fast_tracepoint_insn_len): New.
10007 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10008 * linux-low.h (struct linux_target_ops): Add arguments to
10009 install_fast_tracepoint_jump_pad operation, add new operation.
10010 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10011 arguments.
10012 (linux_get_min_fast_tracepoint_insn_len): New function.
10013 (linux_target_op): Add new operation.
10014 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10015 (gdb_trampoline_buffer_end): Ditto.
10016 (gdb_trampoline_buffer_error): Ditto.
10017 (struct ipa_sym_addresses): Add fields for new IPA variables.
10018 (symbol_list): Add entries for new IPA variables.
10019 (struct tracepoint): Add fields to hold the address range of the
10020 trampoline used by the tracepoint.
10021 (trampoline_buffer_head): New static variable.
10022 (trampoline_buffer_tail): Ditto.
10023 (claim_trampoline_space): New function.
10024 (have_fast_tracepoint_trampoline_buffer): New function.
10025 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10026 structure.
10027 (install_fast_tracepoint): Ditto, also add error buffer argument.
10028 (cmd_qtminftpilen): New function.
10029 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10030 (fast_tracepoint_from_trampoline_address): New function.
10031 (fast_tracepoint_collecting): Handle trampoline as part of jump
10032 pad space.
10033 (set_trampoline_buffer_space): New function.
10034 (initialize_tracepoint): Initialize new IPA variables.
10035 * target.h (struct target_ops): Add arguments to
10036 install_fast_tracepoint_jump_pad operation, add new
10037 get_min_fast_tracepoint_insn_len operation.
10038 (target_get_min_fast_tracepoint_insn_len): New.
10039 (install_fast_tracepoint_jump_pad): Add arguments.
10040 * server.h (IPA_BUFSIZ): Define.
10041 * linux-i386-ipa.c: Include extra header files.
10042 (initialize_fast_tracepoint_trampoline_buffer): New function.
10043 (initialize_low_tracepoint): Call it.
10044 * server.h (set_trampoline_buffer_space): Declare.
10045 (claim_trampoline_space): Ditto.
10046 (have_fast_tracepoint_trampoline_buffer): Ditto.
10047
1e4d1764
YQ
100482011-11-14 Yao Qi <yao@codesourcery.com>
10049
10050 * server.c (handle_query): Handle InstallInTrace for qSupported.
10051 * tracepoint.c (add_tracepoint): Sort list.
10052 (install_tracepoint, download_tracepoint): New.
10053 (cmd_qtdp): Call them to install and download tracepoints.
10054 (sort_tracepoints): Removed.
10055 (cmd_qtstart): Update.
10056
5c73ff4e
YQ
100572011-11-14 Yao Qi <yao@codesourcery.com>
10058
10059 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10060 * mem-break.h: Declare.
10061 * tracepoint.c (cmd_qtstart): Move some code to ...
10062 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10063 New.
10064 (download_tracepoints): Move some code to ...
10065 (download_tracepoint_1): ... here. New.
10066
86a30030
YQ
100672011-11-08 Yao Qi <yao@codesourcery.com>
10068
10069 * remote-utils.c (relocate_instruction): A comment fix.
10070
8d26e50c
JB
100712011-11-07 Joel Brobecker <brobecker@adacore.com>
10072
10073 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10074 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10075 dr_status_mirror and dr_control_mirror from debug_reg_state.
10076 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10077 (i386_initial_stuff): Remove use of deleted globals.
10078 (i386_get_thread_context, i386_set_thread_context,
10079 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10080 from debug_reg_state.
10081
a59306a3
YQ
100822011-11-05 Yao Qi <yao@codesourcery.com>
10083
10084 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10085 address as TPOINT's.
10086
3065dfb6
SS
100872011-11-02 Stan Shebs <stan@codesourcery.com>
10088
10089 * tracepoint.c (agent_mem_read_string): New function.
10090 (eval_agent_expr): Call it for tracenz.
10091 * server.c (handle_query): Report support for tracenz.
10092
fd0d8c7c
YQ
100932011-11-02 Yao Qi <yao@codesourcery.com>
10094
10095 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10096
609086b1
YQ
100972011-11-02 Yao Qi <yao@codesourcery.com>
10098
10099 * target.h: Fix a typo in comment.
10100
b9fd1791
PA
101012011-10-31 Pedro Alves <pedro@codesourcery.com>
10102
10103 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10104 clobber the breakpoints' shadows with fast tracepoint jumps.
10105 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10106 * target.c (write_inferior_memory): Also pass MYADDR down to
10107 check_mem_write.
10108
03583c20
UW
101092011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10110
10111 * configure.ac: Check support for personality routine.
10112 * configure: Regenerate.
10113 * config.in: Likewise.
10114 * linux-low.c: Include <sys/personality.h>.
10115 Define ADDR_NO_RANDOMIZE if necessary.
10116 (linux_create_inferior): Disable address space randomization when
10117 forking inferior, if requested.
10118 (linux_supports_disable_randomization): New function.
10119 (linux_target_ops): Install it.
10120 * server.h (disable_randomization): Declare.
10121 * server.c (disable_randomization): New global variable.
10122 (handle_general_set): Handle QDisableRandomization.
10123 (handle_query): Likewise for qSupported.
10124 (main): Support --disable-randomization and --no-disable-randomization
10125 command line arguments.
10126 * target.h (struct target_ops): Add supports_disable_randomization.
10127 (target_supports_disable_randomization): New macro.
10128
723b724b
MF
101292011-09-29 Mike Frysinger <vapier@gentoo.org>
10130
10131 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10132 ifdef check.
10133 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10134 [!PT_GETDSBT] (target_loadmap): New definition.
10135 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10136 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10137 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10138 and PT_GETDSBT to LINUX_LOADMAP.
10139 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10140 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10141
55329a5c 101422011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10143
10144 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10145 (arm_linux_hwbp_cap): New static variable.
10146 (arm_linux_get_hwbp_cap): Replace by ...
10147 (arm_linux_init_hwbp_cap): ... this new function.
10148 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10149 (arm_linux_get_hw_watchpoint_count): Likewise.
10150 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10151 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10152 (arm_prepare_to_resume): Use perror_with_name instead of error.
10153
55329a5c 101542011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10155
10156 * linux-arm-low.c: Include <signal.h>.
10157 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10158 (struct arm_linux_hwbp_cap): New data type.
10159 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10160 (struct arm_linux_hw_breakpoint): New data type.
10161 (MAX_BPTS, MAX_WPTS): Define.
10162 (struct arch_process_info, struct arch_lwp_info): New data types.
10163 (arm_linux_get_hwbp_cap): New function.
10164 (arm_linux_get_hw_breakpoint_count): Likewise.
10165 (arm_linux_get_hw_watchpoint_count): Likewise.
10166 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10167 (arm_hwbp_control_initialize): Likewise.
10168 (arm_hwbp_control_is_enabled): Likewise.
10169 (arm_hwbp_control_is_initialized): Likewise.
10170 (arm_hwbp_control_disable): Likewise.
10171 (arm_linux_hw_breakpoint_equal): Likewise.
10172 (arm_linux_hw_point_initialize): Likewise.
10173 (struct update_registers_data): New data structure.
10174 (update_registers_callback: New function.
10175 (arm_insert_point): Likewise.
10176 (arm_remove_point): Likewise.
10177 (arm_stopped_by_watchpoint): Likewise.
10178 (arm_stopped_data_address): Likewise.
10179 (arm_new_process): Likewise.
10180 (arm_new_thread): Likewise.
10181 (arm_prepare_to_resume): Likewise.
10182 (the_low_target): Register arm_insert_point, arm_remove_point,
10183 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10184 arm_new_thread, and arm_prepare_to_resume.
10185
6b9801d4
SS
101862011-09-15 Stan Shebs <stan@codesourcery.com>
10187
10188 * server.h (struct emit_ops): Add compare-goto fields.
10189 * tracepoint.c (gdb_agent_op_sizes): New table.
10190 (emit_eq_goto): New function.
10191 (emit_ne_goto): New function.
10192 (emit_lt_goto): New function.
10193 (emit_le_goto): New function.
10194 (emit_gt_goto): New function.
10195 (emit_ge_goto): New function.
10196 (is_goto_target): New function.
10197 (compile_bytecodes): Recognize special cases of compare-goto
10198 combinations and call specialized emitters for them.
10199 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10200 (amd64_emit_ne_goto): New function.
10201 (amd64_emit_lt_goto): New function.
10202 (amd64_emit_le_goto): New function.
10203 (amd64_emit_gt_goto): New function.
10204 (amd64_emit_ge_goto): New function.
10205 (amd64_emit_ops): Add the new functions.
10206 (i386_emit_eq_goto): New function.
10207 (i386_emit_ne_goto): New function.
10208 (i386_emit_lt_goto): New function.
10209 (i386_emit_le_goto): New function.
10210 (i386_emit_gt_goto): New function.
10211 (i386_emit_ge_goto): New function.
10212 (i386_emit_ops): Add the new functions.
10213
bf15cbda
SS
102142011-09-08 Stan Shebs <stan@codesourcery.com>
10215
10216 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10217 (i386_emit_epilogue): Restore %ebx.
10218
943ca1dd
JZ
102192011-08-31 Jie Zhang <jzhang918@gmail.com>
10220
10221 * server.c (step_thread): Remove definition.
10222 (process_serial_event): Don't handle Hs.
10223 * server.h (step_thread): Remove declaration.
10224 * target.c (set_desired_inferior): Remove use of step_thread.
10225
e3deef73
LM
102262011-08-24 Luis Machado <lgustavo@codesourcery.com>
10227
10228 * linux-low.c: Include linux-procfs.h.
10229 (linux_attach_lwp_1): Update comments.
10230 (linux_attach): Scan for existing threads when attaching to a
10231 process that is the tgid.
10232 * Makefile.in: Update dependencies.
10233
13da1c97
LM
102342011-08-24 Luis Machado <lgustavo@codesourcery.com>
10235
10236 * configure.srv: Add linux-procfs.o dependencies.
10237
881127c9
YQ
102382011-08-14 Yao Qi <yao@codesourcery.com>
10239
10240 * target.h (struct target_ops): Fix indent.
10241 * win32-low.c (win32_target_ops): Fix comment.
10242
58dbd541
YQ
102432011-08-14 Andrew Jenner <andrew@codesourcery.com>
10244 Yao Qi <yao@codesourcery.com>
10245
10246 * Makefile.in (clean): Remove tic6x-*.c files.
10247 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10248 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10249 (tic6x-c64xp-linux.c): Likewise.
10250 * configure.srv: Add support for tic6x-*-uclinux.
10251 * linux-tic6x-low.c: New.
10252 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10253
78d85199
YQ
102542011-08-14 Andrew Stubbs <ams@codesourcery.com>
10255 Yao Qi <yao@codesourcery.com>
10256
10257 * target.h (struct target_ops): Add read_loadmap.
10258 * linux-low.c (struct target_loadseg): New type.
10259 (struct target_loadmap): New type.
10260 (linux_read_loadmap): New function.
10261 (linux_target_ops): Add linux_read_loadmap.
10262 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10263 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10264 to NULL.
78d85199 10265
a959a88d
EZ
102662011-08-05 Eli Zaretskii <eliz@gnu.org>
10267
10268 * win32-low.c: Include <stdint.h>.
10269
1ced966e
PA
102702011-07-22 Pedro Alves <pedro@codesourcery.com>
10271
10272 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10273 to the inferior here.
10274 (i386_remove_aligned_watchpoint): Ditto.
10275 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10276 fit part of the watchpoint in the debug registers.
10277 (i386_update_inferior_debug_regs): New.
10278 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10279 registers, and only update the inferior on success.
10280 (i386_low_remove_watchpoint): Ditto.
10281
d26e3629
KY
102822011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10283
10284 * linux-low.c (compare_ints, unique, list_threads, show_process,
10285 linux_core_of_thread): Delete.
10286 (linux_target_ops): Change linux_core_of_thread to
10287 linux_common_core_of_thread.
10288 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10289 * utils.c (malloc_failure): Change type of argument.
10290 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10291 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10292 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10293 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10294 (IPA_OBJS): Add common-utils-ipa.o.
10295 (ptid_h, linux_osdata_h): New macros.
10296 (server_h): Add common/common-utils.h, common/xml-utils.h,
10297 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10298 common/ptid.h.
10299 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10300 ptid.o, buffer.o): New rules.
10301 (linux-low.o): Add common/linux-osdata.h as a dependency.
10302 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10303 * configure.ac: Add AC_HEADER_DIRENT check.
10304 * config.in: Regenerate.
10305 * configure: Regenerate.
10306 * remote-utils.c (xml_escape_text): Delete.
10307 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10308 buffer_xml_printf): Move to common/buffer.c.
10309 * server.c (main): Remove call to initialize_inferiors.
10310 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10311 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10312 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10313 internal_error, gdb_assert, gdb_assert_fail): Delete.
10314 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10315 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10316 common/buffer.h.
10317 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10318 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10319 initialize_inferiors): Delete.
10320
2275a1a7
PA
103212011-07-20 Pedro Alves <pedro@codesourcery.com>
10322
10323 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10324 symbol error.
10325
0a5b1e09
PA
103262011-05-31 Pedro Alves <pedro@codesourcery.com>
10327
10328 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10329 assertion.
10330 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10331
6938fd34
YQ
103322011-05-26 Yao Qi <yao@codesourcery.com>
10333
10334 * Makefile.in (thread-db.o): Track dependence to
10335 common/gdb_thread_db.h.
10336 * thread-db.c: include gdb_thread_db.h from right place.
10337
b481f9e0
TT
103382011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10339
10340 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10341 __FILE__ and __LINE__ to internal_error.
10342
98a5dd13
DE
103432011-05-13 Doug Evans <dje@google.com>
10344
10345 * thread-db.c (try_thread_db_load_from_sdir): New function.
10346 (try_thread_db_load_from_dir): New function.
10347 (thread_db_load_search): Handle $sdir, ignore $pdir.
10348 Remove trying of system directories if search of
10349 libthread-db-search-path fails, that is now done via $sdir.
10350
d248b706
KY
103512011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10352
10353 * server.c (handle_query): Add EnableDisableTracepoints to the list
10354 of supported features.
43aaf8b6 10355 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10356 tracepoints.
43aaf8b6
PA
10357 (cmd_qtenable_disable): New.
10358 (cmd_qtstart): Install tracepoints even if disabled.
10359 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10360 receiving a QTEnable or QTDisable packet.
10361 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10362 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10363 tracepoints.
10364 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10365
84e578fb
DE
103662011-05-10 Doug Evans <dje@google.com>
10367
10368 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10369
71f55dd8
DE
103702011-05-04 Doug Evans <dje@google.com>
10371
10372 * linux-low.c (linux_join): Skip process lookup.
10373 * spu-low.c (spu_join): Ditto.
10374 * server.c (join_inferiors_callback): Delete.
10375 (process_serial_event): For 'D' packet (detach) call join_inferior
10376 directly.
10377
4d393d60
JM
103782011-05-04 Joseph Myers <joseph@codesourcery.com>
10379
10380 * README: Don't mention xscale*-*-linux*.
10381 * configure.srv (xscale*-*-linux*): Don't handle target.
10382
b00ad6ff
NF
103832011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10384
10385 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10386 casting pointers.
10387 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10388 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10389 (i386_emit_void_call_2): Likewise.
10390
af96c192
YQ
103912011-04-26 Yao Qi <yao@codesourcery.com>
10392
43aaf8b6
PA
10393 * linux-low.c: Move common macros to linux-ptrace.h.
10394 Include linux-ptrace.h.
af96c192
YQ
10395 * Makefile.in (linux_ptrace_h): New.
10396 (linux-low.o): Depends on linux-ptrace.h.
10397
03f2bd59
JK
103982011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10399
10400 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10401 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10402 (remote_prepare): New function with most of the TCP code from ...
10403 (remote_open): ... here. Detect PORT here unconditionally. Move also
10404 setting transport_is_reliable.
10405 * server.c (run_once): New variable.
10406 (gdbserver_usage): Document it.
10407 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10408 the first run if RUN_ONCE.
10409 * server.h (run_once, remote_prepare): New declarations.
10410
7a9dd1b2
TT
104112011-04-19 Tom Tromey <tromey@redhat.com>
10412
10413 * win32-low.c (handle_load_dll): Remove duplicate "the".
10414
81239425
PM
104152011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10416
10417 Remove support for old Cygwin 1.5 versions.
10418 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10419 function to avoid warning.
10420 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10421 warning.
10422
9e0627f1
PM
104232011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10424
10425 * gdbserver/server.h (Macro _): Define it if not available.
10426
588eebee
MS
104272011-03-14 Michael Snyder <msnyder@vmware.com>
10428
348af9f7 10429 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10430
43f70d4c
JB
104312011-03-10 Joel Brobecker <brobecker@adacore.com>
10432
10433 * Makefile.in (maintainer-clean realclean distclean): Remove
10434 "make ... subdir_do" command.
10435
348af9f7
MS
104362011-03-10 Michael Snyder <msnyder@vmware.com>
10437
10438 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10439
10440 * server.c (handle_v_run): Free alloced buffer on early return.
10441
e637a4f5
YQ
104422011-03-09 Yao Qi <yao@codesourcery.com>
10443
10444 Revert:
10445 2011-03-04 Yao Qi <yao@codesourcery.com>
10446
10447 * Makefile.in: Remove GNU make feature --directory.
10448
10449 2011-03-05 Yao Qi <yao@codesourcery.com>
10450
10451 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10452 (subdir_do): New make target. Copied from gdb/Makefile.
10453 (maintainer-clean, realclean, distclean, clean): Call corresponding
10454 make targets in common/Makefile.
10455
10456 2011-02-11 Yao Qi <yao@codesourcery.com>
10457
10458 * configure.ac: Call AC_PROG_RANLIB.
10459 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10460 * configure: Regenerate.
10461
e6edda56
JK
104622011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10463
10464 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10465
e5141119
JB
104662011-03-06 Yao Qi <yao@codesourcery.com>
10467
10468 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10469
64794aa4
JB
104702011-03-05 Yao Qi <yao@codesourcery.com>
10471
10472 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10473 (subdir_do): New make target. Copied from gdb/Makefile.
10474 (maintainer-clean, realclean, distclean, clean): Call corresponding
10475 make targets in common/Makefile.
10476
7a762829
YQ
104772011-03-04 Yao Qi <yao@codesourcery.com>
10478
10479 * Makefile.in: Remove GNU make feature --directory.
10480
348af9f7
MS
104812011-03-04 Michael Snyder <msnyder@vmware.com>
10482
10483 * server.c (queue_stop_reply): Call xmalloc not malloc.
10484
104852011-03-02 Michael Snyder <msnyder@vmware.com>
10486
10487 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10488
9f72fee2
MS
104892011-02-28 Michael Snyder <msnyder@vmware.com>
10490
588eebee
MS
10491 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10492 (cmd_qtframe): Ditto.
10493 (cmd_qtbuffer): Ditto.
10494 (cmd_bigqtbuffer): Ditto.
10495
9f72fee2
MS
10496 * utils.c (decimal2str): Initialize 'width' to nine, then
10497 don't mess with it.
10498
8040bd49
UW
104992011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10500
10501 * hostio.c (require_data): Free *data, not data.
10502
7e52cbd0
JK
105032011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10504
10505 * hostio.c (require_data): Use free, not xfree.
10506
9130f83e
MS
105072011-02-27 Michael Snyder <msnyder@vmware.com>
10508
4b812f4e
MS
10509 * server.c (handle_query): Discard unused value.
10510
9130f83e
MS
10511 * hostio.c (require_data): Free malloc memory before returning
10512 error.
10513
69d37113
MS
105142011-02-26 Michael Snyder <msnyder@vmware.com>
10515
10516 * linux-low.c (list_threads): Call closedir for dirent.
10517
35f5825a
MS
105182011-02-27 Michael Snyder <msnyder@vmware.com>
10519
2a589cef
MS
10520 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10521 a case statement falls through.
10522
0adea5f7
MS
10523 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10524
35f5825a
MS
10525 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10526 in comparison.
10527
238f1c74
MS
105282011-02-26 Michael Snyder <msnyder@vmware.com>
10529
10530 * utils.c (decimal2str): Eliminate dead code and dead param.
10531 (pulongest): Drop dead param from call to decimal2str.
10532 (plongest): Ditto.
10533
633ff500
JB
105342011-02-24 Joel Brobecker <brobecker@adacore.com>
10535
10536 Revert the following patch (not approved yet):
10537 2011-02-21 Hui Zhu <teawater@gmail.com>
10538 * tracepoint.c (tp_printf): New function.
10539 (eval_agent_expr): Handle gdb_agent_op_printf.
10540
f9c6ff72
HZ
105412011-02-21 Hui Zhu <teawater@gmail.com>
10542
10543 * tracepoint.c (tp_printf): New function.
10544 (eval_agent_expr): Handle gdb_agent_op_printf.
10545
94d5e490
TT
105462011-02-18 Tom Tromey <tromey@redhat.com>
10547
10548 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10549 (tracepoint.o): Likewise.
10550 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10551 (gdb_agent_op_names): Likewise.
10552
c7f96d2b
TT
105532011-02-18 Tom Tromey <tromey@redhat.com>
10554
10555 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10556 gdb_agent_op_rot>: New constants.
10557 (gdb_agent_op_names): Add pick and roll.
10558 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10559 cases.
10560
0feedb2c
JK
105612011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10562
10563 * aclocal.m4: Regenerated with aclocal-1.11.1.
10564
b3b9301e
PA
105652011-02-14 Pedro Alves <pedro@codesourcery.com>
10566
10567 * server.c (handle_qxfer_traceframe_info): New.
10568 (qxfer_packets): Register "traceframe-info".
10569 (handle_query): Report support for qXfer:traceframe-info:read+.
10570 * tracepoint.c (match_blocktype): New.
10571 (traceframe_find_block_type): Rename to ...
10572 (traceframe_walk_blocks): ... this. Add callback filter argument,
10573 and use it.
10574 (traceframe_find_block_type): New, reimplemented on top of
10575 traceframe_walk_blocks.
10576 (build_traceframe_info_xml): New.
10577 (traceframe_read_info): New.
10578 * server.h (traceframe_read_info): Declare.
10579
4f3e6fb7
YQ
105802011-02-11 Yao Qi <yao@codesourcery.com>
10581
10582 * configure.ac: Call AC_PROG_RANLIB.
10583 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10584 * configure: Regenerate.
10585
764880b7
PA
105862011-02-07 Pedro Alves <pedro@codesourcery.com>
10587
10588 * server.c (gdb_read_memory): Change return semantics to allow
10589 partial transfers.
10590 (handle_search_memory_1): Adjust.
10591 (process_serial_event) <'m' packet>: Handle partial transfers.
10592 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10593
1c79eb8a
PA
105942011-01-28 Pedro Alves <pedro@codesourcery.com>
10595
10596 * regcache.c (init_register_cache): Initialize
10597 regcache->register_status.
10598 (free_register_cache): Release regcache->register_status.
10599 (regcache_cpy): Copy register_status.
10600 (registers_to_string): Print 'x's for unavailable registers.
10601 (supply_register): Mark the register's status valid or
10602 unavailable, depending on whether a buffer was passed in or not.
10603 (supply_register_zeroed): New.
10604 (supply_regblock): Mark the registers' status valid or
10605 unavailable, depending on whether a buffer was passed in or not.
10606 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10607 (struct regcache): New `register_status' field.
10608 (supply_register_zeroed): Declare.
10609 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10610 supply_register_zeroed, rather than passing a NULL buffer to
10611 supply_register.
10612 * tracepoint.c (fetch_traceframe_registers): Update comment.
10613
85724a0e
PA
106142011-01-28 Pedro Alves <pedro@codesourcery.com>
10615
10616 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10617 buffer explicit.
10618
d08aafef
PA
106192011-01-25 Pedro Alves <pedro@codesourcery.com>
10620
10621 * server.h (decode_xfer_write): Change prototype.
10622 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10623 and don't extract the annex here.
10624 * server.c (decode_xfer_read): Remove `annex' parameter,
10625 and don't extract the annex here.
10626 (decode_xfer): New.
10627 (struct qxfer): New.
10628 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10629 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10630 (handle_qxfer_statictrace): New functions, abstracted out from
10631 handle_query, and made to use the struct qxfer interface.
10632 (handle_threads_qxfer_proper): Rename to ...
10633 (handle_qxfer_threads_proper): ... this.
10634 (handle_threads_qxfer): Rename to ...
10635 (handle_qxfer_threads): ... this. Adjust.
10636 (qxfer_packets): New array.
10637 (handle_qxfer): New function.
10638 (handle_query): Use handle_qxfer.
10639
493e2a69
MS
106402011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10641
10642 * gdbreplay.c: Shorten lines of >= 80 columns.
10643 * linux-low.c: Ditto.
10644 * linux-ppc-low.c: Ditto.
10645 * linux-s390-low.c: Ditto.
10646 * linux-sparc-low.c: Ditto.
10647 * linux-x86-low.c: Ditto.
10648 * linux-xtensa-low.c: Ditto.
10649 * mem-break.c: Ditto.
10650 * nto-low.c: Ditto.
10651 * regcache.h: Ditto.
10652 * remote-utils.c: Ditto.
10653 * server.c: Ditto.
10654 * server.h: Ditto.
10655 * thread-db.c: Ditto.
10656 * tracepoint.c: Ditto.
10657 * utils.c: Ditto.
10658 * win32-low.h: Ditto.
10659
44944448
JB
106602011-01-05 Joel Brobecker <brobecker@adacore.com>
10661
10662 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10663 update.
10664
71ce852c
JB
106652011-01-01 Joel Brobecker <brobecker@adacore.com>
10666
10667 * server.c (gdbserver_version): Update copyright year in version
10668 output.
10669 * gdbreplay.c (gdbreplay_version): Ditto.
10670
eb826dc6
MF
106712010-12-29 Jie Zhang <jie.zhang@analog.com>
10672
10673 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10674 * linux-bfin-low.c: New file.
10675 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10676 PT_DATA_ADDR for BFIN targets.
10677 * Makefile.in (SFILES): Add linux-bfin-low.c.
10678 (clean): Remove reg-bfin.c.
10679 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10680 * README: Mention supported Blackfin targets.
10681
39ab222a
MF
106822010-12-23 Mike Frysinger <vapier@gentoo.org>
10683
10684 * .gitignore: New file.
10685
a1f2ce7d
MF
106862010-11-16 Mike Frysinger <vapier@gentoo.org>
10687
10688 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10689
f474844c
JZ
106902010-10-22 Jie Zhang <jie@codesourcery.com>
10691
10692 * Makefile.in: Add FLAGS_TO_PASS variable.
10693 (install): Remove dependency of install-only and recursively
10694 invoke make for install-only.
10695
f1048712
DE
106962010-10-04 Doug Evans <dje@google.com>
10697
10698 * Makefile.in (uninstall): Use $(DESTDIR).
10699
b53a1623
PA
107002010-09-24 Pedro Alves <pedro@codesourcery.com>
10701
e6ee044d
PA
10702 PR gdb/11842
10703
b53a1623
PA
10704 * linux-x86-low.c (compat_siginfo_from_siginfo)
10705 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10706 si_code is < 0. Check for si_code == SI_TIMER before checking for
10707 si_code < 0.
10708
fa1bd1e4
JB
107092010-09-13 Joel Brobecker <brobecker@adacore.com>
10710
10711 * lynx-i386-low.c: New file.
10712 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10713
47fac8f8
JB
107142010-09-13 Joel Brobecker <brobecker@adacore.com>
10715
10716 * lynx-low.c (ptrace_request_to_str): Remove handling for
10717 request values that have been removed in LynxOS 5.x.
10718
1adfc54d
JB
107192010-09-13 Joel Brobecker <brobecker@adacore.com>
10720
10721 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10722 <ptrace.h>
10723
c2a66c29
NS
107242010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10725
10726 * configure.ac: Add --enable-inprocess-agent option.
10727 * configure: Rebuilt.
10728
32fcada3
YQ
107292010-09-06 Yao Qi <yao@codesourcery.com>
10730
10731 * linux-low.c (linux_kill): Remove unused variable.
10732 (linux_stabilize_threads): Likewise.
10733 * server.c (start_inferior): Likewise.
10734 (queue_stop_reply_callback): Likewise.
10735 * tracepoint.c (do_action_at_tracepoint): Likewise.
10736
0cccb683
YQ
107372010-09-06 Yao Qi <yao@codesourcery.com>
10738
10739 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10740 on return.
10741
423ec54c
JK
107422010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10743
10744 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10745
12ac6819
PA
107462010-09-06 Pedro Alves <pedro@codesourcery.com>
10747
10748 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10749 "$(IPA_DEPFILES)".
10750
8ed54b31
JB
107512010-09-01 Joel Brobecker <brobecker@adacore.com>
10752
10753 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10754 gdbserver/lynx-ppc-low.c: New files.
10755 * Makefile.in (lynx_low_h): New variable.
10756 (lynx-low.o, lynx-ppc-low.o): New rules.
10757 * configure.ac: On LynxOS, link with -lnetinet.
10758 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10759 * configure: regenerate.
10760
bb0116a4
JB
107612010-09-01 Joel Brobecker <brobecker@adacore.com>
10762
10763 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10764 * configure.ac: Add check for vasprintf and vsnprintf.
10765 * configure, config.in: Regenerate.
10766 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10767
a778ab81 107682010-09-01 Joel Brobecker <brobecker@adacore.com>
10769
10770 * gdbreplay.c: Move include of alloca.h up, next to include of
10771 malloc.h.
10772 * server.h: Add include of malloc.h.
10773 * mem-break.c: Remove include of malloc.h.
10774 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10775
8b034a19 107762010-09-01 Joel Brobecker <brobecker@adacore.com>
10777
10778 * Makefile.in (memmem.o): Build with -Wno-error.
10779
107802010-09-01 Joel Brobecker <brobecker@adacore.com>
10781
10782 * utils.c (xsnprintf): Make non-static.
10783 * server.h: Add xsnprintf declaration.
10784 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10785 replace calls to snprintf by calls to xsnprintf throughout.
10786
107872010-09-01 Joel Brobecker <brobecker@adacore.com>
10788
10789 * configure.ac: Add configure check for alloca.
10790 * configure, config.in: Regenerate.
10791 * server.h: Include alloca.h if it exists.
10792 * gdbreplay.c: Include alloca.h if it exists.
10793
1a981360
PA
107942010-08-28 Pedro Alves <pedro@codesourcery.com>
10795
10796 * linux-low.c (__SIGRTMIN): Define if not already defined.
10797 (linux_create_inferior): Check for __ANDROID__ rather than
10798 __SIGRTMIN.
10799 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10800 are already deferred.
10801 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10802 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10803 stopped and already has a pending signal to report.
10804 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10805 a pending signal to report or is moving out of a jump pad.
10806 (linux_init_signals): Check for __ANDROID__ rather than
10807 __SIGRTMIN.
10808
b4d51a55
PA
108092010-08-28 Pedro Alves <pedro@codesourcery.com>
10810
10811 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10812 debug_threads check. Avoid a linear search when not doing debug
10813 output.
10814
ec48365d
PA
108152010-08-27 Pedro Alves <pedro@codesourcery.com>
10816
10817 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10818 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10819 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10820 (process_event): Change local fd's type to gdb_fildes_t.
10821 (create_file_handler): Adjust prototype.
10822 (delete_file_handler): Adjust prototype.
10823 (handle_file_event): Adjust prototype. Use pfildes.
10824 (create_file_event): Adjsut prototype.
10825 * remote-utils.c (remote_desc, listen_desc): Change type to
10826 gdb_fildes_t.
10827 * server.h: New gdb_fildes_t typedef.
10828 [USE_WIN32API]: Include winsock2.h.
10829 (delete_file_handler, add_file_handler): Adjust prototypes.
10830 (pfildes): Declare.
10831 * utils.c (pfildes): New.
10832
854d88f0
PA
108332010-08-27 Pedro Alves <pedro@codesourcery.com>
10834
10835 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10836 * configure: Regenerate.
10837
0146f85b
PA
108382010-08-27 Pedro Alves <pedro@codesourcery.com>
10839
10840 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10841 (linux_done_accessing_memory): ... this.
10842 (linux_target_ops): Adjust.
10843 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10844 * nto-low.c (nto_target_ops): Adjust comment.
10845 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10846 * spu-low.c (spu_target_ops): Adjust comment.
10847 * target.h (target_ops): Rename unprepare_to_access_memory field
10848 to done_accessing_memory.
10849 (unprepare_to_access_memory): Rename to ...
10850 (done_accessing_memory): ... this.
10851
90d74c30
PA
108522010-08-26 Pedro Alves <pedro@codesourcery.com>
10853
10854 * linux-low.c (linux_prepare_to_access_memory): New.
10855 (linux_unprepare_to_access_memory): New.
10856 (linux_target_ops): Install them.
10857 * server.c (read_memory): Rename to ...
10858 (gdb_read_memory): ... this. Use
10859 prepare_to_access_memory/prepare_to_access_memory.
10860 (write_memory): Rename to ...
10861 (gdb_write_memory): ... this. Use
10862 prepare_to_access_memory/prepare_to_access_memory.
10863 (handle_search_memory_1): Adjust.
10864 (process_serial_event): Adjust.
10865 * target.h (struct target_ops): New fields
10866 prepare_to_access_memory and unprepare_to_access_memory.
10867 (prepare_to_access_memory, unprepare_to_access_memory): New.
10868 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10869 prepare_to_access_memory/prepare_to_access_memory.
10870 * nto-low.c (nto_target_ops): Adjust.
10871 * spu-low.c (spu_target_ops): Adjust.
10872 * win32-low.c (win32_target_ops): Adjust.
10873
fd467969
PA
108742010-08-26 Pedro Alves <pedro@codesourcery.com>
10875
10876 * Makefile.in (WARN_CFLAGS): Get it from configure.
10877 (WERROR_CFLAGS): New.
10878 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10879 * configure.ac: Introduce --enable-werror, which adds -Werror to
10880 the compiler command line. Enabled by default. Disable with
10881 --disable-werror. Add -Wdeclaration-after-statement
10882 Wpointer-arith and -Wformat-nonliteral to warning flags.
10883 * configure: Regenerate.
10884
331e2f5f
PA
108852010-08-26 Pedro Alves <pedro@codesourcery.com>
10886
10887 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10888
e581f2b4
PA
108892010-08-26 Pedro Alves <pedro@codesourcery.com>
10890
10891 * gdbreplay.c (remote_error): New.
10892 (gdbchar): New.
10893 (expect): Use gdbchar. Check for error reading from GDB.
10894 Clarify sync error output.
10895 (play): Check for errors writing to GDB.
10896 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10897 * remote-utils.c (getpkt): Check for errors writing to the remote
10898 descriptor.
10899
3c11dd79
PA
109002010-08-25 Pedro Alves <pedro@codesourcery.com>
10901
10902 * linux-low.c (linux_wait_1): Move non-debugging code out of
10903 `debug_threads' control.
10904
d20a8ad9
PA
109052010-08-25 Pedro Alves <pedro@codesourcery.com>
10906
10907 * linux-low.c (linux_wait_1): Don't set last_status here.
10908 * server.c (push_event, queue_stop_reply_callback): Assert we're
10909 not pushing a TARGET_WAITKIND_IGNORE event.
10910 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10911 (myresume, handle_target_event): Set the thread's last_resume_kind
10912 and last_status from the target returned status.
10913
964e4306
PA
109142010-08-25 Pedro Alves <pedro@codesourcery.com>
10915
10916 PR threads/10729
10917
10918 * linux-x86-low.c (update_debug_registers_callback): New.
10919 (i386_dr_low_set_addr): Use it.
10920 (i386_dr_low_get_addr): New.
10921 (i386_dr_low_set_control): Use update_debug_registers_callback.
10922 (i386_dr_low_get_control): New.
10923 (i386_dr_low_get_status): Adjust.
10924 * linux-low.c (linux_stop_lwp): New.
10925 * linux-low.h (linux_stop_lwp): Declare.
10926
10927 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10928 argument instead of a i386_debug_reg_state.
10929 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10930 a i386_debug_reg_state.
10931 (i386_insert_aligned_watchpoint): Adjust.
10932 (i386_remove_aligned_watchpoint): Adjust.
10933 (i386_low_stopped_data_address): Read the debug registers from the
10934 inferior instead of from the mirrors.
10935 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10936 (i386_dr_low_get_addr): Declare.
10937 (i386_dr_low_get_control): Declare.
10938 (i386_dr_low_get_status): Change prototype.
10939
10940 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10941 (i386_dr_low_get_addr): New.
10942 (i386_dr_low_get_control): New.
10943 (i386_dr_low_get_status): Adjust prototype. Return
10944 dr_status_mirror.
10945 (i386_initial_stuff): Clear dr_status_mirror and
10946 dr_control_mirror.
10947 (i386_get_thread_context): Adjust.
10948 (i386_set_thread_context): Adjust.
10949 (i386_thread_added): Adjust.
10950
5f21a75b
PA
109512010-08-24 Pedro Alves <pedro@codesourcery.com>
10952
10953 * linux-low.h (linux_thread_area): Delete declaration.
10954
3e4c1235
TS
109552010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10956
10957 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10958 after its termination.
10959
1971b033
PA
109602010-08-09 Pedro Alves <pedro@codesourcery.com>
10961
10962 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10963 (gdb_wants_all_stopped): Delete.
10964 (linux_wait_1): Don't call them.
10965 * server.c (handle_v_cont): Tag all threads as want-stopped.
10966 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10967 stopped as "client-wants-stopped".
10968
310444ac
PA
109692010-07-31 Pedro Alves <pedro@codesourcery.com>
10970
10971 * Makefile.in (signals_h): New.
10972 (server_h): Depend on it.
10973 (server.o): Don't depend on $(signals_def).
10974 (signals.o): Depend on $(signals_def).
10975
a19cae16
JK
109762010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10977
10978 * Makefile.in (signals_def): New.
10979 (server_h): Append include/gdb/signals.h and signals_def.
10980 (server.o): Append signals_def.
10981
30d50328
JK
109822010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10983
10984 * server.c (handle_target_event): Use target_signal_to_host for
10985 resume_info.sig initialization.
10986 * target.h (struct thread_resume) <sig>: New comment.
10987
5c3216e2
OS
109882010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10989
c6f46ca0
OS
10990 * server.c (handle_query): strcpy() the returned string from paddress()
10991 instead of sprintf().
5c3216e2
OS
10992 * utils.c (paddress): Return phex_nz().
10993
6bd31874
JB
109942010-07-07 Joel Brobecker <brobecker@adacore.com>
10995
10996 * server.c (handle_v_cont): Call mourn_inferior if process
10997 just exited.
10998 (myresume): Likewise.
10999
0fb4aa4b
PA
110002010-07-01 Pedro Alves <pedro@codesourcery.com>
11001
11002 Static tracepoints, and integration with UST.
11003
11004 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11005 * mem-break.c (uninsert_all_breakpoints)
11006 (reinsert_all_breakpoints): New.
11007 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11008 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11009 (gdb_agent_ust_loaded, helper_thread_id)
11010 (gdb_agent_helper_thread_id): New macros.
11011 (struct ipa_sym_addresses): Add addr_ust_loaded,
11012 addr_helper_thread_id, addr_cmd_buf.
11013 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11014 (in_process_agent_loaded_ust): New.
11015 (write_e_ust_not_loaded): New.
11016 (maybe_write_ipa_ust_not_loaded): New.
11017 (struct collect_static_trace_data_action): New.
11018 (enum tracepoint_type) <static_tracepoint>: New.
11019 (struct tracepoint) <handle>: Mention static tracepoints.
11020 (struct static_tracepoint_ctx): New.
11021 (CMD_BUF_SIZE): New.
11022 (add_tracepoint_action): Handle static tracepoint actions.
11023 (unprobe_marker_at): New.
11024 (clear_installed_tracepoints): Handle static tracepoints.
11025 (cmd_qtdp): Handle static tracepoints.
11026 (probe_marker_at): New.
11027 (cmd_qtstart): Handle static tracepoints.
11028 (response_tracepoint): Handle static tracepoints.
11029 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11030 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11031 (get_context_regcache): Handle static tracepoints.
11032 (do_action_at_tracepoint): Handle static tracepoint actions.
11033 (traceframe_find_block_type): Handle static trace data blocks.
11034 (traceframe_read_sdata): New.
11035 (download_tracepoints): Download static tracepoint actions.
11036 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11037 (GDB_PROBE_NAME): New.
11038 (ust_ops): New.
11039 (GET_UST_SYM): New.
11040 (USTF): New.
11041 (dlsym_ust): New.
11042 (ust_marker_to_static_tracepoint): New.
11043 (gdb_probe): New.
11044 (collect_ust_data_at_tracepoint): New.
11045 (gdb_ust_probe): New.
11046 (UNIX_PATH_MAX, SOCK_DIR): New.
11047 (gdb_ust_connect_sync_socket): New.
11048 (resume_thread, stop_thread): New.
11049 (run_inferior_command): New.
11050 (init_named_socket): New.
11051 (gdb_ust_socket_init): New.
11052 (cstr_to_hexstr): New.
11053 (next_st): New.
11054 (first_marker, next_marker): New.
11055 (response_ust_marker): New.
11056 (cmd_qtfstm, cmd_qtsstm): New.
11057 (unprobe_marker_at, probe_marker_at): New.
11058 (cmd_qtstmat, gdb_ust_thread): New.
11059 (gdb_ust_init): New.
11060 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11061 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11062 (ST_REGENTRY): New.
11063 (x86_64_st_collect_regmap): New.
11064 (X86_64_NUM_ST_COLLECT_GREGS): New.
11065 (AMD64_RIP_REGNUM): New.
11066 (supply_static_tracepoint_registers): New.
11067 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11068 (ST_REGENTRY): New.
11069 (i386_st_collect_regmap): New.
11070 (i386_NUM_ST_COLLECT_GREGS): New.
11071 (supply_static_tracepoint_registers): New.
11072 * server.c (handle_query): Handle qXfer:statictrace:read.
11073 <qSupported>: Report support for StaticTracepoints, and
11074 qXfer:statictrace:read features.
11075 * server.h (traceframe_read_sdata)
11076 (supply_static_tracepoint_registers): Declare.
11077 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11078 (unpack_varlen_hex): Include in IPA build.
11079 * Makefile.in (ustlibs, ustinc): New.
11080 (IPA_OBJS): Add remote-utils-ipa.o.
11081 ($(IPA_LIB)): Link -ldl and -lpthread.
11082 (UST_CFLAGS): New.
11083 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11084 * config.in, configure: Regenerate.
11085
9e4344e5
PA
110862010-06-20 Ian Lance Taylor <iant@google.com>
11087 Pedro Alves <pedro@codesourcery.com>
11088
11089 * linux-x86-low.c (always_true): Delete.
11090 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11091 trying to fool the compiler with always_true.
11092
c6beb2cb
PA
110932010-06-20 Pedro Alves <pedro@codesourcery.com>
11094
11095 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11096 conditions in gdbserver.
11097
d2ed6730
UW
110982010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11099
11100 * spu-low.c (spu_read_memory): Wrap around local store limit.
11101 (spu_write_memory): Likewise.
11102
4e29fb54
PA
111032010-06-15 Pedro Alves <pedro@codesourcery.com>
11104
11105 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11106 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11107 LONGEST uses.
11108 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11109 uses.
11110 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11111 uses with LONGEST uses.
11112
6a271cae
PA
111132010-06-14 Stan Shebs <stan@codesourcery.com>
11114 Pedro Alves <pedro@codesourcery.com>
11115
11116 Bytecode compiler.
11117
11118 * linux-x86-low.c: Include limits.h.
11119 (add_insns): New.
11120 (always_true): New.
11121 (EMIT_ASM): New.
11122 (EMIT_ASM32): New.
11123 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11124 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11125 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11126 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11127 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11128 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11129 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11130 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11131 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11132 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11133 (amd64_emit_void_call_2): New.
11134 (amd64_emit_ops): New.
11135 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11136 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11137 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11138 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11139 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11140 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11141 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11142 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11143 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11144 (i386_emit_stack_adjust, i386_emit_int_call_1)
11145 (i386_emit_void_call_2): New.
11146 (i386_emit_ops): New.
11147 (x86_emit_ops): New.
11148 (the_low_target): Install x86_emit_ops.
11149 * server.h (struct emit_ops): New.
11150 (get_raw_reg_func_addr): Declare.
11151 (current_insn_ptr, emit_error): Declare.
11152 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11153 (set_trace_state_variable_value): New defines.
11154 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11155 addr_get_trace_state_variable_value and
11156 addr_set_trace_state_variable_value.
11157 (symbol_list): New fields for get_raw_reg,
11158 get_trace_state_variable_value and set_trace_state_variable_value.
11159 (condfn): New typedef.
11160 (struct tracepoint): New field `compiled_cond'.
11161 (do_action_at_tracepoint): Clear compiled_cond.
11162 (get_trace_state_variable_value, set_trace_state_variable_value):
11163 Export in the IPA.
11164 (condition_true_at_tracepoint): If there's a compiled condition,
11165 run that.
11166 (current_insn_ptr, emit_error): New globals.
11167 (struct bytecode_address): New.
11168 (get_raw_reg_func_addr): New.
11169 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11170 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11171 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11172 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11173 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11174 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11175 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11176 (compile_tracepoint_condition, compile_bytecodes): New.
11177 * target.h (emit_ops): Forward declare.
11178 (struct target_ops): New field emit_ops.
11179 (target_emit_ops): New.
11180 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11181 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11182 * linux-low.c (linux_emit_ops): New.
11183 (linux_target_ops): Install it.
11184 * linux-low.h (struct linux_target_ops): New field emit_ops.
11185
92b72907
UW
111862010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11187
11188 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11189 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11190
fa593d66
PA
111912010-06-01 Pedro Alves <pedro@codesourcery.com>
11192 Stan Shebs <stan@codesourcery.com>
11193
11194 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11195 (all): Depend on $(extra_libraries).
11196 (install-only): Install the IPA.
11197 (IPA_OBJS, IPA_LIB): New.
11198 (clean): Remove the IPA lib.
11199 (IPAGENT_CFLAGS): New.
11200 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11201 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11202 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11203 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11204 * configure.ac: Check for atomic builtins support in the compiler.
11205 (IPA_DEPFILES, extra_libraries): Define.
11206 * configure.srv (ipa_obj): Add description.
11207 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11208 (i[34567]86-*-linux*): Set ipa_obj.
11209 (x86_64-*-linux*): Set ipa_obj.
11210 * linux-low.c (stabilizing_threads): New.
11211 (supports_fast_tracepoints): New.
11212 (linux_detach): Stabilize threads before detaching.
11213 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11214 the lwp is either not stabilizing, or is moving out of a jump pad.
11215 (linux_fast_tracepoint_collecting): New.
11216 (maybe_move_out_of_jump_pad): New.
11217 (enqueue_one_deferred_signal): New.
11218 (dequeue_one_deferred_signal): New.
11219 (linux_wait_for_event_1): If moving out of a jump pad, defer
11220 pending signals to later.
11221 (linux_stabilize_threads): New.
11222 (linux_wait_1): Check if threads need moving out of jump pads, and
11223 do it if so.
11224 (stuck_in_jump_pad_callback): New.
11225 (move_out_of_jump_pad_callback): New.
11226 (lwp_running): New.
11227 (linux_resume_one_lwp): Handle moving out of jump pads.
11228 (linux_set_resume_request): Dequeue deferred signals.
11229 (need_step_over_p): Also step over fast tracepoint jumps.
11230 (start_step_over): Also uninsert fast tracepoint jumps.
11231 (finish_step_over): Also reinsert fast tracepoint jumps.
11232 (linux_install_fast_tracepoint_jump): New.
11233 (linux_target_ops): Install linux_stabilize_threads and
11234 linux_install_fast_tracepoint_jump_pad.
11235 * linux-low.h (linux_target_ops) <get_thread_area,
11236 install_fast_tracepoint_jump_pad>: New fields.
11237 (struct lwp_info) <collecting_fast_tracepoint,
11238 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11239 (linux_get_thread_area): Declare.
11240 * linux-x86-low.c (jump_insn): New.
11241 (x86_get_thread_area): New.
11242 (append_insns): New.
11243 (push_opcode): New.
11244 (amd64_install_fast_tracepoint_jump_pad): New.
11245 (i386_install_fast_tracepoint_jump_pad): New.
11246 (x86_install_fast_tracepoint_jump_pad): New.
11247 (the_low_target): Install x86_get_thread_area and
11248 x86_install_fast_tracepoint_jump_pad.
11249 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11250 (struct fast_tracepoint_jump): New.
11251 (fast_tracepoint_jump_insn): New.
11252 (fast_tracepoint_jump_shadow): New.
11253 (find_fast_tracepoint_jump_at): New.
11254 (fast_tracepoint_jump_here): New.
11255 (delete_fast_tracepoint_jump): New.
11256 (set_fast_tracepoint_jump): New.
11257 (uninsert_fast_tracepoint_jumps_at): New.
11258 (reinsert_fast_tracepoint_jumps_at): New.
11259 (set_breakpoint_at): Use write_inferior_memory.
11260 (uninsert_raw_breakpoint): Use write_inferior_memory.
11261 (check_mem_read): Mask out fast tracepoint jumps.
11262 (check_mem_write): Mask out fast tracepoint jumps.
11263 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11264 (set_fast_tracepoint_jump): Declare.
11265 (delete_fast_tracepoint_jump)
11266 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11267 (reinsert_fast_tracepoint_jumps_at): Declare.
11268 * regcache.c: Don't compile many functions when building the
11269 in-process agent library.
11270 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11271 the register buffer in the heap.
11272 (free_register_cache): If the register buffer isn't owned by the
11273 regcache, don't free it.
11274 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11275 pre-existing register caches.
11276 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11277 type.
11278 (convert_ascii_to_int): : Constify `from' parameter type.
11279 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11280 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11281 the needed buffer in-place.
11282 (relocate_instruction): New.
11283 * server.c (handle_query) <qSymbols>: If the target supports
11284 tracepoints, give it a chance of looking up symbols. Report
11285 support for fast tracepoints.
11286 (handle_status): Stabilize threads.
11287 (process_serial_event): Adjust.
11288 * server.h (struct fast_tracepoint_jump): Forward declare.
11289 (struct process_info) <fast_tracepoint_jumps>: New field.
11290 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11291 (decode_X_packet, decode_M_packet): Adjust.
11292 (relocate_instruction): Declare.
11293 (in_process_agent_loaded): Declare.
11294 (tracepoint_look_up_symbols): Declare.
11295 (struct fast_tpoint_collect_status): Declare.
11296 (fast_tracepoint_collecting): Declare.
11297 (force_unlock_trace_buffer): Declare.
11298 (handle_tracepoint_bkpts): Declare.
11299 (initialize_low_tracepoint)
11300 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11301 * target.h (struct target_ops) <stabilize_threads,
11302 install_fast_tracepoint_jump_pad>: New fields.
11303 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11304 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11305 [HAVE_STDINT_H]: Include stdint.h.
11306 (trace_debug_1): Rename to ...
11307 (trace_vdebug): ... this.
11308 (trace_debug): Rename to ...
11309 (trace_debug_1): ... this. Add `level' parameter.
11310 (trace_debug): New.
11311 (ATTR_USED, ATTR_NOINLINE): New.
11312 (IP_AGENT_EXPORT): New.
11313 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11314 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11315 (about_to_request_buffer_space, trace_buffer_is_full)
11316 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11317 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11318 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11319 (traceframe_write_count, traceframes_created)
11320 (trace_state_variables)
11321 New renaming defines.
11322 (struct ipa_sym_addresses): New.
11323 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11324 (symbol_list): New.
11325 (ipa_sym_addrs): New.
11326 (all_tracepoint_symbols_looked_up): New.
11327 (in_process_agent_loaded): New.
11328 (write_e_ipa_not_loaded): New.
11329 (maybe_write_ipa_not_loaded): New.
11330 (tracepoint_look_up_symbols): New.
11331 (debug_threads) [IN_PROCESS_AGENT]: New.
11332 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11333 (UNKNOWN_SIDE_EFFECTS): New.
11334 (stop_tracing): New.
11335 (flush_trace_buffer): New.
11336 (stop_tracing_bkpt): New.
11337 (flush_trace_buffer_bkpt): New.
11338 (read_inferior_integer): New.
11339 (read_inferior_uinteger): New.
11340 (read_inferior_data_pointer): New.
11341 (write_inferior_data_pointer): New.
11342 (write_inferior_integer): New.
11343 (write_inferior_uinteger): New.
11344 (struct collect_static_trace_data_action): Delete.
11345 (enum tracepoint_type): New.
11346 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11347 <actions_str, step_actions, step_actions_str>: Only include in
11348 GDBserver.
fa593d66
PA
11349 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11350 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11351 (tracepoints): Use IP_AGENT_EXPORT.
11352 (last_tracepoint): Don't include in the IPA.
11353 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11354 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11355 (alloced_trace_state_variables): New.
11356 (trace_state_variables): Use IP_AGENT_EXPORT.
11357 (traceframe_t): Delete unused variable.
11358 (circular_trace_buffer): Don't include in the IPA.
11359 (trace_buffer_start): Delete.
11360 (struct trace_buffer_control): New.
11361 (trace_buffer_free): Delete.
11362 (struct ipa_trace_buffer_control): New.
11363 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11364 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11365 New.
11366 (trace_buffer_ctrl): New.
11367 (TRACE_BUFFER_CTRL_CURR): New.
11368 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11369 Reimplement as macros.
11370 (trace_buffer_wrap): Delete.
11371 (traceframe_write_count, traceframe_read_count)
11372 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11373 (struct tracepoint_hit_ctx) <type>: New field.
11374 (struct fast_tracepoint_ctx): New.
11375 (memory_barrier): New.
11376 (cmpxchg): New.
11377 (record_tracepoint_error): Update atomically in the IPA.
11378 (clear_inferior_trace_buffer): New.
11379 (about_to_request_buffer_space): New.
11380 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11381 updating the same buffer.
11382 (add_tracepoint): Default the tracepoint's type to trap
11383 tracepoint, and orig_size to -1.
11384 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11385 internal variables.
11386 (create_trace_state_variable): New parameter `gdb'. Handle it.
11387 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11388 (cmd_qtdp): Handle fast tracepoints.
11389 (cmd_qtdv): Adjust.
11390 (max_jump_pad_size): New.
11391 (gdb_jump_pad_head): New.
11392 (get_jump_space_head): New.
11393 (claim_jump_space): New.
11394 (sort_tracepoints): New.
11395 (MAX_JUMP_SIZE): New.
11396 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11397 IPA.
11398 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11399 support. Upload fast traceframes, and delete internal IPA
11400 breakpoints.
11401 (stop_tracing_handler): New.
11402 (flush_trace_buffer_handler): New.
11403 (cmd_qtstop): Upload fast tracepoints.
11404 (response_tracepoint): Handle fast tracepoints.
11405 (tracepoint_finished_step): Upload fast traceframes. Set the
11406 tracepoint hit context's tracepoint type.
11407 (handle_tracepoint_bkpts): New.
11408 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11409 type. Add comment about fast tracepoints.
11410 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11411 non-existing action_str field.
11412 (get_context_regcache): Handle fast tracepoints.
11413 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11414 to the regcache.
11415 (fast_tracepoint_from_jump_pad_address): New.
11416 (fast_tracepoint_from_ipa_tpoint_address): New.
11417 (collecting_t): New.
11418 (force_unlock_trace_buffer): New.
11419 (fast_tracepoint_collecting): New.
11420 (collecting): New.
11421 (gdb_collect): New.
11422 (write_inferior_data_ptr): New.
11423 (target_tp_heap): New.
11424 (target_malloc): New.
11425 (download_agent_expr): New.
11426 (UALIGN): New.
11427 (download_tracepoints): New.
11428 (download_trace_state_variables): New.
11429 (upload_fast_traceframes): New.
11430 (IPA_FIRST_TRACEFRAME): New.
11431 (IPA_NEXT_TRACEFRAME_1): New.
11432 (IPA_NEXT_TRACEFRAME): New.
11433 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11434 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11435 (gdb_jump_pad_buffer_end): New.
11436 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11437 (initialize_tracepoint): Adjust.
11438 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11439 buffer. Initialize the low module.
11440 * utils.c (PREFIX, TOOLNAME): New.
11441 (malloc_failure): Use PREFIX.
11442 (error): In the IPA, an error causes an exit.
11443 (fatal, warning): Use PREFIX.
11444 (internal_error): Use TOOLNAME.
11445 (NUMCELLS): Increase to 10.
11446 * configure, config.in: Regenerate.
11447
d149dd1d
PA
114482010-06-01 Pedro Alves <pedro@codesourcery.com>
11449
11450 * server.c (handle_query) <qSupported>: Do two passes over the
11451 qSupported string to avoid nesting strtok.
11452
f6528abd
JK
114532010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11454
11455 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11456 (CDEPS): New.
11457 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11458 -Wl,--dynamic-list.
11459 * configure: Regenerate.
11460 * proc-service.list: New.
11461
ca2a87a0
JK
114622010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11463
11464 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11465 New comment.
11466
363a6e9f
OS
114672010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11468
11469 * gdbreplay.c (remote_open): Check error return from socket() call by
11470 its equality to -1 not by it being negative.
11471 * remote-utils.c (remote_open): Likewise.
11472
d23b6cb1
PA
114732010-05-23 Pedro Alves <pedro@codesourcery.com>
11474
11475 * config.h: Regenerate.
11476
28d3cf85
MK
114772010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11478
11479 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11480 doesn't provide PTRACE_GET_THREAD_AREA.
11481
fea36a59
MK
114822010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11483
11484 * linux-m68k-low.c: Include <asm/ptrace.h>
11485 (ps_get_thread_area): Implement.
11486
24b066ba
DE
114872010-05-03 Doug Evans <dje@google.com>
11488
11489 * event-loop.c (struct callback_event): New struct.
11490 (callback_list): New global.
11491 (append_callback_event, delete_callback_event): New functions.
11492 (process_callback): New function.
11493 (start_event_loop): Call it.
11494 * remote-utils.c (NOT_SCHEDULED): Define.
11495 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11496 moved out of readchar.
11497 (readchar): Rewrite. Call reschedule before returning.
11498 (reset_readchar): New function.
11499 (remote_close): Call it.
11500 (process_remaining, reschedule): New functions.
11501 * server.h (callback_handler_func): New typedef.
11502 (append_callback_event, delete_callback_event): Declare.
11503
9836d6ea
PA
115042010-05-03 Pedro Alves <pedro@codesourcery.com>
11505
11506 * proc-service.c (ps_pglobal_lookup): Use
11507 thread_db_look_up_one_symbol.
11508 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11509 parameter. Use it instead of all_symbols_looked_up.
11510 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11511 field.
11512 (all_symbols_looked_up): Don't declare.
11513 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11514 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11515 field.
11516 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11517 Set all_symbols_looked_up here.
11518 (thread_db_look_up_one_symbol): New.
11519 (thread_db_get_tls_address): Adjust.
11520 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11521 thread_db object on the heap, and tentatively set it in the
11522 process structure.
11523 (thread_db_init): Don't set all_symbols_looked_up here.
11524 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11525
7984d532
PA
115262010-05-03 Pedro Alves <pedro@codesourcery.com>
11527
11528 * linux-low.c (linux_kill, linux_detach): Adjust.
11529 (status_pending_p_callback): Remove redundant statement. Check
11530 for !TARGET_WAITIKIND_IGNORE, instead of
11531 TARGET_WAITKIND_STOPPED.
11532 (handle_tracepoints): Make sure LWP is locked. Adjust.
11533 (linux_wait_for_event_1): Adjust.
11534 (linux_cancel_breakpoints): New.
11535 (unsuspend_one_lwp): New.
11536 (unsuspend_all_lwps): New.
11537 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11538 (send_sigstop_callback): Change return type to int, add new
11539 `except' parameter and handle it.
11540 (suspend_and_send_sigstop_callback): New.
11541 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11542 pass them down. If SUSPEND, also increment the lwp's suspend
11543 count.
11544 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11545 (need_step_over_p): Don't consider suspended LWPs.
11546 (start_step_over): Adjust.
11547 (proceed_one_lwp): Change return type to int, add new `except'
11548 parameter and handle it.
11549 (unsuspend_and_proceed_one_lwp): New.
11550 (proceed_all_lwps): Use find_inferior instead of
11551 for_each_inferior.
11552 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11553 also decrement the suspend count of LWPs. Pass `except' down,
11554 instead of hacking its suspend count.
11555 (linux_pause_all): Add `freeze' parameter. Adjust.
11556 (linux_unpause_all): New.
11557 (linux_target_ops): Install linux_unpause_all.
11558 * server.c (handle_status): Adjust.
11559 * target.h (struct target_ops): New fields `unpause_all' and
11560 `cancel_breakpoints'. Add new parameter to `pause_all'.
11561 (pause_all): Add new `freeze' parameter.
11562 (unpause_all): New.
11563 (cancel_breakpoints): New.
11564 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11565 cancel breakpoints.
11566 (cmd_qtstart): Pause threads.
11567 (stop_tracing): Pause threads, and cancel breakpoints.
11568 * win32-low.c (win32_target_ops): Adjust.
11569
e471f25b
PA
115702010-05-03 Pedro Alves <pedro@codesourcery.com>
11571
11572 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11573 the inferior right away from here...
11574 (linux_wait_1): ... to here, and adjust to check the thread's
11575 last_resume_kind instead of the lwp's step or stop_expected flags.
11576
1915ef4f
PA
115772010-05-02 Pedro Alves <pedro@codesourcery.com>
11578
11579 * README: Use consistent `GDB' and `GDBserver' spellings.
11580
f9e39928
PA
115812010-05-02 Pedro Alves <pedro@codesourcery.com>
11582
11583 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11584 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11585 (linux_detach_one_lwp): Assume the lwp is stopped.
11586 (any_thread_of): Delete.
11587 (linux_detach): Stop all lwps here. Don't blindly delete all
11588 breakpoints.
11589 (delete_lwp_callback): New.
11590 (linux_mourn): Delete all lwps of the process that is gone.
11591 (linux_wait_1): Don't delete the last lwp of the process here.
11592 * mem-break.h (mark_breakpoints_out): Declare.
11593 * mem-break.c (mark_breakpoints_out): New.
11594 (free_all_breakpoints): Use it.
11595 * server.c (handle_target_event): If the process is gone, mark
11596 breakpoints out.
11597 * thread-db.c (struct thread_db) <create_bp>: New field.
11598 (thread_db_enable_reporting): Fix prototype. Store a thread event
11599 breakpoint reference in the thread_db struct.
11600 (thread_db_load_search): Clear the thread_db object.
11601 (try_thread_db_load_1): Ditto.
11602 (switch_to_process): New.
11603 (disable_thread_event_reporting): Use it.
11604 (remove_thread_event_breakpoints): New.
11605 (thread_db_detach, thread_db_mourn): Use it.
11606
1e7fc18c
PA
116072010-05-01 Pedro Alves <pedro@codesourcery.com>
11608
11609 * linux-low.c (linux_enable_event_reporting): New.
11610 (linux_wait_for_event_1, handle_extended_wait): Use it.
11611
02fc4de7
PA
116122010-04-30 Pedro Alves <pedro@codesourcery.com>
11613
11614 * linux-low.c (linux_kill_one_lwp, linux_kill)
11615 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11616 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11617 SIGSTOP even if the LWP is stopped.
11618 (send_sigstop_callback): New.
11619 (stop_all_lwps): Use send_sigstop_callback instead.
11620 (linux_resume_one_thread): Adjust.
11621 (proceed_one_lwp): Still proceed an LWP that the client has
11622 requested to stop, if we haven't reported it as stopped yet. Make
11623 sure that LWPs the client want stopped, have a pending SIGSTOP.
11624
bc3b5632
DE
116252010-04-26 Doug Evans <dje@google.com>
11626
ae1ada35
DE
11627 * server.c (handle_general_set): Make static.
11628
bc3b5632
DE
11629 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11630 Print received char after testing for error/eof instead of before.
11631 (input_interrupt): Tweak comment.
11632
65730243
DE
116332010-04-23 Doug Evans <dje@google.com>
11634
11635 * server.c (start_inferior): Print inferior argv if --debug.
11636
a8ae7dc0
AR
116372010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11638
11639 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11640 * nto-x86-low.c: Include server.h
11641
1c07cc19
PM
116422010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11643
11644 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11645 be consistent with other sources of this directory.
11646 (init_registers_amd64): Correct name of source file of this function
11647 in the comment.
11648
e0a61e09
PM
116492010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11650
11651 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11652 64-bit executables.
11653
54709339
PM
116542010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11655
11656 * win32-i386-low.c: Add 64-bit support.
11657 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11658 (init_registers_amd64): Declare.
11659 (mappings): Add 64-bit version of array.
11660 (init_windows_x86): New function.
11661 (the_low_target): Change init_arch field to init_windows_x86.
11662
e8f0053d
PM
116632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11664
11665 * win32-low.c: Adapt to support also 64-bit architecture.
11666 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11667 (get_image_name): Use SIZE_T type for local variable `done'.
11668 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11669 (toolhelp_get_dll_name): Idem.
11670 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11671 Use uintptr_t typecast to avoid warning.
11672 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11673 (handle_exception): Use phex_nz to avoid warning.
11674 (win32_wait): Remove unused local variable `process'.
11675
c481e77e
PM
116762010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11677
11678 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11679 `amd64-avx.o'.
11680
12ea4b69
PM
116812010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11682
11683 * configure.ac: Use `ws2_32' library for srv_mingw.
11684 * configure: Regenerate.
11685 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11686 * remote-utils.c: Likewise.
11687
f6d1620c
L
116882010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11689
11690 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11691 if __x86_64__ is defined.
11692
8e642873
PM
116932010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11694
11695 * configure: Regenerate.
11696
711e434b
PM
116972010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11698
11699 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11700 * target.h (target_ops): New get_tib_address field.
11701 * win32-low.h (win32_thread_info): Add thread_local_base field.
11702 * win32-low.c (child_add_thread): Add tlb argument.
11703 Set thread_local_base field to TLB.
11704 (get_child_debug_event): Adapt to child_add_thread change.
11705 (win32_get_tib_address): New function.
11706 (win32_target_ops): Set get_tib_address field to
11707 win32_get_tib_address.
11708 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11709
505106cd
PA
117102010-04-12 Pedro Alves <pedro@codesourcery.com>
11711
505106cd
PA
11712 * linux-low.c (linux_mourn): Also remove the process.
11713 * server.c (handle_target_event): Don't remove the process here.
11714 * nto-low.c (nto_mourn): New.
11715 (nto_target_ops): Install it.
11716 * spu-low.c (spu_mourn): New.
11717 (spu_target_ops): Install it.
11718 * win32-low.c (win32_mourn): New.
11719 (win32_target_ops): Install it.
11720
e8470a06
PA
117212010-04-12 Pedro Alves <pedro@codesourcery.com>
11722
11723 * server.h (buffer_xml_printf): Remove redundant `;'.
11724
45ba0d02
PA
117252010-04-12 Pedro Alves <pedro@codesourcery.com>
11726
11727 * regcache.c (set_register_cache): Invalidate regcaches before
11728 changing the register cache layout.
11729 (regcache_invalidate_one): Allow a NULL regcache.
11730 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11731 regcaches before changing the register cache layout or the target
11732 regsets.
11733
59e04013
L
117342010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11735
11736 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11737 variable warning on Linux/x86-64.
11738
8336d594
PA
117392010-04-11 Pedro Alves <pedro@codesourcery.com>
11740
11741 GDBserver disconnected tracing support.
11742
11743 * linux-low.c (linux_remove_process): Delete.
11744 (add_lwp): Don't set last_resume_kind here.
11745 (linux_kill): Use `mourn'.
11746 (linux_detach): Use `thread_db_detach', and `mourn'.
11747 (linux_mourn): New.
11748 (linux_attach_lwp_1): Adjust comment.
11749 (linux_attach): last_resume_kind moved the thread_info; adjust.
11750 (status_pending_p_callback): Adjust.
11751 (linux_wait_for_event_1): Adjust.
11752 (count_events_callback, select_singlestep_lwp_callback)
11753 (select_event_lwp_callback, cancel_breakpoints_callback)
11754 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11755 (proceed_one_lwp): Adjust.
11756 (linux_async): Add debug output.
11757 (linux_thread_stopped): New.
11758 (linux_pause_all): New.
11759 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11760 linux_pause_all.
11761 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11762 (thread_db_free): Delete declaration.
11763 (thread_db_detach, thread_db_mourn): Declare.
11764 * thread-db.c (thread_db_init): Use thread_db_mourn.
11765 (thread_db_free): Delete, split in two.
11766 (disable_thread_event_reporting): New.
11767 (thread_db_detach): New.
11768 (thread_db_mourn): New.
11769
11770 * server.h (struct thread_info) <last_resume_kind>: New field.
11771 <attached>: Add comment.
11772 <gdb_detached>: New field.
11773 (handler_func): Change return type to int.
11774 (handle_serial_event, handle_target_event): Ditto.
11775 (gdb_connected): Declare.
11776 (tracing): Delete.
11777 (disconnected_tracing): Declare.
11778 (stop_tracing): Declare.
11779
11780 * server.c (handle_query) <qSupported>: Report support for
11781 disconnected tracing.
11782 (queue_stop_reply_callback): Account for running threads.
11783 (gdb_wants_thread_stopped): New.
11784 (gdb_wants_all_threads_stopped): New.
11785 (gdb_reattached_process): New.
11786 (handle_status): Clear the `gdb_detached' flag of all processes.
11787 In all-stop, stop all threads.
11788 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11789 (process_serial_event): If the remote connection breaks, or if an
11790 exit was forced with "monitor exit", force an event loop exit.
11791 Handle disconnected tracing on detach.
11792 (handle_serial_event): Adjust.
11793 (handle_target_event): If GDB isn't connected, forward events back
11794 to the inferior, unless the last process exited, in which case,
11795 exit gdbserver. Adjust interface.
11796
11797 * remote-utils.c (remote_open): Don't block in accept. Instead
11798 register an event loop source on the listen socket file
11799 descriptor. Refactor bits into ...
11800 (listen_desc): ... this new global.
11801 (gdb_connected): ... this new function.
11802 (enable_async_notification): ... this new function.
11803 (handle_accept_event): ... this new function.
11804 (remote_close): Clear remote_desc.
11805
11806 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11807
11808 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11809 New fields.
11810 (mourn_inferior): Define.
11811 (target_process_qsupported): Avoid the dangling else problem.
11812 (thread_stopped): Define.
11813 (pause_all): Define.
11814 (target_waitstatus_to_string): Declare.
11815 * target.c (target_waitstatus_to_string): New.
11816
11817 * tracepoint.c (tracing): Make extern.
11818 (disconnected_tracing): New.
11819 (stop_tracing): Make extern. Handle tracing stops due to GDB
11820 disconnecting.
11821 (cmd_qtdisconnected): New.
11822 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11823 (handle_tracepoint_general_set): Handle QTDisconnected.
11824
11825 * event-loop.c (event_handler_func): Change return type to int.
11826 (process_event): Bail out if the event handler wants the event
11827 loop to stop.
11828 (handle_file_event): Ditto.
11829 (start_event_loop): Bail out if the event handler wants the event
11830 loop to stop.
11831
11832 * nto-low.c (nto_target_ops): Adjust.
11833 * spu-low.c (spu_wait): Don't remove the process here.
11834 (spu_target_ops): Adjust.
11835 * win32-low.c (win32_wait): Don't remove the process here.
11836 (win32_target_ops): Adjust.
11837
5d267c4c
PA
118382010-04-11 Pedro Alves <pedro@codesourcery.com>
11839
11840 * regcache.c (realloc_register_cache): Invalidate inferior's
11841 regcache before recreating it.
11842
623ccd72
PA
118432010-04-09 Pedro Alves <pedro@codesourcery.com>
11844
11845 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11846
219f2f23
PA
118472010-04-09 Stan Shebs <stan@codesourcery.com>
11848 Pedro Alves <pedro@codesourcery.com>
11849
11850 * server.h (LONGEST): New.
11851 (struct thread_info) <while_stepping>: New field.
11852 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11853 Declare.
11854 (initialize_tracepoint, handle_tracepoint_general_set)
11855 (handle_tracepoint_query, tracepoint_finished_step)
11856 (tracepoint_was_hit, release_while_stepping_state_list):
11857 (current_traceframe): Declare.
11858 * server.c (handle_general_set): Handle tracepoint packets.
11859 (read_memory): New.
11860 (write_memory): New.
11861 (handle_search_memory_1): Use read_memory.
11862 (handle_query): Report support for conditional tracepoints, trace
11863 state variables, and tracepoint sources. Handle tracepoint
11864 queries.
11865 (main): Initialize the tracepoints module.
11866 (process_serial_event): Handle traceframe reads/writes.
11867
11868 * linux-low.c (handle_tracepoints): New.
11869 (linux_wait_1): Call it.
11870 (linux_resume_one_lwp): Handle while-stepping.
11871 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11872 (linux_target_ops): Install them.
11873 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11874 New field.
11875 * linux-x86-low.c (x86_supports_tracepoints): New.
11876 (the_low_target). Install it.
11877
11878 * mem-break.h (delete_breakpoint): Declare.
11879 * mem-break.c (delete_breakpoint): Make external.
11880
11881 * target.h (struct target_ops): Add `supports_tracepoints',
11882 `read_pc', and `write_pc' fields.
11883 (target_supports_tracepoints): Define.
11884 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11885 (phex_nz): New.
11886
11887 * regcache.h (struct regcache) <registers_owned>: New field.
11888 (init_register_cache, regcache_cpy): Declare.
11889 (regcache_read_pc, regcache_write_pc): Declare.
11890 (register_cache_size): Declare.
11891 (supply_regblock): Declare.
11892 * regcache.c (init_register_cache): New.
11893 (new_register_cache): Use it.
11894 (regcache_cpy): New.
11895 (register_cache_size): New.
11896 (supply_regblock): New.
11897 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11898
219f2f23
PA
11899 * tracepoint.c: New.
11900
11901 * Makefile.in (OBS): Add tracepoint.o.
11902 (tracepoint.o): New rule.
11903
3a13a53b
L
119042010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11905
11906 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11907 (i386-mmx.o): New.
11908 (i386-mmx.c): Likewise.
11909 (i386-mmx-linux.o): Likewise.
11910 (i386-mmx-linux.c): Likewise.
11911
11912 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11913 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11914 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11915 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11916
11917 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11918 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11919 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11920
1570b33e
L
119212010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11922
11923 * Makefile.in (clean): Updated.
11924 (i386-avx.o): New.
11925 (i386-avx.c): Likewise.
11926 (i386-avx-linux.o): Likewise.
11927 (i386-avx-linux.c): Likewise.
11928 (amd64-avx.o): Likewise.
11929 (amd64-avx.c): Likewise.
11930 (amd64-avx-linux.o): Likewise.
11931 (amd64-avx-linux.c): Likewise.
11932
11933 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11934 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11935 (srv_amd64_regobj): Add amd64-avx.o.
11936 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11937 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11938 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11939 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11940 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11941 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11942 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11943
11944 * i387-fp.c: Include "i386-xstate.h".
11945 (i387_xsave): New.
11946 (i387_cache_to_xsave): Likewise.
11947 (i387_xsave_to_cache): Likewise.
11948 (x86_xcr0): Likewise.
11949
11950 * i387-fp.h (i387_cache_to_xsave): Likewise.
11951 (i387_xsave_to_cache): Likewise.
11952 (x86_xcr0): Likewise.
11953
11954 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11955 * linux-crisv32-low.c (target_regsets): Likewise.
11956 * linux-m68k-low.c (target_regsets): Likewise.
11957 * linux-mips-low.c (target_regsets): Likewise.
11958 * linux-ppc-low.c (target_regsets): Likewise.
11959 * linux-s390-low.c (target_regsets): Likewise.
11960 * linux-sh-low.c (target_regsets): Likewise.
11961 * linux-sparc-low.c (target_regsets): Likewise.
11962 * linux-xtensa-low.c (target_regsets): Likewise.
11963
11964 * linux-low.c: Include <sys/uio.h>.
11965 (regsets_fetch_inferior_registers): Support nt_type.
11966 (regsets_store_inferior_registers): Likewise.
11967 (linux_process_qsupported): New.
11968 (linux_target_ops): Add linux_process_qsupported.
11969
11970 * linux-low.h (regset_info): Add nt_type.
11971 (linux_target_ops): Add process_qsupported.
11972
11973 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11974 and <sys/uio.h>.
11975 (init_registers_i386_avx_linux): New.
11976 (init_registers_amd64_avx_linux): Likewise.
11977 (xmltarget_i386_linux_no_xml): Likewise.
11978 (xmltarget_amd64_linux_no_xml): Likewise.
11979 (PTRACE_GETREGSET): Likewise.
11980 (PTRACE_SETREGSET): Likewise.
11981 (x86_fill_xstateregset): Likewise.
11982 (x86_store_xstateregset): Likewise.
11983 (use_xml): Likewise.
11984 (x86_linux_update_xmltarget): Likewise.
11985 (x86_linux_process_qsupported): Likewise.
11986 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11987 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11988 init_registers_i386_linux here. Call
11989 x86_linux_update_xmltarget.
11990 (the_low_target): Add x86_linux_process_qsupported.
11991
11992 * server.c (handle_query): Call target_process_qsupported.
11993
11994 * target.h (target_ops): Add process_qsupported.
11995 (target_process_qsupported): New.
11996
fc7238bb
PA
119972010-04-03 Pedro Alves <pedro@codesourcery.com>
11998
11999 * inferiors.c (add_thread): Set last_status kind to
12000 TARGET_WAITKIND_IGNORE.
12001 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12002 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12003 (linux_wait_1): Move `thread' local definition to block that uses
12004 it. Don't NULL initialize `event_child'.
12005 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12006 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12007 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12008
bdabb078
PA
120092010-04-01 Pedro Alves <pedro@codesourcery.com>
12010
12011 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12012 an extended waitstatus, or by a watchpoint.
12013 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12014 thread was stepping or has been stopped by a watchpoint.
12015
d3bbe7a0
PA
120162010-04-01 Pedro Alves <pedro@codesourcery.com>
12017
12018 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12019 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12020 of another, then delete the previous, and validate all
12021 breakpoints.
12022 (validate_inserted_breakpoint): New.
12023 (delete_disabled_breakpoints): New.
12024 (validate_breakpoints): New.
12025 (check_mem_read): Validate breakpoints before trusting their
12026 shadow. Delete disabled breakpoints.
12027 (check_mem_write): Validate breakpoints before trusting they
12028 should be inserted. Delete disabled breakpoints.
12029 * mem-break.h (validate_breakpoints):
12030 * server.c (handle_query): Validate breakpoints when we see a
12031 qSymbol query.
12032
8b07ae33
PA
120332010-04-01 Pedro Alves <pedro@codesourcery.com>
12034
12035 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12036 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12037 if we could tell there's a GDB breakpoint at stop_pc.
12038 (need_step_over_p): Don't do a step over if we find a GDB
12039 breakpoint at the resume PC.
12040
12041 * mem-break.c (struct raw_breakpoint): New.
12042 (enum bkpt_type): New type `gdb_breakpoint'.
12043 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12044 fields. New field `raw'.
12045 (find_raw_breakpoint_at): New.
12046 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12047 breakpoint instead.
12048 (set_breakpoint_at): Adjust.
12049 (delete_raw_breakpoint): New.
12050 (release_breakpoint): New.
12051 (delete_breakpoint): Rename to...
12052 (delete_breakpoint_1): ... this. Add proc parameter. Use
12053 release_breakpoint. Return ENOENT.
12054 (delete_breakpoint): Reimplement.
12055 (find_breakpoint_at): Delete.
12056 (find_gdb_breakpoint_at): New.
12057 (delete_breakpoint_at): Delete.
12058 (set_gdb_breakpoint_at): New.
12059 (delete_gdb_breakpoint_at): New.
12060 (gdb_breakpoint_here): New.
12061 (set_reinsert_breakpoint): Use release_breakpoint.
12062 (uninsert_breakpoint): Rename to ...
12063 (uninsert_raw_breakpoint): ... this.
12064 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12065 (reinsert_raw_breakpoint): Change parameter type to
12066 raw_breakpoint.
12067 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12068 instead.
12069 (check_breakpoints): Adjust. Use release_breakpoint.
12070 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12071 (breakpoint_inserted_here): Ditto.
12072 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12073 Don't trust the breakpoint's shadow if it is not inserted.
12074 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12075 (delete_all_breakpoints): Adjust.
12076 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12077 use delete_breakpoint_1.
12078
12079 * mem-break.h (breakpoints_supported): Delete declaration.
12080 (set_gdb_breakpoint_at): Declare.
12081 (gdb_breakpoint_here): Declare.
12082 (delete_breakpoint_at): Delete.
12083 (delete_gdb_breakpoint_at): Declare.
12084
12085 * server.h (struct raw_breakpoint): Forward declare.
12086 (struct process_info): New field `raw_breakpoints'.
12087
12088 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12089 breakpoints.
12090
6bf5e0ba
PA
120912010-03-24 Pedro Alves <pedro@codesourcery.com>
12092
12093 * linux-low.c (status_pending_p_callback): Fix comment.
12094 (linux_wait_for_event_1): Move most of the internal breakpoint
12095 handling from here...
12096 (linux_wait_1): ... to here.
12097 (count_events_callback): New.
12098 (select_singlestep_lwp_callback): New.
12099 (select_event_lwp_callback): New.
12100 (cancel_breakpoints_callback): New.
12101 (select_event_lwp): New.
12102 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12103 priority to all LWPs that have had events that should be reported
12104 to the client. Cancel breakpoints when about to reporting the
12105 event to the client, not while stopping lwps. No longer cancel
12106 finished single-steps here.
12107 (cancel_finished_single_step): Delete.
12108 (cancel_finished_single_steps): Delete.
12109
414a389f
PA
121102010-03-24 Pedro Alves <pedro@codesourcery.com>
12111
12112 * mem-break.c (enum bkpt_type): New.
12113 (struct breakpoint): New field `type'.
12114 (set_breakpoint_at): Change return type to struct breakpoint
12115 pointer. Set type to `other_breakpoint' by default.
12116 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12117 in the breakpoint list.
12118 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12119 (reinsert_breakpoint): Rename to ...
12120 (reinsert_raw_breakpoint): ... this.
12121 (reinsert_breakpoints_at): Adjust.
12122 * mem-break.h (struct breakpoint): Declare.
12123 (set_breakpoint_at): Change return type to struct breakpoint
12124 pointer.
12125
2280c721
PA
121262010-03-24 Pedro Alves <pedro@codesourcery.com>
12127
12128 * server.c (handle_query): Assign, not compare.
12129
d50171e4
PA
121302010-03-24 Pedro Alves <pedro@codesourcery.com>
12131
12132 Teach linux gdbserver to step-over-breakpoints.
12133
12134 * linux-low.c (can_hardware_single_step): New.
12135 (supports_breakpoints): New.
12136 (handle_extended_wait): If stopping threads, read the stop pc of
12137 the new cloned LWP.
12138 (get_pc): New.
12139 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12140 low target doesn't support retrieving the PC.
12141 (add_lwp): Set last_resume_kind to resume_continue.
12142 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12143 (linux_attach): Don't clear stop_expected. Set the lwp's
12144 last_resume_kind to resume_stop.
12145 (linux_detach_one_lwp): Don't check for removed breakpoints.
12146 (check_removed_breakpoint): Delete.
12147 (status_pending_p): Rename to ...
12148 (status_pending_p_callback): ... this. Don't check for removed
12149 breakpoints. Don't consider threads that are stopped from GDB's
12150 perspective.
12151 (linux_wait_for_lwp): Always read the stop_pc here.
12152 (cancel_breakpoint): New.
12153 (step_over_bkpt): New global.
12154 (linux_wait_for_event_1): Implement stepping over breakpoints.
12155 (gdb_wants_lwp_stopped): New.
12156 (gdb_wants_all_stopped): New.
12157 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12158 single-step traps here. Store the thread's last reported target
12159 wait status.
12160 (send_sigstop): Don't clear stop_expected. Always set it,
12161 instead.
12162 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12163 (cancel_finished_single_step): New.
12164 (cancel_finished_single_steps): New.
12165 (wait_for_sigstop): Don't cancel finished single-step traps here.
12166 (linux_resume_one_lwp): Don't check for removed breakpoints.
12167 Don't set `step' on non-hardware step archs.
12168 (linux_set_resume_request): Ignore resume_stop requests if already
12169 stopping or stopped. Set the lwp's last_resume_kind.
12170 (resume_status_pending_p): Don't check for removed breakpoints.
12171 (need_step_over_p): New.
12172 (start_step_over): New.
12173 (finish_step_over): New.
12174 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12175 requests. Clear the thread's last reported target waitstatus.
12176 Don't use the `suspended' flag. Don't consider pending breakpoints.
12177 (linux_resume): Start a step-over if necessary.
12178 (proceed_one_lwp): New.
12179 (proceed_all_lwps): New.
12180 (unstop_all_lwps): New.
12181 * linux-low.h (struct lwp_info): Rewrite comment for the
12182 `suspended' flag. Add the `stop_pc' field. Delete the
12183 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12184 Add `'last_resume_kind' and `need_step_over' fields.
12185 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12186 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12187 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12188 (set_raw_breakpoint_at): New.
12189 (set_breakpoint_at): Rewrite to use it.
12190 (reinsert_breakpoint_handler): Delete.
12191 (set_reinsert_breakpoint): New.
12192 (reinsert_breakpoint_by_bp): Delete.
12193 (delete_reinsert_breakpoints): New.
12194 (uninsert_breakpoint): Rewrite.
12195 (uninsert_breakpoints_at): New.
12196 (reinsert_breakpoint): Rewrite.
12197 (reinsert_breakpoints_at): New.
12198 (check_breakpoints): Rewrite.
12199 (breakpoint_here): New.
12200 (breakpoint_inserted_here): New.
12201 (check_mem_read): Adjust.
12202 * mem-break.h (breakpoints_supported, breakpoint_here)
12203 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12204 (reinsert_breakpoint_by_bp): Delete declaration.
12205 (delete_reinsert_breakpoints): Declare.
12206 (reinsert_breakpoint): Delete declaration.
12207 (reinsert_breakpoints_at): Declare.
12208 (uninsert_breakpoint): Delete declaration.
12209 (uninsert_breakpoints_at): Declare.
12210 (check_breakpoints): Adjust prototype.
12211 * server.h: Adjust include order.
12212 (struct thread_info): Declare here. Add a `last_status' field.
12213
30ba68cb
MS
122142010-03-23 Michael Snyder <msnyder@vmware.com>
12215
12216 * server.c (crc32): New function.
12217 (handle_query): Add handling for 'qCRC:' request.
12218
b9a881c2
PA
122192010-03-23 Pedro Alves <pedro@codesourcery.com>
12220
12221 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12222 lwp had been stopped by a watchpoint.
12223
e92d13d5
PA
122242010-03-16 Pedro Alves <pedro@codesourcery.com>
12225
12226 * server.h (internal_error): Declare.
12227 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12228 * utils.c (internal_error): New function.
12229
64daa791
AS
122302010-03-15 Andreas Schwab <schwab@redhat.com>
12231
12232 * configure.srv: Fix typo setting srv_regobj.
12233
f52cd8cd
PA
122342010-03-15 Pedro Alves <pedro@codesourcery.com>
12235
12236 * linux-low.c (fetch_register): Avoid passing a non string literal
12237 format to `error'.
12238 (usr_store_inferior_registers): Ditto.
12239
93ae6fdc
PA
122402010-03-14 Pedro Alves <pedro@codesourcery.com>
12241
12242 * linux-low.c (linux_write_memory): Bail out early if peeking
12243 memory failed.
12244
c3adc08c
PA
122452010-03-14 Pedro Alves <pedro@codesourcery.com>
12246
12247 * linux-low.h (struct lwp_info): New fields
12248 `stopped_by_watchpoint' and `stopped_data_address'.
12249 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12250 here, and cache them in the lwp object.
12251 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12252 directly.
12253 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12254 field.
12255 (linux_stopped_by_watchpoint): Rewrite.
12256 (linux_stopped_data_address): Rewrite.
12257
bce522a2
PA
122582010-03-06 Simo Melenius <simo.melenius@iki.fi>
12259
12260 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12261 switching the current inferior, not before.
12262
90884b2b
L
122632010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12264
12265 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12266 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12267 i386-linux.c and amd64-linux.c.
12268 (reg-i386.o): Removed.
12269 (reg-i386.c): Likewise.
12270 (reg-i386-linux.o): Likewise.
12271 (reg-i386-linux.c): Likewise.
12272 (reg-x86-64.o): Likewise.
12273 (reg-x86-64.c): Likewise.
12274 (reg-x86-64-linux.o): Likewise.
12275 (reg-x86-64-linux.c): Likewise.
12276 (i386.o): New.
12277 (i386.c): Likewise.
12278 (i386-linux.o): Likewise.
12279 (i386-linux.c): Likewise.
12280 (amd64.o): Likewise.
12281 (amd64.c): Likewise.
12282 (amd64-linux.o): Likewise.
12283 (amd64-linux.c): Likewise.
12284
12285 * configure.srv (srv_i386_regobj): New.
12286 (srv_i386_linux_regobj): Likewise.
12287 (srv_amd64_regobj): Likewise.
12288 (srv_amd64_linux_regobj): Likewise.
12289 (srv_i386_32bit_xmlfiles): Likewise.
12290 (srv_i386_64bit_xmlfiles): Likewise.
12291 (srv_i386_xmlfiles): Likewise.
12292 (srv_amd64_xmlfiles): Likewise.
12293 (srv_i386_linux_xmlfiles): Likewise.
12294 (srv_amd64_linux_xmlfiles): Likewise.
12295 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12296 srv_xmlfiles to $srv_i386_xmlfiles.
12297 (i[34567]86-*-mingw32ce*): Likewise.
12298 (i[34567]86-*-mingw*): Likewise.
12299 (i[34567]86-*-nto*): Likewise.
12300 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12301 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12302 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12303 (x86_64-*-linux*): Likewise.
12304
12305 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12306 (init_registers_amd64_linux): New.
12307 (x86_arch_setup): Replace init_registers_x86_64_linux with
12308 init_registers_amd64_linux.
12309
193f13e6
MK
123102010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12311
12312 * configure.ac: Check for libdl. If it is not available link against
12313 static libthread_db.
12314 * configure: Regenerate.
12315
85d721b8
PA
123162010-02-22 Pedro Alves <pedro@codesourcery.com>
12317
12318 PR9605
12319
12320 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12321 handing a read watchpoint.
12322 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12323
6076632b
DE
123242010-02-12 Doug Evans <dje@google.com>
12325
12326 * linux-low.c (linux_supports_tracefork_flag): Document.
12327 (linux_look_up_symbols): Add comment.
12328
3327ccf7
L
123292010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12330
12331 * regcache.c (supply_register): Clear regcache if buf is NULL.
12332
0718675c 123332010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12334 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12335
12336 * inferiors.c (find_inferior): Add function documentation.
12337 (unloaded_dll): Handle the case where the unloaded dll has not
12338 been previously registered in the dll list.
12339
177321bd
DJ
123402010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12341
12342 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12343 (thumb2_breakpoint): New.
12344 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12345
2b009048
DJ
123462010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12347
12348 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12349 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12350 breakpoints.
12351
3be029c7
PA
123522010-01-21 Pedro Alves <pedro@codesourcery.com>
12353
12354 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12355
18f5de3b
JK
123562010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12357
12358 * linux-s390-low.c (s390_collect_ptrace_register)
12359 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12360
3743bb4f
DE
123612010-01-21 Doug Evans <dje@google.com>
12362
14ce3065
DE
12363 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12364 (PTRACE_ARG4_TYPE): New macro.
12365 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12366 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12367 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12368 (usr_store_inferior_registers): Ditto.
12369 (linux_read_memory, linux_write_memory): Ditto.
12370 (linux_test_for_tracefork): Ditto.
12371
3743bb4f
DE
12372 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12373 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12374
8b315be5
PA
123752010-01-21 Pedro Alves <pedro@codesourcery.com>
12376
12377 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12378 target.
12379
85492558
PA
123802010-01-21 Pedro Alves <pedro@codesourcery.com>
12381
12382 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12383 prototype to take a regcache. Adjust.
12384
442ea881
PA
123852010-01-20 Pedro Alves <pedro@codesourcery.com>
12386
12387 * regcache.h (struct thread_info): Forward declare.
12388 (struct regcache): New.
12389 (new_register_cache): Adjust prototype.
12390 (get_thread_regcache): Declare.
12391 (free_register_cache): Adjust prototype.
12392 (registers_to_string, registers_from_string): Ditto.
12393 (supply_register, supply_register_by_name, collect_register)
12394 (collect_register_as_string, collect_register_by_name): Ditto.
12395 * regcache.c (struct inferior_regcache_data): Delete.
12396 (get_regcache): Rename to ...
12397 (get_thread_regcache): ... this. Adjust. Switch inferior before
12398 fetching registers.
12399 (regcache_invalidate_one): Adjust.
12400 (regcache_invalidate): Fix prototype.
12401 (new_register_cache): Return the new register cache.
12402 (free_register_cache): Change prototype.
12403 (realloc_register_cache): Adjust.
12404 (registers_to_string): Change prototype to take a regcache. Adjust.
12405 (registers_from_string): Ditto.
12406 (register_data): Ditto.
12407 (supply_register): Ditto.
12408 (supply_register_by_name): Ditto.
12409 (collect_register): Ditto.
12410 (collect_register_as_string): Ditto.
12411 (collect_register_by_name): Ditto.
12412 * server.c (process_serial_event): Adjust.
12413 * linux-low.h (regset_fill_func, regset_store_func): Change
12414 prototype.
12415 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12416 Change prototype.
12417 * linux-low.c (get_stop_pc): Adjust.
12418 (check_removed_breakpoint): Adjust.
12419 (linux_wait_for_event): Adjust.
12420 (linux_resume_one_lwp): Adjust.
12421 (fetch_register): Add regcache parameter. Adjust.
12422 (usr_store_inferior_registers): Ditto.
12423 (regsets_fetch_inferior_registers): Ditto.
12424 (regsets_store_inferior_registers): Ditto.
12425 (linux_fetch_registers, linux_store_registers): Ditto.
12426 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12427 regcache. Adjust.
43aaf8b6
PA
12428 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12429 Ditto.
442ea881
PA
12430 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12431 prototype to take a regcache.
12432 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12433 * remote-utils.c (convert_ascii_to_int, outreg)
12434 (prepare_resume_reply): Change prototype to take a regcache.
12435 Adjust.
12436 * target.h (struct target_ops) <fetch_registers, store_registers>:
12437 Change prototype to take a regcache.
12438 (fetch_inferior_registers, store_inferior_registers): Change
12439 prototype to take a regcache. Adjust.
12440 * proc-service.c (ps_lgetregs): Adjust.
12441 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12442 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12443 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12444 take a regcache. Adjust.
12445 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12446 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12447 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12448 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12449 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12450 (cris_cannot_fetch_register):
12451 (cris_breakpoint_at): Change prototype to take a regcache.
12452 Adjust.
12453 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12454 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12455 to take a regcache. Adjust.
12456 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12457 Adjust.
12458 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12459 take a regcache. Adjust.
12460 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12461 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12462 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12463 * linux-mips-low.c (mips_get_pc):
12464 (mips_set_pc): Change prototype to take a regcache. Adjust.
12465 (mips_reinsert_addr): Adjust.
12466 (mips_collect_register): Change prototype to take a regcache.
12467 Adjust.
12468 (mips_supply_register):
12469 (mips_collect_register_32bit, mips_supply_register_32bit)
12470 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12471 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12472 * linux-ppc-low.c (ppc_supply_ptrace_register)
12473 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12474 (parse_spufs_run): Adjust.
12475 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12476 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12477 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12478 take a regcache. Adjust.
12479 * linux-s390-low.c (s390_collect_ptrace_register)
12480 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12481 (s390_set_pc): Change prototype to take a regcache. Adjust.
12482 (s390_arch_setup): Adjust.
12483 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12484 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12485 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12486 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12487 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12488 regcache. Adjust.
12489 (sparc_breakpoint_at): Adjust.
12490 * linux-xtensa-low.c (xtensa_fill_gregset):
12491 (xtensa_store_gregset):
12492 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12493 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12494 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12495 prototype to take a regcache. Adjust.
12496 * win32-arm-low.c (arm_fetch_inferior_register)
12497 (arm_store_inferior_register): Change prototype to take a
12498 regcache. Adjust.
12499 * win32-i386-low.c (i386_fetch_inferior_register)
12500 (i386_store_inferior_register): Change prototype to take a
12501 regcache. Adjust.
12502 * win32-low.c (child_fetch_inferior_registers)
12503 (child_store_inferior_registers): Change prototype to take a
12504 regcache. Adjust.
12505 (win32_wait): Adjust.
12506 (win32_fetch_inferior_registers): Change prototype to take a
12507 regcache. Adjust.
12508 (win32_store_inferior_registers): Adjust.
12509 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12510 store_inferior_register>: Change prototype to take a regcache.
12511
60c3d7b0
DE
125122010-01-20 Doug Evans <dje@google.com>
12513
12514 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12515 #ifdef.
12516 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12517 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12518
dc146f7c
VP
125192010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12520
12521 * linux-low.c (linux_core_of_thread): New.
12522 (compare_ints, show_process, list_threads): New.
12523 (linux_qxfer_osdata): Report threads and cores.
12524 (linux_target_op): Register linux_core_of_thread.
12525 * remote-utils.c (prepare_resume_reply): Report the core.
12526 (buffer_xml_printf): Support %d specifier.
12527 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12528 New.
12529 (handle_query): Handle qXfer:threads. Announce availability
12530 thereof.
12531 * target.h (struct target_ops): New field core_of_thread.
12532
7803799a
UW
125332010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12534
12535 * Makefile.in (clean): Remove new generated files.
12536 (reg-s390.o, reg-s390.c): Remove rules.
12537 (reg-s390x.o, reg-s390x.c): Likewise.
12538 (s390-linux32.o, s390-linux32.c): Add rules.
12539 (s390-linux64.o, s390-linux64.c): Likewise.
12540 (s390x-linux64.o, s390x-linux64.c): Likewise.
12541 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12542 * linux-s390-low.c: Include <elf.h>.
12543 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12544 (init_registers_s390): Remove prototype.
12545 (init_registers_s390x): Likewise.
12546 (init_registers_s390_linux32): Add prototype.
12547 (init_registers_s390_linux64): Likewise.
12548 (init_registers_s390x_linux64): Likewise.
12549 (s390_num_regs_3264): New define.
12550 (s390_regmap_3264): New global variable.
12551 (s390_cannot_fetch_register): Remove obsolete check.
12552 (s390_cannot_store_register): Likewise.
12553 (s390_collect_ptrace_register): Handle upper/lower register halves.
12554 (s390_supply_ptrace_register): Likewise.
12555 (s390_fill_gregset): Update to register number changes.
12556 (s390_get_hwcap): New routine.
12557 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12558 Install appropriate regmap and register set.
12559
6e7ffa39
JB
125602010-01-01 Joel Brobecker <brobecker@adacore.com>
12561
12562 * server.c (gdbserver_version): Update copyright year to 2010.
12563 * gdbreplay.c (gdbreplay_version): Likewise.
12564
957f3f49
DE
125652009-12-28 Doug Evans <dje@google.com>
12566
12567 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12568 elf/external.h. Include <elf.h> instead but only if necessary.
12569
ca5c370d
PA
125702009-12-28 Pedro Alves <pedro@codesourcery.com>
12571
12572 * linux-low.c (linux_remove_process): Remove `detaching'
12573 parameter. Don't release/detach from thread_db here.
12574 (linux_kill): Release/detach from thread_db here, ...
12575 (linux_detach): ... and here, before actually detaching.
12576 (linux_wait_1): ... and here, when a process exits.
12577 * thread-db.c (any_thread_of): New.
12578 (thread_db_free): Switch the current inferior to a thread of the
12579 passed in process.
12580
4ee62156
DE
125812009-12-21 Doug Evans <dje@google.com>
12582
d90e6a88
DE
12583 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12584
c5f62d5f
DE
12585 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12586 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12587 warning ifndef __NR_tkill. Move setting of errno there too.
12588 Delete unnecessary resetting of errno after syscall.
12589 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12590
10e86dd7
DE
12591 * configure.ac: Check for dladdr.
12592 * config.in: Regenerate.
12593 * configure: Regenerate.
12594 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12595 (try_thread_db_load): Update.
12596
4ee62156
DE
12597 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12598
00f515da
DE
125992009-12-18 Doug Evans <dje@google.com>
12600
e9464885
DE
12601 * event-loop.c: Include unistd.h if it exists.
12602
07d4f67e
DE
12603 * linux-low.c (my_waitpid): Move definition away from being in
12604 between linux_tracefork_child/linux_test_for_tracefork.
12605
00f515da
DE
12606 * gdb_proc_service.h (psaddr_t): Fix type.
12607 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12608 signature to match glibc.
12609
1de1badb
DE
126102009-12-16 Doug Evans <dje@google.com>
12611
12612 * linux-low.c (linux_read_memory): Fix argument to read.
12613
aeeb81d1
PA
126142009-11-26 Pedro Alves <pedro@codesourcery.com>
12615
12616 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12617 events, don't leave current_inferior pointing at null.
12618
10357975
PA
126192009-11-26 Pedro Alves <pedro@codesourcery.com>
12620
12621 * win32-low.c (LOG): Delete.
12622 (OUTMSG): Output to stderr.
12623 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12624 on compile time LOG macro.
12625 (win32_wait): Fix debug output.
12626
cf6e3471
PA
126272009-11-26 Pedro Alves <pedro@codesourcery.com>
12628
12629 * win32-low.c (win32_add_one_solib): If the dll name is
12630 "ntdll.dll", prepend the system directory to the dll path.
12631
0c85e18e
MK
126322009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12633
12634 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12635
9ac544ce 126362009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12637 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12638
12639 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12640 * configure.ac: Check for __mcoldfire__ and set
12641 gdb_cv_m68k_is_coldfire.
12642 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12643 reg-cf.o and reg-m68k.o.
12644 * configure: Regenerated.
12645
fd7dd3e6
PA
126462009-11-16 Pedro Alves <pedro@codesourcery.com>
12647
12648 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12649 Pass it to thread_db_free.
12650 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12651 proper `detaching' argument to linux_remove_process.
12652 * linux-low.h (thread_db_free): Add `detaching' parameter.
12653 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12654 to thread_db_free.
12655 (thread_db_free): Add `detaching' parameter. Only
12656 call td_ta_clear_event if detaching from process.
12657
75aa492e
MK
126582009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12659
12660 * thread-db.c (thread_db_free): Fix typo.
12661
21e1bee4
PP
126622009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12663
12664 PR gdb/10838
12665 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12666
8838b45e
NS
126672009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12668
12669 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12670 with an i686 compiler.
12671 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12672 needed.
12673 * configure: Rebuilt.
12674
8a35fb51
SL
126752009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12676
12677 PR gdb/10783
12678
12679 * server.c (handle_search_memory_1): Correct read_addr initialization
12680 in loop for searching subsequent chunks.
12681
96f15937
PP
126822009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12683
12684 * configure.ac: New --with-libthread-db option.
12685 * thread-db.c: Allow direct dependence on libthread_db.
12686 (thread_db_free): Adjust.
12687 * config.in: Regenerate.
12688 * configure: Likewise.
889bf7c5 12689
5f7d1694
PP
126902009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12691
12692 PR gdb/10757
12693 * thread-db.c (attach_thread): New function.
12694 (maybe_attach_thread): Return success/failure.
12695 (find_new_threads_callback): Adjust.
889bf7c5
PA
12696 (thread_db_find_new_threads): Loop until no new threads.
12697
88e3b899
PA
126982009-10-13 Pedro Alves <pedro@codesourcery.com>
12699
12700 * proc-service.c (ps_lgetregs): Formatting.
12701
cdbfd419
PP
127022009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12703
12704 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12705 * configure.ac: Adjust.
12706 * linux-low.h (struct process_info_private): Move members to struct
12707 thread_db.
12708 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12709 * linux-low.c (linux_remove_process): Adjust.
12710 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12711 * server.c (handle_query): Move code ...
12712 (handle_monitor_command): ... here. New function.
12713 * target.h (struct target_ops): New member.
12714 * thread-db.c (struct thread_db): New.
12715 (libthread_db_search_path): New variable.
12716 (thread_db_create_event, thread_db_enable_reporting)
12717 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12718 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12719 (try_thread_db_load_1, dladdr_to_soname): New functions.
12720 (try_thread_db_load, thread_db_load_search): New functions.
12721 (thread_db_init): Search for libthread_db.
12722 (thread_db_free): New function.
12723 (thread_db_handle_monitor_command): Likewise.
12724 * config.in: Regenerate.
12725 * configure: Regenerate.
889bf7c5 12726
4168d2d6
UW
127272009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12728
12729 * spu-low.c (spu_kill): Wait for inferior to terminate.
12730 Call clear_inferiors.
12731 (spu_detach): Call clear_inferiors.
12732
81ecdfbb
RW
127332009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12734
12735 * aclocal.m4: Regenerate.
12736 * config.in: Likewise.
12737 * configure: Likewise.
12738
0b9ff2c0
UW
127392009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12740
12741 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12742 (parse_spufs_run): New function.
12743 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12744 (ppc_breakpoint_at): Handle SPU breakpoints.
12745
efcbbd14
UW
127462009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12747
12748 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12749 (SPUFS_MAGIC): Define.
12750 (spu_enumerate_spu_ids): New function.
12751 (linux_qxfer_spu): New function.
12752 (linux_target_ops): Install linux_qxfer_spu.
12753
f4d9bade
UW
127542009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12755
12756 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12757 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12758 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12759 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12760 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12761 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12762 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12763 (init_registers_powerpc_cell32l): Add prototype.
12764 (init_registers_powerpc_cell64l): Likewise.
12765 (ppc_arch_setup): Detect Cell/B.E. architecture.
12766
96e946ca
RW
127672009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12768
12769 * Makefile.in (datarootdir): New variable.
12770
58d6951d
DJ
127712009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12772
12773 * linux-low.c (linux_write_memory): Update debugging output.
12774 * Makefile.in (clean): Add new descriptions.
12775 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12776 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12777 * configure.srv: Add new files for arm*-*-linux*.
12778 * linux-arm-low.c: Add new declarations.
12779 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12780 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12781 (HWCAP_VFPv3D16): New.
12782 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12783 instead of __IWMMXT__.
12784 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12785 (arm_arch_setup): New.
12786 (target_regsets): Remove #ifdef. Add VFP regset.
12787 (the_low_target): Use arm_arch_setup.
12788
12b42a12
DJ
127892009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12790
12791 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12792 the main thread again.
12793
ac8c974e
AR
127942009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12795
12796 Adding Neutrino gdbserver.
12797 * configure: Regenerated.
12798 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12799 * configure.srv (i[34567]86-*-nto*): New target.
12800 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12801 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12802 (nto_comctrl) [__QNX__]: New function.
12803 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12804
4424e0c3 128052009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12806
12807 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12808 srv_tgtobj.
12809
912cf4ba
PA
128102009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12811 Pedro Alves <pedro@codesourcery.com>
12812
12813 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12814 don't support CONTEXT_EXTENDED_REGISTERS.
12815 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12816 (the_low_target): Install them.
12817 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12818 failing with ERROR_PIPE_NOT_CONNECTED.
12819
aa5ca48f
DE
128202009-06-30 Doug Evans <dje@google.com>
12821 Pierre Muller <muller@ics.u-strasbg.fr>
12822
12823 Add h/w watchpoint support to x86-linux, win32-i386.
12824 * Makefile.in (SFILES): Add i386-low.c
12825 (i386_low_h): Define.
12826 (i386-low.o): Add dependencies.
12827 (linux-x86-low.o): Add i386-low.h dependency.
12828 (win32-i386-low.o): Ditto.
12829 * i386-low.c: New file.
12830 * i386-low.h: New file.
12831 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12832 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12833 * linux-low.c (linux_add_process): Initialize arch_private.
12834 (linux_remove_process): Free arch_private.
12835 (add_lwp): Initialize arch_private.
12836 (delete_lwp): Free arch_private.
12837 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12838 provided.
12839 * linux-low.h (process_info_private): New member arch_private.
12840 (lwp_info): New member arch_private.
12841 (linux_target_ops): New members new_process, new_thread,
12842 prepare_to_resume.
12843 (ptid_of): New macro.
12844 * linux-x86-low.c: Include stddef.h, i386-low.h.
12845 (arch_process_info): New struct.
12846 (arch_lwp_info): New struct.
12847 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12848 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12849 (i386_dr_low_get_status): New function.
12850 (x86_insert_point, x86_remove_point): New functions.
12851 (x86_stopped_by_watchpoint): New function.
12852 (x86_stopped_data_address): New function.
12853 (x86_linux_new_process, x86_linux_new_thread): New functions.
12854 (x86_linux_prepare_to_resume): New function.
12855 (the_low_target): Add entries for insert_point, remove_point,
12856 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12857 prepare_to_resume.
12858 * server.c (debug_hw_points): New global.
12859 (monitor_show_help): Document set debug-hw-points.
12860 (handle_query): Process "set debug-hw-points".
12861 * server.h (debug_hw_points): Declare.
12862 (paddress): Declare.
12863 * utils.c (NUMCELLS, CELLSIZE): New macros.
12864 (get_sell, xsnprintf, paddress): New functions.
12865 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12866 remove_point, stopped_by_watchpoint, stopped_data_address.
12867 * win32-i386-low.c: Include i386-low.h.
12868 (debug_reg_state): Replaces dr.
12869 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12870 (i386_dr_low_get_status): New function.
12871 (i386_insert_point, i386_remove_point): New functions.
12872 (i386_stopped_by_watchpoint): New function.
12873 (i386_stopped_data_address): New function.
12874 (i386_initial_stuff): Update.
12875 (get_thread_context,set_thread_context,i386_thread_added): Update.
12876 (the_low_target): Add entries for insert_point,
12877 remove_point, stopped_by_watchpoint, stopped_data_address.
12878 * win32-low.c (win32_insert_watchpoint): New function.
12879 (win32_remove_watchpoint): New function.
12880 (win32_stopped_by_watchpoint): New function.
12881 (win32_stopped_data_address): New function.
12882 (win32_target_ops): Add entries for insert_watchpoint,
12883 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12884 * win32-low.h (win32_target_ops): New members insert_point,
12885 remove_point, stopped_by_watchpoint, stopped_data_address.
12886
d993e290
PA
128872009-06-25 Pedro Alves <pedro@codesourcery.com>
12888
12889 * server.c (process_serial_event): Re-return unsupported, not
12890 error, if the type isn't recognized. Re-allow supporting only
12891 insert or remove packets. Also call require_running for
12892 breakpoints. Add missing break statement to default case. Tidy.
12893 * target.h (struct target_ops): Rename insert_watchpoint to
12894 insert_point, and remove_watchpoint to remove_point.
12895
12896 * linux-low.h (struct linux_target_ops): Likewise.
12897 * linux-low.c (linux_insert_watchpoint): Rename to ...
12898 (linux_insert_point): ... this. Adjust.
12899 (linux_remove_watchpoint): Rename to ...
12900 (linux_remove_point): ... this. Adjust.
12901 (linux_target_ops): Adjust.
12902 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12903 (cris_insert_point): ... this.
12904 (cris_remove_watchpoint): Rename to ...
12905 (cris_remove_point): ... this.
12906 (the_low_target): Adjust.
12907
0f54c268
PM
129082009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12909
12910 * server.c (handle_v_kill): Pass signal_pid to
12911 kill_inferior if multi_process is zero.
12912
c6314022
AR
129132009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12914
12915 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12916 * target.h (target_ops): Comment for *_watchpoint to make it clear
12917 the functions can get types '0' and '1'.
12918
4463ce24
AR
129192009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12920
12921 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12922 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12923 * regcache.c (get_regcache): Likewise.
12924 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12925 * win32-low.c (child_fetch_inferior_registers): Remove check for
12926 regno 0.
12927
cf8fd78b
PA
129282009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12929 Pedro Alves <pedro@codesourcery.com>
12930
12931 * target.h (struct target_ops) <supports_multi_process>: New
12932 callback.
12933 (target_supports_multi_process): New.
12934 * server.c (handle_query): Even if GDB reports support, only
12935 enable multi-process if the target also supports it. Report
12936 multi-process support only if the target backend supports it.
12937 * linux-low.c (linux_supports_multi_process): New function.
12938 (linux_target_ops): Install it as target_supports_multi_process
12939 callback.
12940
47c0c975
DE
129412009-05-24 Doug Evans <dje@google.com>
12942
e09875d4
DE
12943 Global renaming of find_thread_pid to find_thread_ptid.
12944 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12945 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12946 All callers updated.
12947
e27d73f6
DE
12948 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12949 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12950 directly.
12951
47c0c975
DE
12952 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12953 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12954 (linux_resume_one_lwp): Ditto.
12955
2acc282a
DE
129562009-05-23 Doug Evans <dje@google.com>
12957
12958 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12959 from struct inferior_list_entry * to struct lwp_info *.
12960 All callers updated.
12961
9f1036c1
DE
129622009-05-13 Doug Evans <dje@google.com>
12963
12964 * linux-x86-low.c: Don't include assert.h.
12965 (x86_siginfo_fixup): Use fatal, not assert.
12966 (x86_arch_setup): Fix comment.
12967
d0722149
DE
129682009-05-12 Doug Evans <dje@google.com>
12969
12970 Biarch support for i386/amd64 gdbserver.
12971 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12972 Add linux-x86-low.c.
12973 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12974 (linux-x86-low.o): Add.
12975 * linux-x86-64-low.c: Delete.
12976 * linux-i386-low.c: Delete.
12977 * linux-x86-low.c: New file.
12978 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12979 linux-x86-low.o.
12980 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12981 linux-x86-low.o.
12982 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12983 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12984 (linux_child_pid_to_exec_file): New function.
12985 (elf_64_header_p, elf_64_file_p): New functions.
12986 (siginfo_fixup): New function.
12987 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12988 give target a chance to convert layout.
12989 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12990 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12991
fdeb2a12
DE
129922009-05-07 Doug Evans <dje@google.com>
12993
12994 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12995 (regsets_store_inferior_registers): Ditto.
12996
a6dbe5df
PA
129972009-05-06 Pedro Alves <pedro@codesourcery.com>
12998
12999 PR server/10048
13000
13001 * linux-low.c (must_set_ptrace_flags): Delete.
13002 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13003 of the global.
13004 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13005 `lwp->must_set_ptrace_flags' instead.
ba42693b 13006 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13007 (linux_wait_1): ... not here.
13008
5091eb23
DE
130092009-04-30 Doug Evans <dje@google.com>
13010
9f767825
DE
13011 * inferiors.c (started_inferior_callback): New function.
13012 (attached_inferior_callback): New function.
13013 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13014 * server.c (print_started_pid, print_attached_pid): New functions.
13015 (detach_or_kill_for_exit): New function.
13016 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13017 * server.h (have_started_inferiors_p): Declare.
13018 (have_attached_inferiors_p): Declare.
13019
5091eb23
DE
13020 * inferiors.c (remove_process): Fix memory leak, free process.
13021 * linux-low.c (linux_remove_process): New function.
13022 (linux_kill): Call it instead of remove_process.
13023 (linux_detach, linux_wait_1): Ditto.
13024
155c8968
PA
130252009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13026
13027 * configure.srv: Add x86 Windows CE target.
13028
7fe519cb
UW
130292009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13030
13031 * inferiors.c (get_thread_process): Make global.
13032 * server.h (get_thread_process): Add prototype.
13033 * thread-db.c (find_one_thread): Use get_thread_process
13034 instead of current_process.
13035 (thread_db_get_tls_address): Do not crash if called when
13036 thread layer is not yet initialized.
13037
5472f405
UW
130382009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13039
13040 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13041 * spu-low.c (current_tid): Rename to ...
13042 (current_ptid): ... this.
13043 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13044 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13045 ptid_get_lwp (current_ptid) instead of current_tid.
13046 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13047 instead of current_tid. Use find_process_pid to verify pid
13048 argument is valid. Pass proper argument to remove_process.
13049 (spu_thread_alive): Compare current_ptid instead of current_tid.
13050 (spu_resume): Likewise.
13051
55ac2b99
PA
130522009-04-02 Pedro Alves <pedro@codesourcery.com>
13053
13054 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13055 variable.
13056
95954743
PA
130572009-04-01 Pedro Alves <pedro@codesourcery.com>
13058
13059 Implement the multiprocess extensions, and add linux multiprocess
13060 support.
13061
13062 * server.h (ULONGEST): Declare.
13063 (struct ptid, ptid_t): New.
13064 (minus_one_ptid, null_ptid): Declare.
13065 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13066 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13067 (struct inferior_list_entry): Change `id' type from unsigned from
13068 to ptid_t.
13069 (struct sym_cache, struct breakpoint, struct
13070 process_info_private): Forward declare.
13071 (struct process_info): Declare.
13072 (current_process): Declare.
13073 (all_processes): Declare.
13074 (initialize_inferiors): Declare.
13075 (add_thread): Adjust to use ptid_t.
13076 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13077 (add_process, remove_process, find_thread_pid): Declare.
13078 (find_inferior_id): Adjust to use ptid_t.
13079 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13080 (multi_process): Declare.
13081 (push_event): Adjust to use ptid_t.
13082 (read_ptid, write_ptid): Declare.
13083 (prepare_resume_reply): Adjust to use ptid_t.
13084 (clear_symbol_cache): Declare.
13085 * inferiors.c (all_processes): New.
13086 (null_ptid, minus_one_ptid): New.
13087 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13088 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13089 (add_thread): Change unsigned long to ptid. Remove gdb_id
13090 parameter. Adjust.
13091 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13092 (gdb_id_to_thread): Rename to ...
13093 (find_thread_pid): ... this. Change unsigned long to ptid.
13094 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13095 (loaded_dll, pull_pid_from_list): Adjust.
13096 (add_process, remove_process, find_process_pid)
13097 (get_thread_process, current_process, initialize_inferiors): New.
13098 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13099 (struct target_waitstatus) <related_pid>: Ditto.
13100 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13101 return type to int.
13102 (struct target_ops) <join>: Add `pid' argument.
13103 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13104 (struct target_ops) <wait>: Add `ptid' field. Change return type
13105 to ptid.
13106 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13107 (mywait): Add `ptid' argument. Change return type to ptid_t.
13108 (target_pid_to_str): Declare.
13109 * target.c (set_desired_inferior): Adjust to use ptids.
13110 (mywait): Add new `ptid' argument. Adjust.
13111 (target_pid_to_str): New.
13112 * mem-break.h (free_all_breakpoints): Declare.
13113 * mem-break.c (breakpoints): Delelete.
13114 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13115 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13116 to use per-process breakpoint list.
13117 (free_all_breakpoints): New.
13118 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13119 (symbol_cache, all_symbols_looked_up): Delete.
13120 (hexchars): New.
13121 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13122 read_ptid): New.
13123 (prepare_resume_reply): Change ptid argument's type from unsigned
13124 long to ptid_t. Adjust. Implement W;process and X;process.
13125 (free_sym_cache, clear_symbol_cache): New.
13126 (look_up_one_symbol): Adjust to per-process symbol cache. *
13127 * server.c (cont_thread, general_thread, step_thread): Change type
13128 to ptid_t.
13129 (attached): Delete.
13130 (multi_process): New.
13131 (last_ptid): Change type to ptid_t.
13132 (struct vstop_notif) <ptid>: Change type to ptid_t.
13133 (queue_stop_reply, push_event): Change `ptid' argument's type to
13134 ptid_t.
13135 (discard_queued_stop_replies): Add `pid' argument.
13136 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13137 changes. Don't reference the `attached' global.
13138 (attach_inferior): Adjust to mywait interface changes.
13139 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13140 features. Handle and report "multiprocess+". Handle
13141 "qAttached:PID".
13142 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13143 changes.
13144 (handle_v_kill): New.
13145 (handle_v_stopped): Adjust to use target_pid_to_str.
13146 (handle_v_requests): Allow multiple attaches and runs when
13147 multiprocess extensions are in effect. Handle "vKill".
13148 (myresume): Adjust to use ptids.
13149 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13150 (handle_status): Adjust to discard_queued_stop_replies interface
13151 change.
13152 (first_thread_of, kill_inferior_callback)
13153 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13154 (main): Call initialize_inferiors. Adjust to use ptids, killing
13155 and detaching from all inferiors. Handle multiprocess packet
13156 variants.
13157 * linux-low.h: Include gdb_proc_service.h.
13158 (struct process_info_private): New.
13159 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13160 <lwpid_of>: Use ptid_get_lwp.
13161 (get_lwp_thread): Adjust.
13162 (struct lwp_info): Add `dead' member.
13163 (find_lwp_pid): Declare.
13164 * linux-low.c (thread_db_active): Delete.
13165 (new_inferior): Adjust comment.
13166 (inferior_pid): Delete.
13167 (linux_add_process): New.
13168 (handle_extended_wait): Adjust.
13169 (add_lwp): Change unsigned long to ptid.
13170 (linux_create_inferior): Add process to processes table. Adjust
13171 to use ptids. Don't set new_inferior here.
13172 (linux_attach_lwp): Rename to ...
13173 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13174 it. Adjust to use ptids.
13175 (linux_attach_lwp): New.
13176 (linux_attach): Add process to processes table. Don't set
13177 new_inferior here.
13178 (struct counter): New.
13179 (second_thread_of_pid_p, last_thread_of_process_p): New.
13180 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13181 multiple processes.
13182 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13183 processes. Remove process from process table.
13184 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13185 to multiple processes.
13186 (any_thread_of): New.
13187 (linux_detach): Add `pid' argument, and handle it. Remove process
13188 from processes table.
13189 (linux_join): Add `pid' argument. Handle it.
13190 (linux_thread_alive): Change unsighed long argument to ptid_t.
13191 Consider dead lwps as not being alive.
13192 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13193 threads we're not interested in.
13194 (same_lwp, find_lwp_pid): New.
13195 (linux_wait_for_lwp): Change `pid' argument's type from int to
13196 ptid_t. Adjust.
13197 (linux_wait_for_event): Rename to ...
13198 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13199 from int to ptid_t. Adjust.
13200 (linux_wait_for_event): New.
13201 (linux_wait_1): Add `ptid' argument. Change return type to
13202 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13203 that exit from the process table.
13204 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13205 Adjust.
13206 (mark_lwp_dead): New.
13207 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13208 stopping all threads, mark its main lwp as dead.
13209 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13210 ptids.
13211 (fetch_register, usr_store_inferior_registers)
13212 (regsets_fetch_inferior_registers)
13213 (regsets_store_inferior_registers, linux_read_memory)
13214 (linux_write_memory): Inline `inferior_pid'.
13215 (linux_look_up_symbols): Adjust to use per-process
13216 `thread_db_active'.
13217 (linux_request_interrupt): Adjust to use ptids.
13218 (linux_read_auxv): Inline `inferior_pid'.
13219 (initialize_low): Don't reference thread_db_active.
13220 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13221 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13222 (ps_getpid): Return the pid of the current inferior.
13223 * thread-db.c (proc_handle, thread_agent): Delete.
13224 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13225 per-process data.
13226 (find_one_thread): Change argument type to ptid_t. Adjust to
13227 per-process data.
13228 (maybe_attach_thread): Adjust to per-process data and ptids.
13229 (thread_db_find_new_threads): Ditto.
13230 (thread_db_init): Ditto.
13231 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13232 processes table. Adjust to use ptids.
13233 (spu_kill, spu_detach): Adjust interface. Remove process from
13234 processes table.
13235 (spu_join, spu_thread_alive): Adjust interface.
13236 (spu_wait): Adjust interface. Remove process from processes
13237 table. Adjust to use ptids.
13238 * win32-low.c (current_inferior_tid): Delete.
13239 (current_inferior_ptid): New.
13240 (debug_event_ptid): New.
13241 (thread_rec): Take a ptid. Adjust.
13242 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13243 (child_delete_thread): Ditto.
13244 (do_initial_child_stuff): Add `attached' argument. Add process to
13245 processes table.
13246 (child_fetch_inferior_registers, child_store_inferior_registers):
13247 Adjust.
13248 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13249 (win32_attach): Pass 1 to do_initial_child_stuff.
13250 (win32_kill): Adjust interface. Remove process from processes
13251 table.
13252 (win32_detach): Ditto.
13253 (win32_join): Adjust interface.
13254 (win32_thread_alive): Take a ptid.
13255 (win32_resume): Adjust to use ptids.
13256 (get_child_debug_event): Ditto.
13257 (win32_wait): Adjust interface. Remove exiting process from
13258 processes table.
13259
bd99dc85
PA
132602009-04-01 Pedro Alves <pedro@codesourcery.com>
13261
13262 Non-stop mode support.
13263
13264 * server.h (non_stop): Declare.
13265 (gdb_client_data, handler_func): Declare.
13266 (delete_file_handler, add_file_handler, start_event_loop):
13267 Declare.
13268 (handle_serial_event, handle_target_event, push_event)
13269 (putpkt_notif): Declare.
13270 * target.h (enum resume_kind): New.
13271 (struct thread_resume): Replace `step' field by `kind' field.
13272 (TARGET_WNOHANG): Define.
13273 (struct target_ops) <wait>: Add `options' argument.
13274 <supports_non_stop, async, start_non_stop>: New fields.
13275 (target_supports_non_stop, target_async): New.
13276 (start_non_stop): Declare.
13277 (mywait): Add `options' argument.
13278 * target.c (mywait): Add `options' argument. Print child exit
13279 notifications here.
13280 (start_non_stop): New.
13281 * server.c (non_stop, own_buf, mem_buf): New globals.
13282 (struct vstop_notif): New.
13283 (notif_queue): New global.
13284 (queue_stop_reply, push_event, discard_queued_stop_replies)
13285 (send_next_stop_reply): New.
13286 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13287 interface changes.
13288 (attach_inferior): In non-stop mode, don't wait for the target
13289 here.
13290 (handle_general_set): Handle QNonStop.
13291 (handle_query): When handling qC, return the current general
13292 thread, instead of the first thread of the list.
13293 (handle_query): If the backend supports non-stop mode, include
13294 QNonStop+ in the qSupported query response.
13295 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13296 and non-stop mode.
13297 (handle_v_attach, handle_v_run): Handle non-stop mode.
13298 (handle_v_stopped): New.
13299 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13300 (myresume): Adjust to use resume_kind. Handle non-stop.
13301 (queue_stop_reply_callback): New.
13302 (handle_status): Handle non-stop mode.
13303 (main): Clear non_stop flag on reconnection. Use the event-loop.
13304 Refactor serial protocol handling from here ...
13305 (process_serial_event): ... to this new function. When GDB
13306 selects any thread, select one here. In non-stop mode, wait until
13307 GDB acks all pending events before exiting.
13308 (handle_serial_event, handle_target_event): New.
13309 * remote-utils.c (remote_open): Install remote_desc in the event
13310 loop.
13311 (remote_close): Remove remote_desc from the event loop.
13312 (putpkt_binary): Rename to...
13313 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13314 (putpkt_binary): New as wrapper around putpkt_binary_1.
13315 (putpkt_notif): New.
13316 (prepare_resume_reply): In non-stop mode, don't change the
13317 general_thread.
13318 * event-loop.c: New.
13319 * Makefile.in (OBJ): Add event-loop.o.
13320 (event-loop.o): New rule.
13321
13322 * linux-low.h (pid_of): Moved here.
13323 (lwpid_of): New.
13324 (get_lwp_thread): Use lwpid_of.
13325 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13326 * linux-low.c (pid_of): Delete.
13327 (inferior_pid): Use lwpid_of.
13328 (linux_event_pipe): New.
13329 (target_is_async_p): New.
13330 (delete_lwp): New.
13331 (handle_extended_wait): Use lwpid_of.
13332 (add_lwp): Don't set lwpid field.
13333 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13334 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13335 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13336 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13337 first. Adjust to linux_wait_for_event interface changes. Use
13338 lwpid_of.
13339 (linux_detach): Don't delete the main lwp here.
13340 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13341 (status_pending_p): Don't consider explicitly suspended lwps.
13342 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13343 pointer. Add OPTIONS argument. Change return type to int. Use
13344 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13345 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13346 pointer. Add status pointer argument. Return a pid instead of a
13347 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13348 changes. In non-stop mode, don't switch to a random thread.
13349 (linux_wait): Rename to...
13350 (linux_wait_1): ... this. Add target_options argument, and handle
13351 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13352 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13353 clean exit and signal exit code. Don't stop all threads in
13354 non-stop mode. In all-stop mode, only stop all threads when
13355 reporting a stop to GDB. Handle explicit thread stop requests.
13356 (async_file_flush, async_file_mark): New.
13357 (linux_wait): New.
13358 (send_sigstop): Use lwpid_of.
13359 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13360 interface changes. In non-stop mode, don't switch to a random
13361 thread.
13362 (linux_resume_one_lwp): Use lwpid_of.
13363 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13364 (linux_resume_one_thread): ... this. Handle resume_stop. In
13365 non-stop mode, don't look for pending flag in all threads.
13366 (resume_status_pending_p): Don't consider explicitly suspended
13367 threads.
13368 (my_waitpid): Reimplement. Emulate __WALL.
13369 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13370 Use lwpid_of.
13371 (sigchld_handler, linux_supports_non_stop, linux_async)
13372 (linux_start_non_stop): New.
13373 (linux_target_ops): Register linux_supports_non_stop, linux_async
13374 and linux_start_non_stop.
13375 (initialize_low): Install SIGCHLD handler.
13376 * thread-db.c (thread_db_create_event, find_one_thread)
13377 (thread_db_get_tls_address): Use lwpid_of.
13378 * win32-low.c (win32_detach): Adjust to use resume_kind.
13379 (win32_wait): Add `options' argument.
13380 * spu-low.c (spu_resume): Adjust to use resume_kind.
13381 (spu_wait): Add `options' argument.
13382
5b1c542e
PA
133832009-04-01 Pedro Alves <pedro@codesourcery.com>
13384
13385 Decouple target code from remote protocol.
13386
13387 * target.h (enum target_waitkind): New.
13388 (struct target_waitstatus): New.
13389 (struct target_ops) <wait>: Return an unsigned long. Take a
13390 target_waitstatus pointer instead of a char pointer.
13391 (mywait): Likewise.
13392 * target.c (mywait): Change prototype to return an unsigned long.
13393 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13394 * server.h (thread_from_wait, old_thread_from_wait): Delete
13395 declarations.
13396 (prepare_resume_reply): Change prototype to take a
13397 target_waitstatus.
13398 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13399 (last_status, last_ptid): New.
13400 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13401 pid instead of a signal.
13402 (attach_inferior): Remove "status" and "signal" parameters.
13403 Adjust.
13404 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13405 not as an address.
13406 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13407 (handle_v_requests, myresume): Remove "status" and "signal"
13408 parameters. Adjust.
13409 (handle_status): New.
13410 (main): Delete local `status'. Adjust.
13411 * remote-utils.c: Include target.h.
13412 (prepare_resume_reply): Change prototype to take a
13413 target_waitstatus. Adjust.
13414
13415 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13416 interface.
13417 * spu-low.c (spu_wait): Adjust.
13418 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13419 Delete.
13420 (win32_wait): Adjust.
13421
2bd7c093
PA
134222009-04-01 Pedro Alves <pedro@codesourcery.com>
13423
13424 * target.h (struct thread_resume): Delete leave_stopped member.
13425 (struct target_ops): Add a `n' argument to the `resume' callback.
13426 * server.c (start_inferior): Adjust.
13427 (handle_v_cont, myresume): Adjust.
13428 * linux-low.c (check_removed_breakpoint): Adjust to resume
13429 interface change, and to removed leave_stopped field.
13430 (resume_ptr): Delete.
13431 (struct thread_resume_array): New.
13432 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13433 resume interface change.
13434 (linux_continue_one_thread, linux_queue_one_thread)
13435 (resume_status_pending_p): Check if the resume field is NULL
13436 instead of checking the leave_stopped member.
13437 (linux_resume): Adjust to the target resume interface change.
13438 * spu-low.c (spu_resume): Adjust to the target resume interface
13439 change.
13440 * win32-low.c (win32_detach, win32_resume): Ditto.
13441
c35fafde
PA
134422009-04-01 Pedro Alves <pedro@codesourcery.com>
13443
13444 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13445 flag.
13446 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13447 pending.
13448 (linux_continue_one_thread): Only preserve the stepping flag if
13449 there's a pending breakpoint.
13450
0a59d50b
PA
134512009-03-31 Pedro Alves <pedro@codesourcery.com>
13452
13453 * server.c (main): After the inferior having exited, call
13454 remote_close before exiting gdbserver.
13455
f04c6d38
TJB
134562009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13457
13458 Fix size of FPSCR in Power 7 processors.
13459 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13460 (PPC_FEATURE_HAS_DFP): New #define.
13461 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13462 size of the FPSCR.
13463
78e5cee6
PA
134642009-03-23 Pedro Alves <pedro@codesourcery.com>
13465
13466 * server.c (handle_query) Whitespace and formatting.
13467
1b3f6016
PA
134682009-03-22 Pedro Alves <pedro@codesourcery.com>
13469
13470 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13471 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13472 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13473 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13474 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13475 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13476 Makefile.in, configure.ac: Fix whitespace throughout.
13477 * configure: Regenerate.
13478
a07b2135
PA
134792009-03-22 Pedro Alves <pedro@codesourcery.com>
13480
13481 * inferiors.c (find_inferior): Make it safe for the callback
13482 function to delete the currently iterated inferior.
13483
67cc2626
PA
134842009-03-22 Pedro Alves <pedro@codesourcery.com>
13485
13486 * Makefile.in (linuw_low_h): Move higher.
13487 (thread-db.o): Depend on $(linux_low_h).
13488
54a0b537
PA
134892009-03-17 Pedro Alves <pedro@codesourcery.com>
13490
13491 Rename "process" to "lwp" throughout.
13492
13493 * linux-low.c (all_processes): Rename to...
13494 (all_lwps): ... this.
13495 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13496 (add_process): Rename to ...
13497 (add_lwp): ... this. Adjust.
13498 (linux_create_inferior): Adjust.
13499 (linux_attach_lwp): Adjust.
13500 (linux_attach): Adjust.
13501 (linux_kill_one_process): Rename to ...
13502 (linux_kill_one_lwp): ... this. Adjust.
13503 (linux_kill): Adjust.
13504 (linux_detach_one_process): Rename to ...
13505 (linux_detach_one_lwp): ... this. Adjust.
13506 (linux_detach): Adjust.
13507 (check_removed_breakpoint): Adjust.
13508 (status_pending_p): Adjust.
13509 (linux_wait_for_process): Rename to ...
13510 (linux_wait_for_lwp): ... this. Adjust.
13511 (linux_wait_for_event): Adjust.
13512 (send_sigstop): Adjust.
13513 (wait_for_sigstop): Adjust.
13514 (stop_all_processes): Rename to ...
13515 (stop_all_lwps): ... this.
13516 (linux_resume_one_process): Rename to ...
13517 (linux_resume_one_lwp): ... this. Adjust.
13518 (linux_set_resume_request, linux_continue_one_thread)
13519 (linux_queue_one_thread, resume_status_pending_p)
13520 (usr_store_inferior_registers, regsets_store_inferior_registers)
13521 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13522 Adjust.
13523 * linux-low.h (get_process): Rename to ...
13524 (get_lwp): ... this. Adjust.
13525 (get_thread_process): Rename to ...
13526 (get_thread_lwp): ... this. Adjust.
13527 (get_process_thread): Rename to ...
13528 (get_lwp_thread): ... this. Adjust.
13529 (struct process_info): Rename to ...
13530 (struct lwp_info): ... this.
13531 (all_processes): Rename to ...
13532 (all_lwps): ... this.
13533 * proc-service.c (ps_lgetregs): Adjust.
13534 * thread-db.c (thread_db_create_event, find_one_thread)
13535 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13536
0b16c5cf
PA
135372009-03-14 Pedro Alves <pedro@codesourcery.com>
13538
13539 * server.c (handle_query): Handle "qAttached".
13540
32de4b9d
NS
135412009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13542
13543 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13544 GPLv3, update license URL.
13545
2aecd87f
DE
135462009-03-01 Doug Evans <dje@google.com>
13547
93efd302 13548 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13549 (server_h): Add gdb_signals.h.
13550 (signals.o): Update.
13551 * server.h (target_signal_from_host,target_signal_to_host_p)
13552 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13553
86b1f9c5
PM
135542009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13555
13556 * remote-utils.c (getpkt): Also generate remote-debug
13557 information if noack_mode is set.
13558
4aa995e1
PA
135592009-02-06 Pedro Alves <pedro@codesourcery.com>
13560
13561 * server.c (handle_query): Report qXfer:siginfo:read and
13562 qXfer:siginfo:write as supported and handle them.
13563 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13564 * linux-low.c (linux_xfer_siginfo): New.
13565 (linux_target_ops): Set it.
13566
62709adf
PA
135672009-01-26 Pedro Alves <pedro@codesourcery.com>
13568
13569 * server.c (gdbserver_usage): Mention --remote-debug.
13570 (main): Accept '--remote-debug' switch.
13571
aef93bd7
DE
135722009-01-18 Doug Evans <dje@google.com>
13573
13574 * regcache.c (new_register_cache): No need to check result of xcalloc.
13575 * server.c (handle_search_memory): Back out calls to xmalloc,
13576 result is checked and error is returned to user upon failure.
13577 (handle_query): Ditto. Add more checks for result of malloc.
13578 (handle_v_cont): Check result of malloc, report error back to
13579 user upon failure.
13580 (handle_v_run): Ditto. Call freeargv.
13581 * server.h (freeargv): Declare.
13582 * utils.c (freeargv): New fn.
13583
54363045
DE
135842009-01-15 Doug Evans <dje@google.com>
13585
f626972c
DE
13586 * gdbreplay.c (perror_with_name): Make arg const char *.
13587 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13588 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13589 * utils.c (perror_with_name): Make arg const char *.
54363045 13590
18aae699
PA
135912009-01-14 Pedro Alves <pedro@codesourcery.com>
13592
13593 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13594 when handling a EXIT_PROCESS_DEBUG_EVENT.
13595
ff703abe
JB
135962009-01-06 Joel Brobecker <brobecker@adacore.com>
13597
13598 * gdbreplay.c (gdbreplay_version): Update copyright year.
13599 * server.c (gdbserver_version): Likewise.
13600
f21cc1a2 136012009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13602
13603 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13604 (handle_extended_wait): Improve comment.
0e21c1ec 13605
bca929d3
DE
136062008-12-13 Doug Evans <dje@google.com>
13607
13608 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13609 * server.h (ATTR_MALLOC): New macro.
13610 (xmalloc,xcalloc,xstrdup): Declare.
13611 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13612 * inferiors.c: Ditto.
13613 * linux-low.c: Ditto.
13614 * mem-break.c: Ditto.
13615 * regcache.c: Ditto.
13616 * remote-utils.c: Ditto.
13617 * server.c: Ditto.
13618 * target.c: Ditto.
13619 * win32-low.c: Ditto.
13620
97438e3f
DE
136212008-12-12 Doug Evans <dje@google.com>
13622
896c7fbb
DE
13623 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13624 in debugging printf.
13625
97438e3f
DE
13626 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13627
e3b886f8
DE
136282008-12-09 Doug Evans <dje@google.com>
13629
13630 * linux-low.h (struct process_info): Delete member tid, unused.
13631 * thread-db.c (find_one_thread): Update.
13632 (maybe_attach_thread): Update.
13633
07e059b5
VP
136342008-12-02 Pedro Alves <pedro@codesourcery.com>
13635
889bf7c5
PA
13636 * target.h (struct target_ops): Add qxfer_osdata member.
13637 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13638 and dirent.h.
13639 (linux_qxfer_osdata): New functions.
13640 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13641 callback.
13642 * server.c (handle_query): Handle "qXfer:osdata:read:".
13643 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13644 (buffer_xml_printf): New functions.
13645 * server.h (struct buffer): New.
13646 (buffer_grow_str, buffer_grow_str0): New macros.
13647 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13648 (buffer_xml_printf): Declare.
07e059b5 13649
4cab47ab
DE
136502008-11-24 Doug Evans <dje@google.com>
13651
13652 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13653
f142445f
DJ
136542008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13655
13656 * server.c (handle_v_run): Always use the supplied argument list.
13657
d0107bb6 136582008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13659
d0107bb6
BW
13660 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13661 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13662
2c4ad781
TJB
136632008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13664
13665 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13666 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13667 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13668 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13669 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13670 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13671 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13672 XML target descriptions.
13673 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13674 when inferior is running on an ISA 2.05 or later processor. Add
13675 special case to return offset for full 64-bit slot of FPSCR when
13676 in 32-bits.
13677
dfb64f85
DJ
136782008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13679
13680 * Makefile.in (SFILES, clean): Added sparc64 files.
13681 (reg-sparc64.o, reg-sparc64.c): New.
13682 * configure.srv (sparc*-*-linux*): New configuration.
13683 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13684 syscall arguments for SPARC.
13685 (regsets_store_inferior_registers): Likewise.
13686 * linux-sparc-low.c: New file.
13687
66b6e1dd
DE
136882008-10-21 Doug Evans <dje@google.com>
13689
13690 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13691 (READLINE_DIR,READLINE_DEP): Delete.
13692 (INTERNAL_CFLAGS): Update.
13693 (LINTFLAGS): Update.
13694
9b710a42
PA
136952008-10-10 Pedro Alves <pedro@codesourcery.com>
13696
13697 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13698 whole argv from the last run, not just argv[0].
13699
5822d809
PA
137002008-09-08 Pedro Alves <pedro@codesourcery.com>
13701
13702 * regcache.c (new_register_cache): Return NULL if the register
13703 cache size isn't known yet.
13704 (free_register_cache): Avoid dereferencing a NULL regcache.
13705
74aac56f
DJ
137062008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13707
13708 * configure.srv: Merge MIPS and MIPS64.
13709
400b20f5
MR
137102008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13711
13712 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13713
677c5bb1
LM
137142008-08-18 Luis Machado <luisgpm@br.ibm.com>
13715
13716 * Makefile.in: Add required vsx dependencies.
13717
13718 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13719 Declare init_registers_powerpc_vsx32l.
13720 Declare init_registers_powerpc_vsx64l.
13721 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13722 (ppc_arch_setup): Check for VSX in hwcap.
13723 (ppc_fill_vsxregset): New function.
13724 (ppc_store_vsxregset): New function.
13725 Add new VSX entry in regset_info target_regsets.
13726
13727 * configure.srv: Add new VSX dependencies.
13728
a6f3e723
SL
137292008-08-12 Pedro Alves <pedro@codesourcery.com>
13730
13731 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13732 (remote_open): Set or clear transport_is_reliable.
13733 (putpkt_binary): Don't expect acks in noack mode.
13734 (getpkt): Don't send ack/nac in noack mode.
13735 * server.c (handle_general_set): Handle QStartNoAckMode.
13736 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13737 qSupported.
13738 (main): Reset noack_mode on every connection.
13739 * server.h (noack_mode): Declare.
13740
a417dc56
RW
137412008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13742
13743 * Makefile.in (GDBREPLAY_OBS): New variable.
13744 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13745
3221518c
UW
137462008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13747 Daniel Jacobowitz <dan@codesourcery.com>
13748
13749 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13750 (usr_store_inferior_registers): Likewise.
13751 (regsets_store_inferior_registers): Likewise.
13752
ec56be1b
PA
137532008-07-31 Rolf Jansen <rj@surtec.com>
13754 Pedro Alves <pedro@codesourcery.com>
13755
13756 * configure.ac: Check for memmem declaration.
13757 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13758 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13759 (disable_packet_qfThreadInfo): Unconditionally compile.
13760 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13761 * configure, config.in: Regenerate.
13762
2fe5e3ff
DE
137632008-07-28 Doug Kwan <dougkwan@google.com>
13764
13765 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13766 (linux_write_memory): Remove declaration of errno.
13767
836acd6d
UW
137682008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13769
13770 * linux-low.c (handle_extended_wait): Do not use "status"
13771 variable uninitialized.
13772
aeba519e
PA
137732008-07-07 Pedro Alves <pedro@codesourcery.com>
13774
13775 * server.c (handle_v_attach): Inhibit reporting dll changes.
13776
db42f210
PA
137772008-06-27 Pedro Alves <pedro@codesourcery.com>
13778
13779 * remote-utils.c (prepare_resume_reply): If requested, don't
13780 output "thread:TID" in the T stop reply.
13781
13782 * server.c (disable_packet_vCont, disable_packet_Tthread)
13783 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13784 (handle_query): If requested, disable support for qC, qfThreadInfo
13785 and qsThreadInfo.
13786 (handle_v_requests): If requested, disable support for vCont.
13787 (gdbserver_show_disableable): New.
13788 (main): Handle --disable-packet and --disable-packet=LIST.
13789
13790 * server.h (disable_packet_vCont, disable_packet_Tthread)
13791 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13792
8e4c5421
CD
137932008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13794
13795 * server.c (gdbserver_usage): Mention --version.
13796
6e23a804
DJ
137972008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13798
13799 * Makefile.in (gdbreplay.o): New rule.
13800
90aa6a40
JM
138012008-06-06 Joseph Myers <joseph@codesourcery.com>
13802
13803 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13804 message, not gdbserver.
13805
c16158bc 138062008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13807 Nathan Sidwell <nathan@codesourcery.com>
13808 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13809
13810 * acinclude.m4: Include ../../config/acx.m4.
13811 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13812 * configure, config.in: Regenerate.
13813 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13814 * server.c (gdbserver_version): Print PKGVERSION.
13815 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13816 (main): Adjust gdbserver_usage calls.
13817 * gdbreplay.c (version, host_name): Add declarations.
13818 (gdbreplay_version, gdbreplay_usage): New.
13819 (main): Accept --version and --help options.
13820
aeb75bf5
DJ
138212008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13822
13823 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13824 (arm_breakpoint_at): Handle Thumb.
13825 (the_low_target): Add comment.
13826
76b233dd
UW
138272008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13828
13829 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13830
08388c79
DE
138312008-05-09 Doug Evans <dje@google.com>
13832
a3c83fae
DE
13833 * server.h (decode_search_memory_packet): Declare.
13834 * remote-utils.c (decode_search_memory_packet): New fn.
13835 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13836 (handle_search_memory): New fn.
13837 (handle_query): Process qSearch:memory packets.
13838
bb9c3d36
UW
138392008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13840
13841 * regcache.c (registers_length): Remove.
13842 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13843 full register packet.
13844 * regcache.h (registers_length): Remove prototype.
13845 * server.h (PBUFSIZ): Define to 16384.
13846
7284e1be
UW
138472008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13848
13849 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13850 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13851 powerpc-64l.o, and powerpc-altivec64l.o.
13852 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13853 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13854 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13855 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13856 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13857 to srv_xmlfiles.
13858
13859 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13860 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13861 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13862 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13863 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13864 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13865 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13866 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13867 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13868 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13869 (clean): Update.
13870
13871 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13872 (init_registers_powerpc_32l): ... this new prototype.
13873 (init_registers_powerpc_32): Remove, replace by ...
13874 (init_registers_powerpc_altivec32l): ... this new prototype.
13875 (init_registers_powerpc_e500): Remove, replace by ...
13876 (init_registers_powerpc_e500l): ... this new prototype.
13877 (init_registers_ppc64): Remove, replace by ...
13878 (init_registers_powerpc_64l): ... this new prototype.
13879 (init_registers_powerpc_64): Remove, replace by ...
13880 (init_registers_powerpc_altivec64l): ... this new prototype.
13881 (ppc_num_regs): Set to 73.
13882 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13883 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13884 (ppc_cannot_store_register): Handle orig_r3 and trap.
13885 (ppc_arch_setup): Update init_registers_... calls.
13886 (ppc_fill_gregset): Handle orig_r3 and trap.
13887
13888 * inferiors.c (clear_inferiors): Reset current_inferior.
13889
fdc59709
PB
138902008-04-23 Paolo Bonzini <bonzini@gnu.org>
13891
889bf7c5
PA
13892 * acinclude.m4: Add override.m4.
13893 * configure: Regenerate.
fdc59709 13894
c9b2f845
UW
138952008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13896
13897 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13898 initial call to init_register_ppc64.
13899
550512b8
UW
139002008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13901
43aaf8b6
PA
13902 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13903 single powerpc*-*-linux* case.
550512b8
UW
13904 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13905
b6430ec3
UW
139062008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13907
13908 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13909 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13910 from reg_xmlfiles.
13911 * linux-ppc-low.c: Include <elf.h>.
13912 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13913 (ppc_hwcap): New global variable.
13914 (ppc_regmap): Remove __SPE__ #ifdef sections.
13915 (ppc_regmap_e500): New global variable.
13916 (ppc_cannot_store_register): Update __SPE__ special case.
13917 (ppc_get_hwcap): New function.
13918 (ppc_arch_setup): Use it to determine whether inferior supports
13919 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13920 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13921 Do not access registers if target does not support AltiVec.
13922 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13923 Do not access registers if target does not support SPE.
13924 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13925
52fa2412
UW
139262008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13927
13928 * linux-low.c (disabled_regsets, num_regsets): New.
13929 (use_regsets_p): Delete.
13930 (linux_wait_for_process): Clear disabled_regsets.
13931 (regsets_fetch_inferior_registers): Check and set it.
13932 (regsets_store_inferior_registers): Likewise.
13933 (linux_fetch_registers, linux_store_registers): Do not use
13934 use_regsets_p.
13935 (initialize_low): Allocate disabled_regsets.
13936
e28b3332
DJ
139372008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13938
13939 * Makefile.in (LIBOBJS): New.
13940 (OBS): Use LIBOBJS.
13941 (memmem.o): New rule.
13942 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13943 * configure: Regenerated.
13944
4536995d
UW
139452008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13946
13947 * server.c (handle_query): Never return "unsupported" for
13948 qXfer:features:read queries.
13949
221c031f
UW
139502008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13951
13952 * server.c (get_features_xml): Fix inverted condition.
13953 (handle_query): Always support qXfer:feature:read.
13954
ccd213ac
DJ
139552008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13956
13957 * server.c (wrapper_argv): New.
13958 (start_inferior): Handle wrapper_argv. If set, expect an extra
13959 trap.
13960 (gdbserver_usage): Document --wrapper.
13961 (main): Parse --wrapper.
13962
6fe305f7
UW
139632008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13964
13965 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13966 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13967 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13968 (ppc_set_pc): Likewise.
13969 (ppc_arch_setup): New function.
13970 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13971 of collect_register.
889bf7c5 13972 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13973
5b0a002e
UW
139742008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13975
13976 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13977 instead of linux-ppc64-low.o.
13978 * linux-ppc64-low.c: Remove file.
13979 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13980 (linux-ppc64-low.o): Remove rule.
13981
13982 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13983 (init_registers_powerpc_64): Likewise.
13984 (ppc_regmap): Conditionally define depending on __powerpc64__.
13985 (ppc_cannot_store_register): Do not special-case "fpscr" when
13986 compiled on __powerpc64__.
13987 (ppc_collect_ptrace_register): New function.
13988 (ppc_supply_ptrace_register): New function.
13989 (ppc_breakpoint): Change type to "unsigned int".
13990 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13991 (the_low_target): Conditionally provide initializers for the
889bf7c5 13992 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13993 collect_ptrace_register and supply_ptrace_register members.
13994
9b4b61c8
UW
139952008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13996
13997 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13998 * server.c (gdbserver_xmltarget): Define.
13999 (get_features_xml): Use it to replace "target.xml" and arch_string.
14000
14001 * configure.srv: Remove srv_xmltarget. Add XML files that were
14002 mentioned there to srv_xmlfiles instead. Remove conditional tests
14003 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14004 srv_xmlfiles and srv_regobj to include all possible choices.
14005 * configure.ac (srv_xmltarget): Remove.
14006 (srv_xmlfiles): Do not add "target.xml".
14007 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14008 checks for supplementary target information.
14009 * configure: Regenerate.
14010 * Makefile.in (XML_TARGET): Remove.
14011 (target.xml): Remove rule.
14012 (clean): Do not clean up target.xml.
14013 (.PRECIOUS): Do not mention target.xml.
14014
14015 * target.h (struct target_ops): Remove arch_string member.
14016 * linux-low.c (linux_arch_string): Remove.
14017 (linux_target_ops): Remove arch_string initializer.
14018 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14019 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14020 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14021 * spu-low.c (spu_arch_string): Remove.
14022 (spu_target_ops): Remove arch_string initializer.
14023 * win32-low.c (win32_arch_string): Remove.
14024 (win32_target_ops): Remove arch_string initializer.
14025 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14026 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14027 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14028
ee1a7ae4
UW
140292008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14030
14031 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14032 by collect_ptrace_register and supply_ptrace_register hooks.
14033 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14034 instead of checking for the_low_target.left_pad_xfer.
14035 (usr_store_inferior_registers): Use collect_ptrace_register callback
14036 instead of checking for the_low_target.left_pad_xfer.
14037
14038 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14039 (s390_supply_ptrace_register): Likewise.
14040 (s390_fill_gregset): Call s390_collect_ptrace_register.
14041 (the_low_target): Update.
14042
14043 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14044 (ppc_supply_ptrace_register): Likewise.
14045 (the_low_target): Update.
14046
14047 * linux-i386-low.c (the_low_target): Update.
14048 * linux-x86-64-low.c (the_low_target): Update.
14049
d61ddec4
UW
140502008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14051
14052 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14053 reg-s390.o and reg-s390x.o.
14054
14055 * linux-low.c (new_inferior): New global variable.
14056 (linux_create_inferior, linux_attach): Set it.
14057 (linux_wait_for_process): Call the_low_target.arch_setup after the
14058 target has stopped for the first time.
14059 (initialize_low): Do not call the_low_target.arch_setup.
14060
14061 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14062 (s390_set_pc): Likewise.
14063 (s390_arch_setup): New function.
14064 (the_low_target): Use s390_arch_setup as arch_setup routine.
14065
14066 * regcache.c (realloc_register_cache): New function.
14067 (set_register_cache): Call it for each existing regcache.
14068
d05b4ac3
UW
140692008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14070
14071 * server.h (init_registers): Remove prototype.
14072
14073 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14074 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14075 instead of init_registers ().
14076 * linux-arm-low.c (init_registers_arm): Add prototype.
14077 (init_registers_arm_with_iwmmxt): Likewise.
14078 (the_low_target): Add initializer for arch_setup field.
14079 * linux-cris-low.c (init_registers_cris): Add prototype.
14080 (the_low_target): Add initializer for arch_setup field.
14081 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14082 (the_low_target): Add initializer for arch_setup field.
14083 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14084 (the_low_target): Add initializer for arch_setup field.
14085 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14086 (the_low_target): Add initializer for arch_setup field.
14087 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14088 (the_low_target): Add initializer for arch_setup field.
14089 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14090 (the_low_target): Add initializer for arch_setup field.
14091 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14092 (init_registers_mips64_linux): Likewise.
14093 (the_low_target): Add initializer for arch_setup field.
14094 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14095 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14096 (the_low_target): Add initializer for arch_setup field.
14097 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14098 (init_registers_powerpc_64): Likewise.
14099 (the_low_target): Add initializer for arch_setup field.
14100 * linux-s390-low.c (init_registers_s390): Add prototype.
14101 (init_registers_s390x): Likewise.
14102 (the_low_target): Add initializer for arch_setup field.
14103 * linux-sh-low.c (init_registers_sh): Add prototype.
14104 (the_low_target): Add initializer for arch_setup field.
14105 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14106 (the_low_target): Add initializer for arch_setup field.
14107 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14108 (the_low_target): Add initializer for arch_setup field.
14109
14110 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14111 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14112 instead of init_registers ().
14113 * win32-arm-low.c (init_registers_arm): Add prototype.
14114 (the_low_target): Add initializer for arch_setup field.
14115 * win32-i386-low.c (init_registers_i386): Add prototype.
14116 (the_low_target): Add initializer for arch_setup field.
14117
14118 * spu-low.c (init_registers_spu): Add prototype.
14119 (initialize_low): Call initialie_registers_spu () instead of
14120 initialize_registers ().
14121
fd96d250
PA
141222008-02-19 Pedro Alves <pedro@codesourcery.com>
14123
14124 * server.c (handle_v_requests): When handling the vRun and vAttach
14125 packets, if already debugging a process, don't kill it. Return an
14126 error instead.
14127
d41b6bb4
DJ
141282008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14129
14130 * server.c (handle_query): Correct length check.
14131
5ac588cf
PA
141322008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14133
14134 * win32-low.c (do_initial_child_stuff): Add process handle
14135 parameter. Set current_process_handle and current_process_id from the
14136 parameters. Clear globals.
14137 (win32_create_inferior): Don't set current_process_handle and
14138 current_process_id here. Instead pass them on the call to
14139 do_initial_child_stuff.
14140 (win32_attach): Likewise.
14141 (win32_clear_inferiors): New.
14142 (win32_kill): Don't close the current process handle or the
14143 current thread handle here. Instead call win32_clear_inferiors.
14144 (win32_detach): Don't open a new handle to the process. Call
14145 win32_clear_inferiors.
14146 (win32_join): Don't rely on current_process_handle; open a new
14147 handle using the process id.
14148 (win32_wait): Call win32_clear_inferiors when the inferior process
14149 has exited.
14150
ecd7ecbc
DJ
141512008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14152
14153 * server.c (monitor_show_help): Add "exit".
14154
1525d545
MG
141552008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14156
ecd7ecbc 14157 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14158 (clean): Add reg-xtensa.c.
14159 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14160 * configure.srv (xtensa*-*-linux*) New target.
14161 * linux-xtensa-low.c: New.
14162 * xtensa-xtregs.c: New.
1525d545 14163
59a016f0
PA
141642008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14165
14166 * hostio.c: Don't include errno.h.
14167 (errno_to_fileio_errno): Move to hostio-errno.
14168 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14169 error number outputting to the target->hostio_last_error callback.
14170 (hostio_packet_error): Use FILEIO_EINVAL directly.
14171 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14172 calls to hostio_error.
14173 * hostio-errno.c: New.
14174 * server.h (hostio_last_error_from_errno): Declare.
14175 * target.h (target_ops): Add hostio_last_error member.
14176 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14177 as hostio_last_error handler.
889bf7c5 14178 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14179 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14180 (wince_hostio_last_error): New functions.
14181 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14182 as hostio_last_error handler.
14183 (win32_target_ops) [!_WIN32_WCE]: Register
14184 hostio_last_error_from_errno as hostio_last_error handler.
14185 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14186 (hostio-errno.o): New rule.
14187 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14188 * configure.srv (srv_hostio_err_objs): New variable. Default to
14189 hostio-errno.o.
14190 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14191 * configure: Regenerate.
14192
2d717e4f
DJ
141932008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14194
14195 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14196 (linux_kill, linux_detach): Clean up the process list.
14197 * remote-utils.c (remote_open): Improve port number parsing.
14198 (putpkt_binary, input_interrupt): Only send interrupts if the target
14199 is running.
14200 * server.c (extended_protocol): Make static.
14201 (attached): Define earlier.
14202 (exit_requested, response_needed, program_argv): New variables.
14203 (target_running): New.
14204 (start_inferior): Clear attached here.
14205 (attach_inferior): Set attached here.
14206 (require_running): Define.
14207 (handle_query): Use require_running and target_running. Implement
14208 "monitor exit".
14209 (handle_v_attach, handle_v_run): New.
14210 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14211 (gdbserver_usage): Update.
14212 (main): Redo argument parsing. Handle --debug and --multi. Handle
14213 --attach along with other options or after the port. Save
14214 program_argv. Support no initial program. Resynchronize
14215 communication with GDB after an error. Handle "monitor exit".
14216 Use require_running and target_running. Always allow the extended
14217 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14218 restart in extended mode.
14219 * README: Refer to the GDB manual. Update --attach usage.
14220
7407e2de
AS
142212007-12-20 Andreas Schwab <schwab@suse.de>
14222
14223 * linux-low.c (STACK_SIZE): Define.
14224 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14225 (linux_test_for_tracefork): Likewise.
14226
b65d95c5
DJ
142272007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14228
14229 * linux-low.c (linux_wait_for_event): Update messages. Do not
14230 reinsert auto-delete breakpoints.
14231 * mem-break.c (struct breakpoint): Change return type of handler to
14232 int.
14233 (set_breakpoint_at): Update handler type.
14234 (reinsert_breakpoint_handler): Return 1 instead of calling
14235 delete_breakpoint.
14236 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14237 setting a new one.
14238 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14239 * mem-break.h (set_breakpoint_at): Update handler type.
14240 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14241 * win32-low.c (auto_delete_breakpoint): New.
14242 (get_child_debug_event): Use it.
14243
4e799345
DJ
142442007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14245
14246 * configure.ac: Check for pread and pwrite.
14247 * hostio.c (handle_pread): Fall back to lseek and read.
14248 (handle_pwrite): Fall back to lseek and write.
14249 * config.in, configure: Regenerated.
14250
27524b67
DJ
142512007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14252
14253 * server.c (myresume): Add own_buf argument.
14254 (main): Update calls.
14255
a20d5e98
DJ
142562007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14257
14258 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14259 * remote-utils.c (remote_open): Do not call disable_async_io.
14260 (block_async_io): Delete.
14261 (unblock_async_io): Make static.
14262 (initialize_async_io): New.
14263 * server.c (handle_v_cont): Handle async I/O here.
14264 (myresume): Likewise. Move other common resume tasks here...
14265 (main): ... from here. Call initialize_async_io. Disable async
14266 I/O before the main loop.
14267 * server.h (initialize_async_io): Declare.
14268 (block_async_io, unblock_async_io): Delete prototypes.
14269 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14270
b79d787e
DJ
142712007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14272
14273 * remote-utils.c (readchar): Allow binary data in received messages.
14274
d97903b2
PA
142752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14276
14277 * win32-low.c (attaching): New global.
14278 (win32_create_inferior): Clear the `attaching' global.
14279 (win32_attach): Set the `attaching' global.
14280 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14281 attaching. Only set a breakpoint at the entry point if not
14282 attaching.
14283
311de423
PA
142842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14285
14286 * server.c (main): Don't report dll events on the initial
14287 connection on attaches.
14288
6c2d16d2
PA
142892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14290
14291 * server.c (main): Relax numerical bases supported for the pid of
14292 the --attach command line argument.
14293
5ca906e6
PA
142942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14295
14296 * win32-low.c (win32_attach): Call OpenProcess before
14297 DebugActiveProcess, not after. Add last error output to error
14298 call.
14299
9c6c8194
PA
143002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14301
14302 * win32-low.c (win32_get_thread_context)
14303 (win32_set_thread_context): New functions.
14304 (thread_rec): Use win32_get_thread_context.
14305 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14306 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14307 field.
14308
4d5d1aaa
PA
143092007-12-03 Leo Zayas
14310 Pedro Alves <pedro_alves@portugalmail.pt>
14311
14312 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14313 global variables.
14314 (child_add_thread): Minor cleanup.
14315 (child_continue): Resume artificially suspended threads before
14316 calling ContinueDebugEvent.
14317 (suspend_one_thread): New.
14318 (fake_breakpoint_event): New.
14319 (get_child_debug_event): Change return type to int. Check here if
14320 gdb sent an interrupt request. If a soft interrupt was requested,
14321 fake a breakpoint event. Return 0 if there is no event to handle,
14322 and 1 otherwise.
14323 (win32_wait): Don't check here if gdb sent an interrupt request.
14324 Ensure there is a valid event to handle.
14325 (win32_request_interrupt): Add soft interruption method as last
14326 resort.
14327
c436e841
PA
143282007-12-03 Leo Zayas
14329 Pedro Alves <pedro_alves@portugalmail.pt>
14330
14331 * win32-low.h (win32_thread_info): Add descriptions to the
14332 structure members. Replace `suspend_count' counter by a
14333 `suspended' flag.
14334 * win32-low.c (thread_rec): Update condition of when to get the
14335 context from the inferior. Rely on ContextFlags being set if it
14336 has already been retrieved. Only suspend the inferior thread if
14337 we haven't already. Warn if that fails.
14338 (continue_one_thread): s/suspend_count/suspended/. Only call
14339 ResumeThread once. Warn if that fails.
14340
e7b5fa67
PA
143412007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14342
14343 * win32-low.c (win32_wait): Don't read from the inferior when it
14344 has already exited.
14345
a385171d
PA
143462007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14347
14348 * Makefile.in (win32_low_h): New variable.
14349 (win32-low.o): Add dependency on $(win32_low_h).
14350 (win32-arm-low.o, win32-i386-low.o): New rules.
14351
f80c84b3
DJ
143522007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14353
14354 * hostio.c: Correct copyright year.
14355
a6b151f1
DJ
143562007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14357
14358 * Makefile.in (OBS): Add hostio.o.
14359 (hostio.o): New rule.
14360 * server.h (handle_vFile): Declare.
14361 * hostio.c: New file.
14362 * server.c (handle_v_requests): Take packet_len and new_packet_len
14363 for binary packets. Call handle_vFile.
14364 (main): Update call to handle_v_requests.
14365
f9387fc3
DJ
143662007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14367
14368 * linux-low.c: Include <sched.h>.
14369
51c2684e
DJ
143702007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14371
14372 * linux-low.c (linux_tracefork_grandchild): New.
14373 (linux_tracefork_child): Use clone.
14374 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14375
75f83163
JB
143762007-10-31 Joel Brobecker <brobecker@adacore.com>
14377
14378 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14379
da5898ce
DJ
143802007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14381
14382 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14383
24a09b5f
DJ
143842007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14385
14386 * inferiors.c (change_inferior_id): Delete.
14387 (add_pid_to_list, pull_pid_from_list): New.
14388 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14389 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14390 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14391 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14392 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14393 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14394 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14395 (using_threads): Always set to 1.
14396 (handle_extended_wait): New.
14397 (add_process): Do not set TID.
14398 (linux_create_inferior): Set must_set_ptrace_flags.
14399 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14400 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14401 (linux_thread_alive): Rename TID argument to LWPID.
14402 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14403 (linux_wait_for_event): Do not use TID or check using_threads. Update
14404 call to dead_thread_notify. Call handle_extended_wait.
14405 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14406 (send_sigstop): Delete sigstop_sent.
14407 (wait_for_sigstop): Avoid TID.
14408 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14409 (linux_test_for_tracefork): New.
14410 (linux_lookup_signals): Use thread_db_active and
14411 linux_supports_tracefork_flag.
14412 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14413 * linux-low.h (get_process_thread): Avoid TID.
14414 (struct process_ifo): Move thread_known and tid to the end. Remove
14415 sigstop_sent.
14416 (linux_attach_lwp, thread_db_init): Update prototypes.
14417 * server.h (change_inferior_id): Delete prototype.
14418 (add_pid_to_list, pull_pid_from_list): New prototypes.
14419 * thread-db.c (thread_db_use_events): New.
14420 (find_first_thread): Rename to...
14421 (find_one_thread): ...this. Update callers and messages. Do not
14422 call fatal. Check thread_db_use_events. Do not call
14423 change_inferior_id or new_thread_notify.
14424 (maybe_attach_thread): Update. Do not call new_thread_notify.
14425 (thread_db_init): Set thread_db_use_events. Check use_events.
14426 * utils.c (fatal, warning): Correct message prefix.
14427
30ed0a8f
DJ
144282007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14429
14430 * Makefile.in (clean): Remove new files.
14431 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14432 (powerpc-64.o, powerpc-64.c): New rules.
14433 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14434 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14435 with SPE.
14436 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14437 SPE targets.
14438 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14439 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14440 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14441 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14442 (target_regsets): Add AltiVec and SPE register sets.
14443 * configure.ac: Check for AltiVec and SPE.
14444 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14445 (ppc_fill_vrregset, ppc_store_vrregset): New.
14446 (target_regsets): Add AltiVec register set.
14447 * configure: Regenerated.
14448
fd462a61
DJ
144492007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14450
14451 * linux-low.c (O_LARGEFILE): Define.
14452 (linux_read_memory): Use /proc/PID/mem.
14453 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14454 * configure, config.in: Regenerated.
14455
69f223ed
DJ
144562007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14457
14458 * linux-low.c (linux_wait_for_event): Do not pass signals while
14459 single-stepping.
14460
aec18585
PA
144612007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14462
14463 * win32-low.c (create_process): New.
14464 (win32_create_inferior): Use create_process instead of
14465 CreateProcess. If create_process failed retry appending an ".exe"
14466 suffix. Store the GetLastError result immediatelly after
14467 create_process calls and use it on the call to error.
14468
34d86ddd
PA
144692007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14470
14471 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14472
5a0e3bd0
JB
144732007-08-23 Joel Brobecker <brobecker@adacore.com>
14474
14475 * configure.ac: Switch license to GPLv3.
14476
f88c79e6
MS
144772007-08-01 Michael Snyder <msnyder@access-company.com>
14478
14479 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14480
6b3d9b83
PA
144812007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14482
14483 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14484 typedef.
14485 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14486 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14487 CloseToolhelp32Snapshot.
14488 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14489 CloseToolhelp32Snapshot.
14490
c588c53c
MS
144912007-07-27 Michael Snyder <michael.snyder@access-company.com>
14492
14493 * server.c (main): Check for inferior exit before main loop.
14494
aa0403d9
PA
144952007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14496
14497 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14498 instead of on tmp_desc.
14499
255e7678
DJ
145002007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14501 Daniel Jacobowitz <dan@codesourcery.com>
14502
14503 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14504 (add_thread): Minor cleanups.
14505 (clear_inferiors): Move lower in the file. Clear the DLL
14506 list.
14507 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14508 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14509 (xml_escape_text): New.
14510 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14511 for qSupported.
14512 (handle_v_cont): Report errors.
14513 (gdbserver_version): Update.
14514 (main): Correct size of own_buf. Do not report initial DLL events.
14515 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14516 (unloaded_dll, xml_escape_text): New.
14517 * win32-low.c (enum target_waitkind): Update comments.
14518 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14519 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14520 (win32_EnumProcessModules, win32_GetModuleInformation)
14521 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14522 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14523 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14524 (win32_Module32First, win32_Module32Next, load_toolhelp)
14525 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14526 (get_child_debug_event): Handle DLL events.
14527 (win32_wait): Likewise.
14528
0d37add9
DJ
145292007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14530
14531 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14532 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14533
45e2715e
PA
145342007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14535
14536 * win32-low.c (handle_output_debug_string): Ignore event if not
14537 waiting.
14538
c5674cf1
PA
145392007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14540
14541 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14542
2bbe3cc1
DJ
145432007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14544
14545 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14546
ae13219e
DJ
145472007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14548
14549 * inferiors.c (change_inferior_id): Add comment.
14550 * linux-low.c (check_removed_breakpoint): Add an early
14551 prototype. Improve debug output.
14552 (linux_attach): Doc update.
14553 (linux_detach_one_process, linux_detach): Clean up before releasing
14554 each process.
14555 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14556 * linux-low.h (struct process_info): Doc improvement.
14557 * mem-break.c (delete_all_breakpoints): New.
14558 * mem-break.h (delete_all_breakpoints): New prototype.
14559 * thread-db.c (find_first_thread): New.
14560 (thread_db_create_event): Call it instead of
14561 thread_db_find_new_threads. Clean up unused variables.
14562 (maybe_attach_thread): Remove first thread handling.
14563 (thread_db_find_new_threads): Use find_first_thread.
14564 (thread_db_get_tls_address): Likewise.
14565
4105de34
DJ
145662007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14567
14568 * thread-db.c (thread_db_find_new_threads): Add prototype.
14569 (thread_db_create_event): Check for the main thread before adding
14570 a new thread.
14571 (maybe_attach_thread): Only enable event reporting if TID == 0.
14572 (thread_db_get_tls_address): Check for new threads.
14573
2b876972
DJ
145742007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14575
14576 * linux-low.c (linux_create_inferior): Try execv before execvp.
14577 * spu-low.c (spu_create_inferior): Likewise.
14578
7a245884
DJ
145792007-06-13 Mike Frysinger <vapier@gentoo.org>
14580
14581 * linux-low.c (linux_create_inferior): Change execv to execvp.
14582 * spu-low.c (spu_create_inferior): Likewies.
14583
117ce543
DJ
145842007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14585
14586 * Makefile.in (clean): Clean new files instead of deleted ones.
14587 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14588 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14589 rules.
14590 * configure.srv: Specify XML files and new regformats for MIPS and
14591 MIPS64 GNU/Linux.
14592 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14593 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14594 an entry for the restart register.
14595 (mips_cannot_fetch_register, mips_cannot_store_register)
14596 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14597 register names to match the XML descriptions.
14598 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14599 restart register instead of $0.
14600
0e7f50da
UW
146012007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14602 Markus Deuling <deuling@de.ibm.com>
14603
14604 * remote-utils.c (decode_xfer_write): New function.
14605 * server.h (decode_xfer_write): Add prototype.
14606 * server.c (handle_query): Add PACKET_LEN argument. Support
14607 qXfer:spu:read and qXfer:spu:write packets.
14608 (main): Pass packet_len to handle_query.
14609 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14610 * target.h (target_ops): Add qxfer_spu.
14611
374c1d38
UW
146122007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14613
14614 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14615 accessing non-seekable spufs files.
14616
bb63802a
UW
146172007-05-16 Markus Deuling <deuling@de.ibm.com>
14618
889bf7c5 14619 * server.c (handle_query): Add reply for qC packet.
bb63802a 14620
7390519e
PA
146212007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14622 Leo Zayas <lerele@champenstudios@com>
14623
14624 * server.h (check_remote_input_interrupt_request): New function.
14625 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14626 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14627 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14628 (check_remote_input_interrupt_request): New function.
14629 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14630 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14631 winapi_GenerateConsoleCtrlEvent): New typedefs.
14632 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14633 to 250 ms.
14634 (win32_wait): Check for remote interrupt request
14635 with check_remote_input_interrupt_request.
14636 (win32_request_interrupt): New function.
14637 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14638
34b34921
PA
146392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14640
14641 * win32-low.c (debug_registers_changed,
14642 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14643 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14644 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14645 (thread_rec): Get context using the low target.
14646 (child_add_thread): Call thread_added on the low target,
14647 which does the same thing.
14648 (regptr): Delete.
14649 (do_initial_child_stuff): Remove debug registers references.
14650 Set context using the low target. Resume threads after
14651 setting the contexts.
14652 (child_continue): Remove dead variable. Remove debug
14653 registers references.
14654 (child_fetch_inferior_registers): Go through the low target.
14655 (do_child_store_inferior_registers): Remove.
14656 (child_store_inferior_registers): Go through the low target.
14657 (win32_resume): Remove debug registers references.
14658 Set context using the low target.
14659 (handle_exception): Change return type to void. Don't record
14660 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14661 first chance exception.
889bf7c5 14662 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14663 goto loop. Always return after waiting for debug event.
14664 (win32_wait): Convert to switch statement. Handle spurious
14665 events.
14666
14667 * win32-i386-low.c (debug_registers_changed,
14668 debug_registers_used): New.
14669 (initial_stuff): Rename to ...
14670 (i386_initial_stuff): ... this. Clear debug registers
14671 state variables.
14672 (store_debug_registers): Delete.
14673 (i386_get_thread_context): New.
14674 (load_debug_registers): Delete.
14675 (i386_set_thread_context): New.
14676 (i386_thread_added): New.
14677 (single_step): Rename to ...
14678 (i386_single_step): ... this.
14679 (do_fetch_inferior_registers): Rename to ...
14680 (i386_fetch_inferior_register): ... this.
14681 (i386_store_inferior_register): New.
14682 (the_low_target): Adapt to new interface.
14683
14684 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14685 (arm_get_thread_context): New.
14686 (arm_set_thread_context): New.
14687 (regptr): New.
14688 (do_fetch_inferior_registers): Rename to ...
14689 (arm_fetch_inferior_register): ... this.
14690 (arm_store_inferior_register): New.
14691 (arm_wince_breakpoint): Reimplement as unsigned long.
14692 (arm_wince_breakpoint_len): Define.
14693 (the_low_target): Adapt to new interface.
14694
14695 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14696 load_debug_registers. Add get_thread_context, set_thread_context,
14697 thread_added and store_inferior_register. Rename
14698 fetch_inferior_registers to fetch_inferior_register.
14699 (regptr): Remove declaration.
14700
dd6953e1
PA
147012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14702
14703 * linux-low.c (linux_detach): Change return type to int. Return 0.
14704 * spu-low.c (spu_detach): Likewise.
14705
444d6139
PA
147062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14707
14708 * target.h (target_ops): Change return type of detach to int.
14709 Add join.
14710 (join_inferior): New.
14711 * server.c (main): Don't skip detach support on mingw32.
14712 If the inferior doesn't support detaching return error.
14713 Call join_inferior instead of using waitpid.
14714 * linux-low.c (linux_join): New.
14715 (linux_target_op): Add linux_join.
14716 * spu-low.c (spu_join): New.
14717 (spu_target_ops): Add spu_join.
14718 * win32-low.c (win32_detach): Adapt to new interface.
14719 Reopen current_process_handle before detaching. Issue a child
14720 resume before detaching.
14721 (win32_join): New.
14722 (win32_target_op): Add win32_join.
14723
1d5315fe
PA
147242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14725
14726 * win32-low.c (win32-attach): Fix return value.
14727 * target.h (target_ops): Describe ATTACH return values.
14728
bf914831
PA
147292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14730
14731 * win32-low.c (GETPROCADDRESS): Define.
14732 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14733 (winapi_DebugSetProcessKillOnExit): Likewise.
14734 (win32_create_inferior): Force usage of ansi CreateProcessA.
14735 (win32_attach): Use GETPROCADDRESS.
14736 (win32_detach): Likewise.
14737
f72f3e60
PA
147382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14739
14740 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14741
ed50f18f
PA
147422007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14743
14744 * win32-low.c: Commit leftover changes from 2007-03-29.
14745
0c2ead7e
DJ
147462007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14747
14748 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14749 fields short instead of int. Add explicit padding.
14750 (i387_cache_to_fsave): Remove unnecessary casts.
14751 (i387_fsave_to_cache): Doc fix.
14752 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14753
73725ff3
DJ
147542007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14755
14756 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14757 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14758
d99f33d8
PA
147592007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14760
14761 * configure.srv (arm*-*-mingw32ce*): Move near the other
14762 arm targets.
14763
68070c10
PA
147642007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14765
2482afc6 14766 * configure.ac: Add errno checking.
68070c10
PA
14767 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14768 sys/file.h and malloc.h.
14769 (AC_CHECK_DECLS): Add perror.
14770 (srv_mingwce): Handle.
2482afc6 14771 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14772 win32-i386-low.o to srv_tgtobj.
14773 (i[34567]86-*-mingw*): Likewise.
14774 (arm*-*-mingw32ce*): Add case.
14775 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14776 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14777 [__MINGW32CE__] (strerror): New function.
14778 [__MINGW32CE__] (errno): Define to GetLastError.
14779 [__MINGW32CE__] (COUNTOF): New macro.
14780 (remote_open): Remove extra close call.
14781 * mem-break.c (delete_breakpoint_at): New function.
14782 * mem-break.h (delete_breakpoint_at): Declare.
14783 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14784 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14785 [USE_WIN32API] (read, write): Add char* casts.
14786 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14787 * server.h: Include wincecompat.h on Windows CE.
14788 [HAVE_ERRNO_H]: Check.
14789 (perror): Declare if not declared.
14790 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14791 (perror_with_name): Remove errno declaration.
14792 * wincecompat.h: New.
14793 * wincecompat.c: New.
14794 * win32-low.h: New.
14795 * win32-arm-low.c: New.
14796 * win32-i386-low.c: New.
14797 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14798 (OUTMSG2): Make it safe.
14799 (_T): New macro.
14800 (COUNTOF): New macro.
14801 (NUM_REGS): Get it from the low target.
14802 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14803 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14804 (thread_rec): Let low target handle debug registers.
14805 (child_add_thread): Likewise.
14806 (child_init_thread_list): Likewise.
14807 (continue_one_thread): Likewise.
14808 (regptr): New.
14809 (do_child_fetch_inferior_registers): Move to ...
14810 * win32-i386-low.c: ... here, and rename to ...
14811 (do_fetch_inferior_registers): ... this.
889bf7c5 14812 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14813 Go through the low target.
14814 (do_child_store_inferior_registers): Use regptr.
14815 (strwinerror): New function.
14816 (win32_create_inferior): Handle Windows CE.
14817 Use strwinerror instead of strerror on Windows error
14818 codes. Add program to the error output.
14819 Don't close the main thread handle on Windows CE.
14820 (win32_attach): Use coredll.dll on Windows CE.
14821 (win32_kill): Close current process and current
14822 thread handles.
14823 (win32_detach): Use coredll.dll on Windows CE.
14824 (win32_resume): Let low target handle debug registers, and
14825 step request.
14826 (handle_exception): Add/Remove initial breakpoint. Avoid
14827 non-existant WSTOPSIG on Windows CE.
14828 (win32_read_inferior_memory): Cast to remove warning.
14829 (win32_arch_string): Go through the low target.
14830 (initialize_low): Call set_breakpoint_data with the low
14831 target's breakpoint.
14832 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14833 FOP_REGNUM, mappings): Move to ...
14834 * win32-i386-low.c: ... here.
14835 * win32-low.c (win32_thread_info): Move to ...
14836 * win32-low.h: ... here.
14837 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14838 win32-arm-low.c and wincecompat.c.
14839 (all:): Add $EXEEXT.
14840 (install-only:): Likewise.
14841 (gdbserver:): Likewise.
14842 (gdbreplay:): Likewise.
14843 * config.in: Regenerate.
14844 * configure: Regenerate.
14845
41093d81
PA
148462007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14847
14848 * win32-low.c: Rename typedef thread_info to
14849 win32_thread_info throughout.
14850
544afa54
PA
148512007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14852
14853 * win32-i386-low.c: Rename to ...
14854 * win32-low.c: ... this.
14855 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14856 * Makefile.in: Likewise.
14857
bce7165d
PA
148582007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14859
14860 * remote-utils.c (monitor_output): Constify msg parameter.
14861 * server.h (monitor_output): Likewise.
14862 * win32-i386-low.c (handle_output_debug_string): New.
14863 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14864 handle_output_debug_string.
14865 (get_child_debug_event): Likewise.
14866
506c7aa0
DJ
148672007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14868
14869 * server.c (main): Correct strtoul check.
14870
42c81e2a
DJ
148712007-03-27 Jon Ringle <jon@ringle.org>
14872
14873 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14874
9453113a
DJ
148752007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14876
14877 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14878
64a69107
DJ
148792007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14880
14881 * terminal.h: Check HAVE_SGTTY_H.
14882
148832007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14884
14885 * remote-utils.c (remote_open): Print out the assigned port number.
14886
c74d0ad8
DJ
148872007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14888
14889 * remote-utils.c (monitor_output): New function.
14890 * server.c (debug_threads): Define here.
14891 (monitor_show_help): New function.
14892 (handle_query): Handle qRcmd.
14893 (main): Do not handle 'd' packet.
14894 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14895 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14896 of debug_threads.
14897
de7c3b4a
PA
148982007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14899
14900 * Makefile.in (EXEEXT): New.
14901 (clean): Use $(EXEEXT).
14902
ef57601b
PA
149032007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14904
14905 * target.h (target_ops): Rename send_signal to request_interrupt,
14906 and remove enum target_signal parameter.
14907 * linux-low.c (linux_request_interrupt): Rename from
14908 linux_send_signal, and always send SIGINT.
14909 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14910 and always send SIGINT.
14911 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14912 of send_signal.
14913 (input_interrupt): Likewise.
14914
820f2bda
PA
149152007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14916
14917 * server.c (get_features_xml): Check if target implemented
14918 arch_string.
14919 * win32-i386-low.c (win32_arch_string): New.
14920 (win32_target_ops): Add win32_arch_string as arch_string member.
14921
ab39bf24
UW
149222007-02-22 Markus Deuling <deuling@de.ibm.com>
14923
14924 * spu-low.c (spu_arch_string): New.
14925 (spu_target_ops): Add spu_arch_string.
14926
61ff6e04
DJ
149272007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14928
14929 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14930 * configure.ac: Do not check for terminal.h.
14931 * configure, config.in: Regenerated.
14932
fb1e4ffc
DJ
149332007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14934
14935 * Makefile.in (OBS): Add $(XML_BUILTIN).
14936 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14937 (clean): Update.
14938 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14939 (arm-with-iwmmxt.c): New.
14940 * config.in, configure: Regenerate.
14941 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14942 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14943 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14944 (arm*-*-linux*): Add iWMMXt and regset support.
14945 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14946 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14947 (arm_store_wmmxregset, target_regsets): New.
14948 * server.c (get_features_xml): Take annex argument. Check builtin
14949 XML documents.
14950 (handle_query): Handle multiple annexes.
14951
0f48aa01
DJ
149522007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14953
14954 * remote-utils.c [USE_WIN32API] (read, write): Define.
14955 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14956 write.
14957
23181151
DJ
149582007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14959
14960 * linux-i386-low.c (the_low_target): Set arch_string.
14961 * linux-x86-64-low.c (the_low_target): Likewise.
14962 * linux-low.c (linux_arch_string): New.
14963 (linux_target_ops): Add it.
14964 * linux-low.h (struct linux_target_ops): Add arch_string.
14965 * server.c (write_qxfer_response): Use const void * for DATA.
14966 (get_features_xml): New.
14967 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14968 * target.h (struct target_ops): Add arch_string method.
14969
9d606399
DJ
149702007-01-03 Denis Pilat <denis.pilat@st.com>
14971 Daniel Jacobowitz <dan@codesourcery.com>
14972
14973 * linux-low.c (linux_kill): Handle being called with no threads.
14974 * win32-i386-low.c (win32_kill): Likewise.
14975 (get_child_debug_event): Clear current_process_handle.
14976
149772006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14978 Daniel Jacobowitz <dan@codesourcery.com>
14979
14980 * remote-utils.c (remote_open): Check the type of specified
14981 serial port devices before opening them.
14982 * server.c (main): Kill the inferior if an error occurs during
14983 the first remote_open.
14984
a5e13d24
DJ
149852006-12-05 Markus Deuling <deuling@de.ibm.com>
14986
14987 * README: Update supported targets.
14988
186947f7
DJ
149892006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14990
14991 * Makefile.in (clean): Remove reg-mips64.c.
14992 (reg-mips64.c, reg-mips64.o): New rules.
14993 * configure.srv: Handle mips64. Include regset support for mips.
14994 * linux-mips-low.c (union mips_register): New.
14995 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14996 (mips_breakpoint, mips_breakpoint_at): Use int.
14997 (mips_collect_register, mips_supply_register)
14998 (mips_collect_register_32bit, mips_supply_register_32bit)
14999 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15000 (mips_store_fpregset, target_regsets): New.
15001 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15002
a13e2c95
UW
150032006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15004
15005 * configure.srv: Add target "spu*-*-*".
15006 * Makefile.in (clean): Remove reg-spu.c.
15007 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15008 * spu-low.c: New file.
15009
cb7283db
DJ
150102006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15011
15012 * configure.ac: Correct td_thr_tls_get_addr test.
15013 * configure: Regenerated.
15014
89be2091
DJ
150152006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15016
15017 * linux-low.c (linux_wait_for_event): Reformat. Use the
15018 pass_signals array.
15019 * remote-utils.c (decode_address_to_semicolon): New.
15020 * server.c (pass_signals, handle_general_set): New.
15021 (handle_query): Mention QPassSignals for qSupported.
15022 (main): Call handle_general_set.
15023 * server.h (pass_signals, decode_address_to_semicolon): New.
15024
000ef4f0
DJ
150252006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15026
15027 * server.c (handle_query): Correct error handling for read_auxv.
15028
b7149293
UW
150292005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15030
15031 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15032 and srv_linux_thread_db to yes.
15033 * linux-s390-low.c (s390_fill_gregset): New function.
15034 (target_regsets): Define data structure.
15035
dae5f5cf
DJ
150362006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15037
15038 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15039 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15040 * config.in, configure: Regenerated.
15041 * inferiors.c (gdb_id_to_thread): New function.
15042 (gdb_id_to_thread_id): Use it.
15043 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15044 * linux-low.h (struct process_info): Add th member.
15045 (thread_db_get_tls_address): New prototype.
15046 * remote-utils.c (decode_address): Make non-static.
15047 * server.c (handle_query): Handle qGetTLSAddr.
15048 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15049 * target.h (struct target_ops): Add get_tls_address.
15050 * thread-db.c (maybe_attach_thread): Save the thread handle.
15051 (thread_db_get_tls_address): New.
15052
32ca6d61
DJ
150532006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15054
15055 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15056 (linux_resume_one_process): Take a siginfo_t *. Update all
15057 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15058 (struct pending_signals): Add a siginfo_t.
15059 (linux_wait_for_process): Always set last_status.
15060 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15061 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15062 * linux-low.h (struct process_info): Add last_status.
15063
5ffff7c1
DJ
150642006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15065
15066 * remote-utils.c (try_rle): New function.
15067 (putpkt_binary): Use it.
15068
8695c747
DJ
150692006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15070
15071 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15072 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15073 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15074 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15075 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15076 point registers.
15077
290fadea
RS
150782006-08-08 Richard Sandiford <richard@codesourcery.com>
15079
15080 * server.c (terminal_fd): New variable.
15081 (old_foreground_pgrp): Likewise.
15082 (restore_old_foreground_pgrp): New function.
15083 (start_inferior): Record the terminal file descriptor in terminal_fd
15084 and its original foreground group in old_foreground_pgrp. Register
15085 restore_old_foreground_pgrp with atexit().
15086
9f2e1e63
DJ
150872006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15088
15089 * server.c (handle_query): Correct qPart to qXfer.
15090
b80864fb
DJ
150912006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15092
15093 * configure.ac: Check for more headers which are missing on
15094 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15095 * configure.srv: Add Cygwin and mingw32.
15096 * remote-utils.c: Don't include headers unconditionally which
15097 are missing on mingw32. Include <winsock.h> for mingw32.
15098 (remote_open): Adjust for mingw32 support. Flush
15099 standard error after writing to it.
15100 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15101 (unblock_async_io, enable_async_io, disable_async_io)
15102 (readchar, getpkt): Update for Winsock support.
15103 (prepare_resume_reply): Expect a protocol signal number.
15104 * server.c: Disable <sys/wait.h> on mingw32.
15105 (start_inferior): Adjust for mingw32 support. Flush
15106 standard error after writing to it.
15107 (attach_inferior): Likewise. Use protocol signal
15108 numbers.
15109 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15110 and names.
15111 * win32-i386-low.c: New file.
15112 * Makefile.in (XM_CLIBS): Set.
15113 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15114 (win32-i386-low.o): New dependency rule.
15115 * linux-low.c (linux_wait): Use target signal numbers.
15116 * target.h (struct target_ops): Doc fix.
15117 * server.h (target_signal_to_name): New prototype.
15118 * gdbreplay.c: Don't include headers unconditionally which
15119 are missing on mingw32. Include <winsock.h> for mingw32.
15120 (remote_close, remote_open): Adjust for Winsock support.
15121 * configure, config.in: Regenerated.
15122
0876f84a
DJ
151232006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15124
15125 * server.c (decode_xfer_read, write_qxfer_response): New.
15126 (handle_query): Take a packet length argument. Handle
15127 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15128 the qSupported response.
15129 (main): Update call to handle_query.
15130
01f9e8fa
DJ
151312006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15132
15133 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15134 (putpkt_binary): Renamed from putpkt and adjusted for binary
15135 data.
15136 (putpkt): New wrapper for putpkt_binary.
15137 (readchar): Don't mask off the high bit.
15138 (decode_X_packet): New function.
15139 * server.c (main): Call putpkt_binary if a handler sets the packet
15140 length. Save the length of the incoming packet. Handle 'X'.
15141 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15142
be2a5f71
DJ
151432006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15144
15145 * server.c (handle_query): Handle qSupported.
15146
ea025f5f
DJ
151472006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15148
15149 * remote-utils.c (all_symbols_looked_up): New variable.
15150 (look_up_one_symbol): Check it.
15151 * server.h (look_up_one_symbol): New declaration.
15152 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15153
9308fc88
DJ
151542006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15155
15156 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15157 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15158 (PTRACE_GET_THREAD_AREA): Define.
15159 (ps_get_thread_area): New function.
15160
52fb6437
NS
151612006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15162
15163 * configure.srv (m68k*-*-uclinux*): New target.
15164 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15165 (linux_resume_one_process): Remove extraneous cast.
15166 (linux_read_offsets): New.
15167 (linux_target_op): Add linux_read_offsets on mmuless systems.
15168 * server.c (handle_query): Add qOffsets logic.
15169 * target.h (struct target_ops): Add read_offsets.
15170
21b0f40c
DJ
151712006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15172
15173 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15174 (PTRACE_GET_THREAD_AREA): Define.
15175 (ps_get_thread_area): New function.
15176 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15177 (linux-x86-64-low.o): Update.
15178
0050a760
DJ
151792006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15180
15181 * configure.ac: Remove checks for prfpregset_t.
15182 * gdb_proc_service.h: New file.
15183 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15184 new "gdb_proc_service.h".
15185 * proc-service.c: Likewise.
15186 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15187 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15188 * Makefile.in (gdb_proc_service_h): Updated.
15189 * configure, config.in: Regenerated.
15190
b92a518e
DJ
151912006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15192
15193 * remote-utils.c (prepare_resume_reply): Move declaration
15194 of gdb_id_from_wait to the top of the block.
15195
545587ee
DJ
151962006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15197
15198 * linux-low.c (regsets_store_inferior_registers): Read the regset
15199 from the target before filling it.
15200
9db87ebd
DJ
152012006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15202
15203 * server.c (attach_inferior): Return SIGTRAP for a successful
15204 attach.
15205
dd24457d
DJ
152062006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15207
15208 * Makefile.in (OBS): Add version.o.
15209 (STAGESTUFF): Delete.
15210 (version.o): Add dependencies.
15211 (version.c): Replace rule.
15212 (clean): Remove version.c.
15213 * server.c (gdbserver_version): New.
15214 (gdbserver_usage): Use printf.
15215 (main): Handle --version and --help.
15216 * server.h (version, host_name): Add declarations.
15217
6f0f660e
EZ
152182005-12-23 Eli Zaretskii <eliz@gnu.org>
15219
889bf7c5
PA
15220 * linux-arm-low.c:
15221 * linux-arm-low.c:
15222 * inferiors.c:
15223 * i387-fp.h:
15224 * i387-fp.c:
15225 * gdbreplay.c:
15226 * regcache.c:
15227 * proc-service.c:
15228 * mem-break.h:
15229 * mem-break.c:
15230 * linux-x86-64-low.c:
15231 * linux-sh-low.c:
15232 * linux-s390-low.c:
15233 * linux-ppc64-low.c:
15234 * linux-ppc-low.c:
15235 * linux-mips-low.c:
15236 * linux-m68k-low.c:
15237 * linux-m32r-low.c:
15238 * linux-low.h:
15239 * linux-low.c:
15240 * linux-ia64-low.c:
15241 * linux-i386-low.c:
15242 * linux-crisv32-low.c:
15243 * thread-db.c:
15244 * terminal.h:
15245 * target.h:
15246 * target.c:
15247 * server.h:
15248 * server.c:
15249 * remote-utils.c:
15250 * regcache.h:
15251 * utils.c:
15252 * Makefile.in:
15253 * configure.ac:
6f0f660e
EZ
15254 * gdbserver.1: Add (C) after Copyright. Update the FSF
15255 address.
15256
9d1fb177
DJ
152572005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15258
15259 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15260 (arm_breakpoint_at): Recognize both breakpoints.
15261 (the_low_target): Use the correct breakpoint instruction.
15262
011a70c2
DJ
152632005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15264
15265 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15266 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15267 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15268 (the_low_target): Update.
15269
7fb85e41
AS
152702005-10-25 Andreas Schwab <schwab@suse.de>
15271
15272 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15273
15274 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15275 (ia64_num_regs): Reduce to 462.
15276
3db0444b
DJ
152772005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15278
15279 * acinclude.m4: Correct quoting.
15280 * aclocal.m4: Regenerated.
15281
15282 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15283 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15284 (thread_db_init): Call thread_db_err_str.
15285 * configure.ac: Check for TD_VERSION.
15286 * config.in, configure: Regenerated.
15287
bee0189a
DJ
152882005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15289
15290 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15291
e9d25b98
DJ
152922005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15293
15294 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15295 is not available. Define HAVE_PTRACE_GETREGS if it is.
15296 * config.in, configure: Regenerated.
15297 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15298 * linux-i386-low.c, linux-m68k-low.c: Update to use
15299 HAVE_PTRACE_GETREGS.
15300 * linux-low.c (regsets_fetch_inferior_registers)
15301 (regsets_store_inferior_registers): Only return 0 if we processed
15302 GENERAL_REGS.
15303 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15304 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15305
a06660f7
DJ
153062005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15307
15308 * inferiors.c (struct thread_info): Add gdb_id.
15309 (add_thread): Add gdb_id argument.
15310 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15311 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15312 calls to add_thread.
15313 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15314 * server.c (handle_query): Use thread_to_gdb_id.
15315 (handle_v_cont, main): Use gdb_id_to_thread_id.
15316 * server.h (add_thread): Update prototype.
15317 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15318 prototypes.
15319
5a1f5858
DJ
153202005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15321
15322 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15323 left-padded registers.
15324 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15325 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15326
e122f1f5
SE
153272005-07-01 Steve Ellcey <sje@cup.hp.com>
15328
15329 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15330 * configure: Regenerate.
15331 * config.in: Regenerate.
15332 * server.h (NEED_DECLARATION_STRERROR):
15333 Replace with !HAVE_DECL_STRERROR.
15334
d592fa2f
DJ
153352005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15336
15337 * linux-low.c (linux_wait, linux_send_signal): Don't test
15338 an unsigned long variable for > 0 if it could be MAX_ULONG.
15339 * server.c (myresume): Likewise.
15340 * target.c (set_desired_inferior): Likewise.
15341
ccbd4912
MK
153422005-06-13 Mark Kettenis <kettenis@gnu.org>
15343
15344 * configure.ac: Simplify and improve check for socklen_t.
15345 * configure, config.in: Regenerate.
15346
f450004a
DJ
153472005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15348
15349 * acconfig.h: Remove.
15350 * configure.ac: Add a test for socklen_t. Use three-argument
15351 AC_DEFINE throughout.
15352 * config.in: Regenerated using autoheader 2.59.
15353 * configure: Regenerated.
15354
15355 * gdbreplay.c (socklen_t): Provide a default.
15356 (remote_open): Use socklen_t.
15357 * remote-utils.c (socklen_t): Provide a default.
15358 (remote_open): Use socklen_t.
15359 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15360 unsigned char.
15361
15362 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15363 char for buffers.
15364 * linux-low.c (linux_read_memory, linux_write_memory)
15365 (linux_read_auxv): Likewise.
15366 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15367 (check_mem_write): Likewise.
15368 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15369 Likewise.
15370 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15371 (registers_from_string, register_data): Likewise.
15372 * server.c (handle_query, main): Likewise.
15373 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15374 (decode_M_packet): Likewise.
15375 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15376 * target.h (struct target_ops): Update read_memory, write_memory,
15377 and read_auxv.
15378 (read_inferior_memory, write_inferior_memory): Update.
15379 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15380 to unsigned char *.
15381 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15382 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15383 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15384 linux-s390-low.c, linux-sh-low.c: Update for changes in
15385 read_inferior_memory and the_low_target->breakpoint.
15386
eee84df1
DJ
153872005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15388
15389 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15390 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15391 * configure.srv: Add powerpc64-*-linux*.
15392 * linux-ppc64-low.c: New file.
15393
45b134e5
OF
153942005-05-23 Orjan Friberg <orjanf@axis.com>
15395
15396 * linux-cris-low.c: New file with support for CRIS.
15397 * linux-crisv32-low.c: Ditto for CRISv32.
15398 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15399 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15400 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15401 reg-crisv32.o, and reg-crisv32.c to make rules.
15402 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15403 recognized targets.
15404
48d93c75
UW
154052005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15406
15407 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15408 of sizeof (PTRACE_XFER_TYPE).
15409 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15410
e013ee27
OF
154112005-05-12 Orjan Friberg <orjanf@axis.com>
15412
889bf7c5 15413 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15414 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15415 pointers for hardware watchpoint support.
15416 * linux-low.h (struct linux_target_ops): Ditto.
15417 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15418 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15419 to linux_target_ops.
15420 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15421 reply packet.
15422 * server.c (main): Recognize 'Z' and 'z' packets.
15423
b0ded00b
UW
154242005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15425
15426 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15427 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15428 (the_low_target): Add new members.
15429
8643e2ad
DJ
154302005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15431
15432 * proc-service.c (ps_lgetregs): Search all_processes instead of
15433 all_threads.
15434
fc620387
DJ
154352005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15436
15437 * server.c (start_inferior): Change return type to int.
15438 (attach_inferior): Change sigptr to int *.
15439 (handle_v_cont, handle_v_requests): Change signal to int *.
15440 (main): Change signal to int.
15441
154422005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15443
15444 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15445 * configure.srv: Add m32r*-*-linux*.
15446 * linux-m32r-low.c: New file.
15447
e0e76420
DJ
154482005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15449
15450 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15451
a1928bad
DJ
154522005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15453
15454 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15455 Take unsigned long arguments for PIDs.
15456 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15457 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15458 (wait_for_sigstop, linux_resume_one_process)
15459 (regsets_fetch_inferior_registers, linux_send_signal)
15460 (linux_read_auxv): Likewise. Update the types of variables holding
15461 PIDs. Update format string specifiers.
15462 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15463 * remote-utils.c (prepare_resume_reply): Likewise.
15464 * server.c (cont_thread, general_thread, step_thread)
15465 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15466 unsigned long.
15467 (handle_query): Update format specifiers.
15468 (handle_v_cont, main): Use strtoul for thread IDs.
15469 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15470 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15471 (general_thread, step_thread, thread_from_wait)
15472 (old_thread_from_wait): Update.
15473 * target.h (struct thread_resume): Use unsigned long for THREAD.
15474 (struct target_ops): Use unsigned long for arguments to attach and
15475 thread_alive.
15476
dcdb98d2
DJ
154772005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15478
15479 * acinclude.m4: Include bfd/bfd.m4 directly.
15480 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15481 <agriffis@toolchain.org>.
15482 * aclocal.m4, configure: Regenerated.
15483
bec39cab
AC
154842005-01-07 Andrew Cagney <cagney@gnu.org>
15485
15486 * configure.ac: Rename configure.in, require autoconf 2.59.
15487 * configure: Re-generate.
15488
434c4c77
DJ
154892004-12-08 Daniel Jacobowitz <dan@debian.org>
15490
15491 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15492 LIBS when finished.
15493 * aclocal.m4: Regenerated.
15494 * configure: Regenerated.
15495
db1d3e1b
AS
154962004-11-21 Andreas Schwab <schwab@suse.de>
15497
15498 * linux-m68k-low.c (m68k_num_gregs): Define.
15499 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15500 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15501 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15502 (m68k_breakpoint_at): New. Add to the_low_target.
15503
15504 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15505 srv_linux_thread_db to yes.
15506
43360365
JB
155072004-10-20 Joel Brobecker <brobecker@gnat.com>
15508
15509 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15510 (ARCH_SET_FS): Likewise.
15511 (ARCH_GET_FS): Likewise.
15512 (ARCH_GET_GS): Likewise.
15513
fd500816
DJ
155142004-10-16 Daniel Jacobowitz <dan@debian.org>
15515
15516 * linux-i386-low.c (ps_get_thread_area): New.
15517 * linux-x86-64-low.c (ps_get_thread_area): New.
15518 * linux-low.c: Include <sys/syscall.h>.
15519 (linux_kill_one_process): Don't kill the first thread here.
15520 (linux_kill): Kill the first thread here.
15521 (kill_lwp): New function.
15522 (send_sigstop, linux_send_signal): Use it.
15523 * proc-service.c: Clean up #ifdefs.
15524 (fpregset_info): Delete.
15525 (ps_lgetregs): Update and enable implementation.
15526 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15527 implementations.
15528 * remote-utils.c (struct sym_cache, symbol_cache): New.
15529 (input_interrupt): Print a clearer message.
15530 (async_io_enabled): New variable.
15531 (enable_async_io, disable_async_io): Use it. Update comments.
15532 (look_up_one_symbol): Use the symbol cache.
15533 * thread-db.c (thread_db_look_up_symbols): New function.
15534 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15535
f6de3c42
DJ
155362004-10-16 Daniel Jacobowitz <dan@debian.org>
15537
15538 * configure.in: Test for -rdynamic.
15539 * configure: Regenerated.
15540 * Makefile (INTERNAL_LDFLAGS): New.
15541 (gdbserver, gdbreplay): Use it.
15542
2c0fc042
AC
155432004-09-02 Andrew Cagney <cagney@gnu.org>
15544
15545 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15546
075b3282
DJ
155472004-03-23 Daniel Jacobowitz <drow@mvista.com>
15548
15549 * linux-low.c (linux_wait): Clear all_processes list also.
15550
fa6a77dc
DJ
155512004-03-12 Daniel Jacobowitz <drow@mvista.com>
15552
15553 * linux-low.c: Include <errno.h>. Remove extern declaration of
15554 errno.
15555
6d782a97
DJ
155562004-03-12 Daniel Jacobowitz <drow@mvista.com>
15557
15558 * gdbreplay.c, server.h, utils.c: Update copyright years.
15559
3a7fb99b
DJ
155602004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15561
15562 * server.c (main): Print child status or termination signal from
15563 variable 'signal', not 'sig'.
15564
c3e735a6
DJ
155652004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15566
15567 * linux-low.c (linux_read_memory): Change return type to
15568 int. Check for and return error from ptrace().
15569 * target.c (read_inferior_memory): Change return type to int. Pass
15570 back return status from the_target->read_memory().
15571 * target.h (struct target_ops): Adapt *read_memory() prototype.
15572 Update comment.
15573 (read_inferior_memory): Adapt prototype.
15574 * server.c (main): Return an error packet if
15575 read_inferior_memory() returns an error.
15576
a59d1c82
DJ
155772004-03-04 Daniel Jacobowitz <drow@mvista.com>
15578
15579 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15580 Unify with other clean targets.
15581
dc3f8883
DJ
155822004-02-29 Daniel Jacobowitz <drow@mvista.com>
15583
15584 * server.c (handle_v_cont): Call set_desired_inferior.
15585
89a208da
DJ
155862004-02-29 Daniel Jacobowitz <drow@mvista.com>
15587
15588 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15589
62ea82f5
DJ
155902004-02-29 Daniel Jacobowitz <drow@mvista.com>
15591
15592 * linux-low.c (linux_wait): Unblock async I/O.
15593 (linux_resume): Block and enable async I/O.
15594 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15595 * server.h (block_async_io, unblock_async_io): Add prototypes.
15596
6910d122
DJ
155972004-02-29 Daniel Jacobowitz <drow@mvista.com>
15598
15599 * remote-utils.c (remote_open): Print a status notice after
15600 opening a TCP port.
15601 * server.c (attach_inferior): Print a status notice after
15602 attaching.
15603
156042004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15605
15606 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15607
c89dc5d4
DJ
156082004-02-26 Daniel Jacobowitz <drow@mvista.com>
15609
15610 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15611 error packet.
15612 * server.c, target.h: Update copyright years.
15613
4b8dad4a
RM
156142004-02-25 Roland McGrath <roland@redhat.com>
15615
15616 * target.h (struct target_ops): New member `read_auxv'.
15617 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15618 * linux-low.c (linux_read_auxv): New function.
15619 (linux_target_ops): Initialize `read_auxv' member to that.
15620
d7446758
JB
156212004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15622
15623 Committed by Jim Blandy <jimb@redhat.com>.
15624
15625 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15626 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15627 instead of GPR_SIZE to distiguish s390 and s390x targets.
15628
5544ad89
DJ
156292004-01-31 Daniel Jacobowitz <drow@mvista.com>
15630
15631 * linux-low.c: Update copyright year.
15632 (check_removed_breakpoint): Clear pending_is_breakpoint.
15633 (linux_set_resume_request, linux_queue_one_thread)
15634 (resume_status_pending_p): New functions.
15635 (linux_continue_one_thread): Use process->resume.
15636 (linux_resume): Only resume threads if there are no pending events.
15637 * linux-low.h (struct process_info): Add resume request
15638 pointer.
15639
2a68b70e
DJ
156402004-01-30 Daniel Jacobowitz <drow@mvista.com>
15641
15642 * regcache.c (new_register_cache): Clear the allocated register
15643 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15644
64386c31
DJ
156452003-10-13 Daniel Jacobowitz <drow@mvista.com>
15646
15647 * linux-low.c (linux_resume): Take a struct thread_resume *
15648 argument.
15649 (linux_wait): Update call.
15650 (resume_ptr): New static variable.
15651 (linux_continue_one_thread): Renamed from
15652 linux_continue_one_process. Use resume_ptr.
15653 (linux_resume): Use linux_continue_one_thread.
15654 * server.c (handle_v_cont, handle_v_requests): New functions.
15655 (myresume): New function.
15656 (main): Handle 'v' case.
15657 * target.h (struct thread_resume): New type.
15658 (struct target_ops): Change argument of "resume" to struct
15659 thread_resume *.
15660 (myresume): Delete macro.
15661
c938e9b0
L
156622003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15663
15664 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15665 (uninstall): Support DESTDIR.
15666
7f313d07
BC
15667Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15668
15669 * configure.srv: Add xscale*linux copy of arm*linux entry.
15670
3b2fc2ea
DJ
156712003-07-24 Daniel Jacobowitz <drow@mvista.com>
15672
15673 * linux-arm-low.c (arm_reinsert_addr): New function.
15674 (the_low_target): Add arm_reinsert_addr.
15675
1c0a559e
MK
156762003-07-08 Mark Kettenis <kettenis@gnu.org>
15677
15678 * mem-break.c: Remove whitespace at end of file.
15679
43d5792c
DJ
156802003-06-28 Daniel Jacobowitz <drow@mvista.com>
15681
15682 * configure.in: Check whether we need to prototype strerror.
15683 * server.h: Optionally prototype strerror.
15684 * gdbreplay.c (perror_with_name): Use strerror.
15685 * linux-low.c (linux_attach_lwp): Use strerror.
15686 * utils.c (perror_with_name): Use strerror.
15687 * config.in, configure: Regenerated.
15688
c8a86edf
DJ
156892003-06-28 Daniel Jacobowitz <drow@mvista.com>
15690
15691 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15692 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15693
73d37363
DJ
156942003-06-20 Daniel Jacobowitz <drow@mvista.com>
15695
15696 * Makefile.in (SFILES): Update.
15697 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15698 low-sun3.c: Remove files.
15699
6ad8ae5c
DJ
157002003-06-17 Daniel Jacobowitz <drow@mvista.com>
15701
15702 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15703 (linux_detach_one_process, linux_detach): New functions.
15704 (linux_target_ops): Add linux_detach.
15705 * server.c (main): Handle 'D' packet.
15706 * target.h (struct target_ops): Add "detach" member.
15707 (detach_inferior): Define.
15708
1581182a
MK
157092003-06-13 Mark Kettenis <kettenis@gnu.org>
15710
15711 From Kelley Cook <kelleycook@wideopenwest.com>:
15712 * configure.srv: Accept i[34567]86 variants.
15713
e5379b03
DJ
157142003-06-05 Daniel Jacobowitz <drow@mvista.com>
15715
15716 * linux-low.c (linux_wait_for_event): Correct comment typos.
15717 (linux_resume_one_process): Call check_removed_breakpoint.
15718 (linux_send_signal): New function.
15719 (linux_target_ops): Add linux_send_signal.
15720 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15721 of kill.
15722 * target.h (struct target_ops): Add send_signal.
15723
2ff29de4
JB
157242003-05-29 Jim Blandy <jimb@redhat.com>
15725
15726 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15727 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15728 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15729 away part of the register's value.
15730
254787d4
DJ
157312003-03-26 Daniel Jacobowitz <drow@mvista.com>
15732
15733 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15734 (linux_wait_for_event, linux_init_signals): Likewise.
15735
94e10508
DJ
157362003-03-17 Daniel Jacobowitz <drow@mvista.com>
15737
15738 * configure.in: Check for stdlib.h.
15739 * configure: Regenerated.
15740 * config.in: Regenerated.
15741
4c0711e0
DJ
157422003-01-04 Andreas Schwab <schwab@suse.de>
15743
15744 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15745
ef66e766
AC
157462003-01-02 Andrew Cagney <ac131313@redhat.com>
15747
15748 * Makefile.in: Remove obsolete code.
15749
a1358604
DJ
157502002-11-20 Daniel Jacobowitz <drow@mvista.com>
15751
15752 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15753 defined(PT_FPR0_HI).
15754
23ce3b1c
DJ
157552002-11-17 Stuart Hughes <seh@zee2.com>
15756
15757 * linux-arm-low.c (arm_num_regs): Increase.
15758 (arm_regmap): Include status register.
15759
157602002-11-17 Daniel Jacobowitz <drow@mvista.com>
15761
15762 * linux-low.c (register_addr): Remove incorrect -1 check.
15763
a9fa9f7d
DJ
157642002-08-29 Daniel Jacobowitz <drow@mvista.com>
15765
15766 * linux-low.c (linux_create_inferior): Call setpgid. Return
15767 the new PID.
15768 (unstopped_p, linux_signal_pid): Remove.
15769 (linux_target_ops): Remove linux_signal_pid.
15770 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15771 global instead of target method.
15772 * target.h (struct target_ops): Remove signal_pid. Update comment
15773 for create_inferior.
15774 * server.c (signal_pid): New variable.
15775 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15776 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15777 (attach_inferior): Set signal_pid.
15778
17574093
DJ
157792002-08-23 Daniel Jacobowitz <drow@mvista.com>
15780
15781 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15782
157832002-08-20 Jim Blandy <jimb@redhat.com>
15784
15785 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15786 default for this.
15787
157882002-08-01 Andrew Cagney <cagney@redhat.com>
15789
15790 * Makefile.in: Make chill references obsolete.
15791
157922002-07-24 Kevin Buettner <kevinb@redhat.com>
15793
15794 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15795 * configure: Regenerate.
15796 * config.in: Regenerate.
15797
157982002-07-09 David O'Brien <obrien@FreeBSD.org>
15799
15800 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15801 (perror_with_name, remote_close, remote_open, expect, play): Static.
15802
158032002-07-04 Michal Ludvig <mludvig@suse.cz>
15804
4b8dad4a 15805 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15806 byte offsets instead of an array of indexes.
15807 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15808
158092002-06-13 Daniel Jacobowitz <drow@mvista.com>
15810
15811 * regcache.c: Add comment.
15812
158132002-06-11 Daniel Jacobowitz <drow@mvista.com>
15814
15815 * thread-db.c: New file.
15816 * proc-service.c: New file.
15817 * acinclude.m4: New file.
15818 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15819 proc-service.o, and thread-db.o.
15820 (linux-low.o): Add USE_THREAD_DB.
15821 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15822 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15823 * aclocal.m4: Regenerated.
15824 * config.in: Regenerated.
15825 * configure: Regenerated.
15826 * configure.in: Check for proc_service.h, sys/procfs.h,
15827 thread_db.h, and linux/elf.h headrs.
15828 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15829 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15830 Check for -lthread_db and thread support.
15831 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15832 PowerPC, and SuperH.
15833 * i387-fp.c: Constify arguments.
15834 * i387-fp.h: Likewise.
15835 * inferiors.c: (struct thread_info): Renamed from
15836 `struct inferior_info'. Remove PID member. Use generic inferior
15837 list header. All uses updated.
15838 (inferiors, signal_pid): Removed.
15839 (all_threads): New variable.
15840 (get_thread): Define.
15841 (add_inferior_to_list): New function.
15842 (for_each_inferior): New function.
15843 (change_inferior_id): New function.
15844 (add_inferior): Removed.
15845 (remove_inferior): New function.
15846 (add_thread): New function.
15847 (free_one_thread): New function.
15848 (remove_thread): New function.
15849 (clear_inferiors): Use for_each_inferior and free_one_thread.
15850 (find_inferior): New function.
15851 (find_inferior_id): New function.
15852 (inferior_target_data): Update argument type.
15853 (set_inferior_target_data): Likewise.
15854 (inferior_regcache_data): Likewise.
15855 (set_inferior_regcache_data): Likewise.
15856 * linux-low.c (linux_bp_reinsert): Remove.
15857 (all_processes, stopping_threads, using_thrads)
15858 (struct pending_signals, debug_threads, pid_of): New.
15859 (inferior_pid): Replace with macro.
15860 (struct inferior_linux_data): Remove.
15861 (get_stop_pc, add_process): New functions.
15862 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15863 Use add_process and add_thread.
15864 (linux_attach_lwp): New function, based on old linux_attach. Use
15865 add_process and add_thread. Set stop_expected for new threads.
15866 (linux_attach): New function.
15867 (linux_kill_one_process): New function.
15868 (linux_kill): Kill all LWPs.
15869 (linux_thread_alive): Use find_inferior_id.
15870 (check_removed_breakpoints, status_pending_p): New functions.
15871 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15872 Update. Use WNOHANG. Wait for cloned processes also. Update process
15873 struct for the found process.
15874 (linux_wait_for_event): New function.
15875 (linux_wait): Use it. Support LWPs.
15876 (send_sigstop, wait_for_sigstop, stop_all_processes)
15877 (linux_resume_one_process, linux_continue_one_process): New functions.
15878 (linux_resume): Support LWPs.
15879 (REGISTER_RAW_SIZE): Remove.
15880 (fetch_register): Use register_size instead. Call supply_register.
15881 (usr_store_inferior_registers): Likewise. Call collect_register.
15882 Fix recursive case.
15883 (regsets_fetch_inferior_registers): Improve error message.
15884 (regsets_store_inferior_registers): Add debugging.
15885 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15886 (unstopped_p, linux_signal_pid): New functions.
15887 (linux_target_ops): Add linux_signal_pid.
15888 (linux_init_signals): New function.
15889 (initialize_low): Call it. Initialize using_threads.
15890 * regcache.c (inferior_regcache_data): Add valid
15891 flag.
15892 (get_regcache): Fetch registers lazily. Add fetch argument
15893 and update all callers.
15894 (regcache_invalidate_one, regcache_invalidate): New
15895 functions.
15896 (new_register_cache): Renamed from create_register_cache.
15897 Return the new regcache.
15898 (free_register_cache): Change argument to a void *.
15899 (registers_to_string, registers_from_string): Call get_regcache
15900 with fetch flag set.
15901 (register_data): Make static. Pass fetch flag to get_regcache.
15902 (supply_register): Call get_regcache with fetch flag clear.
15903 (collect_register): Call get_regcache with fetch flag set.
15904 (collect_register_as_string): New function.
15905 * regcache.h: Update.
15906 * remote-utils.c (putpkt): Flush after debug output and use
15907 stderr.
15908 Handle input interrupts while waiting for an ACK.
15909 (input_interrupt): Use signal_pid method.
15910 (getpkt): Flush after debug output and use stderr.
15911 (outreg): Use collect_register_as_string.
15912 (new_thread_notify, dead_thread_notify): New functions.
15913 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15914 and general_thread.
15915 (look_up_one_symbol): Flush after debug output.
15916 * server.c (step_thread, server_waiting): New variables.
15917 (start_inferior): Don't use signal_pid. Update call to mywait.
15918 (attach_inferior): Update call to mywait.
15919 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15920 (main): Don't fetch/store registers explicitly. Use
15921 set_desired_inferior. Support proposed ``Hs'' packet. Update
15922 calls to mywait.
15923 * server.h: Update.
15924 (struct inferior_list, struct_inferior_list_entry): New.
15925 * target.c (set_desired_inferior): New.
15926 (write_inferior_memory): Constify.
15927 (mywait): New function.
15928 * target.h: Update.
15929 (struct target_ops): New signal_pid method.
15930 (mywait): Removed macro, added prototype.
15931
15932 * linux-low.h (regset_func): Removed.
15933 (regset_fill_func, regset_store_func): New.
15934 (enum regset_type): New.
15935 (struct regset_info): Add type field. Use new operation types.
15936 (struct linux_target_ops): stop_pc renamed to get_pc.
15937 Add decr_pc_after_break and breakpoint_at.
15938 (get_process, get_thread_proess, get_process_thread)
15939 (strut process_info, all_processes, linux_attach_lwp)
15940 (thread_db_init): New.
15941
15942 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15943 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15944 (the_low_target): Add new members.
15945 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15946 (i386_store_fpxregset): Constify.
15947 (target_regsets): Add new kind identifier.
15948 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15949 (i386_set_pc): Add debugging.
15950 (i386_breakpoint_at): New function.
15951 (the_low_target): Add new members.
15952 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15953 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15954 (mips_breakpoint_at): New.
15955 (the_low_target): Add new members.
15956 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15957 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15958 (the_low_target): Add new members.
15959 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15960 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15961 (the_low_target): Add new members.
15962 * linux-x86-64-low.c (target_regsets): Add new kind
15963 identifier.
15964
159652002-05-15 Daniel Jacobowitz <drow@mvista.com>
15966
15967 From Martin Pool <mbp@samba.org>:
15968 * server.c (gdbserver_usage): New function.
15969 (main): Call it.
15970
159712002-05-14 Daniel Jacobowitz <drow@mvista.com>
15972
15973 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15974 stop_at -> stop_pc.
15975
159762002-05-04 Andrew Cagney <ac131313@redhat.com>
15977
15978 * Makefile.in: Remove obsolete code.
15979
159802002-04-24 Michal Ludvig <mludvig@suse.cz>
15981
15982 * linux-low.c (regsets_fetch_inferior_registers),
15983 (regsets_store_inferior_registers): Removed cast to int from
15984 ptrace() calls.
15985 * regcache.h: Added declaration of struct inferior_info.
15986
159872002-04-20 Daniel Jacobowitz <drow@mvista.com>
15988
15989 * inferiors.c (struct inferior_info): Add regcache_data.
15990 (add_inferior): Call create_register_cache.
15991 (clear_inferiors): Call free_register_cache.
15992 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15993 * regcache.c (struct inferior_regcache_data): New.
15994 (registers): Remove.
15995 (get_regcache): New function.
15996 (create_register_cache, free_register_cache): New functions.
15997 (set_register_cache): Don't initialize the register cache here.
15998 (registers_to_string, registers_from_string, register_data): Call
15999 get_regcache.
16000 * regcache.h: Add prototypes.
16001 * server.h: Likewise.
16002
160032002-04-20 Daniel Jacobowitz <drow@mvista.com>
16004
16005 * mem-break.c: New file.
16006 * mem-break.h: New file.
16007 * Makefile.in: Add mem-break.o rule; update server.h
16008 dependencies.
16009 * inferiors.c (struct inferior_info): Add target_data
16010 member.
16011 (clear_inferiors): Free target_data member if set.
16012 (inferior_target_data, set_inferior_target_data): New functions.
16013 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16014 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16015 * linux-low.c (linux_bp_reinsert): New variable.
16016 (struct inferior_linux_data): New.
16017 (linux_create_inferior): Use set_inferior_target_data.
16018 (linux_attach): Likewise. Call add_inferior.
16019 (linux_wait_for_one_inferior): New function.
16020 (linux_wait): Call it.
16021 (linux_write_memory): Add const.
16022 (initialize_low): Call set_breakpoint_data.
16023 * linux-low.h (struct linux_target_ops): Add breakpoint
16024 handling members.
16025 * server.c (attach_inferior): Remove extra add_inferior
16026 call.
16027 * server.h: Include mem-break.h. Update inferior.c
16028 prototypes.
16029 * target.c (read_inferior_memory)
16030 (write_inferior_memory): New functions.
16031 * target.h (read_inferior_memory)
16032 (write_inferior_memory): Change macros to prototypes.
16033 (struct target_ops): Update comments. Add const to write_memory
16034 definition.
16035
160362002-04-11 Daniel Jacobowitz <drow@mvista.com>
16037
16038 * linux-low.c (usr_store_inferior_registers): Support
16039 registers which are allowed to fail to store.
16040 * linux-low.h (linux_target_ops): Likewise.
16041 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16042 (ppc_cannot_store_register): FPSCR may not be storable.
16043
160442002-04-09 Daniel Jacobowitz <drow@mvista.com>
16045
16046 * server.h: Include <string.h> if HAVE_STRING_H.
16047 * ChangeLog: Correct paths in last ChangeLog entry.
16048
160492002-04-09 Daniel Jacobowitz <drow@mvista.com>
16050
16051 * linux-low.h: Remove obsolete prototypes.
16052 (struct linux_target_ops): New.
16053 (extern the_low_target): New.
16054 * linux-low.c (num_regs, regmap): Remove declarations.
16055 (register_addr): Use the_low_target explicitly.
16056 (fetch_register): Likewise.
16057 (usr_fetch_inferior_registers): Likewise.
16058 (usr_store_inferior_registers): Likewise.
16059 * linux-arm-low.c (num_regs): Remove.
16060 (arm_num_regs): Define.
16061 (arm_regmap): Renamed from regmap, made static.
16062 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16063 made static.
16064 (arm_cannot_store_register): Renamed from cannot_store_register,
16065 made static.
16066 (the_low_target): New.
16067 * linux-i386-low.c (num_regs): Remove.
16068 (i386_num_regs): Define.
16069 (i386_regmap): Renamed from regmap, made static.
16070 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16071 made static.
16072 (i386_cannot_store_register): Renamed from cannot_store_register,
16073 made static.
16074 (the_low_target): New.
16075 * linux-ia64-low.c (num_regs): Remove.
16076 (ia64_num_regs): Define.
16077 (ia64_regmap): Renamed from regmap, made static.
16078 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16079 made static.
16080 (ia64_cannot_store_register): Renamed from cannot_store_register,
16081 made static.
16082 (the_low_target): New.
16083 * linux-m68k-low.c (num_regs): Remove.
16084 (m68k_num_regs): Define.
16085 (m68k_regmap): Renamed from regmap, made static.
16086 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16087 made static.
16088 (m68k_cannot_store_register): Renamed from cannot_store_register,
16089 made static.
16090 (the_low_target): New.
16091 * linux-mips-low.c (num_regs): Remove.
16092 (mips_num_regs): Define.
16093 (mips_regmap): Renamed from regmap, made static.
16094 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16095 made static.
16096 (mips_cannot_store_register): Renamed from cannot_store_register,
16097 made static.
16098 (the_low_target): New.
16099 * linux-ppc-low.c (num_regs): Remove.
16100 (ppc_num_regs): Define.
16101 (ppc_regmap): Renamed from regmap, made static.
16102 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16103 made static.
16104 (ppc_cannot_store_register): Renamed from cannot_store_register,
16105 made static.
16106 (the_low_target): New.
16107 * linux-s390-low.c (num_regs): Remove.
16108 (s390_num_regs): Define.
16109 (s390_regmap): Renamed from regmap, made static.
16110 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16111 made static.
16112 (s390_cannot_store_register): Renamed from cannot_store_register,
16113 made static.
16114 (the_low_target): New.
16115 * linux-sh-low.c (num_regs): Remove.
16116 (sh_num_regs): Define.
16117 (sh_regmap): Renamed from regmap, made static.
16118 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16119 made static.
16120 (sh_cannot_store_register): Renamed from cannot_store_register,
16121 made static.
16122 (the_low_target): New.
16123 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16124 (the_low_target): New.
16125
161262002-04-09 Daniel Jacobowitz <drow@mvista.com>
16127
16128 * Makefile.in: Add stamp-h target.
16129 * configure.in: Create stamp-h.
16130 * configure: Regenerated.
16131
161322002-04-09 Daniel Jacobowitz <drow@mvista.com>
16133
16134 * inferiors.c: New file.
16135 * target.c: New file.
16136 * target.h: New file.
16137 * Makefile.in: Add target.o and inferiors.o. Update
16138 dependencies.
16139 * linux-low.c (inferior_pid): New static variable,
16140 moved from server.c.
16141 (linux_create_inferior): Renamed from create_inferior.
16142 Call add_inferior. Return 0 on success instead of a PID.
16143 (linux_attach): Renamed from myattach.
16144 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16145 (linux_thread_alive): Renamed from mythread_alive.
16146 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16147 child dies.
16148 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16149 (regsets_store_inferior_registers): Correct error message.
16150 Add missing ``return 0''.
16151 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16152 (linux_store_registers): Renamed from store_inferior_registers.
16153 (linux_read_memory): Renamed from read_inferior_memory.
16154 (linux_write_memory): Renamed from write_inferior_memory.
16155 (linux_target_ops): New structure.
16156 (initialize_low): Call set_target_ops ().
16157 * remote-utils.c (unhexify): New function.
16158 (hexify): New function.
16159 (input_interrupt): Send signals to ``signal_pid''.
16160 * server.c (inferior_pid): Remove.
16161 (start_inferior): Update create_inferior call.
16162 (attach_inferior): Call add_inferior.
16163 (handle_query): New function.
16164 (main): Call handle_query for `q' packets.
16165 * server.h: Include "target.h". Remove obsolete prototypes.
16166 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16167
161682002-04-09 Daniel Jacobowitz <drow@mvista.com>
16169
16170 * Makefile.in: Add WARN_CFLAGS. Update configury
16171 dependencies.
16172 * configure.in: Check for <string.h>
16173 * configure: Regenerate.
16174 * config.in: Regenerate.
16175 * gdbreplay.c: Include needed system headers.
16176 (remote_open): Remove strchr prototype.
16177 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16178 * regcache.c (supply_register): Change buf argument to const void *.
16179 (supply_register_by_name): Likewise.
16180 (collect_register): Change buf argument to void *.
16181 (collect_register_by_name): Likewise.
16182 * regcache.h: Add missing prototypes.
16183 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16184 * server.c (handle_query): New function.
16185 (attached): New static variable, moved out of main.
16186 (main): Quiet longjmp clobber warnings.
16187 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16188 * utils.c (error): Remove NORETURN.
16189 (fatal): Likewise.