]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
linux-nat: Remove unnecessary xstrdup
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
f517c180
EA
12018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2
3 PR gdb/21559
4 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5 checking for fs_base/gs_base fields in struct user_regs_struct.
6 * configure: Regenerate.
7
9a70f35c
YQ
82018-01-16 Yao Qi <yao.qi@linaro.org>
9
10 PR gdb/18749
11 * linux-low.c (fetch_register): Call supply_register instead of
12 error.
13
605fd3c6
YQ
142018-01-08 Yao Qi <yao.qi@linaro.org>
15 Simon Marchi <simon.marchi@ericsson.com>
16
17 * Makefile.in (OBS): Remove selftest.o.
18 * configure.ac: Set srv_selftest_objs if $development is true.
19 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
20 * configure: Re-generated.
21 * server.c (captured_main): Wrap variable selftest_filter with
22 GDB_SELF_TEST.
23
2cc05030
SM
242018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
25
26 * server.c (parse_debug_format_options): Return std::string.
27 (handle_monitor_command, captured_main): Adjust.
28
e379cee6
PA
292018-01-05 Pedro Alves <palves@redhat.com>
30
31 PR gdb/18653
32 * server.c (captured_main): Pass quiet=false to
33 save_original_signals_state.
34
82e1e79a
JB
352018-01-01 Joel Brobecker <brobecker@adacore.com>
36
37 * gdbreplay.c (gdbreplay_version): Update copyright year in
38 version message.
39 * server.c (gdbserver_version): Likewise.
40
8e481c3b
TT
412017-12-08 Tom Tromey <tom@tromey.com>
42
43 * ax.c (ax_printf): Update.
44
a8806230
YQ
452017-12-07 Yao Qi <yao.qi@linaro.org>
46
47 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
48 aarch64_linux_read_description.
49 * linux-amd64-ipa.c (idx2mask): New array.
50 (get_ipa_tdesc): Move idx2mask out.
51 (initialize_low_tracepoint): Initialize target descriptions.
52 * linux-i386-ipa.c (idx2mask): New array.
53 (get_ipa_tdesc): Move idx2mask out.
54 (initialize_low_tracepoint): Initialize target descriptions.
55
d4a0e8b5
SM
562017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
57
58 * tdesc.c (struct tdesc_type): Change return type.
59 (tdesc_add_flag): Change parameter type.
60 (tdesc_add_bitfield): Likewise.
61 (tdesc_add_field): Likewise.
62 (tdesc_set_struct_size): Likewise.
63
798a7429
SM
642017-12-05 Simon Marchi <simon.marchi@ericsson.com>
65
66 * regcache.c (registers_to_string): Remove unused variable.
67
c0e15c9b
SM
682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
69
70 * inferiors.c (for_each_inferior_with_data): Remove.
71 * inferiors.h (for_each_inferior_with_data): Remove.
72 * server.c (handle_qxfer_threads_worker): Change parameter type.
73 (handle_qxfer_threads_proper): Use for_each_thread.
74
f0045347
SM
752017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
76
77 * inferiors.c (for_each_inferior): Remove.
78 (clear_inferiors): Use for_each_thread.
79 * inferiors.h (for_each_inferior): Remove.
80 * linux-low.c (linux_wait_for_event_filtered): Use
81 for_each_thread.
82 (linux_stabilize_threads): Likewise.
83 * regcache.c (regcache_release): Likewise.
84 * server.c (gdb_wants_all_threads_stopped): Likewise.
85 (clear_pending_status_callback): Remove.
86 (handle_status): Use for_each_thread.
87 (captured_main): Likewise.
88 * win32-low.c (child_init_thread_list): Likewise.
89 (win32_clear_inferiors): Likewise.
90 (fake_breakpoint_event): Likewise.
91
9521758b
SM
922017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
93
94 * inferiors.h (find_inferior): Remove.
95 * inferiors.c (find_inferior): Remove.
96
8f86d7aa
SM
972017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
98
99 * linux-low.c (resume_status_pending_p): Update comment.
100 (need_step_over_p): Update comment.
101
e2b44075
SM
1022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
103
104 * linux-low.c (proceed_one_lwp): Return void, change parameter
105 type.
106 (unsuspend_and_proceed_one_lwp): Likewise.
107 (proceed_all_lwps): Use for_each_thread.
108 (unstop_all_lwps): Likewise.
109
c80825ff
SM
1102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
111
112 * linux-low.c (linux_resume_one_thread): Return void, take
113 parameter directly.
114 (linux_resume): Use for_each_thread.
115
df3e4dbe
SM
1162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
117
118 * linux-low.c (send_sigstop_callback): Return void, change
119 parameter type. Rename to...
120 (send_sigstop): ... this.
121 (suspend_and_send_sigstop_callback): Return void, change parameter
122 type. Rename to...
123 (suspend_and_send_sigstop): ... this.
124 (stop_all_lwps): Use for_each_thread.
125
5a6b0a41
SM
1262017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
127
128 * linux-low.c (lwp_running): Return bool, remove unused
129 argument.
130 (linux_stabilize_threads): Use find_thread.
131
39a64da5
SM
1322017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
133
134 * linux-low.c (select_singlestep_lwp_callback): Remove.
135 (count_events_callback): Remove.
136 (select_event_lwp_callback): Remove.
137 (select_event_lwp): Use find_thread/for_each_thread.
138
a1385b7b
SM
1392017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
140
141 * linux-low.c (not_stopped_callback): Return bool, take filter
142 argument directly.
143 (linux_wait_for_event_filtered): Use find_thread.
144 (linux_wait_1): Likewise.
145
454296a2
SM
1462017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
147
148 * linux-low.c (same_lwp): Remove.
149 (find_lwp_pid): Use find_thread.
150
6b2a85da
SM
1512017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
152
153 * linux-low.c (delete_lwp_callback): Remove.
154 (linux_mourn): Use for_each_thread.
155
798a38e8
SM
1562017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
157
158 * linux-low.c (linux_detach_lwp_callback): Return void, remove
159 args parameter, don't check for pid.
160 (linux_detach): Use for_each_thread.
161
e4eb0dec
SM
1622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
163
164 * linux-low.c (struct counter): Remove.
165 (second_thread_of_pid_p): Remove.
166 (last_thread_of_process_p): Use find_thread.
167
83e1b6c1
SM
1682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
169
170 * inferiors.c (find_inferior_in_random): Remove.
171 * inferiors.h (find_inferior_in_random): Remove.
172 * linux-low.c (status_pending_p_callback): Return bool, accept
173 parameter ptid directly.
174 (linux_wait_for_event_filtered): Use find_thread_in_random.
175 (linux_wait_1): Likewise.
176
8dc7b443
SM
1772017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
178
179 * inferiors.c (find_inferior_id): Remove.
180 (find_thread_ptid): Move implemention from find_inferior_id to
181 here.
182 * inferiors.h (find_inferior_id): Remove.
183 * server.c (handle_status): Use find_thread_ptid.
184 (process_serial_event): Likewise.
185 * thread-db.c (find_one_thread): Likewise.
186 (thread_db_thread_handle): Likewise.
187 * win32-low.c (thread_rec): Likewise.
188 (child_delete_thread): Likewise.
189 (win32_thread_alive): Likewise.
190 (get_child_debug_event): Likewise.
191
da25033c
SM
1922017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
193
194 * linux-mips-low.c (update_watch_registers_callback): Return
195 void, remove pid_p parameter, don't check for pid.
196 (mips_insert_point, mips_remove_point): Use for_each_thread.
197
c91bb56b
SM
1982017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
199
200 * lynx.low (lynx_delete_thread_callback): Remove.
201 (lynx_mourn): Use for_each_thread.
202
634a3254
SM
2032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
204
205 * regcache.c (regcache_invalidate_one): Remove.
206 (regcache_invalidate_pid): use for_each_thread.
207
41272101
TT
2082017-11-26 Tom Tromey <tom@tromey.com>
209
210 * linux-low.c (linux_create_inferior): Update.
211
f5291a6f
UW
2122017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
213
214 * spu-low.c (spu_create_inferior): Fix typo in argument name.
215
6654d750
AH
2162017-11-24 Alan Hayward <alan.hayward@arm.com>
217
218 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
219 * linux-aarch64-low.c (initialize_low_arch): Call init func.
220 * linux-aarch64-tdesc-selftest.c: New file.
221 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
222
2232017-11-24 Alan Hayward <alan.hayward@arm.com>
224
225 * configure.srv: Add new file.
226 * linux-aarch64-low.c (initialize_low_arch): Call init func.
227 * linux-aarch64-tdesc-selftest.c: New file.
228 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
229
49bdb7ee
AH
2302017-11-24 Alan Hayward <alan.hayward@arm.com>
231
232 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
233 * linux-aarch64-low.c (initialize_low_arch): Remove init.
234 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
235
d6d7ce56
AH
2362017-11-24 Alan Hayward <alan.hayward@arm.com>
237
238 * configure.srv: Add new files.
239 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
240 aarch64_linux_read_description.
241 * linux-aarch64-low.c (aarch64_linux_read_description):
242 Merge with aarch64_arch_setup.
243 (aarch64_arch_setup): Call aarch64_linux_read_description.
244 * linux-aarch64-tdesc.c: New file.
245 * linux-aarch64-tdesc.h: New file.
246
506fe5f4
YQ
2472017-11-24 Yao Qi <yao.qi@linaro.org>
248
249 * configure.srv: Set $srv_regobj for tic6x-linux.
250 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
251 (tic6x_read_description): Move some code to tic6x_arch_setup.
252 (tic6x_tdesc_test): New function.
253 (initialize_low_arch): Call selftests::register_test.
254
29f9a567
YQ
2552017-11-22 Yao Qi <yao.qi@linaro.org>
256
257 * remote-utils.c (prepare_resume_reply): Use memcpy.
258
578290ec
SM
2592017-11-19 Simon Marchi <simon.marchi@ericsson.com>
260
261 * linux-low.c (kill_one_lwp_callback): Return void, take
262 argument directly, don't filter on pid.
263 (linux_kill): Use for_each_thread.
264
eca55aec
SM
2652017-11-19 Simon Marchi <simon.marchi@ericsson.com>
266
267 * linux-low.c (need_step_over_p): Return bool, remove dummy
268 argument.
269 (linux_resume, proceed_all_lwps): Use find_thread.
270
25c28b4d
SM
2712017-11-19 Simon Marchi <simon.marchi@ericsson.com>
272
273 * linux-low.c (resume_status_pending_p): Return bool, remove
274 flag_p argument.
275 (linux_resume): Use find_thread.
276
5fdda392
SM
2772017-11-19 Simon Marchi <simon.marchi@ericsson.com>
278
279 * linux-low.c (struct thread_resume_array): Remove.
280 (linux_set_resume_request): Return void, take arguments
281 directly.
282 (linux_resume): Use for_each_thread.
283
fcb056a5
SM
2842017-11-19 Simon Marchi <simon.marchi@ericsson.com>
285
286 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
287 return bool, remove data argument.
288 (linux_stabilize_threads): Use find_thread.
289
139720c5
SM
2902017-11-19 Simon Marchi <simon.marchi@ericsson.com>
291
292 * linux-low.c (unsuspend_one_lwp): Remove.
293 (unsuspend_all_lwps): Use for_each_thread, inline code from
294 unsuspend_one_lwp.
295
6d1e5673
SM
2962017-11-19 Simon Marchi <simon.marchi@ericsson.com>
297
298 * gdbthread.h (find_thread): Add overload with ptid_t filter.
299 * linux-low.c (struct iterate_over_lwps_args): Remove.
300 (iterate_over_lwps_filter): Remove.
301 (iterate_over_lwps): Use find_thread.
302
bbf550d5
SM
3032017-11-19 Simon Marchi <simon.marchi@ericsson.com>
304
305 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
306 (linux_handle_new_gdb_connection): Use for_each_thread, inline
307 code from reset_lwp_ptrace_options_callback.
308
00192f77
SM
3092017-11-19 Simon Marchi <simon.marchi@ericsson.com>
310
311 * linux-arm-low.c (struct update_registers_data): Remove.
312 (update_registers_callback): Return void, take arguments
313 directly, don't check thread's pid.
314 (arm_insert_point, arm_remove_point): Use for_each_thread.
315
2bee2b6c
SM
3162017-11-19 Simon Marchi <simon.marchi@ericsson.com>
317
318 * win32-low.c (continue_one_thread): Return void, take argument
319 directly.
320 (child_continue): Use for_each_thread.
321
0b360f19
SM
3222017-11-19 Simon Marchi <simon.marchi@ericsson.com>
323
324 * win32-i386-low.c (update_debug_registers_callback): Rename
325 to ...
326 (update_debug_registers): ... this, return void, remove pid_p arg.
327 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
328
f27866ba
SM
3292017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
330
331 * inferiors.h (struct process_info): Add constructor, initialize
332 fields..
333 <syscalls_to_catch>: Change type to std::vector<int>.
334 * inferiors.c (add_process): Allocate process_info with new.
335 (remove_process): Free process_info with delete.
336 * linux-low.c (handle_extended_wait): Adjust.
337 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
338 * server.c (handle_general_set): Adjust.
339
e849ea89
PA
3402017-11-16 Pedro Alves <palves@redhat.com>
341
342 * remote-utils.c (remote_close): Block SIGIO signals instead of
343 uninstalling the SIGIO handler.
344
1d0aa65c
AH
3452017-11-16 Alan Hayward <alan.hayward@arm.com>
346
347 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
348
3491a34c
YQ
3492017-11-16 Yao Qi <yao.qi@linaro.org>
350
351 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
352 (tic6x_store_gregset): Likewise.
353 (tic6x_usrregs_info): Move it up.
354
a602f924
AH
3552017-11-15 Alan Hayward <alan.hayward@arm.com>
356
357 * Makefile.in: Update arch rules.
358 * configure.srv: Explicitly mark arch/ files.
359
5616b6c3
AS
3602017-11-13 Andreas Schwab <schwab@suse.de>
361
362 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
363 function.
364 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
365
d1928160
PA
3662017-11-06 Pedro Alves <palves@redhat.com>
367
368 * config.in, configure: Regenerate.
369
bac608e7
SM
3702017-10-27 Simon Marchi <simon.marchi@ericsson.com>
371
372 * target.c (struct thread_search): Remove.
373 (thread_search_callback): Remove.
374 (prepare_to_access_memory): Use for_each_thread instead of
375 find_inferior. Inline code from thread_search_callback.
376
eaddb425
SM
3772017-10-27 Simon Marchi <simon.marchi@ericsson.com>
378
379 * server.c (struct visit_actioned_threads_data): Remove.
380 (visit_actioned_threads): Change prototype to take arguments
381 directly.
382 (resume): Use find_thread instead of find_inferior.
383
99078d34
SM
3842017-10-27 Simon Marchi <simon.marchi@ericsson.com>
385
386 * server.c (queue_stop_reply_callback): Change prototype, return
387 void.
388 (find_status_pending_thread_callback): Remove.
389 (handle_status): Replace find_inferior with find_thread and
390 for_each_thread.
391
cc628f3d
AH
3922017-10-25 Alan Hayward <alan.hayward@arm.com>
393
394 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
395 with REGNO.
396 (aarch64_store_gregset): Likewise.
397 (aarch64_fill_fpregset): Likewise.
398 (aarch64_store_fpregset): Likewise.
399
4d3bb80e
SM
4002017-10-21 Simon Marchi <simon.marchi@ericsson.com>
401
402 * gdbthread.h (find_thread, for_each_thread): New functions.
403 * inferiors.c (thread_of_pid): Remove.
404 (find_any_thread_of_pid): Use find_thread.
405 * linux-low.c (num_lwps): Use for_each_thread.
406
7a7cdfa0
YQ
4072017-10-17 Yao Qi <yao.qi@linaro.org>
408
409 * Makefile.in: Remove one rule.
410 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
411
e675d170
YQ
4122017-10-17 Yao Qi <yao.qi@linaro.org>
413
414 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
415 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
416
7eb4e0f9
YQ
4172017-10-17 Yao Qi <yao.qi@linaro.org>
418
419 * configure.srv: Rename arm.o with arch/arm.o.
420
60d6cfc9
YQ
4212017-10-17 Yao Qi <yao.qi@linaro.org>
422
423 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
424 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
425 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
426 (arch-i386.o, arch-amd64.o): Remove rules.
427 (arch/%.o): New rule.
428 Update POSTCOMPILE and COMPILE.pre.
429 * configure.ac: Invoke AC_CONFIG_COMMANDS.
430 * configure: Re-generated.
431 * configure.srv: Replace arch-i386.o with arch/i386.o.
432 Replace arch-amd64.o with arch/amd64.o.
433
5bfda255
YQ
4342017-10-16 Yao Qi <yao.qi@linaro.org>
435
436 * configure: Regenerated.
437
9c80ecd6
SM
4382017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
439
440 * inferiors.h: (struct inferior_list): Remove.
441 (struct inferior_list_entry); Remove.
442 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
443 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
444 get_first_inferior): Remove.
445 (for_each_inferior, for_each_inferior_with_data, find_inferior,
446 find_inferior_id, find_inferior_in_random): Change signature.
447 * inferiors.c (all_threads): Change type to
448 std::list<thread_info *>.
449 (get_thread): Remove macro.
450 (find_inferior, find_inferior_id): Change signature, implement
451 using find_thread.
452 (find_inferior_in_random): Change signature, implement using
453 find_thread_in_random.
454 (for_each_inferior, for_each_inferior_with_data): Change
455 signature, implement using for_each_thread.
456 (add_inferior_to_list, remove_inferior): Remove.
457 (add_thread, get_first_thread, thread_of_pid,
458 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
459 (get_first_inferior, one_inferior_p, clear_inferior_list):
460 Remove.
461 (clear_inferiors, get_thread_process): Update.
462 * gdbthread.h: Include <list>.
463 (struct thread_info) <entry>: Remove field.
464 <id>: New field.
465 (all_threads): Change type to std::list<thread_info *>.
466 (get_first_inferior): Add doc.
467 (find_thread, for_each_thread, find_thread_in_random): New
468 functions.
469 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
470 * linux-arm-low.c (update_registers_callback): Update.
471 * linux-low.c (second_thread_of_pid_p): Update.
472 (kill_one_lwp_callback, linux_detach_lwp_callback,
473 delete_lwp_callback, status_pending_p_callback, same_lwp,
474 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
475 iterate_over_lwps, not_stopped_callback,
476 resume_stopped_resumed_lwps, count_events_callback,
477 select_singlestep_lwp_callback, select_event_lwp_callback,
478 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
479 suspend_and_send_sigstop_callback, wait_for_sigstop,
480 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
481 lwp_running, linux_set_resume_request, resume_status_pending_p,
482 need_step_over_p, start_step_over, linux_resume_one_thread,
483 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
484 reset_lwp_ptrace_options_callback): Update.
485 * linux-mips-low.c (update_watch_registers_callback): Update.
486 * regcache.c (regcache_invalidate_one, regcache_invalidate):
487 Update.
488 (free_register_cache_thread_one): Remove.
489 (regcache_release): Update.
490 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
491 handle_qxfer_threads_worker): Update.
492 (handle_query): Update, use list iterator.
493 (visit_actioned_threads, handle_pending_status,
494 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
495 clear_pending_status_callback, set_pending_status_callback,
496 find_status_pending_thread_callback, handle_status,
497 process_serial_event): Update.
498 * target.c (thread_search_callback): Update.
499 * thread-db.c (thread_db_get_tls_address): Update.
500 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
501 Update.
502 * win32-i386-low.c (update_debug_registers_callback): Update.
503 * win32-low.c (delete_thread_info, child_delete_thread,
504 continue_one_thread, suspend_one_thread,
505 get_child_debug_event): Adjust.
506
9179355e
SM
5072017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
508
509 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
510 * inferiors.h: Include <list>.
511 (struct process_info) <entry>: Remove field.
512 <pid>: New field.
513 (pid_of): Change macro to function.
514 (ptid_of, lwpid_of): Remove macro.
515 (all_processes): Change type to std::list<process_info *>.
516 (ALL_PROCESSES): Remove macro.
517 (for_each_process, find_process): New function.
518 * inferiors.c (all_processes): Change type to
519 std::list<process_info *>.
520 (find_thread_process): Adjust.
521 (add_process): Likewise.
522 (remove_process): Likewise.
523 (find_process_pid): Likewise.
524 (get_first_process): Likewise.
525 (started_inferior_callback): Remove.
526 (have_started_inferiors_p): Adjust.
527 (attached_inferior_callback): Remove.
528 (have_attached_inferiors_p): Adjust.
529 * linux-low.c (check_zombie_leaders): Likewise.
530 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
531 (x86_linux_update_xmltarget): Adjust.
532 * server.c (handle_query): Likewise.
533 (gdb_reattached_process): Remove.
534 (handle_status): Adjust.
535 (kill_inferior_callback): Likewise.
536 (detach_or_kill_inferior): Remove.
537 (print_started_pid): Likewise.
538 (print_attached_pid): Likewise.
539 (detach_or_kill_for_exit): Update.
540 (process_serial_event): Likewise.
541 * linux-arm-low.c (arm_new_fork): Likewise.
542
c9cb8905
SM
5432017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
544
545 * dll.h: Include <list>.
546 (struct dll_info): Add constructor.
547 <entry>: Remove field.
548 (all_dlls): Change type to std::list<dll_info>.
549 * dll.c: Include <algorithm>.
550 (get_dll): Remove macro.
551 (all_dlls): Change type to std::list<dll_info *>.
552 (free_one_dll): Remove.
553 (match_dll): Likewise.
554 (loaded_dll): Adjust.
555 (unloaded_dll): Adjust to all_dlls type change, use
556 std::find_if. Inline code from match_dll.
557 (clear_dlls): Adjust to all_dlls type change.
558 * server.c (emit_dll_description): Remove.
559 (handle_qxfer_libraries): Adjust to all_dlls type change,
560 integrate emit_dll_description's functionality.
561
04ec7890
SM
5622017-10-12 Simon Marchi <simon.marchi@ericsson.com>
563
564 * linux-low.h (struct linux_target_ops) <delete_process>: New
565 field.
566 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
567 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
568 (struct linux_target_ops): Add delete_process callback.
569 * linux-arm-low.c (arm_delete_process): New.
570 (struct linux_target_ops): Add delete_process callback.
571 * linux-bfin-low.c (struct linux_target_ops): Likewise.
572 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
573 * linux-m32r-low.c (struct linux_target_ops): Likewise.
574 * linux-mips-low.c (mips_linux_delete_process): New.
575 (struct linux_target_ops): Add delete_process callback.
576 * linux-ppc-low.c (struct linux_target_ops): Likewise.
577 * linux-s390-low.c (struct linux_target_ops): Likewise.
578 * linux-sh-low.c (struct linux_target_ops): Likewise.
579 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
580 * linux-tile-low.c (struct linux_target_ops): Likewise.
581 * linux-x86-low.c (x86_linux_delete_process): New.
582 (struct linux_target_ops): Add delete_process callback.
583 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
584
466eecee
SM
5852017-10-12 Simon Marchi <simon.marchi@ericsson.com>
586
587 * linux-aarch64-low.c (the_low_target): Add thread delete
588 callback.
589 * linux-arm-low.c (arm_delete_thread): New function.
590 (the_low_target): Add thread delete callback.
591 * linux-bfin-low.c (the_low_target): Likewise.
592 * linux-crisv32-low.c (the_low_target): Likewise.
593 * linux-low.c (delete_lwp): Invoke delete_thread callback if
594 set.
595 * linux-low.h (struct linux_target_ops) <delete_thread>: New
596 field.
597 * linux-m32r-low.c (the_low_target): Add thread delete callback.
598 * linux-mips-low.c (mips_linux_delete_thread): New function.
599 (the_low_target): Add thread delete callback.
600 * linux-ppc-low.c (the_low_target): Likewise.
601 * linux-s390-low.c (the_low_target): Likewise.
602 * linux-sh-low.c (the_low_target): Likewise.
603 * linux-tic6x-low.c (the_low_target): Likewise.
604 * linux-tile-low.c (the_low_target): Likewise.
605 * linux-x86-low.c (the_low_target): Likewise.
606 * linux-xtensa-low.c (the_low_target): Likewise.
607
b79f7801
YZ
6082017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
609
610 * win32-low.c: Include "common-inferior.h".
611
bc3b087d
SDJ
6122017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
613
614 * inferiors.c (set_inferior_cwd): New function.
615 * server.c (handle_general_set): Handle QSetWorkingDir packet.
616 (handle_query): Inform that QSetWorkingDir is supported.
617 * win32-low.c (create_process): Pass the inferior's cwd to
618 CreateProcess.
619
d092c5a2
SDJ
6202017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
621
622 * inferiors.c (current_inferior_cwd): New global variable.
623 (get_inferior_cwd): New function.
624 * inferiors.h (struct process_info) <cwd>: New field.
625
7da0a886
SDJ
6262017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
627
628 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
629 (OBS): Add gdb_tilde_expand.o.
630
289a6840
SM
6312017-10-02 Simon Marchi <simon.marchi@ericsson.com>
632
633 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
634 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
635
256642e8
PA
6362017-09-29 Pedro Alves <palves@redhat.com>
637
638 * ax.c (gdb_parse_agent_expr): Constify.
639 * ax.h (gdb_parse_agent_expr): Constify.
640 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
641 Constify.
642 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
643 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
644 * remote-utils.h (read_ptid): Constify.
645 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
646 (process_point_options, process_serial_event): Constify.
647 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
648 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
649 (cmd_qtbuffer): Constify.
650
5b9ca4d4
PA
6512017-09-29 Pedro Alves <palves@redhat.com>
652
653 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
654 fails.
655
94c207e0
PA
6562017-09-29 Pedro Alves <palves@redhat.com>
657
658 * linux-low.c (handle_extended_wait): Pass parent thread instead
659 of process to thread_db_notice_clone.
660 * linux-low.h (thread_db_notice_clone): Replace parent process
661 parameter with parent thread parameter.
662 * thread-db.c (find_one_thread): Add comment.
663 (thread_db_notice_clone): Replace parent process parameter with
664 parent thread parameter. Temporarily switch to the parent thread.
665
75352e28
SDJ
6662017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
667
668 * gdbthread.h: Include "common-gdbthread.h".
669 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
670 "if" when validating the ptid.
671 * remote-utils.c: Include "gdbthread.h".
672 (prepare_resume_reply): Use "switch_to_thread".
673 * target.c (done_accessing_memory): Likewise.
674
ad339634
AA
6752017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
676
677 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
678 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
679 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
680 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
681 s390x-gs-linux64-ipa.o to ipa_obj.
682 * linux-s390-low.c (HWCAP_S390_GS): New define.
683 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
684 New functions.
685 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
686 (s390_arch_setup): Check for guarded-storage support and choose
687 appropriate tdesc.
688 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
689 init_registers_s390x_gs_linux64.
690 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
691 enum value.
692 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
693 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
694
cc4d742f
SM
6952017-09-22 Simon Marchi <simon.marchi@ericsson.com>
696
697 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
698
f6327dcb
KB
6992017-09-21 Kevin Buettner <kevinb@redhat.com>
700
701 * linux-low.h (struct lwp_info): Add new field, thread_handle.
702 (thread_db_thread_handle): Declare.
703 * linux-low.c (linux_target_ops): Initialize thread_handle.
704 * server.c (handle_qxfer_threads_worker): Add support for
705 "handle" attribute.
706 * target.h (struct target_ops): Add new function pointer,
707 thread_handle.
708 (target_thread_handle): Define.
709 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
710 field in lwp.
711 (thread_db_thread_handle): New function.
712
86299109
KB
7132017-09-21 Kevin Buettner <kevinb@redhat.com>
714
715 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
716 * linux-low.h (thread_db_notice_clone): Declare.
717 * thread-db.c (thread_db_notice_clone): New function.
718
f557a88a
PA
7192017-09-21 Pedro Alves <palves@redhat.com>
720
721 * server.c (gdb_read_memory, handle_status, process_serial_event)
722 (handle_serial_event, handle_target_event): Adjust to
723 set_desired_thread prototype change.
724 * target.c (set_desired_thread): Remove 'use_general' parameter
725 and adjust.
726 * target.h (set_desired_thread): Remove 'use_general' parameter.
727
223ffa71
TT
7282017-09-20 Tom Tromey <tom@tromey.com>
729
730 * target.c (target_terminal::terminal_state): Define.
731 (target_terminal::init): Rename from target_terminal_init.
732 (target_terminal::inferior): Rename from
733 target_terminal_inferior.
734 (target_terminal::ours): Rename from target_terminal_ours.
735 (target_terminal::ours_for_output, target_terminal::info): New.
736
04fd3ba9
SM
7372017-09-16 Simon Marchi <simon.marchi@ericsson.com>
738
739 * server.c (accumulate_file_name_length): Remove.
740 (emit_dll_description): Adjust to std::string change.
741 (handle_qxfer_libraries): Use std::string to hold document.
742
5e187554
SM
7432017-09-16 Simon Marchi <simon.marchi@ericsson.com>
744
745 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
746 return type of xml_escape_text.
747 * server.c (emit_dll_description): Likewise.
748
1526853e
SM
7492017-09-16 Simon Marchi <simon.marchi@ericsson.com>
750
751 * server.c (captured_main): Accept argument for --selftest.
752 Update run_tests call.
753 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
754 when registering selftests.
755
c4dfafab
SDJ
7562017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
757
758 * regcache.c (get_thread_regcache): Update code to use "std::vector"
759 instead of "VEC" for "target_desc.reg_defs".
760 (regcache_cpy): Likewise.
761 (registers_to_string): Likewise.
762 (registers_from_string): Likewise.
763 (find_regno): Likewise.
764 (supply_regblock): Likewise.
765 (regcache_raw_read_unsigned): Likewise.
766 * tdesc.c (init_target_desc): Likewise.
767 (tdesc_create_reg): Likewise.
768 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
769 (struct target_desc) <reg_defs>: Convert to "std::vector".
770 (target_desc): Do not initialize "reg_defs".
771 (~target_desc): Update code to use "std::vector" instead of "VEC"
772 for "target_desc.reg_defs".
773 (operator==): Likewise.
774
124aceb4
SM
7752017-09-15 Simon Marchi <simon.marchi@ericsson.com>
776
777 * inferiors.h (thread_to_gdb_id): Remove.
778 * inferiors.c (thread_to_gdb_id): Remove.
779 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
780 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
781 lynx_store_registers, lynx_read_memory, lynx_write_memory):
782 Likewise.
783 * nto-low.c (nto_fetch_registers, nto_store_registers,
784 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
785
96cde54f
SM
7862017-09-15 Simon Marchi <simon.marchi@ericsson.com>
787
788 * inferiors.h (gdb_id_to_thread_id): Remove.
789 * inferiors.c (gdb_id_to_thread_id): Remove.
790 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
791 removal. Move pid declaration closer to where it's used.
792
e8ca139e
SM
7932017-09-15 Simon Marchi <simon.marchi@ericsson.com>
794
795 * server.c (handle_detach): New function.
796 (process_serial_event): Move code out, call handle_detach.
797
f8a4e119
SM
7982017-09-15 Simon Marchi <simon.marchi@ericsson.com>
799
800 * server.c (require_running): Rename to ...
801 (require_running_or_return): ... this ...
802 (require_running_or_break): ... and this.
803 (handle_query, process_serial_event): Adjust.
804
0eb0a407
SM
8052017-09-15 Simon Marchi <simon.marchi@ericsson.com>
806
807 * linux-low.c (linux_set_resume_request): Remove unused
808 variables.
809
785922a5
SM
8102017-09-15 Simon Marchi <simon.marchi@ericsson.com>
811
812 * server.c (first_thread_of): Remove.
813 (process_serial_event): Replace usage of first_thread_of with
814 find_any_thread_of_pid.
815 * tracepoint.c (same_process_p): Remove.
816 (gdb_agent_about_to_close): Replace usage of same_process_p with
817 find_any_thread_of_pid.
818 * linux-x86-low.c (same_process_callback): Remove.
819 (x86_arch_setup_process_callback): Replace usage of
820 same_process_callback with find_any_thread_of_pid.
821 * thread-db.c (any_thread_of): Remove.
822 (switch_to_process): Replace usage of any_thread_of with
823 find_any_thread_of_pid.
824 * inferiors.c (thread_pid_matches_callback): Remove.
825 (find_thread_process): Adjust to use find_any_thread_of_pid.
826
a059f00c
SDJ
8272017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
828
829 * regcache.c (get_thread_regcache): Guard calls to "memset"
830 with "!VEC_empty".
831
cc397f3a
SDJ
8322017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
833
834 * linux-low.c (handle_extended_wait): Use
835 "allocate_target_description" instead of "XNEW".
836 * linux-x86-low.c (initialize_low_arch): Likewise.
837
22916b07
YQ
8382017-09-05 Yao Qi <yao.qi@linaro.org>
839
840 * configure.srv (srv_i386_regobj): Remove.
841 (srv_amd64_regobj): Remove.
842 (srv_regobj): Set it to "" for x86 non-linux targets.
843 * linux-x86-tdesc.c (i386_linux_read_description):
844 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
845 (init_registers_i386): Remove the declaration.
846 (tdesc_i386): Remove the declaration.
847 (lynx_i386_arch_setup): Call i386_create_target_description.
848 * nto-x86-low.c: Likewise.
849 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
850 [!__x86_64__]: include arch/i386.h.
851 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
852
38602d55
YQ
8532017-09-05 Yao Qi <yao.qi@linaro.org>
854
855 * configure.srv (srv_amd64_linux_xmlfiles): Remove
856 i386/amd64-XXX-linux from it.
857
44b886ff
YQ
8582017-09-05 Yao Qi <yao.qi@linaro.org>
859
860 * configure.srv: Empty srv_amd64_linux_regobj if $development is
861 false.
862 (ipa_amd64_linux_regobj): Remove.
863 (ipa_x32_linux_regobj): Remove.
864
b4570e4b
YQ
8652017-09-05 Yao Qi <yao.qi@linaro.org>
866
867 * Makefile.in (arch-amd64.o): New rule.
868 * configure.srv: Append arch-amd64.o.
869 * linux-amd64-ipa.c: Include common/x86-xstate.h.
870 (get_ipa_tdesc): Call amd64_linux_read_description.
871 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
872 and init_registers_amd64_XXX.
873 * linux-x86-low.c (x86_linux_read_description): Call
874 amd64_linux_read_description.
875 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
876 (initialize_low_arch): Don't call init_registers_x32_XXX and
877 init_registers_amd64_XXX.
878 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
879 and tdesc_amd64_XXX.
880 [__x86_64__] (amd64_tdesc_test): New function.
881 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
882 and init_registers_amd64_XXX.
883 * linux-x86-tdesc.c: Include arch/amd64.h.
884 (xcr0_to_tdesc_idx): New function.
885 (i386_linux_read_description): New function.
886 (amd64_get_ipa_tdesc_idx): New function.
887 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
888 (amd64_get_ipa_tdesc): Declare.
889
d1f28ea2
YQ
8902017-09-05 Yao Qi <yao.qi@linaro.org>
891
892 * configure.srv (srv_i386_linux_xmlfiles): Remove
893 i386/i386-XXX-linux.xml from it.
894
25a93583
YQ
8952017-09-05 Yao Qi <yao.qi@linaro.org>
896
897 * configure.srv: Set srv_i386_linux_regobj empty if $development
898 is false.
899 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
900 initialize_low_tdesc.
901 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
902 with #if initialize_low_tdesc.
903 * linux-x86-tdesc-selftest.c: New file.
904 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
905
5f035c07
YQ
9062017-09-05 Yao Qi <yao.qi@linaro.org>
907
908 * Makefile.in (arch-i386.o): New rule.
909 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
910 (x86_64-*-linux*): Likewise.
911 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
912 include arch/i386.h.
913 (i386_linux_read_description): Remove code and call
914 i386_create_target_description.
915 * tdesc.c (allocate_target_description): New function.
916 * tdesc.h (set_tdesc_architecture): Remove declaration.
917 (set_tdesc_osabi): Likewise.
918
0abe8a89
YQ
9192017-09-05 Yao Qi <yao.qi@linaro.org>
920
921 * linux-x86-tdesc.c: Don't include <inttypes.h>.
922 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
923 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
924 .xmltarget.
925 * server.c (get_features_xml): Call tdesc_get_features_xml.
926 * tdesc.c (set_tdesc_architecture): New function.
927 (set_tdesc_osabi): New function.
928 (tdesc_get_features_xml): New function.
929 (tdesc_create_feature): Add an argument.
930 * tdesc.h (struct target_desc) <features>: New field.
931 <arch, osabi>: New field.
932 (~target_desc): xfree features, arch, and osabi.
933 (target_desc::oerator==): Don't compare .xmltarget.
934 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
935 (set_tdesc_osabi): Likewise.
936 (tdesc_get_features_xml): Likewise.
937
0a188386
YQ
9382017-09-05 Yao Qi <yao.qi@linaro.org>
939
940 * linux-x86-tdesc.c: Include selftest.h.
941 (i386_tdesc_test): New function.
942 (initialize_low_tdesc): Call selftests::register_test.
943 * tdesc.h: Include regdef.h.
944 (target_desc): Override operator == and !=.
945
f49ff000
YQ
9462017-09-05 Yao Qi <yao.qi@linaro.org>
947
948 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
949 (ipa_obj): Likewise.
950 * linux-i386-ipa.c: Include common/x86-xstate.h
951 (get_ipa_tdesc): Call i386_linux_read_description.
952 (initialize_low_tracepoint): Don't call init_registers_XXX
953 functions, call initialize_low_tdesc instead.
954 * linux-x86-low.c (x86_linux_read_description): Call
955 i386_linux_read_description.
956 (initialize_low_arch): Don't call init_registers_i386_XXX
957 functions, call initialize_low_tdesc.
958 * linux-x86-tdesc.c: New file.
959 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
960 (i386_get_ipa_tdesc_idx): Declare.
961 (i386_get_ipa_tdesc): Declare.
962 (initialize_low_tdesc): Declare.
963
2b68ef2f
YQ
9642017-09-05 Yao Qi <yao.qi@linaro.org>
965
966 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
967 instead of 0.
968
f7000548
YQ
9692017-09-05 Yao Qi <yao.qi@linaro.org>
970
971 * Makefile.in (IPA_OBJS): Add vec-ipa.o
972 * regcache.c (get_thread_regcache): Use VEC_length.
973 (init_register_cache): Likewise.
974 (regcache_cpy): Likewise.
975 (registers_to_string): Iterate reg_defs via VEC_iterate.
976 (find_regno): Likewise.
977 (find_register_by_number): Use VEC_index.
978 (register_size): Call find_register_by_number.
979 (register_data): Call find_register_by_number.
980 (supply_regblock): Use VEC_length.
981 (regcache_raw_read_unsigned): Likewise.
982 * tdesc.c (init_target_desc): Iterate reg_defs via
983 VEC_iterate.
984 (default_description): Update initializer.
985 (copy_target_description): Don't update field num_registers.
986 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
987 <num_registers>: Remove.
988
50a421ac
SM
9892017-09-04 Simon Marchi <simon.marchi@ericsson.com>
990
991 * Makefile.in (.SECONDARY): Define target.
992
23fdd69e
SM
9932017-09-03 Simon Marchi <simon.marchi@ericsson.com>
994
995 * linux-low.c (linux_wait_1): Adjust.
996 * server.c (queue_stop_reply_callback): Adjust.
997
0a2dde4a
SDJ
9982017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
999
1000 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1001 QEnvironmentUnset and QEnvironmentReset packets.
1002 (handle_query): Inform remote that QEnvironmentHexEncoded,
1003 QEnvironmentUnset and QEnvironmentReset are supported.
1004
6afd337d
SM
10052017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1006
1007 * inferiors.h (inferior_target_data): Rename to ...
1008 (thread_target_data): ... this.
1009 (inferior_regcache_data): Rename to ...
1010 (thread_regcache_data): ... this.
1011 (set_inferior_regcache_data): Rename to ...
1012 (set_thread_regcache_data): ... this.
1013 * inferiors.c (inferior_target_data): Rename to ...
1014 (thread_target_data): ... this.
1015 (inferior_regcache_data): Rename to ...
1016 (thread_regcache_data): ... this.
1017 (set_inferior_regcache_data): Rename to ...
1018 (set_thread_regcache_data): ... this.
1019 (free_one_thread): Update.
1020 * linux-low.h (get_thread_lwp): Update.
1021 * regcache.c (get_thread_regcache): Update.
1022 (regcache_invalidate_thread): Update.
1023 (free_register_cache_thread): Update.
1024 * win32-i386-low.c (update_debug_registers_callback): Update.
1025 (win32_get_current_dr): Update.
1026 * win32-low.c (thread_rec): Update.
1027 (delete_thread_info): Update.
1028 (continue_one_thread): Update.
1029 (suspend_one_thread): Update.
1030
a160cc46
SM
10312017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1032
1033 * inferiors.c (set_inferior_target_data): Remove.
1034 * inferiors.h (set_inferior_target_data): Remove.
1035
6d580b63
YQ
10362017-08-18 Yao Qi <yao.qi@linaro.org>
1037
1038 * Makefile.in (OBS): Add selftest.o.
1039 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1040 * configure, config.in: Re-generated.
1041 * server.c: Include common/sefltest.h.
1042 (captured_main): Handle option --selftest.
1043
f5a29eb0
YQ
10442017-08-09 Yao Qi <yao.qi@linaro.org>
1045
1046 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1047 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1048 i386-avx-mpx.o and i386-mmx.o.
1049 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1050 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1051 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1052 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1053 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1054 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1055 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1056 i386/amd64-avx-mpx.xml.
1057
57757c2f
YQ
10582017-08-09 Yao Qi <yao.qi@linaro.org>
1059
1060 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1061 and x32-avx-avx512.o.
1062 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1063 i386/x32-avx-avx512.xml.
1064
229d26fc
SM
10652017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1066
1067 * tracepoint.h (enum class fast_tpoint_collect_result): New
1068 enumeration.
1069 (fast_tracepoint_collecting): Change return type to
1070 fast_tpoint_collect_result.
1071 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1072 * linux-low.h: Include tracepoint.h.
1073 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1074 fast_tpoint_collect_result.
1075 * linux-low.c (handle_tracepoints): Adjust.
1076 (linux_fast_tracepoint_collecting): Change return type to
1077 fast_tpoint_collect_result.
1078 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1079 linux_wait_1, stuck_in_jump_pad_callback,
1080 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1081 proceed_one_lwp): Adjust to type change.
1082
2e1e43e1
YQ
10832017-07-10 Yao Qi <yao.qi@linaro.org>
1084
1085 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1086
adc764e7
YQ
10872017-06-29 Yao Qi <yao.qi@linaro.org>
1088
1089 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1090 Remove.
1091 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1092
a206891a
SM
10932017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1094
1095 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1096
9a6c7d9c
SDJ
10972017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1098
1099 * linux-low.c (linux_create_inferior): Adjust code to access the
1100 environment information via 'gdb_environ' class.
1101 * lynx-low.c (lynx_create_inferior): Likewise.
1102 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1103 (get_environ): Return a pointer to 'our_environ'.
1104 (captured_main): Initialize 'our_environ'.
1105 * server.h (get_environ): Adjust prototype.
1106 * spu-low.c (spu_create_inferior): Adjust code to access the
1107 environment information via 'gdb_environ' class.
1108
ae3e2ccf
SM
11092017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1110
1111 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1112 usage of "register" keyword.
1113
3e019bdc
SM
11142017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1115
1116 * configure: Re-generate.
1117
8465943a
SM
11182017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1119
1120 * configure: Re-generate.
1121
cf0dd6f0
SM
11222017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1123
1124 * Makefile.in (COMPILE.pre): Add "-x c++".
1125
9845682b
SDJ
11262017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1127
1128 * fork-child.c: Conditionally include <signal.h>.
1129
aefd8b33
SDJ
11302017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1131
1132 * server.c (handle_general_set): Handle new packet
1133 "QStartupWithShell".
1134 (handle_query): Add "QStartupWithShell" to the list of supported
1135 packets.
1136 (gdbserver_usage): Add help text explaining the
1137 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1138 options.
1139 (captured_main): Recognize and act upon the presence of the new
1140 CLI options.
1141
2090129c
SDJ
11422017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1143 Pedro Alves <palves@redhat.com>
1144
1145 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1146 * configure: Regenerate.
1147 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1148 "fork-inferior.o".
1149 (i[34567]86-*-lynxos*): Likewise.
1150 (spu*-*-*): Likewise.
1151 * fork-child.c: New file.
1152 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1153 and "environ.h".
1154 (linux_ptrace_fun): New function.
1155 (linux_create_inferior): Adjust function prototype to reflect
1156 change on "target.h". Adjust function code to use
1157 "fork_inferior".
1158 (linux_request_interrupt): Delete "signal_pid".
1159 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1160 (lynx_ptrace_fun): New function.
1161 (lynx_create_inferior): Adjust function prototype to reflect
1162 change on "target.h". Adjust function code to use
1163 "fork_inferior".
1164 * nto-low.c (nto_create_inferior): Adjust function prototype and
1165 code to reflect change on "target.h". Update comments.
1166 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1167 "common-terminal.h" and "environ.h".
1168 (terminal_fd): Moved to fork-child.c.
1169 (old_foreground_pgrp): Likewise.
1170 (restore_old_foreground_pgrp): Likewise.
1171 (last_status): Make it global.
1172 (last_ptid): Likewise.
1173 (our_environ): New variable.
1174 (startup_with_shell): Likewise.
1175 (program_name): Likewise.
1176 (program_argv): Rename to...
1177 (program_args): ...this.
1178 (wrapper_argv): New variable.
1179 (start_inferior): Delete function.
1180 (get_exec_wrapper): New function.
1181 (get_exec_file): Likewise.
1182 (get_environ): Likewise.
1183 (prefork_hook): Likewise.
1184 (post_fork_inferior): Likewise.
1185 (postfork_hook): Likewise.
1186 (postfork_child_hook): Likewise.
1187 (handle_v_run): Update code to deal with arguments coming from the
1188 remote host. Update calls from "start_inferior" to
1189 "create_inferior".
1190 (captured_main): Likewise. Initialize environment variable. Call
1191 "have_job_control".
1192 * server.h (post_fork_inferior): New prototype.
1193 (get_environ): Likewise.
1194 (last_status): Declare.
1195 (last_ptid): Likewise.
1196 (signal_pid): Likewise.
1197 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1198 (spu_ptrace_fun): New function.
1199 (spu_create_inferior): Adjust function prototype to reflect change
1200 on "target.h". Adjust function code to use "fork_inferior".
1201 * target.c (target_terminal_init): New function.
1202 (target_terminal_inferior): Likewise.
1203 (target_terminal_ours): Likewise.
1204 * target.h: Include <vector>.
1205 (struct target_ops) <create_inferior>: Update prototype.
1206 (create_inferior): Update macro.
1207 * utils.c (gdb_flush_out_err): New function.
1208 * win32-low.c (win32_create_inferior): Adjust function prototype
1209 and code to reflect change on "target.h".
1210
043a4934
SDJ
12112017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1212
1213 * inferiors.c (switch_to_thread): New function.
1214
15652511
SDJ
12152017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1216
1217 * Makefile.in (SFILE): Add "common/job-control.c".
1218 (OBS): Add "job-control.o".
1219
21ea5acd
SDJ
12202017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1221
1222 * Makefile: Remove "@host_makefile_frag@".
1223
e13cb306
PA
12242017-05-05 Pedro Alves <palves@redhat.com>
1225
1226 * configure: Regenerate.
1227
c94fee56
SDJ
12282017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1229
1230 * configure: Regenerate.
1231
a0ff9e1a
SM
12322017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1233
1234 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1235 software_single_step change of return type to
1236 std::vector<CORE_ADDR>.
1237 * linux-low.c (install_software_single_step_breakpoints):
1238 Likewise.
1239 * linux-low.h (install_software_single_step_breakpoints):
1240 Likewise.
1241
be628ab8
SDJ
12422017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1243
1244 * remote-utils.c: Include "gdb_termios.h" instead of
1245 "terminal.h".
1246 * terminal.h: Delete file.
1247
7c5ded6a
SDJ
12482017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1249
1250 * server.c: Include <vector>.
1251 <program_argv, wrapper_argv>: Convert to std::vector.
1252 (start_inferior): Rewrite function to use C++.
1253 (handle_v_run): Likewise. Update code that calculates the argv
1254 based on the vRun packet; use C++.
1255 (captured_main): Likewise.
1256
436252de
SM
12572017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1258
1259 * server.c (handle_v_cont): Initialize thread_resume::thread
1260 with null_ptid.
1261
9bf2a700
PA
12622017-04-05 Pedro Alves <palves@redhat.com>
1263
1264 * configure: Regenerate.
1265
a121b7c1
PA
12662017-04-05 Pedro Alves <palves@redhat.com>
1267
1268 * gdbreplay.c (sync_error): Constify.
1269 * linux-x86-low.c (push_opcode): Constify.
1270
21c8a587
PA
12712017-04-05 Pedro Alves <palves@redhat.com>
1272
1273 * win32-low.c (get_child_debug_event)
1274 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1275 Report TARGET_WAITKIND_SPURIOUS instead.
1276
fb32b4f7
PA
12772017-04-05 Pedro Alves <palves@redhat.com>
1278
1279 * remote-utils.c (remote_prepare, remote_open): Constify.
1280 * remote-utils.h (remote_prepare, remote_open): Constify.
1281 * server.c (captured_main): Constify 'port' handling.
1282
65dd1e59
SM
12832017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1284
1285 * Makefile.in (clean): Clear .deps.
1286
8fa5b777
SM
12872017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1288
1289 * .gitignore: Remove generated files, replace with wildcard.
1290 * (clean): Replace removal of generated files with wildcard.
1291 (version.c): Replace with...
1292 (version-generated.c): ...this.
1293 (xml-builtin.c): Replace with...
1294 (xml-builtin-generated.c): ...this.
1295 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1296 (%.c: *regformats*): Replace with...
1297 (%-generated.c: *regformats*): ...this.
1298
a12e714b
MF
12992017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1300
1301 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1302 (xtensa_fill_gregset): Call collect_register_by_name for
1303 threadptr register.
1304 (xtensa_store_gregset): Call supply_register_by_name for
1305 threadptr register.
1306
1a09b50a
MF
13072017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1308
1309 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1310 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1311 (xtensa_store_gregset): Call supply_register for all registers in
1312 a0_regnum..a0_regnum + C0_NREGS range.
1313
1a01e7c6
SM
13142017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1315
1316 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1317 (ax-ipa.o: ax.c): Remove.
1318 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1319 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1320 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1321 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1322 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1323
36bc18a8
SM
13242017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1325
1326 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1327 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1328 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1329 (errors-ipa.o: ../common/errors.c): Remove.
1330 (format-ipa.o: ../common/format.c): Remove.
1331 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1332
a8ebe3d5
SM
13332017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1334
1335 * Makefile.in (%-ipa.o: %.c): New rule.
1336 (tracepoint-ipa.o: tracepoint.c): Remove.
1337 (utils-ipa.o: utils.c): Remove.
1338 (remote-utils-ipa.o: remote-utils.c): Remove.
1339 (regcache-ipa.o: regcache.c): Remove.
1340 (i386-linux-ipa.o: i386-linux.c): Remove.
1341 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1342 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1343 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1344 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1345 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1346 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1347 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1348 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1349 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1350 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1351 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1352 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1353 (aarch64-ipa.o: aarch64.c): Remove.
1354 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1355 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1356 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1357 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1358 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1359 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1360 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1361 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1362 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1363 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1364 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1365 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1366 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1367 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1368 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1369 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1370 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1371 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1372 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1373 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1374 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1375 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1376 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1377 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1378 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1379 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1380 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1381 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1382 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1383 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1384 (tdesc-ipa.o: tdesc.c): Remove.
1385 (x32-linux-ipa.o: x32-linux.c): Remove.
1386 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1387 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1388
50cfacb7
SM
13892017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1390
1391 * Makefile.in (%.o: ../arch/%.c): New rule.
1392 (arm.o: ../arch/arm.c): Remove.
1393 (arm-linux.o: ../arch/arm-linux.c): Remove.
1394 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1395 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1396
c5a22423
SM
13972017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1398
1399 * Makefile.in (%.o: ../nat/%.c): New rule.
1400 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1401 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1402 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1403 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1404 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1405 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1406 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1407 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1408 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1409 (linux-personality.o: ../nat/linux-personality.c): Remove.
1410 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1411 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1412 (x86-linux.o: ../nat/x86-linux.c): Remove.
1413 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1414 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1415
6bda016b
SM
14162017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1417
1418 * Makefile.in (%.o: ../common/%.c): New rule.
1419 (signals.o: ../common/signals.c): Remove.
1420 (print-utils.o: ../common/print-utils.c): Remove.
1421 (rsp-low.o: ../common/rsp-low.c): Remove.
1422 (common-utils.o: ../common/common-utils.c): Remove.
1423 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1424 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1425 (vec.o: ../common/vec.c): Remove.
1426 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1427 (xml-utils.o: ../common/xml-utils.c): Remove.
1428 (ptid.o: ../common/ptid.c): Remove.
1429 (buffer.o: ../common/buffer.c): Remove.
1430 (format.o: ../common/format.c): Remove.
1431 (filestuff.o: ../common/filestuff.c): Remove.
1432 (agent.o: ../common/agent.c): Remove.
1433 (errors.o: ../common/errors.c): Remove.
1434 (environ.o: ../common/environ.c): Remove.
1435 (common-debug.o: ../common/common-debug.c): Remove.
1436 (cleanups.o: ../common/cleanups.c): Remove.
1437 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1438 (fileio.o: ../common/fileio.c): Remove.
1439 (common-regcache.o: ../common/common-regcache.c): Remove.
1440 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1441 (new-op.o: ../common/new-op.c): Remove.
1442 (btrace-common.o: ../common/btrace-common.c): Remove.
1443
21122961
SM
14442017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1445
1446 * Makefile.in (%.o: ../target/%.c): New rule.
1447 (waitstatus.o: ../target/waitstatus.c): Remove.
1448
c362e621
SM
14492017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1450
1451 * Makefile.in
1452 (%.c: ../regformats/%.dat,
1453 (%.c: ../regformats/arm/%.dat,
1454 (%.c: ../regformats/i386/%.dat,
1455 (%.c: ../regformats/rs6000/%.dat): New rules.
1456 (aarch64.c): Remove.
1457 (reg-arm.c): Remove.
1458 (arm-with-iwmmxt.c): Remove.
1459 (arm-with-vfpv2.c): Remove.
1460 (arm-with-vfpv3.c): Remove.
1461 (arm-with-neon.c): Remove.
1462 (reg-bfin.c): Remove.
1463 (reg-cris.c): Remove.
1464 (reg-crisv32.c): Remove.
1465 (i386.c): Remove.
1466 (i386-linux.c): Remove.
1467 (i386-avx.c): Remove.
1468 (i386-avx-linux.c): Remove.
1469 (i386-avx-avx512.c): Remove.
1470 (i386-avx-avx512-linux.c): Remove.
1471 (i386-mpx.c): Remove.
1472 (i386-mpx-linux.c): Remove.
1473 (i386-avx-mpx-avx512-pku.c): Remove.
1474 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1475 (i386-avx-mpx.c): Remove.
1476 (i386-avx-mpx-linux.c): Remove.
1477 (i386-mmx.c): Remove.
1478 (i386-mmx-linux.c): Remove.
1479 (reg-ia64.c): Remove.
1480 (reg-m32r.c): Remove.
1481 (reg-m68k.c): Remove.
1482 (reg-cf.c): Remove.
1483 (mips-linux.c): Remove.
1484 (mips-dsp-linux.c): Remove.
1485 (mips64-linux.c): Remove.
1486 (mips64-dsp-linux.c): Remove.
1487 (nios2-linux.c): Remove.
1488 (powerpc-32.c): Remove.
1489 (powerpc-32l.c): Remove.
1490 (powerpc-altivec32l.c): Remove.
1491 (powerpc-cell32l.c): Remove.
1492 (powerpc-vsx32l.c): Remove.
1493 (powerpc-isa205-32l.c): Remove.
1494 (powerpc-isa205-altivec32l.c): Remove.
1495 (powerpc-isa205-vsx32l.c): Remove.
1496 (powerpc-e500l.c): Remove.
1497 (powerpc-64l.c): Remove.
1498 (powerpc-altivec64l.c): Remove.
1499 (powerpc-cell64l.c): Remove.
1500 (powerpc-vsx64l.c): Remove.
1501 (powerpc-isa205-64l.c): Remove.
1502 (powerpc-isa205-altivec64l.c): Remove.
1503 (powerpc-isa205-vsx64l.c): Remove.
1504 (s390-linux32.c): Remove.
1505 (s390-linux32v1.c): Remove.
1506 (s390-linux32v2.c): Remove.
1507 (s390-linux64.c): Remove.
1508 (s390-linux64v1.c): Remove.
1509 (s390-linux64v2.c): Remove.
1510 (s390-te-linux64.c): Remove.
1511 (s390-vx-linux64.c): Remove.
1512 (s390-tevx-linux64.c): Remove.
1513 (s390x-linux64.c): Remove.
1514 (s390x-linux64v1.c): Remove.
1515 (s390x-linux64v2.c): Remove.
1516 (s390x-te-linux64.c): Remove.
1517 (s390x-vx-linux64.c): Remove.
1518 (s390x-tevx-linux64.c): Remove.
1519 (tic6x-c64xp-linux.c): Remove.
1520 (tic6x-c64x-linux.c): Remove.
1521 (tic6x-c62x-linux.c): Remove.
1522 (reg-sh.c): Remove.
1523 (reg-sparc64.c): Remove.
1524 (reg-spu.c): Remove.
1525 (amd64.c): Remove.
1526 (amd64-linux.c): Remove.
1527 (amd64-avx.c): Remove.
1528 (amd64-avx-linux.c): Remove.
1529 (amd64-avx-avx512.c): Remove.
1530 (amd64-avx-avx512-linux.c): Remove.
1531 (amd64-mpx.c): Remove.
1532 (amd64-mpx-linux.c): Remove.
1533 (amd64-avx-mpx-avx512-pku.c): Remove.
1534 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1535 (amd64-avx-mpx.c): Remove.
1536 (amd64-avx-mpx-linux.c): Remove.
1537 (x32.c): Remove.
1538 (x32-linux.c): Remove.
1539 (x32-avx.c): Remove.
1540 (x32-avx-linux.c): Remove.
1541 (x32-avx-avx512.c): Remove.
1542 (x32-avx-avx512-linux.c): Remove.
1543 (reg-xtensa.c): Remove.
1544 (reg-tilegx.c): Remove.
1545 (reg-tilegx32.c): Remove.
1546
1672e0d9
SDJ
15472017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1548
1549 * Makefile.in (SFILES): Add "common/environ.c".
1550 (OBJS): Add "common/environ.h".
1551
239b6d10
WT
15522017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1553
1554 * configure.ac: Check if the fs_base and gs_base members of
1555 `struct user_regs_struct' exist.
1556 * config.in: Regenerated.
1557 * configure: Likewise.
1558
694b382c
AT
15592017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1560
1561 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1562 target_read_memory.
1563 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1564 (get_next_pcs_syscall_next_pc): Likewise.
1565
7dc53023
LM
15662016-12-23 Luis Machado <lgustavo@codesourcery.com>
1567
1568 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1569 * nto-x86-low.c: Likewise.
1570
ad02e4fe
SM
15712016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1572
1573 * Makefile.in: Include disable-implicit-rules.mk.
1574
dcb07cfa
PA
15752016-11-23 Pedro Alves <palves@redhat.com>
1576
1577 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1578 (debug_vprintf): Use std::chrono::steady_clock instead of
1579 gettimeofday. Use '.' instead of ':'.
1580 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1581 (get_timestamp): Use std::chrono::steady_clock instead of
1582 gettimeofday.
1583
8629c02c
SM
15842016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1585
1586 * Makefile.in: Fix whitespace formatting.
1587
b593ecca
SM
15882016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1589
1590 * Makefile.in (SFILES, OBS): Flatten list and order
1591 alphabetically.
1592
9986ba08
PA
15932016-11-23 Pedro Alves <palves@redhat.com>
1594
1595 * event-loop.c (handle_file_event): Use warning.
1596 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1597 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1598 Use warning.
1599
4eefa7bc
PA
16002016-11-23 Pedro Alves <palves@redhat.com>
1601
1602 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1603 output.
1604 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1605 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1606 debug_printf and debug_flush for debug output.
1607 * server.c (handle_general_set): Likewise.
1608 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1609 output.
1610
5443506e
SM
16112016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1612
1613 * Makefile.in (.c.o): Replace rule with ...
1614 (%.o: %.c): ... this one.
1615
3b165252
SM
16162016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1617
1618 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1619 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1620 make.
1621 * configure.ac: Remove checks for the make program.
1622 * configure: Re-generate.
1623
0bcda685
PA
16242016-10-28 Pedro Alves <palves@redhat.com>
1625
1626 * Makefile.in (CXX_DIALECT): Get from configure.
1627 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1628 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1629 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1630 * config.in: Regenerate.
1631 * configure: Regenerate.
1632
c3805894
YQ
16332016-10-27 Yao Qi <yao.qi@linaro.org>
1634
1635 * linux-low.c (linux_supports_range_stepping): Return true if
1636 can_software_single_step return true.
1637
89342618
YQ
16382016-10-27 Yao Qi <yao.qi@linaro.org>
1639
1640 * inferiors.c (find_inferior_in_random): New function.
1641 * inferiors.h (find_inferior_in_random): Declare.
1642 * linux-low.c (linux_wait_for_event_filtered): Call
1643 find_inferior_in_random instead of find_inferior.
1644
e3652c84
YQ
16452016-10-27 Yao Qi <yao.qi@linaro.org>
1646
1647 * linux-low.c (linux_wait_1): If single-step breakpoints are
1648 inserted, remove them.
1649
5a04c4cf
PA
16502016-10-26 Pedro Alves <palves@redhat.com>
1651
1652 * linux-low.c (handle_extended_wait): Link parent/child fork
1653 threads.
1654 (linux_wait_1): Unlink them.
1655 (linux_set_resume_request): Ignore resume requests for
1656 already-resumed and unhandled fork child threads.
1657 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1658 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1659 New functions.
1660 (handle_v_requests) <vCont>: Don't call require_running.
1661 * server.h (in_queued_stop_replies): New declaration.
1662
cb93dc7f
YQ
16632016-10-24 Yao Qi <yao.qi@linaro.org>
1664
1665 PR server/20733
1666 * linux-aarch64-low.c (append_insns): Cast the return value to
1667 'uint32_t *'.
1668
a1078bea
YQ
16692016-10-10 Yao Qi <yao.qi@linaro.org>
1670
1671 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1672
1fb77080
SDJ
16732016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1674
1675 * target.c (target_supports_multi_process): New function, moved
1676 from...
1677 * target.h (target_supports_multi_process): ... here. Remove
1678 macro.
1679
39b5a3b9
TT
16802016-10-05 Tom Tromey <tom@tromey.com>
1681
1682 PR remote/20655:
1683 * tracepoint.c (handle_tracepoint_bkpts): Check
1684 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1685
c1d0b70a
YQ
16862016-10-05 Yao Qi <yao.qi@linaro.org>
1687
1688 * configure.srv: Update the path of arm-*.xml files.
1689
0a69eedb
YQ
16902016-10-05 Terry Guo <terry.guo@arm.com>
1691 Yao Qi <yao.qi@linaro.org>
1692
1693 * Makefile.in: Adjust the path of rules.
1694 * configure.srv: Update the path of xml files.
1695 * regformats/arm-with-iwmmxt.dat: Regenerated.
1696 * regformats/arm-with-neon.dat: Likewise.
1697 * regformats/arm-with-vfpv2.dat: Likewise.
1698 * regformats/arm-with-vfpv3.dat Likewise.
1699
17e16485
YQ
17002016-09-30 Yao Qi <yao.qi@linaro.org>
1701
1702 PR gdbserver/20627
1703 * target.c (target_stop_and_wait): Don't call
1704 target_continue_no_signal, use resume_stop instead.
1705
edeeb602
YQ
17062016-09-26 Yao Qi <yao.qi@linaro.org>
1707
1708 * linux-low.c (linux_wait_1): Call debug_exit.
1709
503b1c39
PA
17102016-09-23 Pedro Alves <palves@redhat.com>
1711
1712 * Makefile.in (SFILES): Add common/new-op.c.
1713 (OBS): Add common/new-op.o.
1714 (new-op.o): New rule.
1715
74172ecf
SM
17162016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1717
1718 * .gitinore: Ignore more files.
1719
fc6cda2e
YQ
17202016-09-21 Yao Qi <yao.qi@linaro.org>
1721
1722 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1723 23.
1724
bc1e6c81
SDJ
17252016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1726
1727 * server.c (start_inferior): Call target_mourn_inferior instead of
1728 mourn_inferior; pass ptid_t argument to it.
1729 (resume): Likewise.
1730 (handle_target_event): Likewise.
1731 * target.c (target_mourn_inferior): New function.
1732 * target.h (mourn_inferior): Delete macro.
1733
0e00e962
AA
17342016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1735
1736 * linux-low.c (lwp_is_stepping): New function.
1737
1d8cb77d
CL
17382016-09-06 Carl Love <cel@us.ibm.com>
1739
1740 * server.c (start_inferior): Fixed comment, requested comment change
1741 didn't get updated correctly. Removed reference to ptrace () call as
1742 it is only true on Linux systems.
1743
7313bced
CL
17442016-09-06 Carl Love <cel@us.ibm.com>
1745
1746 * server.c (start_inferior): Do not call
1747 function target_post_create_inferior () if the
1748 inferior process has already exited.
1749
cf6de44d
PA
17502016-09-05 Pedro Alves <palves@redhat.com>
1751
1752 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1753 (COMPILE.pre, CC_LD): Use CXX directly.
1754 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1755 * acinclude.m4: Don't include build-with-cxx.m4.
1756 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1757 * configure: Regenerate.
1758
c1da6748
AT
17592016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1760
1761 PR gdb/19495
1762 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1763 call writing data to own_buf.
1764
f2b9e3df
SDJ
17652016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1766
1767 * target.c (mywait): Call target_wait instead of
1768 the_target->wait.
1769 (target_wait): New function.
1770
049a8570
SDJ
17712016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1772
1773 * server.c (start_inferior): New variable 'ptid'. Replace calls
1774 to the_target->resume by target_continue{,_no_signal}, depending
1775 on the case.
1776 * target.c (target_stop_and_wait): Call target_continue_no_signal
1777 instead of the_target->resume.
1778 (target_continue): New function.
1779
3aa5cfa0
AT
17802016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1781
1782 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1783
754653a7
AZ
17842016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1785
1786 PR server/20491
1787 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1788 ps_prochandle.
1789 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1790 * linux-arm-low.c (ps_get_thread_area): Likewise.
1791 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1792 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1793 * linux-mips-low.c (ps_get_thread_area): Likewise.
1794 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1795 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1796 * linux-x86-low.c (ps_get_thread_area): Likewise.
1797 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1798
ed036b40
PA
17992016-08-19 Pedro Alves <palves@redhat.com>
1800
1801 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1802
c8ef42ee
PA
18032016-08-19 Pedro Alves <palves@redhat.com>
1804
1805 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1806 comment. Use memcpy instead of casting through unsigned long.
1807
9c235a72
PA
18082016-08-19 Pedro Alves <palves@redhat.com>
1809
1810 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1811 allocating around 0x80000000.
1812
201506da
PA
18132016-08-19 Pedro Alves <palves@redhat.com>
1814
1815 PR gdb/20415
1816 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1817 (x32-avx512-linux-ipa.o): New rules.
1818 * configure.ac (x86_64-*-linux*): New x32 check.
1819 * configure.srv (ipa_x32_linux_regobj): New.
1820 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1821 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1822 descriptions.
1823 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1824 descriptions.
1825 * configure: Regenerate.
1826
f348d89a
PA
18272016-08-09 Pedro Alves <palves@redhat.com>
1828
1829 PR gdb/18653
1830 * Makefile.in (OBS): Add signals-state-save-restore.o.
1831 (signals-state-save-restore.o): New rule.
1832 * config.in: Regenerate.
1833 * configure: Regenerate.
1834 * linux-low.c: Include "signals-state-save-restore.h".
1835 (linux_create_inferior): Call
1836 restore_original_signals_state.
1837 * server.c: Include "dispositions-save-restore.h".
1838 (captured_main): Call save_original_signals_state.
1839
1baf5149
PA
18402016-08-05 Pedro Alves <palves@redhat.com>
1841
1842 * configure: Regenerate.
1843
fcd4a73d
YQ
18442016-08-04 Yao Qi <yao.qi@linaro.org>
1845
1846 * linux-low.c (regsets_fetch_inferior_registers): Check
1847 errno is ESRCH or not.
1848
979659d0
YQ
18492016-08-02 Yao Qi <yao.qi@linaro.org>
1850
1851 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1852 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1853 (thread_db_load_search): Update.
1854 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1855 td_ta_set_event and td_ta_event_getmsg.
1856
6598661d
PA
18572016-07-26 Pedro Alves <palves@redhat.com>
1858
1859 PR server/20414
1860 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1861 of unsigned long for 64-bit registers and use uint32_t instead of
1862 unsigned int for 32-bit registers.
1863
9cf12d57
PA
18642016-07-26 Pedro Alves <palves@redhat.com>
1865
1866 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1867 to 'ptrace'.
1868
305450ed
TT
18692016-07-21 Tom Tromey <tom@tromey.com>
1870
1871 * configure: Rebuild.
1872
2583da7c
YQ
18732016-07-21 Yao Qi <yao.qi@linaro.org>
1874
1875 * mem-break.c (find_gdb_breakpoint): Cast bp to
1876 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1877
21536b36
YQ
18782016-07-21 Yao Qi <yao.qi@linaro.org>
1879
1880 * server.c (handle_v_requests): Support s and S actions
1881 if target_supports_software_single_step return true.
1882
8901d193
YQ
18832016-07-21 Yao Qi <yao.qi@linaro.org>
1884
1885 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1886 is resume_step, call maybe_hw_step.
1887 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1888 and unstop them.
1889 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1890 breakpoints or not.
1891 (proceed_one_lwp): If resume request is resume_step, install
1892 reinsert breakpoints and call maybe_hw_step.
1893
0e9a339e
YQ
18942016-07-21 Yao Qi <yao.qi@linaro.org>
1895
1896 * linux-low.c (proceed_one_lwp): Declare.
1897 (linux_resume_one_thread): Remove local variable 'step'.
1898 Lift code enqueue signal. Call proceed_one_lwp instead of
1899 linux_resume_one_lwp.
1900
4281b351
YQ
19012016-07-21 Yao Qi <yao.qi@linaro.org>
1902
1903 * linux-low.c (linux_resume_one_thread): Call
1904 enqueue_pending_signal.
1905
984a2c04
YQ
19062016-07-21 Yao Qi <yao.qi@linaro.org>
1907
1908 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1909 * inferiors.c (do_restore_current_thread_cleanup): New function.
1910 (make_cleanup_restore_current_thread): Likewise.
1911 * linux-low.c (install_software_single_step_breakpoints): Call
1912 make_cleanup_restore_current_thread. Switch current_thread to
1913 thread.
1914
bec903c9
YQ
19152016-07-21 Yao Qi <yao.qi@linaro.org>
1916
1917 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1918 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1919 (clone_one_breakpoint): Likewise.
1920 (delete_reinsert_breakpoints): Change parameter to thread.
1921 Callers updated.
1922 (has_reinsert_breakpoints): Likewise.
1923 (uninsert_reinsert_breakpoints): Likewise.
1924 (reinsert_reinsert_breakpoints): Likewise.
1925 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1926 (delete_reinsert_breakpoints): Likewise.
1927 (reinsert_reinsert_breakpoints): Likewise.
1928 (uninsert_reinsert_breakpoints): Likewise.
1929 (has_reinsert_breakpoints): Likewise.
1930
63c40ec7
YQ
19312016-07-21 Yao Qi <yao.qi@linaro.org>
1932
1933 * inferiors.c (get_thread_process): Make parameter const.
1934 * inferiors.h (get_thread_process): Update declaration.
1935 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1936 Add new parameters child_thread and parent_thread. Callers
1937 updated.
1938 * mem-break.h (clone_all_breakpoints): Update declaration.
1939
9aa76cd0
YQ
19402016-07-21 Yao Qi <yao.qi@linaro.org>
1941
1942 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1943 <command_list, handler>: Remove.
1944 (struct gdb_breakpoint): New.
1945 (struct other_breakpoint): New.
1946 (struct reinsert_breakpoint): New.
1947 (is_gdb_breakpoint): New function.
1948 (any_persistent_commands): Update command_list if
1949 is_gdb_breakpoint returns true.
1950 (set_breakpoint): Create breakpoints according to their types.
1951 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1952 (set_gdb_breakpoint_1): Likewise.
1953 (set_gdb_breakpoint): Likewise.
1954 (clear_breakpoint_conditions): Change parameter type to
1955 'struct gdb_breakpoint *'.
1956 (clear_breakpoint_commands): Likewise.
1957 (clear_breakpoint_conditions_and_commands): Likewise.
1958 (add_condition_to_breakpoint): Likewise.
1959 (add_breakpoint_condition): Likewise.
1960 (add_commands_to_breakpoint): Likewise.
1961 (check_breakpoints): Check other_breakpoint.
1962 (clone_one_breakpoint): Clone breakpopint according to its type.
1963 * mem-break.h (struct gdb_breakpoint): Declare.
1964 (set_gdb_breakpoint): Update declaration.
1965 (clear_breakpoint_conditions_and_commands): Likewise.
1966 (add_breakpoint_condition): Likewise.
1967 (add_breakpoint_commands): Likewise.
1968 * server.c (process_point_options): Change parameter type to
1969 'struct gdb_breakpoint *'.
1970
811f8301
YQ
19712016-07-21 Yao Qi <yao.qi@linaro.org>
1972
1973 * mem-break.c (set_breakpoint_at): Rename it to ...
1974 (set_breakpoint_type_at): ... it.
1975 (set_breakpoint_at): Call set_breakpoint_type_at.
1976 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1977 * mem-break.h (set_breakpoint_at): Update comments.
1978
b1c51e36
CLT
19792016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1980
1981 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1982 to buf parameter.
1983 (nios2_store_gregset): Likewise.
1984
ced2dffb
PA
19852016-07-01 Pedro Alves <palves@redhat.com>
1986 Antoine Tremblay <antoine.tremblay@ericsson.com>
1987
1988 * linux-low.c: Change interface to take the target lwp_info
1989 pointer directly and return void. Handle detaching from a zombie
1990 thread.
1991 (linux_detach_lwp_callback): New function.
1992 (linux_detach): Detach from the leader thread after detaching from
1993 the clone threads.
1994
2ac09a5b
YQ
19952016-06-28 Yao Qi <yao.qi@linaro.org>
1996
1997 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1998 for variable new_offset.
1999 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2000 (aarch64_ftrace_insn_reloc_cb): Likewise.
2001 (aarch64_ftrace_insn_reloc_tb): Likewise.
2002 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2003 PRIx64 instead of PRIx32.
2004
79e7fd4f
YQ
20052016-06-28 Yao Qi <yao.qi@linaro.org>
2006
2007 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2008 (the_low_target): Install arm_get_syscall_trapinfo.
2009
061fc021
YQ
20102016-06-28 Yao Qi <yao.qi@linaro.org>
2011
2012 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2013 function.
2014 (the_low_target): Install aarch64_get_syscall_trapinfo.
2015
4cc32bec
YQ
20162016-06-28 Yao Qi <yao.qi@linaro.org>
2017
2018 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2019 Callers updated.
2020 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2021 Remove parameter sysno.
2022 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2023 sysret.
2024
782c1122
AA
20252016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2026
2027 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2028 (s390_emit_ne_goto): Likewise.
2029 (s390_emit_lt_goto): Likewise.
2030 (s390_emit_le_goto): Likewise.
2031 (s390_emit_gt_goto): Likewise.
2032 (s390_emit_ge_goto): Likewise.
2033 (s390x_emit_eq_goto): Likewise.
2034 (s390x_emit_ne_goto): Likewise.
2035 (s390x_emit_lt_goto): Likewise.
2036 (s390x_emit_le_goto): Likewise.
2037 (s390x_emit_gt_goto): Likewise.
2038 (s390x_emit_ge_goto): Likewise.
2039 (s390_emit_ops_impl): Mark variable static.
2040 (s390x_emit_ops): Likewise.
2041
2e7b624b
YQ
20422016-06-17 Yao Qi <yao.qi@linaro.org>
2043
2044 * linux-low.c (handle_extended_wait): Call
2045 uninsert_reinsert_breakpoints for the parent process. Remove
2046 reinsert breakpoints from the child process. Reinsert them to
2047 the parent process when vfork is done.
2048 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2049 (reinsert_reinsert_breakpoints): New function.
2050 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2051 (reinsert_reinsert_breakpoints): Declare.
2052
8a81c5d7
YQ
20532016-06-17 Yao Qi <yao.qi@linaro.org>
2054
2055 * linux-low.c (handle_extended_wait): If the parent is doing
2056 step-over, remove the reinsert breakpoints from the forked child.
2057
f50bf8e5
YQ
20582016-06-17 Yao Qi <yao.qi@linaro.org>
2059
2060 * linux-low.c (unsuspend_all_lwps): Declare.
2061 (linux_low_filter_event): If thread exited, call finish_step_over.
2062 If step-over is finished, unsuspend other threads.
2063
8376a3cb
YQ
20642016-06-17 Yao Qi <yao.qi@linaro.org>
2065
2066 * linux-low.c (linux_resume_one_lwp_throw): Assert
2067 has_reinsert_breakpoints returns false.
2068 * mem-break.c (delete_disabled_breakpoints): Assert
2069 bp type isn't reinsert_breakpoint.
2070
f79b145d
YQ
20712016-06-17 Yao Qi <yao.qi@linaro.org>
2072
2073 * linux-low.c (maybe_hw_step): New function.
2074 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2075 (finish_step_over): Switch current_thread to lwp temporarily,
2076 and assert has_reinsert_breakpoints returns true.
2077 (proceed_one_lwp): Call maybe_hw_step.
2078 * mem-break.c (has_reinsert_breakpoints): New function.
2079 * mem-break.h (has_reinsert_breakpoints): Declare.
2080
0ae534d2
JT
20812016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2082
2083 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2084
fcdad592
YQ
20852016-05-17 Yao Qi <yao.qi@linaro.org>
2086
2087 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2088 instead of find_inferior.
2089
9e784964
YQ
20902016-05-05 Yao Qi <yao.qi@linaro.org>
2091
2092 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2093 Initialize res to zero.
2094
cf2ebb6e
YQ
20952016-05-05 Yao Qi <yao.qi@linaro.org>
2096
2097 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2098 to uint32_t.
2099
c1aebf87
UW
21002016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2101
2102 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2103 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2104 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2105
35fd2deb 21062016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2107 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2108
2109 * tracepoint.c (write_inferior_int8): New function.
2110 (cmd_qtenable_disable): Write enable flag using
2111 write_inferior_int8.
2112
484b3c32
YQ
21132016-04-25 Yao Qi <yao.qi@linaro.org>
2114
2115 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2116 (need_step_over_p): Return zero if the LWP has pending signals
2117 can be delivered on software single step target.
2118
85ba7d86
YQ
21192016-04-25 Yao Qi <yao.qi@linaro.org>
2120
2121 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2122 return instead of error.
2123
3539aa13
YQ
21242016-04-22 Yao Qi <yao.qi@linaro.org>
2125
2126 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2127 to 23.
2128
5b061e98
YQ
21292016-04-22 Yao Qi <yao.qi@linaro.org>
2130
2131 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2132 signal when stepping over breakpoint with software single
2133 step.
2134
3451269c
PA
21352016-04-21 Pedro Alves <palves@redhat.com>
2136
2137 * linux-s390-low.c (s390_collect_ptrace_register)
2138 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2139 add casts.
2140 (s390_check_regset): Use void * instead of gdb_byte *.
2141
a2358508
PA
21422016-04-20 Pedro Alves <palves@redhat.com>
2143
2144 * configure: Renegerate.
2145
6885166d
YQ
21462016-04-20 Yao Qi <yao.qi@linaro.org>
2147
2148 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2149 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2150 number 16.
2151 (arm_store_gregset): Likewise.
2152
2b863f51
WT
21532016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2154
2155 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2156 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2157 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2158 (amd64-avx-mpx-linux.c): New rules.
2159 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2160 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2161 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2162 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2163 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2164 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2165 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2166 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2167 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2168 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2169 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2170 * linux-x86-low.c (x86_linux_read_description): Add case for
2171 X86_XSTATE_AVX_MPX_MASK.
2172 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2173 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2174 init_registers_i386_avx_mpx_linux.
2175 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2176 (initialize_low_tracepoint): Call
2177 init_registers_i386_avx_mpx_linux.
2178 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2179 (initialize_low_tracepoint): Call
2180 init_registers_amd64_avx_mpx_linux.
2181 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2182 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2183 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2184 declarations.
2185
9b30624b
PA
21862016-04-18 Pedro Alves <palves@redhat.com>
2187
2188 * configure: Regenerate.
2189
45e3745e
AT
21902016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2191
2192 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2193 (aarch64_emit_sub): Likewise.
2194
2afc13ff
PA
21952016-04-12 Pedro Alves <palves@redhat.com>
2196
2197 * utils.c (prepare_to_throw_exception): Delete.
2198
6e774b13
SM
21992016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2200
2201 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2202
4dca19f8
MK
22032016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2204
2205 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2206
d0a9981f
MK
22072016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2208
2209 * linux-aarch64-ipa.c: Add <elf.h> include.
2210 * linux-ppc-ipa.c: Add <elf.h> include.
2211 * linux-s390-ipa.c: Add <elf.h> include.
2212
252db07e
MK
22132016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2214
2215 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2216 (get_raw_reg_ptr): Likewise.
2217 (get_trace_state_variable_value_ptr): Likewise.
2218 (set_trace_state_variable_value_ptr): Likewise.
2219 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2220 char *.
2221
14e2b6d9
MK
22222016-03-31 Wei-cheng Wang <cole945@gmail.com>
2223 Marcin Kościelnicki <koriakin@0x04.net>
2224
2225 PR/17221
2226 * linux-ppc-low.c (emit_insns): New function.
2227 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2228 (ppc_emit_prologue): New function.
2229 (ppc_emit_epilogue): New function.
2230 (ppc_emit_add): New function.
2231 (ppc_emit_sub): New function.
2232 (ppc_emit_mul): New function.
2233 (ppc_emit_lsh): New function.
2234 (ppc_emit_rsh_signed): New function.
2235 (ppc_emit_rsh_unsigned): New function.
2236 (ppc_emit_ext): New function.
2237 (ppc_emit_zero_ext): New function.
2238 (ppc_emit_log_not): New function.
2239 (ppc_emit_bit_and): New function.
2240 (ppc_emit_bit_or): New function.
2241 (ppc_emit_bit_xor): New function.
2242 (ppc_emit_bit_not): New function.
2243 (ppc_emit_equal): New function.
2244 (ppc_emit_less_signed): New function.
2245 (ppc_emit_less_unsigned): New function.
2246 (ppc_emit_ref): New function.
2247 (ppc_emit_const): New function.
2248 (ppc_emit_reg): New function.
2249 (ppc_emit_pop): New function.
2250 (ppc_emit_stack_flush): New function.
2251 (ppc_emit_swap): New function.
2252 (ppc_emit_stack_adjust): New function.
2253 (ppc_emit_call): New function.
2254 (ppc_emit_int_call_1): New function.
2255 (ppc_emit_void_call_2): New function.
2256 (ppc_emit_if_goto): New function.
2257 (ppc_emit_goto): New function.
2258 (ppc_emit_eq_goto): New function.
2259 (ppc_emit_ne_goto): New function.
2260 (ppc_emit_lt_goto): New function.
2261 (ppc_emit_le_goto): New function.
2262 (ppc_emit_gt_goto): New function.
2263 (ppc_emit_ge_goto): New function.
2264 (ppc_write_goto_address): New function.
2265 (ppc_emit_ops_impl): New static variable.
2266 (ppc64v1_emit_prologue): New function.
2267 (ppc64v2_emit_prologue): New function.
2268 (ppc64_emit_epilogue): New function.
2269 (ppc64_emit_add): New function.
2270 (ppc64_emit_sub): New function.
2271 (ppc64_emit_mul): New function.
2272 (ppc64_emit_lsh): New function.
2273 (ppc64_emit_rsh_signed): New function.
2274 (ppc64_emit_rsh_unsigned): New function.
2275 (ppc64_emit_ext): New function.
2276 (ppc64_emit_zero_ext): New function.
2277 (ppc64_emit_log_not): New function.
2278 (ppc64_emit_bit_and): New function.
2279 (ppc64_emit_bit_or): New function.
2280 (ppc64_emit_bit_xor): New function.
2281 (ppc64_emit_bit_not): New function.
2282 (ppc64_emit_equal): New function.
2283 (ppc64_emit_less_signed): New function.
2284 (ppc64_emit_less_unsigned): New function.
2285 (ppc64_emit_ref): New function.
2286 (ppc64_emit_const): New function.
2287 (ppc64v1_emit_reg): New function.
2288 (ppc64v2_emit_reg): New function.
2289 (ppc64_emit_pop): New function.
2290 (ppc64_emit_stack_flush): New function.
2291 (ppc64_emit_swap): New function.
2292 (ppc64v1_emit_call): New function.
2293 (ppc64v2_emit_call): New function.
2294 (ppc64v1_emit_int_call_1): New function.
2295 (ppc64v2_emit_int_call_1): New function.
2296 (ppc64v1_emit_void_call_2): New function.
2297 (ppc64v2_emit_void_call_2): New function.
2298 (ppc64_emit_if_goto): New function.
2299 (ppc64_emit_eq_goto): New function.
2300 (ppc64_emit_ne_goto): New function.
2301 (ppc64_emit_lt_goto): New function.
2302 (ppc64_emit_le_goto): New function.
2303 (ppc64_emit_gt_goto): New function.
2304 (ppc64_emit_ge_goto): New function.
2305 (ppc64v1_emit_ops_impl): New static variable.
2306 (ppc64v2_emit_ops_impl): New static variable.
2307 (ppc_emit_ops): New function.
2308 (linux_low_target): Wire in ppc_emit_ops.
2309
a2174ba4
MK
23102016-03-31 Wei-cheng Wang <cole945@gmail.com>
2311 Marcin Kościelnicki <koriakin@0x04.net>
2312
2313 PR/17221
2314 * Makefile.in: Add powerpc-*-ipa.o
2315 * configure.srv: Add ipa_obj for powerpc*-linux.
2316 * linux-ppc-ipa.c: New file.
2317 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2318 includes.
2319 (PPC_FIELD): New macro.
2320 (PPC_SEXT): New macro.
2321 (PPC_OP6): New macro.
2322 (PPC_BO): New macro.
2323 (PPC_LI): New macro.
2324 (PPC_BD): New macro.
2325 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2326 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2327 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2328 (ppc_get_thread_area): New function.
2329 (is_elfv2_inferior): New function.
2330 (gen_ds_form): New function.
2331 (GEN_STD): New macro.
2332 (GEN_STDU): New macro.
2333 (GEN_LD): New macro.
2334 (GEN_LDU): New macro.
2335 (gen_d_form): New function.
2336 (GEN_ADDI): New macro.
2337 (GEN_ADDIS): New macro.
2338 (GEN_LI): New macro.
2339 (GEN_LIS): New macro.
2340 (GEN_ORI): New macro.
2341 (GEN_ORIS): New macro.
2342 (GEN_LWZ): New macro.
2343 (GEN_STW): New macro.
2344 (GEN_STWU): New macro.
2345 (gen_xfx_form): New function.
2346 (GEN_MFSPR): New macro.
2347 (GEN_MTSPR): New macro.
2348 (GEN_MFCR): New macro.
2349 (GEN_MTCR): New macro.
2350 (GEN_SYNC): New macro.
2351 (GEN_LWSYNC): New macro.
2352 (gen_x_form): New function.
2353 (GEN_OR): New macro.
2354 (GEN_MR): New macro.
2355 (GEN_LWARX): New macro.
2356 (GEN_STWCX): New macro.
2357 (GEN_CMPW): New macro.
2358 (gen_md_form): New function.
2359 (GEN_RLDICL): New macro.
2360 (GEN_RLDICR): New macro.
2361 (gen_i_form): New function.
2362 (GEN_B): New macro.
2363 (GEN_BL): New macro.
2364 (gen_b_form): New function.
2365 (GEN_BNE): New macro.
2366 (GEN_LOAD): New macro.
2367 (GEN_STORE): New macro.
2368 (gen_limm): New function.
2369 (gen_atomic_xchg): New function.
2370 (gen_call): New function.
2371 (ppc_relocate_instruction): New function.
2372 (ppc_install_fast_tracepoint_jump_pad): New function.
2373 (ppc_get_min_fast_tracepoint_insn_len): New function.
2374 (ppc_get_ipa_tdesc_idx): New function.
2375 (the_low_target): Wire in the new functions.
2376 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2377 tdescs.
2378 * linux-ppc-tdesc.h: New file.
2379
a13c4696
MK
23802016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2381
2382 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2383 (alloc_jump_pad_buffer): New function.
2384 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2385 (alloc_jump_pad_buffer): New function.
2386 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2387 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2388 (alloc_jump_pad_buffer): New function.
2389 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2390 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2391 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2392 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2393
1cda1512
MK
23942016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2395
2396 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2397 * linux-amd64-ipa.c: Likewise.
2398 * linux-i386-ipa.c: Likewise.
2399 * linux-s390-ipa.c: Likewise.
2400 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2401 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2402 set_trace_state_variable_value_ptr.
2403 (struct ipa_sym_addresses): Likewise.
2404 (symbol_list): Likewise.
2405 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2406 accessing gdb_collect directly.
2407 (gdb_collect_ptr_type): New typedef.
2408 (get_raw_reg_ptr_type): New typedef.
2409 (get_trace_state_variable_value_ptr_type): New typedef.
2410 (set_trace_state_variable_value_ptr_type): New typedef.
2411 (gdb_collect_ptr): New global.
2412 (get_raw_reg_ptr): New global.
2413 (get_trace_state_variable_value_ptr): New global.
2414 (set_trace_state_variable_value_ptr): New global.
2415 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2416 accessing get_raw_reg directly.
2417 (get_get_tsv_func_addr): Likewise for
2418 get_trace_state_variable_value_ptr.
2419 (get_set_tsv_func_addr): Likewise for
2420 set_trace_state_variable_value_ptr.
2421 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2422
72fb5488
SM
24232016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2424
2425 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2426
28170b88
MK
24272016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2428
2429 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2430 packets.
2431 (relocate_instruction): Remove own_buf.
2432 * server.c (own_buf): Make global.
2433 (handle_v_requests): Make global.
2434 * server.h (own_buf): New declaration.
2435 (handle_v_requests): New prototype.
2436
f39e8743
MK
24372016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2438
2439 PR 18377
2440 * linux-s390-low.c (add_insns): New function.
2441 (s390_emit_prologue): New function.
2442 (s390_emit_epilogue): New function.
2443 (s390_emit_add): New function.
2444 (s390_emit_sub): New function.
2445 (s390_emit_mul): New function.
2446 (s390_emit_lsh): New function.
2447 (s390_emit_rsh_signed): New function.
2448 (s390_emit_rsh_unsigned): New function.
2449 (s390_emit_ext): New function.
2450 (s390_emit_log_not): New function.
2451 (s390_emit_bit_and): New function.
2452 (s390_emit_bit_or): New function.
2453 (s390_emit_bit_xor): New function.
2454 (s390_emit_bit_not): New function.
2455 (s390_emit_equal): New function.
2456 (s390_emit_less_signed): New function.
2457 (s390_emit_less_unsigned): New function.
2458 (s390_emit_ref): New function.
2459 (s390_emit_if_goto): New function.
2460 (s390_emit_goto): New function.
2461 (s390_write_goto_address): New function.
2462 (s390_emit_litpool): New function.
2463 (s390_emit_const): New function.
2464 (s390_emit_call): New function.
2465 (s390_emit_reg): New function.
2466 (s390_emit_pop): New function.
2467 (s390_emit_stack_flush): New function.
2468 (s390_emit_zero_ext): New function.
2469 (s390_emit_swap): New function.
2470 (s390_emit_stack_adjust): New function.
2471 (s390_emit_set_r2): New function.
2472 (s390_emit_int_call_1): New function.
2473 (s390_emit_void_call_2): New function.
2474 (s390_emit_eq_goto): New function.
2475 (s390_emit_ne_goto): New function.
2476 (s390_emit_lt_goto): New function.
2477 (s390_emit_le_goto): New function.
2478 (s390_emit_gt_goto): New function.
2479 (s390_emit_ge_goto): New function.
2480 (s390x_emit_prologue): New function.
2481 (s390x_emit_epilogue): New function.
2482 (s390x_emit_add): New function.
2483 (s390x_emit_sub): New function.
2484 (s390x_emit_mul): New function.
2485 (s390x_emit_lsh): New function.
2486 (s390x_emit_rsh_signed): New function.
2487 (s390x_emit_rsh_unsigned): New function.
2488 (s390x_emit_ext): New function.
2489 (s390x_emit_log_not): New function.
2490 (s390x_emit_bit_and): New function.
2491 (s390x_emit_bit_or): New function.
2492 (s390x_emit_bit_xor): New function.
2493 (s390x_emit_bit_not): New function.
2494 (s390x_emit_equal): New function.
2495 (s390x_emit_less_signed): New function.
2496 (s390x_emit_less_unsigned): New function.
2497 (s390x_emit_ref): New function.
2498 (s390x_emit_if_goto): New function.
2499 (s390x_emit_const): New function.
2500 (s390x_emit_call): New function.
2501 (s390x_emit_reg): New function.
2502 (s390x_emit_pop): New function.
2503 (s390x_emit_stack_flush): New function.
2504 (s390x_emit_zero_ext): New function.
2505 (s390x_emit_swap): New function.
2506 (s390x_emit_stack_adjust): New function.
2507 (s390x_emit_int_call_1): New function.
2508 (s390x_emit_void_call_2): New function.
2509 (s390x_emit_eq_goto): New function.
2510 (s390x_emit_ne_goto): New function.
2511 (s390x_emit_lt_goto): New function.
2512 (s390x_emit_le_goto): New function.
2513 (s390x_emit_gt_goto): New function.
2514 (s390x_emit_ge_goto): New function.
2515 (s390_emit_ops): New function.
2516 (struct linux_target_ops): Fill in emit_ops hook.
2517
abd9baf9
MK
25182016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2519
2520 PR 18377
2521 * Makefile.in: Add s390 IPA files.
2522 * configure.srv: Build IPA for s390.
2523 * linux-s390-ipa.c: New file.
2524 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2525 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2526 (tdesc_s390_linux32): Likewise.
2527 (init_registers_s390_linux32v1): Likewise.
2528 (tdesc_s390_linux32v1): Likewise.
2529 (init_registers_s390_linux32v2): Likewise.
2530 (tdesc_s390_linux32v2): Likewise.
2531 (init_registers_s390_linux64): Likewise.
2532 (tdesc_s390_linux64): Likewise.
2533 (init_registers_s390_linux64v1): Likewise.
2534 (tdesc_s390_linux64v1): Likewise.
2535 (init_registers_s390_linux64v2): Likewise.
2536 (tdesc_s390_linux64v2): Likewise.
2537 (init_registers_s390_te_linux64): Likewise.
2538 (tdesc_s390_te_linux64): Likewise.
2539 (init_registers_s390_vx_linux64): Likewise.
2540 (tdesc_s390_vx_linux64): Likewise.
2541 (init_registers_s390_tevx_linux64): Likewise.
2542 (tdesc_s390_tevx_linux64): Likewise.
2543 (init_registers_s390x_linux64): Likewise.
2544 (tdesc_s390x_linux64): Likewise.
2545 (init_registers_s390x_linux64v1): Likewise.
2546 (tdesc_s390x_linux64v1): Likewise.
2547 (init_registers_s390x_linux64v2): Likewise.
2548 (tdesc_s390x_linux64v2): Likewise.
2549 (init_registers_s390x_te_linux64): Likewise.
2550 (tdesc_s390x_te_linux64): Likewise.
2551 (init_registers_s390x_vx_linux64): Likewise.
2552 (tdesc_s390x_vx_linux64): Likewise.
2553 (init_registers_s390x_tevx_linux64): Likewise.
2554 (tdesc_s390x_tevx_linux64): Likewise.
2555 (have_hwcap_s390_vx): New static variable.
2556 (s390_arch_setup): Fill have_hwcap_s390_vx.
2557 (s390_get_thread_area): New function.
2558 (s390_ft_entry_gpr_esa): New const.
2559 (s390_ft_entry_gpr_zarch): New const.
2560 (s390_ft_entry_misc): New const.
2561 (s390_ft_entry_fr): New const.
2562 (s390_ft_entry_vr): New const.
2563 (s390_ft_main_31): New const.
2564 (s390_ft_main_64): New const.
2565 (s390_ft_exit_fr): New const.
2566 (s390_ft_exit_vr): New const.
2567 (s390_ft_exit_misc): New const.
2568 (s390_ft_exit_gpr_esa): New const.
2569 (s390_ft_exit_gpr_zarch): New const.
2570 (append_insns): New function.
2571 (s390_relocate_instruction): New function.
2572 (s390_install_fast_tracepoint_jump_pad): New function.
2573 (s390_get_min_fast_tracepoint_insn_len): New function.
2574 (s390_get_ipa_tdesc_idx): New function.
2575 (struct linux_target_ops): Wire in the above functions.
2576 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2577 * linux-s390-tdesc.h: New file.
2578
a4105d04
MK
25792016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2580
2581 * linux-s390-low.c (s390_supports_tracepoints): New function.
2582 (struct linux_target_ops): Fill supports_tracepoints hook.
2583
35ac8b3e
YQ
25842016-03-18 Yao Qi <yao.qi@linaro.org>
2585
2586 * linux-low.c (lwp_signal_can_be_delivered): New function.
2587 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2588
94610ec4
YQ
25892016-03-18 Yao Qi <yao.qi@linaro.org>
2590
2591 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2592 0 if signal is enqueued. Remove 'signal' from one debugging
2593 message. Move one debugging message to some lines below.
2594 Remove code setting 'signal' to 0.
2595
80aea927
YQ
25962016-03-18 Yao Qi <yao.qi@linaro.org>
2597
2598 * linux-low.c (linux_low_filter_event): Remove redundant
2599 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2600
b04fd3be
MK
26012016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2602
2603 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2604 (struct linux_target_ops): Wire in the above.
2605
c40c8d4b
YQ
26062016-03-03 Yao Qi <yao.qi@linaro.org>
2607
2608 * linux-low.c: Update comments to start_step_over.
2609
0f8288ae
YQ
26102016-03-03 Yao Qi <yao.qi@linaro.org>
2611
2612 PR server/19736
2613 * linux-low.c (handle_extended_wait): Set child suspended
2614 if event_lwp->bp_reinsert isn't zero.
2615
fdbd04a8
YQ
26162016-03-02 Yao Qi <yao.qi@linaro.org>
2617
2618 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2619 enqueue_pending_signal.
2620
6896a8fa
MK
26212016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2622
2623 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2624 is actually loaded.
2625
ab503087
MK
26262016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2627
2628 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2629 (s390_regmap_3264) [!__s390x__]: New global.
2630 (s390_collect_ptrace_register): Skip map entries containing -1.
2631 (s390_supply_ptrace_register): Ditto.
2632 (s390_fill_gprs_high): New function.
2633 (s390_store_gprs_high): New function.
2634 (s390_regsets): Add NT_S390_HIGH_GPRS.
2635 (s390_get_hwcap): Enable on 31-bit.
2636 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2637 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2638 Detect NT_S390_HIGH_GPRS.
2639 (s390_usrregs_info_3264): Enable on 31-bit.
2640 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2641 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2642
ae91f625
MK
26432016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2644
2645 PR gdb/13808
2646 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2647 * configure.srv: Ditto.
2648 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2649 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2650 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2651 (init_registers_amd64_linux): Remove prototype.
2652 (tdesc_amd64_linux): Remove declaration.
2653 (get_ipa_tdesc): New function.
2654 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2655 initialize remaining tdescs.
2656 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2657 (init_registers_i386_linux): Remove prototype.
2658 (tdesc_i386_linux): Remove declaration.
2659 (get_ipa_tdesc): New function.
2660 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2661 initialize remaining tdescs.
2662 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2663 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2664 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2665 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2666 (x86_get_ipa_tdesc_idx): New function.
2667 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2668 * linux-x86-tdesc.h: New file.
2669 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2670 (target_get_ipa_tdesc_idx): New macro.
2671 * tracepoint.c (ipa_tdesc_idx): New macro.
2672 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2673 (symbol_list): Add ipa_tdesc_idx.
2674 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2675 (ipa_tdesc): Remove.
2676 (ipa_tdesc_idx): New variable.
2677 (get_context_regcache): Use get_ipa_tdesc.
2678 (gdb_collect): Ditto.
2679 (gdb_probe): Ditto.
2680 * tracepoint.h (get_ipa_tdesc): New prototype.
2681 (ipa_tdesc): Remove.
2682
e7ad2f14
PA
26832016-02-24 Pedro Alves <palves@redhat.com>
2684
2685 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2686 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2687 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2688 Factor out common code between the USE_SIGTRAP_SIGINFO and
2689 !USE_SIGTRAP_SIGINFO blocks.
2690 (linux_low_filter_event): Call save_stop_reason instead of
2691 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2692 Update comments.
2693 (linux_wait_1): Update comments.
2694
657f9cde
WW
26952016-02-24 Wei-cheng Wang <cole945@gmail.com>
2696
2697 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2698 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2699 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2700 ppc_insert_point, ppc_remove_point.
2701
b00b61e1
MK
27022016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2703
2704 * linux-s390-low.c (s390_supports_z_point_type): New function.
2705 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2706
553cb527
YQ
27072016-02-16 Yao Qi <yao.qi@linaro.org>
2708
2709 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2710 PC. Get pc from regcache_read_pc.
2711
a5652c21
YQ
27122016-02-12 Yao Qi <yao.qi@linaro.org>
2713
2714 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2715 or linux_get_pc_32bit.
2716 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2717
ed443b61
YQ
27182016-02-12 Yao Qi <yao.qi@linaro.org>
2719
2720 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2721 arm_linux_get_next_pcs_fixup.
2722
020ecd38
MK
27232016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2724
2725 * tracepoint.c (x_tracepoint_action_download): Change
2726 write_inferior_data_ptr to write_inferior_data_pointer.
2727 (cmd_qtstart): Likewise.
2728 (write_inferior_data_ptr): Remove.
2729 (download_agent_expr): Change write_inferior_data_ptr to
2730 write_inferior_data_pointer.
2731 (download_tracepoint_1): Likewise.
2732 (download_tracepoint): Likewise.
2733 (download_trace_state_variables): Likewise.
2734
7cae9051
WW
27352016-02-11 Wei-cheng Wang <cole945@gmail.com>
2736 Marcin Kościelnicki <koriakin@0x04.net>
2737
2738 * tracepoint.c (struct tracepoint_action_ops): Remove.
2739 (struct tracepoint_action): Remove ops.
2740 (m_tracepoint_action_download, r_tracepoint_action_download)
2741 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2742 size and offset accordingly.
2743 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2744 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2745 (tracepoint_action_send, tracepoint_action_download): New functions.
2746 Helpers for trace action handlers.
2747 (add_tracepoint_action): Remove setup actions ops.
2748 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2749
9f6a71b4
YQ
27502016-02-10 Yao Qi <yao.qi@linaro.org>
2751
2752 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2753
1e94266c
SM
27542016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2755
2756 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2757 to AC_OUTPUT.
2758 * configure: Regenerate.
2759
8adce034
SM
27602016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2761
2762 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2763 void * to gdb_byte *.
2764 * linux-low.c (siginfo_fixup): Likewise.
2765 (linux_xfer_siginfo): Likewise.
2766 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2767 Likewise.
2768 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2769
93813b37
WT
27702016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2771
2772 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2773 to srv_tgtobj.
2774 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2775 to srv_tgtobj.
2776 * linux-x86-low.c [__x86_64__]: Include
2777 "nat/amd64-linux-siginfo.h".
2778 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2779 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2780 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2781 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2782 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2783 (cpt_si_fd, si_timerid, si_overrun): Move from
2784 nat/amd64-linux-siginfo.c.
2785 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2786
8424cc97
SM
27872016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2788
2789 * server.c (skip_to_semicolon): Remove.
2790 (process_point_options): Use strchrnul instead of
2791 skip_to_semicolon.
2792
4d18591b
YQ
27932016-01-26 Yao Qi <yao.qi@linaro.org>
2794
2795 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2796 * linux-low.c (install_software_single_step_breakpoints): Don't
2797 call regcache_read_pc.
2798 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2799 argument pc.
2800
d8020970
YQ
28012016-01-26 Yao Qi <yao.qi@linaro.org>
2802
2803 * linux-low.c (install_software_single_step_breakpoints): Call
2804 regcache_read_pc instead of get_pc.
2805
8b207339
YQ
28062016-01-26 Yao Qi <yao.qi@linaro.org>
2807
2808 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2809 (unblock_async_io): Rename to ...
2810 (block_unblock_async_io): ... it. New function.
2811 (enable_async_io): Don't install SIGIO handler. Unblock it
2812 instead.
2813 (disable_async_io): Don't ignore SIGIO. Block it instead.
2814 (initialize_async_io): Install SIGIO handler. Don't call
2815 unblock_async_io.
2816
18879fef
YQ
28172016-01-26 Yao Qi <yao.qi@linaro.org>
2818
2819 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2820 first character is '\003', call *the_target->request_interrupt.
2821
a0f8e08a
YQ
28222016-01-25 Yao Qi <yao.qi@linaro.org>
2823
2824 * remote-utils.c (new_thread_notify): Remove.
2825 (dead_thread_notify): Likewise.
2826 * remote-utils.h (new_thread_notify): Remove declaration.
2827 (dead_thread_notify): Likewise.
2828
cc5fd9ab
MK
28292016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2830
2831 * gdb.trace/pending.exp: Fix expected message on continue.
2832
99e8eb11
MK
28332016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2834
2835 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2836 it works properly on big-endian machines where sizeof (CORE_ADDR)
2837 != sizeof (void *).
2838
a994041d
PA
28392016-01-21 Pedro Alves <palves@redhat.com>
2840
2841 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2842 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2843 * configure: Regenerate.
2844
f7a6a40d
YQ
28452016-01-21 Yao Qi <yao.qi@linaro.org>
2846
2847 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2848 is_thumb and set it according to CPSR saved on the stack.
2849 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2850 arm_sigreturn_next_pc.
2851
6f69e520
YQ
28522016-01-18 Yao Qi <yao.qi@linaro.org>
2853
2854 * linux-low.c (linux_set_pc_64bit): New function.
2855 (linux_get_pc_64bit): New function.
2856 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2857 Declare.
2858 * linux-sparc-low.c (debug_threads): Remove declaration.
2859 (sparc_get_pc): Remove.
2860 (the_low_target): Use linux_get_pc_64bit instead of
2861 sparc_get_pc.
2862 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2863 (the_low_target): Use linux_get_pc_64bit and
2864 linux_set_pc_64bit.
2865
276d4552
YQ
28662016-01-18 Yao Qi <yao.qi@linaro.org>
2867
2868 * linux-arm-low.c (debug_threads): Remove declaration.
2869 (arm_get_pc, arm_set_pc): Remove.
2870 (the_low_target): Use linux_get_pc_32bit and
2871 linux_set_pc_32bit.
2872 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2873 (the_low_target): Use linux_get_pc_32bit and
2874 linux_set_pc_32bit.
2875 * linux-cris-low.c (debug_threads): Remove declaration.
2876 (cris_get_pc, cris_set_pc,): Remove.
2877 (the_low_target): Use linux_get_pc_32bit and
2878 linux_set_pc_32bit.
2879 * linux-crisv32-low.c (debug_threads): Remove declaration.
2880 (cris_get_pc, cris_set_pc): Remove.
2881 (the_low_target): Use linux_get_pc_32bit and
2882 linux_set_pc_32bit.
2883 * linux-low.c: Include inttypes.h.
2884 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2885 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2886 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2887 (the_low_target): Use linux_get_pc_32bit and
2888 linux_set_pc_32bit.
2889 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2890 (the_low_target): Use linux_get_pc_32bit and
2891 linux_set_pc_32bit.
2892 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2893 (the_low_target): Use linux_get_pc_32bit and
2894 linux_set_pc_32bit.
2895 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2896 (the_low_target): Use linux_get_pc_32bit and
2897 linux_set_pc_32bit.
2898 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2899 (the_low_target): Use linux_get_pc_32bit and
2900 linux_set_pc_32bit.
2901
eb0edac8
GB
29022016-01-18 Gary Benson <gbenson@redhat.com>
2903
2904 * configure.ac (AC_FUNC_FORK): New check.
2905 * config.in: Regenerate.
2906 * configure: Likewise.
2907
1b451dda
YQ
29082016-01-14 Yao Qi <yao.qi@linaro.org>
2909
2910 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2911 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2912 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2913 arm_get_next_pcs_ctor.
2914
82075af2
JS
29152016-01-12 Josh Stone <jistone@redhat.com>
2916 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2917
2918 * inferiors.h: Include "gdb_vecs.h".
2919 (struct process_info): Add syscalls_to_catch.
2920 * inferiors.c (remove_process): Free syscalls_to_catch.
2921 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2922 syscall_return stops.
2923 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2924 * server.c (handle_general_set): Handle QCatchSyscalls.
2925 (handle_query): Report support for QCatchSyscalls.
2926 * target.h (struct target_ops): Add supports_catch_syscall.
2927 (target_supports_catch_syscall): New macro.
2928 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2929 (struct lwp_info): Add syscall_state.
2930 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2931 Maintain syscall_state and syscalls_to_catch across exec.
2932 (get_syscall_trapinfo): New function, proxy to the_low_target.
2933 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2934 (linux_low_filter_event): Toggle syscall_state entry/return for
2935 syscall traps, and set it ignored for all others.
2936 (gdb_catching_syscalls_p): New function.
2937 (gdb_catch_this_syscall_p): New function.
2938 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2939 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2940 (linux_supports_catch_syscall): New function.
2941 (linux_target_ops): Install it.
2942 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2943 (the_low_target): Install it.
2944
8f13a3ce
MF
29452016-01-12 Mike Frysinger <vapier@gentoo.org>
2946
2947 * acinclude.m4: Include new ../warning.m4 file.
2948 * configure: Regenerated.
2949 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2950
5b3da067
MF
29512016-01-12 Mike Frysinger <vapier@gentoo.org>
2952
2953 * ax.c (is_goto_target): Mark static.
2954 * linux-low.c (register_addr): Likewise.
2955 (linux_fetch_registers, linux_store_registers): Likewise.
2956 * mem-break.c (any_persistent_commands): Fix old prototype.
2957 (add_commands_to_breakpoint): Mark static.
2958 * regcache.c (find_register_by_name): Delete unused func.
2959 * remote-utils.c (hex_or_minus_one): Mark static.
2960 * server.c (monitor_show_help): Mark static.
2961 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2962 handle_v_requests): Likewise.
2963
bc504a31
PA
29642016-01-12 Pedro Alves <palves@redhat.com>
2965
2966 Remove use of the registered trademark symbol throughout.
2967
5a0dd67a
YQ
29682016-01-08 Yao Qi <yao.qi@linaro.org>
2969
2970 * remote-utils.c (getpkt): If c is '\003', call target hook
2971 request_interrupt.
2972
b2ca446f
YQ
29732016-01-06 Yao Qi <yao.qi@linaro.org>
2974
2975 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2976 linux-aarch32-low.c.
2977 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2978 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2979 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2980 (thumb2_breakpoint): Declare.
2981 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2982 linux-aarch32-low.h.
2983 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2984 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2985 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2986
edd88788
JB
29872016-01-01 Joel Brobecker <brobecker@adacore.com>
2988
2989 * gdbreplay.c (gdbreplay_version): Change copyright year in
2990 version message.
2991 * server.c (gdbserver_version): Likewise.
2992
65da7f14
PP
29932015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2994
2995 * server.c (crc32_table): Delete.
2996 (crc32): Use libiberty's xcrc32 function.
2997
4abd5ed2
JB
29982015-12-22 Joel Brobecker <brobecker@adacore.com>
2999
3000 * lynx-low.c (lynx_delete_thread_callback): New function.
3001 (lynx_mourn): Properly delete our process and all of its
3002 threads. Remove call to clear_inferiors.
3003
0e50fe5c
JB
30042015-12-22 Joel Brobecker <brobecker@adacore.com>
3005
3006 * target.c (thread_search_callback): Add check that
3007 the thread_stopped target callback is not NULL before
3008 calling it.
3009
35adc03f
YQ
30102015-12-21 Yao Qi <yao.qi@linaro.org>
3011
3012 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3013 arm breakpoint.
3014
bd2b2909
AT
30152015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3016
3017 * server.c (handle_query): Call target_supports_software_single_step.
3018
7fe5e27e
AT
30192015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3020
3021 * linux-low.c (single_step): New function.
3022 (linux_resume_one_lwp_throw): Call single_step.
3023 (start_step_over): Likewise.
3024
d9311bfa
AT
30252015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3026
3027 * Makefile.in (SFILES): Append arch/arm-linux.c,
3028 arch/arm-get-next-pcs.c.
3029 (arm-linux.o): New rule.
3030 (arm-get-next-pcs.o): New rule.
3031 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3032 arm-linux.o.
3033 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3034 to linux-aarch32-low.c.
3035 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3036 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3037 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3038 (thumb2_breakpoint_len): Likewise.
3039 (arm_is_thumb_mode): Make non-static.
3040 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3041 from linux-aarch32-low.c.
3042 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3043 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3044 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3045 (thumb2_breakpoint_len): Likewise.
3046 (arm_is_thumb_mode): New declaration.
3047 * linux-arm-low.c: Include arch/arm-linux.h
3048 aarch/arm-get-next-pcs.h, sys/syscall.h.
3049 (get_next_pcs_ops): New struct.
3050 (get_next_pcs_addr_bits_remove): New function.
3051 (get_next_pcs_is_thumb): New function.
3052 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3053 (arm_sigreturn_next_pc): Likewise.
3054 (get_next_pcs_syscall_next_pc): Likewise.
3055 (arm_gdbserver_get_next_pcs): Likewise.
3056 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3057 Initialize.
3058 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3059 * server.h: Include gdb_vecs.h.
3060
68ce2059
AT
30612015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3062
3063 * Makefile.in (SFILES): Append common/common-regcache.c.
3064 (OBS): Append common-regcache.o.
3065 (common-regcache.o): New rule.
3066 * regcache.c (init_register_cache): Initialize cache to
3067 REG_UNAVAILABLE.
3068 (regcache_raw_read_unsigned): New function.
3069 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3070 register_status enum.
3071
fa5308bd
AT
30722015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3073
3074 * linux-aarch64-low.c (the_low_targets): Rename
3075 breakpoint_reinsert_addr to get_next_pcs.
3076 * linux-arm-low.c (the_low_targets): Likewise.
3077 * linux-bfin-low.c (the_low_targets): Likewise.
3078 * linux-cris-low.c (the_low_targets): Likewise.
3079 * linux-crisv32-low.c (the_low_targets): Likewise.
3080 * linux-low.c (can_software_single_step): Likewise.
3081 (install_software_single_step_breakpoints): New function.
3082 (start_step_over): Use install_software_single_step_breakpoints.
3083 * linux-low.h: New CORE_ADDR vector.
3084 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3085 get_next_pcs.
3086 * linux-mips-low.c (the_low_targets): Likewise.
3087 * linux-nios2-low.c (the_low_targets): Likewise.
3088 * linux-sparc-low.c (the_low_targets): Likewise.
3089
4a6ed09b
PA
30902015-12-17 Pedro Alves <palves@redhat.com>
3091
3092 * linux-low.c (linux_kill_one_lwp): Remove references to
3093 LinuxThreads.
3094 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3095 to 'kill'.
3096 (linux_init_signals): Delete.
3097 (initialize_low): Adjust.
3098 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3099
7544db95
PA
31002015-12-16 Pedro Alves <palves@redhat.com>
3101
3102 * configure.ac (compiler warning flags): When testing a
3103 -Wno-foo option, check whether -Wfoo works instead.
3104 * configure: Regenerate.
3105
8020350c
DB
31062015-12-11 Don Breazeal <donb@codesourcery.com>
3107
3108 * server.c (process_serial_event): Don't exit from gdbserver
3109 in remote mode if there are still active inferiors.
3110
db91f502
YQ
31112015-12-11 Yao Qi <yao.qi@linaro.org>
3112
3113 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3114 arm_breakpoint_at if the process is 32-bit.
3115
b37a6290
YQ
31162015-12-11 Yao Qi <yao.qi@linaro.org>
3117
3118 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3119 arm breakpoint.
3120
17b1509a
YQ
31212015-12-07 Yao Qi <yao.qi@linaro.org>
3122
3123 * configure.srv: Append arm.o to srv_tgtobj for
3124 aarch64*-*-linux* target.
3125 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3126 from linux-arm-low.c.
3127 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3128 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3129 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3130 (thumb2_breakpoint_len): Likewise.
3131 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3132 (arm_breakpoint_kinds): Likewise.
3133 (arm_breakpoint_kind_from_pc): Likewise.
3134 (arm_sw_breakpoint_from_kind): Likewise.
3135 (arm_breakpoint_kind_from_current_state): Likewise.
3136 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3137 (arm_sw_breakpoint_from_kind): Declare.
3138 (arm_breakpoint_kind_from_current_state): Declare.
3139 (arm_breakpoint_at): Declare.
3140 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3141 arm_sw_breakpoint_from_kind if process is 32-bit.
3142 (aarch64_breakpoint_kind_from_pc): New function.
3143 (aarch64_breakpoint_kind_from_current_state): New function.
3144 (the_low_target): Initialize fields breakpoint_kind_from_pc
3145 and breakpoint_kind_from_current_state.
3146 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3147 linux-aarch32-low.c.
3148 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3149 (arm_breakpoint, arm_breakpoint_len): Likewise.
3150 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3151 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3152 (arm_is_thumb_mode): Likewise.
3153 (arm_breakpoint_at): Likewise.
3154 (arm_breakpoint_kind_from_pc): Likewise.
3155 (arm_sw_breakpoint_from_kind): Likewise.
3156 (arm_breakpoint_kind_from_current_state): Likewise.
3157
3158 Revert:
3159 2015-08-04 Yao Qi <yao.qi@linaro.org>
3160
3161 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3162 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3163 * server.c (extended_protocol): Remove "static".
3164 * server.h (extended_protocol): Declare it.
3165
ece66d65
JS
31662015-12-04 Josh Stone <jistone@redhat.com>
3167
3168 * target.h (struct target_ops) <arch_setup>: Rename to ...
3169 (struct target_ops) <post_create_inferior>: ... this.
3170 (target_arch_setup): Rename to ...
3171 (target_post_create_inferior): ... this, calling post_create_inferior.
3172 * server.c (start_inferior): Update target_arch_setup calls to
3173 target_post_create_inferior.
3174 * linux-low.c (linux_low_ptrace_options): Forward declare.
3175 (linux_arch_setup): Update its comment for general use.
3176 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3177 (struct linux_target_ops): Use linux_post_create_inferior.
3178 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3179 to post_create_inferior.
3180 * nto-low.c (struct nto_target_ops): Likewise.
3181 * spu-low.c (struct spu_target_ops): Likewise.
3182 * win32-low.c (struct win32_target_ops): Likewise.
3183
e58c48b4
AT
31842015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3185
3186 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3187
fbec8956
AT
31882015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3189
3190 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3191 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3192 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3193 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3194 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3195 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3196 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3197 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3198 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3199 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3200 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3201 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3202
9b4c5f87
AT
32032015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3204
3205 * linux-low.c (linux_look_up_symbols): Don't call
3206 linux_supports_traceclone.
3207 * linux-low.h (thread_db_init): Remove use_events argument.
3208 * thread-db.c (thread_db_use_event): Remove global variable.
3209 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3210 (struct thread_db) <td_create_bp>: Remove field.
3211 (thread_db_create_event): Remove function.
3212 (thread_db_enable_reporting): Likewise.
3213 (find_one_thread): Don't check for thread_db_use_events.
3214 (attach_thread): Likewise.
3215 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3216 (try_thread_db_load_1): Don't check for thread_db_use_events.
3217 (thread_db_init): Remove use_events argument and thread events
3218 handling.
3219 (remove_thread_event_breakpoints): Remove function.
3220 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3221
7d00775e
AT
32222015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3223
3224 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3225 New function.
3226 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3227 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3228 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3229 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3230 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3231 Initialize.
3232 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3233 New function.
3234 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3235 * linux-low.c (can_hardware_single_step): Use
3236 supports_hardware_single_step.
3237 (can_software_single_step): New function.
3238 (start_step_over): Call can_software_single_step.
3239 (linux_supports_hardware_single_step): New function.
3240 (struct target_ops) <supports_software_single_step>: Initialize.
3241 * linux-low.h (struct linux_target_ops)
3242 <supports_hardware_single_step>: Initialize.
3243 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3244 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3245 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3246 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3247 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3248 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3249 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3250 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3251 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3252 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3253 Initialize.
3254 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3255 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3256 Initialize.
3257 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3258 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3259 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3260 New function.
3261 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3262 * target.h (struct target_ops): <supports_software_single_step>:
3263 New field.
3264 (target_supports_software_single_step): New macro.
3265
2d97cd35
AT
32662015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3267
3268 * linux-low.c (linux_wait_1): Fix pc advance condition.
3269 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3270 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3271
769ef81f
AT
32722015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3273
3274 * linux-arm-low.c (arm_is_thumb_mode): New function.
3275 (arm_breakpoint_at): Use arm_is_thumb_mode.
3276 (arm_breakpoint_kind_from_current_state): New function.
3277 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3278 Initialize.
3279 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3280 (linux_breakpoint_kind_from_current_state): New function.
3281 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3282 * linux-low.h (struct linux_target_ops)
3283 <breakpoint_kind_from_current_state>: New field.
3284 * target.h (struct target_ops): Likewise.
3285 (target_breakpoint_kind_from_current_state): New macro.
3286
1bebeeca
PA
32872015-11-30 Pedro Alves <palves@redhat.com>
3288
3289 * linux-low.c (linux_resume): Wake up the event loop before
3290 returning.
3291
a67a9fae
PA
32922015-11-30 Pedro Alves <palves@redhat.com>
3293
3294 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3295 check.
3296 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3297 to -1.
3298 * target.c (struct thread_search): New structure.
3299 (thread_search_callback): New function.
3300 (prev_general_thread): New global.
3301 (prepare_to_access_memory, done_accessing_memory): New functions.
3302 * target.h (prepare_to_access_memory, done_accessing_memory):
3303 Replace macros with function declarations.
3304
f2faf941
PA
33052015-11-30 Pedro Alves <palves@redhat.com>
3306
3307 PR 14618
3308 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3309 report TARGET_WAITKIND_NO_RESUMED.
3310 * remote-utils.c (prepare_resume_reply): Handle
3311 TARGET_WAITKIND_NO_RESUMED.
3312 * server.c (report_no_resumed): New global.
3313 (handle_query) <qSupported>: Handle "no-resumed+". Report
3314 "no-resumed+" support.
3315 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3316 return error if the client doesn't support no-resumed events.
3317 (push_stop_notification): New function.
3318 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3319 events if the client supports them.
3320
a681f9c9
PA
33212015-11-30 Pedro Alves <palves@redhat.com>
3322
3323 * linux-low.c (thread_still_has_status_pending_p): Don't check
3324 vCont;t here.
3325 (lwp_resumed): New function.
3326 (status_pending_p_callback): Return early if the LWP is not
3327 supposed to be resumed.
3328
65706a29
PA
33292015-11-30 Pedro Alves <palves@redhat.com>
3330
3331 * linux-low.c (handle_extended_wait): Assert that the LWP's
3332 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3333 thread create events, leave the new child's status pending.
3334 (linux_low_filter_event): If GDB wants to hear about thread exit
3335 events, leave the LWP marked dead and don't delete it.
3336 (linux_wait_for_event_filtered): Don't check for thread exit.
3337 (filter_exit_event): New function.
3338 (linux_wait_1): Use it, when returning an exit event.
3339 (linux_resume_one_lwp_throw): Assert that the LWP's
3340 waitstatus is TARGET_WAITKIND_IGNORE.
3341 * remote-utils.c (prepare_resume_reply): Handle
3342 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3343 * server.c (report_thread_events): New global.
3344 (handle_general_set): Handle QThreadEvents.
3345 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3346 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3347 TARGET_WAITKIND_THREAD_EXITED.
3348 * server.h (report_thread_events): Declare.
3349
56cf4bed
PA
33502015-11-30 Pedro Alves <palves@redhat.com>
3351
3352 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3353 the thread's last_resume_kind was resume_stop.
3354
500c1d85
PA
33552015-11-30 Pedro Alves <palves@redhat.com>
3356
3357 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3358 before returning.
3359
de979965
PA
33602015-11-30 Pedro Alves <palves@redhat.com>
3361
3362 * server.c (handle_v_requests): Handle vCtrlC.
3363
34c65914
PA
33642015-11-30 Pedro Alves <palves@redhat.com>
3365
3366 * gdbthread.h (find_any_thread_of_pid): Declare.
3367 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3368 functions.
3369 * server.c (handle_query): If current_thread is NULL, look for
3370 another thread of the selected process.
3371
79efa585 33722015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3373 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3374
3375 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3376 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3377 name in reply.
3378 * target.h (struct target_ops) <thread_name>: New field.
3379 (target_thread_name): New macro.
3380
80d82c19
JB
33812015-11-23 Joel Brobecker <brobecker@adacore.com>
3382
3383 * regcache.h (regcache_invalidate_pid): Add declaration.
3384 * regcache.c (regcache_invalidate_pid): New function, extracted
3385 from regcache_invalidate.
3386 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3387 Add trivial documentation comment.
3388 * lynx-low.c: Use regcache_invalidate_pid instead of
3389 regcache_invalidate.
3390
64da5dd5
JB
33912015-11-23 Joel Brobecker <brobecker@adacore.com>
3392
3393 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3394 and Elf64_auxv_t if the target is Android.
3395
37ce4055
DE
33962015-11-22 Doug Evans <xdje42@gmail.com>
3397
3398 * target.h: #include <sys/types.h>.
3399
06e03fff
PA
34002015-11-19 Pedro Alves <palves@redhat.com>
3401
3402 * linux-low.c (linux_process_qsupported): Change prototype.
3403 Adjust.
3404 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3405 Change prototype.
3406 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3407 and adjust to loop over all features.
3408 * server.c (handle_query) <qSupported>: Adjust to call
3409 target_process_qsupported once, passing it a vector of unprocessed
3410 features.
3411 * target.h (struct target_ops) <process_qsupported>: Change
3412 prototype.
3413 (target_process_qsupported): Adjust.
3414
9a084706
PA
34152015-11-19 Pedro Alves <palves@redhat.com>
3416
3417 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3418 mode.
3419 * configure: Regenerate.
3420
dad44a1f
PA
34212015-11-19 Pedro Alves <palves@redhat.com>
3422
3423 * configure: Regenerate.
3424
231c0592
YQ
34252015-11-19 Yao Qi <yao.qi@linaro.org>
3426
3427 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3428 type to uint32_t.
3429
6c1c9a8b
YQ
34302015-11-19 Yao Qi <yao.qi@linaro.org>
3431
3432 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3433 (struct aarch64_operand): Move enum out.
3434
9caa3311
YQ
34352015-11-19 Yao Qi <yao.qi@linaro.org>
3436
3437 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3438 struct user_fpsimd_state *.
3439 (aarch64_store_fpregset): Likewise.
3440
6a69a054
YQ
34412015-11-19 Yao Qi <yao.qi@linaro.org>
3442
3443 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3444 struct user_pt_regs *.
3445 (aarch64_store_gregset): Likewise.
3446
1798301e
PA
34472015-11-18 Pedro Alves <palves@redhat.com>
3448
3449 * Makefile.in (all_object_files): Add $IPA_OBJS.
3450
ce7715e2
PA
34512015-11-17 Pedro Alves <palves@redhat.com>
3452
3453 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3454 GDB_SIGNAL_0 and gdb_signal_to_string.
3455
c0879059
PA
34562015-11-17 Pedro Alves <palves@redhat.com>
3457
3458 * win32-low.c (handle_output_debug_string): Remove parameter.
3459 (win32_kill): Remove our_status local and adjust call to
3460 handle_output_debug_string.
3461 (get_child_debug_event): Adjust call to
3462 handle_output_debug_string.
3463
1996e237
SM
34642015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3465
3466 * linux-mips-low.c (mips_fill_gregset): Add cast.
3467 (mips_store_gregset): Likewise.
3468 (mips_fill_fpregset): Likewise.
3469 (mips_store_fpregset): Likewise.
3470
cbec665b
SM
34712015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3472
3473 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3474 priv.
3475
eb3e3c67
SM
34762015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3477
3478 * linux-mips-low.c (mips_linux_new_thread): Change type of
3479 watch_type to enum target_hw_bp_type.
3480
171de4b8
SM
34812015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3482
3483 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3484 Change return type to arm_hwbp_type.
3485
04248ead
SM
34862015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3487
3488 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3489 (arm_store_gregset): Likewise.
3490 * linux-arm-low.c (arm_get_hwcap): Likewise.
3491 (arm_read_description): Likewise.
3492
04b3479c
SM
34932015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3494
3495 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3496
2bc84e8a
SM
34972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3498
3499 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3500 (ppc_fill_vsxregset): Likewise.
3501 (ppc_store_vsxregset): Likewise.
3502 (ppc_fill_vrregset): Likewise.
3503 (ppc_store_vrregset): Likewise.
3504 (ppc_fill_evrregset): Likewise.
3505 (ppc_store_evrregset): Likewise.
3506
e6c5bb05
SM
35072015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3508
3509 * linux-ppc-low.c (ppc_usrregs_info): Remove
3510 forward-declaration.
3511 (ppc_arch_setup): Move lower in file.
3512
7ea45d72
SM
35132015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3514
3515 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3516 (ps_pdwrite): Likewise.
3517
69291610
HW
35182015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3519
3520 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3521 to after assert checks.
3522
b42945fd
SM
35232015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3524
3525 * proc-service.c (ps_pdread): Add/adjust casts.
3526 (ps_pdwrite): Add/adjust casts.
3527
d6f85c84
SM
35282015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3529
3530 * server.c (handle_search_memory_1): Cast return value of
3531 memmem.
3532
f98cd059
SM
35332015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3534
3535 * server.c (write_qxfer_response): Change type of data to
3536 gdb_byte *.
3537
d2412fa5
PA
35382015-10-29 Pedro Alves <palves@redhat.com>
3539
3540 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3541
c17414a2
PA
35422015-10-29 Pedro Alves <palves@redhat.com>
3543
3544 * tracepoint.c (clear_installed_tracepoints): Add casts.
3545
e053fbc4
PA
35462015-10-29 Pedro Alves <palves@redhat.com>
3547
3548 * server.c (handle_v_cont, process_serial_event): Add enum
3549 gdb_signal casts to signal parsing code.
3550
add67df8
PA
35512015-10-29 Pedro Alves <palves@redhat.com>
3552
3553 * linux-low.h (NULL_REGSET): Define.
3554 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3555 * linux-arm-low.c (arm_regsets): Likewise.
3556 * linux-crisv32-low.c (cris_regsets): Likewise.
3557 * linux-m68k-low.c (m68k_regsets): Likewise.
3558 * linux-mips-low.c (mips_regsets): Likewise.
3559 * linux-nios2-low.c (nios2_regsets): Likewise.
3560 * linux-ppc-low.c (ppc_regsets): Likewise.
3561 * linux-s390-low.c (s390_regsets): Likewise.
3562 * linux-sh-low.c (sh_regsets): Likewise.
3563 * linux-sparc-low.c (sparc_regsets): Likewise.
3564 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3565 * linux-tile-low.c (tile_regsets): Likewise.
3566 * linux-x86-low.c (x86_regsets): Likewise.
3567 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3568
50bc912a
PA
35692015-10-29 Pedro Alves <palves@redhat.com>
3570
3571 * linux-low.h (NULL_REGSET): Define.
3572 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3573 * linux-arm-low.c (arm_regsets): Likewise.
3574 * linux-crisv32-low.c (cris_regsets): Likewise.
3575 * linux-m68k-low.c (m68k_regsets): Likewise.
3576 * linux-mips-low.c (mips_regsets): Likewise.
3577 * linux-nios2-low.c (nios2_regsets): Likewise.
3578 * linux-ppc-low.c (ppc_regsets): Likewise.
3579 * linux-s390-low.c (s390_regsets): Likewise.
3580 * linux-sh-low.c (sh_regsets): Likewise.
3581 * linux-sparc-low.c (sparc_regsets): Likewise.
3582 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3583 * linux-tile-low.c (tile_regsets): Likewise.
3584 * linux-x86-low.c (x86_regsets): Likewise.
3585 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3586
682b2546
DE
35872015-10-26 Doug Evans <dje@google.com>
3588
3589 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3590
963843d4
DE
35912015-10-26 Doug Evans <dje@google.com>
3592
3593 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3594
d41401ac
DE
35952015-10-26 Doug Evans <dje@google.com>
3596
3597 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3598 for debug_printf.
3599 (attach_thread, find_new_threads_callback): Ditto.
3600
3db28855
AT
36012015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3602
3603 * mem-break.h (set_breakpoint_data): Remove.
3604
fb78e89c
AT
36052015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3606
3607 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3608 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3609 (initialize_low): Remove set_breakpoint_data call.
3610 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3611 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3612 (initialize_low): Remove set_breakpoint_data call.
3613 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3614 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3615 (initialize_low): Remove set_breakpoint_data call.
3616
2e6ee069
AT
36172015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3618
3619 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3620 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3621 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3622 * target.h (target_breakpoint_kind_from_pc): New macro.
3623
1652a986
AT
36242015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3625
3626 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3627 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3628 the default breakpoint kind.
3629
abeead09
AT
36302015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3631
3632 * linux-arm-low.c (arm_supports_z_point_type): Add software
3633 breakpoint support.
3634
b0b4b501
AT
36352015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3636
3637 * linux-arm-low.c: Refactor breakpoint definitions.
3638 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3639 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3640
8689682c
AT
36412015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3642
3643 * Makefile.in: Add arm.c/o.
3644 * configure.srv: Likewise.
3645 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3646 (arm_breakpoint_kind_from_pc): New function.
3647 (arm_sw_breakpoint_from_kind): Return proper kind.
3648 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3649
27165294
AT
36502015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3651
3652 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3653 removal.
3654 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3655 (struct raw_breakpoint) <size>: Remove.
3656 (struct raw_breakpoint) <kind>: Add.
3657 (bp_size): New function.
3658 (bp_opcode): Likewise.
3659 (find_raw_breakpoint_at): Adjust for kind.
3660 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3661 (remove_memory_breakpoint): Adjust for kind call bp_size.
3662 (set_raw_breakpoint_at): Adjust for kind.
3663 (set_breakpoint): Likewise.
3664 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3665 (delete_raw_breakpoint): Adjust for kind.
3666 (delete_breakpoint): Likewise.
3667 (find_gdb_breakpoint): Likewise.
3668 (set_gdb_breakpoint_1): Likewise.
3669 (set_gdb_breakpoint): Likewise.
3670 (delete_gdb_breakpoint_1): Likewise.
3671 (delete_gdb_breakpoint): Likewise.
3672 (uninsert_raw_breakpoint): Likewise.
3673 (reinsert_raw_breakpoint): Likewise.
3674 (set_breakpoint_data): Remove.
3675 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3676 (check_mem_read): Adjust for kind call bp_size.
3677 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3678 (clone_one_breakpoint): Adjust for kind.
3679 * mem-break.h (set_gdb_breakpoint): Likewise.
3680 (delete_gdb_breakpoint): Likewise.
3681 * server.c (process_serial_event): Likewise.
3682
dd373349
AT
36832015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3684
3685 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3686 (struct linux_target_ops) <breakpoint>: Remove.
3687 (struct linux_target_ops) <breakpoint_len>: Remove.
3688 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3689 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3690 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3691 (arm_sw_breakpoint_from_kind): New function.
3692 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3693 (struct linux_target_ops) <breakpoint>: Remove.
3694 (struct linux_target_ops) <breakpoint_len>: Remove.
3695 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3696 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3697 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3698 (struct linux_target_ops) <breakpoint>: Remove.
3699 (struct linux_target_ops) <breakpoint_len>: Remove.
3700 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3701 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3702 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3703 (struct linux_target_ops) <breakpoint>: Remove.
3704 (struct linux_target_ops) <breakpoint_len>: Remove.
3705 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3706 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3707 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3708 and sw_breakpoint_from_kind to increment the pc.
3709 (linux_breakpoint_kind_from_pc): New function.
3710 (linux_sw_breakpoint_from_kind): New function.
3711 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3712 (initialize_low): Call breakpoint_kind_from_pc and
3713 sw_breakpoint_from_kind to replace breakpoint_data/len.
3714 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3715 New field.
3716 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3717 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3718 (struct linux_target_ops) <breakpoint>: Remove.
3719 (struct linux_target_ops) <breakpoint_len>: Remove.
3720 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3721 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3722 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3723 (struct linux_target_ops) <breakpoint>: Remove.
3724 (struct linux_target_ops) <breakpoint_len>: Remove.
3725 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3726 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3727 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3728 (struct linux_target_ops) <breakpoint>: Remove.
3729 (struct linux_target_ops) <breakpoint_len>: Remove.
3730 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3731 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3732 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3733 (struct linux_target_ops) <breakpoint>: Remove.
3734 (struct linux_target_ops) <breakpoint_len>: Remove.
3735 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3736 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3737 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3738 (struct linux_target_ops) <breakpoint>: Remove.
3739 (struct linux_target_ops) <breakpoint_len>: Remove.
3740 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3741 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3742 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3743 (struct linux_target_ops) <breakpoint>: Remove.
3744 (struct linux_target_ops) <breakpoint_len>: Remove.
3745 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3746 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3747 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3748 (struct linux_target_ops) <breakpoint>: Remove.
3749 (struct linux_target_ops) <breakpoint_len>: Remove.
3750 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3751 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3752 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3753 (struct linux_target_ops) <breakpoint>: Remove.
3754 (struct linux_target_ops) <breakpoint_len>: Remove.
3755 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3756 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3757 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3758 (struct linux_target_ops) <breakpoint>: Remove.
3759 (struct linux_target_ops) <breakpoint_len>: Remove.
3760 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3761 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3762 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3763 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3764 (struct linux_target_ops) <breakpoint>: Remove.
3765 (struct linux_target_ops) <breakpoint_len>: Remove.
3766 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3767 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3768 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3769 (struct linux_target_ops) <breakpoint>: Remove.
3770 (struct linux_target_ops) <breakpoint_len>: Remove.
3771 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3772 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3773
4cd98a19
AT
37742015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3775
3776 * linux-cris-low.c (cris_get_pc): Remove void arg.
3777
774ee6d2
AR
37782015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3779
3780 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3781 variable name.
3782
833dcd29
AR
37832015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3784
3785 * inferiors.c (thread_pid_matches_callback): New function.
3786 (find_thread_process): New function.
3787 (remove_thread): Reset current_thread.
3788 (remove_process): Assert threads have been removed first.
3789
8d689ee5
YQ
37902015-10-15 Yao Qi <yao.qi@linaro.org>
3791
3792 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3793 if it is 3.
3794 (aarch64_remove_point): Likewise.
3795 * regcache.c (regcache_register_size): New function.
3796
1c2e1515
YQ
37972015-10-12 Yao Qi <yao.qi@linaro.org>
3798
3799 * linux-aarch64-low.c: Update all callers as emit_load_store
3800 is renamed to aarch64_emit_load_store.
3801
e1c587c3
YQ
38022015-10-12 Yao Qi <yao.qi@linaro.org>
3803
3804 * linux-aarch64-low.c: Update all callers of function renaming
3805 from emit_insn to aarch64_emit_insn.
3806
b6542f81
YQ
38072015-10-12 Yao Qi <yao.qi@linaro.org>
3808
3809 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3810 arch/aarch64-insn.h.
3811 (struct aarch64_memory_operand): Likewise.
3812 (ENCODE): Likewise.
3813 (emit_insn): Move to arch/aarch64-insn.c.
3814 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3815 (emit_load_store): Move to arch/aarch64-insn.c.
3816 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3817 (can_encode_int32): Remove.
3818
246994ce
YQ
38192015-10-12 Yao Qi <yao.qi@linaro.org>
3820
3821 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3822 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3823 (aarch64_relocate_instruction): Likewise.
3824 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3825 (struct aarch64_insn_visitor): Likewise.
3826
0badd99f
YQ
38272015-10-12 Yao Qi <yao.qi@linaro.org>
3828
3829 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3830 (struct aarch64_insn_visitor): New.
3831 (struct aarch64_insn_relocation_data): New.
3832 (aarch64_ftrace_insn_reloc_b): New function.
3833 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3834 (aarch64_ftrace_insn_reloc_cb): Likewise.
3835 (aarch64_ftrace_insn_reloc_tb): Likewise.
3836 (aarch64_ftrace_insn_reloc_adr): Likewise.
3837 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3838 (aarch64_ftrace_insn_reloc_others): Likewise.
3839 (visitor): New.
3840 (aarch64_relocate_instruction): Use visitor.
3841
dfaffe9d
YQ
38422015-10-12 Yao Qi <yao.qi@linaro.org>
3843
3844 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3845 int. Add argument buf.
3846 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3847 aarch64_relocate_instruction.
3848
70b439f0
YQ
38492015-10-12 Yao Qi <yao.qi@linaro.org>
3850
3851 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3852 argument insn. Remove local variable insn. Don't call
3853 target_read_uint32.
3854 (aarch64_install_fast_tracepoint_jump_pad): Call
3855 target_read_uint32.
3856
7781c06f
YQ
38572015-09-30 Yao Qi <yao.qi@linaro.org>
3858
3859 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3860 (emit_load_store_pair): Likewise.
3861
9a3c8263
SM
38622015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3863
3864 * dll.c (match_dll): Add cast(s).
3865 (unloaded_dll): Likewise.
3866 * linux-low.c (second_thread_of_pid_p): Likewise.
3867 (delete_lwp_callback): Likewise.
3868 (count_events_callback): Likewise.
3869 (select_event_lwp_callback): Likewise.
3870 (linux_set_resume_request): Likewise.
3871 * server.c (accumulate_file_name_length): Likewise.
3872 (emit_dll_description): Likewise.
3873 (handle_qxfer_threads_worker): Likewise.
3874 (visit_actioned_threads): Likewise.
3875 * thread-db.c (any_thread_of): Likewise.
3876 * tracepoint.c (same_process_p): Likewise.
3877 (match_blocktype): Likewise.
3878 (build_traceframe_info_xml): Likewise.
3879
224c3ddb
SM
38802015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3881
3882 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3883 assignment.
3884 (gdb_unparse_agent_expr): Likewise.
3885 * hostio.c (require_data): Likewise.
3886 (handle_pread): Likewise.
3887 * linux-low.c (disable_regset): Likewise.
3888 (fetch_register): Likewise.
3889 (store_register): Likewise.
3890 (get_dynamic): Likewise.
3891 (linux_qxfer_libraries_svr4): Likewise.
3892 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3893 (set_fast_tracepoint_jump): Likewise.
3894 (uninsert_fast_tracepoint_jumps_at): Likewise.
3895 (reinsert_fast_tracepoint_jumps_at): Likewise.
3896 (validate_inserted_breakpoint): Likewise.
3897 (clone_agent_expr): Likewise.
3898 * regcache.c (init_register_cache): Likewise.
3899 * remote-utils.c (putpkt_binary_1): Likewise.
3900 (decode_M_packet): Likewise.
3901 (decode_X_packet): Likewise.
3902 (look_up_one_symbol): Likewise.
3903 (relocate_instruction): Likewise.
3904 (monitor_output): Likewise.
3905 * server.c (handle_search_memory): Likewise.
3906 (handle_qxfer_exec_file): Likewise.
3907 (handle_qxfer_libraries): Likewise.
3908 (handle_qxfer): Likewise.
3909 (handle_query): Likewise.
3910 (handle_v_cont): Likewise.
3911 (handle_v_run): Likewise.
3912 (captured_main): Likewise.
3913 * target.c (write_inferior_memory): Likewise.
3914 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3915 * tracepoint.c (init_trace_buffer): Likewise.
3916 (add_tracepoint_action): Likewise.
3917 (add_traceframe): Likewise.
3918 (add_traceframe_block): Likewise.
3919 (cmd_qtdpsrc): Likewise.
3920 (cmd_qtdv): Likewise.
3921 (cmd_qtstatus): Likewise.
3922 (response_source): Likewise.
3923 (response_tsv): Likewise.
3924 (cmd_qtnotes): Likewise.
3925 (gdb_collect): Likewise.
3926 (initialize_tracepoint): Likewise.
3927
afbe19f8
PL
39282015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3929
3930 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3931 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3932 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3933 <NOP>: New.
3934 (enum aarch64_condition_codes): New enum.
3935 (w0): New static global.
3936 (fp): Likewise.
3937 (lr): Likewise.
3938 (struct aarch64_memory_operand) <type>: New
3939 MEMORY_OPERAND_POSTINDEX type.
3940 (postindex_memory_operand): New helper function.
3941 (emit_ret): New function.
3942 (emit_load_store_pair): New function, factored out of emit_stp
3943 with support for MEMORY_OPERAND_POSTINDEX.
3944 (emit_stp): Rewrite using emit_load_store_pair.
3945 (emit_ldp): New function.
3946 (emit_load_store): Likewise.
3947 (emit_ldr): Mention post-index instruction in comment.
3948 (emit_ldrh): New function.
3949 (emit_ldrb): New function.
3950 (emit_ldrsw): Mention post-index instruction in comment.
3951 (emit_str): Likewise.
3952 (emit_subs): New function.
3953 (emit_cmp): Likewise.
3954 (emit_and): Likewise.
3955 (emit_orr): Likewise.
3956 (emit_orn): Likewise.
3957 (emit_eor): Likewise.
3958 (emit_mvn): Likewise.
3959 (emit_lslv): Likewise.
3960 (emit_lsrv): Likewise.
3961 (emit_asrv): Likewise.
3962 (emit_mul): Likewise.
3963 (emit_sbfm): Likewise.
3964 (emit_sbfx): Likewise.
3965 (emit_ubfm): Likewise.
3966 (emit_ubfx): Likewise.
3967 (emit_csinc): Likewise.
3968 (emit_cset): Likewise.
3969 (emit_nop): Likewise.
3970 (emit_ops_insns): New helper function.
3971 (emit_pop): Likewise.
3972 (emit_push): Likewise.
3973 (aarch64_emit_prologue): New function.
3974 (aarch64_emit_epilogue): Likewise.
3975 (aarch64_emit_add): Likewise.
3976 (aarch64_emit_sub): Likewise.
3977 (aarch64_emit_mul): Likewise.
3978 (aarch64_emit_lsh): Likewise.
3979 (aarch64_emit_rsh_signed): Likewise.
3980 (aarch64_emit_rsh_unsigned): Likewise.
3981 (aarch64_emit_ext): Likewise.
3982 (aarch64_emit_log_not): Likewise.
3983 (aarch64_emit_bit_and): Likewise.
3984 (aarch64_emit_bit_or): Likewise.
3985 (aarch64_emit_bit_xor): Likewise.
3986 (aarch64_emit_bit_not): Likewise.
3987 (aarch64_emit_equal): Likewise.
3988 (aarch64_emit_less_signed): Likewise.
3989 (aarch64_emit_less_unsigned): Likewise.
3990 (aarch64_emit_ref): Likewise.
3991 (aarch64_emit_if_goto): Likewise.
3992 (aarch64_emit_goto): Likewise.
3993 (aarch64_write_goto_address): Likewise.
3994 (aarch64_emit_const): Likewise.
3995 (aarch64_emit_call): Likewise.
3996 (aarch64_emit_reg): Likewise.
3997 (aarch64_emit_pop): Likewise.
3998 (aarch64_emit_stack_flush): Likewise.
3999 (aarch64_emit_zero_ext): Likewise.
4000 (aarch64_emit_swap): Likewise.
4001 (aarch64_emit_stack_adjust): Likewise.
4002 (aarch64_emit_int_call_1): Likewise.
4003 (aarch64_emit_void_call_2): Likewise.
4004 (aarch64_emit_eq_goto): Likewise.
4005 (aarch64_emit_ne_goto): Likewise.
4006 (aarch64_emit_lt_goto): Likewise.
4007 (aarch64_emit_le_goto): Likewise.
4008 (aarch64_emit_gt_goto): Likewise.
4009 (aarch64_emit_ge_got): Likewise.
4010 (aarch64_emit_ops_impl): New static global variable.
4011 (aarch64_emit_ops): New target function, return
4012 &aarch64_emit_ops_impl.
4013 (struct linux_target_ops): Install it.
4014
bb903df0
PL
40152015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4016
4017 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4018 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4019 aarch64-ipa.o.
4020 * linux-aarch64-ipa.c: New file.
4021 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4022 and endian.h.
4023 (aarch64_get_thread_area): New target method.
4024 (extract_signed_bitfield): New helper function.
4025 (aarch64_decode_ldr_literal): New function.
4026 (enum aarch64_opcodes): New enum.
4027 (struct aarch64_register): New struct.
4028 (struct aarch64_operand): New struct.
4029 (x0): New static global.
4030 (x1): Likewise.
4031 (x2): Likewise.
4032 (x3): Likewise.
4033 (x4): Likewise.
4034 (w2): Likewise.
4035 (ip0): Likewise.
4036 (sp): Likewise.
4037 (xzr): Likewise.
4038 (aarch64_register): New helper function.
4039 (register_operand): Likewise.
4040 (immediate_operand): Likewise.
4041 (struct aarch64_memory_operand): New struct.
4042 (offset_memory_operand): New helper function.
4043 (preindex_memory_operand): Likewise.
4044 (enum aarch64_system_control_registers): New enum.
4045 (ENCODE): New macro.
4046 (emit_insn): New helper function.
4047 (emit_b): New function.
4048 (emit_bcond): Likewise.
4049 (emit_cb): Likewise.
4050 (emit_tb): Likewise.
4051 (emit_blr): Likewise.
4052 (emit_stp): Likewise.
4053 (emit_ldp_q_offset): Likewise.
4054 (emit_stp_q_offset): Likewise.
4055 (emit_load_store): Likewise.
4056 (emit_ldr): Likewise.
4057 (emit_ldrsw): Likewise.
4058 (emit_str): Likewise.
4059 (emit_ldaxr): Likewise.
4060 (emit_stxr): Likewise.
4061 (emit_stlr): Likewise.
4062 (emit_data_processing_reg): Likewise.
4063 (emit_data_processing): Likewise.
4064 (emit_add): Likewise.
4065 (emit_sub): Likewise.
4066 (emit_mov): Likewise.
4067 (emit_movk): Likewise.
4068 (emit_mov_addr): Likewise.
4069 (emit_mrs): Likewise.
4070 (emit_msr): Likewise.
4071 (emit_sevl): Likewise.
4072 (emit_wfe): Likewise.
4073 (append_insns): Likewise.
4074 (can_encode_int32_in): New helper function.
4075 (aarch64_relocate_instruction): New function.
4076 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4077 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4078 (struct linux_target_ops): Install aarch64_get_thread_area,
4079 aarch64_install_fast_tracepoint_jump_pad and
4080 aarch64_get_min_fast_tracepoint_insn_len.
4081
787749ea
PL
40822015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4083
4084 * Makefile.in (aarch64-insn.o): New rule.
4085 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4086
9812b2e6
YQ
40872015-09-21 Yao Qi <yao.qi@linaro.org>
4088
4089 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4090
18fe412b
YQ
40912015-09-21 Yao Qi <yao.qi@linaro.org>
4092
4093 * tracepoint.c (max_jump_pad_size): Remove.
4094
a0cc84cd
YQ
40952015-09-18 Yao Qi <yao.qi@linaro.org>
4096
4097 * linux-aarch64-low.c: Don't include sys/uio.h.
4098 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4099
d78908cf
WW
41002015-09-16 Wei-cheng Wang <cole945@gmail.com>
4101
4102 * tracepoint.c (eval_result_type): Change prototype.
4103 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4104
d57e0d50
PA
41052015-09-15 Pedro Alves <palves@redhat.com>
4106
4107 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4108 Check whether to report exec events instead of checking whether
4109 multiprocess is enabled.
4110
5a676acc
PA
41112015-09-15 Pedro Alves <palves@redhat.com>
4112
4113 PR remote/18965
4114 * remote-utils.c (prepare_resume_reply): Merge
4115 TARGET_WAITKIND_VFORK_DONE switch case with the
4116 TARGET_WAITKIND_FORKED case.
4117
7c5d0fad
YQ
41182015-09-15 Yao Qi <yao.qi@linaro.org>
4119
4120 * server.c (handle_query): Check string comparison using
4121 "else if" instead of "if".
4122
750ce8d1
YQ
41232015-09-15 Yao Qi <yao.qi@linaro.org>
4124
4125 * server.c (vCont_supported): New global variable.
4126 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4127 matches. Append ";vContSupported+" to own_buf.
4128 (handle_v_requests): Append ";s;S" to own_buf if target supports
4129 hardware single step or vCont_supported is false.
4130 (capture_main): Set vCont_supported to zero.
4131
70b90b91
YQ
41322015-09-15 Yao Qi <yao.qi@linaro.org>
4133
4134 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4135 it to ...
4136 (linux_supports_hardware_single_step): ... New function.
4137 (linux_target_ops): Update.
4138 * lynx-low.c (lynx_target_ops): Set field
4139 supports_hardware_single_step to target_can_do_hardware_single_step.
4140 * nto-low.c (nto_target_ops): Likewise.
4141 * spu-low.c (spu_target_ops): Likewise.
4142 * win32-low.c (win32_target_ops): Likewise.
4143 * target.c (target_can_do_hardware_single_step): New function.
4144 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4145 Remove. <supports_hardware_single_step>: New field.
4146 (target_supports_conditional_breakpoints): Remove.
4147 (target_supports_hardware_single_step): New macro.
4148 (target_can_do_hardware_single_step): Declare.
4149 * server.c (handle_query): Use target_supports_hardware_single_step
4150 instead of target_supports_conditional_breakpoints.
4151
ade90bde
YQ
41522015-09-15 Yao Qi <yao.qi@linaro.org>
4153
4154 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4155 function.
4156 (struct linux_target_ops the_low_target): Install
4157 aarch64_linux_siginfo_fixup.
4158
94585166
DB
41592015-09-11 Don Breazeal <donb@codesourcery.com>
4160 Luis Machado <lgustavo@codesourcery.com>
4161
4162 * linux-low.c (linux_mourn): Static declaration.
4163 (linux_arch_setup): Move in front of
4164 handle_extended_wait.
4165 (linux_arch_setup_thread): New function.
4166 (handle_extended_wait): Handle exec events. Call
4167 linux_arch_setup_thread. Make event_lwp argument a
4168 pointer-to-a-pointer.
4169 (check_zombie_leaders): Do not check stopped threads.
4170 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4171 (linux_low_filter_event): Add lwp and thread for exec'ing
4172 non-leader thread if leader thread has been deleted.
4173 Refactor code into linux_arch_setup_thread and call it.
4174 Pass child lwp pointer by reference to handle_extended_wait.
4175 (linux_wait_for_event_filtered): Update comment.
4176 (linux_wait_1): Prevent clobbering exec event status.
4177 (linux_supports_exec_events): New function.
4178 (linux_target_ops) <supports_exec_events>: Initialize new member.
4179 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4180 new member.
4181 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4182 * server.c (report_exec_events): New global variable.
4183 (handle_query): Handle qSupported query for exec-events feature.
4184 (captured_main): Initialize report_exec_events.
4185 * server.h (report_exec_events): Declare new global variable.
4186 * target.h (struct target_ops) <supports_exec_events>: New
4187 member.
4188 (target_supports_exec_events): New macro.
4189 * win32-low.c (win32_target_ops) <supports_exec_events>:
4190 Initialize new member.
4191
0568462b
MM
41922015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4193
4194 * linux-low.c (linux_low_enable_btrace): Remove.
4195 (linux_target_ops): Replace linux_low_enable_btrace with
4196 linux_enable_btrace.
4197
39edd165
YQ
41982015-09-03 Yao Qi <yao.qi@linaro.org>
4199
4200 * linux-aarch64-low.c (aarch64_insert_point): Call
4201 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4202 returns true.
4203
1db33b5a
UW
42042015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4205
4206 * linux-low.c (check_stopped_by_breakpoint): Use
4207 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4208
ab290430
PA
42092015-08-27 Pedro Alves <palves@redhat.com>
4210
4211 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4212
8d749320
SM
42132015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4214
6711b7f8
SM
4215 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4216 the XNEW-family equivalent.
8d749320
SM
4217 (compile_bytecodes): Likewise.
4218 * dll.c (loaded_dll): Likewise.
4219 * event-loop.c (append_callback_event): Likewise.
4220 (create_file_handler): Likewise.
4221 (create_file_event): Likewise.
4222 * hostio.c (handle_open): Likewise.
4223 * inferiors.c (add_thread): Likewise.
4224 (add_process): Likewise.
4225 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4226 * linux-arm-low.c (arm_new_process): Likewise.
4227 (arm_new_thread): Likewise.
4228 * linux-low.c (add_to_pid_list): Likewise.
4229 (linux_add_process): Likewise.
4230 (handle_extended_wait): Likewise.
4231 (add_lwp): Likewise.
4232 (enqueue_one_deferred_signal): Likewise.
4233 (enqueue_pending_signal): Likewise.
4234 (linux_resume_one_lwp_throw): Likewise.
4235 (linux_resume_one_thread): Likewise.
4236 (linux_read_memory): Likewise.
4237 (linux_write_memory): Likewise.
4238 * linux-mips-low.c (mips_linux_new_process): Likewise.
4239 (mips_linux_new_thread): Likewise.
4240 (mips_add_watchpoint): Likewise.
4241 * linux-x86-low.c (initialize_low_arch): Likewise.
4242 * lynx-low.c (lynx_add_process): Likewise.
4243 * mem-break.c (set_raw_breakpoint_at): Likewise.
4244 (set_breakpoint): Likewise.
4245 (add_condition_to_breakpoint): Likewise.
4246 (add_commands_to_breakpoint): Likewise.
4247 (clone_agent_expr): Likewise.
4248 (clone_one_breakpoint): Likewise.
4249 * regcache.c (new_register_cache): Likewise.
4250 * remote-utils.c (look_up_one_symbol): Likewise.
4251 * server.c (queue_stop_reply): Likewise.
4252 (start_inferior): Likewise.
4253 (queue_stop_reply_callback): Likewise.
4254 (handle_target_event): Likewise.
4255 * spu-low.c (fetch_ppc_memory): Likewise.
4256 (store_ppc_memory): Likewise.
4257 * target.c (set_target_ops): Likewise.
4258 * thread-db.c (thread_db_load_search): Likewise.
4259 (try_thread_db_load_1): Likewise.
4260 * tracepoint.c (add_tracepoint): Likewise.
4261 (add_tracepoint_action): Likewise.
4262 (create_trace_state_variable): Likewise.
4263 (cmd_qtdpsrc): Likewise.
4264 (cmd_qtro): Likewise.
4265 (add_while_stepping_state): Likewise.
4266 * win32-low.c (child_add_thread): Likewise.
4267 (get_image_name): Likewise.
4268
ed8b7b42
YQ
42692015-08-25 Yao Qi <yao.qi@linaro.org>
4270
4271 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4272
db3cb7cb
YQ
42732015-08-25 Yao Qi <yao.qi@linaro.org>
4274
4275 * Makefile.in (aarch64-linux.o): New rule.
4276 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4277 srv_tgtobj.
4278 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4279 (aarch64_init_debug_reg_state): Make it extern.
4280 (aarch64_linux_prepare_to_resume): Remove.
4281
f6011a1c
YQ
42822015-08-25 Yao Qi <yao.qi@linaro.org>
4283
4284 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4285 lwp_arch_private_info and ptid_of_lwp.
4286
88e2cf7e
YQ
42872015-08-25 Yao Qi <yao.qi@linaro.org>
4288
4289 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4290 Find proc_info by find_process_pid. All callers updated.
4291
5e35436e
YQ
42922015-08-25 Yao Qi <yao.qi@linaro.org>
4293
4294 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4295 Remove.
4296 (debug_reg_change_callback): Remove.
4297 (aarch64_notify_debug_reg_change): Remove.
4298
4a8a7965
YQ
42992015-08-25 Yao Qi <yao.qi@linaro.org>
4300
4301 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4302 Call current_lwp_ptid.
4303
32a271ee
YQ
43042015-08-25 Yao Qi <yao.qi@linaro.org>
4305
4306 * linux-aarch64-low.c (debug_reg_change_callback): Use
4307 debug_printf.
4308
0d51c8d7
YQ
43092015-08-25 Yao Qi <yao.qi@linaro.org>
4310
4311 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4312
31a43dd5
YQ
43132015-08-25 Yao Qi <yao.qi@linaro.org>
4314
4315 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4316
8ee52567
YQ
43172015-08-25 Yao Qi <yao.qi@linaro.org>
4318
4319 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4320 the code.
4321
ff3f0f45
YQ
43222015-08-25 Yao Qi <yao.qi@linaro.org>
4323
4324 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4325 Remove.
4326 (debug_reg_change_callback): Remove argument entry and add argument
4327 lwp. Remove local variable thread. Don't print thread id in the
4328 debugging output. Don't check whether pid of thread equals to pid.
4329 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4330 iterate_over_lwps instead find_inferior.
4331
3d40fbb5
PA
43322015-08-24 Pedro Alves <palves@redhat.com>
4333
4334 * inferiors.c (get_first_process): New function.
4335 * inferiors.h (get_first_process): New declaration.
4336 * remote-utils.c (read_ptid): Default to the first process in the
4337 list, instead of to the current thread's process.
4338
438e1e42
PA
43392015-08-24 Pedro Alves <palves@redhat.com>
4340
4341 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4342 * event-loop.c: Likewise.
4343 * remote-utils.c: Likewise.
4344 * tracepoint.c: Likewise.
4345
a8c6d4fc
PA
43462015-08-24 Pedro Alves <palves@redhat.com>
4347
4348 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4349 ptid_get_lwp.
4350
99b0bb12
PA
43512015-08-21 Pedro Alves <palves@redhat.com>
4352
4353 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4354 instead of literal 1.
4355
f8904751
PA
43562015-08-21 Pedro Alves <palves@redhat.com>
4357
4358 * tdesc.c (default_description): Explicitly zero-initialize.
4359
465a859e
PA
43602015-08-21 Pedro Alves <palves@redhat.com>
4361
4362 PR gdb/18749
4363 * inferiors.c (remove_thread): Discard any pending stop reply for
4364 this thread.
4365 * server.c (remove_all_on_match_pid): Rename to ...
4366 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4367 instead of a pid.
4368 (discard_queued_stop_replies): Change parameter to a ptid. Now
4369 extern.
4370 (handle_v_kill, kill_inferior_callback, captured_main)
4371 (process_serial_event): Adjust.
4372 * server.h (discard_queued_stop_replies): Declare.
4373
f0db101d
PA
43742015-08-21 Pedro Alves <palves@redhat.com>
4375
4376 * linux-low.c (wait_for_sigstop): Always switch to no thread
4377 selected if the previously current thread dies.
4378 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4379 process instead of the current thread's.
4380 * remote-utils.c (input_interrupt): Don't check if there's no
4381 current thread.
4382 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4383 current thread to the general thread fails, error out.
4384 (handle_qxfer_auxv, handle_qxfer_libraries)
4385 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4386 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4387 (handle_query): Check if there's a thread selected instead of
4388 checking whether there's any thread in the thread list.
4389 (handle_qxfer_threads, handle_qxfer_btrace)
4390 (handle_qxfer_btrace_conf): Don't error out early if there's no
4391 thread in the thread list.
4392 (handle_v_cont, myresume): Don't set the current thread to the
4393 continue thread.
4394 (process_serial_event) <Hg handling>: Also set thread_id if the
4395 previous general thread is still alive.
4396 (process_serial_event) <g/G handling>: If setting the current
4397 thread to the general thread fails, error out.
4398 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4399 thread's lwp instead of the current thread's.
4400 * target.c (set_desired_thread): If the desired thread was not
4401 found, leave the current thread pointing to NULL. Return an int
4402 (boolean) indicating success.
4403 * target.h (set_desired_thread): Change return type to int.
4404
40045d91
MF
44052015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4406
4407 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4408 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4409 #includes.
4410 (ps_get_thread_area): New function.
4411
45face3b
GB
44122015-08-19 Gary Benson <gbenson@redhat.com>
4413
4414 * hostio.c (handle_pread): Do not attempt to read more data
4415 than hostio_reply_with_data can fit in a packet.
4416
16d5f642
JB
44172015-08-18 Joel Brobecker <brobecker@adacore.com>
4418
4419 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4420
a738da3a
MF
44212015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4422
4423 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4424
33ebda9d
PA
44252015-08-06 Pedro Alves <palves@redhat.com>
4426
4427 * tracepoint.c (expr_eval_result): Now an int.
4428
a44892be
PA
44292015-08-06 Pedro Alves <palves@redhat.com>
4430
4431 * gdbthread.h (struct regcache): Forward declare.
4432 (struct thread_info) <regcache_data>: Now a struct regcache
4433 pointer.
4434 * inferiors.c (inferior_regcache_data)
4435 (set_inferior_regcache_data): Now work with struct regcache
4436 pointers.
4437 * inferiors.h (struct regcache): Forward declare.
4438 (inferior_regcache_data, set_inferior_regcache_data): Now work
4439 with struct regcache pointers.
4440 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4441 (free_register_cache_thread): Remove struct regcache pointer
4442 casts.
4443
608a1e46
PA
44442015-08-06 Pedro Alves <palves@redhat.com>
4445
4446 * server.c (captured_main): On error, print the exception message
4447 to stderr, and if run_once is set, throw a quit.
4448
f0ce0d3a
PA
44492015-08-06 Pedro Alves <palves@redhat.com>
4450
4451 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4452 the current thread.
4453
bf47e248
PA
44542015-08-06 Pedro Alves <palves@redhat.com>
4455
4456 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4457 reading beyond the passed in buffer length.
4458
b6b9ffcc
PL
44592015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4460
4461 * tracepoint.c (symbol_list) <required>: Remove.
4462
863d01bd
PA
44632015-08-06 Pedro Alves <palves@redhat.com>
4464
4465 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4466 count if stopping and suspending threads.
4467 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4468 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4469 (linux_detach): Complete an ongoing step-over.
4470 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4471 throughout.
4472 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4473 (linux_wait_1): If passing a signal to the inferior after
4474 finishing a step-over, unsuspend and re-resume all lwps. If we
4475 see a single-step event but the thread should be continuing, don't
4476 pass the trap to gdb.
4477 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4478 internal_error instead of gdb_assert.
4479 (enqueue_pending_signal): New function.
4480 (check_ptrace_stopped_lwp_gone): Add debug output.
4481 (start_step_over): Use internal_error instead of gdb_assert.
4482 (complete_ongoing_step_over): New function.
4483 (linux_resume_one_thread): Don't resume a suspended thread.
4484 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4485 it stepping.
4486
00db26fa
PA
44872015-08-06 Pedro Alves <palves@redhat.com>
4488
4489 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4490 (linux_thread_alive): Use lwp_is_marked_dead.
4491 (extended_event_reported): Delete.
4492 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4493 instead of extended_event_reported.
4494 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4495 as well.
4496 (lwp_is_marked_dead): New function.
4497 (lwp_running): Use lwp_is_marked_dead.
4498 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4499 comment.
4500
ad071a30
PA
45012015-08-06 Pedro Alves <palves@redhat.com>
4502
4503 * linux-low.c (linux_wait_1): Move fork event output out of the
4504 !report_to_gdb check. Pass event_child->waitstatus to
4505 target_waitstatus_to_string instead of ourstatus.
4506
524b57e6
YQ
45072015-08-04 Yao Qi <yao.qi@linaro.org>
4508
4509 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4510 if current_thread is 32 bit.
4511
6085d6f6
YQ
45122015-08-04 Yao Qi <yao.qi@linaro.org>
4513
4514 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4515 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4516 * server.c (extended_protocol): Remove "static".
4517 * server.h (extended_protocol): Declare it.
4518
8a7e4587
YQ
45192015-08-04 Yao Qi <yao.qi@linaro.org>
4520
4521 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4522 both aarch64 and aarch32.
4523 (aarch64_set_pc): Likewise.
4524
3b53ae99
YQ
45252015-08-04 Yao Qi <yao.qi@linaro.org>
4526
4527 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4528 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4529 arm-with-neon.xml to srv_xmlfiles.
4530 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4531 (is_64bit_tdesc): New function.
4532 (aarch64_linux_read_description): New function.
4533 (aarch64_arch_setup): Call aarch64_linux_read_description.
4534 (regs_info): Rename to regs_info_aarch64.
4535 (aarch64_regs_info): Return right regs_info.
4536 (initialize_low_arch): Call initialize_low_arch_aarch32.
4537
bd9e6534
YQ
45382015-08-04 Yao Qi <yao.qi@linaro.org>
4539
4540 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4541 * linux-aarch32-low.c: New file.
4542 * linux-aarch32-low.h: New file.
4543 * linux-arm-low.c (arm_fill_gregset): Move it to
4544 linux-aarch32-low.c.
4545 (arm_store_gregset): Likewise.
4546 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4547 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4548 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4549 (regs_info): Rename to regs_info_arm.
4550 (arm_regs_info): Return regs_info_aarch32 if
4551 have_ptrace_getregset is 1 and target description is
4552 arm_with_neon or arm_with_vfpv3.
4553 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4554 Call initialize_low_arch_aarch32 instead.
4555
ded48a5e
YQ
45562015-08-04 Yao Qi <yao.qi@linaro.org>
4557
4558 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4559 * linux-low.c: ... here.
4560 * linux-low.h (have_ptrace_getregset): Declare it.
4561
96e9210f
PA
45622015-08-04 Pedro Alves <palves@redhat.com>
4563
4564 * thread-db.c (struct thread_db): Use new typedefs.
4565 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4566 CHK calls.
4567 (disable_thread_event_reporting): Cast result of dlsym to
4568 destination function pointer type.
4569 (thread_db_mourn): Use td_ta_delete_ftype.
4570
af60a1ef
SL
45712015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4572
4573 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4574 arch variant.
4575 (CDX_BREAKPOINT): Define for R2.
4576 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4577 (the_low_target): Add comments.
4578
e8b41681
YQ
45792015-07-30 Yao Qi <yao.qi@linaro.org>
4580
4581 * linux-arm-low.c (arm_hwcap): Remove it.
4582 (arm_read_description): New local variable arm_hwcap. Don't
4583 set arm_hwcap to zero.
4584
89abb039
YQ
45852015-07-30 Yao Qi <yao.qi@linaro.org>
4586
4587 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4588 Use regcache->tdesc instead.
4589 (arm_store_wmmxregset): Likewise.
4590 (arm_fill_vfpregset): Likewise.
4591 (arm_store_vfpregset): Likewise.
4592
deca266c
YQ
45932015-07-30 Yao Qi <yao.qi@linaro.org>
4594
4595 * linux-arm-low.c: Include arch/arm.h.
4596 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4597 (arm_store_gregset): Likewise.
4598
aa58a496
SM
45992015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4600
4601 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4602 ptrace's 4th parameter.
4603
50904b25
YQ
46042015-07-27 Yao Qi <yao.qi@linaro.org>
4605
4606 * configure.srv (case aarch64*-*-linux*): Don't set
4607 srv_linux_usrregs.
4608
5826e159
PA
46092015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4610
4611 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4612 sys/ptrace.h.
4613 * linux-arm-low.c: Likewise.
4614 * linux-cris-low.c: Likewise.
4615 * linux-crisv32-low.c: Likewise.
4616 * linux-low.c: Likewise.
4617 * linux-m68k-low.c: Likewise.
4618 * linux-mips-low.c: Likewise.
4619 * linux-nios2-low.c: Likewise.
4620 * linux-s390-low.c: Likewise.
4621 * linux-sparc-low.c: Likewise.
4622 * linux-tic6x-low.c: Likewise.
4623 * linux-tile-low.c: Likewise.
4624 * linux-x86-low.c: Likewise.
4625
54019719
PA
46262015-07-24 Pedro Alves <palves@redhat.com>
4627
4628 * config.in: Regenerate.
4629 * configure: Regenerate.
4630
eb7aa561
PA
46312015-07-24 Pedro Alves <palves@redhat.com>
4632
4633 * acinclude.m4: Include ../ptrace.m4.
4634 * configure.ac: Call GDB_AC_PTRACE.
4635 * config.in, configure: Regenerate.
4636
55d7b841
YQ
46372015-07-24 Yao Qi <yao.qi@linaro.org>
4638
4639 * linux-low.c (linux_create_inferior): Remove setting to
4640 proc->priv->new_inferior.
4641 (linux_attach): Likewise.
4642 (linux_low_filter_event): Likewise.
4643 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4644
c06cbd92
YQ
46452015-07-24 Yao Qi <yao.qi@linaro.org>
4646
4647 * linux-low.c (linux_arch_setup): New function.
4648 (linux_low_filter_event): If proc->tdesc is NULL and
4649 proc->attached is true, call the_low_target.arch_setup.
4650 Otherwise, keep status pending, and return.
4651 (linux_resume_one_lwp_throw): Don't call get_pc if
4652 thread->while_stepping isn't NULL. Don't call
4653 get_thread_regcache if proc->tdesc is NULL.
4654 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4655 (linux_target_ops): Install arch_setup.
4656 * server.c (start_inferior): Call the_target->arch_setup.
4657 * target.h (struct target_ops) <arch_setup>: New field.
4658 (target_arch_setup): New marco.
4659 * lynx-low.c (lynx_target_ops): Update.
4660 * nto-low.c (nto_target_ops): Update.
4661 * spu-low.c (spu_target_ops): Update.
4662 * win32-low.c (win32_target_ops): Update.
4663
5ae3ebba
YQ
46642015-07-24 Yao Qi <yao.qi@linaro.org>
4665
4666 * linux-low.c (linux_add_process): Don't set
4667 proc->priv->new_inferior.
4668 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4669 (linux_attach): Likewise.
4670
eb97750b
YQ
46712015-07-24 Yao Qi <yao.qi@linaro.org>
4672
4673 * server.c (start_inferior): Code refactor.
4674
51aee833
YQ
46752015-07-24 Yao Qi <yao.qi@linaro.org>
4676
4677 * server.c (process_serial_event): Set general_thread.
4678
af1b22f3
YQ
46792015-07-21 Yao Qi <yao.qi@linaro.org>
4680
4681 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4682 aarch64_linux_get_debug_reg_capacity.
4683
554717a3
YQ
46842015-07-17 Yao Qi <yao.qi@linaro.org>
4685
4686 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4687 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4688 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4689 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4690 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4691 (AARCH64_HWP_ALIGNMENT): Likewise.
4692 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4693 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4694 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4695 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4696 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4697 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4698 (struct aarch64_debug_reg_state): Likewise.
4699 (struct arch_lwp_info): Likewise.
4700 (aarch64_align_watchpoint): Likewise.
4701 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4702 (aarch64_watchpoint_length): Likewise.
4703 (aarch64_point_encode_ctrl_reg): Likewise
4704 (aarch64_point_is_aligned): Likewise.
4705 (aarch64_align_watchpoint): Likewise.
4706 (aarch64_linux_set_debug_regs):
4707 (aarch64_dr_state_insert_one_point): Likewise.
4708 (aarch64_dr_state_remove_one_point): Likewise.
4709 (aarch64_handle_breakpoint): Likewise.
4710 (aarch64_handle_aligned_watchpoint): Likewise.
4711 (aarch64_handle_unaligned_watchpoint): Likewise.
4712 (aarch64_handle_watchpoint): Likewise.
4713
c67ca4de
YQ
47142015-07-17 Yao Qi <yao.qi@linaro.org>
4715
4716 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4717 and don't aarch64_get_debug_reg_state. All callers update.
4718 (aarch64_handle_aligned_watchpoint): Likewise.
4719 (aarch64_handle_unaligned_watchpoint): Likewise.
4720 (aarch64_handle_watchpoint): Likewise.
4721 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4722 (aarch64_remove_point): Likewise.
4723
25abf979
YQ
47242015-07-17 Yao Qi <yao.qi@linaro.org>
4725
4726 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4727 debug_printf.
4728 (aarch64_handle_unaligned_watchpoint): Likewise.
4729
db1ff28b
JK
47302015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4731
4732 Revert the previous 3 commits:
4733 Move gdb_regex* to common/
4734 Move linux_find_memory_regions_full & co.
4735 gdbserver build-id attribute generator
4736
700ca40f
JK
47372015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4738 Jan Kratochvil <jan.kratochvil@redhat.com>
4739
4740 gdbserver build-id attribute generator.
4741 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4742 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4743 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4744 (find_phdr): New.
4745 (get_dynamic): Use find_pdhr to traverse program headers.
4746 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4747 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4748 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4749 (get_hex_build_id): New.
4750 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4751 to reply XML document.
4752
9904185c
JK
47532015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4754 Jan Kratochvil <jan.kratochvil@redhat.com>
4755
4756 * target.c: Include target/target-utils.h and fcntl.h.
4757 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4758 (target_fileio_read_stralloc): New functions.
4759
6e5b4429
JK
47602015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4761
4762 * Makefile.in (OBS): Add gdb_regex.o.
4763 (gdb_regex.o): New.
4764 * config.in: Rebuilt.
4765 * configure: Rebuilt.
4766
ddc98fbf
JK
47672015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4768 Jan Kratochvil <jan.kratochvil@redhat.com>
4769
4770 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4771 * Makefile.in (OBS): Add target-utils.o.
4772 (linux-maps.o, target-utils.o): New.
4773 * configure.srv (srv_linux_obj): Add linux-maps.o.
4774
e57bb7a0
PL
47752015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4776
4777 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4778 function, return 1.
4779 (the_low_target): Install it.
4780
586b02a9
PA
47812015-07-14 Pedro Alves <palves@redhat.com>
4782
4783 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4784 Instead, ignore ECHILD, and throw an error for other errnos.
4785
58c1b36c
PA
47862015-07-10 Pedro Alves <palves@redhat.com>
4787
4788 * event-loop.c (struct callback_event) <data>: Change type to
4789 gdb_client_data instance instead of gdb_client_data pointer.
4790 (append_callback_event): Adjust.
4791
421530db
PL
47922015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4793
4794 * linux-aarch64-low.c: Add comments for each linux_target_ops
4795 method. Remove comments already covered in target_ops and
4796 linux_target_ops definitions.
4797 (the_low_target): Add comments for each unimplemented method.
4798
c2d65f38
YQ
47992015-07-09 Yao Qi <yao.qi@linaro.org>
4800
4801 * linux-aarch64-low.c (aarch64_regmap): Remove.
4802 (aarch64_usrregs_info): Remove.
4803 (regs_info): Set field usrregs to NULL.
4804
b20a6524
MM
48052015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4806
4807 * linux-low.c: Include "rsp-low.h"
4808 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4809 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4810 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4811 (handle_btrace_enable_pt): New.
4812 (handle_btrace_general_set): Support "pt".
4813 (handle_btrace_conf_general_set): Support "pt:size".
4814
96c97461
PL
48152015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4816
4817 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4818 Z_PACKET_SW_BP.
4819
37d66942
PL
48202015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4821
4822 * linux-aarch64-low.c: Remove comment about endianness.
4823 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4824 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4825 memcmp.
4826
dc06243f
GB
48272015-06-24 Gary Benson <gbenson@redhat.com>
4828
4829 * linux-i386-ipa.c (stdint.h): Do not include.
4830 * lynx-i386-low.c (stdint.h): Likewise.
4831 * lynx-ppc-low.c (stdint.h): Likewise.
4832 * mem-break.c (stdint.h): Likewise.
4833 * thread-db.c (stdint.h): Likewise.
4834 * tracepoint.c (stdint.h): Likewise.
4835 * win32-low.c (stdint.h): Likewise.
4836
124e13d9
SM
48372015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4838
4839 * server.c (write_qxfer_response): Update call to
4840 remote_escape_output.
4841
909c2cda
JK
48422015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4843 Jan Kratochvil <jan.kratochvil@redhat.com>
4844
4845 Merge multiple hex conversions.
4846 * gdbreplay.c (tohex): Rename to 'fromhex'.
4847 (logchar): Use fromhex.
4848
24c05f46
JK
48492015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4850
4851 * server.c (handle_qxfer_libraries): Set `version' attribute for
4852 <library-list>.
4853
14d2069a
GB
48542015-06-10 Gary Benson <gbenson@redhat.com>
4855
4856 * target.h (struct target_ops) <multifs_open>: New field.
4857 <multifs_unlink>: Likewise.
4858 <multifs_readlink>: Likewise.
4859 * linux-low.c (nat/linux-namespaces.h): New include.
4860 (linux_target_ops): Initialize the_target->multifs_open,
4861 the_target->multifs_unlink and the_target->multifs_readlink.
4862 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4863 * hostio.c (hostio_fs_pid): New static variable.
4864 (hostio_handle_new_gdb_connection): New function.
4865 (handle_setfs): Likewise.
4866 (handle_open): Use the_target->multifs_open as appropriate.
4867 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4868 (handle_readlink): Use the_target->multifs_readlink as
4869 appropriate.
4870 (handle_vFile): Handle vFile:setfs packets.
4871 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4872 after target_handle_new_gdb_connection.
4873
4b8b5e72
GB
48742015-06-10 Gary Benson <gbenson@redhat.com>
4875
4876 * configure.ac (AC_CHECK_FUNCS): Add setns.
4877 * config.in: Regenerate.
4878 * configure: Likewise.
4879 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4880 (linux-namespaces.o): New rule.
4881 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4882
3ac2e371
GB
48832015-06-09 Gary Benson <gbenson@redhat.com>
4884
4885 * hostio.c (handle_open): Process mode argument with
4886 fileio_to_host_mode.
4887
ca9b78ce
YQ
48882015-06-01 Yao Qi <yao.qi@linaro.org>
4889
4890 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4891 * linux-x86-low.c: Likewise.
4892
bfacd19d
DB
48932015-05-28 Don Breazeal <donb@codesourcery.com>
4894
4895 * linux-low.c (handle_extended_wait): Initialize
4896 thread_info.last_resume_kind for new fork children.
4897
452003ef
PA
48982015-05-15 Pedro Alves <palves@redhat.com>
4899
4900 * target.h (target_handle_new_gdb_connection): Rewrite using if
4901 wrapped in do/while.
4902
1041a03c
JB
49032015-05-14 Joel Brobecker <brobecker@adacore.com>
4904
4905 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4906 * configure, config.in: Regenerate.
4907 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4908 Declare typedef.
4909
c269dbdb
DB
49102015-05-12 Don Breazeal <donb@codesourcery.com>
4911
4912 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4913 PTRACE_EVENT_VFORK_DONE.
4914 (linux_low_ptrace_options, extended_event_reported): Add vfork
4915 events.
4916 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4917 and "vforkdone" for RSP 'T' Stop Reply Packet.
4918 * server.h (report_vfork_events): Declare
4919 global variable.
4920
3a8a0396
DB
49212015-05-12 Don Breazeal <donb@codesourcery.com>
4922
4923 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4924 (the_low_target) <new_fork>: Initialize new member.
4925 * linux-arm-low.c (arm_new_fork): New function.
4926 (the_low_target) <new_fork>: Initialize new member.
4927 * linux-low.c (handle_extended_wait): Call new target function
4928 new_fork.
4929 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4930 * linux-mips-low.c (mips_add_watchpoint): New function
4931 extracted from mips_insert_point.
4932 (the_low_target) <new_fork>: Initialize new member.
4933 (mips_linux_new_fork): New function.
4934 (mips_insert_point): Call mips_add_watchpoint.
4935 * linux-x86-low.c (x86_linux_new_fork): New function.
4936 (the_low_target) <new_fork>: Initialize new member.
4937
de0d863e
DB
49382015-05-12 Don Breazeal <donb@codesourcery.com>
4939
4940 * linux-low.c (handle_extended_wait): Implement return value,
4941 rename argument 'event_child' to 'event_lwp', handle
4942 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4943 (linux_low_ptrace_options): New function.
4944 (linux_low_filter_event): Call linux_low_ptrace_options,
4945 use different argument fo linux_enable_event_reporting,
4946 use return value from handle_extended_wait.
4947 (extended_event_reported): New function.
4948 (linux_wait_1): Call extended_event_reported and set
4949 status to report fork events.
4950 (linux_write_memory): Add pid to debug message.
4951 (reset_lwp_ptrace_options_callback): New function.
4952 (linux_handle_new_gdb_connection): New function.
4953 (linux_target_ops): Initialize new structure member.
4954 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4955 * lynx-low.c: Initialize new structure member.
4956 * remote-utils.c (prepare_resume_reply): Implement stop reason
4957 "fork" for "T" stop message.
4958 * server.c (handle_query): Call handle_new_gdb_connection.
4959 * server.h (report_fork_events): Declare global flag.
4960 * target.h (struct target_ops) <handle_new_gdb_connection>:
4961 New member.
4962 (target_handle_new_gdb_connection): New macro.
4963 * win32-low.c: Initialize new structure member.
4964
ddcbc397
DB
49652015-05-12 Don Breazeal <donb@codesourcery.com>
4966
4967 * mem-break.c (APPEND_TO_LIST): Define macro.
4968 (clone_agent_expr): New function.
4969 (clone_one_breakpoint): New function.
4970 (clone_all_breakpoints): New function.
4971 * mem-break.h: Declare new functions.
4972
89245bc0
DB
49732015-05-12 Don Breazeal <donb@codesourcery.com>
4974
4975 * linux-low.c (linux_supports_fork_events): New function.
4976 (linux_supports_vfork_events): New function.
4977 (linux_target_ops): Initialize new structure members.
4978 (initialize_low): Call linux_check_ptrace_features.
4979 * lynx-low.c (lynx_target_ops): Initialize new structure
4980 members.
4981 * server.c (report_fork_events, report_vfork_events):
4982 New global flags.
4983 (handle_query): Add new features to qSupported packet and
4984 response.
4985 (captured_main): Initialize new global variables.
4986 * target.h (struct target_ops) <supports_fork_events>:
4987 New member.
4988 <supports_vfork_events>: New member.
4989 (target_supports_fork_events): New macro.
4990 (target_supports_vfork_events): New macro.
4991 * win32-low.c (win32_target_ops): Initialize new structure
4992 members.
4993
835205d0
GB
49942015-05-12 Gary Benson <gbenson@redhat.com>
4995
4996 * server.c (handle_qxfer_exec_file): Use current process
4997 if annex is empty.
4998
21e94bd9
SL
49992015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5000
5001 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5002 Remove HAVE_PTRACE_GETREGS conditionals.
5003 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5004 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5005
45614f15
YQ
50062015-05-08 Yao Qi <yao.qi@linaro.org>
5007
5008 * linux-low.c (linux_supports_conditional_breakpoints): New
5009 function.
5010 (linux_target_ops): Install new target method.
5011 * lynx-low.c (lynx_target_ops): Install NULL hook for
5012 supports_conditional_breakpoints.
5013 * nto-low.c (nto_target_ops): Likewise.
5014 * spu-low.c (spu_target_ops): Likewise.
5015 * win32-low.c (win32_target_ops): Likewise.
5016 * server.c (handle_query): Check
5017 target_supports_conditional_breakpoints.
5018 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5019 New field.
5020 (target_supports_conditional_breakpoints): New macro.
5021
80ad801e
PA
50222015-05-06 Pedro Alves <palves@redhat.com>
5023
5024 PR server/18081
5025 * server.c (start_inferior): If the process exits, mourn it.
5026
819843c7
GB
50272015-04-21 Gary Benson <gbenson@redhat.com>
5028
5029 * hostio.c (fileio_open_flags_to_host): Factored out to
5030 fileio_to_host_openflags in common/fileio.c. Single use
5031 updated.
5032
a2d5a9d7
MF
50332015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5034
5035 * linux-xtensa-low.c (xtensa_fill_gregset)
5036 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5037 XCHAL_HAVE_LOOP.
5038
deb44829
MF
50392015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5040
5041 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5042 (regs_info): Replace usrregs pointer with NULL.
5043
e57f1de3
GB
50442015-04-17 Gary Benson <gbenson@redhat.com>
5045
5046 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5047 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5048 * server.c (handle_qxfer_exec_file): New function.
5049 (qxfer_packets): Add exec-file entry.
5050 (handle_query): Report qXfer:exec-file:read as supported packet.
5051
62828379
RN
50522015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5053
5054 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5055
b88bb450
GB
50562015-04-09 Gary Benson <gbenson@redhat.com>
5057
5058 * hostio-errno.c (errno_to_fileio_error): Remove function.
5059 Update caller to use remote_fileio_to_fio_error.
5060
c8f4bfdd
YQ
50612015-04-09 Yao Qi <yao.qi@linaro.org>
5062
5063 * linux-low.c (linux_insert_point): Call
5064 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5065 (linux_remove_point): Call remove_memory_breakpoint if type is
5066 raw_bkpt_type_sw.
5067 * linux-x86-low.c (x86_insert_point): Don't call
5068 insert_memory_breakpoint.
5069 (x86_remove_point): Don't call remove_memory_breakpoint.
5070
41f98f02
PA
50712015-04-01 Pedro Alves <palves@redhat.com>
5072 Cleber Rosa <crosa@redhat.com>
5073
5074 * server.c (gdbserver_usage): Reorganize and extend the usage
5075 message.
5076
2bf6fb9d
PA
50772015-03-24 Pedro Alves <palves@redhat.com>
5078
5079 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5080 output. Also dump TRAP_TRACE.
5081 (linux_low_filter_event): In debug output, distinguish a
5082 resume_stop SIGSTOP from a delayed SIGSTOP.
5083
369f6daa
GB
50842015-03-24 Gary Benson <gbenson@redhat.com>
5085
5086 * linux-x86-low.c (x86_linux_new_thread): Moved to
5087 nat/x86-linux.c.
5088 (x86_linux_prepare_to_resume): Likewise.
5089
8e5d4070
GB
50902015-03-24 Gary Benson <gbenson@redhat.com>
5091
5092 * Makefile.in (x86-linux-dregs.o): New rule.
5093 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5094 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5095 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5096 (x86_linux_dr_get): Likewise.
5097 (x86_linux_dr_set): Likewise.
5098 (update_debug_registers_callback): Likewise.
5099 (x86_linux_dr_set_addr): Likewise.
5100 (x86_linux_dr_get_addr): Likewise.
5101 (x86_linux_dr_set_control): Likewise.
5102 (x86_linux_dr_get_control): Likewise.
5103 (x86_linux_dr_get_status): Likewise.
5104 (x86_linux_update_debug_registers): Likewise.
5105
2b95d440
GB
51062015-03-24 Gary Benson <gbenson@redhat.com>
5107
5108 * linux-x86-low.c (x86_linux_update_debug_registers):
5109 New function, factored out from...
5110 (x86_linux_prepare_to_resume): ...this.
5111
14b0bc68
GB
51122015-03-24 Gary Benson <gbenson@redhat.com>
5113
5114 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5115 (x86_linux_dr_set): Likewise.
5116 (update_debug_registers_callback): Likewise.
5117 (x86_linux_dr_set_addr): Likewise.
5118 (x86_linux_dr_get_addr): Likewise.
5119 (x86_linux_dr_set_control): Likewise.
5120 (x86_linux_dr_get_control): Likewise.
5121 (x86_linux_dr_get_status): Likewise.
5122 (x86_linux_prepare_to_resume): Likewise.
5123
5dfe6ca8
GB
51242015-03-24 Gary Benson <gbenson@redhat.com>
5125
5126 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5127 Use perror_with_name. Pass string through gettext.
5128 (x86_linux_dr_set): Likewise.
5129
d33472ad
GB
51302015-03-24 Gary Benson <gbenson@redhat.com>
5131
5132 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5133 (x86_linux_dr_set_addr): ...this.
5134 (x86_dr_low_get_addr): Rename to...
5135 (x86_linux_dr_get_addr): ...this.
5136 (x86_dr_low_set_control): Rename to...
5137 (x86_linux_dr_set_control): ...this.
5138 (x86_dr_low_get_control): Rename to...
5139 (x86_linux_dr_get_control): ...this.
5140 (x86_dr_low_get_status): Rename to...
5141 (x86_linux_dr_get_status): ...this.
5142 (x86_dr_low): Update with new function names.
5143
4b134ca1
GB
51442015-03-24 Gary Benson <gbenson@redhat.com>
5145
5146 * Makefile.in (x86-linux.o): New rule.
5147 * configure.srv: Add x86-linux.o to relevant targets.
5148 * linux-low.c (lwp_set_arch_private_info): New function.
5149 (lwp_arch_private_info): Likewise.
5150 * linux-x86-low.c: Include nat/x86-linux.h.
5151 (arch_lwp_info): Removed structure.
5152 (update_debug_registers_callback):
5153 Use lwp_set_debug_registers_changed.
5154 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5155 and lwp_set_debug_registers_changed.
5156 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5157
34c703da
GB
51582015-03-24 Gary Benson <gbenson@redhat.com>
5159
5160 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5161 * linux-arm-low.c (arm_new_thread): Likewise.
5162 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5163 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5164 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5165 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5166
cff068da
GB
51672015-03-24 Gary Benson <gbenson@redhat.com>
5168
5169 * linux-low.c (ptid_of_lwp): New function.
5170 (lwp_is_stopped): Likewise.
5171 (lwp_stop_reason): Likewise.
5172 * linux-x86-low.c (update_debug_registers_callback):
5173 Use lwp_is_stopped.
5174 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5175 lwp_stop_reason.
5176
b2f7c7e8
GB
51772015-03-24 Gary Benson <gbenson@redhat.com>
5178
5179 * linux-low.h (linux_stop_lwp): Remove declaration.
5180
6d4ee8c6
GB
51812015-03-24 Gary Benson <gbenson@redhat.com>
5182
5183 * linux-low.h: Include nat/linux-nat.h.
5184 * linux-low.c (iterate_over_lwps_args): New structure.
5185 (iterate_over_lwps_filter): New function.
5186 (iterate_over_lwps): Likewise.
5187 * linux-x86-low.c (update_debug_registers_callback):
5188 Update signature to what iterate_over_lwps expects.
5189 Remove PID check that iterate_over_lwps now performs.
5190 (x86_dr_low_set_addr): Use iterate_over_lwps.
5191 (x86_dr_low_set_control): Likewise.
5192
70a0bb6b
GB
51932015-03-24 Gary Benson <gbenson@redhat.com>
5194
5195 * linux-x86-low.c (x86_debug_reg_state): New function.
5196 (x86_linux_prepare_to_resume): Use the above.
5197
7b669087
GB
51982015-03-24 Gary Benson <gbenson@redhat.com>
5199
5200 * linux-low.c (current_lwp_ptid): New function.
5201 * linux-x86-low.c: Include nat/linux-nat.h.
5202 (x86_dr_low_get_addr): Use current_lwp_ptid.
5203 (x86_dr_low_get_control): Likewise.
5204 (x86_dr_low_get_status): Likewise.
5205
eef49a3d
PA
52062015-03-20 Pedro Alves <palves@redhat.com>
5207
5208 * tracepoint.c (cmd_qtstatus): Make "str" const.
5209
b2333d22
PA
52102015-03-20 Pedro Alves <palves@redhat.com>
5211
5212 * server.c (handle_general_set): Make "req_str" const.
5213
23f238d3
PA
52142015-03-19 Pedro Alves <palves@redhat.com>
5215
5216 * linux-low.c (linux_resume_one_lwp): Rename to ...
5217 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5218 instead call perror_with_name.
5219 (check_ptrace_stopped_lwp_gone): New function.
5220 (linux_resume_one_lwp): Reimplement as wrapper around
5221 linux_resume_one_lwp_throw that swallows errors if the LWP is
5222 gone.
5223
91baf43f
PA
52242015-03-19 Pedro Alves <palves@redhat.com>
5225
5226 * linux-low.c (count_events_callback, select_event_lwp_callback):
5227 No longer check whether the thread has resume_stop as last resume
5228 kind.
5229
8bf3b159
PA
52302015-03-19 Pedro Alves <palves@redhat.com>
5231
5232 * linux-low.c (count_events_callback, select_event_lwp_callback):
5233 Use the lwp's status_pending_p field, not the thread's.
5234
b90fc188
PA
52352015-03-19 Pedro Alves <palves@redhat.com>
5236
5237 * linux-low.c (select_event_lwp_callback): Update comments to
5238 no longer mention SIGTRAP.
5239
464b0089
GB
52402015-03-18 Gary Benson <gbenson@redhat.com>
5241
5242 * server.c (handle_query): Do not report vFile:fstat as supported.
5243
aa9e327f
GB
52442015-03-11 Gary Benson <gbenson@redhat.com>
5245
5246 * hostio.c (sys/types.h): New include.
5247 (sys/stat.h): Likewise.
5248 (common-remote-fileio.h): Likewise.
5249 (handle_fstat): New function.
5250 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5251
791c0056
GB
52522015-03-11 Gary Benson <gbenson@redhat.com>
5253
5254 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5255 struct stat.st_blocks and struct stat.st_blksize.
5256 * configure: Regenerate.
5257 * config.in: Likewise.
5258 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5259 (OBS): Add common-remote-fileio.o.
5260 (common-remote-fileio.o): New rule.
5261
9a9df970
PA
52622015-03-09 Pedro Alves <palves@redhat.com>
5263
5264 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5265 'struct sockaddr' pointer in 'accept' call.
5266
9eb1356e
PA
52672015-03-09 Pedro Alves <palves@redhat.com>
5268
5269 Revert:
5270 2015-03-07 Pedro Alves <palves@redhat.com>
5271 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5272 or <winsock2.h> here. Instead include "gdb_socket.h".
5273 (remote_open): Use union gdb_sockaddr_u.
5274 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5275 or <winsock2.h> here. Instead include "gdb_socket.h".
5276 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5277 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5278 or <sys/un.h>.
5279 (init_named_socket, gdb_agent_helper_thread): Use union
5280 gdb_sockaddr_u.
5281
aac331e4
PA
52822015-03-07 Pedro Alves <palves@redhat.com>
5283
5284 * configure.ac (build_warnings): Move
5285 -Wdeclaration-after-statement to the C-specific set.
5286 * configure: Regenerate.
5287
366c75fc
PA
52882015-03-07 Pedro Alves <palves@redhat.com>
5289
5290 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5291 or <winsock2.h> here. Instead include "gdb_socket.h".
5292 (remote_open): Use union gdb_sockaddr_u.
5293 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5294 or <winsock2.h> here. Instead include "gdb_socket.h".
5295 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5296 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5297 or <sys/un.h>.
5298 (init_named_socket, gdb_agent_helper_thread): Use union
5299 gdb_sockaddr_u.
5300
492d29ea
PA
53012015-03-07 Pedro Alves <palves@redhat.com>
5302
5303 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5304 instead.
5305
60a191ed
YQ
53062015-03-06 Yao Qi <yao.qi@linaro.org>
5307
5308 * linux-aarch64-low.c (aarch64_insert_point): Use
5309 show_debug_regs as a boolean.
5310 (aarch64_remove_point): Likewise.
5311
f5771b1d
PA
53122015-03-05 Pedro Alves <palves@redhat.com>
5313
5314 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5315 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5316 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5317 * nto-low.c (nto_target_ops): Likewise.
5318 * spu-low.c (spu_target_ops): Likewise.
5319 * win32-low.c (win32_target_ops): Likewise.
5320
3e572f71
PA
53212015-03-04 Pedro Alves <palves@redhat.com>
5322
72f4393d 5323 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5324 Decide whether a breakpoint triggered based on the SIGTRAP's
5325 siginfo.si_code.
72f4393d
L
5326 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5327 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5328 (linux_low_filter_event): Check for breakpoints before checking
5329 watchpoints.
5330 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5331 siginfo.si_code.
72f4393d
L
5332 (linux_stopped_by_sw_breakpoint)
5333 (linux_supports_stopped_by_sw_breakpoint)
5334 (linux_stopped_by_hw_breakpoint)
5335 (linux_supports_stopped_by_hw_breakpoint): New functions.
5336 (linux_target_ops): Install new target methods.
3e572f71 5337
1ec68e26
PA
53382015-03-04 Pedro Alves <palves@redhat.com>
5339
5340 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5341 * server.c (swbreak_feature, hwbreak_feature): New globals.
5342 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5343 (captured_main): Clear swbreak_feature and hwbreak_feature.
5344 * server.h (swbreak_feature, hwbreak_feature): Declare.
5345 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5346 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5347 supports_stopped_by_hw_breakpoint>: New fields.
5348 (target_supports_stopped_by_sw_breakpoint)
5349 (target_stopped_by_sw_breakpoint)
5350 (target_supports_stopped_by_hw_breakpoint)
5351 (target_stopped_by_hw_breakpoint): Declare.
5352
15c66dd6
PA
53532015-03-04 Pedro Alves <palves@redhat.com>
5354
5355 enum lwp_stop_reason -> enum target_stop_reason
5356 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5357 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5358 (linux_wait_1, stuck_in_jump_pad_callback)
5359 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5360 (linux_stopped_by_watchpoint):
5361 * linux-low.h (enum lwp_stop_reason): Delete.
5362 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5363 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5364
98fc70d6
YQ
53652015-03-04 Yao Qi <yao.qi@linaro.org>
5366
5367 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5368
dd2ac174
GB
53692015-03-03 Gary Benson <gbenson@redhat.com>
5370
5371 * hostio.c (handle_vFile): Fix prefix lengths.
5372
d68e53f4
MM
53732015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5374
5375 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5376 ptr_bits.
5377
bf2d68ab
AA
53782015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5379
5380 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5381 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5382 (clean): Add "rm -f" for above C files.
5383 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5384 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5385 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5386 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5387 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5388 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5389 (init_registers_s390x_vx_linux64)
5390 (init_registers_s390x_tevx_linux64)
5391 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5392 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5393 declarations.
5394 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5395 (s390_store_vxrs_high): New functions.
5396 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5397 NT_S390_VXRS_HIGH.
5398 (s390_arch_setup): Add logic for selecting one of the new target
5399 descriptions. Activate the new vector regsets if applicable.
5400 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5401 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5402 and init_registers_s390x_tevx_linux64.
5403
c966a859
PA
54042015-03-01 Pedro Alves <palves@redhat.com>
5405
5406 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5407 parameter.
5408
4180215b
PA
54092015-02-27 Pedro Alves <palves@redhat.com>
5410
5411 * linux-x86-low.c (u_debugreg_offset): New function.
5412 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5413
749bab01
PA
54142015-02-27 Pedro Alves <palves@redhat.com>
5415
5416 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5417 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5418 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5419 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5420 (ps_lsetfpregs, ps_getpid)
5421 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5422 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5423 (ps_lsetxregs, ps_plog): Declare.
5424
3c14e5a3
PA
54252015-02-27 Pedro Alves <palves@redhat.com>
5426
5427 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5428 IP_AGENT_EXPORT_FUNC.
5429 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5430 IP_AGENT_EXPORT_FUNC.
5431 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5432 (IP_AGENT_EXPORT): Delete.
5433 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5434 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5435 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5436 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5437 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5438 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5439 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5440 (traceframe_read_count, traceframe_write_count)
5441 (traceframes_created, trace_state_variables, get_raw_reg)
5442 (get_trace_state_variable_value, set_trace_state_variable_value)
5443 (ust_loaded, helper_thread_id, cmd_buf): Use
5444 IPA_SYM_EXPORTED_NAME.
5445 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5446 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5447 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5448 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5449 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5450 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5451 EXTERN_C_PUSH/EXTERN_C_POP.
5452 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5453 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5454 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5455 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5456 (traceframe_write_count, traceframe_read_count)
5457 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5458 (about_to_request_buffer_space, get_trace_state_variable_value)
5459 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5460 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5461 EXTERN_C_PUSH/EXTERN_C_POP.
5462 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5463 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5464 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5465 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5466 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5467 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5468 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5469 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5470 Define.
5471 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5472 (IP_AGENT_EXPORT_VAR_DECL): Define.
5473 (tracing): Declare.
5474 (gdb_agent_get_raw_reg): Declare.
5475
fe978cb0
PA
54762015-02-27 Tom Tromey <tromey@redhat.com>
5477 Pedro Alves <palves@redhat.com>
5478
5479 Rename symbols whose names are reserved C++ keywords throughout.
5480
3bc3d82a
PA
54812015-02-27 Pedro Alves <palves@redhat.com>
5482
5483 * Makefile.in (COMPILER): New, get it from autoconf.
5484 (CXX): Get from autoconf instead.
5485 (COMPILE.pre): Use COMPILER.
5486 (CC-LD): Rename to ...
5487 (CC_LD): ... this. Use COMPILER.
5488 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5489 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5490 * acinclude.m4: Include build-with-cxx.m4.
5491 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5492 Disable -Werror by default if building in C++ mode.
5493 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5494 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5495 the C++ compiler. Save/restore CXXFLAGS too.
5496 * configure: Regenerate.
5497
07697489
PA
54982015-02-27 Pedro Alves <palves@redhat.com>
5499
5500 * acinclude.m4: Include libiberty.m4.
5501 * configure.ac: Call libiberty_INIT.
5502 * config.in, configure: Regenerate.
5503
9beb7c4e
PA
55042015-02-26 Pedro Alves <palves@redhat.com>
5505
5506 * linux-low.c (linux_wait_1): When incrementing the PC past a
5507 program breakpoint always use the_low_target.breakpoint_len as
5508 increment, rather than the maximum between that and
5509 the_low_target.decr_pc_after_break.
5510
8090aef2
PA
55112015-02-23 Pedro Alves <palves@redhat.com>
5512
5513 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5514 thread was doing a step-over; always adjust the PC if
5515 we stepped over a permanent breakpoint.
5516 (linux_wait_1): If we stepped over breakpoint that was on top of a
5517 permanent breakpoint, manually advance the PC past it.
5518
bc9540e8
PA
55192015-02-23 Pedro Alves <palves@redhat.com>
5520
5521 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5522 modes.
5523 (x86_fill_gregset, x86_store_gregset): Use it when handling
5524 $orig_eax.
5525
2db9a427
PA
55262015-02-20 Pedro Alves <palves@redhat.com>
5527
5528 * thread-db.c: Include "nat/linux-procfs.h".
5529 (thread_db_init): Skip listing new threads if the kernel supports
5530 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5531
afa8d396
PA
55322015-02-20 Pedro Alves <palves@redhat.com>
5533
5534 * linux-low.c (status_pending_p_callback): Use ptid_match.
5535
c9587f88
AT
55362015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5537
5538 PR breakpoints/16812
5539 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5540 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5541 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5542
b05ec7a5
AT
55432015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5544
5545 PR breakpoints/15956
5546 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5547
d33501a5
MM
55482015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5549
5550 * linux-low.c (linux_low_btrace_conf): Print size.
5551 * server.c (handle_btrace_conf_general_set): New.
5552 (hanle_general_set): Call handle_btrace_conf_general_set.
5553 (handle_query): Report Qbtrace-conf:bts:size as supported.
5554
f4abbc16
MM
55552015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5556
5557 * linux-low.c (linux_low_enable_btrace): Update parameters.
5558 (linux_low_btrace_conf): New.
5559 (linux_target_ops)<to_btrace_conf>: Initialize.
5560 * server.c (current_btrace_conf): New.
5561 (handle_btrace_enable): Rename to ...
5562 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5563 to target_enable_btrace. Update comment. Update users.
5564 (handle_qxfer_btrace_conf): New.
5565 (qxfer_packets): Add btrace-conf entry.
5566 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5567 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5568 (target_ops)<read_btrace_conf>: New.
5569 (target_enable_btrace): Update parameters.
5570 (target_read_btrace_conf): New.
5571
043c3577
MM
55722015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5573
5574 * server.c (handle_btrace_general_set): Remove call to
5575 target_supports_btrace.
5576 (supported_btrace_packets): New.
5577 (handle_query): Call supported_btrace_packets.
5578 * target.h: include btrace-common.h.
5579 (btrace_target_info): Removed.
5580 (supports_btrace, target_supports_btrace): Update parameters.
5581
734b0e4b
MM
55822015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5583
5584 * Makefile.in (SFILES): Add common/btrace-common.c.
5585 (OBS): Add common/btrace-common.o.
5586 (btrace-common.o): Add build rules.
5587 * linux-low: Include btrace-common.h.
5588 (linux_low_read_btrace): Use struct btrace_data. Call
5589 btrace_data_init and btrace_data_fini.
5590
d6c146e9
PA
55912015-02-06 Pedro Alves <palves@redhat.com>
5592
5593 * thread-db.c (find_new_threads_callback): Add debug output.
5594
20ba1ce6
PA
55952015-02-04 Pedro Alves <palves@redhat.com>
5596
5597 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5598 (resume_stopped_resumed_lwps): New function.
5599 (linux_wait_for_event_filtered): Use it.
5600
8cc73a39
SDJ
56012015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5602
5603 * Makefile.in (SFILES): Add linux-personality.c.
5604 (linux-personality.o): New rule.
5605 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5606 list of objects to be built.
5607 * linux-low.c: Include nat/linux-personality.h.
5608 (linux_create_inferior): Remove code to disable address space
5609 randomization (moved to ../nat/linux-personality.c). Create
5610 cleanup to disable address space randomization.
5611
fb23d554
SDJ
56122015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5613
5614 * Makefile.in (posix-strerror.o): New rule.
5615 (mingw-strerror.o): Likewise.
5616 * configure: Regenerated.
5617 * configure.ac: Source file ../common/common.host. Initialize new
5618 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5619
cdf43629
YQ
56202015-01-14 Yao Qi <yao@codesourcery.com>
5621
5622 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5623 (ppc-linux.o): New rule.
5624 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5625 * configure.ac: AC_CHECK_FUNCS(getauxval).
5626 * config.in: Re-generated.
5627 * configure: Re-generated.
5628 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5629 ppc64_64bit_inferior_p
5630
514c5338
YQ
56312015-01-14 Yao Qi <yao@codesourcery.com>
5632
5633 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5634 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5635 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5636 (PT_ORIG_R3, PT_TRAP): Likewise.
5637 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5638 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5639 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5640
3368c1e5
JB
56412015-01-10 Joel Brobecker <brobecker@adacore.com>
5642
5643 * i387-fp.c (i387_cache_to_xsave): In look over
5644 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5645 zmmh_low_space field by use of zmmh_high_space.
5646
582511be
PA
56472015-01-09 Pedro Alves <palves@redhat.com>
5648
5649 * linux-low.c (step_over_bkpt): Move higher up in the file.
5650 (handle_extended_wait): Don't store the stop_pc here.
5651 (get_stop_pc): Adjust comments and rename to ...
5652 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5653 stopped for a software breakpoint or hardware breakpoint.
5654 (thread_still_has_status_pending_p): New function.
5655 (status_pending_p_callback): Use
5656 thread_still_has_status_pending_p. If the event is no longer
5657 interesting, resume the LWP.
5658 (handle_tracepoints): Add assert.
5659 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5660 (wstatus_maybe_breakpoint): New function.
5661 (cancel_breakpoint): Delete function.
5662 (check_stopped_by_watchpoint): New function, factored out from
5663 linux_low_filter_event.
5664 (lp_status_maybe_breakpoint): Delete function.
5665 (linux_low_filter_event): Remove filter_ptid argument.
5666 Leave thread group exits pending here. Store the LWP's stop PC.
5667 Always leave events pending.
5668 (linux_wait_for_event_filtered): Pull all events out of the
5669 kernel, and leave them all pending.
5670 (count_events_callback, select_event_lwp_callback): Consider all
5671 events.
5672 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5673 (select_event_lwp): Only give preference to the stepping LWP in
5674 all-stop mode. Adjust comments.
5675 (ignore_event): New function.
5676 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5677 references to cancel_breakpoints. Adjust to renames. Also give
5678 equal priority to all LWPs that have had events in non-stop mode.
5679 If reporting a software breakpoint event, unadjust the LWP's PC.
5680 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5681 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5682 Adjust.
5683 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5684 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5685 (linux_stopped_by_watchpoint): Adjust.
5686 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5687 * linux-low.h (enum lwp_stop_reason): New.
5688 (struct lwp_info) <stop_pc>: Adjust comment.
5689 <stopped_by_watchpoint>: Delete field.
5690 <stop_reason>: New field.
5691 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5692 * mem-break.c (software_breakpoint_inserted_here)
5693 (hardware_breakpoint_inserted_here): New function.
5694 * mem-break.h (software_breakpoint_inserted_here)
5695 (hardware_breakpoint_inserted_here): Declare.
5696 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5697 (cancel_breakpoints): Delete.
5698 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5699 (upload_fast_traceframes): Remove references to
5700 cancel_breakpoints.
5701
a33e3959
PA
57022015-01-09 Pedro Alves <palves@redhat.com>
5703
5704 * thread-db.c (find_new_threads_callback): Ignore thread if the
5705 kernel thread ID is -1.
5706
8784d563
PA
57072015-01-09 Pedro Alves <palves@redhat.com>
5708
5709 * linux-low.c (linux_attach_fail_reason_string): Move to
5710 nat/linux-ptrace.c, and rename.
5711 (linux_attach_lwp): Update comment.
5712 (attach_proc_task_lwp_callback): New function.
5713 (linux_attach): Adjust to rename and use
5714 linux_proc_attach_tgid_threads.
5715 (linux_attach_fail_reason_string): Delete declaration.
5716
76f2b779
JB
57172015-01-01 Joel Brobecker <brobecker@adacore.com>
5718
5719 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5720 * server.c (gdbserver_version): Likewise.
5721
fafcc06a
SDJ
57222014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5723
5724 * remote-utils.c: Include ctype.h.
5725 (input_interrupt): Explicitly handle the case when the char
5726 received is the NUL byte. Improve the printing of non-ASCII
5727 characters.
5728
beed38b8
JB
57292014-12-16 Joel Brobecker <brobecker@adacore.com>
5730
5731 * linux-low.c (linux_low_filter_event): Update call to
5732 linux_enable_event_reporting following the addition of
5733 a new parameter to that function.
5734
bf330350
CU
57352014-12-16 Catalin Udma <catalin.udma@freescale.com>
5736
5737 PR server/17457
5738 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5739 (AARCH64_FPCR_REGNO): Likewise.
5740 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5741 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5742 (aarch64_store_fpregset): Likewise.
5743
5227d625
JB
57442014-12-15 Joel Brobecker <brobecker@adacore.com>
5745
5746 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5747 Remove FIXME comment about assumption about N.
5748
f93b65a0
JB
57492014-12-13 Joel Brobecker <brobecker@adacore.com>
5750
5751 * configure.ac: If large-file support is disabled in GDBserver,
5752 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5753 * configure: Regenerate.
5754
e5a9158d
AA
57552014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5756
5757 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5758 warning upon ENODATA from ptrace.
5759 * linux-s390-low.c (s390_store_tdb): New.
5760 (s390_regsets): Add regset for NT_S390_TDB.
5761
feea5f36
AA
57622014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5763
5764 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5765 without a fill_function.
5766 * linux-s390-low.c (s390_fill_last_break): Remove.
5767 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5768 (s390_arch_setup): Use regset's size instead of fill_function for
5769 loop end condition.
5770
098dbe61
AA
57712014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5772
5773 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5774 the regset's store function when ptrace returned an error.
5775 * regcache.c (get_thread_regcache): Invalidate register cache
5776 before fetching inferior's registers.
5777
28eef672
AA
57782014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5779
5780 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5781 while-loop as for-loop.
5782 (regsets_store_inferior_registers): Likewise.
5783
bdca27a2
YQ
57842014-11-28 Yao Qi <yao@codesourcery.com>
5785
5786 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5787 * config.in, configure: Re-generate.
5788 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5789 is defined.
5790
9c232dda
YQ
57912014-11-21 Yao Qi <yao@codesourcery.com>
5792
5793 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5794 (AC_CHECK_HEADERS): Remove malloc.h.
5795 * configure: Re-generated.
5796 * config.in: Re-generated.
5797 * server.h: Don't include alloca.h and malloc.h.
5798 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5799 Don't include malloc.h.
5800
43968415
JB
58012014-11-17 Joel Brobecker <brobecker@adacore.com>
5802
5803 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5804 corresponding ERRNO check in same block.
5805
40e91bc7
PA
58062014-11-12 Pedro Alves <palves@redhat.com>
5807
5808 * server.c (cont_thread): Update comment.
5809 (start_inferior, attach_inferior): No longer clear cont_thread.
5810 (handle_v_cont): No longer set cont_thread.
5811 (captured_main): Clear cont_thread each time a GDB connects.
5812
c2c118cf
PA
58132014-11-12 Pedro Alves <palves@redhat.com>
5814
5815 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5816 thread, and don't resume all threads if the Hc thread has exited.
5817
78708b7c
PA
58182014-11-12 Pedro Alves <palves@redhat.com>
5819
5820 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5821 the process group instead of to a specific LWP.
5822
a2abc7de
PA
58232014-10-15 Pedro Alves <palves@redhat.com>
5824
5825 PR server/17487
5826 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5827 parameter.
5828 (arm_set_thread_context): Delete.
5829 (the_low_target): Adjust.
5830 * win32-i386-low.c (debug_registers_changed)
5831 (debug_registers_used): Delete.
5832 (update_debug_registers_callback): New function.
5833 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5834 needing to update their debug registers.
5835 (win32_get_current_dr): New function.
5836 (x86_dr_low_get_addr, x86_dr_low_get_control)
5837 (x86_dr_low_get_status): Fetch the debug register from the thread
5838 record's context.
5839 (i386_initial_stuff): Adjust.
5840 (i386_get_thread_context): Remove current_event parameter. Don't
5841 clear debug_registers_changed nor copy DR values to
5842 debug_reg_state.
5843 (i386_set_thread_context): Delete.
5844 (i386_prepare_to_resume): New function.
5845 (i386_thread_added): Mark the thread as needing to update irs
5846 debug registers.
5847 (the_low_target): Remove i386_set_thread_context and install
5848 i386_prepare_to_resume.
5849 * win32-low.c (win32_get_thread_context): Adjust.
5850 (win32_set_thread_context): Use SetThreadContext
5851 directly.
5852 (win32_prepare_to_resume): New function.
5853 (win32_require_context): New function, factored out from ...
5854 (thread_rec): ... this.
5855 (continue_one_thread): Call win32_prepare_to_resume on each thread
5856 we're about to continue.
5857 (win32_resume): Call win32_prepare_to_resume on the event thread.
5858 * win32-low.h (struct win32_thread_info)
5859 <debug_registers_changed>: New field.
5860 (struct win32_target_ops): Change prototype of set_thread_context,
5861 delete set_thread_context and add prepare_to_resume.
5862 (win32_require_context): New declaration.
5863
a442d071
GB
58642014-10-08 Gary Benson <gbenson@redhat.com>
5865
5866 * server.h: Do not include common-exceptions.h.
5867
6f1947e8
GB
58682014-10-08 Gary Benson <gbenson@redhat.com>
5869
5870 * server.h: Do not include cleanups.h.
5871
63b434a4
JH
58722014-09-30 James Hogan <james.hogan@imgtec.com>
5873
5874 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5875 mips64-dsp-linux.c.
5876
c4d9ceb6
YQ
58772014-09-23 Yao Qi <yao@codesourcery.com>
5878
5879 * linux-low.c (lp_status_maybe_breakpoint): New function.
5880 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5881 (count_events_callback): Likewise.
5882 (select_event_lwp_callback): Likewise.
5883 (cancel_breakpoints_callback): Likewise.
5884
89a5711c
DB
58852014-09-19 Don Breazeal <donb@codesourcery.com>
5886
5887 * linux-low.c (handle_extended_wait): Call
5888 linux_ptrace_get_extended_event.
5889 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5890 linux_is_extended_waitstatus.
5891
bffc0964
JB
58922014-09-16 Joel Brobecker <brobecker@adacore.com>
5893
5894 * Makefile.in (CPPFLAGS): Define.
5895 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5896 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5897
0bfdf32f
GB
58982014-09-16 Gary Benson <gbenson@redhat.com>
5899
5900 * inferiors.h (current_inferior): Renamed as...
5901 (current_thread): New variable. All uses updated.
5902 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5903 (maybe_move_out_of_jump_pad): Likewise.
5904 (cancel_breakpoint): Likewise.
5905 (linux_low_filter_event): Likewise.
5906 (wait_for_sigstop): Likewise.
5907 (linux_resume_one_lwp): Likewise.
5908 (need_step_over_p): Likewise.
5909 (start_step_over): Likewise.
5910 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5911 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5912 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5913 and save_inferior as saved_thread.
5914 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5915 saved_thread.
5916 (regcache_invalidate_thread): Likewise.
5917 * remote-utils.c (prepare_resume_reply): Likewise.
5918 * thread-db.c (thread_db_get_tls_address): Likewise.
5919 (disable_thread_event_reporting): Likewise.
5920 (remove_thread_event_breakpoints): Likewise.
5921 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5922 as saved_thread.
5923 * target.h (set_desired_inferior): Renamed as...
5924 (set_desired_thread): New declaration. All uses updated.
5925 * server.c (myresume): Updated comment to reference thread instead
5926 of inferior.
5927 (handle_serial_event): Likewise.
5928 (handle_target_event): Likewise.
5929
361c8ade
GB
59302014-09-12 Tom Tromey <tromey@redhat.com>
5931 Gary Benson <gbenson@redhat.com>
5932
5933 * regcache.h: Include common-regcache.h.
5934 (regcache_read_pc): Don't declare.
5935 * regcache.c (get_thread_regcache_for_ptid): New function.
5936
bd9269f7
GB
59372014-09-11 Tom Tromey <tromey@redhat.com>
5938 Gary Benson <gbenson@redhat.com>
5939
5940 * symbol.c: New file.
5941 * Makefile.in (SFILES): Add symbol.c.
5942 (OBS): Add symbol.o.
5943
f8c1d06b
GB
59442014-09-11 Gary Benson <gbenson@redhat.com>
5945
5946 * target.c (target_stop_ptid, target_continue_ptid): New
5947 functions.
5948
721ec300
GB
59492014-09-11 Tom Tromey <tromey@redhat.com>
5950 Gary Benson <gbenson@redhat.com>
5951
5952 * target.h: Include target/target.h.
5953 * target.c (target_read_memory, target_read_uint32)
5954 (target_write_memory): New functions.
5955
c5e92cca
GB
59562014-09-11 Gary Benson <gbenson@redhat.com>
5957
5958 * server.h (debug_hw_points): Don't declare.
5959 * server.c (debug_hw_points): Don't define. Replace all uses
5960 with show_debug_regs.
5961 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5962 all uses with show_debug_regs.
5963
2e4bb98a
EBM
59642014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5965
5966 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5967 endianness into account.
5968 (ppc_supply_ptrace_register): Likewise.
5969
ac740bc7
JH
59702014-09-03 James Hogan <james.hogan@imgtec.com>
5971
5972 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5973 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5974
97ea6506
GB
59752014-09-03 Gary Benson <gbenson@redhat.com>
5976
5977 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5978 ALL_DEBUG_ADDRESS_REGISTERS.
5979
df7e5265
GB
59802014-09-02 Gary Benson <gbenson@redhat.com>
5981
5982 * i386-low.h: Renamed as...
5983 * x86-low.h: New file. All type, function and variable name
5984 prefixes changed from "i386_" to "x86_". All references updated.
5985 * i386-low.c: Renamed as...
5986 * x86-low.c: New file. All type, function and variable name
5987 prefixes changed from "i386_" to "x86_". All references updated.
5988
ed859da7
GB
59892014-09-02 Gary Benson <gbenson@redhat.com>
5990
5991 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5992 (x86_linux_new_thread): Likewise.
5993
860789c7
GB
59942014-08-29 Gary Benson <gbenson@redhat.com>
5995
5996 * server.h (setjmp.h): Do not include.
5997 (toplevel): Do not declare.
5998 (common-exceptions.h): Include.
5999 (cleanups.h): Likewise.
6000 * server.c (toplevel): Do not define.
6001 (exit_code): New static global.
6002 (detach_or_kill_for_exit_cleanup): New function.
6003 (main): New function. Original main renamed to...
6004 (captured_main): New function.
6005 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6006
ff55e1b5
GB
60072014-08-29 Gary Benson <gbenson@redhat.com>
6008
6009 * Makefile.in (SFILES): Add common/common-exceptions.c.
6010 (OBS): Add common-exceptions.o.
6011 (common-exceptions.o): New rule.
6012 * utils.c (prepare_to_throw_exception): New function.
6013
e9bcb658
GB
60142014-08-29 Gary Benson <gbenson@redhat.com>
6015
6016 * config.in: Regenerate.
6017 * configure: Likewise.
6018
e3180625
GB
60192014-08-29 Gary Benson <gbenson@redhat.com>
6020
6021 * Makefile.in (SFILES): Add common/cleanups.c.
6022 (OBS): cleanups.o.
6023 (cleanups.o): New rule.
6024
e3d6ba5d
GB
60252014-08-29 Gary Benson <gbenson@redhat.com>
6026
6027 * utils.c (internal_vwarning): New function.
6028
7096e886
GB
60292014-08-28 Gary Benson <gbenson@redhat.com>
6030
6031 * utils.h (fatal): Remove declaration.
6032 * utils.c (fatal): Remove function.
6033
14ce3192
GB
60342014-08-28 Gary Benson <gbenson@redhat.com>
6035
6036 * tracepoint.c (gdb_agent_init): Replace fatal with
6037 perror_with_name.
6038 (initialize_tracepoint): Likewise.
6039
50278d59
GB
60402014-08-28 Gary Benson <gbenson@redhat.com>
6041
6042 * remote-utils.c (remote_prepare): Replace fatal with error.
6043
aa96c426
GB
60442014-08-28 Gary Benson <gbenson@redhat.com>
6045
6046 * linux-low.c (linux_async): Replace fatal with warning.
6047 Tidy up and return.
6048 (linux_start_non_stop): Return -1 if linux_async failed.
6049
f7160e97
GB
60502014-08-28 Gary Benson <gbenson@redhat.com>
6051
6052 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6053 gdb_assert.
6054 (i386_dr_low_get_addr): Remove vague comment.
6055 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6056 gdb_assert.
6057
38e08fca
GB
60582014-08-28 Gary Benson <gbenson@redhat.com>
6059
6060 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6061 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6062 internal_error.
6063 (linux_resume_one_lwp): Likewise.
6064 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6065 gdb_assert.
6066 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6067 with internal_error.
6068 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6069 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6070 (find_register_by_name): Replace fatal with internal_error.
6071 (find_regno): Likewise.
6072 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6073 * thread-db.c (thread_db_create_event): Likewise.
6074 (thread_db_load_search): Likewise.
6075 (try_thread_db_load_1): Likewise.
6076 * tracepoint.c (get_jump_space_head): Replace fatal with
6077 internal_error.
6078 (claim_trampoline_space): Likewise.
6079 (have_fast_tracepoint_trampoline_buffer): Likewise.
6080 (cmd_qtstart): Likewise.
6081 (stop_tracing): Likewise.
6082 (fast_tracepoint_collecting): Likewise.
6083 (target_malloc): Likewise.
6084 (download_tracepoint): Likewise.
6085 (download_trace_state_variables): Replace check with gdb_assert.
6086 (upload_fast_traceframes): Replace fatal with internal_error.
6087
34abf635
GB
60882014-08-19 Tom Tromey <tromey@redhat.com>
6089 Gary Benson <gbenson@redhat.com>
6090
6091 * Makefile.in (SFILES): Add common/common-debug.c.
6092 (OBS): Add common-debug.o.
6093 (common-debug.o): New rule.
6094 * debug.h (debug_printf): Don't declare.
6095 * debug.c (debug_printf): Renamed and rewritten as...
6096 (debug_vprintf): New function.
6097
f6e94d78
GB
60982014-08-19 Gary Benson <gbenson@redhat.com>
6099
6100 * utils.h: Do not include print-utils.h.
6101
9239eeab
GB
61022014-08-19 Tom Tromey <tromey@redhat.com>
6103 Gary Benson <gbenson@redhat.com>
6104
6105 * server.h: Add static assertion.
6106 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6107
ef87c8bb
GB
61082014-08-19 Tom Tromey <tromey@redhat.com>
6109 Gary Benson <gbenson@redhat.com>
6110
6111 * Makefile.in (SFILES): Add common/errors.c.
6112 (OBS): Add errors.o.
6113 (IPA_OBS): Add errors-ipa.o.
6114 (errors.o): New rule.
6115 (errors-ipa.o): Likewise.
6116 * utils.h (perror_with_name, error, warning): Don't declare.
6117 * utils.c (warning): Renamed and rewritten as...
6118 (vwarning): New function.
6119 (error): Renamed and rewritten as...
6120 (verror): New function.
6121 (internal_error): Renamed and rewritten as...
6122 (internal_verror): New function.
6123
bb974a24
GB
61242014-08-07 Gary Benson <gbenson@redhat.com>
6125
6126 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6127 * configure: Regenerate.
6128 * config.in: Likewise.
6129 * server.h: Do not include errno.h.
6130 * event-loop.c: Likewise.
6131 * hostio-errno.c: Likewise.
6132 * linux-low.c: Likewise.
6133 * remote-utils.c: Likewise.
6134 * spu-low.c: Likewise.
6135 * utils.c: Likewise.
6136 * gdbreplay.c: Unconditionally include errno.h.
6137
6d3d12eb
GB
61382014-08-07 Gary Benson <gbenson@redhat.com>
6139
6140 * server.h: Do not include string.h.
6141 * event-loop.c: Likewise.
6142 * linux-low.c: Likewise.
6143 * regcache.c: Likewise.
6144 * remote-utils.c: Likewise.
6145 * spu-low.c: Likewise.
6146 * utils.c: Likewise.
6147
dccbb609
GB
61482014-08-07 Gary Benson <gbenson@redhat.com>
6149
6150 * server.h: Do not include gdb_assert.h.
6151
e76df0d0
GB
61522014-08-07 Gary Benson <gbenson@redhat.com>
6153
6154 * server.h: Do not include common-utils.h.
6155
4cb9c816
GB
61562014-08-07 Gary Benson <gbenson@redhat.com>
6157
6158 * server.h: Do not include ptid.h.
6159 * notif.h: Likewise.
6160
3995eeee
GB
61612014-08-07 Gary Benson <gbenson@redhat.com>
6162
6163 * server.h: Do not include gdb_locale.h.
6164
cb9f1a9b
GB
61652014-08-07 Gary Benson <gbenson@redhat.com>
6166
6167 * server.h: Do not include gdb/signals.h.
6168 * win32-low.c: Likewise.
6169
a5fceff8
GB
61702014-08-07 Gary Benson <gbenson@redhat.com>
6171
6172 * server.h: Do not include pathmax.h.
6173
b9391142
GB
61742014-08-07 Gary Benson <gbenson@redhat.com>
6175
6176 * server.h: Do not include libiberty.h.
6177 * linux-bfin-low.c: Likewise.
6178
0e443c87
GB
61792014-08-07 Gary Benson <gbenson@redhat.com>
6180
6181 * server.h: Do not include ansidecl.h.
6182
8ebb3f56
GB
61832014-08-07 Gary Benson <gbenson@redhat.com>
6184
6185 * linux-x86-low.c: Do not include stddef.h.
6186 * lynx-ppc-low.c: Likewise.
6187 * tracepoint.c: Likewise.
6188
8980bdf6
GB
61892014-08-07 Gary Benson <gbenson@redhat.com>
6190
6191 * server.h: Do not include stdarg.h.
6192 * nto-low.c: Likewise.
6193
d7096f71
GB
61942014-08-07 Gary Benson <gbenson@redhat.com>
6195
6196 * server.h: Do not include stdlib.h.
6197 * inferiors.c: Likewise.
6198 * linux-low.c: Likewise.
6199 * regcache.c: Likewise.
6200 * spu-low.c: Likewise.
6201 * tracepoint.c: Likewise.
6202 * utils.c: Likewise.
6203
d02f550d
GB
62042014-08-07 Gary Benson <gbenson@redhat.com>
6205
6206 * server.h: Do not include stdio.h.
6207 * linux-low.c: Likewise.
6208 * remote-utils.c: Likewise.
6209 * spu-low.c: Likewise.
6210 * utils.c: Likewise.
6211 * wincecompat.c: Likewise.
6212
87f6c4e3
GB
62132014-08-06 Gary Benson <gbenson@redhat.com>
6214
6215 * regcache.c (init_register_cache): Move conditionals inside if.
6216
7089dca4
GB
62172014-08-06 Gary Benson <gbenson@redhat.com>
6218
6219 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6220
462f517e
GB
62212014-07-31 Gary Benson <gbenson@redhat.com>
6222
6223 * ax.h: Do not include server.h.
6224 * gdbthread.h: Likewise.
6225 * lynx-low.h: Likewise.
6226 * notif.h: Likewise.
6227
976411d6
GB
62282014-07-30 Gary Benson <gbenson@redhat.com>
6229
6230 * server.h: Include common-defs.h.
6231 Do not include config.h or build-gnulib-gdbserver/config.h.
6232
d41f6d8e
GB
62332014-07-30 Gary Benson <gbenson@redhat.com>
6234
6235 * hostio-errno.c: Move server.h to top of includes list.
6236 * inferiors.c: Likewise.
6237 * linux-x86-low.c: Likewise.
6238 * notif.c: Include server.h.
6239
314c6a35
TT
62402014-07-24 Tom Tromey <tromey@redhat.com>
6241 Gary Benson <gbenson@redhat.com>
6242
6243 * server.h (CORE_ADDR): Now unsigned.
6244
69ff6be5
PA
62452014-07-16 Pedro Alves <palves@redhat.com>
6246
6247 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6248
ce9e3fe7
PA
62492014-07-15 Pedro Alves <palves@redhat.com>
6250
6251 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6252 copy.
6253
e76126e8
PA
62542014-07-11 Pedro Alves <palves@redhat.com>
6255
6256 * linux-low.c (kill_wait_lwp): New function, based on
6257 kill_one_lwp_callback, but use my_waitpid directly.
6258 (kill_one_lwp_callback, linux_kill): Use it.
6259
8e9db26e
PA
62602014-06-23 Pedro Alves <palves@redhat.com>
6261
6262 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6263 before setting DR0..DR3.
6264
698b3e08
GB
62652014-06-20 Gary Benson <gbenson@redhat.com>
6266
6267 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6268 * configure: Regenerated.
6269 * config.in: Likewise.
6270
125f8a3d
GB
62712014-06-20 Gary Benson <gbenson@redhat.com>
6272
6273 * Makefile.in (SFILES): Update locations for files moved
6274 from common to nat.
6275 (object file files): Reordered.
6276
42995dbd
GB
62772014-06-20 Gary Benson <gbenson@redhat.com>
6278
6279 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6280 (i386_dr_low_set_addr): Likewise.
6281 (i386_dr_low_get_addr): Likewise.
6282 (i386_dr_low_can_set_control): Likewise.
6283 (i386_dr_low_set_control): Likewise.
6284 (i386_dr_low_get_control): Likewise.
6285 (i386_dr_low_get_status): Likewise.
6286 (i386_get_debug_register_length): Likewise.
6287 * linux-x86-low.c (i386_dr_low_set_addr):
6288 Changed signature. Made static.
6289 (i386_dr_low_get_addr): Likewise.
6290 (i386_dr_low_set_control): Likewise.
6291 (i386_dr_low_get_control): Likewise.
6292 (i386_dr_low_get_status): Likewise.
6293 (i386_dr_low): New global variable.
6294 * win32-i386-low.c (i386_dr_low_set_addr):
6295 Changed signature. Made static.
6296 (i386_dr_low_get_addr): Likewise.
6297 (i386_dr_low_set_control): Likewise.
6298 (i386_dr_low_get_control): Likewise.
6299 (i386_dr_low_get_status): Likewise.
6300 (i386_dr_low): New global variable.
6301
e1d2394b
MS
63022014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6303
6304 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6305 * Makefile.in (AR, AR_FLAGS): Define.
6306 * configure: Regenerate.
6307
3a8ee006
GB
63082014-06-19 Gary Benson <gbenson@redhat.com>
6309
6310 * Makefile.in (i386-dregs.o): New rule.
6311 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6312 * i386-low.c (target.h): Remove include.
6313 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6314 (DR_CONTROL_SHIFT): Likewise.
6315 (DR_CONTROL_SIZE): Likewise.
6316 (DR_RW_EXECUTE): Likewise.
6317 (DR_RW_WRITE): Likewise.
6318 (DR_RW_READ): Likewise.
6319 (DR_RW_IORW): Likewise.
6320 (DR_LEN_1): Likewise.
6321 (DR_LEN_2): Likewise.
6322 (DR_LEN_4): Likewise.
6323 (DR_LEN_8): Likewise.
6324 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6325 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6326 (DR_ENABLE_SIZE): Likewise.
6327 (DR_LOCAL_SLOWDOWN): Likewise.
6328 (DR_GLOBAL_SLOWDOWN): Likewise.
6329 (DR_CONTROL_RESERVED): Likewise.
6330 (I386_DR_CONTROL_MASK): Likewise.
6331 (I386_DR_VACANT): Likewise.
6332 (I386_DR_LOCAL_ENABLE): Likewise.
6333 (I386_DR_GLOBAL_ENABLE): Likewise.
6334 (I386_DR_DISABLE): Likewise.
6335 (I386_DR_SET_RW_LEN): Likewise.
6336 (I386_DR_GET_RW_LEN): Likewise.
6337 (I386_DR_WATCH_HIT): Likewise.
6338 (i386_wp_op_t): Likewise.
6339 (i386_show_dr): Likewise.
6340 (i386_length_and_rw_bits): Likewise.
6341 (i386_insert_aligned_watchpoint): Likewise.
6342 (i386_remove_aligned_watchpoint): Likewise.
6343 (i386_handle_nonaligned_watchpoint): Likewise.
6344 i386_update_inferior_debug_regs(): Likewise.
6345 (i386_dr_insert_watchpoint): Likewise.
6346 (i386_dr_remove_watchpoint): Likewise.
6347 (i386_dr_region_ok_for_watchpoint): Likewise.
6348 (i386_dr_stopped_data_address): Likewise.
6349 (i386_dr_stopped_by_watchpoint): Likewise.
6350
8f26655c
GB
63512014-06-19 Gary Benson <gbenson@redhat.com>
6352
6353 * i386-low.c (i386_dr_show): Renamed to
6354 i386_show_dr and made static. All uses updated.
6355 (i386_dr_length_and_rw_bits): Renamed to
6356 i386_length_and_rw_bits and made static.
6357 All uses updated.
6358 (i386_dr_insert_aligned_watchpoint): Renamed to
6359 i386_insert_aligned_watchpoint and made static.
6360 All uses updated.
6361 (i386_dr_remove_aligned_watchpoint): Renamed to
6362 i386_remove_aligned_watchpoint and made static.
6363 All uses updated.
6364 (i386_dr_update_inferior_debug_regs): Renamed to
6365 i386_update_inferior_debug_regs and made static.
6366 All uses updated.
6367
b9228891
GB
63682014-06-18 Gary Benson <gbenson@redhat.com>
6369
5171def3
GB
6370 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6371 (i386_dr_low_can_set_control): Likewise.
6372 (i386_get_debug_register_length): Likewise.
6373 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6374 (i386_dr_low_can_set_control): Likewise.
6375 (i386_get_debug_register_length): Likewise.
6376
63772014-06-17 Gary Benson <gbenson@redhat.com>
6378
b9228891
GB
6379 * i386-low.h (i386-dregs.h): New include.
6380 (DR_FIRSTADDR): Now in i386-dregs.h.
6381 (DR_LASTADDR): Likewise.
6382 (DR_NADDR): Likewise.
6383 (DR_STATUS): Likewise.
6384 (DR_CONTROL): Likewise.
6385 (i386_debug_reg_state): Likewise.
6386 (i386_dr_insert_watchpoint): Likewise.
6387 (i386_dr_remove_watchpoint): Likewise.
6388 (i386_dr_region_ok_for_watchpoint): Likewise.
6389 (i386_dr_stopped_data_address): Likewise.
6390 (i386_dr_stopped_by_watchpoint): Likewise.
6391 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6392
4be83cc2
GB
63932014-06-18 Gary Benson <gbenson@redhat.com>
6394
6395 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6396 i386_dr_insert_watchpoint.
6397 (i386_low_remove_watchpoint): Renamed to
6398 i386_dr_remove_watchpoint.
6399 (i386_low_region_ok_for_watchpoint): Renamed to
6400 i386_dr_region_ok_for_watchpoint.
6401 (i386_low_stopped_data_address): Renamed to
6402 i386_dr_stopped_data_address.
6403 (i386_low_stopped_by_watchpoint): Renamed to
6404 i386_dr_stopped_by_watchpoint.
6405 * i386-low.c (i386_show_dr): Renamed to
6406 i386_dr_show and made nonstatic. All uses updated.
6407 (i386_length_and_rw_bits): Renamed to
6408 i386_dr_length_and_rw_bits and made nonstatic.
6409 All uses updated.
6410 (i386_insert_aligned_watchpoint): Renamed to
6411 i386_dr_insert_aligned_watchpoint and made nonstatic.
6412 All uses updated.
6413 (i386_remove_aligned_watchpoint): Renamed to
6414 i386_dr_remove_aligned_watchpoint and made nonstatic.
6415 All uses updated.
6416 (i386_update_inferior_debug_regs): Renamed to
6417 i386_dr_update_inferior_debug_regs and made nonstatic.
6418 All uses updated.
6419 (i386_low_insert_watchpoint): Renamed to
6420 i386_dr_insert_watchpoint. All uses updated.
6421 (i386_low_remove_watchpoint): Renamed to
6422 i386_dr_remove_watchpoint. All uses updated.
6423 (i386_low_region_ok_for_watchpoint): Renamed to
6424 i386_dr_region_ok_for_watchpoint. All uses updated.
6425 (i386_low_stopped_data_address): Renamed to
6426 i386_dr_stopped_data_address. All uses updated.
6427 (i386_low_stopped_by_watchpoint): Renamed to
6428 i386_dr_stopped_by_watchpoint. All uses updated.
6429
131aa0d4
GB
64302014-06-18 Gary Benson <gbenson@redhat.com>
6431
6432 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6433 (i386_dr_low_can_set_control): Likewise.
6434 (i386_insert_aligned_watchpoint): New check.
6435
d9305f7f
GB
64362014-06-18 Gary Benson <gbenson@redhat.com>
6437
6438 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6439 Renamed to state.
6440
e927c9fc
GB
64412014-06-18 Gary Benson <gbenson@redhat.com>
6442
6443 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6444 instead of fatal and error.
6445 (i386_handle_nonaligned_watchpoint): Likewise.
6446
1b6d4134
GB
64472014-06-18 Gary Benson <gbenson@redhat.com>
6448
6449 * i386-low.c (i386_get_debug_register_length): New macro.
6450 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6451 (i386_show_dr): Use debug_printf instead of fprintf. Use
6452 phex to format values.
6453
6e62758f
GB
64542014-06-18 Gary Benson <gbenson@redhat.com>
6455
6456 * i386-low.h: Comment changes.
6457 * i386-low.c: Likewise.
6458
fc6e2f03
GB
64592014-06-18 Gary Benson <gbenson@redhat.com>
6460
6461 * i386-low.c: Whitespace changes.
6462
f9d1eeed
TT
64632014-06-12 Tom Tromey <tromey@redhat.com>
6464
6465 * utils.c (freeargv): Remove.
6466
0b04e523
TT
64672014-06-12 Tom Tromey <tromey@redhat.com>
6468
6469 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6470 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6471 (parse_debug_format_options): Likewise.
6472 (gdbserver_usage): Likewise.
6473 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6474 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6475 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6476 against libiberty.
6477 ($(LIBGNU)): Depend on libiberty.
6478 (all-lib): Recurse into all subdirs.
6479 (install-only): Invoke "install" target in subdirs.
6480 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6481 targets.
6482 * configure: Rebuild.
6483 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6484 for vasprintf, vsnprintf, or gettimeofday.
6485 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6486 srv_tgtobj.
6487
270c9937
JB
64882014-06-05 Joel Brobecker <brobecker@adacore.com>
6489
6490 * development.sh: Delete.
6491 * Makefile.in (config.status): Adjust dependency on development.sh.
6492 * configure.ac: Adjust development.sh source call.
6493 * configure: Regenerate.
6494
0a261ed8
PA
64952014-06-02 Pedro Alves <palves@redhat.com>
6496
6497 * ax.c (gdb_free_agent_expr): New function.
6498 * ax.h (gdb_free_agent_expr): New declaration.
6499 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6500 list.
6501 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6502 static.
6503 (clear_breakpoint_conditions_and_commands): New function.
6504 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6505 (clear_breakpoint_conditions_and_commands): New declaration.
6506
e9dae05e
RR
65072014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6508
6509 * linux-aarch64-low.c (asm/ptrace.h): Include.
6510
5876f503
JK
65112014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6512
6513 Fix TLS access for -static -pthread.
6514 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6515 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6516 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6517
802e8e6d
PA
65182014-05-20 Pedro Alves <palves@redhat.com>
6519
6520 * linux-aarch64-low.c (aarch64_insert_point)
6521 (aarch64_remove_point): No longer check whether the type is
6522 supported here. Adjust to new interface.
6523 (the_low_target): Install aarch64_supports_z_point_type as
6524 supports_z_point_type method.
6525 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6526 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6527 instead of a Z packet char. Adjust.
6528 (arm_supports_z_point_type): New function.
6529 (arm_insert_point, arm_remove_point): Adjust to new interface.
6530 (the_low_target): Install arm_supports_z_point_type.
6531 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6532 (cris_insert_point, cris_remove_point): Adjust to new interface.
6533 Don't check whether the type is supported here.
6534 (the_low_target): Install cris_supports_z_point_type.
6535 * linux-low.c (linux_supports_z_point_type): New function.
6536 (linux_insert_point, linux_remove_point): Adjust to new interface.
6537 * linux-low.h (struct linux_target_ops) <insert_point,
6538 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6539 raw_breakpoint pointer parameter.
6540 <supports_z_point_type>: New method.
6541 * linux-mips-low.c (mips_supports_z_point_type): New function.
6542 (mips_insert_point, mips_remove_point): Adjust to new interface.
6543 Use mips_supports_z_point_type.
6544 (the_low_target): Install mips_supports_z_point_type.
6545 * linux-ppc-low.c (the_low_target): Install NULL as
6546 supports_z_point_type method.
6547 * linux-s390-low.c (the_low_target): Install NULL as
6548 supports_z_point_type method.
6549 * linux-sparc-low.c (the_low_target): Install NULL as
6550 supports_z_point_type method.
6551 * linux-x86-low.c (x86_supports_z_point_type): New function.
6552 (x86_insert_point): Adjust to new insert_point interface. Use
6553 insert_memory_breakpoint. Adjust to new
6554 i386_low_insert_watchpoint interface.
6555 (x86_remove_point): Adjust to remove_point interface. Use
6556 remove_memory_breakpoint. Adjust to new
6557 i386_low_remove_watchpoint interface.
6558 (the_low_target): Install x86_supports_z_point_type.
6559 * lynx-low.c (lynx_target_ops): Install NULL as
6560 supports_z_point_type callback.
6561 * nto-low.c (nto_supports_z_point_type): New.
6562 (nto_insert_point, nto_remove_point): Adjust to new interface.
6563 (nto_target_ops): Install nto_supports_z_point_type.
6564 * mem-break.c: Adjust intro comment.
6565 (struct raw_breakpoint) <raw_type, size>: New fields.
6566 <inserted>: Update comment.
6567 <shlib_disabled>: Delete field.
6568 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6569 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6570 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6571 (raw_bkpt_type_to_target_hw_bp_type): New function.
6572 (find_enabled_raw_code_breakpoint_at): New function.
6573 (find_raw_breakpoint_at): New type and size parameters. Use them.
6574 (insert_memory_breakpoint): New function, based off
6575 set_raw_breakpoint_at.
6576 (remove_memory_breakpoint): New function.
6577 (set_raw_breakpoint_at): Reimplement.
6578 (set_breakpoint): New, based on set_breakpoint_at.
6579 (set_breakpoint_at): Reimplement.
6580 (delete_raw_breakpoint): Go through the_target->remove_point
6581 instead of assuming memory breakpoints.
6582 (find_gdb_breakpoint_at): Delete.
6583 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6584 (find_gdb_breakpoint): New function.
6585 (set_gdb_breakpoint_at): Delete.
6586 (z_type_supported): New function.
6587 (set_gdb_breakpoint_1): New function, loosely based off
6588 set_gdb_breakpoint_at.
6589 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6590 (delete_gdb_breakpoint_at): Delete.
6591 (delete_gdb_breakpoint_1): New function, loosely based off
6592 delete_gdb_breakpoint_at.
6593 (delete_gdb_breakpoint): New function.
6594 (clear_gdb_breakpoint_conditions): Rename to ...
6595 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6596 breakpoint.
6597 (add_condition_to_breakpoint): Make static.
6598 (add_breakpoint_condition): Take a struct breakpoint pointer
6599 instead of an address. Adjust.
6600 (gdb_condition_true_at_breakpoint): Rename to ...
6601 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6602 z_type parameter.
6603 (gdb_condition_true_at_breakpoint): Reimplement.
6604 (add_breakpoint_commands): Take a struct breakpoint pointer
6605 instead of an address. Adjust.
6606 (gdb_no_commands_at_breakpoint): Rename to ...
6607 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6608 parameter. Return true if no breakpoint was found. Change debug
6609 output.
6610 (gdb_no_commands_at_breakpoint): Reimplement.
6611 (run_breakpoint_commands): Rename to ...
6612 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6613 and change return type to boolean.
6614 (run_breakpoint_commands): New function.
6615 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6616 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6617 breakpoint. Go through the_target->remove_point instead of
6618 assuming memory breakpoint.
6619 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6620 software and hardware breakpoints.
6621 (reinsert_raw_breakpoint): Go through the_target->insert_point
6622 instead of assuming memory breakpoint.
6623 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6624 software and hardware breakpoints.
6625 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6626 Check both software and hardware breakpoints.
6627 (validate_inserted_breakpoint): Assert the breakpoint is a
6628 software breakpoint. Set the inserted flag to -1 instead of
6629 setting shlib_disabled.
6630 (delete_disabled_breakpoints): Adjust.
6631 (validate_breakpoints): Only validate software breakpoints.
6632 Adjust to inserted flag change.
6633 (check_mem_read, check_mem_write): Skip breakpoint types other
6634 than software breakpoints. Adjust to inserted flag change.
6635 * mem-break.h (enum raw_bkpt_type): New enum.
6636 (raw_breakpoint, struct process_info): Forward declare.
6637 (Z_packet_to_target_hw_bp_type): Delete declaration.
6638 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6639 (set_gdb_breakpoint, delete_gdb_breakpoint)
6640 (clear_breakpoint_conditions): New declarations.
6641 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6642 (breakpoint_inserted_here): Update comment.
6643 (add_breakpoint_condition, add_breakpoint_commands): Replace
6644 address parameter with a breakpoint pointer parameter.
6645 (gdb_breakpoint_here): Update comment.
6646 (delete_gdb_breakpoint_at): Delete.
6647 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6648 * server.c (process_point_options): Take a struct breakpoint
6649 pointer instead of an address. Adjust.
6650 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6651 delete_gdb_breakpoint.
6652 * spu-low.c (spu_target_ops): Install NULL as
6653 supports_z_point_type method.
6654 * target.h: Include mem-break.h.
6655 (struct target_ops) <prepare_to_access_memory>: Update comment.
6656 <supports_z_point_type>: New field.
6657 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6658 instead of a char. Also take a raw breakpoint pointer.
6659 * win32-arm-low.c (the_low_target): Install NULL as
6660 supports_z_point_type.
6661 * win32-i386-low.c (i386_supports_z_point_type): New function.
6662 (i386_insert_point, i386_remove_point): Adjust to new interface.
6663 (the_low_target): Install i386_supports_z_point_type.
6664 * win32-low.c (win32_supports_z_point_type): New function.
6665 (win32_insert_point, win32_remove_point): Adjust to new interface.
6666 (win32_target_ops): Install win32_supports_z_point_type.
6667 * win32-low.h (struct win32_target_ops):
6668 <supports_z_point_type>: New method.
6669 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6670 instead of a char. Also take a raw breakpoint pointer.
6671
932539e3
PA
66722014-05-20 Pedro Alves <palves@redhat.com>
6673
6674 * mem-break.h: Include break-common.h.
6675 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6676 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6677 (Z_packet_to_target_hw_bp_type): New declaration.
6678 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6679 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6680 (Z_PACKET_ACCESS_WP): Delete macros.
6681 (Z_packet_to_hw_type): Delete function.
6682 * i386-low.h: Don't include break-common.h here.
6683 (Z_packet_to_hw_type): Delete declaration.
6684 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6685 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6686 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6687 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6688 * linux-aarch64-low.c: Don't include break-common.h here.
6689 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6690 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6691 (Z_packet_to_target_hw_bp_type): Delete function.
6692 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6693 function.
6694 (mips_insert_point, mips_remove_point): Use
6695 Z_packet_to_target_hw_bp_type.
6696
4ff0d3d8
PA
66972014-05-20 Pedro Alves <palves@redhat.com>
6698
6699 * linux-aarch64-low.c: Include break-common.h.
6700 (enum target_point_type): Delete.
6701 (Z_packet_to_point_type): Rename to ...
6702 (Z_packet_to_target_hw_bp_type): ... this, and return a
6703 target_hw_bp_type instead.
6704 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6705 instead of an enum target_point_type.
6706 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6707 breakpoint type.
6708 (aarch64_dr_state_insert_one_point)
6709 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6710 (aarch64_handle_aligned_watchpoint)
6711 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6712 Take an enum target_hw_bp_type instead of an enum
6713 target_point_type.
6714 (aarch64_supports_z_point_type): New function.
6715 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6716 use Z_packet_to_target_hw_bp_type.
6717
786dc519
JB
67182014-05-20 Joel Brobecker <brobecker@adacore.com>
6719
6720 * configure.ac: Only use -Werror by default when DEVELOPMENT
6721 is true.
6722 * configure: Regenerate.
6723
9e0aa64f
JK
67242014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6725
6726 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6727 * linux-x86-low.c (X86_64_USER_REGS): New.
6728 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6729
2b577b92
YQ
67302014-04-28 Yao Qi <yao@codesourcery.com>
6731
6732 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6733 name.
6734
94611da2
PA
67352014-04-25 Pedro Alves <palves@redhat.com>
6736
6737 PR server/16255
6738 * linux-low.c (linux_attach_fail_reason_string): New function.
6739 (linux_attach_lwp): Delete.
6740 (linux_attach_lwp_1): Rename to ...
6741 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6742 argument. Remove "initial" parameter. Return int instead of
6743 void. Don't error or warn here.
6744 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6745 failure to attach to the tgid. Call warning when failing to
6746 attach to an lwp.
6747 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6748 argument. Remove "initial" parameter. Return int instead of
6749 void. Don't error or warn here.
6750 (linux_attach_fail_reason_string): New declaration.
6751 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6752 interface change. Use linux_attach_fail_reason_string.
6753
01f9f808
MS
67542014-04-24 Michael Sturm <michael.sturm@mintel.com>
6755 Walfred Tedeschi <walfred.tedeschi@intel.com>
6756
6757 * Makefile.in: Added rules to handle new files
6758 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6759 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6760 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6761 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6762 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6763 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6764 x32-avx512-linux.o.
6765 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6766 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6767 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6768 i386/x32-avx512.xml.
6769 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6770 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6771 i386/x32-avx512-linux.xml.
6772 * i387-fp.c (num_avx512_k_registers): New constant for number
6773 of K registers.
6774 (num_avx512_zmmh_low_registers): New constant for number of
6775 lower ZMM registers (0-15).
6776 (num_avx512_zmmh_high_registers): New constant for number of
6777 higher ZMM registers (16-31).
6778 (num_avx512_ymmh_registers): New contant for number of higher
6779 YMM registers (ymm16-31 added by avx521 on x86_64).
6780 (num_avx512_xmm_registers): New constant for number of higher
6781 XMM registers (xmm16-31 added by AVX512 on x86_64).
6782 (struct i387_xsave): Add space for AVX512 registers.
6783 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6784 Add code to handle AVX512 registers.
6785 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6786 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6787 prototypei from generated file.
6788 (tdesc_amd64_avx512_linux): Likewise.
6789 (init_registers_x32_avx512_linux): Likewise.
6790 (tdesc_x32_avx512_linux): Likewise.
6791 (init_registers_i386_avx512_linux): Likewise.
6792 (tdesc_i386_avx512_linux): Likewise.
6793 (x86_64_regmap): Add AVX512 registers.
6794 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6795 mask.
6796 (initialize_low_arch): Add code to initialize AVX512 registers.
6797
51aa91f9
PA
67982014-04-23 Pedro Alves <palves@redhat.com>
6799
6800 * mem-break.c (find_gdb_breakpoint_at): Make static.
6801 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6802
a4165e94
PA
68032014-04-23 Pedro Alves <palves@redhat.com>
6804
6805 * i386-low.c: Don't include break-common.h here.
6806 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6807 prototype to take target_hw_bp_type as argument instead of a Z
6808 packet char.
6809 * i386-low.h: Include break-common.h here.
6810 (Z_packet_to_hw_type): Declare.
6811 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6812 prototypes.
6813 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6814 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6815 (x86_remove_point): Convert the packet number to a
6816 target_hw_bp_type before calling i386_low_remove_watchpoint.
6817 * win32-i386-low.c (i386_insert_point): Convert the packet number
6818 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6819 (i386_remove_point): Convert the packet number to a
6820 target_hw_bp_type before calling i386_low_remove_watchpoint.
6821
b8acf843
PA
68222014-04-23 Pedro Alves <palves@redhat.com>
6823
6824 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6825
d708bcd1
PA
68262014-04-10 Pedro Alves <palves@redhat.com>
6827
6828 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6829 Check if the condition or command is NULL before checking if the
6830 breakpoint is known. On success, return true.
6831 * mem-break.h (add_breakpoint_condition): Document return.
6832 (add_breakpoint_commands): Add describing comment.
6833 * server.c (skip_to_semicolon): New function.
6834 (process_point_options): Use it.
6835
2eec7d5b
PA
68362014-04-09 Pedro Alves <palves@redhat.com>
6837
6838 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6839 to lwpid_of.
6840
fa96cb38
PA
68412014-02-27 Pedro Alves <palves@redhat.com>
6842
6843 PR 12702
6844 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6845 macros.
6846 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6847 output.
6848 (last_thread_of_process_p): Take a PID argument instead of a
6849 thread pointer.
6850 (linux_wait_for_lwp): Delete.
6851 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6852 functions.
6853 (linux_low_filter_event): New function, party factored out from
6854 linux_wait_for_event.
6855 (linux_wait_for_event): Rename to ...
6856 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6857 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6858 sigsuspend. Check for zombie leaders.
6859 (linux_wait_for_event): Reimplement as wrapper around
6860 linux_wait_for_event_filtered.
6861 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6862 a normal or signal exit is seen, it's the whole process exiting.
6863 (wait_for_sigstop): No longer a for_each_inferior callback.
6864 Rewrite on top of linux_wait_for_event_filtered.
6865 (stop_all_lwps): Call wait_for_sigstop directly.
6866 * server.c (resume, handle_target_event): Handle
6867 TARGET_WAITKIND_NO_RESUMED.
6868
d763de10
JB
68692014-02-26 Joel Brobecker <brobecker@adacore.com>
6870
6871 * win32-low.c (psapi_get_dll_name,
6872 * win32_CreateToolhelp32Snapshot): Delete.
6873 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6874 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6875 Delete.
6876 (handle_load_dll): Add function description.
6877 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6878
850a0f76
JB
68792014-02-26 Joel Brobecker <brobecker@adacore.com>
6880
6881 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6882 Add comment.
6883 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6884 base address when calling win32_add_one_solib.
6885 (handle_load_dll): Delete local variable load_addr.
6886 Remove 0x1000 offset applied to DLL base address when calling
6887 win32_add_one_solib.
6888 (handle_unload_dll): Add comment.
6889
f25b3fc3
JB
68902014-02-26 Joel Brobecker <brobecker@adacore.com>
6891
6892 * win32-low.c (win32_add_all_dlls): Renames
6893 win32_ensure_ntdll_loaded. Rewrite function documentation.
6894 Adjust implementation to always load all DLLs.
6895 Add 0x1000 offset to DLL base address when calling
6896 win32_add_one_solib.
6897 (child_initialization_done): New static global.
6898 (do_initial_child_stuff): Set child_initialization_done to
6899 zero during child initialization, and 1 after. Replace call
6900 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6901 Add comment.
6902 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6903 (handle_unload_dll): Add function documentation.
6904 (get_child_debug_event): Ignore load and unload DLL events
6905 during child initialization.
6906
d86d4aaf
DE
69072014-02-20 Doug Evans <dje@google.com>
6908
3bc32da3 6909 Remove global all_lwps.
d86d4aaf
DE
6910 * inferiors.h (ptid_of): Move here from linux-low.h.
6911 (pid_of, lwpid_of): Ditto.
6912 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6913 parameter is a struct thread_info * now.
6914 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6915 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6916 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6917 directly.
6918 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6919 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6920 * linux-arm-low.c (update_registers_callback): Update, "entry"
6921 parameter is a struct thread_info * now.
6922 Fetch lwpid from current_inferior directly.
6923 (arm_insert_point): Pass &all_threads to find_inferior instead of
6924 &all_lwps.
6925 (arm_remove_point): Ditto.
6926 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6927 (arm_prepare_to_resume): Fetch pid from thread.
6928 (arm_read_description): Fetch lwpid from current_inferior directly.
6929 * linux-low.c (all_lwps): Delete.
6930 (delete_lwp): Delete call to remove_inferior.
6931 (handle_extended_wait): Fetch lwpid from thread.
6932 (add_lwp): Don't set lwp->entry.id. Remove call to
6933 add_inferior_to_list.
6934 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6935 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6936 (kill_one_lwp_callback): Ditto.
6937 (linux_kill): Don't dereference NULL pointer.
6938 Fetch ptid,lwpid from thread.
6939 (get_detach_signal): Fetch ptid from thread.
6940 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6941 Simplify call to regcache_invalidate_thread.
6942 (delete_lwp_callback): Update, "entry" parameter is a
6943 struct thread_info * now. Fetch pid from thread.
6944 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6945 (status_pending_p_callback): Update, "entry" parameter is a
6946 struct thread_info * now. Fetch ptid from thread.
6947 (find_lwp_pid): Update, "entry" parameter is a
6948 struct thread_info * now.
6949 (linux_wait_for_lwp): Fetch pid from thread.
6950 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6951 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6952 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6953 (dequeue_one_deferred_signal): Ditto.
6954 (cancel_breakpoint): Fetch ptid from current_inferior.
6955 (linux_wait_for_event): Pass &all_threads to find_inferior,
6956 not &all_lwps. Fetch ptid, lwpid from thread.
6957 (count_events_callback): Update, "entry" parameter is a
6958 struct thread_info * now.
6959 (select_singlestep_lwp_callback): Ditto.
6960 (select_event_lwp_callback): Ditto.
6961 (cancel_breakpoints_callback): Ditto.
6962 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6963 not &all_lwps.
6964 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6965 (unsuspend_one_lwp): Update, "entry" parameter is a
6966 struct thread_info * now.
6967 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6968 not &all_lwps.
6969 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6970 Fetch lwpid from thread, not lwp.
6971 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6972 Pass &all_threads to find_inferior, not &all_lwps.
6973 (send_sigstop): Fetch lwpid from thread, not lwp.
6974 (send_sigstop_callback): Update, "entry" parameter is a
6975 struct thread_info * now.
6976 (suspend_and_send_sigstop_callback): Ditto.
6977 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6978 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6979 struct thread_info * now.
6980 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6981 from thread, lwp.
6982 (lwp_running): Update, "entry" parameter is a
6983 struct thread_info * now.
6984 (stop_all_lwps): Fetch ptid from thread.
6985 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6986 (linux_resume_one_lwp): Fetch lwpid from thread.
6987 (linux_set_resume_request): Update, "entry" parameter is a
6988 struct thread_info * now. Fetch pid, lwpid from thread.
6989 (resume_status_pending_p): Update, "entry" parameter is a
6990 struct thread_info * now.
6991 (need_step_over_p): Ditto. Fetch lwpid from thread.
6992 (start_step_over): Fetch lwpid from thread.
6993 (linux_resume_one_thread): Update, "entry" parameter is a
6994 struct thread_info * now. Fetch lwpid from thread.
6995 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6996 (proceed_one_lwp): Update, "entry" parameter is a
6997 struct thread_info * now. Fetch lwpid from thread.
6998 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6999 struct thread_info * now.
7000 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7001 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7002 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7003 directly.
7004 (regsets_store_inferior_registers): Ditto.
7005 (fetch_register, store_register): Ditto.
7006 (linux_read_memory, linux_write_memory): Ditto.
7007 (linux_request_interrupt): Ditto.
7008 (linux_read_auxv): Ditto.
7009 (linux_xfer_siginfo): Ditto.
7010 (linux_qxfer_spu): Ditto.
7011 (linux_qxfer_libraries_svr4): Ditto.
7012 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7013 moved to inferiors.h.
7014 (get_lwp): Delete.
7015 (get_thread_lwp): Update.
7016 (struct lwp_info): Delete member "entry". Simplify comment for
7017 member "thread".
7018 (all_lwps): Delete.
7019 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7020 current_inferior directly.
7021 (update_watch_registers_callback): Update, "entry" parameter is a
7022 struct thread_info * now. Fetch pid from thread.
7023 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7024 (mips_insert_point): Fetch lwpid from current_inferior.
7025 Pass &all_threads to find_inferior, not &all_lwps.
7026 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7027 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7028 directly.
7029 (mips_stopped_data_address): Ditto.
7030 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7031 directly.
7032 * linux-tile-low.c (tile_arch_setup): Ditto.
7033 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7034 (update_debug_registers_callback): Update, "entry" parameter is a
7035 struct thread_info * now. Fetch pid from thread.
7036 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7037 Pass &all_threads to find_inferior, not &all_lwps.
7038 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7039 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7040 Pass &all_threads to find_inferior, not &all_lwps.
7041 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7042 (i386_dr_low_get_status): Ditto.
7043 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7044 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7045 (x86_linux_read_description): Ditto.
7046 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7047
3b8361aa
DE
70482014-02-20 Doug Evans <dje@google.com>
7049
7050 * inferiors.c (get_first_inferior): Fix buglet.
7051
f7667f0d
DE
70522014-02-19 Doug Evans <dje@google.com>
7053
7054 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7055 * inferiors.c (add_thread): Change result type to struct thread_info *.
7056 All callers updated.
7057 (add_lwp): Call add_thread here instead of in callers.
7058 All callers updated.
7059 * linux-low.h (get_lwp_thread): Rewrite.
7060 (struct lwp_info): New member "thread".
7061
b3312d80
DE
70622014-02-19 Doug Evans <dje@google.com>
7063
7064 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7065 All callers updated.
7066
ecc6f45c
DE
70672014-02-19 Doug Evans <dje@google.com>
7068
7069 * inferiors.c (add_thread): Fix whitespace.
7070
649ebbca
DE
70712014-02-19 Doug Evans <dje@google.com>
7072
7073 * dll.c (clear_dlls): Replace accessing list implemention details
7074 with API function.
7075 * gdbthread.h (get_first_thread): Declare.
7076 * inferiors.c (for_each_inferior_with_data): New function.
7077 (get_first_thread): New function.
7078 (find_thread_ptid): Simplify.
7079 (get_first_inferior): New function.
7080 (clear_list): Delete.
7081 (one_inferior_p): New function.
7082 (clear_inferior_list): New function.
7083 (clear_inferiors): Update.
7084 * inferiors.h (for_each_inferior_with_data): Declare.
7085 (clear_inferior_list): Declare.
7086 (one_inferior_p): Declare.
7087 (get_first_inferior): Declare.
7088 * linux-low.c (linux_wait_for_event): Replace accessing list
7089 implemention details with API function.
7090 * server.c (target_running): Ditto.
7091 (accumulate_file_name_length): New function.
7092 (emit_dll_description): New function.
7093 (handle_qxfer_libraries): Replace accessing list implemention
7094 details with API function.
7095 (handle_qxfer_threads_worker): New function.
7096 (handle_qxfer_threads_proper): Replace accessing list implemention
7097 details with API function.
7098 (handle_query): Ditto.
7099 (visit_actioned_threads_callback_ftype): New typedef.
7100 (visit_actioned_threads_data): New struct.
7101 (visit_actioned_threads): Rewrite to be find_inferior callback.
7102 (resume): Call find_inferior.
7103 (handle_status): Replace accessing list implemention
7104 details with API function.
7105 (process_serial_event): Replace accessing list implemention details
7106 with API function.
7107 * target.c (set_desired_inferior): Replace accessing list implemention
7108 details with API function.
7109 * tracepoint.c (same_process_p): New function.
7110 (gdb_agent_about_to_close): Replace accessing list implemention
7111 details with API function.
7112 * win32-low.c (child_delete_thread): Replace accessing list
7113 implemention details with API function.
7114 (match_dll_by_basename): New function.
7115 (dll_is_loaded_by_basename): New function.
7116 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7117 details call to dll_is_loaded_by_basename.
7118
80894984
DE
71192014-02-19 Doug Evans <dje@google.com>
7120
7121 * dll.h (struct dll_info): Add comment.
7122 * gdbthread.h (struct thread_info): Add comment.
7123 (current_ptid): Simplify.
7124 * inferiors.c (add_process): Update.
7125 (remove_process): Update.
7126 * inferiors.h (struct process_info): Rename member "head" to "entry".
7127 * linux-low.c (delete_lwp): Update.
7128 (add_lwp): Update.
7129 (last_thread_of_process_p): Update.
7130 (kill_one_lwp_callback, linux_kill): Update.
7131 (status_pending_p_callback): Update.
7132 (wait_for_sigstop): Update. Simplify read of ptid.
7133 (start_step_over): Update.
7134 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7135 (get_lwp_thread): Update.
7136 (struct lwp_info): Rename member "head" to "entry".
7137 * regcache.h (inferior_list_entry): Delete.
7138 * server.c (kill_inferior_callback): Update.
7139 (detach_or_kill_inferior_callback): Update.
7140 (print_started_pid): Update.
7141 (print_attached_pid): Update.
7142 (process_serial_event): Simplify read of ptid.
7143 * thread-db.c (thread_db_create_event): Update.
7144 (thread_db_get_tls_address): Update.
7145 * win32-low.c (current_inferior_ptid): Simplify.
7146
46917d26
TT
71472014-02-19 Tom Tromey <tromey@redhat.com>
7148
7149 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7150 argument.
7151 (target_supports_btrace): Update.
7152
0759a81e
YQ
71532014-02-14 Yao Qi <yao@codesourcery.com>
7154
7155 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7156 (rsp-low-ipa.o): New target.
7157
a7191e8b
TT
71582014-02-12 Tom Tromey <tromey@redhat.com>
7159
7160 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7161 convert_ascii_to_int.
7162 * regcache.c (registers_to_string): Likewise.
7163 * remote-utils.c (decode_M_packet): Likewise.
7164 * server.c (process_serial_event): Likewise.
7165
ff0e980e
TT
71662014-02-12 Tom Tromey <tromey@redhat.com>
7167
7168 * server.c (handle_query, handle_v_run): Use hex2bin, not
7169 unhexify.
7170 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7171
e9371aff
TT
71722014-02-12 Tom Tromey <tromey@redhat.com>
7173
7174 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7175 convert_int_to_ascii.
7176 * regcache.c (registers_to_string, collect_register_as_string):
7177 Likewise.
7178 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7179 Likewise.
7180 * server.c (process_serial_event): Likewise.
7181 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7182 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7183
971dc0b8
TT
71842014-02-12 Tom Tromey <tromey@redhat.com>
7185
7186 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7187 bin2hex, not hexify.
7188 * tracepoint.c (cmd_qtstatus): Likewise.
7189
0a822afb
TT
71902014-02-12 Tom Tromey <tromey@redhat.com>
7191
7192 * remote-utils.c (monitor_output): Pass explicit length to
7193 hexify.
7194
9c3d6531
TT
71952014-02-12 Tom Tromey <tromey@redhat.com>
7196
7197 * tracepoint.c: Include rsp-low.h.
7198 * server.c: Include rsp-low.h.
7199 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7200 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7201 declare.
7202 * remote-utils.c: Include rsp-low.h.
7203 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7204 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7205 (convert_int_to_ascii, convert_ascii_to_int): Move to
7206 common/rsp-low.c.
7207 * regcache.c: Include rsp-low.h.
7208 * ax.c: Include rsp-low.h.
7209 * Makefile.in (SFILES): Add common/rsp-low.c.
7210 (OBS): Add rsp-low.o.
7211 (rsp-low.o): New target.
7212
01fd3ea5
TT
72132014-02-12 Tom Tromey <tromey@redhat.com>
7214
7215 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7216 Include print-utils.h.
7217 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7218 (plongest, thirty_two, phex_nz): Remove.
7219 * Makefile.in (SFILES): Add common/print-utils.c.
7220 (OBS): Add print-utils.o.
7221 (print-utils-ipa.o): New target.
7222 (print-utils.o): New target.
7223 (IPA_OBJS): Add print-utils-ipa.o.
7224
e99dc820
TT
72252014-02-06 Tom Tromey <tromey@redhat.com>
7226
7227 * Makefile.in (SFILES): Fix indentation.
7228
ee1e2d4f
DE
72292014-02-05 Doug Evans <dje@google.com>
7230
7231 * linux-low.c (linux_wait_for_event): Improve comment.
7232 (linux_wait_1): Keep current_inferior in sync with event_child.
7233
f5a02773
DE
72342014-01-22 Doug Evans <dje@google.com>
7235
7236 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7237
87ce2a04
DE
72382014-01-22 Doug Evans <dje@google.com>
7239
7240 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7241 * configure: Regenerate.
7242 * config.in: Regenerate.
7243 * Makefile.in (SFILES): Add debug.c.
7244 (OBS): Add debug.o.
7245 * debug.c: New file.
7246 * debug.h: New file.
7247 * linux-aarch64-low.c (*): Update all debugging printfs to use
7248 debug_printf instead of fprintf.
7249 * linux-arm-low.c (*): Ditto.
7250 * linux-cris-low.c (*): Ditto.
7251 * linux-crisv32-low.c (*): Ditto.
7252 * linux-m32r-low.c (*): Ditto.
7253 * linux-sparc-low.c (*): Ditto.
7254 * linux-x86.c (*): Ditto.
7255 * linux-low.c (*): Ditto.
7256 (linux_wait_1): Add calls to debug_enter, debug_exit.
7257 (linux_wait): Remove redundant debugging printf.
7258 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7259 (linux_resume, unstop_all_lwps): Ditto.
7260 * mem-break.c (*): Update all debugging printfs to use
7261 debug_printf instead of fprintf.
7262 * remote-utils.c (*): Ditto.
7263 * thread-db.c (*): Ditto.
7264 * server.c #include <ctype.h>, "gdb_vecs.h".
7265 (debug_threads): Moved to debug.c.
7266 (*): Update all debugging printfs to use debug_printf instead of
7267 fprintf.
7268 (start_inferior): Replace call to fflush with call to debug_flush.
7269 (monitor_show_help): Mention set debug-format.
7270 (parse_debug_format_options): New function.
7271 (handle_monitor_command): Handle "monitor set debug-format".
7272 (gdbserver_usage): Mention --debug-format.
7273 (main): Parse --debug-format.
7274 * server.h (debug_threads): Declaration moved to debug.h.
7275 #include "debug.h".
7276 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7277 trace_debug_1 that uses debug_printf.
7278 (tracepoint_look_up_symbols): Update all debugging printfs to use
7279 debug_printf instead of fprintf.
7280
e671835b
BS
72812014-01-20 Baruch Siach <baruch@tkos.co.il>
7282
7283 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7284 sys/ptrace.h.
7285
b5737fa9
PA
72862014-01-17 Pedro Alves <palves@redhat.com>
7287
ea38d2a9 7288 PR build/16445
c7faa97a
PA
7289 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7290 defined after including gdb_proc_service.h.
b5737fa9 7291
40ed484e
DE
72922014-01-16 Doug Evans <dje@google.com>
7293
7294 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7295 (match_dll): Use it.
7296
969c39fb
MM
72972014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7298
7299 * target.h (target_ops) <read_btrace>: Change parameters and
7300 return type to allow error reporting.
7301 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7302 trace reading errors on.
7303 * linux-low.c (linux_low_read_btrace): Pass trace reading
7304 errors on.
7305 (linux_low_disable_btrace): New.
7306
ab7f45ba
DE
73072014-01-15 Doug Evans <dje@google.com>
7308
7309 * inferiors.c (thread_id_to_gdb_id): Delete.
7310 * inferiors.h (thread_id_to_gdb_id): Delete.
7311
66af0f44
EZ
73122014-01-13 Eli Zaretskii <eliz@gnu.org>
7313
7314 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7315 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7316 versions.
7317
9939e131
PA
73182014-01-08 Pedro Alves <palves@redhat.com>
7319
7320 * server.c (handle_status): Don't discard previous queued stop
7321 replies or thread's pending status here.
7322 (main) <disconnection>: Do it here instead.
7323
b7ea362b
PA
73242014-01-08 Pedro Alves <palves@redhat.com>
7325
7326 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7327 * server.c (visit_actioned_threads, handle_pending_status): New
7328 function.
7329 (handle_v_cont): Factor out parts to ...
7330 (resume): ... this new function. If in all-stop, and a thread
7331 being resumed has a pending status, report it without actually
7332 resuming.
7333 (myresume): Adjust to use the new 'resume' function.
7334 (clear_pending_status_callback, set_pending_status_callback)
7335 (find_status_pending_thread_callback): New functions.
7336 (handle_status): Handle the case of multiple threads having
7337 interesting statuses to report. Report threads' real last signal
7338 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7339 with an interesting thread to report the status for, instead of
7340 always reporting the status of the first thread.
7341
28498c42
JB
73422014-01-01 Joel Brobecker <brobecker@adacore.com>
7343
7344 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7345 * gdbreplay.c (gdbreplay_version): Likewise.
7346
f45c82da
YZ
73472013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7348
7349 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7350 iov.iov_len with the real length in use.
7351
379a5e2d
JB
73522013-12-13 Joel Brobecker <brobecker@adacore.com>
7353
7354 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7355 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7356 for all targets that use win32-low.c.
7357 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7358 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7359
4210d83e
PA
73602013-12-13 Pedro Alves <palves@redhat.com>
7361
7362 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7363 if equal to TARGET_WAITKIND_LOADED.
7364 * win32-low.c (cached_status): New static global.
7365 (win32_wait): Add declaration.
7366 (do_initial_child_stuff): Flush all initial pending debug events
7367 up to the initial breakpoint.
7368 (win32_wait): If CACHED_STATUS was set, return that instead
7369 of doing a real wait. Remove the code resuming the execution
7370 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7371 during the initial phase. Also remove the code changing
7372 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7373 TARGET_WAITKIND_STOPPED.
7374
e7f0d979
YQ
73752013-12-11 Yao Qi <yao@codesourcery.com>
7376
7377 * notif.c (handle_notif_ack): Return 0 if no notification
7378 matches.
7379
ebcf782c
DE
73802013-11-20 Doug Evans <dje@google.com>
7381
7382 * linux-low.c (linux_set_resume_request): Fix comment.
7383
20ad9378
DE
73842013-11-20 Doug Evans <dje@google.com>
7385
7386 * linux-low.c (resume_status_pending_p): Tweak comment.
7387
a196ebeb
WT
73882013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7389
7390 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7391 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7392 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7393 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7394 (srv_amd64_regobj): Add amd64-mpx.o.
7395 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7396 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7397 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7398 * i387-fp.c (num_pl_bnd_register) Added constant.
7399 (num_pl_bnd_cfg_registers) Added constant.
7400 (struct i387_xsave) Added reserved area and MPX fields.
7401 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7402 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7403 function.
7404 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7405 (init_registers_amd64_mpx_linux): Declare new function.
7406 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7407 (x86_64_regmap): Add MPX registers.
7408 (x86_linux_read_description): Add MPX case.
7409 (initialize_low_arch): Initialize MPX targets.
7410
0080a2f6
TT
74112013-11-18 Tom Tromey <tromey@redhat.com>
7412
7413 * configure: Rebuild.
7414 * configure.ac: Don't check for stdlib.h.
7415 * gdbreplay.c: Unconditionally include stdlib.h.
7416
2978b111
TT
74172013-11-18 Tom Tromey <tromey@redhat.com>
7418
7419 * config.in: Rebuild.
7420 * configure: Rebuild.
7421 * configure.ac: Don't use AC_HEADER_DIRENT.
7422
a3d08894
TT
74232013-11-18 Tom Tromey <tromey@redhat.com>
7424
7425 * server.h: Don't check HAVE_STRING_H.
7426 * gdbreplay.c: Don't check HAVE_STRING_H.
7427 * configure: Rebuild.
7428
0a5dd17d
TT
74292013-11-18 Tom Tromey <tromey@redhat.com>
7430
7431 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7432 LIBGNU.
7433
1bd2f0ba
TT
74342013-11-08 Tom Tromey <tromey@redhat.com>
7435
7436 * configure, config.in: Rebuild.
7437 * configure.ac: Remove unused configury.
7438
3266f10b
TT
74392013-11-08 Tom Tromey <tromey@redhat.com>
7440
7441 * acinclude.m4: Include common.m4, codeset.m4.
7442 * configure, config.in: Rebuild.
7443 * configure.ac: Use GDB_AC_COMMON.
7444
6682d959
AA
74452013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7446
7447 * linux-s390-low.c (HWCAP_S390_TE): New define.
7448 (s390_arch_setup): Consider the TE field in the HWCAP for
7449 determining 'have_regset_tdb'.
7450
fd0a4d76
SDJ
74512013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7452
7453 PR gdb/16014
7454 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7455 call to sizeof.
7456
1a3d890b
PA
74572013-10-02 Pedro Alves <palves@redhat.com>
7458
7459 * server.c (process_serial_event): Don't output "GDBserver
7460 exiting" if GDB is connected through stdio.
7461 * target.c (mywait): Likewise, be silent if GDB is connected
7462 through stdio.
7463
97ad4581
JB
74642013-10-01 Joel Brobecker <brobecker@adacore.com>
7465
7466 * lynx-low.c (lynx_add_threads_after_attach): New function.
7467 (lynx_attach): Remove call to add_thread. Add call to
7468 lynx_add_threads_after_attach instead.
7469
5b4e221c
MF
74702013-09-28 Mike Frysinger <vapier@gentoo.org>
7471
7472 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7473 * config.in, configure: Regenerated.
7474
ee47b2f8
YQ
74752013-09-18 Yao Qi <yao@codesourcery.com>
7476
7477 PR server/15959
7478 * server.c (start_inferior): Clear 'resume_info'.
7479
d6707650 74802013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7481
d6707650
JW
7482 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7483 for each register.
7484
9243dd0e 74852013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7486
9243dd0e
JW
7487 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7488 linux-tile-low.o to srv_tgtobj.
7489
c623a6ef
WN
74902013-09-16 Will Newton <will.newton@linaro.org>
7491
7492 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7493 out regs.
7494
fb71d39e
PA
74952013-09-06 Pedro Alves <palves@redhat.com>
7496
7497 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7498 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7499 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7500 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7501 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7502 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7503
8e7e9910
PA
75042013-09-06 Pedro Alves <palves@redhat.com>
7505
7506 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7507 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7508
7c3a12ca
PA
75092013-09-06 Pedro Alves <palves@redhat.com>
7510
7511 * linux-amd64-ipa.c: Include tracepoint.h.
7512 * linux-i386-ipa.c: Include tracepoint.h.
7513
8eb3d7b6
RW
75142013-09-06 Ricard Wanderlof <ricardw@axis.com>
7515
7516 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7517 (ps_get_thread_area): New function.
7518
eddddb9d
RW
75192013-09-06 Ricard Wanderlof <ricardw@axis.com>
7520
7521 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7522 (initialize_low_arch): Call init_registers_crisv32 rather than
7523 init_register_crisv32.
7524
533b0600
PA
75252013-09-05 Pedro Alves <palves@redhat.com>
7526
7527 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7528 to ...
7529 * hostio.h: ... this new file.
7530 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7531 win32-low.c: Include hostio.h.
7532
0ce3d3b5
PA
75332013-09-05 Pedro Alves <palves@redhat.com>
7534
7535 * server.h (gdb_client_data, handler_func, callback_handler_func)
7536 (delete_file_handler, add_file_handler, append_callback_event)
7537 (delete_callback_event, start_event_loop, initialize_event_loop):
7538 Move to event-loop.h and include it.
7539 * event-loop.h: New file.
7540
799cdc37
PA
75412013-09-05 Pedro Alves <palves@redhat.com>
7542
7543 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7544 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7545 (loaded_dll, unloaded_dll): Move to ...
7546 * dll.h: ... this new file.
7547 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7548
6a6bbd9d
PA
75492013-09-05 Pedro Alves <palves@redhat.com>
7550
7551 * server.h (current_process, get_thread_process, all_processes)
7552 (add_inferior_to_list, for_each_inferior, current_inferior)
7553 (remove_inferior, add_process, remove_process, find_process_pid)
7554 (have_started_inferiors_p, have_attached_inferiors_p)
7555 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7556 (clear_inferiors, find_inferior, find_inferior_id)
7557 (inferior_target_data, set_inferior_target_data)
7558 (inferior_regcache_data, set_inferior_regcache_data): Move to
7559 inferiors.h, and include it.
7560 * inferiors.h: New file.
7561
f699aaba
PA
75622013-09-05 Pedro Alves <palves@redhat.com>
7563
7564 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7565 Move ...
72f4393d 7566 * ax.h: ... here.
f699aaba 7567
c144c7a0
PA
75682013-09-05 Pedro Alves <palves@redhat.com>
7569
7570 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7571 tracepoint.h.
7572 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7573 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7574 (handle_tracepoint_general_set, handle_tracepoint_query)
7575 (tracepoint_finished_step, tracepoint_was_hit)
7576 (release_while_stepping_state_list, current_traceframe)
7577 (in_readonly_region, traceframe_read_mem)
7578 (fetch_traceframe_registers, traceframe_read_sdata)
7579 (traceframe_read_info, struct fast_tpoint_collect_status)
7580 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7581 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7582 (supply_fast_tracepoint_registers)
7583 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7584 (ipa_tdesc, claim_trampoline_space)
7585 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7586 (agent_mem_read, agent_get_trace_state_variable_value)
7587 (agent_set_trace_state_variable_value, agent_tsv_read)
7588 (agent_mem_read_string, get_raw_reg_func_addr)
7589 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7590 * tracepoint.h: ... this new file.
7591
ff42e6ab
PA
75922013-09-05 Pedro Alves <palves@redhat.com>
7593
7594 * server.h (perror_with_name, error, fatal, warning, paddress)
7595 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7596 include it.
7597 * utils.h: New file.
7598
541af0f4
PA
75992013-09-05 Pedro Alves <palves@redhat.com>
7600
7601 * server.h (remote_debug, noack_mode, transport_is_reliable)
7602 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7603 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7604 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7605 (write_enn, initialize_async_io, enable_async_io)
7606 (disable_async_io, check_remote_input_interrupt_request)
7607 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7608 (dead_thread_notify, prepare_resume_reply)
7609 (decode_address_to_semicolon, decode_address, decode_m_packet)
7610 (decode_M_packet, decode_X_packet, decode_xfer_write)
7611 (decode_search_memory_packet, unhexify, hexify)
7612 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7613 (look_up_one_symbol, relocate_instruction)
7614 (monitor_output): Move to remote-utils.h, and include it.
7615 * remote-utils.h: New file.
7616
eebdf26b
PA
76172013-09-05 Pedro Alves <palves@redhat.com>
7618
7619 * server.h (_): Delete.
7620
3aafd2ff
PA
76212013-09-02 Pedro Alves <palves@redhat.com>
7622
7623 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7624 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7625 allocated.
7626 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7627
cee83bcb
PM
76282013-09-02 Pierre Muller <muller@sourceware.org>
7629
7630 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7631 or WriteProcessMemory complete successfully and handle
7632 ERROR_PARTIAL_COPY error.
7633
9a13b2fa
PA
76342013-09-02 Pedro Alves <palves@redhat.com>
7635
7636 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7637 error instead of EIO.
7638
602e3198
JK
76392013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7640
7641 PR server/15604
7642 * linux-low.c: Include filestuff.h.
7643 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7644 * lynx-low.c: Include filestuff.h.
7645 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7646 * server.c: Include filestuff.h.
7647 (main): Call notice_open_fds.
7648 * spu-low.c: Include filestuff.h.
7649 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7650
96d7229d
LM
76512013-08-22 Luis Machado <lgustavo@codesourcery.com>
7652
7653 * Makefile.in: Explain why ../target and ../nat are not
7654 listed as include file search paths.
7655 (linux-waitpid.o): New object file rule.
7656 * configure.srv (srv_native_linux_obj): New variable.
7657 Replace all occurrences of linux native object files with
7658 $srv_native_linux_obj.
7659 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7660 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7661 (linux_enable_event_reporting): Remove declaration.
7662 (my_waitpid): Moved to common/linux-waitpid.c.
7663 (linux_wait_for_event): Pass ptid when calling
7664 linux_enable_event_reporting.
7665 (linux_supports_tracefork_flag): Remove.
7666 (linux_enable_event_reporting): Likewise.
7667 (linux_tracefork_grandchild): Remove.
7668 (STACK_SIZE): Moved to common/linux-ptrace.c.
7669 (linux_tracefork_child): Remove.
7670 (linux_test_for_tracefork): Remove.
7671 (linux_look_up_symbols): Call linux_supports_traceclone.
7672 (initialize_low): Remove call to linux_test_for_tracefork.
7673 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7674 common/linux-ptrace.h.
7675 (PTRACE_TYPE_ARG4): Likewise.
7676 Include linux-ptrace.h.
7677
32940073
PA
76782013-08-21 Pedro Alves <palves@redhat.com>
7679
7680 * config.in: Renegerate.
7681
33b60d58 76822013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7683
33b60d58
LM
7684 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7685 (SFILES): Remove $(srcdir)/common/target-common.c and
7686 add $(srcdir)/target/waitstatus.c.
7687 (OBS): Remove target-common.o and add waitstatus.o.
7688 (server_h): Remove $(srcdir)/../common/target-common.h and
7689 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7690 and $(srcdir)/../target/waitstatus.h.
7691 (target-common.o): Remove.
7692 (waitstatus.o): New target object file.
7693 * target.h: Do not include target-common.h and
7694 include target/resume.h, target/wait.h and
7695 target/waitstatus.h.
7696
b8e1b30e
LM
76972013-08-13 Luis Machado <lgustavo@codesourcery.com>
7698
7699 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7700 to PTRACE_TYPE_ARG3.
7701 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7702 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7703 PTRACE_TYPE_ARG4.
7704 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7705 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7706
7a60ad40
YQ
77072013-07-27 Jie Zhang <jie@codesourcery.com>
7708 Daniel Jacobowitz <dan@codesourcery.com>
7709 Yao Qi <yao@codesourcery.com>
7710
7711 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7712 (mips-linux-watch.o): New rule.
7713 (mips_linux_watch_h): New variable.
7714 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7715 srv_tgtobj.
7716 * linux-mips-low.c: Include mips-linux-watch.h.
7717 (struct arch_process_info, struct arch_lwp_info): New.
7718 (update_watch_registers_callback): New function.
7719 (mips_linux_new_process, mips_linux_new_thread) New functions.
7720 (mips_linux_prepare_to_resume, mips_insert_point): New
7721 functions.
7722 (mips_remove_point, mips_stopped_by_watchpoint): New
7723 functions.
7724 (rsp_bp_type_to_target_hw_bp_type): New function.
7725 (mips_stopped_data_address): New function.
7726 (the_low_target): Add watchpoint support functions.
7727
de6f69ad
YQ
77282013-07-27 Yao Qi <yao@codesourcery.com>
7729
7730 * i386-low.c: Include break-common.h.
7731 (enum target_hw_bp_type): Remove.
7732
3360c0bf
LM
77332013-07-24 Luis Machado <lgustavo@codesourcery.com>
7734
7735 * Makefile.in (SFILES): /common/target-common.c.
7736 (OBS): Add target-common.o.
7737 (server_h): Add $(srcdir)/../common/target-common.h.
7738 (target-common.o): New target.
7739 * server.c (queue_stop_reply_callback): Free
7740 status string after use.
7741 * target.c (target_waitstatus_to_string): Remove.
7742 * target.h: Include target-common.h.
7743 (resume_kind): Likewise.
7744 (target_waitkind): Likewise.
7745 (target_waitstatus): Likewise.
7746 (TARGET_WNOHANG): Likewise.
7747
bd885420
YQ
77482013-07-04 Yao Qi <yao@codesourcery.com>
7749
7750 * Makefile.in (host_alias): Use @host_noncanonical@.
7751 (target_alias): Use @target_noncanonical@.
7752 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7753 ACX_NONCANONICAL_HOST.
7754 * configure: Regenerated.
7755
7756 Revert:
7757 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7758
7759 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7760 * configure: Rebuild.
7761 * Makefile.in (version_host, version_target): Get from configure.
7762 (version.c): Use $(version_host) and $(version_target).
7763
17ef446e
PA
77642013-07-03 Pedro Alves <palves@redhat.com>
7765
7766 * Makefile.in (config.status): Depend on development.sh.
7767 * acinclude.m4: Include libmcheck.m4.
7768 * configure: Regenerate.
7769
7a9a7487
MG
77702013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7771
7772 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7773 attribute inside the parentheses.
7774 (winapi_DebugSetProcessKillOnExit): Ditto.
7775 (winapi_DebugBreakProcess): Ditto.
7776 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7777
49b64de6
MG
77782013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7779
7780 * notif.h (notif_event): Add a dummy member to avoid compiler
7781 errors.
7782
d5749ee7
PA
77832013-07-01 Pedro Alves <palves@redhat.com>
7784
7785 * hostio.c (HOSTIO_PATH_MAX): Define.
7786 (require_filename, handle_open, handle_unlink, handle_readlink):
7787 Use it.
7788
d8d2a3ee
PA
77892013-07-01 Pedro Alves <palves@redhat.com>
7790
7791 * server.h: Include "pathmax.h".
7792 * linux-low.c: Don't include sys/param.h.
7793 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7794 MAXPATHLEN.
7795 * win32-low.c: Don't include sys/param.h.
7796 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7797
bc7dea8d
PA
77982013-07-01 Pedro Alves <palves@redhat.com>
7799
7800 * event-loop.c: Don't check HAVE_UNISTD_H before including
7801 <unistd.h>.
7802 * gdbreplay.c: Likewise.
7803 * remote-utils.c: Likewise.
7804 * server.c: Likewise.
7805 * configure.ac: Don't check for unistd.h.
7806 * configure: Regenerate.
7807
d6c2da54
TT
78082013-06-28 Tom Tromey <tromey@redhat.com>
7809
7810 * Makefile.in (version.c): Use version.in, not
7811 common/version.in.
7812
257b6bec
MG
78132013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7814
7815 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7816 * configure: Rebuild.
7817 * Makefile.in (version_host, version_target): Get from configure.
7818 (version.c): Use $(version_host) and $(version_target).
7819
86ebe149
DK
78202013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7821
7822 Fix trace-status to output user name without trailing colon.
7823 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7824
f30aa5af
DK
78252013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7826
7827 Fix trace-status to output proper start-time and stop-time.
7828 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7829 output start time and stop time in hex as gdb expects.
7830
28a93511
YQ
78312013-06-26 Pedro Alves <pedro@codesourcery.com>
7832
7833 * tracepoint.c (build_traceframe_info_xml): Output trace state
7834 variables present in the trace buffer.
7835
01208463
TT
78362013-06-24 Tom Tromey <tromey@redhat.com>
7837
7838 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7839 create-version.sh.
7840 (version.o): Remove.
7841 * gdbreplay.c: Include version.h.
7842 (version, host_name): Don't declare.
7843 * server.h: Include version.h.
7844 (version, host_name): Don't declare.
7845
760256f9
PA
78462013-06-12 Pedro Alves <palves@redhat.com>
7847
7848 * linux-x86-low.c (linux_is_elf64): Delete global.
7849 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7850 with local linux_pid_exe_is_elf_64_file use.
7851
030031ee
PA
78522013-06-11 Pedro Alves <palves@redhat.com>
7853
7854 * linux-low.c (regset_disabled, disable_regset): New functions.
7855 (regsets_fetch_inferior_registers)
7856 (regsets_store_inferior_registers): Use them.
7857 (initialize_regsets_info); Don't allocate the disabled_regsets
7858 array here.
7859 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7860 comment.
7861
5da6eb0a
PA
78622013-06-11 Pedro Alves <palves@redhat.com>
7863
7864 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7865 xmalloc.
7866
7e5aaa09
PA
78672013-06-11 Pedro Alves <palves@redhat.com>
7868
7869 * linux-x86-low.c (initialize_low_arch): Call
7870 init_registers_x32_avx_linux.
7871
d878444c
JK
78722013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7873
7874 Fix compatibility with Android Bionic.
7875 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7876 it is not empty.
7877
3aee8918
PA
78782013-06-07 Pedro Alves <palves@redhat.com>
7879
5f2b57b5 7880 PR server/14823
3aee8918
PA
7881 * Makefile.in (OBS): Add tdesc.o.
7882 (IPA_OBJS): Add tdesc-ipa.o.
7883 (tdesc-ipa.o): New rule.
7884 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7885 interface.
7886 * linux-low.c (new_inferior): Delete.
7887 (disabled_regsets, num_regsets): Delete.
7888 (linux_add_process): Adjust to set the new per-process
7889 new_inferior flag.
7890 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7891 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7892 was a stop. When calling arch_setup, switch the current inferior
7893 to the thread that got an event.
7894 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7895 (regsets_fetch_inferior_registers)
7896 (regsets_store_inferior_registers): New regsets_info parameter.
7897 Adjust to use it.
7898 (linux_register_in_regsets): New regs_info parameter. Adjust to
7899 use it.
7900 (register_addr, fetch_register, store_register): New usrregs_info
7901 parameter. Adjust to use it.
7902 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7903 parameter regs_info. Adjust to use it.
7904 (linux_fetch_registers): Get the current inferior's regs_info, and
7905 adjust to use it.
7906 (linux_store_registers): Ditto.
7907 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7908 (initialize_low): Don't initialize the target_regsets here. Call
7909 initialize_low_arch.
7910 * linux-low.h (target_regsets): Delete declaration.
7911 (struct regsets_info): New.
7912 (struct usrregs_info): New.
7913 (struct regs_info): New.
7914 (struct process_info_private) <new_inferior>: New field.
7915 (struct linux_target_ops): Delete the num_regs, regmap, and
7916 regset_bitmap fields. New field regs_info.
7917 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7918 * i387-fp.c (num_xmm_registers): Delete.
7919 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7920 calls to new interface.
7921 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7922 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7923 Infer the number of xmm registers from the regcache's target
7924 description.
7925 * i387-fp.h (num_xmm_registers): Delete.
7926 * inferiors.c (add_thread): Don't install the thread's regcache
7927 here.
7928 * proc-service.c (gregset_info): Fetch the current inferior's
7929 regs_info. Adjust to use it.
7930 * regcache.c: Include tdesc.h.
7931 (register_bytes, reg_defs, num_registers)
7932 (gdbserver_expedite_regs): Delete.
7933 (get_thread_regcache): If the thread doesn't have a regcache yet,
7934 create one, instead of aborting gdbserver.
7935 (regcache_invalidate_one): Rename to ...
7936 (regcache_invalidate_thread): ... this.
7937 (regcache_invalidate_one): New.
7938 (regcache_invalidate): Only invalidate registers of the current
7939 process.
7940 (init_register_cache): Add target_desc parameter, and use it.
7941 (new_register_cache): Ditto. Assert the target description has a
7942 non zero registers_size.
7943 (regcache_cpy): Add assertions. Adjust.
7944 (realloc_register_cache, set_register_cache): Delete.
7945 (registers_to_string, registers_from_string): Adjust.
7946 (find_register_by_name, find_regno, find_register_by_number)
7947 (register_cache_size): Add target_desc parameter, and use it.
7948 (free_register_cache_thread, free_register_cache_thread_one)
7949 (regcache_release, register_cache_size): New.
7950 (register_size): Add target_desc parameter, and use it.
7951 (register_data, supply_register, supply_register_zeroed)
7952 (supply_regblock, supply_register_by_name, collect_register)
7953 (collect_register_as_string, collect_register_by_name): Adjust.
7954 * regcache.h (struct target_desc): Forward declare.
7955 (struct regcache) <tdesc>: New field.
7956 (init_register_cache, new_register_cache): Add target_desc
7957 parameter.
7958 (regcache_invalidate_thread): Declare.
7959 (regcache_invalidate_one): Delete declaration.
7960 (regcache_release): Declare.
7961 (find_register_by_number, register_cache_size, register_size)
7962 (find_regno): Add target_desc parameter.
7963 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7964 declarations.
7965 * remote-utils.c: Include tdesc.h.
7966 (outreg, prepare_resume_reply): Adjust.
7967 * server.c: Include tdesc.h.
7968 (gdbserver_xmltarget): Delete declaration.
7969 (get_features_xml, process_serial_event): Adjust.
7970 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7971 declare.
7972 (struct process_info) <tdesc>: New field.
7973 (ipa_tdesc): Declare.
7974 * tdesc.c: New file.
7975 * tdesc.h: New file.
7976 * tracepoint.c: Include tdesc.h.
7977 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7978 (get_context_regcache): Adjust to pass ipa_tdesc down.
7979 (do_action_at_tracepoint): Adjust to get the register cache size
7980 from the context regcache's description.
7981 (traceframe_walk_blocks): Adjust to get the register cache size
7982 from the current trace frame's description.
7983 (traceframe_get_pc): Adjust to get current trace frame's
7984 description and pass it down.
7985 (gdb_collect): Adjust to get the register cache size from the
7986 IPA's description.
7987 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7988 (gdbserver_xmltarget): Delete.
7989 (initialize_low_tracepoint): Set the ipa's target description.
7990 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7991 (initialize_low_tracepoint): Set the ipa's target description.
7992 * linux-x86-low.c: Include tdesc.h.
7993 [__x86_64__] (is_64bit_tdesc): New.
7994 (ps_get_thread_area, x86_get_thread_area): Use it.
7995 (i386_cannot_store_register): Rename to ...
7996 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7997 (i386_cannot_fetch_register): Rename to ...
7998 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7999 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8000 to new interface.
8001 (target_regsets): Rename to ...
8002 (x86_regsets): ... this.
8003 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8004 interface.
8005 (x86_siginfo_fixup): Use is_64bit_tdesc.
8006 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8007 (tdesc_x32_avx_linux, tdesc_x32_linux)
8008 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8009 Declare.
8010 (x86_linux_update_xmltarget): Delete.
8011 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8012 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8013 (AMD64_LINUX_USER64_CS): New.
8014 (x86_linux_read_description): New, based on
8015 x86_linux_update_xmltarget.
8016 (same_process_callback): New.
8017 (x86_arch_setup_process_callback): New.
8018 (x86_linux_update_xmltarget): New.
8019 (x86_regsets_info): New.
8020 (amd64_linux_regs_info): New.
8021 (i386_linux_usrregs_info): New.
8022 (i386_linux_regs_info): New.
8023 (x86_linux_regs_info): New.
8024 (x86_arch_setup): Reimplement.
8025 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8026 (x86_emit_ops): Ditto.
8027 (the_low_target): Adjust. Install x86_linux_regs_info,
8028 x86_cannot_fetch_register, and x86_cannot_store_register.
8029 (initialize_low_arch): New.
8030 * linux-ia64-low.c (tdesc_ia64): Declare.
8031 (ia64_fetch_register): Adjust.
8032 (ia64_usrregs_info, regs_info): New globals.
8033 (ia64_regs_info): New function.
8034 (the_low_target): Adjust.
8035 (initialize_low_arch): New function.
8036 * linux-sparc-low.c (tdesc_sparc64): Declare.
8037 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8038 Adjust.
8039 (sparc_arch_setup): New function.
8040 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8041 (the_low_target): Adjust.
8042 (initialize_low_arch): New function.
8043 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8044 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8045 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8046 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8047 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8048 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8049 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8050 (tdesc_powerpc_isa205_vsx64l): Declare.
8051 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8052 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8053 (ppc_set_pc, ppc_get_hwcap): Adjust.
8054 (ppc_usrregs_info): Forward declare.
8055 (!__powerpc64__) ppc_regmap_adjusted: New global.
8056 (ppc_arch_setup): Adjust to the current process'es target
8057 description.
8058 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8059 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8060 (ppc_store_evrregset): Adjust.
8061 (target_regsets): Rename to ...
8062 (ppc_regsets): ... this, and make static.
8063 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8064 (ppc_regs_info): New function.
8065 (the_low_target): Adjust.
8066 (initialize_low_arch): New function.
8067 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8068 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8069 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8070 (tdesc_s390x_linux64v2): Declare.
8071 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8072 (s390_fill_gregset, s390_store_last_break): Adjust.
8073 (target_regsets): Rename to ...
8074 (s390_regsets): ... this, and make static.
8075 (s390_get_pc, s390_set_pc): Adjust.
8076 (s390_get_hwcap): New target_desc parameter, and use it.
8077 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8078 (s390_arch_setup): Adjust to set the current process'es target
8079 description. Don't adjust the regmap.
8080 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8081 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8082 (regs_info_3264): New globals.
8083 (s390_regs_info): New function.
8084 (the_low_target): Adjust.
8085 (initialize_low_arch): New function.
8086 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8087 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8088 [__mips64] (init_registers_mips_linux)
8089 (init_registers_mips_dsp_linux): Delete defines.
8090 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8091 (have_dsp): New global.
8092 (mips_read_description): New, based on mips_arch_setup.
8093 (mips_arch_setup): Reimplement.
8094 (get_usrregs_info): New function.
8095 (mips_cannot_fetch_register, mips_cannot_store_register)
8096 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8097 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8098 (target_regsets): Rename to ...
8099 (mips_regsets): ... this, and make static.
8100 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8101 (dsp_regs_info, regs_info): New globals.
8102 (mips_regs_info): New function.
8103 (the_low_target): Adjust.
8104 (initialize_low_arch): New function.
8105 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8106 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8107 Declare.
8108 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8109 (arm_read_description): New, with bits factored from
8110 arm_arch_setup.
8111 (arm_arch_setup): Reimplement.
8112 (target_regsets): Rename to ...
8113 (arm_regsets): ... this, and make static.
8114 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8115 (arm_regs_info): New function.
8116 (the_low_target): Adjust.
8117 (initialize_low_arch): New function.
8118 * linux-m68k-low.c (tdesc_m68k): Declare.
8119 (target_regsets): Rename to ...
8120 (m68k_regsets): ... this, and make static.
8121 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8122 (m68k_regs_info): New function.
8123 (m68k_arch_setup): New function.
8124 (the_low_target): Adjust.
8125 (initialize_low_arch): New function.
8126 * linux-sh-low.c (tdesc_sharch): Declare.
8127 (target_regsets): Rename to ...
8128 (sh_regsets): ... this, and make static.
8129 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8130 (sh_regs_info, sh_arch_setup): New functions.
8131 (the_low_target): Adjust.
8132 (initialize_low_arch): New function.
8133 * linux-bfin-low.c (tdesc_bfin): Declare.
8134 (bfin_arch_setup): New function.
8135 (bfin_usrregs_info, regs_info): New globals.
8136 (bfin_regs_info): New function.
8137 (the_low_target): Adjust.
8138 (initialize_low_arch): New function.
8139 * linux-cris-low.c (tdesc_cris): Declare.
8140 (cris_arch_setup): New function.
8141 (cris_usrregs_info, regs_info): New globals.
8142 (cris_regs_info): New function.
8143 (the_low_target): Adjust.
8144 (initialize_low_arch): New function.
8145 * linux-cris-low.c (tdesc_crisv32): Declare.
8146 (cris_arch_setup): New function.
8147 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8148 (cris_regs_info): New function.
8149 (the_low_target): Adjust.
8150 (initialize_low_arch): New function.
8151 * linux-m32r-low.c (tdesc_m32r): Declare.
8152 (m32r_arch_setup): New function.
8153 (m32r_usrregs_info, regs_info): New globals.
8154 (m32r_regs_info): Adjust.
8155 (initialize_low_arch): New function.
8156 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8157 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8158 (tic6x_usrregs_info): Forward declare.
8159 (tic6x_read_description): New function, based on ...
8160 (tic6x_arch_setup): ... this. Reimplement.
8161 (target_regsets): Rename to ...
8162 (tic6x_regsets): ... this, and make static.
8163 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8164 (tic6x_regs_info): New function.
8165 (the_low_target): Adjust.
8166 (initialize_low_arch): New function.
8167 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8168 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8169 (target_regsets): Rename to ...
8170 (xtensa_regsets): ... this, and make static.
8171 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8172 globals.
8173 (xtensa_arch_setup, xtensa_regs_info): New functions.
8174 (the_low_target): Adjust.
8175 (initialize_low_arch): New function.
8176 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8177 (nios2_arch_setup): Set the current process'es tdesc.
8178 (target_regsets): Rename to ...
8179 (nios2_regsets): ... this.
8180 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8181 (nios2_regs_info): New function.
8182 (the_low_target): Adjust.
8183 (initialize_low_arch): New function.
a261b8f5
PA
8184 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8185 (aarch64_arch_setup): Set the current process'es tdesc.
8186 (target_regsets): Rename to ...
8187 (aarch64_regsets): ... this.
8188 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8189 (aarch64_regs_info): New function.
8190 (the_low_target): Adjust.
8191 (initialize_low_arch): New function.
3aee8918
PA
8192 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8193 globals.
8194 (target_regsets): Rename to ...
8195 (tile_regsets): ... this.
8196 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8197 (tile_regs_info): New function.
8198 (tile_arch_setup): Set the current process'es tdesc.
8199 (the_low_target): Adjust.
8200 (initialize_low_arch): New function.
8201 * spu-low.c (tdesc_spu): Declare.
8202 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8203 * win32-arm-low.c (tdesc_arm): Declare.
8204 (arm_arch_setup): New function.
8205 (the_low_target): Install arm_arch_setup instead of
8206 init_registers_arm.
8207 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8208 (init_windows_x86): Rename to ...
8209 (i386_arch_setup): ... this. Set `win32_tdesc'.
8210 (the_low_target): Adjust.
8211 * win32-low.c (win32_tdesc): New global.
8212 (child_add_thread): Don't create the thread cache here.
8213 (do_initial_child_stuff): Set the new process'es tdesc.
8214 * win32-low.h (struct target_desc): Forward declare.
8215 (win32_tdesc): Declare.
8216 * lynx-i386-low.c (tdesc_i386): Declare global.
8217 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8218 * lynx-low.c (lynx_tdesc): New global.
8219 (lynx_add_process): Set the new process'es tdesc.
8220 * lynx-low.h (struct target_desc): Forward declare.
8221 (lynx_tdesc): Declare global.
8222 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8223 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8224 * nto-low.c (nto_tdesc): New global.
8225 (do_attach): Set the new process'es tdesc.
8226 * nto-low.h (struct target_desc): Forward declare.
8227 (nto_tdesc): Declare.
8228 * nto-x86-low.c (tdesc_i386): Declare.
8229 (nto_x86_arch_setup): Set `nto_tdesc'.
8230
b1fbec62
GB
82312013-06-04 Gary Benson <gbenson@redhat.com>
8232
8233 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8234 to qSupported response when appropriate.
8235 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8236 with nonzero-length annex.
8237 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8238 arguments supplied in annex.
8239
d1ec4ce7
DE
82402013-05-31 Doug Evans <dje@google.com>
8241
ac44adcb 8242 PR server/15594
d1ec4ce7
DE
8243 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8244 64 bits in 64-cross-32 environment.
8245
9b25f2d3
PA
82462013-05-28 Pedro Alves <palves@redhat.com>
8247
8248 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8249 (aarch64-without-fpu.c): Delete rule.
8250 * configure.srv (aarch64*-*-linux*): Remove references to
8251 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8252 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8253 declaration.
8254
6740dc9c
PA
82552013-05-24 Pedro Alves <palves@redhat.com>
8256
8257 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8258 instead of strchr/decode_address. Error if the range isn't split
8259 with a ','. Don't assume there's be a ':' in the action.
8260
c2d6af84
PA
82612013-05-23 Yao Qi <yao@codesourcery.com>
8262 Pedro Alves <palves@redhat.com>
8263
8264 * linux-low.c (lwp_in_step_range): New function.
8265 (linux_wait_1): If the thread was range stepping and stopped
8266 outside the stepping range, report the stop to GDB. Otherwise,
8267 continue stepping. Add range stepping debug output.
8268 (linux_set_resume_request): Copy the step range from the resume
8269 request to the lwp.
8270 (linux_supports_range_stepping): New.
8271 (linux_target_ops) <supports_range_stepping>: Set to
8272 linux_supports_range_stepping.
8273 * linux-low.h (struct linux_target_ops)
8274 <supports_range_stepping>: New field.
8275 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8276 * linux-x86-low.c (x86_supports_range_stepping): New.
8277 (the_low_target) <supports_range_stepping>: Set to
8278 x86_supports_range_stepping.
8279 * server.c (handle_v_cont): Handle 'r' action.
8280 (handle_v_requests): Append ";r" if the target supports range
8281 stepping.
8282 * target.h (struct thread_resume) <step_range_start,
8283 step_range_end>: New fields.
8284 (struct target_ops) <supports_range_stepping>:
8285 New field.
8286 (target_supports_range_stepping): New macro.
8287
58794e1a
JB
82882013-05-17 Joel Brobecker <brobecker@adacore.com>
8289
8290 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8291 confusion in comment.
8292
d631c5a7
JB
82932013-05-17 Joel Brobecker <brobecker@adacore.com>
8294
8295 * lynx-low.c (struct process_info_private): New type.
8296 (lynx_add_process): New function.
8297 (lynx_create_inferior, lynx_attach): Replace calls to
8298 add_process by calls to lynx_add_process.
8299 (lynx_resume): If PTID is null, then try using
8300 current_process()->private->last_wait_event_ptid.
8301 Add comments.
8302 (lynx_clear_inferiors): Delete. The contents of that function
8303 has been inlined in lynx_mourn;
8304 (lynx_wait_1): Save the ptid in the process's private data.
8305 (lynx_mourn): Free the process' private data. Replace call
8306 to lynx_clear_inferiors by call to clear_inferiors.
8307
96f7a20f
YQ
83082013-05-17 Yao Qi <yao@codesourcery.com>
8309
8310 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8311 the right place.
8312
db0dfaa0
LM
83132013-05-16 Luis Machado <lgustavo@codesourcery.com>
8314
8315 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8316 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8317 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8318 PT_TEXT_END_ADDR guards. Update comments.
8319 (linux_target_op) <read_offsets>: Conditionally define to
8320 linux_read_offsets if the target is UCLIBC and if it defines
8321 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8322
68f5f838
SL
83232013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8324 Andrew Jenner <andrew@codesourcery.com>
8325
8326 * Makefile.in (SFILES): Add linux-nios2-low.c.
8327 (clean): Add action to delete nios2-linux.c.
8328 (nios2-linux.c): New rule.
8329 * configure.srv: Add nios2*-*-linux*.
8330 * linux-nios2-low.c: New.
8331
1ebff1fd
HAQ
83322013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8333
8334 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8335
f6150862
HZ
83362013-04-25 Hui Zhu <hui@codesourcery.com>
8337
8338 PR gdb/15186
f6150862
HZ
8339 * ax.c (ax_printf): Add fflush.
8340
614c279d
TT
83412013-04-22 Tom Tromey <tromey@redhat.com>
8342
8343 * Makefile.in (SFILES): Add filestuff.c.
8344 (OBS): Add filestuff.o.
8345 (filestuff.o): New target.
8346 * config.in, configure: Rebuild.
8347 * configure.ac: Check for fdwalk, pipe2.
8348
7d4e5717
PA
83492013-04-17 Pedro Alves <palves@redhat.com>
8350
8351 * configure.ac (USE_THREAD_DB): Delete variable.
8352 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8353 Don't AC_SUBST USE_THREAD_DB.
8354 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8355 * config.in, configure: Regenerate.
8356
d5c93e41
PA
83572013-04-16 Pedro Alves <palves@redhat.com>
8358
8359 * linux-low.h (struct lwp_info) <thread_known>: Move under
8360 the USE_THREAD_DB #ifdef.
8361
04f5fe89
PA
83622013-04-16 Pedro Alves <palves@redhat.com>
8363
8364 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8365 (linux-low.o): Delete rule.
8366 * linux-low.h: Always include "gdb_thread_db.h" instead of
8367 conditionally including thread_db.h.
8368 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8369 HAVE_THREAD_DB_H.
8370
480b27bf
JK
83712013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8372
8373 * Makefile.in (install-only): Fix make install regression.
8374
43662968
JK
83752013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8376
8377 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8378 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8379 installation.
8380 * gdbserver.1: Remove.
8381
3e74e146
PA
83822013-03-22 Pedro Alves <palves@redhat.com>
8383
8384 * linux-low.c (handle_extended_wait): Don't call
8385 linux_enable_event_reporting.
8386
a8347a2a
TT
83872013-03-15 Tony Theodore <tonyt@logyst.com>
8388
8389 PR build/9098:
8390 * Makefile.in (SHELL): Use @SHELL@.
8391
eeb56fa7
SDJ
83922013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8393
8394 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8395 compiler warning.
8396
4fa7e2ff
JB
83972013-03-13 Joel Brobecker <brobecker@adacore.com>
8398
8399 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8400 Remove extraneous NULL element.
8401
8ddb1965
YQ
84022013-03-13 Yao Qi <yao@codesourcery.com>
8403
8404 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8405 'V' block in trace frame.
8406
9accd112
MM
84072013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8408
8409 * target.h (struct target_ops): Add btrace ops.
8410 (target_supports_btrace): New macro.
8411 (target_enable_btrace): New macro.
8412 (target_disable_btrace): New macro.
8413 (target_read_btrace): New macro.
8414 * gdbthread.h (struct thread_info): Add btrace field.
8415 * server.c: Include btrace-common.h.
8416 (handle_btrace_general_set): New function.
8417 (handle_btrace_enable): New function.
8418 (handle_btrace_disable): New function.
8419 (handle_general_set): Call handle_btrace_general_set.
8420 (handle_qxfer_btrace): New function.
8421 (struct qxfer qxfer_packets[]): Add btrace entry.
8422 * inferiors.c (remove_thread): Disable btrace.
8423 * linux-low: Include linux-btrace.h.
8424 (linux_low_enable_btrace): New function.
8425 (linux_low_read_btrace): New function.
8426 (linux_target_ops): Add btrace ops.
8427 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8428 Add srv_linux_btrace=yes.
8429 (x86_64-*-linux*): Add linux-btrace.o.
8430 Add srv_linux_btrace=yes.
8431 * configure.ac: Define HAVE_LINUX_BTRACE.
8432 * config.in: Regenerated.
8433 * configure: Regenerated.
8434
5cc22e4c
MM
84352013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8436
8437 * server.c (handle_qxfer): Preserve error message if -3 is
8438 returned.
8439 (qxfer): Document the -3 return value.
8440
7c97f91e
MM
84412013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8442
8443 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8444 (linux_btrace_h): New variable.
8445 (linux-btrace.o): New rule.
8446
be9a119c 84472013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8448 Hafiz Abid Qadeer <abidh@codesourcery.com>
8449
8450 * tracepoint.c (trace_buffer_size): New global.
8451 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8452 (init_trace_buffer): Change to one-argument function. Allocate
8453 trace buffer memory.
8454 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8455 handle QTBuffer:size packet.
8456 (cmd_bigqtbuffer_size): New function.
8457 (initialize_tracepoint): Call init_trace_buffer with
8458 DEFAULT_TRACE_BUFFER_SIZE.
8459 * server.c (handle_query): Add QTBuffer:size in the
8460 supported packets.
8461
e64f7499
YQ
84622013-03-07 Yao Qi <yao@codesourcery.com>
8463
8464 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8465 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8466 of -1.
8467 (cmd_qtsp): Adjust condition. Do post increment.
8468 Set cur_action and cur_step_action back to 0.
8469
f0ae6fc3
PA
84702013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8471
8472 PR server/15236
8473 * linux-low.c (linux_write_memory): Return early success if LEN is
8474 zero.
8475
b5b0b0af
CV
84762013-03-05 Corinna Vinschen <vinschen@redhat.de>
8477
334ad4a8 8478 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8479
589bc927
TT
84802013-02-28 Tom Tromey <tromey@redhat.com>
8481
8482 * configure.ac: Invoke AC_SYS_LARGEFILE.
8483 * configure, config.in: Rebuild.
8484
dfe07582
CV
84852013-02-28 Corinna Vinschen <vinschen@redhat.com>
8486
8487 * win32-low.c: Throughout, fix format strings and casts of
8488 printf-like functions to avoid type related warnings on all
8489 platforms.
8490 (get_child_debug_event): Print dwDebugEventCode as hex since
8491 that's how it's usually documented.
8492
736cd585
YQ
84932013-02-28 Yao Qi <yao@codesourcery.com>
8494
8495 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8496 pulongest.
8497
e1f58301
JW
84982013-02-27 Jiong Wang <jiwang@tilera.com>
8499
8500 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8501 (reg-tilegx32.c): New rule.
8502 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8503 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8504 different register info initializer according to elf class.
8505 (init_registers_tilgx32): New function. The tilegx32 register info
8506 initializer.
8507 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8508 (tile_store_gregset): Likewise.
8509
d171ca78
YQ
85102013-02-27 Yao Qi <yao@codesourcery.com>
8511
8512 * server.c (process_point_options): Print debug message when
8513 debug_threads is true.
8514
282bbdf3
YQ
85152013-02-26 Yao Qi <yao@codesourcery.com>
8516
8517 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8518
aca22551
PA
85192013-02-19 Pedro Alves <palves@redhat.com>
8520 Kai Tietz <ktietz@redhat.com>
8521
8522 PR gdb/15161
8523
8524 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8525 instead of strtoul to extract address from packet.
8526 (process_serial_event) <'z'>: Likewise.
8527
4f3cee1c
YQ
85282013-02-18 Yao Qi <yao@codesourcery.com>
8529
8530 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8531
8e1d55a3
PA
85322013-02-14 Pedro Alves <palves@redhat.com>
8533
8534 Plug memory leak.
8535
8536 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8537 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8538
458820da
PA
85392013-02-14 Pedro Alves <palves@redhat.com>
8540
8541 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8542
baea0dae
PA
85432013-02-14 Pedro Alves <palves@redhat.com>
8544
8545 * tracepoint.c (save_string): Delete.
8546 (add_tracepoint_action): Use savestring instead of save_string.
8547
0b1afbb3
PA
85482013-02-12 Pedro Alves <palves@redhat.com>
8549
8550 * linux-xtensa-low.c: Ditto.
8551 * xtensa-xtregs.c: Ditto.
8552
8a4ac37e
PA
85532013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8554
8555 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8556 thread_db.
8557
148de6bb
MS
85582013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8559
8560 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8561 aarch64_num_wp_regs and aarch64_num_bp_regs to
8562 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8563
55fac6e0
MS
85642013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8565
8566 * linux-aarch64-low.c (ps_get_thread_area): Replace
8567 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8568
176eb98c
MS
85692013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8570 Marcus Shawcroft <marcus.shawcroft@arm.com>
8571 Nigel Stephens <nigel.stephens@arm.com>
8572 Yufeng Zhang <yufeng.zhang@arm.com>
8573
8574 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8575 (aarch64.c, aarch64-without-fpu.c): New targets.
8576 * configure.srv (aarch64*-*-linux*): New.
8577 * linux-aarch64-low.c: New file.
8578
56f7af9c
MS
85792013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8580
43aaf8b6 8581 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8582 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8583 (dequeue_one_deferred_signal, linux_resume_one_thread)
8584 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8585 (linux_tracefork_grandchild, linux_test_for_tracefork)
8586 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8587 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8588 where the argument is 0.
8589
60f662b0
YQ
85902013-01-25 Yao Qi <yao@codesourcery.com>
8591
8592 * event-loop.c: Include "queue.h".
8593 (gdb_event_p): New typedef.
8594 (struct gdb_event) <next_event>: Remove.
8595 (event_queue): Change to QUEUE(gdb_event_p).
8596 (async_queue_event): Remove.
8597 (gdb_event_xfree): New.
8598 (initialize_event_loop): New.
8599 (process_event): Use API from QUEUE.
8600 (wait_for_event): Likewise.
8601 * server.c (main): Call initialize_event_loop.
8602 * server.h (initialize_event_loop): Declare.
8603
5ae4861a
YQ
86042013-01-18 Yao Qi <yao@codesourcery.com>
8605
8606 * ax.h (struct eval_agent_expr_context): New.
8607 (gdb_eval_agent_expr): Update declaration.
8608 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8609 TFRAME. Add new argument CTX.
8610 * server.h (struct eval_agent_expr_context): Declare.
8611 (agent_mem_read, agent_tsv_read): Update declaration.
8612 (agent_mem_read_string): Likewise.
8613 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8614 (add_traceframe_block): Add new argument TPOINT.
8615 Increase TPOINT->traceframe_usage.
8616 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8617 eval_tracepoint_agent_expr.
8618 (condition_true_at_tracepoint): Likewise.
8619 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8620 (agent_mem_read_string, agent_tsv_read): Likewise.
8621
85e00e85
YQ
86222013-01-16 Yao Qi <yao@codesourcery.com>
8623
8624 * linux-low.c (linux_resume_one_lwp): Don't check
8625 'lwp->bp_reinsert != 0'.
8626
4039cf45
JB
86272013-01-07 Joel Brobecker <brobecker@adacore.com>
8628 Pedro Alves <palves@redhat.com>
8629
8630 * lynx-low.c (ptrace_request_to_str): Define a temporary
8631 macro and use it to simplify this function's implementation.
8632
9044dee2
JB
86332013-01-07 Joel Brobecker <brobecker@adacore.com>
8634
8635 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8636 sets errno.
8637
e6352c8f
JB
86382013-01-07 Joel Brobecker <brobecker@adacore.com>
8639
8640 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8641
50681a27
JB
86422013-01-07 Joel Brobecker <brobecker@adacore.com>
8643
8644 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8645
3f6e77ef
JB
86462013-01-07 Joel Brobecker <brobecker@adacore.com>
8647
8648 * lynx-low.c (lynx_resume): Use the resume_info parameter
8649 to determine the ptid for the lynx_ptrace call, unless
8650 it is equal to minus_one_ptid, in which case we use the
8651 ptid of the current_inferior.
8652 (lynx_wait_1): After having received a thread create/exit
8653 event, resume the inferior's execution using the signaling
8654 thread's ptid, rather than the old ptid.
8655
7fda33ae
JB
86562013-01-07 Joel Brobecker <brobecker@adacore.com>
8657
8658 * lynx-low.c (lynx_resume): Delete variable ret.
8659
b9786c74
JB
86602013-01-01 Joel Brobecker <brobecker@adacore.com>
8661
8662 * gdbreplay.c (gdbreplay_version): Update copyright year.
8663 * server.c (gdbserver_version): Likewise.
8664
8b93d60f
JB
86652012-12-17 Joel Brobecker <brobecker@adacore.com>
8666
8667 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8668 new thread.
8669
037335a7
JB
86702012-12-17 Joel Brobecker <brobecker@adacore.com>
8671
8672 * lynx-low.c (ptrace_request_to_str): Add handling for
8673 PTRACE_GETTRACESIG.
8674
52d4cbd8
JB
86752012-12-17 Joel Brobecker <brobecker@adacore.com>
8676
8677 * lynx-low.c (lynx_attach): Delete variable new_process.
8678
ab8f6ca9
JB
86792012-12-17 Joel Brobecker <brobecker@adacore.com>
8680
8681 * lynx-low.c (lynx_create_inferior): Delete variable
8682 new_process.
8683
78cbc024
JB
86842012-12-17 Joel Brobecker <brobecker@adacore.com>
8685
8686 * lynx-low.c (ptrace_request_to_str): Do not handle
8687 PTRACE_GETTHREADLIST if this macro does not exist.
8688
14a00470
YQ
86892012-12-15 Yao Qi <yao@codesourcery.com>
8690
8691 * Makefile.in (OBS): Add notif.o.
8692 * notif.c, notif.h: New.
8693 * server.c: Include "notif.h".
8694 (struct vstop_notif) <next>: Remove.
8695 <base>: New field.
8696 (queue_stop_reply): Update.
8697 (push_event, send_next_stop_reply): Remove.
8698 (discard_queued_stop_replies): Update.
8699 (notif_stop): New variable.
8700 (handle_v_stopped): Remove.
8701 (handle_v_requests): Don't call handle_v_stopped. Call
8702 handle_ack_notif instead.
8703 (queue_stop_reply_callback): Call notif_event_enque instead
8704 of queue_stop_reply.
8705 (handle_status): Don't call send_next_stop_reply, call
8706 notif_write_event instead.
8707 (kill_inferior_callback): Likewise.
8708 (detach_or_kill_inferior_callback): Likewise.
8709 (main): Call initialize_notif.
8710 (process_serial_event): Call QUEUE_is_empty.
8711 (handle_target_event): Call notif_push instead of push event.
8712 * server.h (push_event): Remove declaration.
8713
61c125b9
TT
87142012-12-10 Tom Tromey <tromey@redhat.com>
8715
8716 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8717 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8718 macros.
8719 (.c.o): Rewrite.
8720 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8721 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8722 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8723 (amd64-linux-ipa.o, ax.o): Rewrite.
8724 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8725 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8726 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8727 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8728 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8729 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8730 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8731 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8732 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8733 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8734 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8735 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8736 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8737 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8738 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8739 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8740 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8741 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8742 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8743 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8744 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8745 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8746 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8747 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8748 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8749 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8750 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8751 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8752 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8753 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8754 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8755 (reg-tilegx.o): Remove.
8756 (all_object_files): New macro.
8757 Include .deps files.
8758 * aclocal.m4, configure: Rebuild.
8759 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8760 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8761 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8762
e90e9ad9
TT
87632012-12-05 Tom Tromey <tromey@redhat.com>
8764
8765 PR gdb/14917:
8766 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8767
02d403bf 87682012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8769
8770 * configure.ac: Check for linux/perf_event.h.
8771 * config.in: Regenerated.
8772 * configure: Regenerated.
8773
0270a750
PA
87742012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8775
8776 * hostio.c (handle_readlink): Decrease buffer size
8777 parameter passed to readlink by one byte.
8778
8c29b58e
YQ
87792012-11-26 Yao Qi <yao@codesourcery.com>
8780
8781 * configure.ac (build_warnings): Append '-Wempty-body'.
8782 * configure: Regenerated.
8783 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8784 body.
8785
8bdce1ff
PM
87862012-11-15 Pierre Muller <muller@sourceware.org>
8787
8788 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8789 * config.in: Regenerate.
8790 * configure: Regenerate.
8791 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8792 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8793 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8794 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8795 header.
8796 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8797 instead of <sys/wait.h> header.
8798 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8799
02d403bf 88002012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8801
8802 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8803 (various make rules): Remove -DGDBSERVER
8804
fbd5db48
YQ
88052012-11-09 Yao Qi <yao@codesourcery.com>
8806
8807 * spu-low.c (current_ptid): Move it to ..
8808 * gdbthread.h: ... here. New.
8809 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8810 * server.c (myresume, process_serial_event): Likewise.
8811 * thread-db.c (thread_db_find_new_threads): Likewise.
8812 * tracepoint.c (run_inferior_command): Likewise.
8813
b3dc46ff
AB
88142012-10-01 Andrew Burgess <aburgess@broadcom.com>
8815
8816 * server.c (handle_search_memory_1): Include access length in
8817 warning message.
8818
07c04788
HPN
88192012-09-05 Michael Brandt <michael.brandt@axis.com>
8820
8821 * linux-crisv32-low.c: Fix compile errors.
8822
918d227b
YQ
88232012-09-04 Yao Qi <yao@codesourcery.com>
8824
8825 * tracepoint.c (cmd_qtsv): Adjust debug message.
8826 Don't check CUR_TPOINT.
8827
18c1b81a
YQ
88282012-08-28 Yao Qi <yao@codesourcery.com>
8829
8830 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8831 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8832 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8833 Remove declarations of xmalloc, xreallloc, xstrdup and
8834 freeargv.
8835 * Makefile.in (libiberty_h): New.
8836 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8837 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8838
dc82f37b
YQ
88392012-08-23 Yao Qi <yao@codesourcery.com>
8840
8841 * server.h: Remove declaration of 'xsnprintf'.
8842
406b1477
KS
88432012-08-22 Keith Seitz <keiths@redhat.com>
8844
8845 * server.h: Include build-gnulib-gbserver/config.h.
8846 * gdbreplay.c: Likewise.
8847
e6712ff1
DE
88482012-08-08 Doug Evans <dje@google.com>
8849
8850 * Makefile.in (SFILES): Add gdb_vecs.c.
8851 (OBS): Add gdb_vecs.o.
8852 (gdb_vecs_h, host_defs_h): New variables.
8853 (thread-db.o): Add $(gdb_vecs_h) dependency.
8854 (gdb_vecs.o): New rule.
8855 * thread-db.c: #include "gdb_vecs.h".
8856 (thread_db_load_search): Use a vector to iterate over path elements.
8857 Handle text appearing after "$pdir".
8858
8859 * configure.ac: Add check for strstr.
8860 * config.in: Regenerate.
8861 * configure: Regenerate.
8862
7c3270ae
UW
88632012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8864
8865 * hostio.c (handle_pread): If pread fails, fall back to attempting
8866 lseek/read.
8867 (handle_pwrite): Likewise for pwrite.
8868
b62e2b27
UW
88692012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8870
8871 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8872 between unsupported TYPE and unimplementable ADDR/LEN combination.
8873 (arm_insert_point): Act on new return value.
8874
78a99e91
PA
88752012-07-31 Pedro Alves <palves@redhat.com>
8876
8877 * server.c (process_point_options): Only skip tokens if we find
8878 one that is unrecognized. Don't treat 'X' specially while
8879 skipping unrecognized tokens.
8880
fcf303ab
UW
88812012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8882
8883 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8884 to 4-byte-align HW breakpoint addresses for Thumb.
8885
7255706c
YQ
88862012-07-27 Yao Qi <yao@codesourcery.com>
8887
8888 PR remote/14161.
8889
8890 * server.h: Declare gdb_agent_about_to_close.
8891 * target.c (kill_inferior): Include "agent.h".
8892 New. Send command 'kill'.
8893 * target.h (kill_inferior): Removed macro.
8894 * tracepoint.c (gdb_agent_about_to_close): New.
8895 (gdb_agent_helper_thread): Handle command 'close'.
8896 Wait endlessly until the inferior stops.
8897 Install gdb_agent_remove_socket to atexit hook.
8898 (agent_socket_name): New static variable.
8899 (gdb_agent_socket_init): Replace local variable 'name' with
8900 'agent_socket_name'.
8901 (gdb_agent_remove_socket): New.
8902
5a3f286f
YQ
89032012-07-27 Yao Qi <yao@codesourcery.com>
8904
8905 * server.c (process_point_options): Stop at 'X' when parsing.
8906
961bd387
ME
89072012-07-19 Michael Eager <eager@eagercon.com>
8908
a261b8f5 8909 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8910 to hw_execute.
8911 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8912 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8913 hardware breakpoint.
8914
aa7c7447
JK
89152012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8916
8917 * gdbserver/linux-low.c (initialize_low): Call
8918 linux_ptrace_init_warnings.
8919
7f216e7c
DE
89202012-07-02 Doug Evans <dje@google.com>
8921
8922 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8923 pointer to int.
8924
d3ce09f5
SS
89252012-07-02 Stan Shebs <stan@codesourcery.com>
8926
8927 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8928 (ax.o): Add it to build rule.
8929 (ax-ipa.o): Ditto.
8930 (OBS): Add format.o.
8931 (IPA_OBS): Add format.o.
8932 * server.c (handle_query): Claim support for breakpoint commands.
8933 (process_point_options): Add command case.
8934 (process_serial_event): Leave running if there are printfs in
8935 effect.
8936 * mem-break.h (any_persistent_commands): Declare.
8937 (add_breakpoint_commands): Declare.
8938 (gdb_no_commands_at_breakpoint): Declare.
8939 (run_breakpoint_commands): Declare.
8940 * mem-break.c (struct point_command_list): New struct.
8941 (struct breakpoint): New field command_list.
8942 (any_persistent_commands): New function.
8943 (add_commands_to_breakpoint): New function.
8944 (add_breakpoint_commands): New function.
8945 (gdb_no_commands_at_breakpoint): New function.
8946 (run_breakpoint_commands): New function.
8947 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8948 locally.
8949 * ax.c: Include format.h.
8950 (ax_printf): New function.
8951 (gdb_eval_agent_expr): Add printf opcode.
8952
2f8f6aed
YQ
89532012-06-13 Yao Qi <yao@codesourcery.com>
8954
8955 * server.c (start_inferior): Remove duplicated writes to fields
8956 'last_resume_kind' and 'last_status' of 'current_inferior'.
8957
0c9070b3
YQ
89582012-06-12 Yao Qi <yao@codesourcery.com>
8959 Pedro Alves <palves@redhat.com>
8960
8961 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8962 comment.
8963 * server.c (handle_v_cont): Extend comment.
8964
c52daf70
YQ
89652012-06-11 Yao Qi <yao@codesourcery.com>
8966
8967 * linux-low.c (linux_attach): Add 'static'.
8968
d38bbb0a
YQ
89692012-06-06 Yao Qi <yao@codesourcery.com>
8970
8971 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8972
89dc0afd
JK
89732012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8974
8975 Fix gcc -flto compilation warning.
8976 * server.c (main): Make variable multi_mode and attach volatile.
8977
75f62ce7
TJB
89782012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8979
8980 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8981 if the platform doesn't know about it.
8982
65f479b6
PA
89832012-05-30 Jeff Kenton <jkenton@tilera.com>
8984
8985 * Makefile.in (SFILES): Add linux-tile-low.c.
8986 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8987 * configure.srv: Handle tilegx-*-linux*.
8988 * linux-tile-low.c: New file.
8989
0c5bf5a9
JK
89902012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8991
8992 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8993
a493e3e2
PA
89942012-05-24 Pedro Alves <palves@redhat.com>
8995
8996 PR gdb/7205
8997
43aaf8b6 8998 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8999
2ea28649
PA
90002012-05-24 Pedro Alves <palves@redhat.com>
9001
9002 PR gdb/7205
9003
9004 Replace target_signal with gdb_signal throughout.
9005
8d409d16
MR
90062012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9007
9008 * linux-low.c (linux_store_registers): Avoid the copying sequence
9009 when no data has been retrieved by ptrace.
9010
23512c01
MGD
90112012-05-22 Will Deacon <will.deacon@arm.com>
9012
9013 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9014 Include asm/ptrace.h.
9015 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9016 already defined.
9017
4934b29e
MR
90182012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9019
9020 * linux-low.c (linux_store_registers): Don't re-retrieve data
9021 with ptrace that has already been obtained from /proc. Always
9022 copy any data retrieved with ptrace to the buffer supplied.
9023
bde24c0a
PA
90242012-05-11 Yao Qi <yao@codesourcery.com>
9025 Pedro Alves <palves@redhat.com>
9026
9027 * linux-low.c (enum stopping_threads_kind): New.
9028 (stopping_threads): Change type to `enum stopping_threads_kind'.
9029 (handle_extended_wait): If stopping and suspending threads, leave
9030 the new_lwp suspended too.
9031 (linux_wait_for_event): Adjust.
9032 (stop_all_lwps): Set `stopping_threads' to
9033 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9034 whether we're suspending threads or just stopping them. Assert no
9035 recursion happens.
9036
623b6bdf
YQ
90372012-04-29 Yao Qi <yao@codesourcery.com>
9038
9039 * server.h: Move some code to ...
9040 * gdbthread.h: ... here. New.
9041 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9042 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9043 (nto-low.o, win32-low.o): Likewise.
9044 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9045 * regcache.c, remote-utils.c, server.c: Likewise.
9046 * target.c, tracepoint.c, win32-low.c: Likewise.
9047
f15f9948
TJB
90482012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9049
9050 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9051 (PTRACE_ARG4_TYPE): Likewise.
9052 (PTRACE_XFER_TYPE): Likewise.
9053 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9054 ptrace to PTRACE_ARG3_TYPE.
9055 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9056 (PTRACE_ARG4_TYPE): Likewise.
9057 (PTRACE_XFER_TYPE): Likewise.
9058 (linux_detach_one_lwp): Cast fourth argument of
9059 ptrace to long then PTRACE_ARG4_TYPE.
9060 (regsets_fetch_inferior_registers): Cast third argument of
9061 ptrace to long then PTRACE_ARG3_TYPE.
9062 (regsets_store_inferior_registers): Likewise.
9063
38ea300a
PA
90642012-04-20 Pedro Alves <palves@redhat.com>
9065
9066 * configure: Regenerate.
9067
c971b7fa
PA
90682012-04-19 Pedro Alves <palves@redhat.com>
9069
43aaf8b6 9070 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9071 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9072 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9073 (all, install-only, uninstall, clean-info, all-lib, clean): No
9074 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9075 (maintainer-clean realclean distclean): Use subdir_do.
9076 (subdir_do): New.
9077 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9078 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9079 * acinclude.m4: Include acx_configure_dir.m4.
9080 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9081 calls. Call AC_PROG_RANLIB. Configure gnulib using
9082 ACX_CONFIGURE_DIR.
9083 (GNULIB): New.
9084 (GNULIB_STDINT_H): Adjust.
9085 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9086 * gdbreplay.c: Include build-gnulib/config.h.
9087 * server.h: Likewise.
9088 * aclocal.m4: Regenerate.
9089 * config.in: Regenerate.
9090 * configure: Regenerate.
c971b7fa 9091
809277f8
PA
90922012-04-19 Pedro Alves <palves@redhat.com>
9093
9094 * Makefile.in (LIBGNU, INCGNU): Adjust.
9095 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9096 (all, install-only, uninstall, clean-info, all-lib, clean)
9097 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9098 * configure.ac: Adjust AC_OUTPUT output.
9099 * aclocal.m4: Regenerate.
9100 * configure: Regenerate.
9101
fd9bb8b8
PA
91022012-04-19 Pedro Alves <palves@redhat.com>
9103
9104 * Makefile.in (generated_files): New.
9105 (server_h): Remove the explicit dependency on config.h, and depend
9106 on $generated_files.
9107
1c298c66
PA
91082012-04-19 Pedro Alves <palves@redhat.com>
9109
9110 * Makefile.in (INCGNU): Add -Ignulib.
9111
57c4b50b
PA
91122012-04-19 Pedro Alves <palves@redhat.com>
9113
9114 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9115 (INCGNU): ... this, and spell out -I here.
9116 (GNULIB_LIB): Rename to ...
9117 (LIBGNU): ... this.
9118 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9119
1030e047
PA
91202012-04-19 Pedro Alves <palves@redhat.com>
9121
9122 * config.in: Regenerate.
9123
447d4319
PA
91242012-04-19 Pedro Alves <palves@redhat.com>
9125
9126 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9127 * server.h (memmem): Remove declaration.
9128 * config.in: Regenerate.
9129 * configure: Regenerate.
9130
aad9eab9
YQ
91312012-04-19 Yao Qi <yao@codesourcery.com>
9132
9133 * Makefile.in (SFILES): Add common/vec.c.
9134 (OBS): Add vec.o.
9135 (vec.o): New rule.
9136
3e10640f
YQ
91372012-04-19 Yao Qi <yao@codesourcery.com>
9138
9139 * remote-utils.c (prepare_resume_reply): Replace with macro
9140 target_core_of_thread.
9141 * server.c (handle_qxfer_threads_proper): Likewise.
9142 * target.h (traget_core_of_thread): New macro.
9143
71622373
PA
91442012-04-18 Pedro Alves <palves@redhat.com>
9145
9146 * aclocal.m4: Regenerate.
9147 * configure: Regenerate.
9148
80d26939
YQ
91492012-04-16 Yao Qi <yao@codesourcery.com>
9150
9151 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9152 duplicated on address.
9153
42476b70
YQ
91542012-04-16 Yao Qi <yao@codesourcery.com>
9155
9156 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9157 (struct tracepoint_action_ops) <send>: New field.
9158 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9159 (agent_expr_send, x_tracepoint_action_send): New.
9160 (l_tracepoint_action_send): New.
9161 (cmd_qtdp): Download and install tracepoint
9162 according to `use_agent'.
9163 (run_inferior_command): Add one more parameter `len'.
9164 Update callers.
9165 (tracepoint_send_agent): New.
9166 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9167
7bc83639
YQ
91682012-04-16 Yao Qi <yao@codesourcery.com>
9169
9170 * tracepoint.c (download_tracepoints): Moved to ...
9171 (cmd_qtstart): ... here.
9172
5f18041e
YQ
91732012-04-14 Yao Qi <yao@codesourcery.com>
9174
9175 * tracepoint.c: Include inttypes.h.
9176 (struct collect_memory_action): Use sized types.
9177 (struct tracepoint): Likewise.
9178 (cmd_qtdp, stop_tracing): Update print specifiers.
9179 (cmd_qtp, response_tracepoint): Likewise.
9180 (collect_data_at_tracepoint): Likewise.
9181 (collect_data_at_step): Likewise.
9182
55a8c076
YQ
91832012-04-14 Yao Qi <yao@codesourcery.com>
9184
9185 Import gnulib module inttypes.
9186 * aclocal.m4, config.in, configure: Regenerated.
9187
dc750257
YQ
91882012-04-14 Yao Qi <yao@codesourcery.com>
9189
9190 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9191 Makefile and config.status at last.
9192
0ab5faf9
YQ
91932012-04-13 Yao Qi <yao@codesourcery.com>
9194
9195 * tracepoint.c: Include stdint.h unconditionally.
9196
18f5fd81
TJB
91972012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9198
9199 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9200 on BFD_HAVE_SYS_PROCFS_TYPE.
9201 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9202 * configure: Regenerate.
9203 * config.in: Likewise.
9204
4d47af5c
L
92052012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9206
9207 * Makefile.in (clean): Also remove x32.c x32-linux.c
9208 x32-avx.c x32-avx-linux.c.
9209 (x32.o): New target.
9210 (x32.c): Likewise.
9211 (x32-linux.o): Likewise.
9212 (x32-linux.c): Likewise.
9213 (x32-avx.o): Likewise.
9214 (x32-avx.c): Likewise.
9215 (x32-avx-linux.o): Likewise.
9216 (x32-avx-linux.c): Likewise.
9217
9218 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9219 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9220 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9221 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9222 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9223 i386/x32-avx-linux.xml.
9224
9225 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9226 (init_registers_x32_avx_linux): Likwise.
9227 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9228 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9229
ecedbe58
PA
92302012-04-13 Pedro Alves <palves@redhat.com>
9231
9232 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9233 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9234 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9235 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9236 the sub-make.
9237
c92b5177
L
92382012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9239
9240 * linux-x86-low.c (compat_x32_clock_t): New.
9241 (compat_x32_siginfo_t): Likewise.
9242 (compat_x32_siginfo_from_siginfo): Likewise.
9243 (siginfo_from_compat_x32_siginfo): Likewise.
9244 (linux_is_elf64): Likewise.
9245 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9246 and siginfo_from_compat_x32_siginfo for x32.
9247 (x86_arch_setup): Set linux_is_elf64.
9248
214d508e
L
92492012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9250
9251 PR gdb/13969
9252 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9253 e_machine field.
9254 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9255 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9256 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9257 compatible with process.
9258
c9a1864a
YQ
92592012-04-12 Yao Qi <yao@codesourcery.com>
9260
9261 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9262 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9263 (install-only, install-info, clean): Handle sub dir gnulib.
9264 (all-lib, am--refresh): New targets.
9265 (memmem.o): Remove target.
9266 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9267 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9268 (AC_REPLACE_FUNCS): Remove memmem.
9269 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9270 (AC_OUTPUT): Generate Makefile in gnulib/.
9271 * aclocal.m4, config.in, configure: Regenerated.
9272
367ba2c2
MR
92732012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9274
9275 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9276
9d236627
PA
92772012-04-05 Pedro Alves <palves@redhat.com>
9278
9279 -Werror=strict-aliasing
9280
9281 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9282 pointer.
9283
111217b3
PA
92842012-04-04 Pedro Alves <palves@redhat.com>
9285
9286 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9287 (sparc_store_gregset_from_stack, sparc_store_gregset)
9288 (sparc_breakpoint_at): Fix formatting.
9289
8365dcf5
TJB
92902012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9291
9292 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9293 are available.
9294 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9295 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9296 * config.in: Regenerate.
9297 * configure: Likewise.
9298
689cc2ae
PA
92992012-03-29 Pedro Alves <palves@redhat.com>
9300
9301 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9302 Correct ptrace arguments.
9303
c14dfd32
PA
93042012-03-28 Pedro Alves <palves@redhat.com>
9305
9306 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9307 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9308 (IA64_FR1_REGNUM): New defines.
9309 (ia64_fetch_register): New.
9310 (the_low_target): Install it.
9311 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9312 field.
9313 * linux-low.c (linux_fetch_registers): Try the
9314 the_low_target.fetch_register hook first.
9315
9316 * linux-arm-low.c (the_low_target): Adjust.
9317 * linux-bfin-low.c (the_low_target): Adjust.
9318 * linux-cris-low.c (the_low_target): Adjust.
9319 * linux-crisv32-low.c (the_low_target): Adjust.
9320 * linux-m32r-low.c (the_low_target): Adjust.
9321 * linux-m68k-low.c (the_low_target): Adjust.
9322 * linux-mips-low.c (the_low_target): Adjust.
9323 * linux-ppc-low.c (the_low_target): Adjust.
9324 * linux-s390-low.c (the_low_target): Adjust.
9325 * linux-sh-low.c (the_low_target): Adjust.
9326 * linux-sparc-low.c (the_low_target): Adjust.
9327 * linux-tic6x-low.c (the_low_target): Adjust.
9328 * linux-x86-low.c (the_low_target): Adjust.
9329 * linux-xtensa-low.c (the_low_target): Adjust.
9330
63c88e13
PA
93312012-03-26 Pedro Alves <palves@redhat.com>
9332
9333 * server.c (handle_qxfer_libraries): Don't bail early if
9334 the_target->qxfer_libraries_svr4 is not NULL.
9335
fb723180
PA
93362012-03-26 Pedro Alves <palves@redhat.com>
9337
9338 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9339
0afae3cf
PA
93402012-03-23 Pedro Alves <palves@redhat.com>
9341
9342 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9343 "library-list-svr4" element's start tag when the the DSO list is
9344 empty.
9345
485f1ee4
PA
93462012-03-23 Pedro Alves <palves@redhat.com>
9347
9348 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9349 a variable whose type size is the same as the inferior's pointer
9350 size.
9351
a5362b9a
TS
93522012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9353
9354 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9355 struct siginfo.
9356 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9357 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9358 * linux-low.h: Include <signal.h>.
9359 (struct siginfo): Remove forward declaration.
9360 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9361 struct siginfo.
9362
d226c142
MF
93632012-03-21 Mike Frysinger <vapier@gentoo.org>
9364
9365 * .gitignore: Ignore more files.
9366
122f36ef
PA
93672012-03-19 Pedro Alves <palves@redhat.com>
9368 Jan Kratochvil <jan.kratochvil@redhat.com>
9369
9370 * server.c (cont_thread, general_thread): Add describing comments.
9371 (start_inferior): Clear `cont_thread'.
9372 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9373 of a process.
9374
fc3e5175
YQ
93752012-03-15 Yao Qi <yao@codesourcery.com>
9376
9377 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9378 handling to ...
9379 (cmd_qtdp): ... here.
9380
8d0d92cd
YQ
93812012-03-15 Yao Qi <yao@codesourcery.com>
9382
9383 * tracepoint.c (struct tracepoint_action_ops): New.
9384 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9385 (m_tracepoint_action_download): New.
9386 (r_tracepoint_action_download): New.
9387 (x_tracepoint_action_download): New.
9388 (l_tracepoint_action_download): New.
9389 (add_tracepoint_action): Install `action->ops' according type.
9390 (download_tracepoint_1): Move code `download' function pointer
9391 of various tracepoint_action_ops.
9392
87b0bb13
JK
93932012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9394
9395 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9396 linux_ptrace_attach_warnings.
9397
5f572dec
JK
93982012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9399
9400 * Makefile.in (linux-ptrace.o): New.
9401 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9402 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9403 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9404 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9405 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9406 of these targets.
9407 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9408
f4647387
YQ
94092012-03-08 Yao Qi <yao@codesourcery.com>
9410 Pedro Alves <palves@redhat.com>
9411
9412 Fix PR server/13392.
9413 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9414 offset of JMP insn.
9415 * tracepoint.c (remove_tracepoint): New.
9416 (cmd_qtdp): Call remove_tracepoint when failed to install.
9417
9b224c5e
PA
94182012-03-07 Pedro Alves <palves@redhat.com>
9419
9420 * linux-low.c (get_detach_signal): New.
9421 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9422 Pass on pending signals to PTRACE_DETACH. Check the result of the
9423 ptrace call.
9424 * server.c (program_signals, program_signals_p): New.
9425 (handle_general_set): Handle QProgramSignals.
9426 * server.h (program_signals, program_signals_p): Declare.
9427
e237a7e2
JK
94282012-03-05 Pedro Alves <palves@redhat.com>
9429 Jan Kratochvil <jan.kratochvil@redhat.com>
9430
9431 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9432 New comment why.
9433
5808517f
YQ
94342012-03-03 Yao Qi <yao@codesourcery.com>
9435
9436 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9437 agent_look_up_symbols.
9438
58b4daa5
YQ
94392012-03-03 Yao Qi <yao@codesourcery.com>
9440
9441 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9442 (linux-x86-low.o): Likewise.
9443 * server.h: Remove in_process_agent_loaded.
9444 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9445 common/agent.c.
9446 Update callers.
9447
8ffcbaaf
YQ
94482012-03-03 Yao Qi <yao@codesourcery.com>
9449
9450 * tracepoint.c (gdb_agent_capability): New global.
9451 (in_process_agent_loaded_ust): Renamed to
9452 `in_process_agent_supports_ust'.
9453 Update callers.
9454 (in_process_agent_supports_ust): Call agent_capability_check.
9455 (clear_installed_tracepoints): Assert that agent supports
9456 agent.
9457
d1feda86
YQ
94582012-03-03 Yao Qi <yao@codesourcery.com>
9459
9460 * linux-low.c (linux_supports_agent): New.
9461 (linux_target_ops): Initialize field `supports_agent' with
9462 linux_supports_agent.
9463 * target.h (struct target_ops) <supports_agent>: New.
9464 (target_supports_agent): New macro.
9465 * server.c (handle_general_set): Handle packet 'QAgent'.
9466 (handle_query): Send `QAgent+'.
9467 * Makefile.in (server.o): Depends on agent.h.
9468
2fa291ac
YQ
94692012-03-03 Yao Qi <yao@codesourcery.com>
9470
9471 * Makefile.in (OBS): Add agent.o.
9472 Add new rule for agent.o.
9473 Track dependence of tracepoint.c on agent.h.
9474 * tracepoint.c (run_inferior_command_1):
9475 (run_inferior_command): Call agent_run_command.
9476 (gdb_ust_connect_sync_socket): Deleted. Move it to
9477 common/agent.c.
9478 (resume_thread, stop_thread): Likewise.
9479 (gdb_ust_socket_init): Renamed to ...
9480 (gdb_agent_socket_init): ... New.
9481 (gdb_ust_thread): Renamed to ...
9482 (gdb_agent_helper_thread): ... New.
9483 (gdb_ust_init): Move some code to ...
9484 (gdb_agent_init): ... here. New.
9485 [HAVE_UST]: Call gdb_ust_init.
9486 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9487 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9488 * config.in, configure: Regenerated.
9489
05044653
PA
94902012-03-02 Pedro Alves <palves@redhat.com>
9491
9492 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9493 * linux-low.c (struct simple_pid_list): New.
9494 (stopped_pids): New a struct simple_pid_list pointer.
9495 (add_to_pid_list, pull_pid_from_list): New.
9496 (handle_extended_wait): Don't assume the first signal new children
9497 report is SIGSTOP. Adjust call to pull_pid_from_list.
9498 (linux_wait_for_lwp): Adjust.
9499
8d00225b
YQ
95002012-03-02 Yao Qi <yao@codesourcery.com>
9501
9502 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9503 debug log.
9504
19560ba5
YQ
95052012-03-02 Yao Qi <yao@codesourcery.com>
9506
9507 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9508 `stop_pc' and `tpoint'. Update caller.
9509
1faeff08
MR
95102012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9511
9512 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9513 * linux-low.c (use_linux_regsets): New macro.
9514 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9515 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9516 (linux_register_in_regsets): New function.
9517 (usr_fetch_inferior_registers): Skip registers covered by
9518 regsets.
9519 (usr_store_inferior_registers): Likewise.
9520 (usr_fetch_inferior_registers): New macro.
9521 (usr_store_inferior_registers): Likewise.
9522 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9523 (linux_store_registers): Likewise.
9524 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9525 prototype.
9526 (init_registers_mips64_dsp_linux): Likewise.
9527 (init_registers_mips_linux): New macro.
9528 (init_registers_mips_dsp_linux): Likewise.
9529 (mips_dsp_num_regs): Likewise.
9530 (DSP_BASE, DSP_CONTROL): New fallback macros.
9531 (mips_base_regs): New macro.
9532 (mips_regmap): Use it. Fix the size.
9533 (mips_dsp_regmap): New variable.
9534 (mips_dsp_regset_bitmap): Likewise.
9535 (mips_arch_setup): New function.
9536 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9537 than mips_regmap.
9538 (mips_cannot_store_register): Likewise.
9539 (the_low_target): Update .arch_setup, .num_regs and .regmap
9540 initializers. Add .regset_bitmap initializer.
9541 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9542 initializer.
9543 * linux-bfin-low.c (the_low_target): Likewise.
9544 * linux-cris-low.c (the_low_target): Likewise.
9545 * linux-crisv32-low.c (the_low_target): Likewise.
9546 * linux-ia64-low.c (the_low_target): Likewise.
9547 * linux-m32r-low.c (the_low_target): Likewise.
9548 * linux-m68k-low.c (the_low_target): Likewise.
9549 * linux-ppc-low.c (the_low_target): Likewise.
9550 * linux-s390-low.c (the_low_target): Likewise.
9551 * linux-sh-low.c (the_low_target): Likewise.
9552 * linux-sparc-low.c (the_low_target): Likewise.
9553 * linux-tic6x-low.c (the_low_target): Likewise.
9554 * linux-x86-low.c (the_low_target): Likewise.
9555 * linux-xtensa-low.c (the_low_target): Likewise.
9556 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9557 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9558 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9559 srv_xmlfiles.
9560 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9561 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9562
c03e6ccc
YQ
95632012-02-29 Yao Qi <yao@codesourcery.com>
9564 Pedro Alves <palves@redhat.com>
9565
9566 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9567 `step_over_finished' is true.
9568
644cebc9
PA
95692012-02-27 Pedro Alves <palves@redhat.com>
9570
9571 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9572 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9573
c14d7ab2
PA
95742012-02-27 Pedro Alves <palves@redhat.com>
9575
9576 PR server/9684
9577 * linux-low.c (pid_is_stopped): New.
9578 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9579
412c89dd
LM
95802012-02-25 Luis Machado <lgustavo@codesourcery.com>
9581
9582 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9583 of conditions.
9584
b745defe
MR
95852012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9586
9587 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9588
9f3a5c85
LM
95892012-02-24 Luis Machado <lgustavo@codesourcery>
9590
9591 * server.c (handle_query): Advertise support for target-side
9592 breakpoint condition evaluation.
9593 (process_point_options): New function.
9594 (process_serial_event): When inserting a breakpoint, check for
9595 a target-side condition that should be evaluated.
9596
9597 * mem-break.c: Include regcache.h and ax.h.
9598 (point_cond_list_t): New data structure.
9599 (breakpoint) <cond_list>: New field.
9600 (find_gdb_breakpoint_at): Make non-static.
9601 (delete_gdb_breakpoint_at): Clear any target-side
9602 conditions.
9603 (clear_gdb_breakpoint_conditions): New function.
9604 (add_condition_to_breakpoint): Likewise.
9605 (add_breakpoint_condition): Likewise.
9606 (gdb_condition_true_at_breakpoint): Likewise.
9607 (gdb_breakpoint_here): Return result directly instead
9608 of going through a local variable.
9609
9610 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9611 (clear_gdb_breakpoint_conditions): Likewise.
9612 (add_breakpoint_condition): Likewise.
9613 (gdb_condition_true_at_breakpoint): Likewise.
9614
9615 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9616 (need_step_over_p): Take target-side breakpoint condition into
9617 consideration.
9618
5e1dc496
LM
96192012-02-24 Luis Machado <lgustavo@codesourcery>
9620
9621 * server.h: Include tracepoint.h.
9622 (agent_mem_read, agent_get_trace_state_variable_value,
9623 agent_set_trace_state_variable_value,
9624 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9625 get_set_tsv_func_addr): New prototypes.
9626
9627 * ax.h: New include file.
9628 * ax.c: New source file.
9629
9630 * tracepoint.c: Include ax.h.
9631 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9632 agent_expr, eval_result_type): Move to ax.h.
9633 (parse_agent_expr): Rename to ...
9634 (gdb_parse_agent_expr): ... this, make it non-static and move
9635 to ax.h.
9636 (unparse_agent_expr) Rename to ...
9637 (gdb_unparse_agent_expr): ... this, make it non-static and move
9638 to ax.h.
9639 (eval_agent_expr): Rename to ...
9640 (eval_tracepoint_agent_expr): ... this.
9641 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9642 forward declarations.
9643 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9644 (agent_get_trace_state_variable_value): New function.
9645 (agent_set_trace_state_variable_value): New function.
9646 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9647 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9648 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9649 (condition_true_at_tracepoint): Likewise.
9650 (parse_agent_expr): Rename to ...
9651 (gdb_parse_agent_expr): ... this and move to ax.c.
9652 (unparse_agent_expr): Rename to ...
9653 (gdb_unparse_agent_expr): ... this and move to ax.c.
9654 (gdb_agent_op_name): Move to ax.c.
9655 (eval_agent_expr): Rename to ...
9656 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9657 and move to ax.c.
9658 (eval_tracepoint_agent_expr): New function.
9659 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9660 non-static.
5e1dc496
LM
9661 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9662 ax.c.
9663 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9664 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9665 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9666 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9667 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9668 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9669 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9670 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9671 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9672 (compile_bytecodes): Remove forward declaration.
9673 (is_goto_target): Move to ax.c.
9674 (compile_bytecodes): Move to ax.c and call
9675 agent_get_trace_state_variable_value (...) and
9676 agent_set_trace_state_variable_value (...).
9677
9678 * Makefile.in: Update ax.c and IPA dependencies.
9679
277e4e52
PA
96802012-02-24 Pedro Alves <palves@redhat.com>
9681
9682 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9683 (cmd_bigqtbuffer_circular): ... this. Only handle
9684 'QTBuffer:circular:'.
9685 (handle_tracepoint_general_set): Adjust.
9686
bf4c19f7
YQ
96872012-02-16 Yao Qi <yao@codesourcery.com>
9688
9689 * inferiors.c: Move code to ...
9690 * dll.c: .... here. New.
9691 * server.h: Declare clear_dlls.
9692 * Makefile.in (SFILES): Add dll.c.
9693 (OBS): Add dll.o
9694 (dll.o): New rule.
9695
d73f2619
YQ
96962012-02-11 Yao Qi <yao@codesourcery.com>
9697
9698 * server.c: (handle_monitor_command): Add a new parameter
9699 `own_buf'.
9700 (handle_query): Update caller.
9701
f8255c2a
JB
97022012-02-09 Joel Brobecker <brobecker@adacore.com>
9703
9704 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9705 * configure, config.in: Regenerate.
9706 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9707 is not defined.
9708
da84f473
PA
97092012-02-02 Pedro Alves <palves@redhat.com>
9710
9711 Try SIGKILL first, then PTRACE_KILL.
9712 * linux-low.c (linux_kill_one_lwp): New.
9713 (linux_kill_one_lwp): Rename to ...
9714 (kill_one_lwp_callback): ... this. Use the new
9715 linux_kill_one_lwp.
9716
e886a173
PA
97172012-02-02 Pedro Alves <palves@redhat.com>
9718
9719 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9720 inferior.
9721
be07f1a2
PA
97222012-01-27 Pedro Alves <palves@redhat.com>
9723
9724 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9725 (elf_64_file_p): Make static.
9726 (linux_pid_exe_is_elf_64_file): New.
9727 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9728 Delete declarations.
9729 (linux_pid_exe_is_elf_64_file): Declare.
9730 * linux-x86-low.c (x86_arch_setup): Use
9731 linux_pid_exe_is_elf_64_file.
9732
d8301ad1
JK
97332012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9734
9735 * linux-low.c (linux_wait_for_event_1): Rename to ...
9736 (linux_wait_for_event): ... here and merge it with former
9737 linux_wait_for_event - new variable wait_ptid, use it.
9738 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9739
01b17894
PA
97402012-01-23 Pedro Alves <palves@redhat.com>
9741
9742 * server.c (main): Avoid yet another case of infinite loop while
9743 detaching/killing after a longjmp.
9744
e825046f
JK
97452012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9746
9747 Code cleanup.
9748 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9749
b9e7b9c3
UW
97502012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9751
9752 * hostio.c (handle_readlink): New function.
9753 (handle_vFile): Call it to handle "vFile:readlink" packets.
9754
901f9912
UW
97552012-01-20 Pedro Alves <palves@redhat.com>
9756 Ulrich Weigand <ulrich.weigand@linaro.org>
9757
9758 * server.c (handle_v_requests): Only support vAttach and vRun to
9759 start multiple processes when in extended protocol mode.
9760
fc1ab1a0
PA
97612012-01-17 Pedro Alves <palves@redhat.com>
9762
9763 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9764 memalign plus mprotect to allocate the scratch buffer.
9765
7d5d4e98
PA
97662012-01-13 Pedro Alves <palves@redhat.com>
9767
9768 * server.c (attach_inferior): Clear `cont_thread'.
9769
f128d5e9
PA
97702012-01-13 Pedro Alves <palves@redhat.com>
9771
9772 * server.c (main): Avoid infinite loop while detaching/killing
9773 after a longjmp.
9774
06db92f0
DE
97752012-01-09 Doug Evans <dje@google.com>
9776
9777 * server.c (start_inferior): Set last_ptid in --wrapper case.
9778
32d92999
YQ
97792012-01-06 Yao Qi <yao@codesourcery.com>
9780
9781 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9782 defined.
9783 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9784
5e0a92a9
YQ
97852012-01-04 Yao Qi <yao@codesourcery.com>
9786
9787 * tracepoint.c (cmd_qtdp): Print debug message
9788 for static tracepoint.
9789
ae639e8c
YQ
97902012-01-04 Yao Qi <yao@codesourcery.com>
9791
9792 * tracepoint.c (trace_vdebug): Differentiate debug message
9793 between gdbserver and IPA.
9794
f72429c5
YQ
97952012-01-03 Yao Qi <yao@codesourcery.com>
9796
9797 * tracepoint.c (tracepoint_was_hit): Don't collect for
9798 static tracepoint.
9799
12c3e59c
JB
98002012-01-02 Joel Brobecker <brobecker@adacore.com>
9801
9802 * terminal.h: Reformat copyright header.
9803
67827812
JB
98042012-01-02 Joel Brobecker <brobecker@adacore.com>
9805
9806 * server.c (gdbserver_version): Update copyright year.
9807 * gdbreplay.c (gdbreplay_version): Likewise.
9808
3e52c33d
JK
98092011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9810
9811 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9812
9813 Revert:
9814 2011-12-18 Hui Zhu <teawater@gmail.com>
9815 * linux-low.c (linux_create_inferior): Save return value to ret.
9816
66f1260e
HZ
98172011-12-18 Hui Zhu <teawater@gmail.com>
9818
9819 * linux-low.c (linux_create_inferior): Save return value to ret.
9820
e77616d7
DE
98212011-12-16 Doug Evans <dje@google.com>
9822
e7b06c57
DE
9823 * linux-low.c (linux_create_inferior): If stdio connection,
9824 redirect stdin from /dev/null, stdout to stderr.
9825 * remote-utils.c (remote_is_stdio): New static global.
9826 (remote_connection_is_stdio): New function.
9827 (remote_prepare): Handle stdio connection.
9828 (remote_open): Ditto.
9829 (remote_close): Don't close stdin for stdio connections.
9830 (read_prim,write_prim): New functions. Replace all calls to
9831 read/write to these.
9832 * server.c (main): Watch for "-" argument. Move call to
9833 remote_prepare before start_inferior.
9834 * server.h (STDIO_CONNECTION_NAME): New macro.
9835 (remote_connection_is_stdio): Declare.
9836
e77616d7
DE
9837 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9838 in debugging output.
9839
82067193
YQ
98402011-12-15 Yao Qi <yao@codesourcery.com>
9841
9842 * tracepoint.c: Include sys/syscall.h.
9843 (gdb_ust_thread): Remove preprocessor conditional.
9844
82bfbe7e
PA
98452011-12-14 Pedro Alves <pedro@codesourcery.com>
9846
9847 * linux-low.c (linux_detach_one_lwp): Call
9848 the_low_target.prepare_to_resume before detaching.
9849
712c6575
YQ
98502011-12-14 Yao Qi <yao@codesourcery.com>
9851
9852 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9853 of write.
9854
d54d1edf
YQ
98552011-12-14 Yao Qi <yao@codesourcery.com>
9856
9857 * i386-low.c (i386_low_stopped_data_address): Initialize local
9858 variable `control'.
9859
6210a125
PA
98602011-12-13 Pedro Alves <pedro@codesourcery.com>
9861
9862 PR remote/13492
9863
9864 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9865 DR_CONTROL unless necessary. Extend comments.
9866 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9867 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9868
2ece8244
YQ
98692011-12-13 Yao Qi <yao@codesourcery.com>
9870
9871 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9872 macros.
9873 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9874
784867a5
JK
98752011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9876
9877 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9878 Print new debug message for such case.
9879
6bf36717
JK
98802011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9881
9882 Fix overlapping memcpy.
9883 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9884 the read_inferior_memory transfer.
9885 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9886 write_inferior_memory transfer.
9887 (set_fast_tracepoint_jump): New variable buf. Use it for the
9888 read_inferior_memory and write_inferior_memory transfers.
9889 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9890 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9891 Use it for the write_inferior_memory transfer.
9892 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9893 buffers.
9894
50275556
MR
98952011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9896
9897 * linux-low.c (fetch_register, store_register): Make code
9898 consistent, fix formatting.
9899
7325beb4
MR
99002011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9901
9902 * linux-low.c (usr_store_inferior_registers): Factor out code
9903 to handle individual registers into...
9904 (store_register): ... this new function.
9905
c642a434
UW
99062011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9907
9908 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9909 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9910 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9911 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9912 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9913 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9914 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9915 (srv_xmlfiles): Add new XML files.
9916
9917 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9918 and <sys/uio.h>.
9919 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9920 (init_registers_s390_linux32v1): Add prototype.
9921 (init_registers_s390_linux32v2): Likewise.
9922 (init_registers_s390_linux64v1): Likewise.
9923 (init_registers_s390_linux64v2): Likewise.
9924 (init_registers_s390x_linux64v1): Likewise.
9925 (init_registers_s390x_linux64v2): Likewise.
9926 (s390_num_regs): Increment to 52.
9927 (s390_regmap): Add orig_r2 register.
9928 (s390_num_regs_3264): Increment to 68.
9929 (s390_regmap_3264): Add orig_r2 register.
9930 (s390_collect_ptrace_register): Handle orig_r2 register.
9931 (s390_supply_ptrace_register): Likewise.
9932 (s390_fill_last_break): New function.
9933 (s390_store_last_break): Likewise.
9934 (s390_fill_system_call): New function.
9935 (s390_store_system_call): Likewise.
9936 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9937 register sets.
9938 (s390_check_regset): New function.
9939 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9940 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9941 Update target_regsets for available register sets.
9942
2268b414
JK
99432011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9944 Jan Kratochvil <jan.kratochvil@redhat.com>
9945
9946 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9947 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9948 New.
9949 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9950 * linux-low.h (struct process_info_private): New member r_debug.
9951 * server.c (handle_qxfer_libraries): Call
9952 the_target->qxfer_libraries_svr4.
9953 (handle_qxfer_libraries_svr4): New function.
9954 (qxfer_packets): New entry "libraries-svr4".
9955 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9956 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9957 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9958 PACKET_qXfer_libraries_svr4.
9959
d6db1fab
UW
99602011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9961
9962 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9963 PSW address/mask between 8-byte and 16-byte formats.
9964 (s390_supply_ptrace_register): Likewise.
9965 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9966 basic addressing mode bit.
9967
242f5f1c
SS
99682011-11-24 Stan Shebs <stan@codesourcery.com>
9969
9970 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9971
f196051f
SS
99722011-11-17 Stan Shebs <stan@codesourcery.com>
9973
9974 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9975 (tracing_start_time): New global.
9976 (tracing_stop_time): New global.
9977 (tracing_user_name): New global.
9978 (tracing_notes): New global.
9979 (tracing_stop_note): New global.
9980 (cmd_qtstart): Set traceframe_usage, start_time.
9981 (stop_tracing): Set stop_time.
9982 (cmd_qtstatus): Report additional status.
9983 (cmd_qtp): New function.
9984 (handle_tracepoint_query): Call it.
9985 (cmd_qtnotes): New function.
9986 (handle_tracepoint_general_set): Call it.
9987 (get_timestamp): Rename from tsv_get_timestamp.
9988
405f8e94
SS
99892011-11-14 Stan Shebs <stan@codesourcery.com>
9990 Kwok Cheung Yeung <kcy@codesourcery.com>
9991
9992 * linux-x86-low.c (small_jump_insn): New.
9993 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9994 trampoline and error message, build a trampoline and issue a small
9995 jump instruction to it.
9996 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9997 trampoline and error message.
9998 (x86_get_min_fast_tracepoint_insn_len): New.
9999 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10000 * linux-low.h (struct linux_target_ops): Add arguments to
10001 install_fast_tracepoint_jump_pad operation, add new operation.
10002 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10003 arguments.
10004 (linux_get_min_fast_tracepoint_insn_len): New function.
10005 (linux_target_op): Add new operation.
10006 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10007 (gdb_trampoline_buffer_end): Ditto.
10008 (gdb_trampoline_buffer_error): Ditto.
10009 (struct ipa_sym_addresses): Add fields for new IPA variables.
10010 (symbol_list): Add entries for new IPA variables.
10011 (struct tracepoint): Add fields to hold the address range of the
10012 trampoline used by the tracepoint.
10013 (trampoline_buffer_head): New static variable.
10014 (trampoline_buffer_tail): Ditto.
10015 (claim_trampoline_space): New function.
10016 (have_fast_tracepoint_trampoline_buffer): New function.
10017 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10018 structure.
10019 (install_fast_tracepoint): Ditto, also add error buffer argument.
10020 (cmd_qtminftpilen): New function.
10021 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10022 (fast_tracepoint_from_trampoline_address): New function.
10023 (fast_tracepoint_collecting): Handle trampoline as part of jump
10024 pad space.
10025 (set_trampoline_buffer_space): New function.
10026 (initialize_tracepoint): Initialize new IPA variables.
10027 * target.h (struct target_ops): Add arguments to
10028 install_fast_tracepoint_jump_pad operation, add new
10029 get_min_fast_tracepoint_insn_len operation.
10030 (target_get_min_fast_tracepoint_insn_len): New.
10031 (install_fast_tracepoint_jump_pad): Add arguments.
10032 * server.h (IPA_BUFSIZ): Define.
10033 * linux-i386-ipa.c: Include extra header files.
10034 (initialize_fast_tracepoint_trampoline_buffer): New function.
10035 (initialize_low_tracepoint): Call it.
10036 * server.h (set_trampoline_buffer_space): Declare.
10037 (claim_trampoline_space): Ditto.
10038 (have_fast_tracepoint_trampoline_buffer): Ditto.
10039
1e4d1764
YQ
100402011-11-14 Yao Qi <yao@codesourcery.com>
10041
10042 * server.c (handle_query): Handle InstallInTrace for qSupported.
10043 * tracepoint.c (add_tracepoint): Sort list.
10044 (install_tracepoint, download_tracepoint): New.
10045 (cmd_qtdp): Call them to install and download tracepoints.
10046 (sort_tracepoints): Removed.
10047 (cmd_qtstart): Update.
10048
5c73ff4e
YQ
100492011-11-14 Yao Qi <yao@codesourcery.com>
10050
10051 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10052 * mem-break.h: Declare.
10053 * tracepoint.c (cmd_qtstart): Move some code to ...
10054 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10055 New.
10056 (download_tracepoints): Move some code to ...
10057 (download_tracepoint_1): ... here. New.
10058
86a30030
YQ
100592011-11-08 Yao Qi <yao@codesourcery.com>
10060
10061 * remote-utils.c (relocate_instruction): A comment fix.
10062
8d26e50c
JB
100632011-11-07 Joel Brobecker <brobecker@adacore.com>
10064
10065 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10066 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10067 dr_status_mirror and dr_control_mirror from debug_reg_state.
10068 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10069 (i386_initial_stuff): Remove use of deleted globals.
10070 (i386_get_thread_context, i386_set_thread_context,
10071 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10072 from debug_reg_state.
10073
a59306a3
YQ
100742011-11-05 Yao Qi <yao@codesourcery.com>
10075
10076 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10077 address as TPOINT's.
10078
3065dfb6
SS
100792011-11-02 Stan Shebs <stan@codesourcery.com>
10080
10081 * tracepoint.c (agent_mem_read_string): New function.
10082 (eval_agent_expr): Call it for tracenz.
10083 * server.c (handle_query): Report support for tracenz.
10084
fd0d8c7c
YQ
100852011-11-02 Yao Qi <yao@codesourcery.com>
10086
10087 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10088
609086b1
YQ
100892011-11-02 Yao Qi <yao@codesourcery.com>
10090
10091 * target.h: Fix a typo in comment.
10092
b9fd1791
PA
100932011-10-31 Pedro Alves <pedro@codesourcery.com>
10094
10095 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10096 clobber the breakpoints' shadows with fast tracepoint jumps.
10097 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10098 * target.c (write_inferior_memory): Also pass MYADDR down to
10099 check_mem_write.
10100
03583c20
UW
101012011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10102
10103 * configure.ac: Check support for personality routine.
10104 * configure: Regenerate.
10105 * config.in: Likewise.
10106 * linux-low.c: Include <sys/personality.h>.
10107 Define ADDR_NO_RANDOMIZE if necessary.
10108 (linux_create_inferior): Disable address space randomization when
10109 forking inferior, if requested.
10110 (linux_supports_disable_randomization): New function.
10111 (linux_target_ops): Install it.
10112 * server.h (disable_randomization): Declare.
10113 * server.c (disable_randomization): New global variable.
10114 (handle_general_set): Handle QDisableRandomization.
10115 (handle_query): Likewise for qSupported.
10116 (main): Support --disable-randomization and --no-disable-randomization
10117 command line arguments.
10118 * target.h (struct target_ops): Add supports_disable_randomization.
10119 (target_supports_disable_randomization): New macro.
10120
723b724b
MF
101212011-09-29 Mike Frysinger <vapier@gentoo.org>
10122
10123 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10124 ifdef check.
10125 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10126 [!PT_GETDSBT] (target_loadmap): New definition.
10127 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10128 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10129 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10130 and PT_GETDSBT to LINUX_LOADMAP.
10131 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10132 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10133
55329a5c 101342011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10135
10136 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10137 (arm_linux_hwbp_cap): New static variable.
10138 (arm_linux_get_hwbp_cap): Replace by ...
10139 (arm_linux_init_hwbp_cap): ... this new function.
10140 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10141 (arm_linux_get_hw_watchpoint_count): Likewise.
10142 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10143 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10144 (arm_prepare_to_resume): Use perror_with_name instead of error.
10145
55329a5c 101462011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10147
10148 * linux-arm-low.c: Include <signal.h>.
10149 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10150 (struct arm_linux_hwbp_cap): New data type.
10151 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10152 (struct arm_linux_hw_breakpoint): New data type.
10153 (MAX_BPTS, MAX_WPTS): Define.
10154 (struct arch_process_info, struct arch_lwp_info): New data types.
10155 (arm_linux_get_hwbp_cap): New function.
10156 (arm_linux_get_hw_breakpoint_count): Likewise.
10157 (arm_linux_get_hw_watchpoint_count): Likewise.
10158 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10159 (arm_hwbp_control_initialize): Likewise.
10160 (arm_hwbp_control_is_enabled): Likewise.
10161 (arm_hwbp_control_is_initialized): Likewise.
10162 (arm_hwbp_control_disable): Likewise.
10163 (arm_linux_hw_breakpoint_equal): Likewise.
10164 (arm_linux_hw_point_initialize): Likewise.
10165 (struct update_registers_data): New data structure.
10166 (update_registers_callback: New function.
10167 (arm_insert_point): Likewise.
10168 (arm_remove_point): Likewise.
10169 (arm_stopped_by_watchpoint): Likewise.
10170 (arm_stopped_data_address): Likewise.
10171 (arm_new_process): Likewise.
10172 (arm_new_thread): Likewise.
10173 (arm_prepare_to_resume): Likewise.
10174 (the_low_target): Register arm_insert_point, arm_remove_point,
10175 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10176 arm_new_thread, and arm_prepare_to_resume.
10177
6b9801d4
SS
101782011-09-15 Stan Shebs <stan@codesourcery.com>
10179
10180 * server.h (struct emit_ops): Add compare-goto fields.
10181 * tracepoint.c (gdb_agent_op_sizes): New table.
10182 (emit_eq_goto): New function.
10183 (emit_ne_goto): New function.
10184 (emit_lt_goto): New function.
10185 (emit_le_goto): New function.
10186 (emit_gt_goto): New function.
10187 (emit_ge_goto): New function.
10188 (is_goto_target): New function.
10189 (compile_bytecodes): Recognize special cases of compare-goto
10190 combinations and call specialized emitters for them.
10191 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10192 (amd64_emit_ne_goto): New function.
10193 (amd64_emit_lt_goto): New function.
10194 (amd64_emit_le_goto): New function.
10195 (amd64_emit_gt_goto): New function.
10196 (amd64_emit_ge_goto): New function.
10197 (amd64_emit_ops): Add the new functions.
10198 (i386_emit_eq_goto): New function.
10199 (i386_emit_ne_goto): New function.
10200 (i386_emit_lt_goto): New function.
10201 (i386_emit_le_goto): New function.
10202 (i386_emit_gt_goto): New function.
10203 (i386_emit_ge_goto): New function.
10204 (i386_emit_ops): Add the new functions.
10205
bf15cbda
SS
102062011-09-08 Stan Shebs <stan@codesourcery.com>
10207
10208 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10209 (i386_emit_epilogue): Restore %ebx.
10210
943ca1dd
JZ
102112011-08-31 Jie Zhang <jzhang918@gmail.com>
10212
10213 * server.c (step_thread): Remove definition.
10214 (process_serial_event): Don't handle Hs.
10215 * server.h (step_thread): Remove declaration.
10216 * target.c (set_desired_inferior): Remove use of step_thread.
10217
e3deef73
LM
102182011-08-24 Luis Machado <lgustavo@codesourcery.com>
10219
10220 * linux-low.c: Include linux-procfs.h.
10221 (linux_attach_lwp_1): Update comments.
10222 (linux_attach): Scan for existing threads when attaching to a
10223 process that is the tgid.
10224 * Makefile.in: Update dependencies.
10225
13da1c97
LM
102262011-08-24 Luis Machado <lgustavo@codesourcery.com>
10227
10228 * configure.srv: Add linux-procfs.o dependencies.
10229
881127c9
YQ
102302011-08-14 Yao Qi <yao@codesourcery.com>
10231
10232 * target.h (struct target_ops): Fix indent.
10233 * win32-low.c (win32_target_ops): Fix comment.
10234
58dbd541
YQ
102352011-08-14 Andrew Jenner <andrew@codesourcery.com>
10236 Yao Qi <yao@codesourcery.com>
10237
10238 * Makefile.in (clean): Remove tic6x-*.c files.
10239 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10240 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10241 (tic6x-c64xp-linux.c): Likewise.
10242 * configure.srv: Add support for tic6x-*-uclinux.
10243 * linux-tic6x-low.c: New.
10244 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10245
78d85199
YQ
102462011-08-14 Andrew Stubbs <ams@codesourcery.com>
10247 Yao Qi <yao@codesourcery.com>
10248
10249 * target.h (struct target_ops): Add read_loadmap.
10250 * linux-low.c (struct target_loadseg): New type.
10251 (struct target_loadmap): New type.
10252 (linux_read_loadmap): New function.
10253 (linux_target_ops): Add linux_read_loadmap.
10254 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10255 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10256 to NULL.
78d85199 10257
a959a88d
EZ
102582011-08-05 Eli Zaretskii <eliz@gnu.org>
10259
10260 * win32-low.c: Include <stdint.h>.
10261
1ced966e
PA
102622011-07-22 Pedro Alves <pedro@codesourcery.com>
10263
10264 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10265 to the inferior here.
10266 (i386_remove_aligned_watchpoint): Ditto.
10267 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10268 fit part of the watchpoint in the debug registers.
10269 (i386_update_inferior_debug_regs): New.
10270 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10271 registers, and only update the inferior on success.
10272 (i386_low_remove_watchpoint): Ditto.
10273
d26e3629
KY
102742011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10275
10276 * linux-low.c (compare_ints, unique, list_threads, show_process,
10277 linux_core_of_thread): Delete.
10278 (linux_target_ops): Change linux_core_of_thread to
10279 linux_common_core_of_thread.
10280 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10281 * utils.c (malloc_failure): Change type of argument.
10282 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10283 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10284 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10285 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10286 (IPA_OBJS): Add common-utils-ipa.o.
10287 (ptid_h, linux_osdata_h): New macros.
10288 (server_h): Add common/common-utils.h, common/xml-utils.h,
10289 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10290 common/ptid.h.
10291 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10292 ptid.o, buffer.o): New rules.
10293 (linux-low.o): Add common/linux-osdata.h as a dependency.
10294 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10295 * configure.ac: Add AC_HEADER_DIRENT check.
10296 * config.in: Regenerate.
10297 * configure: Regenerate.
10298 * remote-utils.c (xml_escape_text): Delete.
10299 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10300 buffer_xml_printf): Move to common/buffer.c.
10301 * server.c (main): Remove call to initialize_inferiors.
10302 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10303 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10304 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10305 internal_error, gdb_assert, gdb_assert_fail): Delete.
10306 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10307 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10308 common/buffer.h.
10309 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10310 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10311 initialize_inferiors): Delete.
10312
2275a1a7
PA
103132011-07-20 Pedro Alves <pedro@codesourcery.com>
10314
10315 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10316 symbol error.
10317
0a5b1e09
PA
103182011-05-31 Pedro Alves <pedro@codesourcery.com>
10319
10320 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10321 assertion.
10322 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10323
6938fd34
YQ
103242011-05-26 Yao Qi <yao@codesourcery.com>
10325
10326 * Makefile.in (thread-db.o): Track dependence to
10327 common/gdb_thread_db.h.
10328 * thread-db.c: include gdb_thread_db.h from right place.
10329
b481f9e0
TT
103302011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10331
10332 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10333 __FILE__ and __LINE__ to internal_error.
10334
98a5dd13
DE
103352011-05-13 Doug Evans <dje@google.com>
10336
10337 * thread-db.c (try_thread_db_load_from_sdir): New function.
10338 (try_thread_db_load_from_dir): New function.
10339 (thread_db_load_search): Handle $sdir, ignore $pdir.
10340 Remove trying of system directories if search of
10341 libthread-db-search-path fails, that is now done via $sdir.
10342
d248b706
KY
103432011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10344
10345 * server.c (handle_query): Add EnableDisableTracepoints to the list
10346 of supported features.
43aaf8b6 10347 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10348 tracepoints.
43aaf8b6
PA
10349 (cmd_qtenable_disable): New.
10350 (cmd_qtstart): Install tracepoints even if disabled.
10351 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10352 receiving a QTEnable or QTDisable packet.
10353 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10354 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10355 tracepoints.
10356 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10357
84e578fb
DE
103582011-05-10 Doug Evans <dje@google.com>
10359
10360 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10361
71f55dd8
DE
103622011-05-04 Doug Evans <dje@google.com>
10363
10364 * linux-low.c (linux_join): Skip process lookup.
10365 * spu-low.c (spu_join): Ditto.
10366 * server.c (join_inferiors_callback): Delete.
10367 (process_serial_event): For 'D' packet (detach) call join_inferior
10368 directly.
10369
4d393d60
JM
103702011-05-04 Joseph Myers <joseph@codesourcery.com>
10371
10372 * README: Don't mention xscale*-*-linux*.
10373 * configure.srv (xscale*-*-linux*): Don't handle target.
10374
b00ad6ff
NF
103752011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10376
10377 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10378 casting pointers.
10379 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10380 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10381 (i386_emit_void_call_2): Likewise.
10382
af96c192
YQ
103832011-04-26 Yao Qi <yao@codesourcery.com>
10384
43aaf8b6
PA
10385 * linux-low.c: Move common macros to linux-ptrace.h.
10386 Include linux-ptrace.h.
af96c192
YQ
10387 * Makefile.in (linux_ptrace_h): New.
10388 (linux-low.o): Depends on linux-ptrace.h.
10389
03f2bd59
JK
103902011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10391
10392 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10393 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10394 (remote_prepare): New function with most of the TCP code from ...
10395 (remote_open): ... here. Detect PORT here unconditionally. Move also
10396 setting transport_is_reliable.
10397 * server.c (run_once): New variable.
10398 (gdbserver_usage): Document it.
10399 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10400 the first run if RUN_ONCE.
10401 * server.h (run_once, remote_prepare): New declarations.
10402
7a9dd1b2
TT
104032011-04-19 Tom Tromey <tromey@redhat.com>
10404
10405 * win32-low.c (handle_load_dll): Remove duplicate "the".
10406
81239425
PM
104072011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10408
10409 Remove support for old Cygwin 1.5 versions.
10410 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10411 function to avoid warning.
10412 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10413 warning.
10414
9e0627f1
PM
104152011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10416
10417 * gdbserver/server.h (Macro _): Define it if not available.
10418
588eebee
MS
104192011-03-14 Michael Snyder <msnyder@vmware.com>
10420
348af9f7 10421 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10422
43f70d4c
JB
104232011-03-10 Joel Brobecker <brobecker@adacore.com>
10424
10425 * Makefile.in (maintainer-clean realclean distclean): Remove
10426 "make ... subdir_do" command.
10427
348af9f7
MS
104282011-03-10 Michael Snyder <msnyder@vmware.com>
10429
10430 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10431
10432 * server.c (handle_v_run): Free alloced buffer on early return.
10433
e637a4f5
YQ
104342011-03-09 Yao Qi <yao@codesourcery.com>
10435
10436 Revert:
10437 2011-03-04 Yao Qi <yao@codesourcery.com>
10438
10439 * Makefile.in: Remove GNU make feature --directory.
10440
10441 2011-03-05 Yao Qi <yao@codesourcery.com>
10442
10443 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10444 (subdir_do): New make target. Copied from gdb/Makefile.
10445 (maintainer-clean, realclean, distclean, clean): Call corresponding
10446 make targets in common/Makefile.
10447
10448 2011-02-11 Yao Qi <yao@codesourcery.com>
10449
10450 * configure.ac: Call AC_PROG_RANLIB.
10451 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10452 * configure: Regenerate.
10453
e6edda56
JK
104542011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10455
10456 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10457
e5141119
JB
104582011-03-06 Yao Qi <yao@codesourcery.com>
10459
10460 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10461
64794aa4
JB
104622011-03-05 Yao Qi <yao@codesourcery.com>
10463
10464 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10465 (subdir_do): New make target. Copied from gdb/Makefile.
10466 (maintainer-clean, realclean, distclean, clean): Call corresponding
10467 make targets in common/Makefile.
10468
7a762829
YQ
104692011-03-04 Yao Qi <yao@codesourcery.com>
10470
10471 * Makefile.in: Remove GNU make feature --directory.
10472
348af9f7
MS
104732011-03-04 Michael Snyder <msnyder@vmware.com>
10474
10475 * server.c (queue_stop_reply): Call xmalloc not malloc.
10476
104772011-03-02 Michael Snyder <msnyder@vmware.com>
10478
10479 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10480
9f72fee2
MS
104812011-02-28 Michael Snyder <msnyder@vmware.com>
10482
588eebee
MS
10483 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10484 (cmd_qtframe): Ditto.
10485 (cmd_qtbuffer): Ditto.
10486 (cmd_bigqtbuffer): Ditto.
10487
9f72fee2
MS
10488 * utils.c (decimal2str): Initialize 'width' to nine, then
10489 don't mess with it.
10490
8040bd49
UW
104912011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10492
10493 * hostio.c (require_data): Free *data, not data.
10494
7e52cbd0
JK
104952011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10496
10497 * hostio.c (require_data): Use free, not xfree.
10498
9130f83e
MS
104992011-02-27 Michael Snyder <msnyder@vmware.com>
10500
4b812f4e
MS
10501 * server.c (handle_query): Discard unused value.
10502
9130f83e
MS
10503 * hostio.c (require_data): Free malloc memory before returning
10504 error.
10505
69d37113
MS
105062011-02-26 Michael Snyder <msnyder@vmware.com>
10507
10508 * linux-low.c (list_threads): Call closedir for dirent.
10509
35f5825a
MS
105102011-02-27 Michael Snyder <msnyder@vmware.com>
10511
2a589cef
MS
10512 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10513 a case statement falls through.
10514
0adea5f7
MS
10515 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10516
35f5825a
MS
10517 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10518 in comparison.
10519
238f1c74
MS
105202011-02-26 Michael Snyder <msnyder@vmware.com>
10521
10522 * utils.c (decimal2str): Eliminate dead code and dead param.
10523 (pulongest): Drop dead param from call to decimal2str.
10524 (plongest): Ditto.
10525
633ff500
JB
105262011-02-24 Joel Brobecker <brobecker@adacore.com>
10527
10528 Revert the following patch (not approved yet):
10529 2011-02-21 Hui Zhu <teawater@gmail.com>
10530 * tracepoint.c (tp_printf): New function.
10531 (eval_agent_expr): Handle gdb_agent_op_printf.
10532
f9c6ff72
HZ
105332011-02-21 Hui Zhu <teawater@gmail.com>
10534
10535 * tracepoint.c (tp_printf): New function.
10536 (eval_agent_expr): Handle gdb_agent_op_printf.
10537
94d5e490
TT
105382011-02-18 Tom Tromey <tromey@redhat.com>
10539
10540 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10541 (tracepoint.o): Likewise.
10542 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10543 (gdb_agent_op_names): Likewise.
10544
c7f96d2b
TT
105452011-02-18 Tom Tromey <tromey@redhat.com>
10546
10547 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10548 gdb_agent_op_rot>: New constants.
10549 (gdb_agent_op_names): Add pick and roll.
10550 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10551 cases.
10552
0feedb2c
JK
105532011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10554
10555 * aclocal.m4: Regenerated with aclocal-1.11.1.
10556
b3b9301e
PA
105572011-02-14 Pedro Alves <pedro@codesourcery.com>
10558
10559 * server.c (handle_qxfer_traceframe_info): New.
10560 (qxfer_packets): Register "traceframe-info".
10561 (handle_query): Report support for qXfer:traceframe-info:read+.
10562 * tracepoint.c (match_blocktype): New.
10563 (traceframe_find_block_type): Rename to ...
10564 (traceframe_walk_blocks): ... this. Add callback filter argument,
10565 and use it.
10566 (traceframe_find_block_type): New, reimplemented on top of
10567 traceframe_walk_blocks.
10568 (build_traceframe_info_xml): New.
10569 (traceframe_read_info): New.
10570 * server.h (traceframe_read_info): Declare.
10571
4f3e6fb7
YQ
105722011-02-11 Yao Qi <yao@codesourcery.com>
10573
10574 * configure.ac: Call AC_PROG_RANLIB.
10575 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10576 * configure: Regenerate.
10577
764880b7
PA
105782011-02-07 Pedro Alves <pedro@codesourcery.com>
10579
10580 * server.c (gdb_read_memory): Change return semantics to allow
10581 partial transfers.
10582 (handle_search_memory_1): Adjust.
10583 (process_serial_event) <'m' packet>: Handle partial transfers.
10584 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10585
1c79eb8a
PA
105862011-01-28 Pedro Alves <pedro@codesourcery.com>
10587
10588 * regcache.c (init_register_cache): Initialize
10589 regcache->register_status.
10590 (free_register_cache): Release regcache->register_status.
10591 (regcache_cpy): Copy register_status.
10592 (registers_to_string): Print 'x's for unavailable registers.
10593 (supply_register): Mark the register's status valid or
10594 unavailable, depending on whether a buffer was passed in or not.
10595 (supply_register_zeroed): New.
10596 (supply_regblock): Mark the registers' status valid or
10597 unavailable, depending on whether a buffer was passed in or not.
10598 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10599 (struct regcache): New `register_status' field.
10600 (supply_register_zeroed): Declare.
10601 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10602 supply_register_zeroed, rather than passing a NULL buffer to
10603 supply_register.
10604 * tracepoint.c (fetch_traceframe_registers): Update comment.
10605
85724a0e
PA
106062011-01-28 Pedro Alves <pedro@codesourcery.com>
10607
10608 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10609 buffer explicit.
10610
d08aafef
PA
106112011-01-25 Pedro Alves <pedro@codesourcery.com>
10612
10613 * server.h (decode_xfer_write): Change prototype.
10614 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10615 and don't extract the annex here.
10616 * server.c (decode_xfer_read): Remove `annex' parameter,
10617 and don't extract the annex here.
10618 (decode_xfer): New.
10619 (struct qxfer): New.
10620 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10621 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10622 (handle_qxfer_statictrace): New functions, abstracted out from
10623 handle_query, and made to use the struct qxfer interface.
10624 (handle_threads_qxfer_proper): Rename to ...
10625 (handle_qxfer_threads_proper): ... this.
10626 (handle_threads_qxfer): Rename to ...
10627 (handle_qxfer_threads): ... this. Adjust.
10628 (qxfer_packets): New array.
10629 (handle_qxfer): New function.
10630 (handle_query): Use handle_qxfer.
10631
493e2a69
MS
106322011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10633
10634 * gdbreplay.c: Shorten lines of >= 80 columns.
10635 * linux-low.c: Ditto.
10636 * linux-ppc-low.c: Ditto.
10637 * linux-s390-low.c: Ditto.
10638 * linux-sparc-low.c: Ditto.
10639 * linux-x86-low.c: Ditto.
10640 * linux-xtensa-low.c: Ditto.
10641 * mem-break.c: Ditto.
10642 * nto-low.c: Ditto.
10643 * regcache.h: Ditto.
10644 * remote-utils.c: Ditto.
10645 * server.c: Ditto.
10646 * server.h: Ditto.
10647 * thread-db.c: Ditto.
10648 * tracepoint.c: Ditto.
10649 * utils.c: Ditto.
10650 * win32-low.h: Ditto.
10651
44944448
JB
106522011-01-05 Joel Brobecker <brobecker@adacore.com>
10653
10654 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10655 update.
10656
71ce852c
JB
106572011-01-01 Joel Brobecker <brobecker@adacore.com>
10658
10659 * server.c (gdbserver_version): Update copyright year in version
10660 output.
10661 * gdbreplay.c (gdbreplay_version): Ditto.
10662
eb826dc6
MF
106632010-12-29 Jie Zhang <jie.zhang@analog.com>
10664
10665 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10666 * linux-bfin-low.c: New file.
10667 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10668 PT_DATA_ADDR for BFIN targets.
10669 * Makefile.in (SFILES): Add linux-bfin-low.c.
10670 (clean): Remove reg-bfin.c.
10671 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10672 * README: Mention supported Blackfin targets.
10673
39ab222a
MF
106742010-12-23 Mike Frysinger <vapier@gentoo.org>
10675
10676 * .gitignore: New file.
10677
a1f2ce7d
MF
106782010-11-16 Mike Frysinger <vapier@gentoo.org>
10679
10680 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10681
f474844c
JZ
106822010-10-22 Jie Zhang <jie@codesourcery.com>
10683
10684 * Makefile.in: Add FLAGS_TO_PASS variable.
10685 (install): Remove dependency of install-only and recursively
10686 invoke make for install-only.
10687
f1048712
DE
106882010-10-04 Doug Evans <dje@google.com>
10689
10690 * Makefile.in (uninstall): Use $(DESTDIR).
10691
b53a1623
PA
106922010-09-24 Pedro Alves <pedro@codesourcery.com>
10693
e6ee044d
PA
10694 PR gdb/11842
10695
b53a1623
PA
10696 * linux-x86-low.c (compat_siginfo_from_siginfo)
10697 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10698 si_code is < 0. Check for si_code == SI_TIMER before checking for
10699 si_code < 0.
10700
fa1bd1e4
JB
107012010-09-13 Joel Brobecker <brobecker@adacore.com>
10702
10703 * lynx-i386-low.c: New file.
10704 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10705
47fac8f8
JB
107062010-09-13 Joel Brobecker <brobecker@adacore.com>
10707
10708 * lynx-low.c (ptrace_request_to_str): Remove handling for
10709 request values that have been removed in LynxOS 5.x.
10710
1adfc54d
JB
107112010-09-13 Joel Brobecker <brobecker@adacore.com>
10712
10713 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10714 <ptrace.h>
10715
c2a66c29
NS
107162010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10717
10718 * configure.ac: Add --enable-inprocess-agent option.
10719 * configure: Rebuilt.
10720
32fcada3
YQ
107212010-09-06 Yao Qi <yao@codesourcery.com>
10722
10723 * linux-low.c (linux_kill): Remove unused variable.
10724 (linux_stabilize_threads): Likewise.
10725 * server.c (start_inferior): Likewise.
10726 (queue_stop_reply_callback): Likewise.
10727 * tracepoint.c (do_action_at_tracepoint): Likewise.
10728
0cccb683
YQ
107292010-09-06 Yao Qi <yao@codesourcery.com>
10730
10731 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10732 on return.
10733
423ec54c
JK
107342010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10735
10736 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10737
12ac6819
PA
107382010-09-06 Pedro Alves <pedro@codesourcery.com>
10739
10740 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10741 "$(IPA_DEPFILES)".
10742
8ed54b31
JB
107432010-09-01 Joel Brobecker <brobecker@adacore.com>
10744
10745 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10746 gdbserver/lynx-ppc-low.c: New files.
10747 * Makefile.in (lynx_low_h): New variable.
10748 (lynx-low.o, lynx-ppc-low.o): New rules.
10749 * configure.ac: On LynxOS, link with -lnetinet.
10750 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10751 * configure: regenerate.
10752
bb0116a4
JB
107532010-09-01 Joel Brobecker <brobecker@adacore.com>
10754
10755 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10756 * configure.ac: Add check for vasprintf and vsnprintf.
10757 * configure, config.in: Regenerate.
10758 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10759
a778ab81 107602010-09-01 Joel Brobecker <brobecker@adacore.com>
10761
10762 * gdbreplay.c: Move include of alloca.h up, next to include of
10763 malloc.h.
10764 * server.h: Add include of malloc.h.
10765 * mem-break.c: Remove include of malloc.h.
10766 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10767
8b034a19 107682010-09-01 Joel Brobecker <brobecker@adacore.com>
10769
10770 * Makefile.in (memmem.o): Build with -Wno-error.
10771
107722010-09-01 Joel Brobecker <brobecker@adacore.com>
10773
10774 * utils.c (xsnprintf): Make non-static.
10775 * server.h: Add xsnprintf declaration.
10776 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10777 replace calls to snprintf by calls to xsnprintf throughout.
10778
107792010-09-01 Joel Brobecker <brobecker@adacore.com>
10780
10781 * configure.ac: Add configure check for alloca.
10782 * configure, config.in: Regenerate.
10783 * server.h: Include alloca.h if it exists.
10784 * gdbreplay.c: Include alloca.h if it exists.
10785
1a981360
PA
107862010-08-28 Pedro Alves <pedro@codesourcery.com>
10787
10788 * linux-low.c (__SIGRTMIN): Define if not already defined.
10789 (linux_create_inferior): Check for __ANDROID__ rather than
10790 __SIGRTMIN.
10791 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10792 are already deferred.
10793 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10794 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10795 stopped and already has a pending signal to report.
10796 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10797 a pending signal to report or is moving out of a jump pad.
10798 (linux_init_signals): Check for __ANDROID__ rather than
10799 __SIGRTMIN.
10800
b4d51a55
PA
108012010-08-28 Pedro Alves <pedro@codesourcery.com>
10802
10803 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10804 debug_threads check. Avoid a linear search when not doing debug
10805 output.
10806
ec48365d
PA
108072010-08-27 Pedro Alves <pedro@codesourcery.com>
10808
10809 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10810 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10811 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10812 (process_event): Change local fd's type to gdb_fildes_t.
10813 (create_file_handler): Adjust prototype.
10814 (delete_file_handler): Adjust prototype.
10815 (handle_file_event): Adjust prototype. Use pfildes.
10816 (create_file_event): Adjsut prototype.
10817 * remote-utils.c (remote_desc, listen_desc): Change type to
10818 gdb_fildes_t.
10819 * server.h: New gdb_fildes_t typedef.
10820 [USE_WIN32API]: Include winsock2.h.
10821 (delete_file_handler, add_file_handler): Adjust prototypes.
10822 (pfildes): Declare.
10823 * utils.c (pfildes): New.
10824
854d88f0
PA
108252010-08-27 Pedro Alves <pedro@codesourcery.com>
10826
10827 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10828 * configure: Regenerate.
10829
0146f85b
PA
108302010-08-27 Pedro Alves <pedro@codesourcery.com>
10831
10832 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10833 (linux_done_accessing_memory): ... this.
10834 (linux_target_ops): Adjust.
10835 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10836 * nto-low.c (nto_target_ops): Adjust comment.
10837 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10838 * spu-low.c (spu_target_ops): Adjust comment.
10839 * target.h (target_ops): Rename unprepare_to_access_memory field
10840 to done_accessing_memory.
10841 (unprepare_to_access_memory): Rename to ...
10842 (done_accessing_memory): ... this.
10843
90d74c30
PA
108442010-08-26 Pedro Alves <pedro@codesourcery.com>
10845
10846 * linux-low.c (linux_prepare_to_access_memory): New.
10847 (linux_unprepare_to_access_memory): New.
10848 (linux_target_ops): Install them.
10849 * server.c (read_memory): Rename to ...
10850 (gdb_read_memory): ... this. Use
10851 prepare_to_access_memory/prepare_to_access_memory.
10852 (write_memory): Rename to ...
10853 (gdb_write_memory): ... this. Use
10854 prepare_to_access_memory/prepare_to_access_memory.
10855 (handle_search_memory_1): Adjust.
10856 (process_serial_event): Adjust.
10857 * target.h (struct target_ops): New fields
10858 prepare_to_access_memory and unprepare_to_access_memory.
10859 (prepare_to_access_memory, unprepare_to_access_memory): New.
10860 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10861 prepare_to_access_memory/prepare_to_access_memory.
10862 * nto-low.c (nto_target_ops): Adjust.
10863 * spu-low.c (spu_target_ops): Adjust.
10864 * win32-low.c (win32_target_ops): Adjust.
10865
fd467969
PA
108662010-08-26 Pedro Alves <pedro@codesourcery.com>
10867
10868 * Makefile.in (WARN_CFLAGS): Get it from configure.
10869 (WERROR_CFLAGS): New.
10870 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10871 * configure.ac: Introduce --enable-werror, which adds -Werror to
10872 the compiler command line. Enabled by default. Disable with
10873 --disable-werror. Add -Wdeclaration-after-statement
10874 Wpointer-arith and -Wformat-nonliteral to warning flags.
10875 * configure: Regenerate.
10876
331e2f5f
PA
108772010-08-26 Pedro Alves <pedro@codesourcery.com>
10878
10879 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10880
e581f2b4
PA
108812010-08-26 Pedro Alves <pedro@codesourcery.com>
10882
10883 * gdbreplay.c (remote_error): New.
10884 (gdbchar): New.
10885 (expect): Use gdbchar. Check for error reading from GDB.
10886 Clarify sync error output.
10887 (play): Check for errors writing to GDB.
10888 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10889 * remote-utils.c (getpkt): Check for errors writing to the remote
10890 descriptor.
10891
3c11dd79
PA
108922010-08-25 Pedro Alves <pedro@codesourcery.com>
10893
10894 * linux-low.c (linux_wait_1): Move non-debugging code out of
10895 `debug_threads' control.
10896
d20a8ad9
PA
108972010-08-25 Pedro Alves <pedro@codesourcery.com>
10898
10899 * linux-low.c (linux_wait_1): Don't set last_status here.
10900 * server.c (push_event, queue_stop_reply_callback): Assert we're
10901 not pushing a TARGET_WAITKIND_IGNORE event.
10902 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10903 (myresume, handle_target_event): Set the thread's last_resume_kind
10904 and last_status from the target returned status.
10905
964e4306
PA
109062010-08-25 Pedro Alves <pedro@codesourcery.com>
10907
10908 PR threads/10729
10909
10910 * linux-x86-low.c (update_debug_registers_callback): New.
10911 (i386_dr_low_set_addr): Use it.
10912 (i386_dr_low_get_addr): New.
10913 (i386_dr_low_set_control): Use update_debug_registers_callback.
10914 (i386_dr_low_get_control): New.
10915 (i386_dr_low_get_status): Adjust.
10916 * linux-low.c (linux_stop_lwp): New.
10917 * linux-low.h (linux_stop_lwp): Declare.
10918
10919 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10920 argument instead of a i386_debug_reg_state.
10921 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10922 a i386_debug_reg_state.
10923 (i386_insert_aligned_watchpoint): Adjust.
10924 (i386_remove_aligned_watchpoint): Adjust.
10925 (i386_low_stopped_data_address): Read the debug registers from the
10926 inferior instead of from the mirrors.
10927 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10928 (i386_dr_low_get_addr): Declare.
10929 (i386_dr_low_get_control): Declare.
10930 (i386_dr_low_get_status): Change prototype.
10931
10932 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10933 (i386_dr_low_get_addr): New.
10934 (i386_dr_low_get_control): New.
10935 (i386_dr_low_get_status): Adjust prototype. Return
10936 dr_status_mirror.
10937 (i386_initial_stuff): Clear dr_status_mirror and
10938 dr_control_mirror.
10939 (i386_get_thread_context): Adjust.
10940 (i386_set_thread_context): Adjust.
10941 (i386_thread_added): Adjust.
10942
5f21a75b
PA
109432010-08-24 Pedro Alves <pedro@codesourcery.com>
10944
10945 * linux-low.h (linux_thread_area): Delete declaration.
10946
3e4c1235
TS
109472010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10948
10949 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10950 after its termination.
10951
1971b033
PA
109522010-08-09 Pedro Alves <pedro@codesourcery.com>
10953
10954 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10955 (gdb_wants_all_stopped): Delete.
10956 (linux_wait_1): Don't call them.
10957 * server.c (handle_v_cont): Tag all threads as want-stopped.
10958 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10959 stopped as "client-wants-stopped".
10960
310444ac
PA
109612010-07-31 Pedro Alves <pedro@codesourcery.com>
10962
10963 * Makefile.in (signals_h): New.
10964 (server_h): Depend on it.
10965 (server.o): Don't depend on $(signals_def).
10966 (signals.o): Depend on $(signals_def).
10967
a19cae16
JK
109682010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10969
10970 * Makefile.in (signals_def): New.
10971 (server_h): Append include/gdb/signals.h and signals_def.
10972 (server.o): Append signals_def.
10973
30d50328
JK
109742010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10975
10976 * server.c (handle_target_event): Use target_signal_to_host for
10977 resume_info.sig initialization.
10978 * target.h (struct thread_resume) <sig>: New comment.
10979
5c3216e2
OS
109802010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10981
c6f46ca0
OS
10982 * server.c (handle_query): strcpy() the returned string from paddress()
10983 instead of sprintf().
5c3216e2
OS
10984 * utils.c (paddress): Return phex_nz().
10985
6bd31874
JB
109862010-07-07 Joel Brobecker <brobecker@adacore.com>
10987
10988 * server.c (handle_v_cont): Call mourn_inferior if process
10989 just exited.
10990 (myresume): Likewise.
10991
0fb4aa4b
PA
109922010-07-01 Pedro Alves <pedro@codesourcery.com>
10993
10994 Static tracepoints, and integration with UST.
10995
10996 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10997 * mem-break.c (uninsert_all_breakpoints)
10998 (reinsert_all_breakpoints): New.
10999 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11000 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11001 (gdb_agent_ust_loaded, helper_thread_id)
11002 (gdb_agent_helper_thread_id): New macros.
11003 (struct ipa_sym_addresses): Add addr_ust_loaded,
11004 addr_helper_thread_id, addr_cmd_buf.
11005 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11006 (in_process_agent_loaded_ust): New.
11007 (write_e_ust_not_loaded): New.
11008 (maybe_write_ipa_ust_not_loaded): New.
11009 (struct collect_static_trace_data_action): New.
11010 (enum tracepoint_type) <static_tracepoint>: New.
11011 (struct tracepoint) <handle>: Mention static tracepoints.
11012 (struct static_tracepoint_ctx): New.
11013 (CMD_BUF_SIZE): New.
11014 (add_tracepoint_action): Handle static tracepoint actions.
11015 (unprobe_marker_at): New.
11016 (clear_installed_tracepoints): Handle static tracepoints.
11017 (cmd_qtdp): Handle static tracepoints.
11018 (probe_marker_at): New.
11019 (cmd_qtstart): Handle static tracepoints.
11020 (response_tracepoint): Handle static tracepoints.
11021 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11022 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11023 (get_context_regcache): Handle static tracepoints.
11024 (do_action_at_tracepoint): Handle static tracepoint actions.
11025 (traceframe_find_block_type): Handle static trace data blocks.
11026 (traceframe_read_sdata): New.
11027 (download_tracepoints): Download static tracepoint actions.
11028 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11029 (GDB_PROBE_NAME): New.
11030 (ust_ops): New.
11031 (GET_UST_SYM): New.
11032 (USTF): New.
11033 (dlsym_ust): New.
11034 (ust_marker_to_static_tracepoint): New.
11035 (gdb_probe): New.
11036 (collect_ust_data_at_tracepoint): New.
11037 (gdb_ust_probe): New.
11038 (UNIX_PATH_MAX, SOCK_DIR): New.
11039 (gdb_ust_connect_sync_socket): New.
11040 (resume_thread, stop_thread): New.
11041 (run_inferior_command): New.
11042 (init_named_socket): New.
11043 (gdb_ust_socket_init): New.
11044 (cstr_to_hexstr): New.
11045 (next_st): New.
11046 (first_marker, next_marker): New.
11047 (response_ust_marker): New.
11048 (cmd_qtfstm, cmd_qtsstm): New.
11049 (unprobe_marker_at, probe_marker_at): New.
11050 (cmd_qtstmat, gdb_ust_thread): New.
11051 (gdb_ust_init): New.
11052 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11053 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11054 (ST_REGENTRY): New.
11055 (x86_64_st_collect_regmap): New.
11056 (X86_64_NUM_ST_COLLECT_GREGS): New.
11057 (AMD64_RIP_REGNUM): New.
11058 (supply_static_tracepoint_registers): New.
11059 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11060 (ST_REGENTRY): New.
11061 (i386_st_collect_regmap): New.
11062 (i386_NUM_ST_COLLECT_GREGS): New.
11063 (supply_static_tracepoint_registers): New.
11064 * server.c (handle_query): Handle qXfer:statictrace:read.
11065 <qSupported>: Report support for StaticTracepoints, and
11066 qXfer:statictrace:read features.
11067 * server.h (traceframe_read_sdata)
11068 (supply_static_tracepoint_registers): Declare.
11069 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11070 (unpack_varlen_hex): Include in IPA build.
11071 * Makefile.in (ustlibs, ustinc): New.
11072 (IPA_OBJS): Add remote-utils-ipa.o.
11073 ($(IPA_LIB)): Link -ldl and -lpthread.
11074 (UST_CFLAGS): New.
11075 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11076 * config.in, configure: Regenerate.
11077
9e4344e5
PA
110782010-06-20 Ian Lance Taylor <iant@google.com>
11079 Pedro Alves <pedro@codesourcery.com>
11080
11081 * linux-x86-low.c (always_true): Delete.
11082 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11083 trying to fool the compiler with always_true.
11084
c6beb2cb
PA
110852010-06-20 Pedro Alves <pedro@codesourcery.com>
11086
11087 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11088 conditions in gdbserver.
11089
d2ed6730
UW
110902010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11091
11092 * spu-low.c (spu_read_memory): Wrap around local store limit.
11093 (spu_write_memory): Likewise.
11094
4e29fb54
PA
110952010-06-15 Pedro Alves <pedro@codesourcery.com>
11096
11097 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11098 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11099 LONGEST uses.
11100 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11101 uses.
11102 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11103 uses with LONGEST uses.
11104
6a271cae
PA
111052010-06-14 Stan Shebs <stan@codesourcery.com>
11106 Pedro Alves <pedro@codesourcery.com>
11107
11108 Bytecode compiler.
11109
11110 * linux-x86-low.c: Include limits.h.
11111 (add_insns): New.
11112 (always_true): New.
11113 (EMIT_ASM): New.
11114 (EMIT_ASM32): New.
11115 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11116 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11117 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11118 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11119 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11120 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11121 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11122 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11123 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11124 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11125 (amd64_emit_void_call_2): New.
11126 (amd64_emit_ops): New.
11127 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11128 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11129 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11130 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11131 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11132 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11133 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11134 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11135 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11136 (i386_emit_stack_adjust, i386_emit_int_call_1)
11137 (i386_emit_void_call_2): New.
11138 (i386_emit_ops): New.
11139 (x86_emit_ops): New.
11140 (the_low_target): Install x86_emit_ops.
11141 * server.h (struct emit_ops): New.
11142 (get_raw_reg_func_addr): Declare.
11143 (current_insn_ptr, emit_error): Declare.
11144 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11145 (set_trace_state_variable_value): New defines.
11146 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11147 addr_get_trace_state_variable_value and
11148 addr_set_trace_state_variable_value.
11149 (symbol_list): New fields for get_raw_reg,
11150 get_trace_state_variable_value and set_trace_state_variable_value.
11151 (condfn): New typedef.
11152 (struct tracepoint): New field `compiled_cond'.
11153 (do_action_at_tracepoint): Clear compiled_cond.
11154 (get_trace_state_variable_value, set_trace_state_variable_value):
11155 Export in the IPA.
11156 (condition_true_at_tracepoint): If there's a compiled condition,
11157 run that.
11158 (current_insn_ptr, emit_error): New globals.
11159 (struct bytecode_address): New.
11160 (get_raw_reg_func_addr): New.
11161 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11162 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11163 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11164 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11165 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11166 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11167 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11168 (compile_tracepoint_condition, compile_bytecodes): New.
11169 * target.h (emit_ops): Forward declare.
11170 (struct target_ops): New field emit_ops.
11171 (target_emit_ops): New.
11172 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11173 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11174 * linux-low.c (linux_emit_ops): New.
11175 (linux_target_ops): Install it.
11176 * linux-low.h (struct linux_target_ops): New field emit_ops.
11177
92b72907
UW
111782010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11179
11180 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11181 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11182
fa593d66
PA
111832010-06-01 Pedro Alves <pedro@codesourcery.com>
11184 Stan Shebs <stan@codesourcery.com>
11185
11186 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11187 (all): Depend on $(extra_libraries).
11188 (install-only): Install the IPA.
11189 (IPA_OBJS, IPA_LIB): New.
11190 (clean): Remove the IPA lib.
11191 (IPAGENT_CFLAGS): New.
11192 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11193 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11194 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11195 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11196 * configure.ac: Check for atomic builtins support in the compiler.
11197 (IPA_DEPFILES, extra_libraries): Define.
11198 * configure.srv (ipa_obj): Add description.
11199 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11200 (i[34567]86-*-linux*): Set ipa_obj.
11201 (x86_64-*-linux*): Set ipa_obj.
11202 * linux-low.c (stabilizing_threads): New.
11203 (supports_fast_tracepoints): New.
11204 (linux_detach): Stabilize threads before detaching.
11205 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11206 the lwp is either not stabilizing, or is moving out of a jump pad.
11207 (linux_fast_tracepoint_collecting): New.
11208 (maybe_move_out_of_jump_pad): New.
11209 (enqueue_one_deferred_signal): New.
11210 (dequeue_one_deferred_signal): New.
11211 (linux_wait_for_event_1): If moving out of a jump pad, defer
11212 pending signals to later.
11213 (linux_stabilize_threads): New.
11214 (linux_wait_1): Check if threads need moving out of jump pads, and
11215 do it if so.
11216 (stuck_in_jump_pad_callback): New.
11217 (move_out_of_jump_pad_callback): New.
11218 (lwp_running): New.
11219 (linux_resume_one_lwp): Handle moving out of jump pads.
11220 (linux_set_resume_request): Dequeue deferred signals.
11221 (need_step_over_p): Also step over fast tracepoint jumps.
11222 (start_step_over): Also uninsert fast tracepoint jumps.
11223 (finish_step_over): Also reinsert fast tracepoint jumps.
11224 (linux_install_fast_tracepoint_jump): New.
11225 (linux_target_ops): Install linux_stabilize_threads and
11226 linux_install_fast_tracepoint_jump_pad.
11227 * linux-low.h (linux_target_ops) <get_thread_area,
11228 install_fast_tracepoint_jump_pad>: New fields.
11229 (struct lwp_info) <collecting_fast_tracepoint,
11230 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11231 (linux_get_thread_area): Declare.
11232 * linux-x86-low.c (jump_insn): New.
11233 (x86_get_thread_area): New.
11234 (append_insns): New.
11235 (push_opcode): New.
11236 (amd64_install_fast_tracepoint_jump_pad): New.
11237 (i386_install_fast_tracepoint_jump_pad): New.
11238 (x86_install_fast_tracepoint_jump_pad): New.
11239 (the_low_target): Install x86_get_thread_area and
11240 x86_install_fast_tracepoint_jump_pad.
11241 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11242 (struct fast_tracepoint_jump): New.
11243 (fast_tracepoint_jump_insn): New.
11244 (fast_tracepoint_jump_shadow): New.
11245 (find_fast_tracepoint_jump_at): New.
11246 (fast_tracepoint_jump_here): New.
11247 (delete_fast_tracepoint_jump): New.
11248 (set_fast_tracepoint_jump): New.
11249 (uninsert_fast_tracepoint_jumps_at): New.
11250 (reinsert_fast_tracepoint_jumps_at): New.
11251 (set_breakpoint_at): Use write_inferior_memory.
11252 (uninsert_raw_breakpoint): Use write_inferior_memory.
11253 (check_mem_read): Mask out fast tracepoint jumps.
11254 (check_mem_write): Mask out fast tracepoint jumps.
11255 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11256 (set_fast_tracepoint_jump): Declare.
11257 (delete_fast_tracepoint_jump)
11258 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11259 (reinsert_fast_tracepoint_jumps_at): Declare.
11260 * regcache.c: Don't compile many functions when building the
11261 in-process agent library.
11262 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11263 the register buffer in the heap.
11264 (free_register_cache): If the register buffer isn't owned by the
11265 regcache, don't free it.
11266 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11267 pre-existing register caches.
11268 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11269 type.
11270 (convert_ascii_to_int): : Constify `from' parameter type.
11271 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11272 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11273 the needed buffer in-place.
11274 (relocate_instruction): New.
11275 * server.c (handle_query) <qSymbols>: If the target supports
11276 tracepoints, give it a chance of looking up symbols. Report
11277 support for fast tracepoints.
11278 (handle_status): Stabilize threads.
11279 (process_serial_event): Adjust.
11280 * server.h (struct fast_tracepoint_jump): Forward declare.
11281 (struct process_info) <fast_tracepoint_jumps>: New field.
11282 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11283 (decode_X_packet, decode_M_packet): Adjust.
11284 (relocate_instruction): Declare.
11285 (in_process_agent_loaded): Declare.
11286 (tracepoint_look_up_symbols): Declare.
11287 (struct fast_tpoint_collect_status): Declare.
11288 (fast_tracepoint_collecting): Declare.
11289 (force_unlock_trace_buffer): Declare.
11290 (handle_tracepoint_bkpts): Declare.
11291 (initialize_low_tracepoint)
11292 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11293 * target.h (struct target_ops) <stabilize_threads,
11294 install_fast_tracepoint_jump_pad>: New fields.
11295 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11296 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11297 [HAVE_STDINT_H]: Include stdint.h.
11298 (trace_debug_1): Rename to ...
11299 (trace_vdebug): ... this.
11300 (trace_debug): Rename to ...
11301 (trace_debug_1): ... this. Add `level' parameter.
11302 (trace_debug): New.
11303 (ATTR_USED, ATTR_NOINLINE): New.
11304 (IP_AGENT_EXPORT): New.
11305 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11306 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11307 (about_to_request_buffer_space, trace_buffer_is_full)
11308 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11309 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11310 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11311 (traceframe_write_count, traceframes_created)
11312 (trace_state_variables)
11313 New renaming defines.
11314 (struct ipa_sym_addresses): New.
11315 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11316 (symbol_list): New.
11317 (ipa_sym_addrs): New.
11318 (all_tracepoint_symbols_looked_up): New.
11319 (in_process_agent_loaded): New.
11320 (write_e_ipa_not_loaded): New.
11321 (maybe_write_ipa_not_loaded): New.
11322 (tracepoint_look_up_symbols): New.
11323 (debug_threads) [IN_PROCESS_AGENT]: New.
11324 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11325 (UNKNOWN_SIDE_EFFECTS): New.
11326 (stop_tracing): New.
11327 (flush_trace_buffer): New.
11328 (stop_tracing_bkpt): New.
11329 (flush_trace_buffer_bkpt): New.
11330 (read_inferior_integer): New.
11331 (read_inferior_uinteger): New.
11332 (read_inferior_data_pointer): New.
11333 (write_inferior_data_pointer): New.
11334 (write_inferior_integer): New.
11335 (write_inferior_uinteger): New.
11336 (struct collect_static_trace_data_action): Delete.
11337 (enum tracepoint_type): New.
11338 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11339 <actions_str, step_actions, step_actions_str>: Only include in
11340 GDBserver.
fa593d66
PA
11341 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11342 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11343 (tracepoints): Use IP_AGENT_EXPORT.
11344 (last_tracepoint): Don't include in the IPA.
11345 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11346 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11347 (alloced_trace_state_variables): New.
11348 (trace_state_variables): Use IP_AGENT_EXPORT.
11349 (traceframe_t): Delete unused variable.
11350 (circular_trace_buffer): Don't include in the IPA.
11351 (trace_buffer_start): Delete.
11352 (struct trace_buffer_control): New.
11353 (trace_buffer_free): Delete.
11354 (struct ipa_trace_buffer_control): New.
11355 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11356 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11357 New.
11358 (trace_buffer_ctrl): New.
11359 (TRACE_BUFFER_CTRL_CURR): New.
11360 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11361 Reimplement as macros.
11362 (trace_buffer_wrap): Delete.
11363 (traceframe_write_count, traceframe_read_count)
11364 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11365 (struct tracepoint_hit_ctx) <type>: New field.
11366 (struct fast_tracepoint_ctx): New.
11367 (memory_barrier): New.
11368 (cmpxchg): New.
11369 (record_tracepoint_error): Update atomically in the IPA.
11370 (clear_inferior_trace_buffer): New.
11371 (about_to_request_buffer_space): New.
11372 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11373 updating the same buffer.
11374 (add_tracepoint): Default the tracepoint's type to trap
11375 tracepoint, and orig_size to -1.
11376 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11377 internal variables.
11378 (create_trace_state_variable): New parameter `gdb'. Handle it.
11379 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11380 (cmd_qtdp): Handle fast tracepoints.
11381 (cmd_qtdv): Adjust.
11382 (max_jump_pad_size): New.
11383 (gdb_jump_pad_head): New.
11384 (get_jump_space_head): New.
11385 (claim_jump_space): New.
11386 (sort_tracepoints): New.
11387 (MAX_JUMP_SIZE): New.
11388 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11389 IPA.
11390 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11391 support. Upload fast traceframes, and delete internal IPA
11392 breakpoints.
11393 (stop_tracing_handler): New.
11394 (flush_trace_buffer_handler): New.
11395 (cmd_qtstop): Upload fast tracepoints.
11396 (response_tracepoint): Handle fast tracepoints.
11397 (tracepoint_finished_step): Upload fast traceframes. Set the
11398 tracepoint hit context's tracepoint type.
11399 (handle_tracepoint_bkpts): New.
11400 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11401 type. Add comment about fast tracepoints.
11402 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11403 non-existing action_str field.
11404 (get_context_regcache): Handle fast tracepoints.
11405 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11406 to the regcache.
11407 (fast_tracepoint_from_jump_pad_address): New.
11408 (fast_tracepoint_from_ipa_tpoint_address): New.
11409 (collecting_t): New.
11410 (force_unlock_trace_buffer): New.
11411 (fast_tracepoint_collecting): New.
11412 (collecting): New.
11413 (gdb_collect): New.
11414 (write_inferior_data_ptr): New.
11415 (target_tp_heap): New.
11416 (target_malloc): New.
11417 (download_agent_expr): New.
11418 (UALIGN): New.
11419 (download_tracepoints): New.
11420 (download_trace_state_variables): New.
11421 (upload_fast_traceframes): New.
11422 (IPA_FIRST_TRACEFRAME): New.
11423 (IPA_NEXT_TRACEFRAME_1): New.
11424 (IPA_NEXT_TRACEFRAME): New.
11425 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11426 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11427 (gdb_jump_pad_buffer_end): New.
11428 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11429 (initialize_tracepoint): Adjust.
11430 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11431 buffer. Initialize the low module.
11432 * utils.c (PREFIX, TOOLNAME): New.
11433 (malloc_failure): Use PREFIX.
11434 (error): In the IPA, an error causes an exit.
11435 (fatal, warning): Use PREFIX.
11436 (internal_error): Use TOOLNAME.
11437 (NUMCELLS): Increase to 10.
11438 * configure, config.in: Regenerate.
11439
d149dd1d
PA
114402010-06-01 Pedro Alves <pedro@codesourcery.com>
11441
11442 * server.c (handle_query) <qSupported>: Do two passes over the
11443 qSupported string to avoid nesting strtok.
11444
f6528abd
JK
114452010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11446
11447 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11448 (CDEPS): New.
11449 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11450 -Wl,--dynamic-list.
11451 * configure: Regenerate.
11452 * proc-service.list: New.
11453
ca2a87a0
JK
114542010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11455
11456 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11457 New comment.
11458
363a6e9f
OS
114592010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11460
11461 * gdbreplay.c (remote_open): Check error return from socket() call by
11462 its equality to -1 not by it being negative.
11463 * remote-utils.c (remote_open): Likewise.
11464
d23b6cb1
PA
114652010-05-23 Pedro Alves <pedro@codesourcery.com>
11466
11467 * config.h: Regenerate.
11468
28d3cf85
MK
114692010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11470
11471 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11472 doesn't provide PTRACE_GET_THREAD_AREA.
11473
fea36a59
MK
114742010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11475
11476 * linux-m68k-low.c: Include <asm/ptrace.h>
11477 (ps_get_thread_area): Implement.
11478
24b066ba
DE
114792010-05-03 Doug Evans <dje@google.com>
11480
11481 * event-loop.c (struct callback_event): New struct.
11482 (callback_list): New global.
11483 (append_callback_event, delete_callback_event): New functions.
11484 (process_callback): New function.
11485 (start_event_loop): Call it.
11486 * remote-utils.c (NOT_SCHEDULED): Define.
11487 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11488 moved out of readchar.
11489 (readchar): Rewrite. Call reschedule before returning.
11490 (reset_readchar): New function.
11491 (remote_close): Call it.
11492 (process_remaining, reschedule): New functions.
11493 * server.h (callback_handler_func): New typedef.
11494 (append_callback_event, delete_callback_event): Declare.
11495
9836d6ea
PA
114962010-05-03 Pedro Alves <pedro@codesourcery.com>
11497
11498 * proc-service.c (ps_pglobal_lookup): Use
11499 thread_db_look_up_one_symbol.
11500 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11501 parameter. Use it instead of all_symbols_looked_up.
11502 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11503 field.
11504 (all_symbols_looked_up): Don't declare.
11505 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11506 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11507 field.
11508 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11509 Set all_symbols_looked_up here.
11510 (thread_db_look_up_one_symbol): New.
11511 (thread_db_get_tls_address): Adjust.
11512 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11513 thread_db object on the heap, and tentatively set it in the
11514 process structure.
11515 (thread_db_init): Don't set all_symbols_looked_up here.
11516 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11517
7984d532
PA
115182010-05-03 Pedro Alves <pedro@codesourcery.com>
11519
11520 * linux-low.c (linux_kill, linux_detach): Adjust.
11521 (status_pending_p_callback): Remove redundant statement. Check
11522 for !TARGET_WAITIKIND_IGNORE, instead of
11523 TARGET_WAITKIND_STOPPED.
11524 (handle_tracepoints): Make sure LWP is locked. Adjust.
11525 (linux_wait_for_event_1): Adjust.
11526 (linux_cancel_breakpoints): New.
11527 (unsuspend_one_lwp): New.
11528 (unsuspend_all_lwps): New.
11529 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11530 (send_sigstop_callback): Change return type to int, add new
11531 `except' parameter and handle it.
11532 (suspend_and_send_sigstop_callback): New.
11533 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11534 pass them down. If SUSPEND, also increment the lwp's suspend
11535 count.
11536 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11537 (need_step_over_p): Don't consider suspended LWPs.
11538 (start_step_over): Adjust.
11539 (proceed_one_lwp): Change return type to int, add new `except'
11540 parameter and handle it.
11541 (unsuspend_and_proceed_one_lwp): New.
11542 (proceed_all_lwps): Use find_inferior instead of
11543 for_each_inferior.
11544 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11545 also decrement the suspend count of LWPs. Pass `except' down,
11546 instead of hacking its suspend count.
11547 (linux_pause_all): Add `freeze' parameter. Adjust.
11548 (linux_unpause_all): New.
11549 (linux_target_ops): Install linux_unpause_all.
11550 * server.c (handle_status): Adjust.
11551 * target.h (struct target_ops): New fields `unpause_all' and
11552 `cancel_breakpoints'. Add new parameter to `pause_all'.
11553 (pause_all): Add new `freeze' parameter.
11554 (unpause_all): New.
11555 (cancel_breakpoints): New.
11556 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11557 cancel breakpoints.
11558 (cmd_qtstart): Pause threads.
11559 (stop_tracing): Pause threads, and cancel breakpoints.
11560 * win32-low.c (win32_target_ops): Adjust.
11561
e471f25b
PA
115622010-05-03 Pedro Alves <pedro@codesourcery.com>
11563
11564 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11565 the inferior right away from here...
11566 (linux_wait_1): ... to here, and adjust to check the thread's
11567 last_resume_kind instead of the lwp's step or stop_expected flags.
11568
1915ef4f
PA
115692010-05-02 Pedro Alves <pedro@codesourcery.com>
11570
11571 * README: Use consistent `GDB' and `GDBserver' spellings.
11572
f9e39928
PA
115732010-05-02 Pedro Alves <pedro@codesourcery.com>
11574
11575 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11576 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11577 (linux_detach_one_lwp): Assume the lwp is stopped.
11578 (any_thread_of): Delete.
11579 (linux_detach): Stop all lwps here. Don't blindly delete all
11580 breakpoints.
11581 (delete_lwp_callback): New.
11582 (linux_mourn): Delete all lwps of the process that is gone.
11583 (linux_wait_1): Don't delete the last lwp of the process here.
11584 * mem-break.h (mark_breakpoints_out): Declare.
11585 * mem-break.c (mark_breakpoints_out): New.
11586 (free_all_breakpoints): Use it.
11587 * server.c (handle_target_event): If the process is gone, mark
11588 breakpoints out.
11589 * thread-db.c (struct thread_db) <create_bp>: New field.
11590 (thread_db_enable_reporting): Fix prototype. Store a thread event
11591 breakpoint reference in the thread_db struct.
11592 (thread_db_load_search): Clear the thread_db object.
11593 (try_thread_db_load_1): Ditto.
11594 (switch_to_process): New.
11595 (disable_thread_event_reporting): Use it.
11596 (remove_thread_event_breakpoints): New.
11597 (thread_db_detach, thread_db_mourn): Use it.
11598
1e7fc18c
PA
115992010-05-01 Pedro Alves <pedro@codesourcery.com>
11600
11601 * linux-low.c (linux_enable_event_reporting): New.
11602 (linux_wait_for_event_1, handle_extended_wait): Use it.
11603
02fc4de7
PA
116042010-04-30 Pedro Alves <pedro@codesourcery.com>
11605
11606 * linux-low.c (linux_kill_one_lwp, linux_kill)
11607 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11608 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11609 SIGSTOP even if the LWP is stopped.
11610 (send_sigstop_callback): New.
11611 (stop_all_lwps): Use send_sigstop_callback instead.
11612 (linux_resume_one_thread): Adjust.
11613 (proceed_one_lwp): Still proceed an LWP that the client has
11614 requested to stop, if we haven't reported it as stopped yet. Make
11615 sure that LWPs the client want stopped, have a pending SIGSTOP.
11616
bc3b5632
DE
116172010-04-26 Doug Evans <dje@google.com>
11618
ae1ada35
DE
11619 * server.c (handle_general_set): Make static.
11620
bc3b5632
DE
11621 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11622 Print received char after testing for error/eof instead of before.
11623 (input_interrupt): Tweak comment.
11624
65730243
DE
116252010-04-23 Doug Evans <dje@google.com>
11626
11627 * server.c (start_inferior): Print inferior argv if --debug.
11628
a8ae7dc0
AR
116292010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11630
11631 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11632 * nto-x86-low.c: Include server.h
11633
1c07cc19
PM
116342010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11635
11636 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11637 be consistent with other sources of this directory.
11638 (init_registers_amd64): Correct name of source file of this function
11639 in the comment.
11640
e0a61e09
PM
116412010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11642
11643 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11644 64-bit executables.
11645
54709339
PM
116462010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11647
11648 * win32-i386-low.c: Add 64-bit support.
11649 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11650 (init_registers_amd64): Declare.
11651 (mappings): Add 64-bit version of array.
11652 (init_windows_x86): New function.
11653 (the_low_target): Change init_arch field to init_windows_x86.
11654
e8f0053d
PM
116552010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11656
11657 * win32-low.c: Adapt to support also 64-bit architecture.
11658 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11659 (get_image_name): Use SIZE_T type for local variable `done'.
11660 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11661 (toolhelp_get_dll_name): Idem.
11662 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11663 Use uintptr_t typecast to avoid warning.
11664 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11665 (handle_exception): Use phex_nz to avoid warning.
11666 (win32_wait): Remove unused local variable `process'.
11667
c481e77e
PM
116682010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11669
11670 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11671 `amd64-avx.o'.
11672
12ea4b69
PM
116732010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11674
11675 * configure.ac: Use `ws2_32' library for srv_mingw.
11676 * configure: Regenerate.
11677 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11678 * remote-utils.c: Likewise.
11679
f6d1620c
L
116802010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11681
11682 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11683 if __x86_64__ is defined.
11684
8e642873
PM
116852010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11686
11687 * configure: Regenerate.
11688
711e434b
PM
116892010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11690
11691 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11692 * target.h (target_ops): New get_tib_address field.
11693 * win32-low.h (win32_thread_info): Add thread_local_base field.
11694 * win32-low.c (child_add_thread): Add tlb argument.
11695 Set thread_local_base field to TLB.
11696 (get_child_debug_event): Adapt to child_add_thread change.
11697 (win32_get_tib_address): New function.
11698 (win32_target_ops): Set get_tib_address field to
11699 win32_get_tib_address.
11700 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11701
505106cd
PA
117022010-04-12 Pedro Alves <pedro@codesourcery.com>
11703
505106cd
PA
11704 * linux-low.c (linux_mourn): Also remove the process.
11705 * server.c (handle_target_event): Don't remove the process here.
11706 * nto-low.c (nto_mourn): New.
11707 (nto_target_ops): Install it.
11708 * spu-low.c (spu_mourn): New.
11709 (spu_target_ops): Install it.
11710 * win32-low.c (win32_mourn): New.
11711 (win32_target_ops): Install it.
11712
e8470a06
PA
117132010-04-12 Pedro Alves <pedro@codesourcery.com>
11714
11715 * server.h (buffer_xml_printf): Remove redundant `;'.
11716
45ba0d02
PA
117172010-04-12 Pedro Alves <pedro@codesourcery.com>
11718
11719 * regcache.c (set_register_cache): Invalidate regcaches before
11720 changing the register cache layout.
11721 (regcache_invalidate_one): Allow a NULL regcache.
11722 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11723 regcaches before changing the register cache layout or the target
11724 regsets.
11725
59e04013
L
117262010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11727
11728 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11729 variable warning on Linux/x86-64.
11730
8336d594
PA
117312010-04-11 Pedro Alves <pedro@codesourcery.com>
11732
11733 GDBserver disconnected tracing support.
11734
11735 * linux-low.c (linux_remove_process): Delete.
11736 (add_lwp): Don't set last_resume_kind here.
11737 (linux_kill): Use `mourn'.
11738 (linux_detach): Use `thread_db_detach', and `mourn'.
11739 (linux_mourn): New.
11740 (linux_attach_lwp_1): Adjust comment.
11741 (linux_attach): last_resume_kind moved the thread_info; adjust.
11742 (status_pending_p_callback): Adjust.
11743 (linux_wait_for_event_1): Adjust.
11744 (count_events_callback, select_singlestep_lwp_callback)
11745 (select_event_lwp_callback, cancel_breakpoints_callback)
11746 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11747 (proceed_one_lwp): Adjust.
11748 (linux_async): Add debug output.
11749 (linux_thread_stopped): New.
11750 (linux_pause_all): New.
11751 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11752 linux_pause_all.
11753 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11754 (thread_db_free): Delete declaration.
11755 (thread_db_detach, thread_db_mourn): Declare.
11756 * thread-db.c (thread_db_init): Use thread_db_mourn.
11757 (thread_db_free): Delete, split in two.
11758 (disable_thread_event_reporting): New.
11759 (thread_db_detach): New.
11760 (thread_db_mourn): New.
11761
11762 * server.h (struct thread_info) <last_resume_kind>: New field.
11763 <attached>: Add comment.
11764 <gdb_detached>: New field.
11765 (handler_func): Change return type to int.
11766 (handle_serial_event, handle_target_event): Ditto.
11767 (gdb_connected): Declare.
11768 (tracing): Delete.
11769 (disconnected_tracing): Declare.
11770 (stop_tracing): Declare.
11771
11772 * server.c (handle_query) <qSupported>: Report support for
11773 disconnected tracing.
11774 (queue_stop_reply_callback): Account for running threads.
11775 (gdb_wants_thread_stopped): New.
11776 (gdb_wants_all_threads_stopped): New.
11777 (gdb_reattached_process): New.
11778 (handle_status): Clear the `gdb_detached' flag of all processes.
11779 In all-stop, stop all threads.
11780 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11781 (process_serial_event): If the remote connection breaks, or if an
11782 exit was forced with "monitor exit", force an event loop exit.
11783 Handle disconnected tracing on detach.
11784 (handle_serial_event): Adjust.
11785 (handle_target_event): If GDB isn't connected, forward events back
11786 to the inferior, unless the last process exited, in which case,
11787 exit gdbserver. Adjust interface.
11788
11789 * remote-utils.c (remote_open): Don't block in accept. Instead
11790 register an event loop source on the listen socket file
11791 descriptor. Refactor bits into ...
11792 (listen_desc): ... this new global.
11793 (gdb_connected): ... this new function.
11794 (enable_async_notification): ... this new function.
11795 (handle_accept_event): ... this new function.
11796 (remote_close): Clear remote_desc.
11797
11798 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11799
11800 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11801 New fields.
11802 (mourn_inferior): Define.
11803 (target_process_qsupported): Avoid the dangling else problem.
11804 (thread_stopped): Define.
11805 (pause_all): Define.
11806 (target_waitstatus_to_string): Declare.
11807 * target.c (target_waitstatus_to_string): New.
11808
11809 * tracepoint.c (tracing): Make extern.
11810 (disconnected_tracing): New.
11811 (stop_tracing): Make extern. Handle tracing stops due to GDB
11812 disconnecting.
11813 (cmd_qtdisconnected): New.
11814 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11815 (handle_tracepoint_general_set): Handle QTDisconnected.
11816
11817 * event-loop.c (event_handler_func): Change return type to int.
11818 (process_event): Bail out if the event handler wants the event
11819 loop to stop.
11820 (handle_file_event): Ditto.
11821 (start_event_loop): Bail out if the event handler wants the event
11822 loop to stop.
11823
11824 * nto-low.c (nto_target_ops): Adjust.
11825 * spu-low.c (spu_wait): Don't remove the process here.
11826 (spu_target_ops): Adjust.
11827 * win32-low.c (win32_wait): Don't remove the process here.
11828 (win32_target_ops): Adjust.
11829
5d267c4c
PA
118302010-04-11 Pedro Alves <pedro@codesourcery.com>
11831
11832 * regcache.c (realloc_register_cache): Invalidate inferior's
11833 regcache before recreating it.
11834
623ccd72
PA
118352010-04-09 Pedro Alves <pedro@codesourcery.com>
11836
11837 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11838
219f2f23
PA
118392010-04-09 Stan Shebs <stan@codesourcery.com>
11840 Pedro Alves <pedro@codesourcery.com>
11841
11842 * server.h (LONGEST): New.
11843 (struct thread_info) <while_stepping>: New field.
11844 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11845 Declare.
11846 (initialize_tracepoint, handle_tracepoint_general_set)
11847 (handle_tracepoint_query, tracepoint_finished_step)
11848 (tracepoint_was_hit, release_while_stepping_state_list):
11849 (current_traceframe): Declare.
11850 * server.c (handle_general_set): Handle tracepoint packets.
11851 (read_memory): New.
11852 (write_memory): New.
11853 (handle_search_memory_1): Use read_memory.
11854 (handle_query): Report support for conditional tracepoints, trace
11855 state variables, and tracepoint sources. Handle tracepoint
11856 queries.
11857 (main): Initialize the tracepoints module.
11858 (process_serial_event): Handle traceframe reads/writes.
11859
11860 * linux-low.c (handle_tracepoints): New.
11861 (linux_wait_1): Call it.
11862 (linux_resume_one_lwp): Handle while-stepping.
11863 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11864 (linux_target_ops): Install them.
11865 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11866 New field.
11867 * linux-x86-low.c (x86_supports_tracepoints): New.
11868 (the_low_target). Install it.
11869
11870 * mem-break.h (delete_breakpoint): Declare.
11871 * mem-break.c (delete_breakpoint): Make external.
11872
11873 * target.h (struct target_ops): Add `supports_tracepoints',
11874 `read_pc', and `write_pc' fields.
11875 (target_supports_tracepoints): Define.
11876 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11877 (phex_nz): New.
11878
11879 * regcache.h (struct regcache) <registers_owned>: New field.
11880 (init_register_cache, regcache_cpy): Declare.
11881 (regcache_read_pc, regcache_write_pc): Declare.
11882 (register_cache_size): Declare.
11883 (supply_regblock): Declare.
11884 * regcache.c (init_register_cache): New.
11885 (new_register_cache): Use it.
11886 (regcache_cpy): New.
11887 (register_cache_size): New.
11888 (supply_regblock): New.
11889 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11890
219f2f23
PA
11891 * tracepoint.c: New.
11892
11893 * Makefile.in (OBS): Add tracepoint.o.
11894 (tracepoint.o): New rule.
11895
3a13a53b
L
118962010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11897
11898 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11899 (i386-mmx.o): New.
11900 (i386-mmx.c): Likewise.
11901 (i386-mmx-linux.o): Likewise.
11902 (i386-mmx-linux.c): Likewise.
11903
11904 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11905 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11906 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11907 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11908
11909 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11910 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11911 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11912
1570b33e
L
119132010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11914
11915 * Makefile.in (clean): Updated.
11916 (i386-avx.o): New.
11917 (i386-avx.c): Likewise.
11918 (i386-avx-linux.o): Likewise.
11919 (i386-avx-linux.c): Likewise.
11920 (amd64-avx.o): Likewise.
11921 (amd64-avx.c): Likewise.
11922 (amd64-avx-linux.o): Likewise.
11923 (amd64-avx-linux.c): Likewise.
11924
11925 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11926 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11927 (srv_amd64_regobj): Add amd64-avx.o.
11928 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11929 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11930 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11931 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11932 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11933 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11934 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11935
11936 * i387-fp.c: Include "i386-xstate.h".
11937 (i387_xsave): New.
11938 (i387_cache_to_xsave): Likewise.
11939 (i387_xsave_to_cache): Likewise.
11940 (x86_xcr0): Likewise.
11941
11942 * i387-fp.h (i387_cache_to_xsave): Likewise.
11943 (i387_xsave_to_cache): Likewise.
11944 (x86_xcr0): Likewise.
11945
11946 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11947 * linux-crisv32-low.c (target_regsets): Likewise.
11948 * linux-m68k-low.c (target_regsets): Likewise.
11949 * linux-mips-low.c (target_regsets): Likewise.
11950 * linux-ppc-low.c (target_regsets): Likewise.
11951 * linux-s390-low.c (target_regsets): Likewise.
11952 * linux-sh-low.c (target_regsets): Likewise.
11953 * linux-sparc-low.c (target_regsets): Likewise.
11954 * linux-xtensa-low.c (target_regsets): Likewise.
11955
11956 * linux-low.c: Include <sys/uio.h>.
11957 (regsets_fetch_inferior_registers): Support nt_type.
11958 (regsets_store_inferior_registers): Likewise.
11959 (linux_process_qsupported): New.
11960 (linux_target_ops): Add linux_process_qsupported.
11961
11962 * linux-low.h (regset_info): Add nt_type.
11963 (linux_target_ops): Add process_qsupported.
11964
11965 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11966 and <sys/uio.h>.
11967 (init_registers_i386_avx_linux): New.
11968 (init_registers_amd64_avx_linux): Likewise.
11969 (xmltarget_i386_linux_no_xml): Likewise.
11970 (xmltarget_amd64_linux_no_xml): Likewise.
11971 (PTRACE_GETREGSET): Likewise.
11972 (PTRACE_SETREGSET): Likewise.
11973 (x86_fill_xstateregset): Likewise.
11974 (x86_store_xstateregset): Likewise.
11975 (use_xml): Likewise.
11976 (x86_linux_update_xmltarget): Likewise.
11977 (x86_linux_process_qsupported): Likewise.
11978 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11979 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11980 init_registers_i386_linux here. Call
11981 x86_linux_update_xmltarget.
11982 (the_low_target): Add x86_linux_process_qsupported.
11983
11984 * server.c (handle_query): Call target_process_qsupported.
11985
11986 * target.h (target_ops): Add process_qsupported.
11987 (target_process_qsupported): New.
11988
fc7238bb
PA
119892010-04-03 Pedro Alves <pedro@codesourcery.com>
11990
11991 * inferiors.c (add_thread): Set last_status kind to
11992 TARGET_WAITKIND_IGNORE.
11993 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11994 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11995 (linux_wait_1): Move `thread' local definition to block that uses
11996 it. Don't NULL initialize `event_child'.
11997 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11998 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11999 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12000
bdabb078
PA
120012010-04-01 Pedro Alves <pedro@codesourcery.com>
12002
12003 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12004 an extended waitstatus, or by a watchpoint.
12005 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12006 thread was stepping or has been stopped by a watchpoint.
12007
d3bbe7a0
PA
120082010-04-01 Pedro Alves <pedro@codesourcery.com>
12009
12010 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12011 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12012 of another, then delete the previous, and validate all
12013 breakpoints.
12014 (validate_inserted_breakpoint): New.
12015 (delete_disabled_breakpoints): New.
12016 (validate_breakpoints): New.
12017 (check_mem_read): Validate breakpoints before trusting their
12018 shadow. Delete disabled breakpoints.
12019 (check_mem_write): Validate breakpoints before trusting they
12020 should be inserted. Delete disabled breakpoints.
12021 * mem-break.h (validate_breakpoints):
12022 * server.c (handle_query): Validate breakpoints when we see a
12023 qSymbol query.
12024
8b07ae33
PA
120252010-04-01 Pedro Alves <pedro@codesourcery.com>
12026
12027 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12028 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12029 if we could tell there's a GDB breakpoint at stop_pc.
12030 (need_step_over_p): Don't do a step over if we find a GDB
12031 breakpoint at the resume PC.
12032
12033 * mem-break.c (struct raw_breakpoint): New.
12034 (enum bkpt_type): New type `gdb_breakpoint'.
12035 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12036 fields. New field `raw'.
12037 (find_raw_breakpoint_at): New.
12038 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12039 breakpoint instead.
12040 (set_breakpoint_at): Adjust.
12041 (delete_raw_breakpoint): New.
12042 (release_breakpoint): New.
12043 (delete_breakpoint): Rename to...
12044 (delete_breakpoint_1): ... this. Add proc parameter. Use
12045 release_breakpoint. Return ENOENT.
12046 (delete_breakpoint): Reimplement.
12047 (find_breakpoint_at): Delete.
12048 (find_gdb_breakpoint_at): New.
12049 (delete_breakpoint_at): Delete.
12050 (set_gdb_breakpoint_at): New.
12051 (delete_gdb_breakpoint_at): New.
12052 (gdb_breakpoint_here): New.
12053 (set_reinsert_breakpoint): Use release_breakpoint.
12054 (uninsert_breakpoint): Rename to ...
12055 (uninsert_raw_breakpoint): ... this.
12056 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12057 (reinsert_raw_breakpoint): Change parameter type to
12058 raw_breakpoint.
12059 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12060 instead.
12061 (check_breakpoints): Adjust. Use release_breakpoint.
12062 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12063 (breakpoint_inserted_here): Ditto.
12064 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12065 Don't trust the breakpoint's shadow if it is not inserted.
12066 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12067 (delete_all_breakpoints): Adjust.
12068 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12069 use delete_breakpoint_1.
12070
12071 * mem-break.h (breakpoints_supported): Delete declaration.
12072 (set_gdb_breakpoint_at): Declare.
12073 (gdb_breakpoint_here): Declare.
12074 (delete_breakpoint_at): Delete.
12075 (delete_gdb_breakpoint_at): Declare.
12076
12077 * server.h (struct raw_breakpoint): Forward declare.
12078 (struct process_info): New field `raw_breakpoints'.
12079
12080 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12081 breakpoints.
12082
6bf5e0ba
PA
120832010-03-24 Pedro Alves <pedro@codesourcery.com>
12084
12085 * linux-low.c (status_pending_p_callback): Fix comment.
12086 (linux_wait_for_event_1): Move most of the internal breakpoint
12087 handling from here...
12088 (linux_wait_1): ... to here.
12089 (count_events_callback): New.
12090 (select_singlestep_lwp_callback): New.
12091 (select_event_lwp_callback): New.
12092 (cancel_breakpoints_callback): New.
12093 (select_event_lwp): New.
12094 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12095 priority to all LWPs that have had events that should be reported
12096 to the client. Cancel breakpoints when about to reporting the
12097 event to the client, not while stopping lwps. No longer cancel
12098 finished single-steps here.
12099 (cancel_finished_single_step): Delete.
12100 (cancel_finished_single_steps): Delete.
12101
414a389f
PA
121022010-03-24 Pedro Alves <pedro@codesourcery.com>
12103
12104 * mem-break.c (enum bkpt_type): New.
12105 (struct breakpoint): New field `type'.
12106 (set_breakpoint_at): Change return type to struct breakpoint
12107 pointer. Set type to `other_breakpoint' by default.
12108 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12109 in the breakpoint list.
12110 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12111 (reinsert_breakpoint): Rename to ...
12112 (reinsert_raw_breakpoint): ... this.
12113 (reinsert_breakpoints_at): Adjust.
12114 * mem-break.h (struct breakpoint): Declare.
12115 (set_breakpoint_at): Change return type to struct breakpoint
12116 pointer.
12117
2280c721
PA
121182010-03-24 Pedro Alves <pedro@codesourcery.com>
12119
12120 * server.c (handle_query): Assign, not compare.
12121
d50171e4
PA
121222010-03-24 Pedro Alves <pedro@codesourcery.com>
12123
12124 Teach linux gdbserver to step-over-breakpoints.
12125
12126 * linux-low.c (can_hardware_single_step): New.
12127 (supports_breakpoints): New.
12128 (handle_extended_wait): If stopping threads, read the stop pc of
12129 the new cloned LWP.
12130 (get_pc): New.
12131 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12132 low target doesn't support retrieving the PC.
12133 (add_lwp): Set last_resume_kind to resume_continue.
12134 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12135 (linux_attach): Don't clear stop_expected. Set the lwp's
12136 last_resume_kind to resume_stop.
12137 (linux_detach_one_lwp): Don't check for removed breakpoints.
12138 (check_removed_breakpoint): Delete.
12139 (status_pending_p): Rename to ...
12140 (status_pending_p_callback): ... this. Don't check for removed
12141 breakpoints. Don't consider threads that are stopped from GDB's
12142 perspective.
12143 (linux_wait_for_lwp): Always read the stop_pc here.
12144 (cancel_breakpoint): New.
12145 (step_over_bkpt): New global.
12146 (linux_wait_for_event_1): Implement stepping over breakpoints.
12147 (gdb_wants_lwp_stopped): New.
12148 (gdb_wants_all_stopped): New.
12149 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12150 single-step traps here. Store the thread's last reported target
12151 wait status.
12152 (send_sigstop): Don't clear stop_expected. Always set it,
12153 instead.
12154 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12155 (cancel_finished_single_step): New.
12156 (cancel_finished_single_steps): New.
12157 (wait_for_sigstop): Don't cancel finished single-step traps here.
12158 (linux_resume_one_lwp): Don't check for removed breakpoints.
12159 Don't set `step' on non-hardware step archs.
12160 (linux_set_resume_request): Ignore resume_stop requests if already
12161 stopping or stopped. Set the lwp's last_resume_kind.
12162 (resume_status_pending_p): Don't check for removed breakpoints.
12163 (need_step_over_p): New.
12164 (start_step_over): New.
12165 (finish_step_over): New.
12166 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12167 requests. Clear the thread's last reported target waitstatus.
12168 Don't use the `suspended' flag. Don't consider pending breakpoints.
12169 (linux_resume): Start a step-over if necessary.
12170 (proceed_one_lwp): New.
12171 (proceed_all_lwps): New.
12172 (unstop_all_lwps): New.
12173 * linux-low.h (struct lwp_info): Rewrite comment for the
12174 `suspended' flag. Add the `stop_pc' field. Delete the
12175 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12176 Add `'last_resume_kind' and `need_step_over' fields.
12177 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12178 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12179 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12180 (set_raw_breakpoint_at): New.
12181 (set_breakpoint_at): Rewrite to use it.
12182 (reinsert_breakpoint_handler): Delete.
12183 (set_reinsert_breakpoint): New.
12184 (reinsert_breakpoint_by_bp): Delete.
12185 (delete_reinsert_breakpoints): New.
12186 (uninsert_breakpoint): Rewrite.
12187 (uninsert_breakpoints_at): New.
12188 (reinsert_breakpoint): Rewrite.
12189 (reinsert_breakpoints_at): New.
12190 (check_breakpoints): Rewrite.
12191 (breakpoint_here): New.
12192 (breakpoint_inserted_here): New.
12193 (check_mem_read): Adjust.
12194 * mem-break.h (breakpoints_supported, breakpoint_here)
12195 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12196 (reinsert_breakpoint_by_bp): Delete declaration.
12197 (delete_reinsert_breakpoints): Declare.
12198 (reinsert_breakpoint): Delete declaration.
12199 (reinsert_breakpoints_at): Declare.
12200 (uninsert_breakpoint): Delete declaration.
12201 (uninsert_breakpoints_at): Declare.
12202 (check_breakpoints): Adjust prototype.
12203 * server.h: Adjust include order.
12204 (struct thread_info): Declare here. Add a `last_status' field.
12205
30ba68cb
MS
122062010-03-23 Michael Snyder <msnyder@vmware.com>
12207
12208 * server.c (crc32): New function.
12209 (handle_query): Add handling for 'qCRC:' request.
12210
b9a881c2
PA
122112010-03-23 Pedro Alves <pedro@codesourcery.com>
12212
12213 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12214 lwp had been stopped by a watchpoint.
12215
e92d13d5
PA
122162010-03-16 Pedro Alves <pedro@codesourcery.com>
12217
12218 * server.h (internal_error): Declare.
12219 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12220 * utils.c (internal_error): New function.
12221
64daa791
AS
122222010-03-15 Andreas Schwab <schwab@redhat.com>
12223
12224 * configure.srv: Fix typo setting srv_regobj.
12225
f52cd8cd
PA
122262010-03-15 Pedro Alves <pedro@codesourcery.com>
12227
12228 * linux-low.c (fetch_register): Avoid passing a non string literal
12229 format to `error'.
12230 (usr_store_inferior_registers): Ditto.
12231
93ae6fdc
PA
122322010-03-14 Pedro Alves <pedro@codesourcery.com>
12233
12234 * linux-low.c (linux_write_memory): Bail out early if peeking
12235 memory failed.
12236
c3adc08c
PA
122372010-03-14 Pedro Alves <pedro@codesourcery.com>
12238
12239 * linux-low.h (struct lwp_info): New fields
12240 `stopped_by_watchpoint' and `stopped_data_address'.
12241 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12242 here, and cache them in the lwp object.
12243 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12244 directly.
12245 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12246 field.
12247 (linux_stopped_by_watchpoint): Rewrite.
12248 (linux_stopped_data_address): Rewrite.
12249
bce522a2
PA
122502010-03-06 Simo Melenius <simo.melenius@iki.fi>
12251
12252 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12253 switching the current inferior, not before.
12254
90884b2b
L
122552010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12256
12257 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12258 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12259 i386-linux.c and amd64-linux.c.
12260 (reg-i386.o): Removed.
12261 (reg-i386.c): Likewise.
12262 (reg-i386-linux.o): Likewise.
12263 (reg-i386-linux.c): Likewise.
12264 (reg-x86-64.o): Likewise.
12265 (reg-x86-64.c): Likewise.
12266 (reg-x86-64-linux.o): Likewise.
12267 (reg-x86-64-linux.c): Likewise.
12268 (i386.o): New.
12269 (i386.c): Likewise.
12270 (i386-linux.o): Likewise.
12271 (i386-linux.c): Likewise.
12272 (amd64.o): Likewise.
12273 (amd64.c): Likewise.
12274 (amd64-linux.o): Likewise.
12275 (amd64-linux.c): Likewise.
12276
12277 * configure.srv (srv_i386_regobj): New.
12278 (srv_i386_linux_regobj): Likewise.
12279 (srv_amd64_regobj): Likewise.
12280 (srv_amd64_linux_regobj): Likewise.
12281 (srv_i386_32bit_xmlfiles): Likewise.
12282 (srv_i386_64bit_xmlfiles): Likewise.
12283 (srv_i386_xmlfiles): Likewise.
12284 (srv_amd64_xmlfiles): Likewise.
12285 (srv_i386_linux_xmlfiles): Likewise.
12286 (srv_amd64_linux_xmlfiles): Likewise.
12287 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12288 srv_xmlfiles to $srv_i386_xmlfiles.
12289 (i[34567]86-*-mingw32ce*): Likewise.
12290 (i[34567]86-*-mingw*): Likewise.
12291 (i[34567]86-*-nto*): Likewise.
12292 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12293 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12294 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12295 (x86_64-*-linux*): Likewise.
12296
12297 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12298 (init_registers_amd64_linux): New.
12299 (x86_arch_setup): Replace init_registers_x86_64_linux with
12300 init_registers_amd64_linux.
12301
193f13e6
MK
123022010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12303
12304 * configure.ac: Check for libdl. If it is not available link against
12305 static libthread_db.
12306 * configure: Regenerate.
12307
85d721b8
PA
123082010-02-22 Pedro Alves <pedro@codesourcery.com>
12309
12310 PR9605
12311
12312 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12313 handing a read watchpoint.
12314 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12315
6076632b
DE
123162010-02-12 Doug Evans <dje@google.com>
12317
12318 * linux-low.c (linux_supports_tracefork_flag): Document.
12319 (linux_look_up_symbols): Add comment.
12320
3327ccf7
L
123212010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12322
12323 * regcache.c (supply_register): Clear regcache if buf is NULL.
12324
0718675c 123252010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12326 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12327
12328 * inferiors.c (find_inferior): Add function documentation.
12329 (unloaded_dll): Handle the case where the unloaded dll has not
12330 been previously registered in the dll list.
12331
177321bd
DJ
123322010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12333
12334 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12335 (thumb2_breakpoint): New.
12336 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12337
2b009048
DJ
123382010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12339
12340 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12341 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12342 breakpoints.
12343
3be029c7
PA
123442010-01-21 Pedro Alves <pedro@codesourcery.com>
12345
12346 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12347
18f5de3b
JK
123482010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12349
12350 * linux-s390-low.c (s390_collect_ptrace_register)
12351 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12352
3743bb4f
DE
123532010-01-21 Doug Evans <dje@google.com>
12354
14ce3065
DE
12355 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12356 (PTRACE_ARG4_TYPE): New macro.
12357 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12358 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12359 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12360 (usr_store_inferior_registers): Ditto.
12361 (linux_read_memory, linux_write_memory): Ditto.
12362 (linux_test_for_tracefork): Ditto.
12363
3743bb4f
DE
12364 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12365 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12366
8b315be5
PA
123672010-01-21 Pedro Alves <pedro@codesourcery.com>
12368
12369 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12370 target.
12371
85492558
PA
123722010-01-21 Pedro Alves <pedro@codesourcery.com>
12373
12374 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12375 prototype to take a regcache. Adjust.
12376
442ea881
PA
123772010-01-20 Pedro Alves <pedro@codesourcery.com>
12378
12379 * regcache.h (struct thread_info): Forward declare.
12380 (struct regcache): New.
12381 (new_register_cache): Adjust prototype.
12382 (get_thread_regcache): Declare.
12383 (free_register_cache): Adjust prototype.
12384 (registers_to_string, registers_from_string): Ditto.
12385 (supply_register, supply_register_by_name, collect_register)
12386 (collect_register_as_string, collect_register_by_name): Ditto.
12387 * regcache.c (struct inferior_regcache_data): Delete.
12388 (get_regcache): Rename to ...
12389 (get_thread_regcache): ... this. Adjust. Switch inferior before
12390 fetching registers.
12391 (regcache_invalidate_one): Adjust.
12392 (regcache_invalidate): Fix prototype.
12393 (new_register_cache): Return the new register cache.
12394 (free_register_cache): Change prototype.
12395 (realloc_register_cache): Adjust.
12396 (registers_to_string): Change prototype to take a regcache. Adjust.
12397 (registers_from_string): Ditto.
12398 (register_data): Ditto.
12399 (supply_register): Ditto.
12400 (supply_register_by_name): Ditto.
12401 (collect_register): Ditto.
12402 (collect_register_as_string): Ditto.
12403 (collect_register_by_name): Ditto.
12404 * server.c (process_serial_event): Adjust.
12405 * linux-low.h (regset_fill_func, regset_store_func): Change
12406 prototype.
12407 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12408 Change prototype.
12409 * linux-low.c (get_stop_pc): Adjust.
12410 (check_removed_breakpoint): Adjust.
12411 (linux_wait_for_event): Adjust.
12412 (linux_resume_one_lwp): Adjust.
12413 (fetch_register): Add regcache parameter. Adjust.
12414 (usr_store_inferior_registers): Ditto.
12415 (regsets_fetch_inferior_registers): Ditto.
12416 (regsets_store_inferior_registers): Ditto.
12417 (linux_fetch_registers, linux_store_registers): Ditto.
12418 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12419 regcache. Adjust.
43aaf8b6
PA
12420 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12421 Ditto.
442ea881
PA
12422 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12423 prototype to take a regcache.
12424 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12425 * remote-utils.c (convert_ascii_to_int, outreg)
12426 (prepare_resume_reply): Change prototype to take a regcache.
12427 Adjust.
12428 * target.h (struct target_ops) <fetch_registers, store_registers>:
12429 Change prototype to take a regcache.
12430 (fetch_inferior_registers, store_inferior_registers): Change
12431 prototype to take a regcache. Adjust.
12432 * proc-service.c (ps_lgetregs): Adjust.
12433 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12434 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12435 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12436 take a regcache. Adjust.
12437 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12438 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12439 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12440 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12441 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12442 (cris_cannot_fetch_register):
12443 (cris_breakpoint_at): Change prototype to take a regcache.
12444 Adjust.
12445 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12446 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12447 to take a regcache. Adjust.
12448 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12449 Adjust.
12450 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12451 take a regcache. Adjust.
12452 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12453 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12454 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12455 * linux-mips-low.c (mips_get_pc):
12456 (mips_set_pc): Change prototype to take a regcache. Adjust.
12457 (mips_reinsert_addr): Adjust.
12458 (mips_collect_register): Change prototype to take a regcache.
12459 Adjust.
12460 (mips_supply_register):
12461 (mips_collect_register_32bit, mips_supply_register_32bit)
12462 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12463 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12464 * linux-ppc-low.c (ppc_supply_ptrace_register)
12465 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12466 (parse_spufs_run): Adjust.
12467 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12468 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12469 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12470 take a regcache. Adjust.
12471 * linux-s390-low.c (s390_collect_ptrace_register)
12472 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12473 (s390_set_pc): Change prototype to take a regcache. Adjust.
12474 (s390_arch_setup): Adjust.
12475 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12476 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12477 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12478 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12479 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12480 regcache. Adjust.
12481 (sparc_breakpoint_at): Adjust.
12482 * linux-xtensa-low.c (xtensa_fill_gregset):
12483 (xtensa_store_gregset):
12484 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12485 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12486 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12487 prototype to take a regcache. Adjust.
12488 * win32-arm-low.c (arm_fetch_inferior_register)
12489 (arm_store_inferior_register): Change prototype to take a
12490 regcache. Adjust.
12491 * win32-i386-low.c (i386_fetch_inferior_register)
12492 (i386_store_inferior_register): Change prototype to take a
12493 regcache. Adjust.
12494 * win32-low.c (child_fetch_inferior_registers)
12495 (child_store_inferior_registers): Change prototype to take a
12496 regcache. Adjust.
12497 (win32_wait): Adjust.
12498 (win32_fetch_inferior_registers): Change prototype to take a
12499 regcache. Adjust.
12500 (win32_store_inferior_registers): Adjust.
12501 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12502 store_inferior_register>: Change prototype to take a regcache.
12503
60c3d7b0
DE
125042010-01-20 Doug Evans <dje@google.com>
12505
12506 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12507 #ifdef.
12508 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12509 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12510
dc146f7c
VP
125112010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12512
12513 * linux-low.c (linux_core_of_thread): New.
12514 (compare_ints, show_process, list_threads): New.
12515 (linux_qxfer_osdata): Report threads and cores.
12516 (linux_target_op): Register linux_core_of_thread.
12517 * remote-utils.c (prepare_resume_reply): Report the core.
12518 (buffer_xml_printf): Support %d specifier.
12519 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12520 New.
12521 (handle_query): Handle qXfer:threads. Announce availability
12522 thereof.
12523 * target.h (struct target_ops): New field core_of_thread.
12524
7803799a
UW
125252010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12526
12527 * Makefile.in (clean): Remove new generated files.
12528 (reg-s390.o, reg-s390.c): Remove rules.
12529 (reg-s390x.o, reg-s390x.c): Likewise.
12530 (s390-linux32.o, s390-linux32.c): Add rules.
12531 (s390-linux64.o, s390-linux64.c): Likewise.
12532 (s390x-linux64.o, s390x-linux64.c): Likewise.
12533 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12534 * linux-s390-low.c: Include <elf.h>.
12535 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12536 (init_registers_s390): Remove prototype.
12537 (init_registers_s390x): Likewise.
12538 (init_registers_s390_linux32): Add prototype.
12539 (init_registers_s390_linux64): Likewise.
12540 (init_registers_s390x_linux64): Likewise.
12541 (s390_num_regs_3264): New define.
12542 (s390_regmap_3264): New global variable.
12543 (s390_cannot_fetch_register): Remove obsolete check.
12544 (s390_cannot_store_register): Likewise.
12545 (s390_collect_ptrace_register): Handle upper/lower register halves.
12546 (s390_supply_ptrace_register): Likewise.
12547 (s390_fill_gregset): Update to register number changes.
12548 (s390_get_hwcap): New routine.
12549 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12550 Install appropriate regmap and register set.
12551
6e7ffa39
JB
125522010-01-01 Joel Brobecker <brobecker@adacore.com>
12553
12554 * server.c (gdbserver_version): Update copyright year to 2010.
12555 * gdbreplay.c (gdbreplay_version): Likewise.
12556
957f3f49
DE
125572009-12-28 Doug Evans <dje@google.com>
12558
12559 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12560 elf/external.h. Include <elf.h> instead but only if necessary.
12561
ca5c370d
PA
125622009-12-28 Pedro Alves <pedro@codesourcery.com>
12563
12564 * linux-low.c (linux_remove_process): Remove `detaching'
12565 parameter. Don't release/detach from thread_db here.
12566 (linux_kill): Release/detach from thread_db here, ...
12567 (linux_detach): ... and here, before actually detaching.
12568 (linux_wait_1): ... and here, when a process exits.
12569 * thread-db.c (any_thread_of): New.
12570 (thread_db_free): Switch the current inferior to a thread of the
12571 passed in process.
12572
4ee62156
DE
125732009-12-21 Doug Evans <dje@google.com>
12574
d90e6a88
DE
12575 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12576
c5f62d5f
DE
12577 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12578 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12579 warning ifndef __NR_tkill. Move setting of errno there too.
12580 Delete unnecessary resetting of errno after syscall.
12581 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12582
10e86dd7
DE
12583 * configure.ac: Check for dladdr.
12584 * config.in: Regenerate.
12585 * configure: Regenerate.
12586 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12587 (try_thread_db_load): Update.
12588
4ee62156
DE
12589 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12590
00f515da
DE
125912009-12-18 Doug Evans <dje@google.com>
12592
e9464885
DE
12593 * event-loop.c: Include unistd.h if it exists.
12594
07d4f67e
DE
12595 * linux-low.c (my_waitpid): Move definition away from being in
12596 between linux_tracefork_child/linux_test_for_tracefork.
12597
00f515da
DE
12598 * gdb_proc_service.h (psaddr_t): Fix type.
12599 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12600 signature to match glibc.
12601
1de1badb
DE
126022009-12-16 Doug Evans <dje@google.com>
12603
12604 * linux-low.c (linux_read_memory): Fix argument to read.
12605
aeeb81d1
PA
126062009-11-26 Pedro Alves <pedro@codesourcery.com>
12607
12608 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12609 events, don't leave current_inferior pointing at null.
12610
10357975
PA
126112009-11-26 Pedro Alves <pedro@codesourcery.com>
12612
12613 * win32-low.c (LOG): Delete.
12614 (OUTMSG): Output to stderr.
12615 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12616 on compile time LOG macro.
12617 (win32_wait): Fix debug output.
12618
cf6e3471
PA
126192009-11-26 Pedro Alves <pedro@codesourcery.com>
12620
12621 * win32-low.c (win32_add_one_solib): If the dll name is
12622 "ntdll.dll", prepend the system directory to the dll path.
12623
0c85e18e
MK
126242009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12625
12626 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12627
9ac544ce 126282009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12629 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12630
12631 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12632 * configure.ac: Check for __mcoldfire__ and set
12633 gdb_cv_m68k_is_coldfire.
12634 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12635 reg-cf.o and reg-m68k.o.
12636 * configure: Regenerated.
12637
fd7dd3e6
PA
126382009-11-16 Pedro Alves <pedro@codesourcery.com>
12639
12640 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12641 Pass it to thread_db_free.
12642 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12643 proper `detaching' argument to linux_remove_process.
12644 * linux-low.h (thread_db_free): Add `detaching' parameter.
12645 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12646 to thread_db_free.
12647 (thread_db_free): Add `detaching' parameter. Only
12648 call td_ta_clear_event if detaching from process.
12649
75aa492e
MK
126502009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12651
12652 * thread-db.c (thread_db_free): Fix typo.
12653
21e1bee4
PP
126542009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12655
12656 PR gdb/10838
12657 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12658
8838b45e
NS
126592009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12660
12661 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12662 with an i686 compiler.
12663 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12664 needed.
12665 * configure: Rebuilt.
12666
8a35fb51
SL
126672009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12668
12669 PR gdb/10783
12670
12671 * server.c (handle_search_memory_1): Correct read_addr initialization
12672 in loop for searching subsequent chunks.
12673
96f15937
PP
126742009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12675
12676 * configure.ac: New --with-libthread-db option.
12677 * thread-db.c: Allow direct dependence on libthread_db.
12678 (thread_db_free): Adjust.
12679 * config.in: Regenerate.
12680 * configure: Likewise.
889bf7c5 12681
5f7d1694
PP
126822009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12683
12684 PR gdb/10757
12685 * thread-db.c (attach_thread): New function.
12686 (maybe_attach_thread): Return success/failure.
12687 (find_new_threads_callback): Adjust.
889bf7c5
PA
12688 (thread_db_find_new_threads): Loop until no new threads.
12689
88e3b899
PA
126902009-10-13 Pedro Alves <pedro@codesourcery.com>
12691
12692 * proc-service.c (ps_lgetregs): Formatting.
12693
cdbfd419
PP
126942009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12695
12696 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12697 * configure.ac: Adjust.
12698 * linux-low.h (struct process_info_private): Move members to struct
12699 thread_db.
12700 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12701 * linux-low.c (linux_remove_process): Adjust.
12702 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12703 * server.c (handle_query): Move code ...
12704 (handle_monitor_command): ... here. New function.
12705 * target.h (struct target_ops): New member.
12706 * thread-db.c (struct thread_db): New.
12707 (libthread_db_search_path): New variable.
12708 (thread_db_create_event, thread_db_enable_reporting)
12709 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12710 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12711 (try_thread_db_load_1, dladdr_to_soname): New functions.
12712 (try_thread_db_load, thread_db_load_search): New functions.
12713 (thread_db_init): Search for libthread_db.
12714 (thread_db_free): New function.
12715 (thread_db_handle_monitor_command): Likewise.
12716 * config.in: Regenerate.
12717 * configure: Regenerate.
889bf7c5 12718
4168d2d6
UW
127192009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12720
12721 * spu-low.c (spu_kill): Wait for inferior to terminate.
12722 Call clear_inferiors.
12723 (spu_detach): Call clear_inferiors.
12724
81ecdfbb
RW
127252009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12726
12727 * aclocal.m4: Regenerate.
12728 * config.in: Likewise.
12729 * configure: Likewise.
12730
0b9ff2c0
UW
127312009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12732
12733 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12734 (parse_spufs_run): New function.
12735 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12736 (ppc_breakpoint_at): Handle SPU breakpoints.
12737
efcbbd14
UW
127382009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12739
12740 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12741 (SPUFS_MAGIC): Define.
12742 (spu_enumerate_spu_ids): New function.
12743 (linux_qxfer_spu): New function.
12744 (linux_target_ops): Install linux_qxfer_spu.
12745
f4d9bade
UW
127462009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12747
12748 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12749 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12750 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12751 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12752 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12753 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12754 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12755 (init_registers_powerpc_cell32l): Add prototype.
12756 (init_registers_powerpc_cell64l): Likewise.
12757 (ppc_arch_setup): Detect Cell/B.E. architecture.
12758
96e946ca
RW
127592009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12760
12761 * Makefile.in (datarootdir): New variable.
12762
58d6951d
DJ
127632009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12764
12765 * linux-low.c (linux_write_memory): Update debugging output.
12766 * Makefile.in (clean): Add new descriptions.
12767 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12768 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12769 * configure.srv: Add new files for arm*-*-linux*.
12770 * linux-arm-low.c: Add new declarations.
12771 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12772 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12773 (HWCAP_VFPv3D16): New.
12774 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12775 instead of __IWMMXT__.
12776 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12777 (arm_arch_setup): New.
12778 (target_regsets): Remove #ifdef. Add VFP regset.
12779 (the_low_target): Use arm_arch_setup.
12780
12b42a12
DJ
127812009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12782
12783 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12784 the main thread again.
12785
ac8c974e
AR
127862009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12787
12788 Adding Neutrino gdbserver.
12789 * configure: Regenerated.
12790 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12791 * configure.srv (i[34567]86-*-nto*): New target.
12792 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12793 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12794 (nto_comctrl) [__QNX__]: New function.
12795 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12796
4424e0c3 127972009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12798
12799 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12800 srv_tgtobj.
12801
912cf4ba
PA
128022009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12803 Pedro Alves <pedro@codesourcery.com>
12804
12805 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12806 don't support CONTEXT_EXTENDED_REGISTERS.
12807 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12808 (the_low_target): Install them.
12809 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12810 failing with ERROR_PIPE_NOT_CONNECTED.
12811
aa5ca48f
DE
128122009-06-30 Doug Evans <dje@google.com>
12813 Pierre Muller <muller@ics.u-strasbg.fr>
12814
12815 Add h/w watchpoint support to x86-linux, win32-i386.
12816 * Makefile.in (SFILES): Add i386-low.c
12817 (i386_low_h): Define.
12818 (i386-low.o): Add dependencies.
12819 (linux-x86-low.o): Add i386-low.h dependency.
12820 (win32-i386-low.o): Ditto.
12821 * i386-low.c: New file.
12822 * i386-low.h: New file.
12823 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12824 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12825 * linux-low.c (linux_add_process): Initialize arch_private.
12826 (linux_remove_process): Free arch_private.
12827 (add_lwp): Initialize arch_private.
12828 (delete_lwp): Free arch_private.
12829 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12830 provided.
12831 * linux-low.h (process_info_private): New member arch_private.
12832 (lwp_info): New member arch_private.
12833 (linux_target_ops): New members new_process, new_thread,
12834 prepare_to_resume.
12835 (ptid_of): New macro.
12836 * linux-x86-low.c: Include stddef.h, i386-low.h.
12837 (arch_process_info): New struct.
12838 (arch_lwp_info): New struct.
12839 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12840 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12841 (i386_dr_low_get_status): New function.
12842 (x86_insert_point, x86_remove_point): New functions.
12843 (x86_stopped_by_watchpoint): New function.
12844 (x86_stopped_data_address): New function.
12845 (x86_linux_new_process, x86_linux_new_thread): New functions.
12846 (x86_linux_prepare_to_resume): New function.
12847 (the_low_target): Add entries for insert_point, remove_point,
12848 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12849 prepare_to_resume.
12850 * server.c (debug_hw_points): New global.
12851 (monitor_show_help): Document set debug-hw-points.
12852 (handle_query): Process "set debug-hw-points".
12853 * server.h (debug_hw_points): Declare.
12854 (paddress): Declare.
12855 * utils.c (NUMCELLS, CELLSIZE): New macros.
12856 (get_sell, xsnprintf, paddress): New functions.
12857 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12858 remove_point, stopped_by_watchpoint, stopped_data_address.
12859 * win32-i386-low.c: Include i386-low.h.
12860 (debug_reg_state): Replaces dr.
12861 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12862 (i386_dr_low_get_status): New function.
12863 (i386_insert_point, i386_remove_point): New functions.
12864 (i386_stopped_by_watchpoint): New function.
12865 (i386_stopped_data_address): New function.
12866 (i386_initial_stuff): Update.
12867 (get_thread_context,set_thread_context,i386_thread_added): Update.
12868 (the_low_target): Add entries for insert_point,
12869 remove_point, stopped_by_watchpoint, stopped_data_address.
12870 * win32-low.c (win32_insert_watchpoint): New function.
12871 (win32_remove_watchpoint): New function.
12872 (win32_stopped_by_watchpoint): New function.
12873 (win32_stopped_data_address): New function.
12874 (win32_target_ops): Add entries for insert_watchpoint,
12875 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12876 * win32-low.h (win32_target_ops): New members insert_point,
12877 remove_point, stopped_by_watchpoint, stopped_data_address.
12878
d993e290
PA
128792009-06-25 Pedro Alves <pedro@codesourcery.com>
12880
12881 * server.c (process_serial_event): Re-return unsupported, not
12882 error, if the type isn't recognized. Re-allow supporting only
12883 insert or remove packets. Also call require_running for
12884 breakpoints. Add missing break statement to default case. Tidy.
12885 * target.h (struct target_ops): Rename insert_watchpoint to
12886 insert_point, and remove_watchpoint to remove_point.
12887
12888 * linux-low.h (struct linux_target_ops): Likewise.
12889 * linux-low.c (linux_insert_watchpoint): Rename to ...
12890 (linux_insert_point): ... this. Adjust.
12891 (linux_remove_watchpoint): Rename to ...
12892 (linux_remove_point): ... this. Adjust.
12893 (linux_target_ops): Adjust.
12894 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12895 (cris_insert_point): ... this.
12896 (cris_remove_watchpoint): Rename to ...
12897 (cris_remove_point): ... this.
12898 (the_low_target): Adjust.
12899
0f54c268
PM
129002009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12901
12902 * server.c (handle_v_kill): Pass signal_pid to
12903 kill_inferior if multi_process is zero.
12904
c6314022
AR
129052009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12906
12907 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12908 * target.h (target_ops): Comment for *_watchpoint to make it clear
12909 the functions can get types '0' and '1'.
12910
4463ce24
AR
129112009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12912
12913 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12914 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12915 * regcache.c (get_regcache): Likewise.
12916 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12917 * win32-low.c (child_fetch_inferior_registers): Remove check for
12918 regno 0.
12919
cf8fd78b
PA
129202009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12921 Pedro Alves <pedro@codesourcery.com>
12922
12923 * target.h (struct target_ops) <supports_multi_process>: New
12924 callback.
12925 (target_supports_multi_process): New.
12926 * server.c (handle_query): Even if GDB reports support, only
12927 enable multi-process if the target also supports it. Report
12928 multi-process support only if the target backend supports it.
12929 * linux-low.c (linux_supports_multi_process): New function.
12930 (linux_target_ops): Install it as target_supports_multi_process
12931 callback.
12932
47c0c975
DE
129332009-05-24 Doug Evans <dje@google.com>
12934
e09875d4
DE
12935 Global renaming of find_thread_pid to find_thread_ptid.
12936 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12937 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12938 All callers updated.
12939
e27d73f6
DE
12940 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12941 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12942 directly.
12943
47c0c975
DE
12944 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12945 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12946 (linux_resume_one_lwp): Ditto.
12947
2acc282a
DE
129482009-05-23 Doug Evans <dje@google.com>
12949
12950 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12951 from struct inferior_list_entry * to struct lwp_info *.
12952 All callers updated.
12953
9f1036c1
DE
129542009-05-13 Doug Evans <dje@google.com>
12955
12956 * linux-x86-low.c: Don't include assert.h.
12957 (x86_siginfo_fixup): Use fatal, not assert.
12958 (x86_arch_setup): Fix comment.
12959
d0722149
DE
129602009-05-12 Doug Evans <dje@google.com>
12961
12962 Biarch support for i386/amd64 gdbserver.
12963 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12964 Add linux-x86-low.c.
12965 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12966 (linux-x86-low.o): Add.
12967 * linux-x86-64-low.c: Delete.
12968 * linux-i386-low.c: Delete.
12969 * linux-x86-low.c: New file.
12970 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12971 linux-x86-low.o.
12972 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12973 linux-x86-low.o.
12974 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12975 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12976 (linux_child_pid_to_exec_file): New function.
12977 (elf_64_header_p, elf_64_file_p): New functions.
12978 (siginfo_fixup): New function.
12979 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12980 give target a chance to convert layout.
12981 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12982 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12983
fdeb2a12
DE
129842009-05-07 Doug Evans <dje@google.com>
12985
12986 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12987 (regsets_store_inferior_registers): Ditto.
12988
a6dbe5df
PA
129892009-05-06 Pedro Alves <pedro@codesourcery.com>
12990
12991 PR server/10048
12992
12993 * linux-low.c (must_set_ptrace_flags): Delete.
12994 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12995 of the global.
12996 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12997 `lwp->must_set_ptrace_flags' instead.
ba42693b 12998 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12999 (linux_wait_1): ... not here.
13000
5091eb23
DE
130012009-04-30 Doug Evans <dje@google.com>
13002
9f767825
DE
13003 * inferiors.c (started_inferior_callback): New function.
13004 (attached_inferior_callback): New function.
13005 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13006 * server.c (print_started_pid, print_attached_pid): New functions.
13007 (detach_or_kill_for_exit): New function.
13008 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13009 * server.h (have_started_inferiors_p): Declare.
13010 (have_attached_inferiors_p): Declare.
13011
5091eb23
DE
13012 * inferiors.c (remove_process): Fix memory leak, free process.
13013 * linux-low.c (linux_remove_process): New function.
13014 (linux_kill): Call it instead of remove_process.
13015 (linux_detach, linux_wait_1): Ditto.
13016
155c8968
PA
130172009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13018
13019 * configure.srv: Add x86 Windows CE target.
13020
7fe519cb
UW
130212009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13022
13023 * inferiors.c (get_thread_process): Make global.
13024 * server.h (get_thread_process): Add prototype.
13025 * thread-db.c (find_one_thread): Use get_thread_process
13026 instead of current_process.
13027 (thread_db_get_tls_address): Do not crash if called when
13028 thread layer is not yet initialized.
13029
5472f405
UW
130302009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13031
13032 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13033 * spu-low.c (current_tid): Rename to ...
13034 (current_ptid): ... this.
13035 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13036 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13037 ptid_get_lwp (current_ptid) instead of current_tid.
13038 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13039 instead of current_tid. Use find_process_pid to verify pid
13040 argument is valid. Pass proper argument to remove_process.
13041 (spu_thread_alive): Compare current_ptid instead of current_tid.
13042 (spu_resume): Likewise.
13043
55ac2b99
PA
130442009-04-02 Pedro Alves <pedro@codesourcery.com>
13045
13046 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13047 variable.
13048
95954743
PA
130492009-04-01 Pedro Alves <pedro@codesourcery.com>
13050
13051 Implement the multiprocess extensions, and add linux multiprocess
13052 support.
13053
13054 * server.h (ULONGEST): Declare.
13055 (struct ptid, ptid_t): New.
13056 (minus_one_ptid, null_ptid): Declare.
13057 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13058 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13059 (struct inferior_list_entry): Change `id' type from unsigned from
13060 to ptid_t.
13061 (struct sym_cache, struct breakpoint, struct
13062 process_info_private): Forward declare.
13063 (struct process_info): Declare.
13064 (current_process): Declare.
13065 (all_processes): Declare.
13066 (initialize_inferiors): Declare.
13067 (add_thread): Adjust to use ptid_t.
13068 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13069 (add_process, remove_process, find_thread_pid): Declare.
13070 (find_inferior_id): Adjust to use ptid_t.
13071 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13072 (multi_process): Declare.
13073 (push_event): Adjust to use ptid_t.
13074 (read_ptid, write_ptid): Declare.
13075 (prepare_resume_reply): Adjust to use ptid_t.
13076 (clear_symbol_cache): Declare.
13077 * inferiors.c (all_processes): New.
13078 (null_ptid, minus_one_ptid): New.
13079 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13080 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13081 (add_thread): Change unsigned long to ptid. Remove gdb_id
13082 parameter. Adjust.
13083 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13084 (gdb_id_to_thread): Rename to ...
13085 (find_thread_pid): ... this. Change unsigned long to ptid.
13086 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13087 (loaded_dll, pull_pid_from_list): Adjust.
13088 (add_process, remove_process, find_process_pid)
13089 (get_thread_process, current_process, initialize_inferiors): New.
13090 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13091 (struct target_waitstatus) <related_pid>: Ditto.
13092 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13093 return type to int.
13094 (struct target_ops) <join>: Add `pid' argument.
13095 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13096 (struct target_ops) <wait>: Add `ptid' field. Change return type
13097 to ptid.
13098 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13099 (mywait): Add `ptid' argument. Change return type to ptid_t.
13100 (target_pid_to_str): Declare.
13101 * target.c (set_desired_inferior): Adjust to use ptids.
13102 (mywait): Add new `ptid' argument. Adjust.
13103 (target_pid_to_str): New.
13104 * mem-break.h (free_all_breakpoints): Declare.
13105 * mem-break.c (breakpoints): Delelete.
13106 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13107 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13108 to use per-process breakpoint list.
13109 (free_all_breakpoints): New.
13110 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13111 (symbol_cache, all_symbols_looked_up): Delete.
13112 (hexchars): New.
13113 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13114 read_ptid): New.
13115 (prepare_resume_reply): Change ptid argument's type from unsigned
13116 long to ptid_t. Adjust. Implement W;process and X;process.
13117 (free_sym_cache, clear_symbol_cache): New.
13118 (look_up_one_symbol): Adjust to per-process symbol cache. *
13119 * server.c (cont_thread, general_thread, step_thread): Change type
13120 to ptid_t.
13121 (attached): Delete.
13122 (multi_process): New.
13123 (last_ptid): Change type to ptid_t.
13124 (struct vstop_notif) <ptid>: Change type to ptid_t.
13125 (queue_stop_reply, push_event): Change `ptid' argument's type to
13126 ptid_t.
13127 (discard_queued_stop_replies): Add `pid' argument.
13128 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13129 changes. Don't reference the `attached' global.
13130 (attach_inferior): Adjust to mywait interface changes.
13131 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13132 features. Handle and report "multiprocess+". Handle
13133 "qAttached:PID".
13134 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13135 changes.
13136 (handle_v_kill): New.
13137 (handle_v_stopped): Adjust to use target_pid_to_str.
13138 (handle_v_requests): Allow multiple attaches and runs when
13139 multiprocess extensions are in effect. Handle "vKill".
13140 (myresume): Adjust to use ptids.
13141 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13142 (handle_status): Adjust to discard_queued_stop_replies interface
13143 change.
13144 (first_thread_of, kill_inferior_callback)
13145 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13146 (main): Call initialize_inferiors. Adjust to use ptids, killing
13147 and detaching from all inferiors. Handle multiprocess packet
13148 variants.
13149 * linux-low.h: Include gdb_proc_service.h.
13150 (struct process_info_private): New.
13151 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13152 <lwpid_of>: Use ptid_get_lwp.
13153 (get_lwp_thread): Adjust.
13154 (struct lwp_info): Add `dead' member.
13155 (find_lwp_pid): Declare.
13156 * linux-low.c (thread_db_active): Delete.
13157 (new_inferior): Adjust comment.
13158 (inferior_pid): Delete.
13159 (linux_add_process): New.
13160 (handle_extended_wait): Adjust.
13161 (add_lwp): Change unsigned long to ptid.
13162 (linux_create_inferior): Add process to processes table. Adjust
13163 to use ptids. Don't set new_inferior here.
13164 (linux_attach_lwp): Rename to ...
13165 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13166 it. Adjust to use ptids.
13167 (linux_attach_lwp): New.
13168 (linux_attach): Add process to processes table. Don't set
13169 new_inferior here.
13170 (struct counter): New.
13171 (second_thread_of_pid_p, last_thread_of_process_p): New.
13172 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13173 multiple processes.
13174 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13175 processes. Remove process from process table.
13176 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13177 to multiple processes.
13178 (any_thread_of): New.
13179 (linux_detach): Add `pid' argument, and handle it. Remove process
13180 from processes table.
13181 (linux_join): Add `pid' argument. Handle it.
13182 (linux_thread_alive): Change unsighed long argument to ptid_t.
13183 Consider dead lwps as not being alive.
13184 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13185 threads we're not interested in.
13186 (same_lwp, find_lwp_pid): New.
13187 (linux_wait_for_lwp): Change `pid' argument's type from int to
13188 ptid_t. Adjust.
13189 (linux_wait_for_event): Rename to ...
13190 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13191 from int to ptid_t. Adjust.
13192 (linux_wait_for_event): New.
13193 (linux_wait_1): Add `ptid' argument. Change return type to
13194 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13195 that exit from the process table.
13196 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13197 Adjust.
13198 (mark_lwp_dead): New.
13199 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13200 stopping all threads, mark its main lwp as dead.
13201 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13202 ptids.
13203 (fetch_register, usr_store_inferior_registers)
13204 (regsets_fetch_inferior_registers)
13205 (regsets_store_inferior_registers, linux_read_memory)
13206 (linux_write_memory): Inline `inferior_pid'.
13207 (linux_look_up_symbols): Adjust to use per-process
13208 `thread_db_active'.
13209 (linux_request_interrupt): Adjust to use ptids.
13210 (linux_read_auxv): Inline `inferior_pid'.
13211 (initialize_low): Don't reference thread_db_active.
13212 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13213 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13214 (ps_getpid): Return the pid of the current inferior.
13215 * thread-db.c (proc_handle, thread_agent): Delete.
13216 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13217 per-process data.
13218 (find_one_thread): Change argument type to ptid_t. Adjust to
13219 per-process data.
13220 (maybe_attach_thread): Adjust to per-process data and ptids.
13221 (thread_db_find_new_threads): Ditto.
13222 (thread_db_init): Ditto.
13223 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13224 processes table. Adjust to use ptids.
13225 (spu_kill, spu_detach): Adjust interface. Remove process from
13226 processes table.
13227 (spu_join, spu_thread_alive): Adjust interface.
13228 (spu_wait): Adjust interface. Remove process from processes
13229 table. Adjust to use ptids.
13230 * win32-low.c (current_inferior_tid): Delete.
13231 (current_inferior_ptid): New.
13232 (debug_event_ptid): New.
13233 (thread_rec): Take a ptid. Adjust.
13234 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13235 (child_delete_thread): Ditto.
13236 (do_initial_child_stuff): Add `attached' argument. Add process to
13237 processes table.
13238 (child_fetch_inferior_registers, child_store_inferior_registers):
13239 Adjust.
13240 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13241 (win32_attach): Pass 1 to do_initial_child_stuff.
13242 (win32_kill): Adjust interface. Remove process from processes
13243 table.
13244 (win32_detach): Ditto.
13245 (win32_join): Adjust interface.
13246 (win32_thread_alive): Take a ptid.
13247 (win32_resume): Adjust to use ptids.
13248 (get_child_debug_event): Ditto.
13249 (win32_wait): Adjust interface. Remove exiting process from
13250 processes table.
13251
bd99dc85
PA
132522009-04-01 Pedro Alves <pedro@codesourcery.com>
13253
13254 Non-stop mode support.
13255
13256 * server.h (non_stop): Declare.
13257 (gdb_client_data, handler_func): Declare.
13258 (delete_file_handler, add_file_handler, start_event_loop):
13259 Declare.
13260 (handle_serial_event, handle_target_event, push_event)
13261 (putpkt_notif): Declare.
13262 * target.h (enum resume_kind): New.
13263 (struct thread_resume): Replace `step' field by `kind' field.
13264 (TARGET_WNOHANG): Define.
13265 (struct target_ops) <wait>: Add `options' argument.
13266 <supports_non_stop, async, start_non_stop>: New fields.
13267 (target_supports_non_stop, target_async): New.
13268 (start_non_stop): Declare.
13269 (mywait): Add `options' argument.
13270 * target.c (mywait): Add `options' argument. Print child exit
13271 notifications here.
13272 (start_non_stop): New.
13273 * server.c (non_stop, own_buf, mem_buf): New globals.
13274 (struct vstop_notif): New.
13275 (notif_queue): New global.
13276 (queue_stop_reply, push_event, discard_queued_stop_replies)
13277 (send_next_stop_reply): New.
13278 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13279 interface changes.
13280 (attach_inferior): In non-stop mode, don't wait for the target
13281 here.
13282 (handle_general_set): Handle QNonStop.
13283 (handle_query): When handling qC, return the current general
13284 thread, instead of the first thread of the list.
13285 (handle_query): If the backend supports non-stop mode, include
13286 QNonStop+ in the qSupported query response.
13287 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13288 and non-stop mode.
13289 (handle_v_attach, handle_v_run): Handle non-stop mode.
13290 (handle_v_stopped): New.
13291 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13292 (myresume): Adjust to use resume_kind. Handle non-stop.
13293 (queue_stop_reply_callback): New.
13294 (handle_status): Handle non-stop mode.
13295 (main): Clear non_stop flag on reconnection. Use the event-loop.
13296 Refactor serial protocol handling from here ...
13297 (process_serial_event): ... to this new function. When GDB
13298 selects any thread, select one here. In non-stop mode, wait until
13299 GDB acks all pending events before exiting.
13300 (handle_serial_event, handle_target_event): New.
13301 * remote-utils.c (remote_open): Install remote_desc in the event
13302 loop.
13303 (remote_close): Remove remote_desc from the event loop.
13304 (putpkt_binary): Rename to...
13305 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13306 (putpkt_binary): New as wrapper around putpkt_binary_1.
13307 (putpkt_notif): New.
13308 (prepare_resume_reply): In non-stop mode, don't change the
13309 general_thread.
13310 * event-loop.c: New.
13311 * Makefile.in (OBJ): Add event-loop.o.
13312 (event-loop.o): New rule.
13313
13314 * linux-low.h (pid_of): Moved here.
13315 (lwpid_of): New.
13316 (get_lwp_thread): Use lwpid_of.
13317 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13318 * linux-low.c (pid_of): Delete.
13319 (inferior_pid): Use lwpid_of.
13320 (linux_event_pipe): New.
13321 (target_is_async_p): New.
13322 (delete_lwp): New.
13323 (handle_extended_wait): Use lwpid_of.
13324 (add_lwp): Don't set lwpid field.
13325 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13326 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13327 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13328 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13329 first. Adjust to linux_wait_for_event interface changes. Use
13330 lwpid_of.
13331 (linux_detach): Don't delete the main lwp here.
13332 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13333 (status_pending_p): Don't consider explicitly suspended lwps.
13334 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13335 pointer. Add OPTIONS argument. Change return type to int. Use
13336 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13337 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13338 pointer. Add status pointer argument. Return a pid instead of a
13339 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13340 changes. In non-stop mode, don't switch to a random thread.
13341 (linux_wait): Rename to...
13342 (linux_wait_1): ... this. Add target_options argument, and handle
13343 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13344 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13345 clean exit and signal exit code. Don't stop all threads in
13346 non-stop mode. In all-stop mode, only stop all threads when
13347 reporting a stop to GDB. Handle explicit thread stop requests.
13348 (async_file_flush, async_file_mark): New.
13349 (linux_wait): New.
13350 (send_sigstop): Use lwpid_of.
13351 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13352 interface changes. In non-stop mode, don't switch to a random
13353 thread.
13354 (linux_resume_one_lwp): Use lwpid_of.
13355 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13356 (linux_resume_one_thread): ... this. Handle resume_stop. In
13357 non-stop mode, don't look for pending flag in all threads.
13358 (resume_status_pending_p): Don't consider explicitly suspended
13359 threads.
13360 (my_waitpid): Reimplement. Emulate __WALL.
13361 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13362 Use lwpid_of.
13363 (sigchld_handler, linux_supports_non_stop, linux_async)
13364 (linux_start_non_stop): New.
13365 (linux_target_ops): Register linux_supports_non_stop, linux_async
13366 and linux_start_non_stop.
13367 (initialize_low): Install SIGCHLD handler.
13368 * thread-db.c (thread_db_create_event, find_one_thread)
13369 (thread_db_get_tls_address): Use lwpid_of.
13370 * win32-low.c (win32_detach): Adjust to use resume_kind.
13371 (win32_wait): Add `options' argument.
13372 * spu-low.c (spu_resume): Adjust to use resume_kind.
13373 (spu_wait): Add `options' argument.
13374
5b1c542e
PA
133752009-04-01 Pedro Alves <pedro@codesourcery.com>
13376
13377 Decouple target code from remote protocol.
13378
13379 * target.h (enum target_waitkind): New.
13380 (struct target_waitstatus): New.
13381 (struct target_ops) <wait>: Return an unsigned long. Take a
13382 target_waitstatus pointer instead of a char pointer.
13383 (mywait): Likewise.
13384 * target.c (mywait): Change prototype to return an unsigned long.
13385 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13386 * server.h (thread_from_wait, old_thread_from_wait): Delete
13387 declarations.
13388 (prepare_resume_reply): Change prototype to take a
13389 target_waitstatus.
13390 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13391 (last_status, last_ptid): New.
13392 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13393 pid instead of a signal.
13394 (attach_inferior): Remove "status" and "signal" parameters.
13395 Adjust.
13396 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13397 not as an address.
13398 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13399 (handle_v_requests, myresume): Remove "status" and "signal"
13400 parameters. Adjust.
13401 (handle_status): New.
13402 (main): Delete local `status'. Adjust.
13403 * remote-utils.c: Include target.h.
13404 (prepare_resume_reply): Change prototype to take a
13405 target_waitstatus. Adjust.
13406
13407 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13408 interface.
13409 * spu-low.c (spu_wait): Adjust.
13410 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13411 Delete.
13412 (win32_wait): Adjust.
13413
2bd7c093
PA
134142009-04-01 Pedro Alves <pedro@codesourcery.com>
13415
13416 * target.h (struct thread_resume): Delete leave_stopped member.
13417 (struct target_ops): Add a `n' argument to the `resume' callback.
13418 * server.c (start_inferior): Adjust.
13419 (handle_v_cont, myresume): Adjust.
13420 * linux-low.c (check_removed_breakpoint): Adjust to resume
13421 interface change, and to removed leave_stopped field.
13422 (resume_ptr): Delete.
13423 (struct thread_resume_array): New.
13424 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13425 resume interface change.
13426 (linux_continue_one_thread, linux_queue_one_thread)
13427 (resume_status_pending_p): Check if the resume field is NULL
13428 instead of checking the leave_stopped member.
13429 (linux_resume): Adjust to the target resume interface change.
13430 * spu-low.c (spu_resume): Adjust to the target resume interface
13431 change.
13432 * win32-low.c (win32_detach, win32_resume): Ditto.
13433
c35fafde
PA
134342009-04-01 Pedro Alves <pedro@codesourcery.com>
13435
13436 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13437 flag.
13438 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13439 pending.
13440 (linux_continue_one_thread): Only preserve the stepping flag if
13441 there's a pending breakpoint.
13442
0a59d50b
PA
134432009-03-31 Pedro Alves <pedro@codesourcery.com>
13444
13445 * server.c (main): After the inferior having exited, call
13446 remote_close before exiting gdbserver.
13447
f04c6d38
TJB
134482009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13449
13450 Fix size of FPSCR in Power 7 processors.
13451 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13452 (PPC_FEATURE_HAS_DFP): New #define.
13453 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13454 size of the FPSCR.
13455
78e5cee6
PA
134562009-03-23 Pedro Alves <pedro@codesourcery.com>
13457
13458 * server.c (handle_query) Whitespace and formatting.
13459
1b3f6016
PA
134602009-03-22 Pedro Alves <pedro@codesourcery.com>
13461
13462 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13463 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13464 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13465 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13466 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13467 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13468 Makefile.in, configure.ac: Fix whitespace throughout.
13469 * configure: Regenerate.
13470
a07b2135
PA
134712009-03-22 Pedro Alves <pedro@codesourcery.com>
13472
13473 * inferiors.c (find_inferior): Make it safe for the callback
13474 function to delete the currently iterated inferior.
13475
67cc2626
PA
134762009-03-22 Pedro Alves <pedro@codesourcery.com>
13477
13478 * Makefile.in (linuw_low_h): Move higher.
13479 (thread-db.o): Depend on $(linux_low_h).
13480
54a0b537
PA
134812009-03-17 Pedro Alves <pedro@codesourcery.com>
13482
13483 Rename "process" to "lwp" throughout.
13484
13485 * linux-low.c (all_processes): Rename to...
13486 (all_lwps): ... this.
13487 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13488 (add_process): Rename to ...
13489 (add_lwp): ... this. Adjust.
13490 (linux_create_inferior): Adjust.
13491 (linux_attach_lwp): Adjust.
13492 (linux_attach): Adjust.
13493 (linux_kill_one_process): Rename to ...
13494 (linux_kill_one_lwp): ... this. Adjust.
13495 (linux_kill): Adjust.
13496 (linux_detach_one_process): Rename to ...
13497 (linux_detach_one_lwp): ... this. Adjust.
13498 (linux_detach): Adjust.
13499 (check_removed_breakpoint): Adjust.
13500 (status_pending_p): Adjust.
13501 (linux_wait_for_process): Rename to ...
13502 (linux_wait_for_lwp): ... this. Adjust.
13503 (linux_wait_for_event): Adjust.
13504 (send_sigstop): Adjust.
13505 (wait_for_sigstop): Adjust.
13506 (stop_all_processes): Rename to ...
13507 (stop_all_lwps): ... this.
13508 (linux_resume_one_process): Rename to ...
13509 (linux_resume_one_lwp): ... this. Adjust.
13510 (linux_set_resume_request, linux_continue_one_thread)
13511 (linux_queue_one_thread, resume_status_pending_p)
13512 (usr_store_inferior_registers, regsets_store_inferior_registers)
13513 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13514 Adjust.
13515 * linux-low.h (get_process): Rename to ...
13516 (get_lwp): ... this. Adjust.
13517 (get_thread_process): Rename to ...
13518 (get_thread_lwp): ... this. Adjust.
13519 (get_process_thread): Rename to ...
13520 (get_lwp_thread): ... this. Adjust.
13521 (struct process_info): Rename to ...
13522 (struct lwp_info): ... this.
13523 (all_processes): Rename to ...
13524 (all_lwps): ... this.
13525 * proc-service.c (ps_lgetregs): Adjust.
13526 * thread-db.c (thread_db_create_event, find_one_thread)
13527 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13528
0b16c5cf
PA
135292009-03-14 Pedro Alves <pedro@codesourcery.com>
13530
13531 * server.c (handle_query): Handle "qAttached".
13532
32de4b9d
NS
135332009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13534
13535 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13536 GPLv3, update license URL.
13537
2aecd87f
DE
135382009-03-01 Doug Evans <dje@google.com>
13539
93efd302 13540 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13541 (server_h): Add gdb_signals.h.
13542 (signals.o): Update.
13543 * server.h (target_signal_from_host,target_signal_to_host_p)
13544 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13545
86b1f9c5
PM
135462009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13547
13548 * remote-utils.c (getpkt): Also generate remote-debug
13549 information if noack_mode is set.
13550
4aa995e1
PA
135512009-02-06 Pedro Alves <pedro@codesourcery.com>
13552
13553 * server.c (handle_query): Report qXfer:siginfo:read and
13554 qXfer:siginfo:write as supported and handle them.
13555 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13556 * linux-low.c (linux_xfer_siginfo): New.
13557 (linux_target_ops): Set it.
13558
62709adf
PA
135592009-01-26 Pedro Alves <pedro@codesourcery.com>
13560
13561 * server.c (gdbserver_usage): Mention --remote-debug.
13562 (main): Accept '--remote-debug' switch.
13563
aef93bd7
DE
135642009-01-18 Doug Evans <dje@google.com>
13565
13566 * regcache.c (new_register_cache): No need to check result of xcalloc.
13567 * server.c (handle_search_memory): Back out calls to xmalloc,
13568 result is checked and error is returned to user upon failure.
13569 (handle_query): Ditto. Add more checks for result of malloc.
13570 (handle_v_cont): Check result of malloc, report error back to
13571 user upon failure.
13572 (handle_v_run): Ditto. Call freeargv.
13573 * server.h (freeargv): Declare.
13574 * utils.c (freeargv): New fn.
13575
54363045
DE
135762009-01-15 Doug Evans <dje@google.com>
13577
f626972c
DE
13578 * gdbreplay.c (perror_with_name): Make arg const char *.
13579 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13580 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13581 * utils.c (perror_with_name): Make arg const char *.
54363045 13582
18aae699
PA
135832009-01-14 Pedro Alves <pedro@codesourcery.com>
13584
13585 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13586 when handling a EXIT_PROCESS_DEBUG_EVENT.
13587
ff703abe
JB
135882009-01-06 Joel Brobecker <brobecker@adacore.com>
13589
13590 * gdbreplay.c (gdbreplay_version): Update copyright year.
13591 * server.c (gdbserver_version): Likewise.
13592
f21cc1a2 135932009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13594
13595 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13596 (handle_extended_wait): Improve comment.
0e21c1ec 13597
bca929d3
DE
135982008-12-13 Doug Evans <dje@google.com>
13599
13600 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13601 * server.h (ATTR_MALLOC): New macro.
13602 (xmalloc,xcalloc,xstrdup): Declare.
13603 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13604 * inferiors.c: Ditto.
13605 * linux-low.c: Ditto.
13606 * mem-break.c: Ditto.
13607 * regcache.c: Ditto.
13608 * remote-utils.c: Ditto.
13609 * server.c: Ditto.
13610 * target.c: Ditto.
13611 * win32-low.c: Ditto.
13612
97438e3f
DE
136132008-12-12 Doug Evans <dje@google.com>
13614
896c7fbb
DE
13615 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13616 in debugging printf.
13617
97438e3f
DE
13618 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13619
e3b886f8
DE
136202008-12-09 Doug Evans <dje@google.com>
13621
13622 * linux-low.h (struct process_info): Delete member tid, unused.
13623 * thread-db.c (find_one_thread): Update.
13624 (maybe_attach_thread): Update.
13625
07e059b5
VP
136262008-12-02 Pedro Alves <pedro@codesourcery.com>
13627
889bf7c5
PA
13628 * target.h (struct target_ops): Add qxfer_osdata member.
13629 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13630 and dirent.h.
13631 (linux_qxfer_osdata): New functions.
13632 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13633 callback.
13634 * server.c (handle_query): Handle "qXfer:osdata:read:".
13635 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13636 (buffer_xml_printf): New functions.
13637 * server.h (struct buffer): New.
13638 (buffer_grow_str, buffer_grow_str0): New macros.
13639 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13640 (buffer_xml_printf): Declare.
07e059b5 13641
4cab47ab
DE
136422008-11-24 Doug Evans <dje@google.com>
13643
13644 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13645
f142445f
DJ
136462008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13647
13648 * server.c (handle_v_run): Always use the supplied argument list.
13649
d0107bb6 136502008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13651
d0107bb6
BW
13652 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13653 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13654
2c4ad781
TJB
136552008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13656
13657 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13658 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13659 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13660 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13661 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13662 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13663 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13664 XML target descriptions.
13665 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13666 when inferior is running on an ISA 2.05 or later processor. Add
13667 special case to return offset for full 64-bit slot of FPSCR when
13668 in 32-bits.
13669
dfb64f85
DJ
136702008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13671
13672 * Makefile.in (SFILES, clean): Added sparc64 files.
13673 (reg-sparc64.o, reg-sparc64.c): New.
13674 * configure.srv (sparc*-*-linux*): New configuration.
13675 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13676 syscall arguments for SPARC.
13677 (regsets_store_inferior_registers): Likewise.
13678 * linux-sparc-low.c: New file.
13679
66b6e1dd
DE
136802008-10-21 Doug Evans <dje@google.com>
13681
13682 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13683 (READLINE_DIR,READLINE_DEP): Delete.
13684 (INTERNAL_CFLAGS): Update.
13685 (LINTFLAGS): Update.
13686
9b710a42
PA
136872008-10-10 Pedro Alves <pedro@codesourcery.com>
13688
13689 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13690 whole argv from the last run, not just argv[0].
13691
5822d809
PA
136922008-09-08 Pedro Alves <pedro@codesourcery.com>
13693
13694 * regcache.c (new_register_cache): Return NULL if the register
13695 cache size isn't known yet.
13696 (free_register_cache): Avoid dereferencing a NULL regcache.
13697
74aac56f
DJ
136982008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13699
13700 * configure.srv: Merge MIPS and MIPS64.
13701
400b20f5
MR
137022008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13703
13704 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13705
677c5bb1
LM
137062008-08-18 Luis Machado <luisgpm@br.ibm.com>
13707
13708 * Makefile.in: Add required vsx dependencies.
13709
13710 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13711 Declare init_registers_powerpc_vsx32l.
13712 Declare init_registers_powerpc_vsx64l.
13713 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13714 (ppc_arch_setup): Check for VSX in hwcap.
13715 (ppc_fill_vsxregset): New function.
13716 (ppc_store_vsxregset): New function.
13717 Add new VSX entry in regset_info target_regsets.
13718
13719 * configure.srv: Add new VSX dependencies.
13720
a6f3e723
SL
137212008-08-12 Pedro Alves <pedro@codesourcery.com>
13722
13723 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13724 (remote_open): Set or clear transport_is_reliable.
13725 (putpkt_binary): Don't expect acks in noack mode.
13726 (getpkt): Don't send ack/nac in noack mode.
13727 * server.c (handle_general_set): Handle QStartNoAckMode.
13728 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13729 qSupported.
13730 (main): Reset noack_mode on every connection.
13731 * server.h (noack_mode): Declare.
13732
a417dc56
RW
137332008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13734
13735 * Makefile.in (GDBREPLAY_OBS): New variable.
13736 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13737
3221518c
UW
137382008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13739 Daniel Jacobowitz <dan@codesourcery.com>
13740
13741 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13742 (usr_store_inferior_registers): Likewise.
13743 (regsets_store_inferior_registers): Likewise.
13744
ec56be1b
PA
137452008-07-31 Rolf Jansen <rj@surtec.com>
13746 Pedro Alves <pedro@codesourcery.com>
13747
13748 * configure.ac: Check for memmem declaration.
13749 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13750 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13751 (disable_packet_qfThreadInfo): Unconditionally compile.
13752 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13753 * configure, config.in: Regenerate.
13754
2fe5e3ff
DE
137552008-07-28 Doug Kwan <dougkwan@google.com>
13756
13757 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13758 (linux_write_memory): Remove declaration of errno.
13759
836acd6d
UW
137602008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13761
13762 * linux-low.c (handle_extended_wait): Do not use "status"
13763 variable uninitialized.
13764
aeba519e
PA
137652008-07-07 Pedro Alves <pedro@codesourcery.com>
13766
13767 * server.c (handle_v_attach): Inhibit reporting dll changes.
13768
db42f210
PA
137692008-06-27 Pedro Alves <pedro@codesourcery.com>
13770
13771 * remote-utils.c (prepare_resume_reply): If requested, don't
13772 output "thread:TID" in the T stop reply.
13773
13774 * server.c (disable_packet_vCont, disable_packet_Tthread)
13775 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13776 (handle_query): If requested, disable support for qC, qfThreadInfo
13777 and qsThreadInfo.
13778 (handle_v_requests): If requested, disable support for vCont.
13779 (gdbserver_show_disableable): New.
13780 (main): Handle --disable-packet and --disable-packet=LIST.
13781
13782 * server.h (disable_packet_vCont, disable_packet_Tthread)
13783 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13784
8e4c5421
CD
137852008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13786
13787 * server.c (gdbserver_usage): Mention --version.
13788
6e23a804
DJ
137892008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13790
13791 * Makefile.in (gdbreplay.o): New rule.
13792
90aa6a40
JM
137932008-06-06 Joseph Myers <joseph@codesourcery.com>
13794
13795 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13796 message, not gdbserver.
13797
c16158bc 137982008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13799 Nathan Sidwell <nathan@codesourcery.com>
13800 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13801
13802 * acinclude.m4: Include ../../config/acx.m4.
13803 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13804 * configure, config.in: Regenerate.
13805 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13806 * server.c (gdbserver_version): Print PKGVERSION.
13807 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13808 (main): Adjust gdbserver_usage calls.
13809 * gdbreplay.c (version, host_name): Add declarations.
13810 (gdbreplay_version, gdbreplay_usage): New.
13811 (main): Accept --version and --help options.
13812
aeb75bf5
DJ
138132008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13814
13815 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13816 (arm_breakpoint_at): Handle Thumb.
13817 (the_low_target): Add comment.
13818
76b233dd
UW
138192008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13820
13821 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13822
08388c79
DE
138232008-05-09 Doug Evans <dje@google.com>
13824
a3c83fae
DE
13825 * server.h (decode_search_memory_packet): Declare.
13826 * remote-utils.c (decode_search_memory_packet): New fn.
13827 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13828 (handle_search_memory): New fn.
13829 (handle_query): Process qSearch:memory packets.
13830
bb9c3d36
UW
138312008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13832
13833 * regcache.c (registers_length): Remove.
13834 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13835 full register packet.
13836 * regcache.h (registers_length): Remove prototype.
13837 * server.h (PBUFSIZ): Define to 16384.
13838
7284e1be
UW
138392008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13840
13841 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13842 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13843 powerpc-64l.o, and powerpc-altivec64l.o.
13844 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13845 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13846 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13847 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13848 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13849 to srv_xmlfiles.
13850
13851 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13852 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13853 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13854 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13855 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13856 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13857 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13858 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13859 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13860 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13861 (clean): Update.
13862
13863 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13864 (init_registers_powerpc_32l): ... this new prototype.
13865 (init_registers_powerpc_32): Remove, replace by ...
13866 (init_registers_powerpc_altivec32l): ... this new prototype.
13867 (init_registers_powerpc_e500): Remove, replace by ...
13868 (init_registers_powerpc_e500l): ... this new prototype.
13869 (init_registers_ppc64): Remove, replace by ...
13870 (init_registers_powerpc_64l): ... this new prototype.
13871 (init_registers_powerpc_64): Remove, replace by ...
13872 (init_registers_powerpc_altivec64l): ... this new prototype.
13873 (ppc_num_regs): Set to 73.
13874 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13875 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13876 (ppc_cannot_store_register): Handle orig_r3 and trap.
13877 (ppc_arch_setup): Update init_registers_... calls.
13878 (ppc_fill_gregset): Handle orig_r3 and trap.
13879
13880 * inferiors.c (clear_inferiors): Reset current_inferior.
13881
fdc59709
PB
138822008-04-23 Paolo Bonzini <bonzini@gnu.org>
13883
889bf7c5
PA
13884 * acinclude.m4: Add override.m4.
13885 * configure: Regenerate.
fdc59709 13886
c9b2f845
UW
138872008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13888
13889 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13890 initial call to init_register_ppc64.
13891
550512b8
UW
138922008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13893
43aaf8b6
PA
13894 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13895 single powerpc*-*-linux* case.
550512b8
UW
13896 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13897
b6430ec3
UW
138982008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13899
13900 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13901 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13902 from reg_xmlfiles.
13903 * linux-ppc-low.c: Include <elf.h>.
13904 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13905 (ppc_hwcap): New global variable.
13906 (ppc_regmap): Remove __SPE__ #ifdef sections.
13907 (ppc_regmap_e500): New global variable.
13908 (ppc_cannot_store_register): Update __SPE__ special case.
13909 (ppc_get_hwcap): New function.
13910 (ppc_arch_setup): Use it to determine whether inferior supports
13911 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13912 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13913 Do not access registers if target does not support AltiVec.
13914 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13915 Do not access registers if target does not support SPE.
13916 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13917
52fa2412
UW
139182008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13919
13920 * linux-low.c (disabled_regsets, num_regsets): New.
13921 (use_regsets_p): Delete.
13922 (linux_wait_for_process): Clear disabled_regsets.
13923 (regsets_fetch_inferior_registers): Check and set it.
13924 (regsets_store_inferior_registers): Likewise.
13925 (linux_fetch_registers, linux_store_registers): Do not use
13926 use_regsets_p.
13927 (initialize_low): Allocate disabled_regsets.
13928
e28b3332
DJ
139292008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13930
13931 * Makefile.in (LIBOBJS): New.
13932 (OBS): Use LIBOBJS.
13933 (memmem.o): New rule.
13934 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13935 * configure: Regenerated.
13936
4536995d
UW
139372008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13938
13939 * server.c (handle_query): Never return "unsupported" for
13940 qXfer:features:read queries.
13941
221c031f
UW
139422008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13943
13944 * server.c (get_features_xml): Fix inverted condition.
13945 (handle_query): Always support qXfer:feature:read.
13946
ccd213ac
DJ
139472008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13948
13949 * server.c (wrapper_argv): New.
13950 (start_inferior): Handle wrapper_argv. If set, expect an extra
13951 trap.
13952 (gdbserver_usage): Document --wrapper.
13953 (main): Parse --wrapper.
13954
6fe305f7
UW
139552008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13956
13957 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13958 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13959 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13960 (ppc_set_pc): Likewise.
13961 (ppc_arch_setup): New function.
13962 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13963 of collect_register.
889bf7c5 13964 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13965
5b0a002e
UW
139662008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13967
13968 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13969 instead of linux-ppc64-low.o.
13970 * linux-ppc64-low.c: Remove file.
13971 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13972 (linux-ppc64-low.o): Remove rule.
13973
13974 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13975 (init_registers_powerpc_64): Likewise.
13976 (ppc_regmap): Conditionally define depending on __powerpc64__.
13977 (ppc_cannot_store_register): Do not special-case "fpscr" when
13978 compiled on __powerpc64__.
13979 (ppc_collect_ptrace_register): New function.
13980 (ppc_supply_ptrace_register): New function.
13981 (ppc_breakpoint): Change type to "unsigned int".
13982 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13983 (the_low_target): Conditionally provide initializers for the
889bf7c5 13984 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13985 collect_ptrace_register and supply_ptrace_register members.
13986
9b4b61c8
UW
139872008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13988
13989 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13990 * server.c (gdbserver_xmltarget): Define.
13991 (get_features_xml): Use it to replace "target.xml" and arch_string.
13992
13993 * configure.srv: Remove srv_xmltarget. Add XML files that were
13994 mentioned there to srv_xmlfiles instead. Remove conditional tests
13995 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13996 srv_xmlfiles and srv_regobj to include all possible choices.
13997 * configure.ac (srv_xmltarget): Remove.
13998 (srv_xmlfiles): Do not add "target.xml".
13999 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14000 checks for supplementary target information.
14001 * configure: Regenerate.
14002 * Makefile.in (XML_TARGET): Remove.
14003 (target.xml): Remove rule.
14004 (clean): Do not clean up target.xml.
14005 (.PRECIOUS): Do not mention target.xml.
14006
14007 * target.h (struct target_ops): Remove arch_string member.
14008 * linux-low.c (linux_arch_string): Remove.
14009 (linux_target_ops): Remove arch_string initializer.
14010 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14011 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14012 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14013 * spu-low.c (spu_arch_string): Remove.
14014 (spu_target_ops): Remove arch_string initializer.
14015 * win32-low.c (win32_arch_string): Remove.
14016 (win32_target_ops): Remove arch_string initializer.
14017 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14018 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14019 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14020
ee1a7ae4
UW
140212008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14022
14023 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14024 by collect_ptrace_register and supply_ptrace_register hooks.
14025 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14026 instead of checking for the_low_target.left_pad_xfer.
14027 (usr_store_inferior_registers): Use collect_ptrace_register callback
14028 instead of checking for the_low_target.left_pad_xfer.
14029
14030 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14031 (s390_supply_ptrace_register): Likewise.
14032 (s390_fill_gregset): Call s390_collect_ptrace_register.
14033 (the_low_target): Update.
14034
14035 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14036 (ppc_supply_ptrace_register): Likewise.
14037 (the_low_target): Update.
14038
14039 * linux-i386-low.c (the_low_target): Update.
14040 * linux-x86-64-low.c (the_low_target): Update.
14041
d61ddec4
UW
140422008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14043
14044 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14045 reg-s390.o and reg-s390x.o.
14046
14047 * linux-low.c (new_inferior): New global variable.
14048 (linux_create_inferior, linux_attach): Set it.
14049 (linux_wait_for_process): Call the_low_target.arch_setup after the
14050 target has stopped for the first time.
14051 (initialize_low): Do not call the_low_target.arch_setup.
14052
14053 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14054 (s390_set_pc): Likewise.
14055 (s390_arch_setup): New function.
14056 (the_low_target): Use s390_arch_setup as arch_setup routine.
14057
14058 * regcache.c (realloc_register_cache): New function.
14059 (set_register_cache): Call it for each existing regcache.
14060
d05b4ac3
UW
140612008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14062
14063 * server.h (init_registers): Remove prototype.
14064
14065 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14066 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14067 instead of init_registers ().
14068 * linux-arm-low.c (init_registers_arm): Add prototype.
14069 (init_registers_arm_with_iwmmxt): Likewise.
14070 (the_low_target): Add initializer for arch_setup field.
14071 * linux-cris-low.c (init_registers_cris): Add prototype.
14072 (the_low_target): Add initializer for arch_setup field.
14073 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14074 (the_low_target): Add initializer for arch_setup field.
14075 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14076 (the_low_target): Add initializer for arch_setup field.
14077 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14078 (the_low_target): Add initializer for arch_setup field.
14079 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14080 (the_low_target): Add initializer for arch_setup field.
14081 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14082 (the_low_target): Add initializer for arch_setup field.
14083 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14084 (init_registers_mips64_linux): Likewise.
14085 (the_low_target): Add initializer for arch_setup field.
14086 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14087 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14088 (the_low_target): Add initializer for arch_setup field.
14089 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14090 (init_registers_powerpc_64): Likewise.
14091 (the_low_target): Add initializer for arch_setup field.
14092 * linux-s390-low.c (init_registers_s390): Add prototype.
14093 (init_registers_s390x): Likewise.
14094 (the_low_target): Add initializer for arch_setup field.
14095 * linux-sh-low.c (init_registers_sh): Add prototype.
14096 (the_low_target): Add initializer for arch_setup field.
14097 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14098 (the_low_target): Add initializer for arch_setup field.
14099 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14100 (the_low_target): Add initializer for arch_setup field.
14101
14102 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14103 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14104 instead of init_registers ().
14105 * win32-arm-low.c (init_registers_arm): Add prototype.
14106 (the_low_target): Add initializer for arch_setup field.
14107 * win32-i386-low.c (init_registers_i386): Add prototype.
14108 (the_low_target): Add initializer for arch_setup field.
14109
14110 * spu-low.c (init_registers_spu): Add prototype.
14111 (initialize_low): Call initialie_registers_spu () instead of
14112 initialize_registers ().
14113
fd96d250
PA
141142008-02-19 Pedro Alves <pedro@codesourcery.com>
14115
14116 * server.c (handle_v_requests): When handling the vRun and vAttach
14117 packets, if already debugging a process, don't kill it. Return an
14118 error instead.
14119
d41b6bb4
DJ
141202008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14121
14122 * server.c (handle_query): Correct length check.
14123
5ac588cf
PA
141242008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14125
14126 * win32-low.c (do_initial_child_stuff): Add process handle
14127 parameter. Set current_process_handle and current_process_id from the
14128 parameters. Clear globals.
14129 (win32_create_inferior): Don't set current_process_handle and
14130 current_process_id here. Instead pass them on the call to
14131 do_initial_child_stuff.
14132 (win32_attach): Likewise.
14133 (win32_clear_inferiors): New.
14134 (win32_kill): Don't close the current process handle or the
14135 current thread handle here. Instead call win32_clear_inferiors.
14136 (win32_detach): Don't open a new handle to the process. Call
14137 win32_clear_inferiors.
14138 (win32_join): Don't rely on current_process_handle; open a new
14139 handle using the process id.
14140 (win32_wait): Call win32_clear_inferiors when the inferior process
14141 has exited.
14142
ecd7ecbc
DJ
141432008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14144
14145 * server.c (monitor_show_help): Add "exit".
14146
1525d545
MG
141472008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14148
ecd7ecbc 14149 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14150 (clean): Add reg-xtensa.c.
14151 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14152 * configure.srv (xtensa*-*-linux*) New target.
14153 * linux-xtensa-low.c: New.
14154 * xtensa-xtregs.c: New.
1525d545 14155
59a016f0
PA
141562008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14157
14158 * hostio.c: Don't include errno.h.
14159 (errno_to_fileio_errno): Move to hostio-errno.
14160 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14161 error number outputting to the target->hostio_last_error callback.
14162 (hostio_packet_error): Use FILEIO_EINVAL directly.
14163 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14164 calls to hostio_error.
14165 * hostio-errno.c: New.
14166 * server.h (hostio_last_error_from_errno): Declare.
14167 * target.h (target_ops): Add hostio_last_error member.
14168 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14169 as hostio_last_error handler.
889bf7c5 14170 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14171 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14172 (wince_hostio_last_error): New functions.
14173 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14174 as hostio_last_error handler.
14175 (win32_target_ops) [!_WIN32_WCE]: Register
14176 hostio_last_error_from_errno as hostio_last_error handler.
14177 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14178 (hostio-errno.o): New rule.
14179 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14180 * configure.srv (srv_hostio_err_objs): New variable. Default to
14181 hostio-errno.o.
14182 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14183 * configure: Regenerate.
14184
2d717e4f
DJ
141852008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14186
14187 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14188 (linux_kill, linux_detach): Clean up the process list.
14189 * remote-utils.c (remote_open): Improve port number parsing.
14190 (putpkt_binary, input_interrupt): Only send interrupts if the target
14191 is running.
14192 * server.c (extended_protocol): Make static.
14193 (attached): Define earlier.
14194 (exit_requested, response_needed, program_argv): New variables.
14195 (target_running): New.
14196 (start_inferior): Clear attached here.
14197 (attach_inferior): Set attached here.
14198 (require_running): Define.
14199 (handle_query): Use require_running and target_running. Implement
14200 "monitor exit".
14201 (handle_v_attach, handle_v_run): New.
14202 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14203 (gdbserver_usage): Update.
14204 (main): Redo argument parsing. Handle --debug and --multi. Handle
14205 --attach along with other options or after the port. Save
14206 program_argv. Support no initial program. Resynchronize
14207 communication with GDB after an error. Handle "monitor exit".
14208 Use require_running and target_running. Always allow the extended
14209 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14210 restart in extended mode.
14211 * README: Refer to the GDB manual. Update --attach usage.
14212
7407e2de
AS
142132007-12-20 Andreas Schwab <schwab@suse.de>
14214
14215 * linux-low.c (STACK_SIZE): Define.
14216 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14217 (linux_test_for_tracefork): Likewise.
14218
b65d95c5
DJ
142192007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14220
14221 * linux-low.c (linux_wait_for_event): Update messages. Do not
14222 reinsert auto-delete breakpoints.
14223 * mem-break.c (struct breakpoint): Change return type of handler to
14224 int.
14225 (set_breakpoint_at): Update handler type.
14226 (reinsert_breakpoint_handler): Return 1 instead of calling
14227 delete_breakpoint.
14228 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14229 setting a new one.
14230 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14231 * mem-break.h (set_breakpoint_at): Update handler type.
14232 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14233 * win32-low.c (auto_delete_breakpoint): New.
14234 (get_child_debug_event): Use it.
14235
4e799345
DJ
142362007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14237
14238 * configure.ac: Check for pread and pwrite.
14239 * hostio.c (handle_pread): Fall back to lseek and read.
14240 (handle_pwrite): Fall back to lseek and write.
14241 * config.in, configure: Regenerated.
14242
27524b67
DJ
142432007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14244
14245 * server.c (myresume): Add own_buf argument.
14246 (main): Update calls.
14247
a20d5e98
DJ
142482007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14249
14250 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14251 * remote-utils.c (remote_open): Do not call disable_async_io.
14252 (block_async_io): Delete.
14253 (unblock_async_io): Make static.
14254 (initialize_async_io): New.
14255 * server.c (handle_v_cont): Handle async I/O here.
14256 (myresume): Likewise. Move other common resume tasks here...
14257 (main): ... from here. Call initialize_async_io. Disable async
14258 I/O before the main loop.
14259 * server.h (initialize_async_io): Declare.
14260 (block_async_io, unblock_async_io): Delete prototypes.
14261 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14262
b79d787e
DJ
142632007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14264
14265 * remote-utils.c (readchar): Allow binary data in received messages.
14266
d97903b2
PA
142672007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14268
14269 * win32-low.c (attaching): New global.
14270 (win32_create_inferior): Clear the `attaching' global.
14271 (win32_attach): Set the `attaching' global.
14272 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14273 attaching. Only set a breakpoint at the entry point if not
14274 attaching.
14275
311de423
PA
142762007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14277
14278 * server.c (main): Don't report dll events on the initial
14279 connection on attaches.
14280
6c2d16d2
PA
142812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14282
14283 * server.c (main): Relax numerical bases supported for the pid of
14284 the --attach command line argument.
14285
5ca906e6
PA
142862007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14287
14288 * win32-low.c (win32_attach): Call OpenProcess before
14289 DebugActiveProcess, not after. Add last error output to error
14290 call.
14291
9c6c8194
PA
142922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14293
14294 * win32-low.c (win32_get_thread_context)
14295 (win32_set_thread_context): New functions.
14296 (thread_rec): Use win32_get_thread_context.
14297 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14298 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14299 field.
14300
4d5d1aaa
PA
143012007-12-03 Leo Zayas
14302 Pedro Alves <pedro_alves@portugalmail.pt>
14303
14304 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14305 global variables.
14306 (child_add_thread): Minor cleanup.
14307 (child_continue): Resume artificially suspended threads before
14308 calling ContinueDebugEvent.
14309 (suspend_one_thread): New.
14310 (fake_breakpoint_event): New.
14311 (get_child_debug_event): Change return type to int. Check here if
14312 gdb sent an interrupt request. If a soft interrupt was requested,
14313 fake a breakpoint event. Return 0 if there is no event to handle,
14314 and 1 otherwise.
14315 (win32_wait): Don't check here if gdb sent an interrupt request.
14316 Ensure there is a valid event to handle.
14317 (win32_request_interrupt): Add soft interruption method as last
14318 resort.
14319
c436e841
PA
143202007-12-03 Leo Zayas
14321 Pedro Alves <pedro_alves@portugalmail.pt>
14322
14323 * win32-low.h (win32_thread_info): Add descriptions to the
14324 structure members. Replace `suspend_count' counter by a
14325 `suspended' flag.
14326 * win32-low.c (thread_rec): Update condition of when to get the
14327 context from the inferior. Rely on ContextFlags being set if it
14328 has already been retrieved. Only suspend the inferior thread if
14329 we haven't already. Warn if that fails.
14330 (continue_one_thread): s/suspend_count/suspended/. Only call
14331 ResumeThread once. Warn if that fails.
14332
e7b5fa67
PA
143332007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14334
14335 * win32-low.c (win32_wait): Don't read from the inferior when it
14336 has already exited.
14337
a385171d
PA
143382007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14339
14340 * Makefile.in (win32_low_h): New variable.
14341 (win32-low.o): Add dependency on $(win32_low_h).
14342 (win32-arm-low.o, win32-i386-low.o): New rules.
14343
f80c84b3
DJ
143442007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14345
14346 * hostio.c: Correct copyright year.
14347
a6b151f1
DJ
143482007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14349
14350 * Makefile.in (OBS): Add hostio.o.
14351 (hostio.o): New rule.
14352 * server.h (handle_vFile): Declare.
14353 * hostio.c: New file.
14354 * server.c (handle_v_requests): Take packet_len and new_packet_len
14355 for binary packets. Call handle_vFile.
14356 (main): Update call to handle_v_requests.
14357
f9387fc3
DJ
143582007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14359
14360 * linux-low.c: Include <sched.h>.
14361
51c2684e
DJ
143622007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14363
14364 * linux-low.c (linux_tracefork_grandchild): New.
14365 (linux_tracefork_child): Use clone.
14366 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14367
75f83163
JB
143682007-10-31 Joel Brobecker <brobecker@adacore.com>
14369
14370 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14371
da5898ce
DJ
143722007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14373
14374 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14375
24a09b5f
DJ
143762007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14377
14378 * inferiors.c (change_inferior_id): Delete.
14379 (add_pid_to_list, pull_pid_from_list): New.
14380 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14381 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14382 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14383 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14384 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14385 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14386 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14387 (using_threads): Always set to 1.
14388 (handle_extended_wait): New.
14389 (add_process): Do not set TID.
14390 (linux_create_inferior): Set must_set_ptrace_flags.
14391 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14392 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14393 (linux_thread_alive): Rename TID argument to LWPID.
14394 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14395 (linux_wait_for_event): Do not use TID or check using_threads. Update
14396 call to dead_thread_notify. Call handle_extended_wait.
14397 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14398 (send_sigstop): Delete sigstop_sent.
14399 (wait_for_sigstop): Avoid TID.
14400 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14401 (linux_test_for_tracefork): New.
14402 (linux_lookup_signals): Use thread_db_active and
14403 linux_supports_tracefork_flag.
14404 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14405 * linux-low.h (get_process_thread): Avoid TID.
14406 (struct process_ifo): Move thread_known and tid to the end. Remove
14407 sigstop_sent.
14408 (linux_attach_lwp, thread_db_init): Update prototypes.
14409 * server.h (change_inferior_id): Delete prototype.
14410 (add_pid_to_list, pull_pid_from_list): New prototypes.
14411 * thread-db.c (thread_db_use_events): New.
14412 (find_first_thread): Rename to...
14413 (find_one_thread): ...this. Update callers and messages. Do not
14414 call fatal. Check thread_db_use_events. Do not call
14415 change_inferior_id or new_thread_notify.
14416 (maybe_attach_thread): Update. Do not call new_thread_notify.
14417 (thread_db_init): Set thread_db_use_events. Check use_events.
14418 * utils.c (fatal, warning): Correct message prefix.
14419
30ed0a8f
DJ
144202007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14421
14422 * Makefile.in (clean): Remove new files.
14423 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14424 (powerpc-64.o, powerpc-64.c): New rules.
14425 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14426 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14427 with SPE.
14428 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14429 SPE targets.
14430 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14431 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14432 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14433 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14434 (target_regsets): Add AltiVec and SPE register sets.
14435 * configure.ac: Check for AltiVec and SPE.
14436 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14437 (ppc_fill_vrregset, ppc_store_vrregset): New.
14438 (target_regsets): Add AltiVec register set.
14439 * configure: Regenerated.
14440
fd462a61
DJ
144412007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14442
14443 * linux-low.c (O_LARGEFILE): Define.
14444 (linux_read_memory): Use /proc/PID/mem.
14445 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14446 * configure, config.in: Regenerated.
14447
69f223ed
DJ
144482007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14449
14450 * linux-low.c (linux_wait_for_event): Do not pass signals while
14451 single-stepping.
14452
aec18585
PA
144532007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14454
14455 * win32-low.c (create_process): New.
14456 (win32_create_inferior): Use create_process instead of
14457 CreateProcess. If create_process failed retry appending an ".exe"
14458 suffix. Store the GetLastError result immediatelly after
14459 create_process calls and use it on the call to error.
14460
34d86ddd
PA
144612007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14462
14463 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14464
5a0e3bd0
JB
144652007-08-23 Joel Brobecker <brobecker@adacore.com>
14466
14467 * configure.ac: Switch license to GPLv3.
14468
f88c79e6
MS
144692007-08-01 Michael Snyder <msnyder@access-company.com>
14470
14471 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14472
6b3d9b83
PA
144732007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14474
14475 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14476 typedef.
14477 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14478 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14479 CloseToolhelp32Snapshot.
14480 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14481 CloseToolhelp32Snapshot.
14482
c588c53c
MS
144832007-07-27 Michael Snyder <michael.snyder@access-company.com>
14484
14485 * server.c (main): Check for inferior exit before main loop.
14486
aa0403d9
PA
144872007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14488
14489 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14490 instead of on tmp_desc.
14491
255e7678
DJ
144922007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14493 Daniel Jacobowitz <dan@codesourcery.com>
14494
14495 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14496 (add_thread): Minor cleanups.
14497 (clear_inferiors): Move lower in the file. Clear the DLL
14498 list.
14499 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14500 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14501 (xml_escape_text): New.
14502 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14503 for qSupported.
14504 (handle_v_cont): Report errors.
14505 (gdbserver_version): Update.
14506 (main): Correct size of own_buf. Do not report initial DLL events.
14507 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14508 (unloaded_dll, xml_escape_text): New.
14509 * win32-low.c (enum target_waitkind): Update comments.
14510 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14511 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14512 (win32_EnumProcessModules, win32_GetModuleInformation)
14513 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14514 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14515 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14516 (win32_Module32First, win32_Module32Next, load_toolhelp)
14517 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14518 (get_child_debug_event): Handle DLL events.
14519 (win32_wait): Likewise.
14520
0d37add9
DJ
145212007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14522
14523 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14524 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14525
45e2715e
PA
145262007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14527
14528 * win32-low.c (handle_output_debug_string): Ignore event if not
14529 waiting.
14530
c5674cf1
PA
145312007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14532
14533 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14534
2bbe3cc1
DJ
145352007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14536
14537 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14538
ae13219e
DJ
145392007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14540
14541 * inferiors.c (change_inferior_id): Add comment.
14542 * linux-low.c (check_removed_breakpoint): Add an early
14543 prototype. Improve debug output.
14544 (linux_attach): Doc update.
14545 (linux_detach_one_process, linux_detach): Clean up before releasing
14546 each process.
14547 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14548 * linux-low.h (struct process_info): Doc improvement.
14549 * mem-break.c (delete_all_breakpoints): New.
14550 * mem-break.h (delete_all_breakpoints): New prototype.
14551 * thread-db.c (find_first_thread): New.
14552 (thread_db_create_event): Call it instead of
14553 thread_db_find_new_threads. Clean up unused variables.
14554 (maybe_attach_thread): Remove first thread handling.
14555 (thread_db_find_new_threads): Use find_first_thread.
14556 (thread_db_get_tls_address): Likewise.
14557
4105de34
DJ
145582007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14559
14560 * thread-db.c (thread_db_find_new_threads): Add prototype.
14561 (thread_db_create_event): Check for the main thread before adding
14562 a new thread.
14563 (maybe_attach_thread): Only enable event reporting if TID == 0.
14564 (thread_db_get_tls_address): Check for new threads.
14565
2b876972
DJ
145662007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14567
14568 * linux-low.c (linux_create_inferior): Try execv before execvp.
14569 * spu-low.c (spu_create_inferior): Likewise.
14570
7a245884
DJ
145712007-06-13 Mike Frysinger <vapier@gentoo.org>
14572
14573 * linux-low.c (linux_create_inferior): Change execv to execvp.
14574 * spu-low.c (spu_create_inferior): Likewies.
14575
117ce543
DJ
145762007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14577
14578 * Makefile.in (clean): Clean new files instead of deleted ones.
14579 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14580 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14581 rules.
14582 * configure.srv: Specify XML files and new regformats for MIPS and
14583 MIPS64 GNU/Linux.
14584 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14585 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14586 an entry for the restart register.
14587 (mips_cannot_fetch_register, mips_cannot_store_register)
14588 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14589 register names to match the XML descriptions.
14590 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14591 restart register instead of $0.
14592
0e7f50da
UW
145932007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14594 Markus Deuling <deuling@de.ibm.com>
14595
14596 * remote-utils.c (decode_xfer_write): New function.
14597 * server.h (decode_xfer_write): Add prototype.
14598 * server.c (handle_query): Add PACKET_LEN argument. Support
14599 qXfer:spu:read and qXfer:spu:write packets.
14600 (main): Pass packet_len to handle_query.
14601 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14602 * target.h (target_ops): Add qxfer_spu.
14603
374c1d38
UW
146042007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14605
14606 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14607 accessing non-seekable spufs files.
14608
bb63802a
UW
146092007-05-16 Markus Deuling <deuling@de.ibm.com>
14610
889bf7c5 14611 * server.c (handle_query): Add reply for qC packet.
bb63802a 14612
7390519e
PA
146132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14614 Leo Zayas <lerele@champenstudios@com>
14615
14616 * server.h (check_remote_input_interrupt_request): New function.
14617 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14618 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14619 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14620 (check_remote_input_interrupt_request): New function.
14621 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14622 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14623 winapi_GenerateConsoleCtrlEvent): New typedefs.
14624 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14625 to 250 ms.
14626 (win32_wait): Check for remote interrupt request
14627 with check_remote_input_interrupt_request.
14628 (win32_request_interrupt): New function.
14629 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14630
34b34921
PA
146312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14632
14633 * win32-low.c (debug_registers_changed,
14634 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14635 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14636 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14637 (thread_rec): Get context using the low target.
14638 (child_add_thread): Call thread_added on the low target,
14639 which does the same thing.
14640 (regptr): Delete.
14641 (do_initial_child_stuff): Remove debug registers references.
14642 Set context using the low target. Resume threads after
14643 setting the contexts.
14644 (child_continue): Remove dead variable. Remove debug
14645 registers references.
14646 (child_fetch_inferior_registers): Go through the low target.
14647 (do_child_store_inferior_registers): Remove.
14648 (child_store_inferior_registers): Go through the low target.
14649 (win32_resume): Remove debug registers references.
14650 Set context using the low target.
14651 (handle_exception): Change return type to void. Don't record
14652 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14653 first chance exception.
889bf7c5 14654 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14655 goto loop. Always return after waiting for debug event.
14656 (win32_wait): Convert to switch statement. Handle spurious
14657 events.
14658
14659 * win32-i386-low.c (debug_registers_changed,
14660 debug_registers_used): New.
14661 (initial_stuff): Rename to ...
14662 (i386_initial_stuff): ... this. Clear debug registers
14663 state variables.
14664 (store_debug_registers): Delete.
14665 (i386_get_thread_context): New.
14666 (load_debug_registers): Delete.
14667 (i386_set_thread_context): New.
14668 (i386_thread_added): New.
14669 (single_step): Rename to ...
14670 (i386_single_step): ... this.
14671 (do_fetch_inferior_registers): Rename to ...
14672 (i386_fetch_inferior_register): ... this.
14673 (i386_store_inferior_register): New.
14674 (the_low_target): Adapt to new interface.
14675
14676 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14677 (arm_get_thread_context): New.
14678 (arm_set_thread_context): New.
14679 (regptr): New.
14680 (do_fetch_inferior_registers): Rename to ...
14681 (arm_fetch_inferior_register): ... this.
14682 (arm_store_inferior_register): New.
14683 (arm_wince_breakpoint): Reimplement as unsigned long.
14684 (arm_wince_breakpoint_len): Define.
14685 (the_low_target): Adapt to new interface.
14686
14687 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14688 load_debug_registers. Add get_thread_context, set_thread_context,
14689 thread_added and store_inferior_register. Rename
14690 fetch_inferior_registers to fetch_inferior_register.
14691 (regptr): Remove declaration.
14692
dd6953e1
PA
146932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14694
14695 * linux-low.c (linux_detach): Change return type to int. Return 0.
14696 * spu-low.c (spu_detach): Likewise.
14697
444d6139
PA
146982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14699
14700 * target.h (target_ops): Change return type of detach to int.
14701 Add join.
14702 (join_inferior): New.
14703 * server.c (main): Don't skip detach support on mingw32.
14704 If the inferior doesn't support detaching return error.
14705 Call join_inferior instead of using waitpid.
14706 * linux-low.c (linux_join): New.
14707 (linux_target_op): Add linux_join.
14708 * spu-low.c (spu_join): New.
14709 (spu_target_ops): Add spu_join.
14710 * win32-low.c (win32_detach): Adapt to new interface.
14711 Reopen current_process_handle before detaching. Issue a child
14712 resume before detaching.
14713 (win32_join): New.
14714 (win32_target_op): Add win32_join.
14715
1d5315fe
PA
147162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14717
14718 * win32-low.c (win32-attach): Fix return value.
14719 * target.h (target_ops): Describe ATTACH return values.
14720
bf914831
PA
147212007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14722
14723 * win32-low.c (GETPROCADDRESS): Define.
14724 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14725 (winapi_DebugSetProcessKillOnExit): Likewise.
14726 (win32_create_inferior): Force usage of ansi CreateProcessA.
14727 (win32_attach): Use GETPROCADDRESS.
14728 (win32_detach): Likewise.
14729
f72f3e60
PA
147302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14731
14732 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14733
ed50f18f
PA
147342007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14735
14736 * win32-low.c: Commit leftover changes from 2007-03-29.
14737
0c2ead7e
DJ
147382007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14739
14740 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14741 fields short instead of int. Add explicit padding.
14742 (i387_cache_to_fsave): Remove unnecessary casts.
14743 (i387_fsave_to_cache): Doc fix.
14744 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14745
73725ff3
DJ
147462007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14747
14748 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14749 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14750
d99f33d8
PA
147512007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14752
14753 * configure.srv (arm*-*-mingw32ce*): Move near the other
14754 arm targets.
14755
68070c10
PA
147562007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14757
2482afc6 14758 * configure.ac: Add errno checking.
68070c10
PA
14759 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14760 sys/file.h and malloc.h.
14761 (AC_CHECK_DECLS): Add perror.
14762 (srv_mingwce): Handle.
2482afc6 14763 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14764 win32-i386-low.o to srv_tgtobj.
14765 (i[34567]86-*-mingw*): Likewise.
14766 (arm*-*-mingw32ce*): Add case.
14767 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14768 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14769 [__MINGW32CE__] (strerror): New function.
14770 [__MINGW32CE__] (errno): Define to GetLastError.
14771 [__MINGW32CE__] (COUNTOF): New macro.
14772 (remote_open): Remove extra close call.
14773 * mem-break.c (delete_breakpoint_at): New function.
14774 * mem-break.h (delete_breakpoint_at): Declare.
14775 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14776 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14777 [USE_WIN32API] (read, write): Add char* casts.
14778 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14779 * server.h: Include wincecompat.h on Windows CE.
14780 [HAVE_ERRNO_H]: Check.
14781 (perror): Declare if not declared.
14782 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14783 (perror_with_name): Remove errno declaration.
14784 * wincecompat.h: New.
14785 * wincecompat.c: New.
14786 * win32-low.h: New.
14787 * win32-arm-low.c: New.
14788 * win32-i386-low.c: New.
14789 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14790 (OUTMSG2): Make it safe.
14791 (_T): New macro.
14792 (COUNTOF): New macro.
14793 (NUM_REGS): Get it from the low target.
14794 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14795 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14796 (thread_rec): Let low target handle debug registers.
14797 (child_add_thread): Likewise.
14798 (child_init_thread_list): Likewise.
14799 (continue_one_thread): Likewise.
14800 (regptr): New.
14801 (do_child_fetch_inferior_registers): Move to ...
14802 * win32-i386-low.c: ... here, and rename to ...
14803 (do_fetch_inferior_registers): ... this.
889bf7c5 14804 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14805 Go through the low target.
14806 (do_child_store_inferior_registers): Use regptr.
14807 (strwinerror): New function.
14808 (win32_create_inferior): Handle Windows CE.
14809 Use strwinerror instead of strerror on Windows error
14810 codes. Add program to the error output.
14811 Don't close the main thread handle on Windows CE.
14812 (win32_attach): Use coredll.dll on Windows CE.
14813 (win32_kill): Close current process and current
14814 thread handles.
14815 (win32_detach): Use coredll.dll on Windows CE.
14816 (win32_resume): Let low target handle debug registers, and
14817 step request.
14818 (handle_exception): Add/Remove initial breakpoint. Avoid
14819 non-existant WSTOPSIG on Windows CE.
14820 (win32_read_inferior_memory): Cast to remove warning.
14821 (win32_arch_string): Go through the low target.
14822 (initialize_low): Call set_breakpoint_data with the low
14823 target's breakpoint.
14824 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14825 FOP_REGNUM, mappings): Move to ...
14826 * win32-i386-low.c: ... here.
14827 * win32-low.c (win32_thread_info): Move to ...
14828 * win32-low.h: ... here.
14829 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14830 win32-arm-low.c and wincecompat.c.
14831 (all:): Add $EXEEXT.
14832 (install-only:): Likewise.
14833 (gdbserver:): Likewise.
14834 (gdbreplay:): Likewise.
14835 * config.in: Regenerate.
14836 * configure: Regenerate.
14837
41093d81
PA
148382007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14839
14840 * win32-low.c: Rename typedef thread_info to
14841 win32_thread_info throughout.
14842
544afa54
PA
148432007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14844
14845 * win32-i386-low.c: Rename to ...
14846 * win32-low.c: ... this.
14847 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14848 * Makefile.in: Likewise.
14849
bce7165d
PA
148502007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14851
14852 * remote-utils.c (monitor_output): Constify msg parameter.
14853 * server.h (monitor_output): Likewise.
14854 * win32-i386-low.c (handle_output_debug_string): New.
14855 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14856 handle_output_debug_string.
14857 (get_child_debug_event): Likewise.
14858
506c7aa0
DJ
148592007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14860
14861 * server.c (main): Correct strtoul check.
14862
42c81e2a
DJ
148632007-03-27 Jon Ringle <jon@ringle.org>
14864
14865 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14866
9453113a
DJ
148672007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14868
14869 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14870
64a69107
DJ
148712007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14872
14873 * terminal.h: Check HAVE_SGTTY_H.
14874
148752007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14876
14877 * remote-utils.c (remote_open): Print out the assigned port number.
14878
c74d0ad8
DJ
148792007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14880
14881 * remote-utils.c (monitor_output): New function.
14882 * server.c (debug_threads): Define here.
14883 (monitor_show_help): New function.
14884 (handle_query): Handle qRcmd.
14885 (main): Do not handle 'd' packet.
14886 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14887 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14888 of debug_threads.
14889
de7c3b4a
PA
148902007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14891
14892 * Makefile.in (EXEEXT): New.
14893 (clean): Use $(EXEEXT).
14894
ef57601b
PA
148952007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14896
14897 * target.h (target_ops): Rename send_signal to request_interrupt,
14898 and remove enum target_signal parameter.
14899 * linux-low.c (linux_request_interrupt): Rename from
14900 linux_send_signal, and always send SIGINT.
14901 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14902 and always send SIGINT.
14903 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14904 of send_signal.
14905 (input_interrupt): Likewise.
14906
820f2bda
PA
149072007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14908
14909 * server.c (get_features_xml): Check if target implemented
14910 arch_string.
14911 * win32-i386-low.c (win32_arch_string): New.
14912 (win32_target_ops): Add win32_arch_string as arch_string member.
14913
ab39bf24
UW
149142007-02-22 Markus Deuling <deuling@de.ibm.com>
14915
14916 * spu-low.c (spu_arch_string): New.
14917 (spu_target_ops): Add spu_arch_string.
14918
61ff6e04
DJ
149192007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14920
14921 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14922 * configure.ac: Do not check for terminal.h.
14923 * configure, config.in: Regenerated.
14924
fb1e4ffc
DJ
149252007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14926
14927 * Makefile.in (OBS): Add $(XML_BUILTIN).
14928 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14929 (clean): Update.
14930 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14931 (arm-with-iwmmxt.c): New.
14932 * config.in, configure: Regenerate.
14933 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14934 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14935 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14936 (arm*-*-linux*): Add iWMMXt and regset support.
14937 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14938 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14939 (arm_store_wmmxregset, target_regsets): New.
14940 * server.c (get_features_xml): Take annex argument. Check builtin
14941 XML documents.
14942 (handle_query): Handle multiple annexes.
14943
0f48aa01
DJ
149442007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14945
14946 * remote-utils.c [USE_WIN32API] (read, write): Define.
14947 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14948 write.
14949
23181151
DJ
149502007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14951
14952 * linux-i386-low.c (the_low_target): Set arch_string.
14953 * linux-x86-64-low.c (the_low_target): Likewise.
14954 * linux-low.c (linux_arch_string): New.
14955 (linux_target_ops): Add it.
14956 * linux-low.h (struct linux_target_ops): Add arch_string.
14957 * server.c (write_qxfer_response): Use const void * for DATA.
14958 (get_features_xml): New.
14959 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14960 * target.h (struct target_ops): Add arch_string method.
14961
9d606399
DJ
149622007-01-03 Denis Pilat <denis.pilat@st.com>
14963 Daniel Jacobowitz <dan@codesourcery.com>
14964
14965 * linux-low.c (linux_kill): Handle being called with no threads.
14966 * win32-i386-low.c (win32_kill): Likewise.
14967 (get_child_debug_event): Clear current_process_handle.
14968
149692006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14970 Daniel Jacobowitz <dan@codesourcery.com>
14971
14972 * remote-utils.c (remote_open): Check the type of specified
14973 serial port devices before opening them.
14974 * server.c (main): Kill the inferior if an error occurs during
14975 the first remote_open.
14976
a5e13d24
DJ
149772006-12-05 Markus Deuling <deuling@de.ibm.com>
14978
14979 * README: Update supported targets.
14980
186947f7
DJ
149812006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14982
14983 * Makefile.in (clean): Remove reg-mips64.c.
14984 (reg-mips64.c, reg-mips64.o): New rules.
14985 * configure.srv: Handle mips64. Include regset support for mips.
14986 * linux-mips-low.c (union mips_register): New.
14987 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14988 (mips_breakpoint, mips_breakpoint_at): Use int.
14989 (mips_collect_register, mips_supply_register)
14990 (mips_collect_register_32bit, mips_supply_register_32bit)
14991 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14992 (mips_store_fpregset, target_regsets): New.
14993 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14994
a13e2c95
UW
149952006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14996
14997 * configure.srv: Add target "spu*-*-*".
14998 * Makefile.in (clean): Remove reg-spu.c.
14999 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15000 * spu-low.c: New file.
15001
cb7283db
DJ
150022006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15003
15004 * configure.ac: Correct td_thr_tls_get_addr test.
15005 * configure: Regenerated.
15006
89be2091
DJ
150072006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15008
15009 * linux-low.c (linux_wait_for_event): Reformat. Use the
15010 pass_signals array.
15011 * remote-utils.c (decode_address_to_semicolon): New.
15012 * server.c (pass_signals, handle_general_set): New.
15013 (handle_query): Mention QPassSignals for qSupported.
15014 (main): Call handle_general_set.
15015 * server.h (pass_signals, decode_address_to_semicolon): New.
15016
000ef4f0
DJ
150172006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15018
15019 * server.c (handle_query): Correct error handling for read_auxv.
15020
b7149293
UW
150212005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15022
15023 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15024 and srv_linux_thread_db to yes.
15025 * linux-s390-low.c (s390_fill_gregset): New function.
15026 (target_regsets): Define data structure.
15027
dae5f5cf
DJ
150282006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15029
15030 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15031 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15032 * config.in, configure: Regenerated.
15033 * inferiors.c (gdb_id_to_thread): New function.
15034 (gdb_id_to_thread_id): Use it.
15035 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15036 * linux-low.h (struct process_info): Add th member.
15037 (thread_db_get_tls_address): New prototype.
15038 * remote-utils.c (decode_address): Make non-static.
15039 * server.c (handle_query): Handle qGetTLSAddr.
15040 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15041 * target.h (struct target_ops): Add get_tls_address.
15042 * thread-db.c (maybe_attach_thread): Save the thread handle.
15043 (thread_db_get_tls_address): New.
15044
32ca6d61
DJ
150452006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15046
15047 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15048 (linux_resume_one_process): Take a siginfo_t *. Update all
15049 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15050 (struct pending_signals): Add a siginfo_t.
15051 (linux_wait_for_process): Always set last_status.
15052 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15053 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15054 * linux-low.h (struct process_info): Add last_status.
15055
5ffff7c1
DJ
150562006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15057
15058 * remote-utils.c (try_rle): New function.
15059 (putpkt_binary): Use it.
15060
8695c747
DJ
150612006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15062
15063 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15064 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15065 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15066 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15067 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15068 point registers.
15069
290fadea
RS
150702006-08-08 Richard Sandiford <richard@codesourcery.com>
15071
15072 * server.c (terminal_fd): New variable.
15073 (old_foreground_pgrp): Likewise.
15074 (restore_old_foreground_pgrp): New function.
15075 (start_inferior): Record the terminal file descriptor in terminal_fd
15076 and its original foreground group in old_foreground_pgrp. Register
15077 restore_old_foreground_pgrp with atexit().
15078
9f2e1e63
DJ
150792006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15080
15081 * server.c (handle_query): Correct qPart to qXfer.
15082
b80864fb
DJ
150832006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15084
15085 * configure.ac: Check for more headers which are missing on
15086 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15087 * configure.srv: Add Cygwin and mingw32.
15088 * remote-utils.c: Don't include headers unconditionally which
15089 are missing on mingw32. Include <winsock.h> for mingw32.
15090 (remote_open): Adjust for mingw32 support. Flush
15091 standard error after writing to it.
15092 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15093 (unblock_async_io, enable_async_io, disable_async_io)
15094 (readchar, getpkt): Update for Winsock support.
15095 (prepare_resume_reply): Expect a protocol signal number.
15096 * server.c: Disable <sys/wait.h> on mingw32.
15097 (start_inferior): Adjust for mingw32 support. Flush
15098 standard error after writing to it.
15099 (attach_inferior): Likewise. Use protocol signal
15100 numbers.
15101 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15102 and names.
15103 * win32-i386-low.c: New file.
15104 * Makefile.in (XM_CLIBS): Set.
15105 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15106 (win32-i386-low.o): New dependency rule.
15107 * linux-low.c (linux_wait): Use target signal numbers.
15108 * target.h (struct target_ops): Doc fix.
15109 * server.h (target_signal_to_name): New prototype.
15110 * gdbreplay.c: Don't include headers unconditionally which
15111 are missing on mingw32. Include <winsock.h> for mingw32.
15112 (remote_close, remote_open): Adjust for Winsock support.
15113 * configure, config.in: Regenerated.
15114
0876f84a
DJ
151152006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15116
15117 * server.c (decode_xfer_read, write_qxfer_response): New.
15118 (handle_query): Take a packet length argument. Handle
15119 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15120 the qSupported response.
15121 (main): Update call to handle_query.
15122
01f9e8fa
DJ
151232006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15124
15125 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15126 (putpkt_binary): Renamed from putpkt and adjusted for binary
15127 data.
15128 (putpkt): New wrapper for putpkt_binary.
15129 (readchar): Don't mask off the high bit.
15130 (decode_X_packet): New function.
15131 * server.c (main): Call putpkt_binary if a handler sets the packet
15132 length. Save the length of the incoming packet. Handle 'X'.
15133 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15134
be2a5f71
DJ
151352006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15136
15137 * server.c (handle_query): Handle qSupported.
15138
ea025f5f
DJ
151392006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15140
15141 * remote-utils.c (all_symbols_looked_up): New variable.
15142 (look_up_one_symbol): Check it.
15143 * server.h (look_up_one_symbol): New declaration.
15144 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15145
9308fc88
DJ
151462006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15147
15148 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15149 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15150 (PTRACE_GET_THREAD_AREA): Define.
15151 (ps_get_thread_area): New function.
15152
52fb6437
NS
151532006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15154
15155 * configure.srv (m68k*-*-uclinux*): New target.
15156 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15157 (linux_resume_one_process): Remove extraneous cast.
15158 (linux_read_offsets): New.
15159 (linux_target_op): Add linux_read_offsets on mmuless systems.
15160 * server.c (handle_query): Add qOffsets logic.
15161 * target.h (struct target_ops): Add read_offsets.
15162
21b0f40c
DJ
151632006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15164
15165 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15166 (PTRACE_GET_THREAD_AREA): Define.
15167 (ps_get_thread_area): New function.
15168 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15169 (linux-x86-64-low.o): Update.
15170
0050a760
DJ
151712006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15172
15173 * configure.ac: Remove checks for prfpregset_t.
15174 * gdb_proc_service.h: New file.
15175 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15176 new "gdb_proc_service.h".
15177 * proc-service.c: Likewise.
15178 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15179 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15180 * Makefile.in (gdb_proc_service_h): Updated.
15181 * configure, config.in: Regenerated.
15182
b92a518e
DJ
151832006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15184
15185 * remote-utils.c (prepare_resume_reply): Move declaration
15186 of gdb_id_from_wait to the top of the block.
15187
545587ee
DJ
151882006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15189
15190 * linux-low.c (regsets_store_inferior_registers): Read the regset
15191 from the target before filling it.
15192
9db87ebd
DJ
151932006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15194
15195 * server.c (attach_inferior): Return SIGTRAP for a successful
15196 attach.
15197
dd24457d
DJ
151982006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15199
15200 * Makefile.in (OBS): Add version.o.
15201 (STAGESTUFF): Delete.
15202 (version.o): Add dependencies.
15203 (version.c): Replace rule.
15204 (clean): Remove version.c.
15205 * server.c (gdbserver_version): New.
15206 (gdbserver_usage): Use printf.
15207 (main): Handle --version and --help.
15208 * server.h (version, host_name): Add declarations.
15209
6f0f660e
EZ
152102005-12-23 Eli Zaretskii <eliz@gnu.org>
15211
889bf7c5
PA
15212 * linux-arm-low.c:
15213 * linux-arm-low.c:
15214 * inferiors.c:
15215 * i387-fp.h:
15216 * i387-fp.c:
15217 * gdbreplay.c:
15218 * regcache.c:
15219 * proc-service.c:
15220 * mem-break.h:
15221 * mem-break.c:
15222 * linux-x86-64-low.c:
15223 * linux-sh-low.c:
15224 * linux-s390-low.c:
15225 * linux-ppc64-low.c:
15226 * linux-ppc-low.c:
15227 * linux-mips-low.c:
15228 * linux-m68k-low.c:
15229 * linux-m32r-low.c:
15230 * linux-low.h:
15231 * linux-low.c:
15232 * linux-ia64-low.c:
15233 * linux-i386-low.c:
15234 * linux-crisv32-low.c:
15235 * thread-db.c:
15236 * terminal.h:
15237 * target.h:
15238 * target.c:
15239 * server.h:
15240 * server.c:
15241 * remote-utils.c:
15242 * regcache.h:
15243 * utils.c:
15244 * Makefile.in:
15245 * configure.ac:
6f0f660e
EZ
15246 * gdbserver.1: Add (C) after Copyright. Update the FSF
15247 address.
15248
9d1fb177
DJ
152492005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15250
15251 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15252 (arm_breakpoint_at): Recognize both breakpoints.
15253 (the_low_target): Use the correct breakpoint instruction.
15254
011a70c2
DJ
152552005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15256
15257 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15258 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15259 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15260 (the_low_target): Update.
15261
7fb85e41
AS
152622005-10-25 Andreas Schwab <schwab@suse.de>
15263
15264 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15265
15266 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15267 (ia64_num_regs): Reduce to 462.
15268
3db0444b
DJ
152692005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15270
15271 * acinclude.m4: Correct quoting.
15272 * aclocal.m4: Regenerated.
15273
15274 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15275 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15276 (thread_db_init): Call thread_db_err_str.
15277 * configure.ac: Check for TD_VERSION.
15278 * config.in, configure: Regenerated.
15279
bee0189a
DJ
152802005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15281
15282 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15283
e9d25b98
DJ
152842005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15285
15286 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15287 is not available. Define HAVE_PTRACE_GETREGS if it is.
15288 * config.in, configure: Regenerated.
15289 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15290 * linux-i386-low.c, linux-m68k-low.c: Update to use
15291 HAVE_PTRACE_GETREGS.
15292 * linux-low.c (regsets_fetch_inferior_registers)
15293 (regsets_store_inferior_registers): Only return 0 if we processed
15294 GENERAL_REGS.
15295 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15296 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15297
a06660f7
DJ
152982005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15299
15300 * inferiors.c (struct thread_info): Add gdb_id.
15301 (add_thread): Add gdb_id argument.
15302 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15303 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15304 calls to add_thread.
15305 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15306 * server.c (handle_query): Use thread_to_gdb_id.
15307 (handle_v_cont, main): Use gdb_id_to_thread_id.
15308 * server.h (add_thread): Update prototype.
15309 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15310 prototypes.
15311
5a1f5858
DJ
153122005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15313
15314 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15315 left-padded registers.
15316 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15317 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15318
e122f1f5
SE
153192005-07-01 Steve Ellcey <sje@cup.hp.com>
15320
15321 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15322 * configure: Regenerate.
15323 * config.in: Regenerate.
15324 * server.h (NEED_DECLARATION_STRERROR):
15325 Replace with !HAVE_DECL_STRERROR.
15326
d592fa2f
DJ
153272005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15328
15329 * linux-low.c (linux_wait, linux_send_signal): Don't test
15330 an unsigned long variable for > 0 if it could be MAX_ULONG.
15331 * server.c (myresume): Likewise.
15332 * target.c (set_desired_inferior): Likewise.
15333
ccbd4912
MK
153342005-06-13 Mark Kettenis <kettenis@gnu.org>
15335
15336 * configure.ac: Simplify and improve check for socklen_t.
15337 * configure, config.in: Regenerate.
15338
f450004a
DJ
153392005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15340
15341 * acconfig.h: Remove.
15342 * configure.ac: Add a test for socklen_t. Use three-argument
15343 AC_DEFINE throughout.
15344 * config.in: Regenerated using autoheader 2.59.
15345 * configure: Regenerated.
15346
15347 * gdbreplay.c (socklen_t): Provide a default.
15348 (remote_open): Use socklen_t.
15349 * remote-utils.c (socklen_t): Provide a default.
15350 (remote_open): Use socklen_t.
15351 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15352 unsigned char.
15353
15354 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15355 char for buffers.
15356 * linux-low.c (linux_read_memory, linux_write_memory)
15357 (linux_read_auxv): Likewise.
15358 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15359 (check_mem_write): Likewise.
15360 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15361 Likewise.
15362 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15363 (registers_from_string, register_data): Likewise.
15364 * server.c (handle_query, main): Likewise.
15365 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15366 (decode_M_packet): Likewise.
15367 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15368 * target.h (struct target_ops): Update read_memory, write_memory,
15369 and read_auxv.
15370 (read_inferior_memory, write_inferior_memory): Update.
15371 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15372 to unsigned char *.
15373 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15374 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15375 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15376 linux-s390-low.c, linux-sh-low.c: Update for changes in
15377 read_inferior_memory and the_low_target->breakpoint.
15378
eee84df1
DJ
153792005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15380
15381 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15382 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15383 * configure.srv: Add powerpc64-*-linux*.
15384 * linux-ppc64-low.c: New file.
15385
45b134e5
OF
153862005-05-23 Orjan Friberg <orjanf@axis.com>
15387
15388 * linux-cris-low.c: New file with support for CRIS.
15389 * linux-crisv32-low.c: Ditto for CRISv32.
15390 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15391 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15392 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15393 reg-crisv32.o, and reg-crisv32.c to make rules.
15394 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15395 recognized targets.
15396
48d93c75
UW
153972005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15398
15399 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15400 of sizeof (PTRACE_XFER_TYPE).
15401 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15402
e013ee27
OF
154032005-05-12 Orjan Friberg <orjanf@axis.com>
15404
889bf7c5 15405 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15406 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15407 pointers for hardware watchpoint support.
15408 * linux-low.h (struct linux_target_ops): Ditto.
15409 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15410 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15411 to linux_target_ops.
15412 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15413 reply packet.
15414 * server.c (main): Recognize 'Z' and 'z' packets.
15415
b0ded00b
UW
154162005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15417
15418 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15419 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15420 (the_low_target): Add new members.
15421
8643e2ad
DJ
154222005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15423
15424 * proc-service.c (ps_lgetregs): Search all_processes instead of
15425 all_threads.
15426
fc620387
DJ
154272005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15428
15429 * server.c (start_inferior): Change return type to int.
15430 (attach_inferior): Change sigptr to int *.
15431 (handle_v_cont, handle_v_requests): Change signal to int *.
15432 (main): Change signal to int.
15433
154342005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15435
15436 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15437 * configure.srv: Add m32r*-*-linux*.
15438 * linux-m32r-low.c: New file.
15439
e0e76420
DJ
154402005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15441
15442 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15443
a1928bad
DJ
154442005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15445
15446 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15447 Take unsigned long arguments for PIDs.
15448 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15449 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15450 (wait_for_sigstop, linux_resume_one_process)
15451 (regsets_fetch_inferior_registers, linux_send_signal)
15452 (linux_read_auxv): Likewise. Update the types of variables holding
15453 PIDs. Update format string specifiers.
15454 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15455 * remote-utils.c (prepare_resume_reply): Likewise.
15456 * server.c (cont_thread, general_thread, step_thread)
15457 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15458 unsigned long.
15459 (handle_query): Update format specifiers.
15460 (handle_v_cont, main): Use strtoul for thread IDs.
15461 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15462 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15463 (general_thread, step_thread, thread_from_wait)
15464 (old_thread_from_wait): Update.
15465 * target.h (struct thread_resume): Use unsigned long for THREAD.
15466 (struct target_ops): Use unsigned long for arguments to attach and
15467 thread_alive.
15468
dcdb98d2
DJ
154692005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15470
15471 * acinclude.m4: Include bfd/bfd.m4 directly.
15472 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15473 <agriffis@toolchain.org>.
15474 * aclocal.m4, configure: Regenerated.
15475
bec39cab
AC
154762005-01-07 Andrew Cagney <cagney@gnu.org>
15477
15478 * configure.ac: Rename configure.in, require autoconf 2.59.
15479 * configure: Re-generate.
15480
434c4c77
DJ
154812004-12-08 Daniel Jacobowitz <dan@debian.org>
15482
15483 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15484 LIBS when finished.
15485 * aclocal.m4: Regenerated.
15486 * configure: Regenerated.
15487
db1d3e1b
AS
154882004-11-21 Andreas Schwab <schwab@suse.de>
15489
15490 * linux-m68k-low.c (m68k_num_gregs): Define.
15491 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15492 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15493 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15494 (m68k_breakpoint_at): New. Add to the_low_target.
15495
15496 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15497 srv_linux_thread_db to yes.
15498
43360365
JB
154992004-10-20 Joel Brobecker <brobecker@gnat.com>
15500
15501 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15502 (ARCH_SET_FS): Likewise.
15503 (ARCH_GET_FS): Likewise.
15504 (ARCH_GET_GS): Likewise.
15505
fd500816
DJ
155062004-10-16 Daniel Jacobowitz <dan@debian.org>
15507
15508 * linux-i386-low.c (ps_get_thread_area): New.
15509 * linux-x86-64-low.c (ps_get_thread_area): New.
15510 * linux-low.c: Include <sys/syscall.h>.
15511 (linux_kill_one_process): Don't kill the first thread here.
15512 (linux_kill): Kill the first thread here.
15513 (kill_lwp): New function.
15514 (send_sigstop, linux_send_signal): Use it.
15515 * proc-service.c: Clean up #ifdefs.
15516 (fpregset_info): Delete.
15517 (ps_lgetregs): Update and enable implementation.
15518 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15519 implementations.
15520 * remote-utils.c (struct sym_cache, symbol_cache): New.
15521 (input_interrupt): Print a clearer message.
15522 (async_io_enabled): New variable.
15523 (enable_async_io, disable_async_io): Use it. Update comments.
15524 (look_up_one_symbol): Use the symbol cache.
15525 * thread-db.c (thread_db_look_up_symbols): New function.
15526 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15527
f6de3c42
DJ
155282004-10-16 Daniel Jacobowitz <dan@debian.org>
15529
15530 * configure.in: Test for -rdynamic.
15531 * configure: Regenerated.
15532 * Makefile (INTERNAL_LDFLAGS): New.
15533 (gdbserver, gdbreplay): Use it.
15534
2c0fc042
AC
155352004-09-02 Andrew Cagney <cagney@gnu.org>
15536
15537 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15538
075b3282
DJ
155392004-03-23 Daniel Jacobowitz <drow@mvista.com>
15540
15541 * linux-low.c (linux_wait): Clear all_processes list also.
15542
fa6a77dc
DJ
155432004-03-12 Daniel Jacobowitz <drow@mvista.com>
15544
15545 * linux-low.c: Include <errno.h>. Remove extern declaration of
15546 errno.
15547
6d782a97
DJ
155482004-03-12 Daniel Jacobowitz <drow@mvista.com>
15549
15550 * gdbreplay.c, server.h, utils.c: Update copyright years.
15551
3a7fb99b
DJ
155522004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15553
15554 * server.c (main): Print child status or termination signal from
15555 variable 'signal', not 'sig'.
15556
c3e735a6
DJ
155572004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15558
15559 * linux-low.c (linux_read_memory): Change return type to
15560 int. Check for and return error from ptrace().
15561 * target.c (read_inferior_memory): Change return type to int. Pass
15562 back return status from the_target->read_memory().
15563 * target.h (struct target_ops): Adapt *read_memory() prototype.
15564 Update comment.
15565 (read_inferior_memory): Adapt prototype.
15566 * server.c (main): Return an error packet if
15567 read_inferior_memory() returns an error.
15568
a59d1c82
DJ
155692004-03-04 Daniel Jacobowitz <drow@mvista.com>
15570
15571 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15572 Unify with other clean targets.
15573
dc3f8883
DJ
155742004-02-29 Daniel Jacobowitz <drow@mvista.com>
15575
15576 * server.c (handle_v_cont): Call set_desired_inferior.
15577
89a208da
DJ
155782004-02-29 Daniel Jacobowitz <drow@mvista.com>
15579
15580 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15581
62ea82f5
DJ
155822004-02-29 Daniel Jacobowitz <drow@mvista.com>
15583
15584 * linux-low.c (linux_wait): Unblock async I/O.
15585 (linux_resume): Block and enable async I/O.
15586 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15587 * server.h (block_async_io, unblock_async_io): Add prototypes.
15588
6910d122
DJ
155892004-02-29 Daniel Jacobowitz <drow@mvista.com>
15590
15591 * remote-utils.c (remote_open): Print a status notice after
15592 opening a TCP port.
15593 * server.c (attach_inferior): Print a status notice after
15594 attaching.
15595
155962004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15597
15598 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15599
c89dc5d4
DJ
156002004-02-26 Daniel Jacobowitz <drow@mvista.com>
15601
15602 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15603 error packet.
15604 * server.c, target.h: Update copyright years.
15605
4b8dad4a
RM
156062004-02-25 Roland McGrath <roland@redhat.com>
15607
15608 * target.h (struct target_ops): New member `read_auxv'.
15609 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15610 * linux-low.c (linux_read_auxv): New function.
15611 (linux_target_ops): Initialize `read_auxv' member to that.
15612
d7446758
JB
156132004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15614
15615 Committed by Jim Blandy <jimb@redhat.com>.
15616
15617 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15618 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15619 instead of GPR_SIZE to distiguish s390 and s390x targets.
15620
5544ad89
DJ
156212004-01-31 Daniel Jacobowitz <drow@mvista.com>
15622
15623 * linux-low.c: Update copyright year.
15624 (check_removed_breakpoint): Clear pending_is_breakpoint.
15625 (linux_set_resume_request, linux_queue_one_thread)
15626 (resume_status_pending_p): New functions.
15627 (linux_continue_one_thread): Use process->resume.
15628 (linux_resume): Only resume threads if there are no pending events.
15629 * linux-low.h (struct process_info): Add resume request
15630 pointer.
15631
2a68b70e
DJ
156322004-01-30 Daniel Jacobowitz <drow@mvista.com>
15633
15634 * regcache.c (new_register_cache): Clear the allocated register
15635 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15636
64386c31
DJ
156372003-10-13 Daniel Jacobowitz <drow@mvista.com>
15638
15639 * linux-low.c (linux_resume): Take a struct thread_resume *
15640 argument.
15641 (linux_wait): Update call.
15642 (resume_ptr): New static variable.
15643 (linux_continue_one_thread): Renamed from
15644 linux_continue_one_process. Use resume_ptr.
15645 (linux_resume): Use linux_continue_one_thread.
15646 * server.c (handle_v_cont, handle_v_requests): New functions.
15647 (myresume): New function.
15648 (main): Handle 'v' case.
15649 * target.h (struct thread_resume): New type.
15650 (struct target_ops): Change argument of "resume" to struct
15651 thread_resume *.
15652 (myresume): Delete macro.
15653
c938e9b0
L
156542003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15655
15656 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15657 (uninstall): Support DESTDIR.
15658
7f313d07
BC
15659Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15660
15661 * configure.srv: Add xscale*linux copy of arm*linux entry.
15662
3b2fc2ea
DJ
156632003-07-24 Daniel Jacobowitz <drow@mvista.com>
15664
15665 * linux-arm-low.c (arm_reinsert_addr): New function.
15666 (the_low_target): Add arm_reinsert_addr.
15667
1c0a559e
MK
156682003-07-08 Mark Kettenis <kettenis@gnu.org>
15669
15670 * mem-break.c: Remove whitespace at end of file.
15671
43d5792c
DJ
156722003-06-28 Daniel Jacobowitz <drow@mvista.com>
15673
15674 * configure.in: Check whether we need to prototype strerror.
15675 * server.h: Optionally prototype strerror.
15676 * gdbreplay.c (perror_with_name): Use strerror.
15677 * linux-low.c (linux_attach_lwp): Use strerror.
15678 * utils.c (perror_with_name): Use strerror.
15679 * config.in, configure: Regenerated.
15680
c8a86edf
DJ
156812003-06-28 Daniel Jacobowitz <drow@mvista.com>
15682
15683 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15684 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15685
73d37363
DJ
156862003-06-20 Daniel Jacobowitz <drow@mvista.com>
15687
15688 * Makefile.in (SFILES): Update.
15689 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15690 low-sun3.c: Remove files.
15691
6ad8ae5c
DJ
156922003-06-17 Daniel Jacobowitz <drow@mvista.com>
15693
15694 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15695 (linux_detach_one_process, linux_detach): New functions.
15696 (linux_target_ops): Add linux_detach.
15697 * server.c (main): Handle 'D' packet.
15698 * target.h (struct target_ops): Add "detach" member.
15699 (detach_inferior): Define.
15700
1581182a
MK
157012003-06-13 Mark Kettenis <kettenis@gnu.org>
15702
15703 From Kelley Cook <kelleycook@wideopenwest.com>:
15704 * configure.srv: Accept i[34567]86 variants.
15705
e5379b03
DJ
157062003-06-05 Daniel Jacobowitz <drow@mvista.com>
15707
15708 * linux-low.c (linux_wait_for_event): Correct comment typos.
15709 (linux_resume_one_process): Call check_removed_breakpoint.
15710 (linux_send_signal): New function.
15711 (linux_target_ops): Add linux_send_signal.
15712 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15713 of kill.
15714 * target.h (struct target_ops): Add send_signal.
15715
2ff29de4
JB
157162003-05-29 Jim Blandy <jimb@redhat.com>
15717
15718 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15719 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15720 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15721 away part of the register's value.
15722
254787d4
DJ
157232003-03-26 Daniel Jacobowitz <drow@mvista.com>
15724
15725 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15726 (linux_wait_for_event, linux_init_signals): Likewise.
15727
94e10508
DJ
157282003-03-17 Daniel Jacobowitz <drow@mvista.com>
15729
15730 * configure.in: Check for stdlib.h.
15731 * configure: Regenerated.
15732 * config.in: Regenerated.
15733
4c0711e0
DJ
157342003-01-04 Andreas Schwab <schwab@suse.de>
15735
15736 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15737
ef66e766
AC
157382003-01-02 Andrew Cagney <ac131313@redhat.com>
15739
15740 * Makefile.in: Remove obsolete code.
15741
a1358604
DJ
157422002-11-20 Daniel Jacobowitz <drow@mvista.com>
15743
15744 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15745 defined(PT_FPR0_HI).
15746
23ce3b1c
DJ
157472002-11-17 Stuart Hughes <seh@zee2.com>
15748
15749 * linux-arm-low.c (arm_num_regs): Increase.
15750 (arm_regmap): Include status register.
15751
157522002-11-17 Daniel Jacobowitz <drow@mvista.com>
15753
15754 * linux-low.c (register_addr): Remove incorrect -1 check.
15755
a9fa9f7d
DJ
157562002-08-29 Daniel Jacobowitz <drow@mvista.com>
15757
15758 * linux-low.c (linux_create_inferior): Call setpgid. Return
15759 the new PID.
15760 (unstopped_p, linux_signal_pid): Remove.
15761 (linux_target_ops): Remove linux_signal_pid.
15762 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15763 global instead of target method.
15764 * target.h (struct target_ops): Remove signal_pid. Update comment
15765 for create_inferior.
15766 * server.c (signal_pid): New variable.
15767 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15768 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15769 (attach_inferior): Set signal_pid.
15770
17574093
DJ
157712002-08-23 Daniel Jacobowitz <drow@mvista.com>
15772
15773 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15774
157752002-08-20 Jim Blandy <jimb@redhat.com>
15776
15777 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15778 default for this.
15779
157802002-08-01 Andrew Cagney <cagney@redhat.com>
15781
15782 * Makefile.in: Make chill references obsolete.
15783
157842002-07-24 Kevin Buettner <kevinb@redhat.com>
15785
15786 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15787 * configure: Regenerate.
15788 * config.in: Regenerate.
15789
157902002-07-09 David O'Brien <obrien@FreeBSD.org>
15791
15792 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15793 (perror_with_name, remote_close, remote_open, expect, play): Static.
15794
157952002-07-04 Michal Ludvig <mludvig@suse.cz>
15796
4b8dad4a 15797 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15798 byte offsets instead of an array of indexes.
15799 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15800
158012002-06-13 Daniel Jacobowitz <drow@mvista.com>
15802
15803 * regcache.c: Add comment.
15804
158052002-06-11 Daniel Jacobowitz <drow@mvista.com>
15806
15807 * thread-db.c: New file.
15808 * proc-service.c: New file.
15809 * acinclude.m4: New file.
15810 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15811 proc-service.o, and thread-db.o.
15812 (linux-low.o): Add USE_THREAD_DB.
15813 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15814 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15815 * aclocal.m4: Regenerated.
15816 * config.in: Regenerated.
15817 * configure: Regenerated.
15818 * configure.in: Check for proc_service.h, sys/procfs.h,
15819 thread_db.h, and linux/elf.h headrs.
15820 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15821 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15822 Check for -lthread_db and thread support.
15823 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15824 PowerPC, and SuperH.
15825 * i387-fp.c: Constify arguments.
15826 * i387-fp.h: Likewise.
15827 * inferiors.c: (struct thread_info): Renamed from
15828 `struct inferior_info'. Remove PID member. Use generic inferior
15829 list header. All uses updated.
15830 (inferiors, signal_pid): Removed.
15831 (all_threads): New variable.
15832 (get_thread): Define.
15833 (add_inferior_to_list): New function.
15834 (for_each_inferior): New function.
15835 (change_inferior_id): New function.
15836 (add_inferior): Removed.
15837 (remove_inferior): New function.
15838 (add_thread): New function.
15839 (free_one_thread): New function.
15840 (remove_thread): New function.
15841 (clear_inferiors): Use for_each_inferior and free_one_thread.
15842 (find_inferior): New function.
15843 (find_inferior_id): New function.
15844 (inferior_target_data): Update argument type.
15845 (set_inferior_target_data): Likewise.
15846 (inferior_regcache_data): Likewise.
15847 (set_inferior_regcache_data): Likewise.
15848 * linux-low.c (linux_bp_reinsert): Remove.
15849 (all_processes, stopping_threads, using_thrads)
15850 (struct pending_signals, debug_threads, pid_of): New.
15851 (inferior_pid): Replace with macro.
15852 (struct inferior_linux_data): Remove.
15853 (get_stop_pc, add_process): New functions.
15854 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15855 Use add_process and add_thread.
15856 (linux_attach_lwp): New function, based on old linux_attach. Use
15857 add_process and add_thread. Set stop_expected for new threads.
15858 (linux_attach): New function.
15859 (linux_kill_one_process): New function.
15860 (linux_kill): Kill all LWPs.
15861 (linux_thread_alive): Use find_inferior_id.
15862 (check_removed_breakpoints, status_pending_p): New functions.
15863 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15864 Update. Use WNOHANG. Wait for cloned processes also. Update process
15865 struct for the found process.
15866 (linux_wait_for_event): New function.
15867 (linux_wait): Use it. Support LWPs.
15868 (send_sigstop, wait_for_sigstop, stop_all_processes)
15869 (linux_resume_one_process, linux_continue_one_process): New functions.
15870 (linux_resume): Support LWPs.
15871 (REGISTER_RAW_SIZE): Remove.
15872 (fetch_register): Use register_size instead. Call supply_register.
15873 (usr_store_inferior_registers): Likewise. Call collect_register.
15874 Fix recursive case.
15875 (regsets_fetch_inferior_registers): Improve error message.
15876 (regsets_store_inferior_registers): Add debugging.
15877 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15878 (unstopped_p, linux_signal_pid): New functions.
15879 (linux_target_ops): Add linux_signal_pid.
15880 (linux_init_signals): New function.
15881 (initialize_low): Call it. Initialize using_threads.
15882 * regcache.c (inferior_regcache_data): Add valid
15883 flag.
15884 (get_regcache): Fetch registers lazily. Add fetch argument
15885 and update all callers.
15886 (regcache_invalidate_one, regcache_invalidate): New
15887 functions.
15888 (new_register_cache): Renamed from create_register_cache.
15889 Return the new regcache.
15890 (free_register_cache): Change argument to a void *.
15891 (registers_to_string, registers_from_string): Call get_regcache
15892 with fetch flag set.
15893 (register_data): Make static. Pass fetch flag to get_regcache.
15894 (supply_register): Call get_regcache with fetch flag clear.
15895 (collect_register): Call get_regcache with fetch flag set.
15896 (collect_register_as_string): New function.
15897 * regcache.h: Update.
15898 * remote-utils.c (putpkt): Flush after debug output and use
15899 stderr.
15900 Handle input interrupts while waiting for an ACK.
15901 (input_interrupt): Use signal_pid method.
15902 (getpkt): Flush after debug output and use stderr.
15903 (outreg): Use collect_register_as_string.
15904 (new_thread_notify, dead_thread_notify): New functions.
15905 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15906 and general_thread.
15907 (look_up_one_symbol): Flush after debug output.
15908 * server.c (step_thread, server_waiting): New variables.
15909 (start_inferior): Don't use signal_pid. Update call to mywait.
15910 (attach_inferior): Update call to mywait.
15911 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15912 (main): Don't fetch/store registers explicitly. Use
15913 set_desired_inferior. Support proposed ``Hs'' packet. Update
15914 calls to mywait.
15915 * server.h: Update.
15916 (struct inferior_list, struct_inferior_list_entry): New.
15917 * target.c (set_desired_inferior): New.
15918 (write_inferior_memory): Constify.
15919 (mywait): New function.
15920 * target.h: Update.
15921 (struct target_ops): New signal_pid method.
15922 (mywait): Removed macro, added prototype.
15923
15924 * linux-low.h (regset_func): Removed.
15925 (regset_fill_func, regset_store_func): New.
15926 (enum regset_type): New.
15927 (struct regset_info): Add type field. Use new operation types.
15928 (struct linux_target_ops): stop_pc renamed to get_pc.
15929 Add decr_pc_after_break and breakpoint_at.
15930 (get_process, get_thread_proess, get_process_thread)
15931 (strut process_info, all_processes, linux_attach_lwp)
15932 (thread_db_init): New.
15933
15934 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15935 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15936 (the_low_target): Add new members.
15937 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15938 (i386_store_fpxregset): Constify.
15939 (target_regsets): Add new kind identifier.
15940 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15941 (i386_set_pc): Add debugging.
15942 (i386_breakpoint_at): New function.
15943 (the_low_target): Add new members.
15944 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15945 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15946 (mips_breakpoint_at): New.
15947 (the_low_target): Add new members.
15948 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15949 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15950 (the_low_target): Add new members.
15951 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15952 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15953 (the_low_target): Add new members.
15954 * linux-x86-64-low.c (target_regsets): Add new kind
15955 identifier.
15956
159572002-05-15 Daniel Jacobowitz <drow@mvista.com>
15958
15959 From Martin Pool <mbp@samba.org>:
15960 * server.c (gdbserver_usage): New function.
15961 (main): Call it.
15962
159632002-05-14 Daniel Jacobowitz <drow@mvista.com>
15964
15965 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15966 stop_at -> stop_pc.
15967
159682002-05-04 Andrew Cagney <ac131313@redhat.com>
15969
15970 * Makefile.in: Remove obsolete code.
15971
159722002-04-24 Michal Ludvig <mludvig@suse.cz>
15973
15974 * linux-low.c (regsets_fetch_inferior_registers),
15975 (regsets_store_inferior_registers): Removed cast to int from
15976 ptrace() calls.
15977 * regcache.h: Added declaration of struct inferior_info.
15978
159792002-04-20 Daniel Jacobowitz <drow@mvista.com>
15980
15981 * inferiors.c (struct inferior_info): Add regcache_data.
15982 (add_inferior): Call create_register_cache.
15983 (clear_inferiors): Call free_register_cache.
15984 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15985 * regcache.c (struct inferior_regcache_data): New.
15986 (registers): Remove.
15987 (get_regcache): New function.
15988 (create_register_cache, free_register_cache): New functions.
15989 (set_register_cache): Don't initialize the register cache here.
15990 (registers_to_string, registers_from_string, register_data): Call
15991 get_regcache.
15992 * regcache.h: Add prototypes.
15993 * server.h: Likewise.
15994
159952002-04-20 Daniel Jacobowitz <drow@mvista.com>
15996
15997 * mem-break.c: New file.
15998 * mem-break.h: New file.
15999 * Makefile.in: Add mem-break.o rule; update server.h
16000 dependencies.
16001 * inferiors.c (struct inferior_info): Add target_data
16002 member.
16003 (clear_inferiors): Free target_data member if set.
16004 (inferior_target_data, set_inferior_target_data): New functions.
16005 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16006 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16007 * linux-low.c (linux_bp_reinsert): New variable.
16008 (struct inferior_linux_data): New.
16009 (linux_create_inferior): Use set_inferior_target_data.
16010 (linux_attach): Likewise. Call add_inferior.
16011 (linux_wait_for_one_inferior): New function.
16012 (linux_wait): Call it.
16013 (linux_write_memory): Add const.
16014 (initialize_low): Call set_breakpoint_data.
16015 * linux-low.h (struct linux_target_ops): Add breakpoint
16016 handling members.
16017 * server.c (attach_inferior): Remove extra add_inferior
16018 call.
16019 * server.h: Include mem-break.h. Update inferior.c
16020 prototypes.
16021 * target.c (read_inferior_memory)
16022 (write_inferior_memory): New functions.
16023 * target.h (read_inferior_memory)
16024 (write_inferior_memory): Change macros to prototypes.
16025 (struct target_ops): Update comments. Add const to write_memory
16026 definition.
16027
160282002-04-11 Daniel Jacobowitz <drow@mvista.com>
16029
16030 * linux-low.c (usr_store_inferior_registers): Support
16031 registers which are allowed to fail to store.
16032 * linux-low.h (linux_target_ops): Likewise.
16033 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16034 (ppc_cannot_store_register): FPSCR may not be storable.
16035
160362002-04-09 Daniel Jacobowitz <drow@mvista.com>
16037
16038 * server.h: Include <string.h> if HAVE_STRING_H.
16039 * ChangeLog: Correct paths in last ChangeLog entry.
16040
160412002-04-09 Daniel Jacobowitz <drow@mvista.com>
16042
16043 * linux-low.h: Remove obsolete prototypes.
16044 (struct linux_target_ops): New.
16045 (extern the_low_target): New.
16046 * linux-low.c (num_regs, regmap): Remove declarations.
16047 (register_addr): Use the_low_target explicitly.
16048 (fetch_register): Likewise.
16049 (usr_fetch_inferior_registers): Likewise.
16050 (usr_store_inferior_registers): Likewise.
16051 * linux-arm-low.c (num_regs): Remove.
16052 (arm_num_regs): Define.
16053 (arm_regmap): Renamed from regmap, made static.
16054 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16055 made static.
16056 (arm_cannot_store_register): Renamed from cannot_store_register,
16057 made static.
16058 (the_low_target): New.
16059 * linux-i386-low.c (num_regs): Remove.
16060 (i386_num_regs): Define.
16061 (i386_regmap): Renamed from regmap, made static.
16062 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16063 made static.
16064 (i386_cannot_store_register): Renamed from cannot_store_register,
16065 made static.
16066 (the_low_target): New.
16067 * linux-ia64-low.c (num_regs): Remove.
16068 (ia64_num_regs): Define.
16069 (ia64_regmap): Renamed from regmap, made static.
16070 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16071 made static.
16072 (ia64_cannot_store_register): Renamed from cannot_store_register,
16073 made static.
16074 (the_low_target): New.
16075 * linux-m68k-low.c (num_regs): Remove.
16076 (m68k_num_regs): Define.
16077 (m68k_regmap): Renamed from regmap, made static.
16078 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16079 made static.
16080 (m68k_cannot_store_register): Renamed from cannot_store_register,
16081 made static.
16082 (the_low_target): New.
16083 * linux-mips-low.c (num_regs): Remove.
16084 (mips_num_regs): Define.
16085 (mips_regmap): Renamed from regmap, made static.
16086 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16087 made static.
16088 (mips_cannot_store_register): Renamed from cannot_store_register,
16089 made static.
16090 (the_low_target): New.
16091 * linux-ppc-low.c (num_regs): Remove.
16092 (ppc_num_regs): Define.
16093 (ppc_regmap): Renamed from regmap, made static.
16094 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16095 made static.
16096 (ppc_cannot_store_register): Renamed from cannot_store_register,
16097 made static.
16098 (the_low_target): New.
16099 * linux-s390-low.c (num_regs): Remove.
16100 (s390_num_regs): Define.
16101 (s390_regmap): Renamed from regmap, made static.
16102 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16103 made static.
16104 (s390_cannot_store_register): Renamed from cannot_store_register,
16105 made static.
16106 (the_low_target): New.
16107 * linux-sh-low.c (num_regs): Remove.
16108 (sh_num_regs): Define.
16109 (sh_regmap): Renamed from regmap, made static.
16110 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16111 made static.
16112 (sh_cannot_store_register): Renamed from cannot_store_register,
16113 made static.
16114 (the_low_target): New.
16115 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16116 (the_low_target): New.
16117
161182002-04-09 Daniel Jacobowitz <drow@mvista.com>
16119
16120 * Makefile.in: Add stamp-h target.
16121 * configure.in: Create stamp-h.
16122 * configure: Regenerated.
16123
161242002-04-09 Daniel Jacobowitz <drow@mvista.com>
16125
16126 * inferiors.c: New file.
16127 * target.c: New file.
16128 * target.h: New file.
16129 * Makefile.in: Add target.o and inferiors.o. Update
16130 dependencies.
16131 * linux-low.c (inferior_pid): New static variable,
16132 moved from server.c.
16133 (linux_create_inferior): Renamed from create_inferior.
16134 Call add_inferior. Return 0 on success instead of a PID.
16135 (linux_attach): Renamed from myattach.
16136 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16137 (linux_thread_alive): Renamed from mythread_alive.
16138 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16139 child dies.
16140 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16141 (regsets_store_inferior_registers): Correct error message.
16142 Add missing ``return 0''.
16143 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16144 (linux_store_registers): Renamed from store_inferior_registers.
16145 (linux_read_memory): Renamed from read_inferior_memory.
16146 (linux_write_memory): Renamed from write_inferior_memory.
16147 (linux_target_ops): New structure.
16148 (initialize_low): Call set_target_ops ().
16149 * remote-utils.c (unhexify): New function.
16150 (hexify): New function.
16151 (input_interrupt): Send signals to ``signal_pid''.
16152 * server.c (inferior_pid): Remove.
16153 (start_inferior): Update create_inferior call.
16154 (attach_inferior): Call add_inferior.
16155 (handle_query): New function.
16156 (main): Call handle_query for `q' packets.
16157 * server.h: Include "target.h". Remove obsolete prototypes.
16158 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16159
161602002-04-09 Daniel Jacobowitz <drow@mvista.com>
16161
16162 * Makefile.in: Add WARN_CFLAGS. Update configury
16163 dependencies.
16164 * configure.in: Check for <string.h>
16165 * configure: Regenerate.
16166 * config.in: Regenerate.
16167 * gdbreplay.c: Include needed system headers.
16168 (remote_open): Remove strchr prototype.
16169 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16170 * regcache.c (supply_register): Change buf argument to const void *.
16171 (supply_register_by_name): Likewise.
16172 (collect_register): Change buf argument to void *.
16173 (collect_register_by_name): Likewise.
16174 * regcache.h: Add missing prototypes.
16175 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16176 * server.c (handle_query): New function.
16177 (attached): New static variable, moved out of main.
16178 (main): Quiet longjmp clobber warnings.
16179 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16180 * utils.c (error): Remove NORETURN.
16181 (fatal): Likewise.